chore(sync): absorb upstream through #9703 - #188
Merged
Conversation
…#10042) Keep converted model JPEGs out of event cleanup and stop Mattermost from attaching download paths as event-owned temps. Attachment labels still use the original source path; provider JPEG conversion stays in request_preparation. Upstream-Commit: 72928aa Upstream-Author: Soulter <37870767+Soulter@users.noreply.github.com> Upstream-PR: AstrBotDevs#10042 Sync-Disposition: adapt Fork-Adaptation: Apply tracking rules to _normalize_media_component and keep Mattermost tests under tests/unit/platform/. Tested: uv run pytest tests/unit/test_preprocess_stage.py tests/unit/platform/test_mattermost_adapter.py tests/unit/test_astr_main_agent.py::TestBuildMainAgent::test_build_main_agent_with_images -q --test-profile blocking AI-Generated: true Generated-At: 2026-09-14T10:42:11Z
Add page and page_size to WebChat session history, with has_more metadata and scroll-up loading in the composition-based Chat view. Omit ja-JP and ru-RU locales. Dashboard tests use Vitest instead of upstream .test.mjs. Upstream-Commit: fae2c12 Upstream-Author: Wei Chengqian <wcqqq1214@gmail.com> Upstream-PR: AstrBotDevs#9667 Sync-Disposition: adapt Fork-Adaptation: Count history through MessageHistoryStoreMixin; keep MDI ChatLoadError; regenerate Hey API client and public OpenAPI together. Tested: uv run pytest tests/unit/test_chat_service.py::test_get_session_includes_project_threads_and_running_state tests/unit/test_chat_service.py::test_get_session_paginates_history_and_reports_has_more tests/unit/test_chat_service.py::test_get_session_rejects_invalid_pagination tests/unit/db/test_message_history_store.py tests/unit/test_openapi_contract.py -q --test-profile blocking; cd dashboard && pnpm exec vitest run --config vitest.config.ts tests/chatHistoryPagination.vitest.ts tests/chatViewSmoke.vitest.ts tests/logicCoverage.vitest.ts && pnpm exec vue-tsc --noEmit && pnpm i18n:check AI-Generated: true Generated-At: 2026-09-14T10:50:38Z
…tDevs#10053) Stage URL and archive installs in the system temp directory and replace an already-installed plugin of the same metadata name, restoring the previous files if load fails. Skip staging/backup prefixes during discovery. Omit the upstream star_manager.py layout. Upstream-Commit: 7ec39bd Upstream-Author: Soulter <37870767+Soulter@users.noreply.github.com> Upstream-PR: AstrBotDevs#10053 Sync-Disposition: adapt Fork-Adaptation: Implement staging and replace/restore in plugin_package_installer.py and PluginUpdator.install(target_dir=). Tested: uv run pytest tests/unit/test_plugin_manager.py tests/unit/test_updator_socks.py::test_plugin_updator_install_prefers_download_url -q --test-profile blocking AI-Generated: true Generated-At: 2026-09-14T10:56:09Z
Pass the current Chat provider/model selection into ThreadPanel so side thread requests use the same selected_provider and selected_model as the main session. Upstream-Commit: 4007d64 Upstream-Author: Soulter <37870767+Soulter@users.noreply.github.com> Upstream-PR: AstrBotDevs#10065 Sync-Disposition: adapt Fork-Adaptation: Keep webChatStepUpTokens and make getProviderSelection optional for existing ThreadPanel tests. Tested: cd dashboard && pnpm exec vitest run --config vitest.config.ts tests/chatPanels.vitest.ts tests/chatViewSmoke.vitest.ts AI-Generated: true Generated-At: 2026-09-14T10:57:20Z
AstrBotDevs#9703) Keep original image attachments intact in preprocess and re-prepare the working request after OnLLMRequestEvent. Provider JPEG conversion stays in request_preparation, including the remote-URL drop. Upstream-Commit: bd046ed Upstream-Author: 氕氙 <piexian@foxmail.com> Upstream-PR: AstrBotDevs#9703 Sync-Disposition: adapt Fork-Adaptation: Do not add image_input.py; map post-hook preparation onto request_preparation and keep always-JPEG. Tested: uv run pytest tests/unit/test_preprocess_stage.py tests/unit/platform/test_mattermost_adapter.py tests/unit/test_astr_message_event.py tests/unit/test_agent_internal_process.py tests/unit/test_astr_main_agent.py::TestBuildMainAgent::test_build_main_agent_with_images tests/unit/test_provider_request_preparation.py -q --test-profile blocking AI-Generated: true Generated-At: 2026-09-14T11:01:00Z
Confine plugin install/move paths to staging and store roots, strip newlines from install-failure logs, and reject prototype-polluting session keys. Also restore URL/file install mocks for staging target_dir, replace the non-system ChatLoadError rounded token, and satisfy eqeqeq plus the Protocol stub CodeQL note. AI-Generated: true Generated-At: 2026-09-14T11:25:47Z
Replace session-keyed Dashboard records with Map so route conversation ids cannot be treated as remote property writes. Build plugin install destinations with join/normpath/startswith instead of Path.resolve. AI-Generated: true Generated-At: 2026-09-14T11:50:01Z
Skip JPEG conversion until after OnLLMRequestEvent so plugin replacements keep original extra parts. Merge truncated WebChat history by id instead of dropping older loaded pages. Cover plugin replace restore when reload fails. Tested: uv run pytest tests/unit/test_agent_internal_process.py tests/unit/test_astr_main_agent.py::TestBuildMainAgent::test_build_main_agent_with_images tests/unit/test_astr_main_agent.py::TestBuildMainAgent::test_build_main_agent_can_defer_image_preparation tests/unit/test_plugin_manager.py::test_install_plugin_from_file_updates_existing_plugin tests/unit/test_plugin_manager.py::test_install_plugin_from_file_restores_previous_files_on_reload_failure tests/unit/test_preprocess_stage.py tests/unit/test_provider_request_preparation.py -q --test-profile blocking; cd dashboard && pnpm exec vitest run --config vitest.config.ts tests/chatHistoryPagination.vitest.ts tests/chatViewSmoke.vitest.ts tests/useMessagesFollowUp.vitest.ts tests/logicCoverage.vitest.ts AI-Generated: true Generated-At: 2026-09-14T12:31:28Z
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Absorb upstream
8b5f38885e381176f4bdc7fffd245336337a0e3c..bd046ed29914ee559e9bf47676ccb71a84f747ba(8 commits) by cherry-pick policy: 5 adapted implementation commits and 3 skips. Cursor advanced tobd046ed29914ee559e9bf47676ccb71a84f747ba.Related issue
Related: none
Surfaces
openspec/openapi-v1.yaml,dashboard/src/api/generated/openapi-v1/types.gen.ts,docs/public/openapi.jsonupstream-sync.yaml,upstream-decisions.jsonlplugin_package_installer.py,updator.py), Chat history pagination, image preprocess/process-stage preparationImplementation notes
local_agent_runtime_from_profilealready supplies them)installAppUpdatedesktop bridge)conversation.resetvsconversation.create+session.manage)plugin_package_installerstaging/replace)image_input.py; keep always-JPEGrequest_preparation)Validation
make check/make qualitywere not run for this window.Compatibility and risk
request_preparationafterOnLLMRequestEvent.Checklist
chore,build,ops, ortest(notci).pyproject.toml,requirements.txt, anduv.locktogether.Agent note
Goal: apply the reviewed upstream window and open a PR against
Xero-Team/AstrBot. Touched preprocess/Mattermost image tracking, WebChat history pagination (OpenAPI + generated client), plugin staging/replace, ThreadPanel model selection, and post-hook image re-preparation viarequest_preparation. Checks actually run are listed in Validation;make checkwas not run. Residual risk: plugin replace/restore is a smaller matrix than upstream's full installer suite; Chat empty-session error UI is composition-adapted; AstrBotDevs#9703 does not adopt upstream PNG passthrough. Tools: OpenCode,sync-upstreamskill,gh.