Skip to content

chore(sync): absorb upstream through 34743f4ad - #5

Merged
BegoniaHe merged 12 commits into
masterfrom
sync/upstream-34743f4ad
Sep 1, 2026
Merged

chore(sync): absorb upstream through 34743f4ad#5
BegoniaHe merged 12 commits into
masterfrom
sync/upstream-34743f4ad

Conversation

@BegoniaHe

Copy link
Copy Markdown
Collaborator

Summary

Absorb upstream fe3d77568b88ea3be83b2190d515da0a039da399..34743f4adfe666e52422426e792b8ff7c88b92ec (8 commits) into this fork. Cursor is now 34743f4adfe666e52422426e792b8ff7c88b92ec.

Adapted AstrBotDevs#9873, AstrBotDevs#9872, AstrBotDevs#9874, AstrBotDevs#9767, and AstrBotDevs#9883. Cherry-picked AstrBotDevs#9841. Skipped AstrBotDevs#9856 (already equivalent via 4e909eca1) and AstrBotDevs#9879 (dashboard deferral already present; omitted migra_webchat_session.py; kept fork 404 pointing at make run). Follow-up commit aligns the productized config workspace with the current composition UI.

Related issue

None. Upstream synchronization.

Implementation notes

  • AnySearch uses the fork HTTP session and key rotator; empty keys issue one anonymous request. Docs updated in zh/en only; ru-RU omitted.
  • Gemini history image references go through the current media helper. _prepare_conversation is async.
  • Lark command matching skips a leading self mention; mixed outbound messages keep buffered text.
  • Skill editor dialog is fullscreen on compact viewports; current composition card layout stays.
  • Config workspace uses a profile menu, collapsible search, dedicated AI panel, and shared provider selection menu. Keep ConfigPage unsaved banner, step-up, FloatingActionStack, and in-app /help docs. MDI subset regenerated.
  • No upstream version bump in this interval. Absorbed user-visible changes are in changelogs/v4.27.5.md.

Validation

Focused checks recorded on the integration commits:

uv run pytest tests/unit/platform/test_lark_adapter.py -q
uv run pytest tests/unit/provider/test_gemini_source.py -q
uv run pytest tests/unit/test_web_search_tools.py tests/unit/test_astr_main_agent.py::TestBuiltinToolInjection -q
cd dashboard && pnpm exec vue-tsc --noEmit
cd dashboard && pnpm exec vitest run --config vitest.config.ts tests/skillsSection.vitest.ts tests/configDocs.vitest.ts tests/dialogScrollLayouts.vitest.ts tests/remainingCoverage.vitest.ts tests/pageSmokes.vitest.ts tests/chatComponentSmokes.vitest.ts tests/configItemFragments.vitest.ts tests/configEditorDialogs.vitest.ts
cd dashboard && pnpm run i18n:check

Did not re-run make check, make test, or docs:build for this PR.

Compatibility and risk

No fork-owned publish/docs URLs restored. Residual risk is Dashboard config workspace layout on small screens and AnySearch anonymous quota behavior.

Checklist

  • The change is focused and does not include unrelated refactoring.
  • I added or updated tests, or explained why tests are not practical.
  • I ran the relevant formatting, lint, build, and test commands.
  • User-visible behavior updates both docs/zh/ and docs/en/ when needed.
  • OpenAPI, generated client, docs/public/openapi.json, and tests change together when routes or schemas change.
  • No secrets committed. Runtime Python deps update pyproject.toml, requirements.txt, and uv.lock together.
  • I did not restore legacy shims, Python <3.14 fallbacks, or upstream publish/docs URLs as fork artifacts.
  • Breaking API or behavior changes use ! and a BREAKING CHANGE: footer.
  • I will not merge this PR myself. Merge needs a human maintainer review plus a separate AI-assisted review (AI_POLICY.md).
  • AI use follows AI_POLICY.md. Keep exactly one author note below. Do not fabricate the other.

Agent note

Goal: publish sync/upstream-34743f4ad and open a PR against master, with BegoniaHe as reviewer.

Paths: Lark adapter/event, Gemini source, web search tools, Dashboard config/skills/provider menus, bilingual websearch docs, changelogs/v4.27.5.md, upstream-sync.yaml, upstream-decisions.jsonl.

Checks run: focused pytest and Dashboard vitest/vue-tsc/i18n recorded on the integration commits. Residual risk: full make check / make test not re-run here.

Tools: grok-4.6 in opencode.

mantoujun12 and others added 8 commits September 1, 2026 01:44
…strBotDevs#9873)

Keep the current skill editor card structure and scrollable dialog.
Enable fullscreen on mdAndDown, lift the 88vh cap on compact viewports,
and stack the file tree above the editor so save/cancel stay reachable.

Upstream-Commit: 0298ddd
Upstream-Author: 一张白纸 <202384594+mantoujun12@users.noreply.github.com>
Upstream-PR: AstrBotDevs#9873
Sync-Disposition: adapt
Fork-Adaptation: Apply fullscreen and compact overflow rules to the existing composition-based SkillsSection dialog instead of the upstream template. Keep scrollable and the current header/body/actions card layout.
Tested: cd dashboard && pnpm exec vitest run --config vitest.config.ts tests/skillsSection.vitest.ts
AI-Generated: true
Generated-At: 2026-08-31T23:44:50Z
…9872)

Skip a leading self mention in the Lark text projection used for wake
and command matching. Keep Comp.At on the message chain, and do not pass
bot identity into quoted-message reconstruction.

Upstream-Commit: b0f2f90
Upstream-Author: Ars1027 <118655114+Ars1027@users.noreply.github.com>
Upstream-PR: AstrBotDevs#9872
Sync-Disposition: adapt
Fork-Adaptation: Apply the skip onto the current helper that already serializes image/file/audio/video components. Keep tests under tests/unit/platform/test_lark_adapter.py.
Tested: uv run pytest tests/unit/platform/test_lark_adapter.py -q
AI-Generated: true
Generated-At: 2026-08-31T23:46:42Z
Copy non-empty buffered text elements before clearing them when an image is inserted, and avoid emitting empty blocks for image-first messages.

Co-authored-by: liruihan <liruihan@example.com>
(cherry picked from commit e17f568)
Resolve local and non-data-URL image references in Gemini history
through the current media helper instead of assuming a data URL.

Upstream-Commit: 5aca0c9
Upstream-Author: AnegasakiNene <990126341@qq.com>
Upstream-PR: AstrBotDevs#9874
Sync-Disposition: adapt
Fork-Adaptation: Make the existing _prepare_conversation helper async and place tests under tests/unit/provider/. Convert remaining prepare-conversation tests and query-path mocks to await/AsyncMock.
Tested: uv run pytest tests/unit/provider/test_gemini_source.py -q
AI-Generated: true
Generated-At: 2026-08-31T23:50:00Z
…9767)

Add AnySearch as a seventh web search provider, including anonymous
daily-quota mode when no API key is configured.

Upstream-Commit: f845a8d
Upstream-Author: WangPan59 <79305027+WangPan59@users.noreply.github.com>
Upstream-PR: AstrBotDevs#9767
Sync-Disposition: adapt
Fork-Adaptation: Use _client_session/_post and runtime _get_key_rotator instead of ClientSession(trust_env=True) and a module-level rotator. Empty keys issue one anonymous request. Update zh/en docs and metadata only; omit ru-RU and the bundled plugin-guide formatting rewrite.
Tested: uv run pytest tests/unit/test_web_search_tools.py tests/unit/test_astr_main_agent.py::TestBuiltinToolInjection -q
AI-Generated: true
Generated-At: 2026-08-31T23:52:37Z
Rebuild the configuration workspace with a profile menu, collapsible
search, dedicated AI panel, and shared provider selection menu.

Upstream-Commit: 34743f4
Upstream-Author: Soulter <37870767+Soulter@users.noreply.github.com>
Upstream-PR: AstrBotDevs#9883
Sync-Disposition: adapt
Fork-Adaptation: Keep the composition ConfigPage unsaved banner, step-up, and FloatingActionStack. Point docs at in-app /help via configDocsHref. Omit ru-RU and docs.astrbot.app. Replace ChatUILogo with the local plugin icon. Regenerate the MDI subset from current sources.
Tested: cd dashboard && pnpm exec vue-tsc --noEmit && pnpm exec vitest run --config vitest.config.ts tests/configDocs.vitest.ts tests/dialogScrollLayouts.vitest.ts tests/remainingCoverage.vitest.ts tests/pageSmokes.vitest.ts tests/chatComponentSmokes.vitest.ts tests/configItemFragments.vitest.ts tests/configEditorDialogs.vitest.ts && pnpm run i18n:check
AI-Generated: true
Generated-At: 2026-09-01T00:06:09Z
Advance the upstream cursor to 34743f4
after reviewing eight commits. Record adapt, cherry-pick, and skip
decisions plus the absorbed 4.27.5 changelog entries.

AI-Generated: true
Generated-At: 2026-09-01T00:08:38Z
Align section ordering and search behavior with the productized configuration design. Keep provider menus compatible with chat model labels and custom selector text, and lazy-load provider management views to avoid eager Monaco imports.

AI-Generated: true

Generated-At: 2026-09-01T01:08:34Z
@BegoniaHe
BegoniaHe removed the request for review from YUZHEthefool September 1, 2026 07:33
@BegoniaHe BegoniaHe self-assigned this Sep 1, 2026
@YUZHEthefool

Copy link
Copy Markdown
Member

@xero-team-bot review

@xero-team-bot

xero-team-bot Bot commented Sep 1, 2026

Copy link
Copy Markdown

🔄 Reviewing (exploring the project + incremental diff), one moment…

@xero-team-bot xero-team-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 AI Code Review

The synchronization introduces a Python syntax error in the new AnySearch tool, preventing the web-search module (and likely application startup) from being imported.

Risk breakdown

Level Count
🔴 critical 1
🟠 high 0
🟡 medium 0
🔵 low 0
⚪ info 0

engine: agent (10 turns)

🔴 critical (1)

  • astrbot/core/tools/web_search_tools.py:1432 — Invalid multiple-exception syntax prevents module import
    The new AnySearchWebSearchTool.call method uses except TypeError, ValueError:, which is invalid Python 3 syntax and raises a SyntaxError when this module is parsed. Since the module contains the built-in web-search tools and is imported by the agent, this can prevent AstrBot from starting or loading web-search functionality at all.
    💡 Change the handler to except (TypeError, ValueError):.

_, provider_settings, _ = _get_runtime(context)

try:
max_results = int(kwargs.get("max_results", 10))

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔴 Invalid multiple-exception syntax prevents module import

The new AnySearchWebSearchTool.call method uses except TypeError, ValueError:, which is invalid Python 3 syntax and raises a SyntaxError when this module is parsed. Since the module contains the built-in web-search tools and is imported by the agent, this can prevent AstrBot from starting or loading web-search functionality at all.

💡 Change the handler to except (TypeError, ValueError):.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's the python 3.14 syntax. Exceptions can be used without parentheses.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@YUZHEthefool

Copy link
Copy Markdown
Member

@xero-team-bot author

@xero-team-bot

xero-team-bot Bot commented Sep 1, 2026

Copy link
Copy Markdown

Status updated: waiting on the author (waiting-on-author).

@BegoniaHe

Copy link
Copy Markdown
Collaborator Author

@xero-team-bot review

Please manually comfirm that all commits are valid and work properly. This pr is created by LLMs

Align schema initialization with the empty-database cutover.
Record missing 4.27.5 user-visible changes in the bilingual changelog.

AI-Generated: true
Generated-At: 2026-09-01T08:42:29Z
Point waking-check and agent-request tests at command_prefixes and
llm_access so they match the 4.27.5 routing config.

AI-Generated: true
Generated-At: 2026-09-01T13:37:30Z
Date the notes, drop the WIP marker, and record occupancy as Dashboard
rename plus the command-update takeover API.

AI-Generated: true
Generated-At: 2026-09-01T13:37:41Z
@BegoniaHe
BegoniaHe merged commit ec93888 into master Sep 1, 2026
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants