Revert "feat: 接入 Shipyard Neo 自迭代 Skill 闭环与管理能力"#5624
Conversation
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request fully reverts the integration of Shipyard Neo's self-iterating skill management features. The changes systematically remove all code, configurations, and UI elements that were introduced as part of that integration, streamlining the project by eliminating a significant feature set and its associated dependencies. Highlights
Changelog
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
嗨——我已经审查了你的修改,看起来非常棒!
帮我变得更有用吧!请在每条评论上点 👍 或 👎,我会根据你的反馈改进之后的评审。
Original comment in English
Hey - I've reviewed your changes and they look great!
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
|
Related Documentation 1 document(s) may need updating based on files changed in this PR: AstrBotTeam's Space pr4697的改动View Suggested Changes@@ -67,9 +67,6 @@
- `PYTHON_TOOL`:在沙盒环境中执行 Python 代码
- `FILE_UPLOAD_TOOL`:上传文件到沙盒环境
- `FILE_DOWNLOAD_TOOL`:从沙盒环境下载文件
- - `BROWSER_EXECUTE_TOOL`(仅 `shipyard_neo`):在沙盒环境中执行浏览器自动化命令
- - `BROWSER_BATCH_EXECUTE_TOOL`(仅 `shipyard_neo`):批量执行浏览器命令
- - `RUN_BROWSER_SKILL_TOOL`(仅 `shipyard_neo`):运行已发布的浏览器技能
- **`runtime="local"`** 或 **`runtime="local_sandboxed"`** 提供以下工具:
- `LOCAL_EXECUTE_SHELL_TOOL`:在本地环境中执行 Shell 命令
@@ -80,7 +77,11 @@
这些工具在 SubAgent handoff 场景下可正常使用,与主 Agent 运行时动态挂载的工具保持一致。
+> ⚠️ **REVERTED**: Shipyard Neo 运行时及相关浏览器自动化工具(`BROWSER_EXECUTE_TOOL`、`BROWSER_BATCH_EXECUTE_TOOL`、`RUN_BROWSER_SKILL_TOOL`)已在 [PR #5624](https://github.com/AstrBotDevs/AstrBot/pull/5624) 中被移除,不再可用。
+
**Shipyard Neo 运行时(PR #5028)**
+
+> ⚠️ **REVERTED**: 本节描述的所有 Shipyard Neo 功能已在 [PR #5624](https://github.com/AstrBotDevs/AstrBot/pull/5624) 中被完全移除,以下内容仅供历史参考。
[PR #5028](https://github.com/AstrBotDevs/AstrBot/pull/5028) 新增了 `shipyard_neo` 沙箱运行时选项,基于 Shipyard Neo(Bay)架构,提供浏览器自动化和技能自迭代能力:
@@ -312,6 +313,8 @@
#### Neo 技能生命周期工具(PR #5028)
+> ⚠️ **REVERTED**: 本节描述的所有 Neo 技能生命周期管理工具和功能已在 [PR #5624](https://github.com/AstrBotDevs/AstrBot/pull/5624) 中被完全移除,以下内容仅供历史参考。
+
[PR #5028](https://github.com/AstrBotDevs/AstrBot/pull/5028) 新增了一套技能生命周期管理工具,支持在 `shipyard_neo` 运行时下进行技能自迭代闭环(执行取证 → payload/candidate → evaluate → promote → stable 回写本地 `SKILL.md`)。这些工具仅在使用 `shipyard_neo` 运行时且用户为管理员时可用。
**浏览器自动化工具**:
@@ -346,6 +349,8 @@
**Neo 真源语义与技能同步**:
+> ⚠️ **REVERTED**: Neo 真源语义和技能同步功能已在 [PR #5624](https://github.com/AstrBotDevs/AstrBot/pull/5624) 中被移除,以下内容仅供历史参考。
+
- Neo 作为技能版本的"真源"(single source of truth),stable 发布会自动回写到本地 `SKILL.md`
- 系统维护 `data/skills/neo_skill_map.json` 映射文件,记录 `skill_key` 与本地技能名称、release_id、candidate_id、payload_ref 的对应关系
- 回写后会自动激活本地技能,并最佳努力刷新活跃沙箱中的技能内容
@@ -380,6 +385,8 @@
新增 CronRoute 等 API 路由,支持通过 API 管理定时任务。
#### Neo 技能管理 UI(PR #5028)
+
+> ⚠️ **REVERTED**: 本节描述的所有 Neo 技能管理 UI 和 API 路由已在 [PR #5624](https://github.com/AstrBotDevs/AstrBot/pull/5624) 中被完全移除,以下内容仅供历史参考。
Dashboard Skills 页面新增 Neo 技能视图切换和管理能力:
@@ -938,4 +945,57 @@
---
+## 已移除的功能(PR #5624)
+
+[PR #5624](https://github.com/AstrBotDevs/AstrBot/pull/5624) 完全移除了 Shipyard Neo 相关功能,包括:
+
+**移除的文件和模块**:
+- `astrbot/core/computer/booters/shipyard_neo.py`:ShipyardNeoBooter 类
+- `astrbot/core/computer/booters/bay_manager.py`:Bay 容器管理
+- `astrbot/core/computer/tools/browser.py`:浏览器自动化工具
+- `astrbot/core/computer/tools/neo_skills.py`:Neo 技能生命周期工具
+- `astrbot/core/skills/neo_skill_sync.py`:Neo 技能同步逻辑
+- `scripts/start-with-neo.sh` 和 `scripts/pr_test_env.sh`:Neo 相关脚本
+
+**移除的工具**:
+- `BROWSER_EXEC_TOOL`:浏览器单命令执行工具
+- `BROWSER_BATCH_EXEC_TOOL`:浏览器批量命令执行工具
+- `RUN_BROWSER_SKILL_TOOL`:运行已发布浏览器技能工具
+- `GET_EXECUTION_HISTORY_TOOL`:获取执行历史工具
+- `ANNOTATE_EXECUTION_TOOL`:执行历史标注工具
+- `CREATE_SKILL_PAYLOAD_TOOL`:创建技能 payload 工具
+- `GET_SKILL_PAYLOAD_TOOL`:获取技能 payload 工具
+- `CREATE_SKILL_CANDIDATE_TOOL`:创建技能候选版本工具
+- `LIST_SKILL_CANDIDATES_TOOL`:列出技能候选版本工具
+- `EVALUATE_SKILL_CANDIDATE_TOOL`:评估技能候选版本工具
+- `PROMOTE_SKILL_CANDIDATE_TOOL`:提升技能候选版本工具
+- `LIST_SKILL_RELEASES_TOOL`:列出技能发布版本工具
+- `ROLLBACK_SKILL_RELEASE_TOOL`:回滚技能发布工具
+- `SYNC_SKILL_RELEASE_TOOL`:同步技能发布工具
+
+**移除的配置项**:
+- `provider_settings.sandbox.booter` 的 `shipyard_neo` 选项(默认值改回 `shipyard`)
+- `provider_settings.sandbox.shipyard_neo_endpoint`
+- `provider_settings.sandbox.shipyard_neo_access_token`
+- `provider_settings.sandbox.shipyard_neo_profile`
+- `provider_settings.sandbox.shipyard_neo_ttl`
+
+**移除的 UI 和 API**:
+- Dashboard Skills 页面的 Neo 视图切换(Local / Neo 切换按钮)
+- Neo Candidates 列表和相关操作按钮
+- Neo Releases 列表和相关操作按钮
+- Neo Skills API 路由(`/api/skills/neo/*`)
+- `data/skills/neo_skill_map.json` 映射文件管理
+
+**移除的测试**:
+- `tests/test_computer_config.py`
+- `tests/test_computer_skill_sync.py`
+- `tests/test_neo_skill_sync.py`
+- `tests/test_neo_skill_tools.py`
+- `tests/test_profile_aware_tools.py`
+- `tests/test_skill_manager_sandbox_cache.py`
+- `tests/test_skill_metadata_enrichment.py`
+
+---
+
如需进一步了解 CronJob 设计与后台任务机制,可参考 [ASYNC_TASK_new.md](https://github.com/AstrBotDevs/AstrBot/pull/4697) 文档和 PR 详情。Note: You must be authenticated to accept/decline updates. |
There was a problem hiding this comment.
Code Review
This pull request reverts the integration of Shipyard Neo, simplifying the skill and sandbox management back to a Shipyard-only model. The changes are extensive, touching configuration, backend logic, frontend UI, and documentation to remove all traces of the Neo feature. The revert is mostly clean, but I've identified a couple of minor issues: a potential TypeError in astr_main_agent.py due to unsafe string formatting with a nullable variable, and a leftover debug print statement in skill_manager.py. Addressing these will ensure the codebase remains robust and clean after this large-scale feature removal.
| req.func_tool.add_tool(SYNC_SKILL_RELEASE_TOOL) | ||
|
|
||
| req.system_prompt = f"{req.system_prompt or ''}\n{SANDBOX_MODE_PROMPT}\n" | ||
| req.system_prompt = f"{req.system_prompt}\n{SANDBOX_MODE_PROMPT}\n" |
There was a problem hiding this comment.
The system_prompt can be None, which would cause this f-string to produce the literal string "None\n..." instead of just the sandbox prompt. The previous implementation f"{req.system_prompt or ''}..." was safer as it correctly handled the None case by converting it to an empty string. I recommend restoring that behavior to prevent unexpected system prompts.
| req.system_prompt = f"{req.system_prompt}\n{SANDBOX_MODE_PROMPT}\n" | |
| req.system_prompt = f"{req.system_prompt or ''}\n{SANDBOX_MODE_PROMPT}\n" |
| PurePosixPath(name).parts[0] for name in file_names if name.strip() | ||
| } | ||
|
|
||
| print(top_dirs) |
Reverts #5028
由 Sourcery 提供的总结
移除基于 Shipyard Neo 的技能生命周期和沙箱管理,将技能和沙箱集成恢复到之前仅基于 Shipyard 的模型。
增强内容:
SkillManager,仅支持本地技能,移除沙箱缓存、Neo 元数据以及仅沙箱技能的处理逻辑。构建:
文档:
测试:
日常维护(Chores):
Original summary in English
Summary by Sourcery
Remove Shipyard Neo-based skill lifecycle and sandbox management, reverting skills and sandbox integration back to the previous Shipyard-only model.
Enhancements:
Build:
Documentation:
Tests:
Chores: