Skip to content

feat: add includeInternal option to sync hidden/internal files#39

Open
waspeer wants to merge 1 commit intovrtmrz:mainfrom
waspeer:feat/include-internal-files
Open

feat: add includeInternal option to sync hidden/internal files#39
waspeer wants to merge 1 commit intovrtmrz:mainfrom
waspeer:feat/include-internal-files

Conversation

@waspeer
Copy link

@waspeer waspeer commented Feb 19, 2026

Problem

The bridge currently skips all CouchDB documents whose path contains :, which filters out all files that Self-hosted LiveSync stores with the i: 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 includeInternal field to PeerCouchDBConf — an array of glob patterns (using minimatch) that opt specific i:-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 the checkIsInterested filter and the i: 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

  • Sync loop prevention is handled by the existing isRepeating() hash cache — no additional ignore patterns needed
  • dat/config.sample.json could be updated to document the new option (happy to add if preferred)

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.
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