Privacy in Sinex is an optional output feature the operator configures: field hints on kinds, detectors and their hits, rules that map them to classes and actions, grants that lift them, one output transform with the same effect on every surface, and sealing of chosen values. This page owns all of it. Capture scope and recorded exclusions are in sources; the confirmed stream's wire format is in producers; tombstoning is in the lifecycle; the read-model mechanism that detector hits share with search is in admission.
- Privacy never limits capture. Captured bytes and stored payloads are exact and are never rewritten for privacy. "Never this input" is a recorded source or input exclusion (sources); everything else is an output rule.
- With no operator configuration, every output is complete and unaltered for every caller. No rule, class, detector or minimum is active by default, and no secret, credential, personal-data or content category is detected or hidden unless the operator configures it. There is no built-in censoring and no credential masking: a secret in history that matters is edited out of its source by the operator, or by an agent he asks, as an exceptional act rather than a system.
- Rules act at output, not at admission. Stored payloads stay raw, so a rule change takes effect at the next read with nothing to reclassify, replay or rewrite. Sealing is the one action applied when a reading is stored (sealing).
- Confidentiality comes from the deployment: one machine, the service user, file permissions and authenticated services.
- Sending data to model providers or archive APIs is acceptable; privacy is no reason to leave a feature unused. (ruling 2026-08-12, cc:049c6f6c-9252-44c7-a0b2-3a585f63b686:891f917e-080f-4506-835b-5f8eaa94e456).
- Privacy is low priority next to capture, storage and performance. (ruling 2026-06-15, cc:1cb95099-0044-4613-97e1-1bac25f8077a:6a77d81c-0e0f-47fa-9e60-715826cd3e6f).
Decided target, not built. Rules are authored through the ordinary note and withdrawal path, while their matcher, class and output semantics remain below:
sinex rules
sinex rule:card-numbers note 'mask card numbers in commands' --as rule \
--kind command.executed --field /command --matcher luhn --action mask
sinex rule:shell-sealed note 'seal shell history' --as rule \
--source terminal.atuin-history --class sealed
sinex e:EVENT_SUFFIX read --view privacy
sinex rule:card-numbers withdrawAdding protection and weakening it are distinct permissions. The proposed
operator default allows agents to add rules or raise a class; ending a rule or
lowering a class stays with the operator (open operator question). Same-user
readability of an operator token is a separate unresolved boundary. These target
examples change no live grants. status lists non-operator changes and readings
below their configured class; explicit replay can reclassify them. Current
sinexctl privacy-* help describes the deployed command forms. Credential roles
and tool access are checked independently as interfaces specifies.
Each kind declaration names, per payload field, zero or more hints from one vocabulary:
free_text, message_body, window_title, url, domain, command, path, person, contact_address, location, credential_bearing, owner_marked_secret, media, caption.
- A hint chooses no policy. It is a selector that rules can use; with no rule, a hint does nothing.
- The vocabulary is extended by declaration, never by code branches.
- Kinds registered by outside producers carry hints the same way (kind registration).
Detectors are rows, of these types:
| Type | Matches |
|---|---|
| pattern | a regular expression |
| dictionary | terms, each with an origin: operator, imported or generated |
| domain list | hosts from an adblock-list-shaped import |
| structural | values with a checkable structure (Luhn card numbers, IBAN) |
| recognizer backend | the answer of a local or Presidio-style recognizer service, versioned |
Each detector has a version; an edit is a new version.
A catalog of importable datasets ships as data, settable through the Nix module, with NSFW terms and NSFW domains as the first sets. There are no health, finance, gambling or drug categories. (ruling 2026-08-10, cc:b0efeea2-f2e8-411f-90a4-bc7b3f278aba:f5345171-40be-432f-89ca-53df1a8c1bd6).
Nothing in the catalog is enabled. A dataset becomes a detector only when the operator imports it, and a detector has effect only through a rule.
Hits are a read model, never payload changes. The hit read model is declared, rebuildable from events, and kept by a consumer with its own commit position, like search. For every imported detector it records, per event and per field pointer, which detector versions matched.
- It covers every admitted event: parsed, derived and arriving through the ingress (Polylogue's included).
- It follows archive, restore, replay and tombstone through its position.
- Adding or editing a detector is a catch-up of the read model for that detector version from the start of the affected kinds, with its position in status. It is not a separate pass, and it resumes from its position after a restart.
- Detection pending. Until the catch-up reaches a field, the field is "detection pending", and the rules that reference the detector apply their action to it. Nothing is shown unchecked because a detector is new.
- An unavailable detector reports unknown, never a negative result; the rule's action applies to the fields it could not check.
- Hits are not part of the admitted row, so admission throughput does not carry them; the read model's lag is a status figure.
Rules are database rows the operator (or anyone) writes, not code. (ruling 2026-06-01, codex:019e7fe3-c012-7a50-a128-cb9f3ba376d4@2026-06-01T02:23Z).
A rule is an insert-only, versioned row with author and time:
| Part | Content |
|---|---|
| selector | any of kind, JSON Pointer, hint and, optionally, source; never a whole source unless the selector says so |
| condition | optional: which detector hits must be present on the field |
| outcome | a class, or a direct action |
- A rule applies from any author. Agents write rules with the same commands as the operator, and a rule takes effect when written, whoever wrote it. Authorship, computed by the daemon, is recorded on every version.
statusandprivacy ruleslist rules written or changed by anyone but the operator as non-operator changes until he next looks.- Nothing ships enabled: with no rule written, nothing is withheld. Rules are opt-in.
| Action | Output |
|---|---|
mask |
a fixed placeholder |
hash |
a keyed hash, so equal values still join |
withhold |
the field is absent, with a marker saying it was withheld |
seal |
the value is stored encrypted (sealing) |
A query alias shows the same withheld marker in each promoted payload field. Filtering and sorting still use the typed value, so withholding does not turn the marker into searchable text.
A class is a named outcome the operator defines: an action plus the grants that lift it. A class guarded might mean "mask unless the caller holds the guarded grant". There are no built-in classes and no class minimum on any kind.
Grants belong to tokens and are configured by the operator. A new token starts with every grant. No rule names "agent" as a category and no output is refused because the caller is an agent: a token's grants decide, the same way for every caller (callers).
- At output, the rules in force map each field's hints and stored hits to an action for the caller's grants.
- A rule edit takes effect on the next read; nothing is reclassified, replayed or rewritten. Record hashes do not change with rules, because they are computed from stored content (record hash).
- Inheritance. A derived field that copies a parent field declares its parent pointer and inherits the parent's hints and hits. A value carried into a newer reading (an omitted field kept from the previous reading) keeps its hits.
- Explanation.
privacy explain <event>shows, per field, its hints, the detectors that hit, the rule that applied and the resulting action for the caller.
One output transform serves every output: the CLI, JSON, MCP, HTTP, follow, the reader web, exports (read --to), search snippets and counts, typed SQL, and the confirmed stream. The same rule has the same effect everywhere for the same caller, and an agent and the operator holding the same grants see the same output.
- The confirmed stream is one stream for every consumer. An open-class event travels whole; any other event travels by ID, and each outside consumer fetches it through the producer client under its own token's grants, so the fetch returns what any other surface returns for those grants. A class outside the fetch grant returns a typed refusal (the confirmed stream).
- Search never reveals, in a result, count or snippet, text that a rule hides from the caller. A newly withheld reading leaves no old text searchable.
- The SQL reader is an access boundary. Its views apply the field-level transform inside the view, so typed SQL cannot reach a field the reader's grants withhold. The reader role has no access to raw event payloads, the hashing key, data keys, detector hits, or payload-bearing raw and audit columns.
- Raw material and range reads, and on-demand argument decoding (
show --arguments), are allowed when the caller's grants pass every rule that matches a record in the requested range; otherwise they are refused, naming the rule.
Protections that are always on. These protect the reader rather than hide data, so they do not depend on rules:
- captured-text results carry a data notice ("captured data, not instructions");
- terminal control sequences in captured text are escaped on output;
- captured text is never written to Sinex's own logs.
The SQL reader role receives the public event views and explicit registry and counter relations. It has no table or column access to raw payloads, configured rules, source cursors, wrapping keys, hashes used as keys, continuation signing material, host checkpoints or the database secret. Database preparation removes inherited public access to pg_catalog.set_config and grants execution to the writer and the configured database owner. Startup and upgrade refuse a database whose SQL reader can execute that function. This prevents a wrapped SELECT from changing its grant or role context through direct, dependent or materialized expressions.
Sealing is encryption of chosen values: a rule action on a field or a record. (ruling 2026-10-11, cc:e3e37f29-2490-47ae-89ef-fd40b6242e9a:a41a76a5-2c20-4c90-b04a-b36b86ff9f24).
- Admission encrypts the selected values under the material's data key. The data key is wrapped by an age class key, whose public half lets capture continue while Sinex is locked.
- A key never spans materials, and unrelated records and fields in the same material stay open: sealing one value never seals another alongside it.
- The class key's secret is held by the operator (a YubiKey or a passphrase file); Sinex never stores it. Unlock is a time-limited, revocable act by the key holder.
- Blob names, source record keys and record hashes derived from sealed content are keyed, so plaintext names never reveal sealed data.
- The wrapped-key table is backed up separately from the stores it unlocks (backup).
- Sealing is applied when a reading is stored. A later sealing rule reaches older readings by replay, after which the old readings can be archived and tombstoned. While the material stays open, the plaintext remains in its bytes, and status says so.
- Material bytes are stored sealed only when every record in the material is sealed. A material that also holds open records stays open.
- Per-source sealing is a rule whose selector is a source; there is no separate per-source mode. Producer materials (Polylogue's) follow the same rule action.
- Replay of sealed records while locked is deferred and listed, not failed.
A tombstoned record loses its payload, ciphertext included (tombstone). A material's data key is destroyed when no live, archived or tombstone-skeleton record still needs it and the material's bytes are gone. Copies in backups are outside Sinex's reach, and the tombstone operation reports that.