feat: add includeInternal option to sync hidden/internal files#39
Open
waspeer wants to merge 1 commit intovrtmrz:mainfrom
Open
feat: add includeInternal option to sync hidden/internal files#39waspeer wants to merge 1 commit intovrtmrz:mainfrom
waspeer wants to merge 1 commit intovrtmrz:mainfrom
Conversation
Adds to , allowing specific internal files (stored with prefix by Self-hosted LiveSync) to be synced to the local storage peer. By default, all paths containing are filtered out, which excludes hidden/internal files like and . With this option, callers can whitelist specific glob patterns (e.g. ) to opt specific internal directories back in. The prefix is stripped before dispatching to PeerStorage so the file is written to the correct filesystem path.
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.
Problem
The bridge currently skips all CouchDB documents whose path contains
:, which filters out all files that Self-hosted LiveSync stores with thei:prefix (hidden/internal directories like.claude/,.obsidian/non-workspace files, etc.).This makes it impossible to sync tool configuration directories through the bridge — for example, Claude Code stores its skills and configuration in
.claude/, which never reaches the storage peer.Solution
Adds an optional
includeInternalfield toPeerCouchDBConf— an array of glob patterns (using minimatch) that opt specifici:-prefixed paths back into the sync:{ "type": "couchdb", "name": "remote-vault", "includeInternal": [".claude/**"], ... }When a document with an
i:prefix matches one of these patterns, it passes thecheckIsInterestedfilter and thei:prefix is stripped before dispatching to PeerStorage, so the file is written to the correct filesystem path.Non-breaking: the option is optional and defaults to the existing behaviour (all
i:-prefixed documents are skipped).Notes
isRepeating()hash cache — no additional ignore patterns neededdat/config.sample.jsoncould be updated to document the new option (happy to add if preferred)