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
//! Completion exists to turn a partially typed line plus cursor position into a
//! ranked suggestion set.
//!
//! This module stays deliberately free of terminal state, network access, and
//! REPL/editor concerns. The core flow is:
//!
//! - `tree`: build a static command/config completion tree
//! - `parse`: tokenize and analyze a partially typed command line
//! - `suggest`: rank and shape suggestions from the parsed cursor context
//!
//! Outer layers such as [`crate::cli`] and [`crate::repl`] inject dynamic
//! command catalogs, shell scope, alias expansion, and live prompt behavior on
//! top of this pure engine.
//!
//! Contract:
//!
//! - completion logic may depend on structured command metadata and cursor
//! state
//! - it should not depend on terminal painting, network I/O, plugin process
//! execution, or interactive host state
//!
//! Public API shape:
//!
//! - `tree` exposes builder/factory-style entrypoints such as
//! [`crate::completion::CompletionTreeBuilder`] and
//! [`crate::completion::CommandSpec`]
//! - `model` stays mostly plain semantic data so parsers, suggesters, and
//! embedders can exchange completion state without hauling builder objects
//! around
//! - terminal/editor integration belongs in outer layers like [`crate::repl`]
/// High-level orchestration that combines parsing, context resolution, and suggestion ranking.
/// Shared completion data structures passed between the parser and suggester.
/// Tokenization and cursor-aware command-line parsing.
/// Suggestion ranking and output shaping from parsed cursor state.
/// Declarative completion-tree builders derived from command and config metadata.
pub use CompletionEngine;
pub use ;
pub use ;
pub use SuggestionEngine;
pub use ;