Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions crates/ladybug-contract/src/legacy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -446,6 +446,10 @@ mod tests {
confidence: 1.0,
epoch: 12345,
version: None,
dominant_layer: None,
layer_activations: None,
nars_frequency: None,
calibration_error: None,
},
};
let json = serde_json::to_string(&env).unwrap();
Expand Down Expand Up @@ -475,6 +479,10 @@ mod tests {
confidence: 1.0,
epoch: 0,
version: None,
dominant_layer: None,
layer_activations: None,
nars_frequency: None,
calibration_error: None,
},
};
let req = V1StepDelegationRequest { step, input };
Expand Down
5 changes: 4 additions & 1 deletion crates/ladybug-contract/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@
//! | [`layers`] | 7-layer consciousness marker constants |
//! | [`temporal`] | `Version`, `VersionDiff`, temporal error types |
//! | [`delegation`] | `DelegationRequest` / `DelegationResponse` |
//! | [`legacy`] | V1 JSON backward compatibility (existing wire format) |
//! | [`wire`] | Binary wire protocol: `CogPacket` (8+8/4096 command packets, no JSON) |
//! | [`legacy`] | V1 JSON backward compatibility (external wire format only) |

pub mod container;
pub mod geometry;
Expand All @@ -45,6 +46,7 @@ pub mod temporal;

pub mod delegation;
pub mod legacy;
pub mod wire;

// === Convenience re-exports ===
pub use container::{Container, CONTAINER_BITS, CONTAINER_BYTES, CONTAINER_WORDS};
Expand All @@ -58,3 +60,4 @@ pub use legacy::{
V1DataEnvelope, V1EnvelopeMetadata, V1LadybugEnvelope, V1LadybugMetadata,
V1StepDelegationRequest, V1StepDelegationResponse, V1StepStatus, V1UnifiedStep,
};
pub use wire::{CogPacket, WireError, COG_MAGIC, WIRE_VERSION};
2 changes: 1 addition & 1 deletion crates/ladybug-contract/src/nars.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use std::fmt;
///
/// - **frequency** (f): Proportion of positive evidence (0.0 - 1.0)
/// - **confidence** (c): Reliability of the frequency (0.0 - 1.0)
#[derive(Clone, Copy, PartialEq)]
#[derive(Clone, Copy, PartialEq, serde::Serialize, serde::Deserialize)]
pub struct TruthValue {
pub frequency: f32,
pub confidence: f32,
Expand Down
Loading
Loading