Skip to main content

osp_cli/completion/
mod.rs

1//! Completion engine for OSP CLI/REPL.
2//!
3//! The crate is intentionally split into three pure phases:
4//! - `tree`: build a plain completion tree
5//! - `parse`: parse line input into a structured `CommandLine`
6//! - `suggest`: generate candidates from `CommandLine + CompletionTree`
7//!
8//! Dynamic hints (network/provider/openapi derived) are injected by outer
9//! layers (`osp-cli` / `osp-repl`) and not fetched here.
10
11mod context;
12pub mod engine;
13pub mod model;
14pub mod parse;
15pub mod suggest;
16pub mod tree;
17
18pub use engine::CompletionEngine;
19pub use model::{
20    ArgNode, CommandLine, CompletionAnalysis, CompletionContext, CompletionNode, CompletionTree,
21    ContextScope, CursorState, FlagNode, FlagOccurrence, MatchKind, ParsedLine, QuoteStyle,
22    Suggestion, SuggestionEntry, SuggestionOutput, TailItem, ValueType,
23};
24pub use parse::{CommandLineParser, TokenSpan};
25pub use suggest::SuggestionEngine;
26pub use tree::{CommandSpec, CompletionTreeBuilder, ConfigKeySpec};