Single-commit clean baseline after security scrub of niche-tells, project codenames, internal jargon, and contributor-email leaks. Contents: - 100 Rust crates (_primitives/_rust/) - 37 agent manifests (_manifests/) + generated specs (_generated/) - 67 user-invocable skills (skills/) - 33 hooks (hooks/) - Composition blocks (_blocks/) - Documentation (docs/, README.md) - TS adapter packages (_ts_packages/) - Assembler (_assembler/) - Roles (_roles/) - Templates (_templates/) - Forgejo CI (.forgejo/) Author: Denis Parfionovich <info@greendragon.info> License: see LICENSE.
34 lines
923 B
Rust
34 lines
923 B
Rust
// SPDX-License-Identifier: Apache-2.0
|
|
// Copyright 2026 <author org>
|
|
|
|
use thiserror::Error;
|
|
|
|
#[derive(Debug, Error)]
|
|
pub enum Error {
|
|
#[error("mlx: {0}")]
|
|
Mlx(String),
|
|
#[error("DNA: {0}")]
|
|
Dna(#[from] kei_runtime_core::DnaError),
|
|
#[error("wrong platform: MLX requires macOS Apple Silicon")]
|
|
WrongPlatform,
|
|
}
|
|
|
|
pub type Result<T> = std::result::Result<T, Error>;
|
|
|
|
impl From<kei_llm_mlx::Error> for Error {
|
|
fn from(e: kei_llm_mlx::Error) -> Self {
|
|
Error::Mlx(e.to_string())
|
|
}
|
|
}
|
|
|
|
impl From<Error> for kei_runtime_core::Error {
|
|
fn from(e: Error) -> Self {
|
|
match e {
|
|
Error::Dna(e) => kei_runtime_core::Error::Dna(e),
|
|
Error::WrongPlatform => kei_runtime_core::Error::Provider(
|
|
"MLX requires macOS Apple Silicon".into()
|
|
),
|
|
Error::Mlx(s) => kei_runtime_core::Error::Provider(format!("mlx: {s}")),
|
|
}
|
|
}
|
|
}
|