Skip to main content

Crate mini_app_core

Crate mini_app_core 

Source
Expand description

§mini-app-core

Agent-First CRUD store core library. Transport-agnostic DB layer that drives one table per process from schema.yaml, backed by SQLite.

Transport (MCP / HTTP / CLI) lives in a separate crate (mini-app-mcp) that depends on this one. The dependency is strictly one-way: mcp → core, never the reverse. Error type conversion to rmcp::ErrorData is performed by an ACL adapter (private free function) in the mcp crate to comply with the Rust orphan rule (Outline rust book §5-1-10 K-orphan-rule).

Re-exports§

pub use store::UpdateMode;
pub use error::MiniAppError;

Modules§

aggregator
Multi-table aggregation primitives (query_aggregate tool backend).
alias_run
Top-level orchestration for alias_run — single entry point exposed for both the MCP tool handler and direct SDK consumers. Top-level orchestration for the alias_run MCP tool.
alias_storage
Global alias storage (Phase 2). Persists named queries that span Single / Multi / Pattern table sources in a dedicated <project_dir or user_dir>/_global.db SQLite file, separate from per-table <table>.db. Provides lookup with Project → User precedence and a lossless migration helper from legacy per-table _aliases storage. Global alias storage — single-source-of-truth for named queries that span [SourceSpec::Single] / [SourceSpec::Multi] / [SourceSpec::Pattern] table sources.
backup
Backup utilities (YAML + SQLite online backup with retention).
config
Runtime configuration loaded from environment variables.
dump
Framework-level dump hook utilities (write-only file materialization). Framework-level dump hook utilities (write-only file materialization).
error
Application-level error type.
filter
Server-side row filter for the list tool.
materialize
row_materialize operation — row selection, field projection, and multi-format filesystem output with SHA-256 integrity digest.
registry
Multi-table registry + atomic reload (Arc-Swap based, K-110-compliant).
schema
Schema definition, runtime loading, and JSON row validation.
snapshot
Snapshot utilities (SQLite-only online snapshot with retention).
store
SQLite-backed row store (async CRUD via tokio::task::spawn_blocking).