Add binary wire protocol (CogPacket) for inter-runtime communication#109
Merged
Conversation
Replace JSON serialization for internal communication with binary CogPacket wire protocol. The 1088-byte packets carry full cognitive state (10-layer satisfaction, NARS truth values, field modulation) through 8+8/4096 opcode addressing. CognitiveKernel.process_packet() routes by fingerprint resonance instead of step_type string dispatch. - wire.rs: CogPacket binary format (64-byte header + Container payload) - cognitive_kernel.rs: process_packet() for L4 Self-Realization - nars.rs: add Serialize/Deserialize to TruthValue - legacy.rs: fix test constructors for cognitive awareness fields - 37 wire tests + 11 kernel tests all passing https://claude.ai/code/session_01NocTBszN8LoR9Vrc7Tn4oF
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Introduces a binary wire protocol (
CogPacket) to replace JSON serialization for internal communication between ladybug-rs, crewai-rust, and n8n-rs. The protocol uses bitpacked binary packets built on theContainerprimitive, eliminating JSON overhead and enabling direct fingerprint-based routing through BindSpace.Key Changes
New
wire.rsmodule (865 lines): Implements the completeCogPacketbinary protocolUpdated
cognitive_kernel.rs: Adds packet processing pipelineprocess_packet()method: routes incoming CogPackets through the 10-layer stackUpdated
nars.rs: AddsDebugderive toTruthValuefor wire protocol loggingUpdated
legacy.rs: Adds missing fields to V1 snapshot test data for compatibilityUpdated
lib.rs: Exports newwiremodule in public APIImplementation Details
from_step_type()helper converts legacy V1 delegation strings to CogPackets for migrationThe protocol is designed for zero-copy processing and direct hardware-friendly serialization, enabling efficient inter-runtime communication while maintaining full cognitive state fidelity.
https://claude.ai/code/session_01NocTBszN8LoR9Vrc7Tn4oF