Repository navigation
feat: 完善插件生命周期并支持可替换 Loop 与可选依赖恢复 - #13
Merged
Merged
Conversation
Merged
ZhuLinsen
force-pushed
the
codex/positioning-demo
branch
from
October 18, 2026 12:06
634b94e to
84d69d8
Compare
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.
问题与改动
已有插件 Scope 可在任务执行中或卸载后继续注册资源,初始化失败时清理异常可能遮盖原始错误。本 PR 补齐生命周期守卫和异常清理,同时复用 Plugin/Service 提供可替换 Agent Loop 与显式启用的依赖恢复,方便嵌入式 Harness 定制执行流程和替换服务。
直接基于 main a792c6c(#15、#16 已合入),只改原生运行时及对应文档/测试,不重新引入旧版 API。
默认仍为严格启动。恢复发生在显式 start、unuse 或下一次任务边界,没有后台轮询、断线自动重连或任务中热切换。完全自定义 Loop 是可信 Python,必须正确使用 Registry 并记录工具调用。详细边界见 docs/plugin-lifecycle.md。
项目原则
复用现有 Scope、Registry、Session,无新运行依赖;仍符合核心 500–700、全部包 2000–2800 行的预算。不引入 Fiber/HMR、子 Agent 或长期记忆。CLI 保留 #15/#16 的行为,/plugins 会多显示默认 agent-loop。双语 README 的目录和总数均已核对。
验证与交付
兼容与回滚
本 PR 直接合入 main,用户已明确授权本次文档修复及合入;待最终提交检查通过后执行,不发版、不打 tag。
回滚本 PR 的合入提交可恢复固定原生循环和严格插件生命周期;调用方需移除新增加的 reactive、inject、loop_plugin 接口使用。保留 Session 文件,未知副作用先核查再 resolve,不自动重放工具。