ri-esp-policy 0.1.0

no_std deterministic sensor-policy crate for ESP32/S3 physical-AI endpoint: maps readings to canonical prompts
Documentation
  • Coverage
  • 19.51%
    8 out of 41 items documented0 out of 11 items with examples
  • Size
  • Source code size: 22.09 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 379.08 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 5s Average build duration of successful builds.
  • all releases: 6s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • RecursiveIntell/esp32-reusable
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • RecursiveIntell

ri-esp-policy

Deterministic sensor policy.

ri-esp-policy architecture

What it provides

sensor readings to canonical local-language PromptId decisions.

It depends on ri-esp-core only and is safe to use from firmware and host tests.

Install

[dependencies]
ri-esp-policy = "0.1"

Quick start

use ri_esp_core::EnvironmentReading;
use ri_esp_policy::{PolicyContext, SensorPolicy, PromptId};

let ctx = PolicyContext::new(EnvironmentReading::new(31.0, 70.0, None), 3_000)
    .with_last_read_ms(2_900);
let d = SensorPolicy::default().evaluate(ctx);
assert_eq!(d.prompt_id, PromptId::HighHeatHumidity);
assert_eq!(d.prompt(), "high heat and humidity. action is ");

API shape

  • no_std by default
  • fixed-capacity data structures where strings/payloads are needed
  • explicit receipt/schema constants where the crate crosses firmware/host boundaries
  • small public API intended to be readable in firmware reviews

Verification

From the workspace root:

cargo test -p ri-esp-policy
cargo +esp check -p ri-esp-policy --target xtensa-esp32s3-none-elf -Z build-std=core,alloc

This crate is also covered by the workspace gate:

cargo test --workspace

Integration path

Use this crate as one boundary in the larger ESP32 physical-AI stack:

sensor reading -> deterministic policy -> local-language receipt -> proof receipt -> display/log/optional escalation

Claim boundary

This crate is a reusable building block. It does not certify physical wiring, safety-critical behavior, production deployment, or model quality outside tests/receipts stated in the repository.

License

MIT OR Apache-2.0