feat(git-sync): thin-meta phase 1 — the .gitmost/index.json sidecar module
Pure read/write/lookup for the vault sidecar index that will hold page identity (pageId) + collision token (slugId) keyed by file path, so the .md files can be clean markdown. parseVaultIndex is tolerant (missing/garbage/bad entries degrade to empty/skipped — never crashes a cycle); serializeVaultIndex is deterministic (sorted keys -> stable diffs, no churn). Lookups (pageIdAt, pathForPageId reverse, trackedPageIds) + mutations (set/remove/move). NOT wired into pull/push yet — no behavior change. 5 unit tests; engine suite green. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -119,3 +119,18 @@ export type {
|
||||
RunCycleResult,
|
||||
CycleFs,
|
||||
} from "./engine/cycle";
|
||||
|
||||
export {
|
||||
VAULT_INDEX_PATH,
|
||||
emptyVaultIndex,
|
||||
parseVaultIndex,
|
||||
serializeVaultIndex,
|
||||
pageIdAt,
|
||||
slugIdAt,
|
||||
pathForPageId,
|
||||
trackedPageIds,
|
||||
setEntry,
|
||||
removeAt,
|
||||
moveEntry,
|
||||
} from "./engine/vault-index";
|
||||
export type { VaultIndex, VaultIndexEntry } from "./engine/vault-index";
|
||||
|
||||
Reference in New Issue
Block a user