Skip to main content

Crate oino_resources

Crate oino_resources 

Source
Expand description

oino-resources: resource loading for Oino — context files (AGENTS.md & co.), SYSTEM/APPEND prompt sources, skills, prompt templates, theme files, the structured system prompt, project trust and the keybindings file.

Boundary: synchronous std I/O, no async runtime; oino-core calls it on blocking threads. Packages and extensions are resolved by oino-core and contribute paths through ResourceLoader::extend.

§API map

| Module | Contents | |—|—|—| | loader | ResourceLoader, ResourceLoaderOptions, ResourceExtensionPaths, ThemeResource | | discovery | settings arrays + auto-discovery with !glob/+path/-path, precedence | | context_files | ContextFile, context_files::load_project_context_files | | system_prompt | BuildSystemPromptOptions, SystemPromptState, system_prompt::build_system_prompt_sections, system_prompt::build_system_prompt_state, system_prompt::diff_system_prompt_sections | | skills | Skill, skills::load_skills, skills::format_skills_for_prompt, skills::expand_skill_command | | templates | PromptTemplate, templates::parse_command_args, templates::substitute_args, templates::expand_prompt_template | | trust | trust::TrustStore, trust::has_protected_resources, trust::resolve_project_trust | | keybindings | keybindings::KeybindingsFile, keybindings::migrate_keybindings_config, keybindings::is_valid_key_id | | frontmatter | frontmatter::parse_frontmatter | | diagnostics, source | diagnostics.ts, source-info.ts | ResourceDiagnostic, SourceInfo, source::PathMetadata |

Product substitutions (D13): the default preamble names Oino, the docs section points at the bundled Oino docs (docs_root), and the bash env guideline is system_prompt::ENV_GUIDELINE.

Re-exports§

pub use context_files::ContextFile;
pub use diagnostics::DiagnosticKind;
pub use diagnostics::ResourceDiagnostic;
pub use loader::ExtraResourcePath;
pub use loader::ResourceExtensionPaths;
pub use loader::ResourceLoader;
pub use loader::ResourceLoaderOptions;
pub use loader::ThemeResource;
pub use skills::Skill;
pub use source::SourceInfo;
pub use system_prompt::BuildSystemPromptOptions;
pub use system_prompt::SystemPromptState;
pub use templates::PromptTemplate;

Modules§

context_files
Project context files (runtime §9.2).
diagnostics
Resource diagnostics.
discovery
Local resource resolution (minus packages): settings resource arrays of both scopes plus auto-discovered directories, with !glob, +path, -path overrides and precedence ordering.
frontmatter
YAML frontmatter.
keybindings
<agent>/keybindings.json: load, migrate legacy names, validate key ids. Semantics (defaults, conflicts, dispatch) belong to frontends.
loader
ResourceLoader (minus extension loading): skills, prompt templates, theme files, context files and SYSTEM/APPEND prompt sources.
skills
Skills: discovery, frontmatter validation, prompt formatting and /skill:name expansion.
source
Resource provenance (source-info, PathMetadata).
system_prompt
Structured system prompt with the D13 product substitutions of runtime §9.4.
templates
Prompt templates: loading, argument parsing and substitution, /name args expansion.
trust
Project trust (runtime §9.7).