feat(ckpt): make diff -t optional to compare snapshot against current workspace#848
Open
Ziqi002 wants to merge 1 commit into
Open
feat(ckpt): make diff -t optional to compare snapshot against current workspace#848Ziqi002 wants to merge 1 commit into
Ziqi002 wants to merge 1 commit into
Conversation
… workspace - CLI: change -t from required to optional (alibaba#846) - protocol: Request::Diff.to becomes Option<String> - backend trait: diff() to parameter becomes Option<&str> - daemon: when to is None, use live workspace subvolume as target - hermes plugin: to removed from required params in tool schema - openclaw plugin: diff command, handler, and tool registry updated to support optional to parameter Signed-off-by: Ziqi Huang <ziqi02@alibaba-inc.com>
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.
Description
-t/--to参数改为可选,省略时与当前工作区(live subvolume)进行比较 ([ckpt] feat: diff -t 改为可选,支持快照与当前工作区比较 #846)改动范围
从 CLI 到 daemon 到插件全栈适配:
协议层:
Request::Diff.to从String改为Option<String>,StorageBackend::diff()的to参数从&str改为Option<&str>。CLI:clap 的
-t参数从 required 改为 optional。daemon:
snapshot_mgr和dispatcher适配Option传递。两个 backend(
btrfs_base、btrfs_loop)在to为None时使用
data_root.join(ws_id)作为 live subvolume 路径。插件:hermes(Python)和 openclaw(TypeScript)的 tool schema
中
to从 required 移除,命令构建改为有条件添加--to。Related Issue
closes #846
Type of Change
Scope
cosh(copilot-shell)sec-core(agent-sec-core)skill(os-skills)sight(agentsight)tokenless(tokenless)memory(agent-memory)ckpt(ws-ckpt)Checklist
cosh: Lint passes, type check passes, and tests passsec-core(Rust):cargo clippy -- -D warningsandcargo fmt --checkpasssec-core(Python): Ruff format and pytest passskill: Skill directory structure is valid and shell scripts pass syntax checksight:cargo clippy -- -D warningsandcargo fmt --checkpasstokenless:cargo clippy -- -D warningsandcargo fmt --checkpassmemory(Linux only):cargo clippy --all-targets -- -D warnings,cargo fmt --check, andcargo testpasspackage-lock.json/Cargo.lock)Testing
Additional Notes