Skip to main content

osp_cli/core/
mod.rs

1//! Core primitives shared across the rest of the crate.
2//!
3//! This module exists to hold small, stable building blocks that many other
4//! subsystems need: rows, output/result types, command metadata, shell token
5//! handling, fuzzy matching, and a few protocol DTOs.
6//!
7//! Read this module when you need a shared type that should mean the same thing
8//! everywhere else in the crate.
9//!
10//! Rough map:
11//!
12//! - [`crate::core::command_def`] describes commands as semantic metadata for help and
13//!   catalogs
14//! - [`crate::core::command_policy`] answers whether a command should be visible or allowed
15//! - [`crate::core::output`] and [`crate::core::output_model`] define the crate's canonical output
16//!   shapes
17//! - [`crate::core::plugin`] defines the stable wire DTOs shared with external plugins
18//! - [`crate::core::row`] is the common row representation used by commands, DSL, and UI
19//! - [`crate::core::shell_words`] and [`crate::core::fuzzy`] provide small reusable
20//!   parsing/matching
21//!   primitives
22//!
23//! `core` should not become a junk drawer. A type belongs here only if it is
24//! genuinely shared, stable in meaning, and lower-level than the feature
25//! modules that depend on it.
26//!
27//! Contract:
28//!
29//! - types here should stay broadly reusable and free of host-specific logic
30//! - `core` can be depended on widely, but it should avoid depending on
31//!   higher-level modules like `app`, `repl`, or `ui`
32
33/// Declarative command metadata used for help and policy resolution.
34pub mod command_def;
35/// Visibility and access-policy evaluation for commands.
36pub mod command_policy;
37/// Shared Unicode-aware fuzzy matching helpers.
38pub mod fuzzy;
39/// Output-mode and presentation enums shared across the crate.
40pub mod output;
41/// Structured row/group/document output types.
42pub mod output_model;
43/// Plugin protocol DTOs shared across plugin boundaries.
44pub mod plugin;
45/// Shared row representation used by the DSL and services.
46pub mod row;
47/// Runtime-mode and verbosity primitives.
48pub mod runtime;
49/// Shell-like tokenization helpers.
50pub mod shell_words;