refactor(mcp): complete trait-ization of remaining MCP tool layer#15
Merged
Conversation
- Extend RegistryClient with save_relation, query_relations, delete_relations, list_vault_notes - Add WorkflowClient trait (list_workflows, get_workflow, run_workflow, get_execution) - Add VaultClient trait (list_vault_notes, read_vault_note, get_backlinks, build_vault_graph) - Implement all traits on AppContext (registry.rs, workflow/mod.rs, vault/mod.rs) - Enable AppContext Clone via Arc<Mutex<EnvVersionCache>> for spawn_blocking safety - Refactor relations.rs, workflow.rs, vault.rs to use trait calls exclusively - Eliminate all production-code inline crate:: calls in mcp/tools/ relations|workflow|vault
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.
Summary
Phase B 收尾:消除
mcp/tools/目录下所有剩余生产代码内联调用,实现 MCP 工具层完全 trait 化。Changes
save_relation,query_relations,delete_relations,list_vault_noteslist_workflows,get_workflow,run_workflow,get_executionlist_vault_notes,read_vault_note,get_backlinks,build_vault_graphenv_cache改为Arc<Mutex<...>>,支持在spawn_blocking中安全 clonerelations.rs/workflow.rs/vault.rs全部改为 trait 调用Verification
cargo check/cargo fmt/cargo clippy -W warnings✅