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
80
81
82
83
84
85
86
87
88
89
90
91
92
//! `DispatcherCatalog` — inventory-style fleet-wide registry of
//! every typed dispatcher in scope. Any pleme-io crate that
//! `#[derive(TypedDispatcher)]`s an enum can register a catalog
//! entry via the [`register_dispatcher!`](crate::register_dispatcher)
//! macro; gen-platform iterates them all at runtime through
//! `DispatcherCatalog::registered()`.
//!
//! This is the catalog reflection layer per `theory/QUIRK-APPLIER.md`
//! §IV-bis.3.e — a single queryable surface for *every place in
//! pleme-io that switches on a typed tag*. Operators query it via
//! `gen dispatchers catalog`; substrate emitters consume it to
//! produce Nix helpers skeletons + Lisp catalog entries
//! mechanically.
/// One entry in the dispatcher catalog. Materialized via
/// [`register_dispatcher!`](crate::register_dispatcher) — the
/// macro emits an `inventory::submit!` block per registered
/// dispatcher.
collect!;
/// Iterate every catalog entry registered fleet-wide. Order is
/// inventory-dependent (not deterministic) — sort by `label` if
/// the consumer needs stable iteration.
/// Look up a catalog entry by its dot-separated label.
/// Register a `#[derive(TypedDispatcher)]` enum into the fleet-wide
/// dispatcher catalog. Place at module scope; one call per enum.
///
/// ```ignore
/// use gen_platform::register_dispatcher;
///
/// #[derive(serde::Serialize, gen_platform::TypedDispatcher)]
/// #[serde(tag = "kind", rename_all = "kebab-case")]
/// enum MyMigration { AddColumn { table: String }, DropIndex { name: String } }
///
/// register_dispatcher!("shinka.migration", MyMigration);
/// ```
///
/// After registration, `gen dispatchers catalog` lists the entry
/// + substrate emitters can produce the matching Nix dispatch
/// skeleton without naming `MyMigration` directly.
/// Public re-export of the inventory crate for the
/// `register_dispatcher!` macro to use. Consumers don't depend on
/// inventory directly — gen-platform owns the dependency edge.
pub use inventory as __inventory;