feat(v0.19.0): devkit_vault_export + data freedom - #38
Merged
Merged
Conversation
When repair=true: - Deletes orphan Tantivy documents via sync_index_to_db_at - Re-indexes missing repos one by one via KnowledgeClient::run_index - Returns repair_actions summary (orphans_deleted, missing_reindexed, missing_failed) Safety: - Releases pool connection (drop(conn)) before reindexing to avoid r2d2 deadlock - Gracefully handles reindex failures per-repo without aborting entire repair Verification: cargo test --lib 446 passed, clippy clean
Adds devkit_vault_export MCP tool (66th tool) and CLI command: - Copies all .md files preserving PARA directory structure - Validates wikilink targets exist (reports broken links) - Validates frontmatter YAML parseability - Copies non-markdown assets as-is - Returns statistics: exported_files, total_bytes, broken_links, frontmatter_errors New module: src/vault/export.rs - Zero external dependencies beyond walkdir (already in tree) - Reuses devbase_vault_wikilink::extract_wikilinks and frontmatter::extract_frontmatter CLI usage: devbase vault export → auto-named dir with timestamp devbase vault export ./my-backup → explicit output directory Also adds export_vault() to VaultClient trait and AppContext impl. Verification: cargo test --all-targets 464 passed, clippy -D warnings clean
juice094
force-pushed
the
feat/v0.19.0-vault-export
branch
from
May 14, 2026 04:54
6870f29 to
9e11c7d
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.
Sprint D — Vault 导出与可逃生性验证
消除"Vendor Lock-in"焦虑,让用户敢把 devbase 当主力知识库工具。
新增功能
devkit_vault_exportMCP Tooldevbase vault export [dir]CLI返回结构示例
{ "success": true, "exported_files": 42, "total_bytes": 128000, "broken_links": { "count": 3, "issues": [...] }, "frontmatter_errors": { "count": 0, "issues": [] } }技术决策
walkdir、devbase_vault_wikilink::extract_wikilinks、frontmatter::extract_frontmatterVaultClienttrait 暴露,不直接操作文件系统验证
cargo test --all-targets→ 464 passedcargo clippy --all-targets -D warnings→ 0 warningscargo fmt --check→ clean