Files
ruvnet--RuView/v2/crates/homecore-assist/Cargo.toml
T
ruv 7c80711454 feat(homecore-assist,homecore-recorder): replace stubs with real impls (ADR-132/133)
Implements the three placeholder paths with real, tested behaviour and an
honest typed result wherever a capability is genuinely data-gated.

homecore-assist:
- runner.rs: add LocalRunner — runs the real IntentRecognizer pipeline and
  returns a fully-formed RufloResponse (resolved intent + speech). NoopRunner
  is now honest: typed NotStarted before spawn, explicit empty after (never a
  silent fabricated response). A live ruflo-agent.js subprocess remains the
  data-gated future path.
- recognizer.rs / semantic_recognizer.rs: real SemanticIntentRecognizer — embeds
  the utterance (deterministic feature-hash embedding, new embedding.rs) and runs
  ruvector-core HNSW nearest-neighbour search over enrolled exemplars, accepting
  matches above a configurable cosine-similarity threshold (default 0.75) and
  falling back to regex below it. Measured: paraphrase "turn on the kitchen
  light" vs exemplar "turn on the light" -> sim 0.855 (match); "schedule a
  dentist appointment" -> sim 0.106 (no-match). `semantic` feature on by default.

homecore-recorder:
- db.rs: search_states_by_text — real SQL LIKE query over entity_id/state/attrs
  returning real rows (newest-first, k-capped, LIKE-escaped). search_semantic now
  falls back to it when the vector index yields no hits, so it is no longer
  always-empty under the default NullSemanticIndex.

Tests (real behaviour; each fails on the old always-empty stub, verified):
- homecore-assist: 39 passed / 0 failed
- homecore-recorder (P1, no features): 19 passed / 0 failed
- homecore-recorder (P2, --features ruvector): 25 passed / 0 failed
All files < 500 lines; homecore-server consumer still builds.

Co-Authored-By: claude-flow <ruv@ruv.net>
2026-06-11 21:40:20 -04:00

59 lines
2.0 KiB
TOML

# HOMECORE-ASSIST — Voice/intent pipeline + ruflo agent bridge.
# Implements ADR-133 (HOMECORE-ASSIST), P1 scaffold:
# - IntentName, Intent, IntentResponse types
# - IntentRecognizer trait + RegexIntentRecognizer (P1)
# - IntentHandler trait + 5 built-in HA-mirroring handlers
# - RufloRunner trait + NoopRunner (P1 stub; real subprocess in P2)
# - AssistPipeline: utterance → recognizer → handler → response
[package]
name = "homecore-assist"
version = "0.1.0-alpha.0"
edition = "2021"
license = "MIT"
authors = ["rUv <ruv@ruv.net>", "HOMECORE Contributors"]
description = "HOMECORE voice/intent pipeline + ruflo agent bridge (ADR-133 P1 scaffold)"
repository = "https://github.com/ruvnet/RuView"
[lib]
name = "homecore_assist"
path = "src/lib.rs"
[dependencies]
# HOMECORE state machine — local path (ADR-127).
homecore = { path = "../homecore", version = "0.1.0-alpha.0" }
# Async runtime — same feature set as workspace.
# tokio::process is used by the P2 runner; included now so the trait compiles.
tokio = { version = "1", features = ["full"] }
# Async trait support for IntentRecognizer, IntentHandler, RufloRunner.
async-trait = "0.1"
# Error handling.
thiserror = "1"
# Serialisation (intents, slots, ruflo request/response payloads).
serde = { version = "1", features = ["derive"] }
serde_json = "1"
# Regex for P1 intent pattern matching.
regex = "1"
# Structured logging.
tracing = "0.1"
# Semantic intent recognition: ruvector-core HNSW index over enrolled intent
# exemplars (same facility homecore-recorder uses for state search). The
# `semantic` feature is on by default so SemanticIntentRecognizer has a real
# embedding + nearest-neighbour search out of the box.
ruvector-core = { version = "2.2.0", optional = true, default-features = false }
[features]
default = ["semantic"]
# Enables SemanticIntentRecognizer's HNSW-backed embedding search.
semantic = ["dep:ruvector-core"]
[dev-dependencies]
tokio = { version = "1", features = ["full", "test-util"] }