Repository navigation
feat(dev-suite): 离线导入 + 断点续传 + MCP 状态文案 l10n(四个兜底) - #24
Merged
Merged
Conversation
Four reliability gaps from the field, closed: 1. Already-installed components (user apt'd rg/nodejs themselves): covered since PR23 — the probe short-circuits before apt, re-assembly is a no-op. Documented in the agent prompt so it says so instead of guessing. 2. Network-restricted users: offline import. New minis-devsuite-offline-list prints the payload manifest (file names + URLs); the user downloads on another device, drops files into /var/minis/shared/offline/ (host-visible shared folder), and every installer (offline_pick in /usr/local/lib/minis/offline.sh) uses the local copy, skipping the network entirely. All seven download sites wired: sdk-tools, cmdline-tools, platform zips, cmake, NDK, flutter, jadx, rustup, llama.cpp (source tarball replaces the git clone). 3. Interrupted downloads: crash-safe resume. Downloads now land in a FIXED .part under /var/minis/shared/cache/devsuite (was /tmp/$$.zip — every retry started from zero) and curl -C - resumes across app kills, reboots, and even mirror switches (mirrors proxy identical release bytes). Range-less mirrors (curl rc 33) fall back to a from-zero retry. Verified end-to-end against a local Range-aware server: fresh / resume-from-40% / no-range fallback / offline-priority. Leaving the install screen was already safe (installer runs in its own SupervisorJob scope, not composition) and the shell keeps the SandboxJobKeepAlive foreground service — the remaining hole was the process dying, which the .part cache now covers. 4. Plugin market copy: subtitle still advertised MCP presets (moved to the MCP screen) — reworded to dev suites + local + online tools; dead plugin_market_section_mcp/footer_mcp strings removed; the hardcoded-Chinese MCP server status line and start-failure toast are now proper stringResources in all 16 locales (mcp_status_*). Agent prompt now carries the full fallback story (probe skip, resume, offline manifest, apt mirrors) so the model can tell users instead of apologizing.
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.
PR23 落地后的四个可靠性兜底,全部来自实际使用场景:
1. 已装资源再点装配
PR23 已有:探针优先(checkCommand 返回 0 直接跳过,不碰 apt),apt 对已装包也是幂等 no-op。本次在智能体提示词里明确写出「重复装配是无操作,可安全重试」,模型不再瞎猜。
2. 网络受限:离线导入(对标 taixu importArchive)
minis-devsuite-offline-list:打印载荷清单(文件名 + URL + 放置路径)/var/minis/shared/offline/(宿主可见共享目录,guest 同路径)offline_pick(sdk-tools / cmdline-tools / platform / cmake / NDK / flutter / jadx / rustup / llama.cpp 源码 tarball 替代 git clone)——命中本地文件完全跳过网络3. 断点续传(app 被杀后不重头下载)
/tmp/$$.zip(每次重跑必然重下)改为固定.part缓存/var/minis/shared/cache/devsuite/(shared 持久,rootfs 重建也在)curl -C -跨 app 杀死 / 重启 / 镜像切换续传(镜像代理同一 release 字节,可跨镜像续)4. 文案
智能体暴露
提示词新增可靠性兜底段:探针跳过、断点续传、离线清单、apt 镜像——模型能主动告诉用户而不是道歉。