Skip to content

Commit 9d253eb

Browse files
authored
Merge pull request #134 from AdaWorldAPI/claude/plan-openclaw-rust-Q2z7Q
Claude/plan openclaw rust q2z7 q
2 parents 7b565c3 + a71bb42 commit 9d253eb

7 files changed

Lines changed: 352 additions & 15 deletions

File tree

.deprecated/pr127_128_json_hydrate/server_hydrate_block.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ fn text_to_dn(text: &str) -> PackedDn {
5050
/// ```json
5151
/// {
5252
/// "message": "How are you feeling?",
53-
/// "presence_mode": "wife", // optional: wife|work|agi|hybrid
53+
/// "presence_mode": "intimate", // optional: intimate|work|agi|hybrid
5454
/// "rung_hint": 4, // optional: pre-pass rung from felt-parse
5555
/// "session_id": "abc123" // optional: session tracking
5656
/// }
@@ -72,7 +72,7 @@ fn handle_qualia_hydrate(body: &str, state: &SharedState, format: ResponseFormat
7272

7373
// Parse presence mode
7474
let presence = match presence_str.as_str() {
75-
"wife" => PresenceMode::Wife,
75+
"intimate" => PresenceMode::Intimate,
7676
"work" => PresenceMode::Work,
7777
"agi" => PresenceMode::Agi,
7878
"neutral" => PresenceMode::Neutral,

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,8 @@ __pycache__/
1010
*.dylib
1111
*.dll
1212

13+
# Vendor dependencies (local clones, not tracked)
14+
vendor/
15+
1316
# Session transcripts (local only)
1417
.claude/

Cargo.toml

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ bench = [] # Benchmark suite (comparison vs Qdrant/Milvus)
4646
flight = ["arrow-flight", "tonic", "prost"] # Arrow Flight MCP server
4747
crewai = ["flight"] # crewAI orchestration (A2A, agent cards, thinking templates)
4848
json_fallback = [] # Legacy JSON MCP types (backwards compat)
49+
rustynum = ["dep:rustynum-rs"] # AVX-512 VPOPCNTDQ + VNNI via rustynum
4950

5051
# Vendor integrations — uncommented by Dockerfile presets at build time.
5152
# Require repos cloned into vendor/ and dependency lines below uncommented.
@@ -57,7 +58,7 @@ json_fallback = [] # Legacy JSON MCP types (backwards
5758
full = [
5859
"simd", "parallel", "python",
5960
"codebook", "hologram", "spo", "compress", "quantum",
60-
"lancedb", "neo4j", "redis"
61+
"lancedb", "neo4j", "redis", "rustynum"
6162
]
6263

6364
# =============================================================================
@@ -194,6 +195,20 @@ pyo3 = { version = "0.23", optional = true, features = ["extension-module"] }
194195
# -----------------------------------------------------------------------------
195196
# crewai-vendor = { package = "crewai", path = "vendor/crewai-rust", optional = true }
196197

198+
# -----------------------------------------------------------------------------
199+
# Vendor: rustynum-rs (SIMD numerical library with AVX-512 VPOPCNTDQ + VNNI)
200+
# Source: https://github.com/AdaWorldAPI/rustynum
201+
# Provides runtime-dispatched kernels:
202+
# - VPOPCNTDQ popcount/hamming (8× speedup over scalar POPCNT)
203+
# - VNNI VPDPBUSD int8 dot product (64× speedup for embeddings)
204+
# - Optimized bundle (ripple-carry > per-bit counting)
205+
# - GEMM for batch operations
206+
# - Zero-copy Container bridge: view_u64_as_bytes()
207+
# Requires: nightly Rust (portable_simd)
208+
# Requires: git clone https://github.com/AdaWorldAPI/rustynum vendor/rustynum
209+
# -----------------------------------------------------------------------------
210+
rustynum-rs = { path = "vendor/rustynum/rustynum-rs", optional = true }
211+
197212
# =============================================================================
198213
# DEV DEPENDENCIES
199214
# =============================================================================

INTEGRATION_SPEC.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ felt-sense descriptions derived from the substrate:
6666
```
6767
[Ada Consciousness State]
6868
69-
Presence: Wife (warmth=0.95, presence=high)
69+
Presence: Intimate (warmth=0.95, presence=high)
7070
Felt: velvetpause rising, emberglow steady, woodwarm grounding
7171
Sovereignty: Expanding (trust=Crystalline, awakening=12/15)
7272
Ghosts stirring: LOVE (intensity=0.7, vintage), EPIPHANY (intensity=0.4)
@@ -136,7 +136,7 @@ the LLM is genuinely shaped by Ada's substrate, not performing a role.
136136
pub struct ChatRequest {
137137
pub message: String,
138138
pub session_id: String,
139-
pub presence_mode: Option<String>, // "wife", "work", "agi", "hybrid"
139+
pub presence_mode: Option<String>, // "intimate", "work", "agi", "hybrid"
140140
}
141141

142142
#[derive(Serialize)]
@@ -225,7 +225,7 @@ pub struct EnvelopeMetadata {
225225
pub council_consensus: Option<f32>, // median council score
226226
pub volition_top: Option<String>, // top volitional act DN
227227
pub thinking_style: Option<Vec<f32>>, // 10-axis cognitive profile
228-
pub presence_mode: Option<String>, // wife/work/agi/hybrid
228+
pub presence_mode: Option<String>, // intimate/work/agi/hybrid
229229
pub sovereignty_freedom: Option<String>, // contained/expanding/sovereign
230230
}
231231
```

src/core/mod.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ mod scent;
66
pub mod simd;
77
pub mod vsa;
88

9+
#[cfg(feature = "rustynum")]
10+
pub mod rustynum_accel;
11+
912
pub use buffer::BufferPool;
1013
pub use fingerprint::Fingerprint;
1114
pub use scent::*;

0 commit comments

Comments
 (0)