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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
//! The composition this binary serves, as a library function.
//!
//! [`compose`] builds the exact kernel `ikigai-dev` puts behind its socket:
//! the curated space (the dev seam + graph ops + — when configured — the
//! browse family and its derivation engine), under the rate-limit overlay,
//! behind a Meta renderer. `main` calls it; so does `tests/conformance.rs`.
//!
//! **That sharing is the point, not a convenience.** This crate binds no
//! endpoints of its own — everything it serves comes from a module crate with
//! its own test suite — so the only property that is THIS crate's to get wrong
//! is the composition: which spaces, in which order, under which overlay,
//! behind which renderer. A test that rebuilds that by hand would pass while
//! the served kernel was broken. `ikigai-web` shipped exactly that defect: its
//! HTTP tests built their kernels directly, the one function with the bug was
//! never under test, and the daemon answered 500 on a link it emitted itself.
//!
//! The two seams a test needs are threaded through as parameters rather than
//! read from the machine, so a walk over this kernel touches no home directory:
//! the browse store (an in-memory [`ikigai_sparql::Store`] instead of the
//! RocksDB archive — see [`browse::wire_with_store`]) and the LLM registry
//! (lazily, so an unconfigured server still never reads `llm.json`).
//!
//! ## ⚠ This library is INTERNAL: no stability promise
//!
//! The crate publishes a binary (`ikigai-dev`). The library exists so the tests
//! can hold the real composition rather than a re-creation of it, and every item
//! it exports — [`compose`], [`LIMITS`], [`browse::wire_with_store`],
//! [`llm::space_with`], [`config`] — is here for that reason and no other. Treat
//! the whole surface as private to this repo: it changes with the composition,
//! without a MINOR bump and without a deprecation. **What this crate versions is
//! the set of RESOURCE NAMES behind the socket** (0.3.0 was a MINOR because
//! `urn:annotation:` became `urn:iki:annotation:`, with the Rust API untouched) —
//! a mount line is the public interface here, not a `use`. Nothing outside this
//! repo depends on the library today, and nothing should start without moving
//! the item it wants into a module crate with a suite of its own.
//! (This repo's PENDING §4 asked for the decision; this is it.)
use Arc;
use Duration;
use ;
use ;
use TurtleRenderer;
pub use Browse;
/// The rate ceilings this server imposes, as `(prefix, calls, per)`.
///
/// Public because they are a served fact: a client that walks this catalog
/// exhaustively (a conformance run, a manifold sweep, an agent enumerating
/// tools) spends the `urn:repo:` budget, and a walk wide enough to exhaust it
/// gets `Denied` on endpoints that are perfectly well-formed. Naming them here
/// lets a test say how much room it has instead of discovering the ceiling as
/// a flake.
pub const LIMITS: = ;
/// The served kernel.
///
/// `browse` is the wired browse family or `None` (absence of config is
/// feature-off, not an error). `registry` is called **only** when browse is
/// configured — the LLM space is mounted alongside browse and nowhere else, so
/// an unconfigured server must not even read the registry file.