Documentation
¶
Overview ¶
Sensitive projects — the per-repository opt-out that stops automatic session recall from moving a project's conversations across the network. See yottacode-roadmap/memory-auto-recall.md (fork 3).
The threat this closes is specific. Embedding, storage, and cosine are all local, but an *injected* recall excerpt egresses to the cloud LLM with the turn. For a PHI/medical repository that is unacceptable, and it cuts both ways:
- inbound — auto-recall is off inside a sensitive project, so nothing is swept into its prompts automatically;
- outbound — a sensitive project's sessions are never candidates for any *other* project's recall, whatever the configured scope. Without this half, `scope = "user"` would quietly carry PHI into an unrelated repo's turn, which is the same leak facing the other direction.
What it deliberately does NOT do: sessions are still indexed and embedded, and the manual session_recall tool still reaches them. The gate is about what leaves *automatically*, not about making your own history unreachable when you deliberately ask for it. Use Full quarantine semantics elsewhere if that is ever needed.
Storage mirrors internal/trust deliberately — same JSON shape, same atomic write, same descendant inheritance, same DefaultDenyPaths entry so the model's write tools cannot mark a repo non-sensitive. Two small stores with one obvious pattern beat one generic store with a mode flag.
Index ¶
Constants ¶
const Version = 1
Version is the on-disk schema version. Bumped only on a breaking change; readers tolerate unknown fields so additive changes don't require a bump.
Variables ¶
This section is empty.
Functions ¶
func DefaultStorePath ¶
DefaultStorePath returns ~/.yottacode/sensitive-roots.json.
Types ¶
type Root ¶
Root is one sensitive directory entry. Path is absolute and filepath.Clean-ed at the moment it was marked. MarkedAt is informational — printed by `yottacode sensitive list`, never consulted for gating.
type Store ¶
Store is the in-memory representation of sensitive-roots.json.
func Load ¶
Load reads the store at path. A missing file is the normal state for most users and returns an empty Store, not an error.
A malformed file IS an error, and callers must not degrade to "no roots" on one: silently treating an unreadable store as empty would turn a typo into an unannounced loss of protection. Fail loudly so the user fixes it.
func (*Store) Add ¶
Add inserts a root if not already present by exact path match. Returns true if the entry is new. Adding /foo when /foo/bar is already marked records /foo too — the user has now named the broader root explicitly.
func (*Store) Contains ¶
Contains reports whether path equals or is descended from any sensitive root. Descendant inheritance is what makes marking a repo root enough to cover every subdirectory a session might have started in.