Skip to main content

Module inventory

Module inventory 

Source
Expand description

Inventory enumeration: turn the fixed target-root list into hashed PathEntry rows.

§Target roots

Built from two sources, concatenated in this order:

  1. Platform-specific — provided by a PlatformProbe implementation. For Claude Code this is [ClaudeCodePlatform], yielding ~/.claude/*, ~/.claude.json, and the project-local .claude/settings.json / .mcp.json categories.
  2. Universal — hard-coded in [universal_target_roots]: dependency manifests + lockfiles (supply-chain) and .env, all resolved relative to the current working directory.

Missing targets are silently skipped (no error). Directories are walked recursively, with SKIP_DIRS / SKIP_FILES noise filtered out. Symlinks are not followed.

§Per-file decomposition

[path_entries] delegates to the owning probe’s PlatformProbe::decompose_file: when it returns Some(fragments), the file produces one virtual <file>#<fragment> entry per element (each hashed over its own payload); when it returns None the file produces a single whole-file SHA-256 row. The mechanism lets a probe split noisy configs (e.g. Claude Code’s ~/.claude.json gets per-block fragments so unrelated background writes don’t show as Modified) without core needing to know the schema.

Structs§

PathEntry
One hashed file or virtual JSON fragment.

Functions§

collect
Walk every probe’s target roots plus the universal list and return a sorted list of PathEntry.