clawft_kernel/workload_runtime/infer/mod.rs
1//! Inference-server adapters (card mesh-placement-18; ADR-101 section 4).
2//!
3//! - [`spec`]: [`InferenceSpec`] and `VerifiedWorkload::inference`.
4//! - [`config`]: adopted or managed construction, restart backoff.
5//! - [`probe`]: loopback health, model listing, tiny completion.
6//! - [`capabilities`]: the probes behind `provides()`.
7//! - [`runtime`] / [`lifecycle`]: [`InferRuntime`], the
8//! [`super::WorkloadRuntime`] for `infer.llamacpp`, `infer.mlx-lm` and
9//! `infer.ollama`, plus the API the stable-address proxy builds on
10//! ([`InferRuntime::endpoint`], [`InferRuntime::health`],
11//! [`InferRuntime::reconcile`]).
12//! - [`launch`] / [`ollama`]: how a managed server is started or driven.
13//!
14//! Adopted mode never controls the server. Managed mode launches only a
15//! configured launcher script, only on a port nothing else holds, with
16//! weights resolved from the model registry, and stops only the process
17//! it spawned.
18
19pub mod capabilities;
20pub mod config;
21pub mod exposure;
22pub mod launch;
23pub mod lifecycle;
24pub mod ollama;
25pub mod probe;
26pub mod residency;
27pub mod roster;
28pub mod runtime;
29pub mod spec;
30
31#[cfg(test)]
32pub(crate) mod fakes;
33#[cfg(test)]
34mod tests_adopted;
35#[cfg(test)]
36mod tests_ledger;
37#[cfg(test)]
38mod tests_managed;
39#[cfg(test)]
40mod tests_ollama;
41#[cfg(test)]
42mod tests_roster;
43#[cfg(test)]
44mod tests_spec;
45
46pub use config::{InferConfig, InferMode, ManagedConfig, RestartPolicy, lab_serve_program};
47pub use lifecycle::Reconcile;
48pub use probe::{Health, ServerClient, ServerReport};
49pub use residency::{CoResidency, GB, ResidencyLedger};
50pub use roster::{ImportedRoster, ImportedSpec, RosterOverlay, import_roster};
51pub use runtime::InferRuntime;
52pub use spec::{InferFlavor, InferenceSpec, KIND_INFERENCE, LatencyClass, MemoryBudget, ServeArgs};