coreason-engine 0.1.0

Coreason execution engine for deterministic computation
Documentation
#![allow(

// Copyright (c) 2026 CoReason, Inc. All Rights Reserved
// This software is proprietary and dual-licensed
// Licensed under the Prosperity Public License 3.0 (the "License")
// A copy of the license is available at <https://prosperitylicense.com/versions/3.0.0>
// For details, see the LICENSE file
// Commercial use beyond a 30-day trial requires a separate license
// SPDX-License-Identifier: LicenseRef-Prosperity-3.0

    clippy::empty_line_after_outer_attr,
    clippy::empty_line_after_doc_comments,
    clippy::new_without_default,
    clippy::suspicious_open_options,
    clippy::unnecessary_map_or,
    clippy::to_string_in_format_args,
    clippy::needless_borrow
)]

use manifest_types::{
    calculate_latent_alignment, EpistemicOntologicalAlignmentPolicy, VectorEmbeddingState,
};
use thiserror::Error;

#[derive(Error, Debug)]
pub enum AlignmentEngineError {
    #[error("Algebra layer error: {0}")]
    AlgebraError(#[from] manifest_types::algebra::AlgebraError),
}

pub struct LatentAlignmentEngine {
    policy: EpistemicOntologicalAlignmentPolicy,
}

impl LatentAlignmentEngine {
    pub fn new(policy: EpistemicOntologicalAlignmentPolicy) -> Self {
        Self { policy }
    }

    pub fn check_alignment(
        &self,
        v1: &VectorEmbeddingState,
        v2: &VectorEmbeddingState,
    ) -> Result<f64, AlignmentEngineError> {
        Ok(calculate_latent_alignment(v1, v2, &self.policy)?)
    }
}

pub mod dlp_scanner;
pub mod epistemic_math;
pub mod thermodynamics;

pub mod blast_radius;
pub mod capability_allocator;
pub mod embeddings;
pub mod federated_query;
pub mod governance;
pub mod isv_provisioning;
pub mod license;
pub mod lmsr_consensus;
pub mod local_simulator;
pub mod ontological_solver;
pub mod policy_tree;
pub mod sovereign_etl;
pub mod wasm_dispatcher;