Rebase to v4.26.8 with respect_env_proxy and MCP trust_env - #2
Closed
bowling233 wants to merge 46 commits into
Closed
Rebase to v4.26.8 with respect_env_proxy and MCP trust_env#2bowling233 wants to merge 46 commits into
bowling233 wants to merge 46 commits into
Conversation
…s#9333) Bumps the github-actions group with 2 updates: [actions/setup-node](https://github.com/actions/setup-node) and [actions/setup-python](https://github.com/actions/setup-python). Updates `actions/setup-node` from 6 to 7 - [Release notes](https://github.com/actions/setup-node/releases) - [Commits](actions/setup-node@v6...v7) Updates `actions/setup-python` from 6 to 7 - [Release notes](https://github.com/actions/setup-python/releases) - [Commits](actions/setup-python@v6...v7) --- updated-dependencies: - dependency-name: actions/setup-node dependency-version: '7' dependency-type: direct:production update-type: version-update:semver-major dependency-group: github-actions - dependency-name: actions/setup-python dependency-version: '7' dependency-type: direct:production update-type: version-update:semver-major dependency-group: github-actions ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…eopened) (AstrBotDevs#8323) * fix: Faiss read/write on Windows with non-ASCII paths Bridge Faiss C++ fopen() ANSI codepage limitation through pure ASCII temp files using Python shutil. Also fix dtype=np.int64 for IDs, vector.reshape for search, and remove incorrect normalize_L2 on IndexFlatL2. * fix: narrow RuntimeError catch, add search validation, bridge only when needed Addresses bot review feedback on PR AstrBotDevs#8323: - Add _needs_bridge() helper to activate temp file bridge only on Windows + non-ASCII paths (Sourcery AstrBotDevs#5) - _read_index: re-raise RuntimeError when bridging not needed, preventing silent swallowing of genuine Faiss errors (Sourcery #1) - _write_index: skip temp file for ASCII/non-Windows paths (Sourcery AstrBotDevs#5) - search(): validate ndim==1 and dimension before reshape, preventing silent semantic corruption on 2D input (Sourcery AstrBotDevs#3, AstrBotDevs#4) - _safe_temp_dir & _make_temp_file: simplify (Sourcery AstrBotDevs#6, AstrBotDevs#7) - Remove redundant CWD fallback (never reached on non-ASCII paths) - Remove redundant UUID prefix (mkstemp O_EXCL guarantees uniqueness) All changes tested: 119/119 pass covering bridge logic, ASCII/non-ASCII paths, concurrent temp file uniqueness, search validation, and exception propagation. * style: ruff format * chore: ruff check fix * fix: make search() accept both 1D and 2D vectors, fix caller shape --------- Co-authored-by: Soulter <905617992@qq.com>
…mp (AstrBotDevs#9349) * fix: move now = datetime.now() inside the lock to avoid stale timestamp in concurrent scenario When multiple coroutines wait for the same session lock, they all capture ow = datetime.now() before entering the lock. By the time a coroutine actually acquires the lock, the captured timestamp is stale — it reflects the time before the wait, not the actual acquisition time. This causes expired timestamps to not be cleaned and the rate limit window to be calculated from the wrong reference time. Moving ow = datetime.now() inside the lock ensures every coroutine uses the current time at the moment it acquires the lock, fixing the stale-timestamp bug for the stall strategy. Co-authored-by: yunyancuo <3468440670@qq.com> * test: address review - subclass datetime, derive expected stall
* feat(logging): add isolated plugin loggers * feat(dashboard): configure plugin log levels * fix(logging): support legacy plugin loggers * fix(dashboard): sync plugin log level response * perf(logging): avoid rescanning plugin handlers * fix(logging): persist plugin levels atomically * test(logging): use valid logger level mocks
…strBotDevs#9367) - move blocking CPU sampling to a worker thread - report AstrBot process usage instead of system-wide CPU usage - normalize process usage by the logical CPU count
regression) (AstrBotDevs#9350) PR AstrBotDevs#8323 inadvertently moved import faiss back to module top level, re-introducing the faiss-cpu 1.14.2 deadlock fixed by PR AstrBotDevs#8696. This commit moves the import back inside __init__() (as AstrBotDevs#8696 did), with local imports in _read_index/_write_index static methods. All ASCII temp-file bridge logic from AstrBotDevs#8323 is preserved.
* fix: show progress when saving plugin config * fix: normalize error message shown when saving plugin config fails * feat: animate plugin config save progress dialog
* fix: check quoted text for content safety * fix: initialize content safety result * fix: combine content safety check text --------- Co-authored-by: JIANZHOU <jzhou2409324124@gmail.com>
Co-authored-by: w33d <w33d@holdfast.local>
Co-authored-by: w33d <w33d@holdfast.local>
Co-authored-by: w33d <w33d@holdfast.local>
…resh FAISS index (AstrBotDevs#9385) Fixes AstrBotDevs#9375
* fix: drop trailing separator from message outline
`_outline_chain` appended a space after every component, so the outline
always ended with a stray separator: a chain of `Hello` and `world`
produced `"Hello world "` instead of `"Hello world"`.
Join the parts with a space instead of appending one per iteration. This
only removes the separator, so whitespace that belongs to the message
itself is preserved (a lone `Plain("Hello ")` still outlines to
`"Hello "`), and it matches how the respond-stage test double already
builds its outline.
`get_message_outline` is public API used by plugins, and the outline is
also stored on TraceSpan and used by the follow-up stage, which already
called `.strip()` on it.
Closes AstrBotDevs#9112
* Update test_astr_message_event.py
---------
Co-authored-by: Soulter <37870767+Soulter@users.noreply.github.com>
* Add files via upload * Add files via upload
* docs: add Windows Docker Desktop deployment guide * docs: improve Windows Docker Desktop deployment guide - Change default image to official registry (soulter/astrbot:latest) - Move DaoCloud mirror to TIP section - Update PowerShell code block language tag to powershell - Synchronize Chinese and English versions * docs: fix incorrect docker run commands in Windows Docker Desktop examples
* fix: return correct WebChat image MIME types Co-authored-by: chatgpt-codex-connector[bot] <199175422+chatgpt-codex-connector[bot]@users.noreply.github.com> * fix: centralize WebChat image MIME mapping Co-authored-by: chatgpt-codex-connector[bot] <199175422+chatgpt-codex-connector[bot]@users.noreply.github.com> --------- Co-authored-by: chatgpt-codex-connector[bot] <199175422+chatgpt-codex-connector[bot]@users.noreply.github.com>
* fix: handle nested OpenAI completion choices (AstrBotDevs#9374) * fix: preserve nested OpenAI completion metadata (AstrBotDevs#9374) * Update openai_source.py --------- Co-authored-by: Soulter <37870767+Soulter@users.noreply.github.com>
…AstrBotDevs#9382) * fix: resolve double scrollbar in conversation detail dialog (AstrBotDevs#9361) * fix: resolve double scrollbar in console page (AstrBotDevs#9361)
… prevent process crash (AstrBotDevs#9148) * fix: guard C extension reload in _prefer_module_from_site_packages to prevent process crash * test: add _has_loaded_c_extension regression tests (10 scenarios)
…trBotDevs#9416) Bumps the github-actions group with 1 update: [docker/login-action](https://github.com/docker/login-action). Updates `docker/login-action` from 4.4.0 to 4.5.1 - [Release notes](https://github.com/docker/login-action/releases) - [Commits](docker/login-action@v4.4.0...v4.5.1) --- updated-dependencies: - dependency-name: docker/login-action dependency-version: 4.5.1 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: github-actions ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…strBotDevs#9402) Basic retry sent an empty provider, so the backend fell back to the stale persisted provider. Fall back to the current UI selection, matching send behavior. Closes AstrBotDevs#9400
…e sync state to ensure persistent jobs are always loaded, even when the scheduler is started early (AstrBotDevs#9419) * fix: sync persistent cron jobs after early scheduler start * fix: resync cron jobs after manager shutdown
* docs: update plugin publish * docs: update plugin publish example * docs: update plugin publish
…strBotDevs#9226) * fix: 优化对话列表加载与请求竞态 - 对话列表改为摘要查询,避免读取和传输完整聊天历史,同时保持详情、导出及插件默认行为兼容 - 统一筛选、排除和稳定分页逻辑,补充 SQLite 索引并保留全文搜索能力 - 使用组件级请求编号和取消控制阻止迟到响应覆盖最新状态,修复删除、筛选防抖与分页竞态 - 增加摘要查询、索引、API 响应和参数清洗回归测试 * fix: 保持摘要历史为合法 JSON - 摘要查询未加载历史时返回空 JSON 数组字符串 - 增加管理器摘要结果可解析性的回归测试 * fix: 避免重复显示列表错误 - 仅在保留旧列表数据时显示顶部错误横幅 - 空列表失败时继续使用表格内错误与重试状态 * fix: preserve conversation list compatibility * refactor: align conversation history option naming --------- Co-authored-by: C₂₂H₂₅NO₆ <Sisyphbaous-DT-Project@users.noreply.github.com> Co-authored-by: Soulter <905617992@qq.com>
…r chat entries from the console view (AstrBotDevs#9165) * feat: 为平台日志增加剔除用户对话功能 * Update astrbot/core/log.py Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> * Update astrbot/core/log.py Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> --------- Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
…strBotDevs#9137) * feat: add DashScope embedding provider with multimodal model support * fix: use per-call base_address, handle empty input and invalid dimensions
…xy is configured to prevent local API requests from being intercepted (AstrBotDevs#8897) closes AstrBotDevs#8871 --------- Co-authored-by: Soulter <905617992@qq.com>
…in rank fusion to avoid distorted ordering across independent FTS5 indexes (AstrBotDevs#9426)
* feat: add ChatUI workspace file browser * fix: harden workspace path validation * fix: validate workspace download boundary * fix: resolve workspace files from directory entries
- Add respect_env_proxy config option to preserve system proxy env vars - Set trust_env=True on aiohttp.ClientSession in MCP connection tests - Add config metadata for WebUI
When AstrBot's own http_proxy is not configured but respect_env_proxy is enabled, preserve system proxy environment variables instead of clearing them. This is useful in Kubernetes environments where proxy variables are set via Pod spec.
This ensures aiohttp respects HTTP_PROXY/HTTPS_PROXY/NO_PROXY environment variables when testing MCP server connectivity, which is essential when AstrBot runs behind a proxy (e.g. in Kubernetes with mihomo sidecar).
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
Rebase to upstream v4.26.8, preserving team-s2 incremental changes.
Changes from v4.26.8 baseline
feat: add
respect_env_proxyconfig option (core_lifecycle.py)http_proxyis not configured butrespect_env_proxyis enabled, preserve system proxy environment variables instead of clearing them.fix: set
trust_env=Truefor aiohttp ClientSession in MCP connection test (mcp_client.py)HTTP_PROXY/HTTPS_PROXY/NO_PROXYenvironment variables when testing MCP server connectivity.chore: add docker-build.yml CI workflow (
.github/workflows/docker-build.yml)ghcr.io/team-s2/astrbot.docs: add AGENTS.md for fork maintenance workflow.
Dropped changes (already in upstream v4.26.8)
TODO (small changes, files too large for automated push)
func_tool_manager.py: changeaiohttp.ClientSession()→aiohttp.ClientSession(trust_env=True)in_quick_test_mcp_connectionandsync_modelscope_mcp_servers(2 occurrences)default.py: add"respect_env_proxy": FalsetoDEFAULT_CONFIGand WebUI metadata inCONFIG_METADATA_3_SYSTEM