Skip to main content

lean_ctx/core/
mod.rs

1// ---------------------------------------------------------------------------
2// Domain: Compression
3// ---------------------------------------------------------------------------
4pub mod adaptive_chunking;
5pub mod addons;
6pub mod aggressiveness;
7pub mod attention_context;
8pub mod auto_capture;
9pub mod auto_findings;
10pub mod codebook;
11#[cfg(target_os = "macos")]
12pub mod codesign;
13pub mod compress_preview;
14pub mod compression_safety;
15pub mod compressor;
16pub mod datadog_push;
17pub mod entropy;
18pub mod eval_ab;
19pub mod eval_harness;
20pub mod extractive;
21pub mod finops_export;
22pub mod information_bottleneck;
23pub mod json_crush;
24pub mod json_sample;
25pub mod markdown_compact;
26pub mod output_sanitizer;
27pub mod policy;
28pub mod pop_pruning;
29pub mod predictive_coding;
30pub mod predictive_prefetch;
31pub mod preservation;
32pub mod process_guard;
33pub mod progressive_compression;
34pub mod protect;
35pub mod rabin_karp;
36pub mod rule_artifacts;
37pub mod rules_canonical;
38pub mod rules_channel;
39pub mod rules_overhead;
40pub mod rules_sections;
41pub mod structural_tokenizer;
42pub mod structured_read;
43pub mod tabular_crush;
44pub mod yaml_crush;
45
46/// Convenience re-export: all compression-related modules.
47pub mod compression {
48    pub use super::adaptive_chunking;
49    pub use super::codebook;
50    pub use super::compression_safety;
51    pub use super::compressor;
52    pub use super::entropy;
53    pub use super::information_bottleneck;
54    pub use super::json_crush;
55    pub use super::json_sample;
56    pub use super::pop_pruning;
57    pub use super::preservation;
58    pub use super::progressive_compression;
59    pub use super::rabin_karp;
60    pub use super::structural_tokenizer;
61}
62
63// ---------------------------------------------------------------------------
64// Domain: Memory
65// ---------------------------------------------------------------------------
66pub mod episodic_memory;
67pub mod interrupt;
68pub mod memory_archive;
69pub mod memory_boundary;
70pub mod memory_capacity;
71pub mod memory_consolidation;
72pub mod memory_guard;
73pub mod memory_lifecycle;
74pub mod memory_policy;
75pub mod memory_salience;
76pub mod multiscale_index;
77pub mod procedural_memory;
78pub mod prospective_memory;
79
80/// Convenience re-export: all memory-related modules.
81pub mod memory {
82    pub use super::episodic_memory;
83    pub use super::memory_boundary;
84    pub use super::memory_consolidation;
85    pub use super::memory_lifecycle;
86    pub use super::memory_policy;
87    pub use super::procedural_memory;
88    pub use super::prospective_memory;
89}
90
91// ---------------------------------------------------------------------------
92// Domain: Graph
93// ---------------------------------------------------------------------------
94pub mod call_graph;
95pub mod community;
96pub mod gamma_cover;
97pub mod graph_analysis;
98pub mod graph_context;
99pub mod graph_coordinator;
100pub mod graph_enricher;
101pub mod graph_export;
102pub mod graph_features;
103pub mod graph_index;
104pub mod graph_parity;
105pub mod graph_provider;
106pub mod pagerank;
107pub mod property_graph;
108pub mod repomap;
109
110/// Convenience re-export: all graph-related modules.
111pub mod graph {
112    pub use super::call_graph;
113    pub use super::community;
114    pub use super::gamma_cover;
115    pub use super::graph_context;
116    pub use super::graph_enricher;
117    pub use super::graph_export;
118    pub use super::graph_features;
119    pub use super::graph_index;
120    pub use super::graph_provider;
121    pub use super::pagerank;
122    pub use super::property_graph;
123}
124
125// ---------------------------------------------------------------------------
126// Domain: Context
127// ---------------------------------------------------------------------------
128pub mod context_artifacts;
129pub mod context_column;
130pub mod context_compiler;
131pub mod context_deficit;
132pub mod context_field;
133pub mod context_handles;
134pub mod context_ir;
135pub mod context_ledger;
136pub mod context_lint;
137pub mod context_os;
138pub mod context_overhead;
139pub mod context_overlay;
140pub mod context_package;
141pub mod context_policies;
142pub mod context_proof;
143pub mod context_proof_v2;
144pub mod context_radar;
145pub mod context_snapshot;
146pub mod cross_source_edges;
147pub mod cross_source_hints;
148
149/// Convenience re-export: all context-related modules.
150pub mod context {
151    pub use super::context_artifacts;
152    pub use super::context_column;
153    pub use super::context_compiler;
154    pub use super::context_deficit;
155    pub use super::context_field;
156    pub use super::context_handles;
157    pub use super::context_ir;
158    pub use super::context_ledger;
159    pub use super::context_os;
160    pub use super::context_overlay;
161    pub use super::context_package;
162    pub use super::context_policies;
163    pub use super::context_proof;
164    pub use super::context_proof_v2;
165}
166
167// ---------------------------------------------------------------------------
168// Domain: Knowledge
169// ---------------------------------------------------------------------------
170pub mod claim_extractor;
171pub mod cognition_loop;
172pub mod cognition_scheduler;
173pub mod knowledge;
174pub mod knowledge_bootstrap;
175pub mod knowledge_bridge;
176pub mod knowledge_embedding;
177pub mod knowledge_provider_extract;
178pub mod knowledge_relations;
179
180/// Convenience re-export: all knowledge-related modules.
181pub mod knowledge_domain {
182    pub use super::claim_extractor;
183    pub use super::cognition_loop;
184    pub use super::knowledge;
185    pub use super::knowledge_bootstrap;
186    pub use super::knowledge_bridge;
187    pub use super::knowledge_embedding;
188    pub use super::knowledge_relations;
189}
190
191// ---------------------------------------------------------------------------
192// Domain: Search & Retrieval
193// ---------------------------------------------------------------------------
194pub mod bm25_cache;
195pub mod bm25_index;
196pub mod content_cache;
197pub mod content_chunk;
198pub mod context_packing;
199pub mod cooccurrence;
200pub mod dense_backend;
201pub mod embedding_index;
202pub mod embedding_quant;
203pub mod embeddings;
204pub mod energy;
205pub mod hybrid_search;
206#[cfg(feature = "pgvector")]
207pub mod pgvector_store;
208#[cfg(feature = "qdrant")]
209pub mod qdrant_store;
210pub mod search_reranking;
211pub mod semantic_cache;
212pub mod semantic_chunks;
213pub mod splade_retrieval;
214pub mod spreading_activation;
215
216/// Convenience re-export: all search-related modules.
217pub mod search {
218    pub use super::bm25_index;
219    pub use super::content_chunk;
220    pub use super::dense_backend;
221    pub use super::embedding_index;
222    pub use super::embeddings;
223    pub use super::hybrid_search;
224    pub use super::search_reranking;
225    pub use super::semantic_cache;
226    pub use super::semantic_chunks;
227    pub use super::splade_retrieval;
228}
229
230// ---------------------------------------------------------------------------
231// Domain: Session & Handoff
232// ---------------------------------------------------------------------------
233pub mod ccp_session_bundle;
234pub mod handoff_ledger;
235pub mod handoff_transfer_bundle;
236pub mod session;
237pub mod session_diff;
238pub mod session_summary;
239pub mod skillify;
240
241/// Convenience re-export: all session-related modules.
242pub mod session_domain {
243    pub use super::ccp_session_bundle;
244    pub use super::handoff_ledger;
245    pub use super::handoff_transfer_bundle;
246    pub use super::session;
247    pub use super::session_diff;
248}
249
250// ---------------------------------------------------------------------------
251// Domain: Attention & Placement
252// ---------------------------------------------------------------------------
253pub mod attention_layout_driver;
254pub mod attention_model;
255pub mod attention_placement;
256pub mod litm;
257
258/// Convenience re-export: all attention-related modules.
259pub mod attention {
260    pub use super::attention_layout_driver;
261    pub use super::attention_model;
262    pub use super::attention_placement;
263    pub use super::litm;
264}
265
266// ---------------------------------------------------------------------------
267// Domain: Neural / ML
268// ---------------------------------------------------------------------------
269pub mod neural;
270// ORT runtime glue links against the `ort` crate, which is only pulled in by the
271// `embeddings` or `neural` features. On platforms ORT does not support (e.g.
272// FreeBSD, see #586) these features are disabled, so the modules must be gated
273// to keep the build clean without them.
274#[cfg(any(feature = "embeddings", feature = "neural"))]
275pub mod ort_environment;
276#[cfg(any(feature = "embeddings", feature = "neural"))]
277pub mod ort_execution_providers;
278
279// ---------------------------------------------------------------------------
280// Domain: Patterns & Shell
281// ---------------------------------------------------------------------------
282pub mod patterns;
283
284// ---------------------------------------------------------------------------
285// Domain: Agents & A2A
286// ---------------------------------------------------------------------------
287pub mod a2a;
288pub mod a2a_transport;
289pub mod agent_identity;
290pub mod agent_runtime_env;
291pub mod agents;
292pub mod autonomy_drivers;
293
294// ---------------------------------------------------------------------------
295// Domain: Adaptive & Scoring
296// ---------------------------------------------------------------------------
297pub mod adaptive;
298pub mod adaptive_mode_policy;
299pub mod adaptive_thresholds;
300pub mod auto_mode_resolver;
301pub mod bandit;
302pub mod litm_calibration;
303pub mod mode_predictor;
304pub mod model_registry;
305pub mod task_relevance;
306
307// ---------------------------------------------------------------------------
308// Domain: Diagnostics & Quality
309// ---------------------------------------------------------------------------
310pub mod anomaly;
311pub mod benchmark;
312pub mod benchmark_compare;
313/// Commercial-plane billing substrate (`billing-plane-v1`): plans, entitlements,
314/// and usage metering derived from the signed savings ledger. Never gates local.
315pub mod billing;
316pub mod code_health;
317pub mod cognitive_load;
318pub mod conformance;
319pub mod contracts;
320pub mod cyclomatic;
321pub mod degradation_policy;
322pub mod loop_detection;
323pub mod output_verification;
324pub mod quality;
325pub mod safety_needles;
326pub mod scorecard;
327pub mod setup_report;
328pub mod slo;
329pub mod slow_log;
330pub mod smells;
331pub mod subagent_contract;
332pub mod surprise;
333pub mod verification_observability;
334
335// ---------------------------------------------------------------------------
336// Domain: Config & Infrastructure
337// ---------------------------------------------------------------------------
338pub mod active_inference;
339pub mod agent_budget;
340pub mod anchor;
341pub mod ann_cache;
342pub mod atomic_fs;
343pub mod audit_trail;
344pub mod binary_detect;
345pub mod bounce_tracker;
346pub mod budget_tracker;
347pub mod budgets;
348pub mod cache;
349pub mod cache_telemetry;
350pub mod capabilities;
351pub mod cli_cache;
352pub mod client_capabilities;
353pub mod client_constraints;
354pub mod cloud_files;
355pub mod config;
356pub mod config_heal;
357pub mod consolidation;
358pub mod consolidation_engine;
359pub mod contextops;
360pub mod conversation;
361pub mod crash_log;
362pub mod data_consolidate;
363pub mod data_dir;
364pub mod debug_log;
365pub mod diagnostics_store;
366pub mod editor_signal;
367pub mod egress;
368pub mod error;
369pub mod events;
370pub mod eviction_orchestrator;
371pub mod evidence;
372pub mod evidence_ledger;
373pub mod extension_registry;
374pub mod extractors;
375pub mod feedback;
376pub mod fep_prefetch;
377pub mod filters;
378pub mod free_energy_budget;
379pub mod gain;
380pub mod git;
381pub mod git_cache;
382pub mod git_signals;
383pub mod git_util;
384pub mod godot;
385pub mod gotcha_tracker;
386pub mod handle;
387pub mod hasher;
388pub mod heatmap;
389pub mod hebbian_cache;
390pub mod hnsw;
391pub mod home;
392pub mod homeostasis;
393pub mod immune_detector;
394pub mod mcp_catalog;
395pub mod qubo_select;
396
397pub mod agent_registry;
398pub mod compliance;
399pub mod compliance_report;
400pub mod edit_metering;
401pub mod edit_quality;
402pub mod efficacy;
403pub mod evidence_bundle;
404pub mod grammar_usage;
405pub mod graph_cache;
406pub mod http_client;
407pub mod ide_permissions;
408pub mod import_resolver;
409pub mod index_admission;
410pub mod index_bundle;
411pub mod index_filter;
412pub mod index_namespace;
413pub mod index_orchestrator;
414pub mod index_paths;
415pub mod ingestion;
416pub mod input_filters;
417pub mod instruction_compiler;
418pub mod integrity;
419pub mod intent_engine;
420pub(crate) mod intent_lang;
421pub mod intent_protocol;
422pub mod intent_router;
423pub mod introspect;
424pub mod io_boundary;
425pub mod io_health;
426pub mod journal;
427pub mod jsonc;
428pub mod knowledge_vault;
429pub mod language_capabilities;
430#[cfg(target_os = "macos")]
431pub mod launchd;
432pub mod layout_pin;
433pub mod learning_sync;
434pub mod levenshtein;
435pub mod limits;
436pub mod llm_enhance;
437pub mod llm_feedback;
438pub mod locomo;
439pub mod logging;
440pub mod mcp_manifest;
441pub mod mdl_selector;
442pub mod multi_repo;
443pub mod nc_compress;
444pub mod ocp;
445pub mod openapi;
446pub mod output_echo;
447pub mod owasp_alignment;
448pub mod path_locks;
449pub mod path_mode_memory;
450pub mod path_resolve;
451pub mod paths;
452pub mod pathutil;
453pub mod persona;
454pub mod pipeline;
455pub mod plugins;
456pub mod portable_binary;
457pub mod profile_suggest;
458pub mod profiles;
459pub mod project_hash;
460pub mod protocol;
461pub mod provider_bandit;
462pub mod provider_cache;
463pub mod providers;
464pub mod read_stub_index;
465pub mod recovery;
466pub mod redaction;
467pub mod reference_docs;
468pub mod roles;
469pub mod route_extractor;
470pub mod saliency;
471pub mod sandbox;
472#[cfg(target_os = "linux")]
473pub mod sandbox_landlock;
474pub mod sandbox_seatbelt;
475pub mod sanitize;
476pub mod savings_autopush;
477pub mod savings_footer;
478pub mod savings_ledger;
479pub mod scent_field;
480pub mod search_delta;
481pub mod search_index;
482pub mod secret_detection;
483pub mod security_posture;
484pub mod sensitivity;
485pub mod server_capabilities;
486pub mod session_token;
487pub mod share;
488pub mod shell_allowlist;
489pub mod startup_guard;
490pub mod stats;
491pub mod structural_diff;
492pub mod symbol_map;
493pub mod syntax_validate;
494pub mod task_briefing;
495/// macOS Seatbelt self-sandbox (#356): wraps launchd-owned daemon/proxy/updater
496/// in a `sandbox-exec` profile that denies `~/Documents`/`~/Desktop`/
497/// `~/Downloads`, so the TCC privacy prompt can never appear.
498#[cfg(target_os = "macos")]
499pub mod tcc_guard_sandbox;
500pub mod tdd_schema;
501pub mod team_slo;
502pub mod telemetry;
503pub mod terse;
504pub mod theme;
505pub mod threshold_learning;
506pub mod tokenizer_translation_driver;
507pub mod tokens;
508pub mod tool_health;
509pub mod tool_lifecycle;
510pub mod tool_profiles;
511pub mod transcript_compact;
512pub mod update_scheduler;
513pub mod updater;
514pub mod version_check;
515pub mod visualizer;
516pub mod walk_filter;
517/// WASM extension runtime (`wasm-abi-v1`): sandboxed, language-independent
518/// compressors and providers. Feature-gated behind `wasm`.
519#[cfg(feature = "wasm")]
520pub mod wasm_ext;
521pub mod web;
522pub mod workflow;
523pub mod workspace_config;
524pub mod wrapped;
525pub mod wrapped_share;
526pub mod wrapped_svg;
527pub mod xdg_migrate;
528
529// ---------------------------------------------------------------------------
530// Feature-gated modules
531// ---------------------------------------------------------------------------
532pub mod archive;
533pub mod archive_fts;
534pub mod artifact_index;
535pub mod artifacts;
536pub mod ast_walk;
537pub mod buddy;
538#[cfg(feature = "tree-sitter")]
539pub mod chunks_ts;
540pub mod deep_queries;
541pub mod deps;
542pub mod editor_registry;
543pub mod firewall;
544pub mod pathjail;
545pub mod signatures;
546#[cfg(feature = "tree-sitter")]
547pub mod signatures_ts;
548pub mod storage_maintenance;
549pub mod structured_compact;
550pub mod type_ref_edges;
551pub mod workspace_trust;