1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
//! Files schema: content-addressed file storage with directory trees and
//! import snapshots.
//!
//! Used by `files.rs` (the faculty CLI) and by any downstream consumer
//! that wants to read file entities, directory trees, or import snapshots
//! from a pile.
use id_hex;
use *;
use Embedding;
// ── branch name ──────────────────────────────────────────────────────────
/// Stable extrinsic scope of the Files `SimpleArchive`-union collection.
///
/// Minted with `trible genid` on 2026-08-07 and recovered from the reviewed
/// collection-cutover lineage:
/// `56002AB0A2A7D56753EE20C61900BFB0`.
pub const DEFAULT_SCOPE_ID: Id = id_hex!;
// ── kinds ────────────────────────────────────────────────────────────────
pub const KIND_FILE: Id = id_hex!;
/// A normalized IANA media type such as `text/plain` or `image/png`.
///
/// Media-type entities are intrinsic records carrying this marker plus their
/// full normalized name in `metadata::name`. Files point at them through
/// `file::media_type`, so long vendor types remain lossless and equal types
/// converge across every producer.
pub const KIND_MEDIA_TYPE: Id = id_hex!;
pub const KIND_DIRECTORY: Id = id_hex!;
pub const KIND_IMPORT: Id = id_hex!;
/// A rasterized PDF page — the retrieval unit for `application/pdf` in the
/// nomic-mm7b space. A page entity carries `page::parent` (the file it came
/// from), `page::index` (1-based page number), and an `embeddings::attr_mm7b`
/// vector (the page image embedded). A PDF isn't an image, so the page is what
/// `files similar --mm7b` actually ranks; a hit resolves back to "file X, page N".
pub const KIND_PAGE: Id = id_hex!;
// ── attributes ───────────────────────────────────────────────────────────
/// Rasterized-PDF-page attributes (see [`KIND_PAGE`]). A page entity is the
/// retrieval unit for PDFs in the nomic-mm7b space; the embedding itself lives
/// on the shared `embeddings::attr_mm7b::embedding`.