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
// Copyright (c) 2026 Kirky.X. All rights reserved.
// SPDX-License-Identifier: MIT
//! Kit — unified capability & configuration registry (T6/unified-architecture
//! Phase 2).
//!
//! This module re-exports the trait-kit 0.3 `AsyncKit` API (see design.md D5)
//! and the 9 subsystem module types used for capability lookup.
//!
//! ## AsyncKit vs. Kit
//!
//! trait-kit 0.3's synchronous `Kit` uses `RefCell` internally and is
//! therefore `!Send + !Sync`. CodeNexus stores the kit in a
//! `static Mutex<Option<Arc<AsyncKit<Ready>>>>` (see `service::runtime`),
//! which requires `Send + Sync`. We therefore use `AsyncKit`, which is backed
//! by `Arc<RwLock<...>>` and implements `Send + Sync`. Only `build()` is
//! async; `require::<M>()` and `config::<C>()` are synchronous methods.
//!
//! Capability and config lookup uses the module type directly (e.g.,
//! `kit.require::<StorageModule>()` and `kit.set_config::<StorageConfig>()`).
// `trait-kit` is a hard dependency (Task 2.16 removed the in-tree shim once
// all modules migrated to `build_kit`). No feature gating needed.
extern crate trait_kit;
// Bootstrap (Task 2.13) — wires all 9 modules into a fresh AsyncKit in
// dependency order. Re-exported at the kit module root so callers can
// write `codenexus::kit::build_kit` and `codenexus::kit::KitBootstrapConfig`.
pub use ;
// Re-export the trait-kit 0.3 AsyncKit API. These are the canonical
// imports for call sites that need to interact with the Kit registry.
// Note: we import `AsyncReady`/`AsyncUnbuilt` (the async-feature re-exports),
// NOT `Ready`/`Unbuilt` (the synchronous Kit markers). trait-kit exports the
// async markers via `pub use async_kit::{Ready as AsyncReady, Unbuilt as
// AsyncUnbuilt}` — the two `Ready` types are distinct structs (sync `Ready`
// in `kit.rs` vs async `Ready` in `async_kit.rs`). Using the wrong one causes
// a type mismatch: `AsyncKit::build()` returns `AsyncKit<async_kit::Ready>`.
// trait-kit 0.3 renamed `KitError` to `TraitKitError` (ProjectNameError
// convention); alias preserves the CodeNexus-internal `KitError` name.
pub use ;
pub use ;
pub use TraitKitError as KitError;
// Re-export the 9 module types so call sites can write
// `use crate::kit::{AsyncKit, StorageModule, TraceModule}` instead of
// importing each module from its own crate path. This mirrors the
// historical convenience where `*Key` types lived in `crate::kit`.
pub use crateCacheModule;
pub use crateDaemonModule;
pub use crateEmbedModule;
pub use crateIndexerModule;
pub use crate;
pub use crateQueryModule;
pub use crateResolverModule;
pub use crateStorageModule;
pub use crateTraceModule;
// ---------------------------------------------------------------------------
// Tests
// ---------------------------------------------------------------------------