Expand description
Shared command, output, row, and protocol primitives. Core primitives shared across the rest of the crate.
This module exists to hold small, stable building blocks that many other subsystems need: rows, output/result types, command metadata, shell token handling, fuzzy matching, and a few protocol DTOs.
Read this module when you need a shared type that should mean the same thing everywhere else in the crate.
Rough map:
crate::core::command_defdescribes commands as semantic metadata for help and catalogscrate::core::command_policyanswers whether a command should be visible or allowedcrate::core::outputandcrate::core::output_modeldefine the crate’s canonical output shapescrate::core::plugindefines the stable wire DTOs shared with external pluginscrate::core::rowis the common row representation used by commands, DSL, and UIcrate::core::shell_wordsandcrate::core::fuzzyprovide small reusable parsing/matching primitives
core should not become a junk drawer. A type belongs here only if it is
genuinely shared, stable in meaning, and lower-level than the feature
modules that depend on it.
Contract:
- types here should stay broadly reusable and free of host-specific logic
corecan be depended on widely, but it should avoid depending on higher-level modules likeapp,repl, orui
Modules§
- command_
def - Declarative command metadata used for help and policy resolution. Declarative command metadata shared by help, completion, and plugin layers.
- command_
policy - Visibility and access-policy evaluation for commands. Runtime command visibility and access policy evaluation.
- fuzzy
- Shared Unicode-aware fuzzy matching helpers.
- output
- Output-mode and presentation enums shared across the crate. Output-mode enums shared across config parsing, CLI flags, and the UI.
- output_
model - Structured row/group/document output types. Structured output payload model shared across commands, DSL stages, and UI.
- plugin
- Plugin protocol DTOs shared across plugin boundaries. Wire-format DTOs for the plugin protocol.
- row
- Shared row representation used by the DSL and services.
- runtime
- Runtime-mode and verbosity primitives. Runtime hint model shared across host, native commands, and plugin boundaries.
- shell_
words - Shell-like tokenization helpers.