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:
claude code agent 227
2026-06-24 04:07:09 +03:00
parent be374eb19d
commit dde1880321
3 changed files with 247 additions and 0 deletions
+15
View File
@@ -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";