mirror of
https://github.com/ruvnet/RuView
synced 2026-08-01 19:01:42 +00:00
34eced880f
Pure conversion from our wire-format `MdnsService` to the
`mdns_sd::ServiceInfo` shape the responder daemon consumes. No
socket binding, no daemon registration yet — that lands next iter
as a `runtime::spawn_mdns_responder(info)` JoinHandle returning
helper, same shape as `runtime::spawn_publisher`.
* `MdnsService::to_service_info(hostname, ipv4) ->
Result<ServiceInfo, mdns_sd::Error>`
* `mdns-sd = "0.11"` added — aligned with the workspace pin from
wifi-densepose-desktop so the lockfile doesn't fork dalek-like
surfaces.
3 new tests:
* to_service_info_carries_service_type_and_port — locks that
`_ruview-ha._tcp` (with or without mdns-sd's trailing-dot
normalisation) and the control port round-trip through the
conversion
* to_service_info_propagates_txt_records — every locked TXT
key from iter 4 (cog_id, mqtt_port, privacy, proto, node_id,
cog_version) reachable via `get_property_val_str` on the
converted ServiceInfo
* to_service_info_does_not_silently_drop_caller_hostname —
locks the caller-side responsibility for the .local. suffix.
mdns-sd 0.11 accepts bare hostnames (verified empirically by
initial test expecting it to reject — it didn't), so the
wrapper layer must do the trailing-dot dance. Documenting
that via a named test catches future bumps where the lib
starts mutating the value.
63/63 cog tests green (60 → 63).
ADR-116 P4 now ⁶⁄₇: ✅ mDNS record-builder, ✅ chain, ✅ JSONL, ✅
file persistence, ✅ Ed25519 signing, ✅ ServiceInfo conversion;
⏳ daemon register + embedded broker.
Co-Authored-By: claude-flow <ruv@ruv.net>
51 lines
1.8 KiB
TOML
51 lines
1.8 KiB
TOML
[package]
|
|
name = "cog-ha-matter"
|
|
version.workspace = true
|
|
edition.workspace = true
|
|
authors.workspace = true
|
|
license.workspace = true
|
|
repository.workspace = true
|
|
description = "Cognitum Cog: Home Assistant + Matter integration for the Seed (ADR-116). Wraps ADR-115's HA-DISCO + HA-MIND publisher as a Seed-installable artifact with mDNS, embedded broker, RuVector-backed thresholds, and Ed25519 witness."
|
|
publish = false
|
|
|
|
[[bin]]
|
|
name = "cog-ha-matter"
|
|
path = "src/main.rs"
|
|
|
|
[lib]
|
|
name = "cog_ha_matter"
|
|
path = "src/lib.rs"
|
|
|
|
[dependencies]
|
|
# CLI + logging — same shape as cog-pose-estimation (ADR-101).
|
|
clap = { version = "4", features = ["derive"] }
|
|
serde = { version = "1", features = ["derive"] }
|
|
serde_json = "1"
|
|
thiserror = "1"
|
|
tracing = "0.1"
|
|
tracing-subscriber = { version = "0.3", features = ["env-filter", "json"] }
|
|
|
|
# Async runtime for the publisher + mDNS responder + WebSocket pump.
|
|
tokio = { workspace = true, features = ["full"] }
|
|
|
|
# ADR-115 publisher is the heart of this cog — we wrap it.
|
|
# default-features = false matches the sensing-server's pattern.
|
|
wifi-densepose-sensing-server = { version = "0.3.0", path = "../wifi-densepose-sensing-server", default-features = false, features = ["mqtt"] }
|
|
|
|
# Hardware crate for SyncPacket + NodeState bridging (ADR-110 substrate).
|
|
wifi-densepose-hardware = { version = "0.3.0", path = "../wifi-densepose-hardware" }
|
|
|
|
# Witness chain (ADR-116 P4): SHA-256 hash chain + Ed25519 signature
|
|
# layer for tamper-evident audit logs (ADR-116 §2.2). Same version
|
|
# already vetted by ruv-neural — keep them aligned.
|
|
sha2 = { workspace = true }
|
|
ed25519-dalek = "2.1"
|
|
|
|
# mDNS responder (ADR-116 P4 §2.2): pure-Rust zero-conf daemon.
|
|
# Same version pinned in wifi-densepose-desktop to keep the
|
|
# workspace lockfile narrow.
|
|
mdns-sd = "0.11"
|
|
|
|
[dev-dependencies]
|
|
tempfile = "3.10"
|