feat(local): 技能不再因缺 python3 整体隐藏;缺解释器时先问用户再装

A1:link_skills 恒指向仓库 skills。原来没有 python3 就把 skills_root 指到空目录,
把所有技能一起藏掉——但技能不一定是 Python 的(office 是 SKILL.md + terminal 里调
officecli,跟 python3 无关),一刀切会误伤。而 run.py 类技能缺解释器时 skills.js
的 runEntry 对 spawn error 有处理,模型拿到「技能入口启动失败:spawn python3 ENOENT」,
干净可读,不需要靠藏清单避险。状态页/终端文案同步改成「python3 未安装:Python 技能
会失败,非 Python 技能不受影响」。

B2:env-local 允许模型装运行时,但必须先问用户;仍禁止 sudo 与装系统包。
macOS 的 /usr/bin/python3 是 CLT 桩,真装要走 brew 或官方安装器,耗时长且可能改
PATH / 要管理员权限,这种改动不能默许自主执行。

文档同步:docs/local-mode 4.4 重写(记录为什么不再切换)、4.13 补 B2 理由、
验证表该行标为待复测;local/README 的可选能力表与已知限制同步。
This commit is contained in:
2026-11-11 17:07:20 +08:00
parent c7394dc45f
commit a7eecdbe97
4 changed files with 41 additions and 22 deletions
+3 -3
View File
@@ -2,6 +2,6 @@
real shell with their permissions, other conversations share the same machine,
and `/tmp` is the system temp directory (shared, never cleaned for you). Work
inside the working directory; treat everything outside it as the user's.
- `python3` may be missing; when the skills list below is empty it is not
available. Never install runtimes or system packages. If a skill lacks a Python
module, install it into `$AGENT_SKILLS_DEPS` and retry.
- `python3` may be missing. Never run `sudo` or install system packages. When a
skill lacks a Python module, install it into `$AGENT_SKILLS_DEPS` and retry;
when `python3` itself is missing, ask the user before installing a runtime.