Skip to content

feat: migrate shell restore to plugin api v3 - #3

Merged
kachofugetsu09 merged 5 commits into
mainfrom
codex/plugin-v3-composition
Aug 21, 2026
Merged

feat: migrate shell restore to plugin api v3#3
kachofugetsu09 merged 5 commits into
mainfrom
codex/plugin-v3-composition

Conversation

@kachofugetsu09

@kachofugetsu09 kachofugetsu09 commented Aug 15, 2026

Copy link
Copy Markdown
Member

结果

  • 从 v2 on_tool_pre/PreToolCtx 迁移到 v3 tool.input.prepare/ToolInput。
  • 保留 rm→mv、复杂 shell pass-through 与 AKASIC_RESTORE_DIR override;补齐 sudo 普通 command mode 的 option/cluster 解析。
  • sudo -nE、-nuroot、--preserve-env=HOME 可以安全改写;-e/-l/-s/-i/-v/-h 等 mode/ambiguous flag 不被误写成 mv。
  • Core 仅分配 ctx.data_root;插件拥有 restore 目录、mkdir 与改写。apply 零写,首次真实 transform 才创建目录。
  • 移除 PluginContext 与 legacy ToolHook 依赖。

依赖

验证

  • 20 passed;v3 contract passed;Basedpyright 0 errors / 0 warnings。
  • 真实 PluginManager stable snapshot lease → ToolExecutor → transform 链路通过。
  • 真实 ShellTool/ShellProcessManager 证明源文件移动到 ctx.data_root/restore 且内容可恢复。
  • candidate-style apply 不创建 restore;执行后才创建;dispose 后 listener/effect 清空。
  • PR #432 固定本提交,并与 Safety、Loop Guard 在同一正式 Root 中验证 7 scenario / 5 invoker。
  • Terra xhigh 独立只读复审最终无 P0/P1。

边界

不写正式 workspace,不调用渠道或外部 API。回滚点:backup/plugin-v3-before-20260815。

@kachofugetsu09
kachofugetsu09 merged commit 0bbcf41 into main Aug 21, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant