sttp-core-rs
Core Rust library for STTP domain modeling, validation, parsing, and storage-backed services.
This crate is designed to be embedded in apps, MCP servers, and gateways that need to store and retrieve STTP nodes with AVEC-aware semantics.
What You Get
- Domain contracts and models for STTP and AVEC.
- Application services:
- calibration,
- context retrieval,
- context storage,
- mood catalog and blend preview,
- monthly rollup generation,
- batch scope rekey.
- Storage implementations:
- in-memory store,
- SurrealDB-backed store.
- Parser and validator primitives for raw STTP node text.
Installation
[]
= "0.1"
Quick Start
use Arc;
use ;
#
Public API Surface
- Services:
CalibrationService,ContextQueryService,StoreContextService,MoodCatalogService,MonthlyRollupService,RekeyScopeService. - Validation:
TreeSitterValidator. - Storage:
InMemoryNodeStore,SurrealDbNodeStore,SurrealDbRuntimeOptions,SurrealDbSettings. - Contracts:
NodeStore,NodeStoreInitializer,NodeValidator. - Core models:
SttpNode,AvecState,NodeQuery,MonthlyRollupRequest,BatchRekeyResult.
Build And Test
Build Package Artifact
Create a local .crate artifact for verification:
Inspect package contents:
The artifact is written under src/sttp/sttp-core-rs/target/package.
First Publish To crates.io (Step-By-Step)
If this is your first crates.io release, use this sequence.
1. Verify Name Availability
If the exact crate name is already taken, update [package].name in Cargo.toml.
2. Create crates.io Token
- Sign in at crates.io.
- Go to Account Settings -> API Tokens.
- Create a token with publish scope.
Login locally:
Alternative for CI/non-interactive use:
3. Release Readiness Checks
From repository root:
Check exact package contents:
4. Dry-Run Publish (Required)
5. Publish
6. Post-Publish Verification
Then verify docs build on docs.rs (can take a few minutes).
Optional: One-Command Release Preflight
Use the helper script:
To run publish after preflight: