@knolo/cli 6.1.0 → 6.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +56 -4
- package/bin/cortex.mjs +125 -0
- package/bin/flight.mjs +367 -0
- package/bin/knolo.mjs +36 -0
- package/bin/skill.mjs +698 -0
- package/package.json +3 -3
- package/templates/icp-knowledge-canister/canisters/knolo-core-rust/src/kar/closure.rs +395 -0
- package/templates/icp-knowledge-canister/canisters/knolo-core-rust/src/kar/cover.rs +692 -0
- package/templates/icp-knowledge-canister/canisters/knolo-core-rust/src/kar/evaluate.rs +343 -0
- package/templates/icp-knowledge-canister/canisters/knolo-core-rust/src/kar/json.rs +486 -0
- package/templates/icp-knowledge-canister/canisters/knolo-core-rust/src/kar/mod.rs +14 -0
- package/templates/icp-knowledge-canister/canisters/knolo-core-rust/src/kar/model.rs +1068 -0
- package/templates/icp-knowledge-canister/canisters/knolo-core-rust/src/kar/session.rs +1156 -0
- package/templates/icp-knowledge-canister/canisters/knolo-core-rust/src/lib.rs +7 -1
|
@@ -2,6 +2,12 @@ use std::collections::{HashMap, HashSet};
|
|
|
2
2
|
use std::error::Error;
|
|
3
3
|
use std::fmt::{Display, Formatter};
|
|
4
4
|
|
|
5
|
+
mod kar;
|
|
6
|
+
pub use kar::{
|
|
7
|
+
create_kar_dossier_v5, evaluate_kar_v5, render_kar_dossier, verify_kar_dossier_v5, verify_kar_v5,
|
|
8
|
+
KarDossier, KarEvaluation, KarRunError, KarVerification,
|
|
9
|
+
};
|
|
10
|
+
|
|
5
11
|
#[derive(Debug, Clone)]
|
|
6
12
|
pub enum KnoloError {
|
|
7
13
|
InvalidPack(String),
|
|
@@ -2012,7 +2018,7 @@ fn digest_raw(digest: &str) -> Vec<u8> { let hex = digest.strip_prefix("sha256-"
|
|
|
2012
2018
|
fn le_u16(bytes: &[u8], offset: usize) -> Result<u16, KnoloError> { Ok(u16::from_le_bytes(read_slice(bytes, &mut offset.clone(), 2)?.try_into().unwrap())) }
|
|
2013
2019
|
|
|
2014
2020
|
// Minimal SHA-256 implementation for the dependency-free Rust kernel.
|
|
2015
|
-
fn sha256(input: &[u8]) -> [u8; 32] {
|
|
2021
|
+
pub(crate) fn sha256(input: &[u8]) -> [u8; 32] {
|
|
2016
2022
|
const K: [u32; 64] = [
|
|
2017
2023
|
0x428a2f98,0x71374491,0xb5c0fbcf,0xe9b5dba5,0x3956c25b,0x59f111f1,0x923f82a4,0xab1c5ed5,
|
|
2018
2024
|
0xd807aa98,0x12835b01,0x243185be,0x550c7dc3,0x72be5d74,0x80deb1fe,0x9bdc06a7,0xc19bf174,
|