diff --git a/docs/implementation-plan.md b/docs/implementation-plan.md index 226ec76..0627804 100644 --- a/docs/implementation-plan.md +++ b/docs/implementation-plan.md @@ -283,13 +283,27 @@ a named invariant that the native runtime cannot protect yet. MPEG-TS byte stream from stdin and publishes rolling `mimir.cultmesh_media_frame` documents, and `recv` subscribes to those documents and writes ordered MPEG-TS bytes to a Starfire-local UDP endpoint - for compatibility sinks. + for compatibility sinks. Source audit: its C# implementation still uses older + `CultMesh.StartNodeAsync`/`CultMesh.ConnectClient` entrypoints; migrate the + bridge to CultLib's explicit C# RUDP helpers before treating it as fully + aligned with the daemon-swarm transport cut. - `scripts/start-raven-cultmesh-av-sender.ps1`, `scripts/start-yggdrasil-cultmesh-media-relay.ps1`, and `scripts/start-starfire-cultmesh-av-receiver.ps1` are the CultMesh bridge operators. Raven capture defaults to FFmpeg desktop frames plus Mimir's WASAPI loopback capture muxed as H.264/AAC MPEG-TS; DirectShow audio remains an explicit fallback. +- `src/Mimir.EveDashboard` is a CultMesh/Eve dashboard broker. It publishes + `mimir.eve_dashboard_state` through CultNet/CultMesh and can report + `idunn.daemon_health` over `cultnet.transport.rudp.v0` for itself and an + optional paired service daemon. The live direction is daemon-owned RUDP + publication for provider advertisement, retained state, command boundary, and + transport profile too; HTTP/WebSocket are client lowerings. This is a health + witness for Idunn, not a lifecycle owner. +- `src/Mimir.EveBrowserReference` serves static browser lowerings and can + publish its own `idunn.daemon_health` record over + `cultnet.transport.rudp.v0`. It remains a renderer/reference surface, not + program authority. - Documentation for OBS receiver setup, native rebuild boundaries, the viable stream app, and the Mimir Face. @@ -301,6 +315,16 @@ a named invariant that the native runtime cannot protect yet. because OBS is not a CultMesh consumer. Network transit between Raven, Yggdrasil, and Starfire is the CultMesh/CultNet path; OBS-local UDP is an egress adapter only. +- CultLib RUDP is the default typed CultNet/CultMesh document transport for + daemon truth. Idunn RUDP health publication is the current freshness witness; + provider advertisements, command boundaries, transport profiles, and retained + daemon state should follow the same path. Odin still owns Verse/service + discovery, Idunn owns keepalive decisions, and Mimir-owned dashboard/reference + surfaces only report their own observed state. TCP/HTTP/WebSocket stay + lowerings or compatibility evidence. +- `Mimir.CultMeshMedia` still needs an explicit RUDP transport cut. Do not add + another TCP bridge, HTTP status shim, or WebSocket-derived service truth while + the C# RUDP helpers exist. - Process-backed stream sources are only acceptable for network bridge feeds or diagnostics. Six-camera local ingest belongs behind direct capture drivers. - Frame-event process sources are diagnostic only. They prove source cadence and @@ -313,37 +337,40 @@ a named invariant that the native runtime cannot protect yet. 1. Replace the frame-event diagnostic bridge with concrete direct capture drivers for Leap stereo IR first, then the other cameras. -2. Feed those drivers into `MimirVideoCaptureDriverSource` and prove sustained +2. Cut `src/Mimir.CultMeshMedia` from older CultMesh node/client entrypoints to + explicit CultNet RUDP helpers, preferably authorized-peer dialing where the + peer catalog exists. Preserve OBS-local UDP as egress only. +3. Feed those drivers into `MimirVideoCaptureDriverSource` and prove sustained frame cadence in the rolling buffers. -3. Promote the packet-song physical calibration receipt into the runtime +4. Promote the packet-song physical calibration receipt into the runtime receiver. The live decoder should keep its ear open for self-identifying song contours, extract intra-call time/frequency anchors from log-mel parts, apply learned per-output/mic path weighting, and feed a global delay/clock/path hypothesis. Keep chirp-bin calibration artifacts as reference data, not the runtime target. -4. Add the synchronization actuator: drive a variable-rate resampler and +5. Add the synchronization actuator: drive a variable-rate resampler and fractional delay line per non-reference stream from the smoothed `MimirAudioSynchronizationState`. First, prove the bioacoustic motif decoder through real loopback and microphone paths so every correctly heard word becomes a deterministic timeline anchor before the actuator moves samples. -5. Prove the bioacoustic hybrid fallback through real loopback and microphones +6. Prove the bioacoustic hybrid fallback through real loopback and microphones with probe durations long enough to keep loopback and mic windows live. -6. Bind Fensalir UI to the synchronization hub so buffer depth, stream cadence, +7. Bind Fensalir UI to the synchronization hub so buffer depth, stream cadence, source timestamps, and output settings are visible and adjustable. -7. Implement the Mimir program scene graph as the shared commit primitive for +8. Implement the Mimir program scene graph as the shared commit primitive for source subscription, transforms, crop, chroma key, visibility, layer order, preview, and output publication. Import the current OBS scene only as an initial mirror, then make Eve GUI/TUI the operator surface. -8. Add the Yggdrasil-facing site publisher daemon that consumes the Mimir +9. Add the Yggdrasil-facing site publisher daemon that consumes the Mimir program output and publishes it without owning a second composition. -9. Lower `AquariumBufferFieldFrame` spline tube fields into Fensalir compute: +10. Lower `AquariumBufferFieldFrame` spline tube fields into Fensalir compute: sample buffer-domain paths stochastically by visual contribution, emit SDF splat probes, write them into the spatiotemporal splat reservoir, and sample that reservoir in the temporally antialiased scene pass. The direct spline preview must stay a witness until this path owns rendering. -10. Move GPU feature extraction, fusion, material fitting, render budgeting, and +11. Move GPU feature extraction, fusion, material fitting, render budgeting, and Spout2 publication into Fensalir. -11. Move mic alignment, room suppression, voice separation, spatialization, and +12. Move mic alignment, room suppression, voice separation, spatialization, and stem generation into Faust/native DSP. -12. Keep the OBS bridge witness ledger as evidence before expanding receiver +13. Keep the OBS bridge witness ledger as evidence before expanding receiver machinery. diff --git a/notes/current-system-map.md b/notes/current-system-map.md index 0aedb80..8c4ed75 100644 --- a/notes/current-system-map.md +++ b/notes/current-system-map.md @@ -53,6 +53,11 @@ Ownership: Fensalir-facing wand pose stream. - Mimir owns program composition, source subscription policy, preview/control state, stats, and publication intent. +- Mimir-owned Eve dashboard and browser reference processes publish their own + typed health/freshness to Idunn over RUDP when configured. Their intended + daemon-owned provider state, command boundaries, and transport profiles also + belong on CultNet/RUDP; HTTP/WebSocket are client lowerings and compatibility + evidence, not daemon truth. - Fensalir owns dense visual fusion, material/brush/splat reconciliation, D3D12 interop, runtime UI lowering, and local program texture output. - Faust/native DSP owns hot audio alignment, suppression, separation, @@ -252,6 +257,14 @@ video archive. Yggdrasil relays CultNet reliable UDP over the WireGuard mesh. Starfire lowers the subscribed stream to local UDP for compatibility sinks because OBS is not a CultMesh runtime. +Source audit correction: the desired transport is explicit CultNet RUDP, and +CultLib now provides C# `CultMesh.CreateRudpServer`, +`CultMesh.CreateRudpClient`, and authorized-peer helper APIs. The current +`Mimir.CultMeshMedia` source still uses older `CultMesh.StartNodeAsync` and +`CultMesh.ConnectClient` entrypoints. Treat that as migration debt: the bridge +should be cut to explicit RUDP helpers before it is considered aligned with the +daemon-swarm transport doctrine. + Current deployment: Yggdrasil runs the relay from `/opt/gamecult/mimir-cultmesh-media/Mimir.CultMeshMedia` with cache `/var/lib/gamecult/mimir/cultmesh-media.cc` and log @@ -264,6 +277,46 @@ Raven SSH over WireGuard timed out during the initial deployment pass, so the Raven sender still needs to be launched on Raven directly with `scripts/start-raven-cultmesh-av-sender.ps1`. +## Daemon Health And Idunn + +Odin owns the accepted Verse/service map. Idunn owns continuity after a daemon +is known: boot recovery, crash recovery, deployment freshness, stale-health +watching, restart/deploy intent, and operator escalation. Mimir does not run a +private lifecycle supervisor for these surfaces. + +CultLib's current direction is RUDP everywhere for typed CultNet/CultMesh +documents across runtimes. That means health, provider advertisements, command +boundaries, transport profiles, and selected program/media document lanes should +default to `cultnet.transport.rudp.v0`. TCP, HTTP, and WebSocket are acceptable +as renderer/client lowerings, debug tools, or migration debt; they must not own +daemon truth once an RUDP contract exists. + +Mimir's current daemon-health publishers are local RUDP witnesses: + +- `src/Mimir.EveDashboard` publishes `mimir.eve_dashboard_state` through + CultNet/CultMesh and, when `--idunn-rudp-health` or + `MIMIR_EVE_DASHBOARD_IDUNN_RUDP_HEALTH` is set, sends + `idunn.daemon_health` records tagged `cultnet.transport.rudp.v0` for the + dashboard broker and optionally a paired service daemon. The next daemon + boundary work is to publish its provider advertisement, retained state, + command boundary, and transport profile as typed RUDP records so Odin can + prefer those over compatibility HTTP catalog ingestion. +- `src/Mimir.EveBrowserReference` serves a static browser lowering and, when + configured with `--idunn-rudp-health` or + `MIMIR_EVE_BROWSER_REFERENCE_IDUNN_RUDP_HEALTH`, sends its own + `idunn.daemon_health` record over the same RUDP document path. + +Invariant: health publication is not ownership. The daemon reports what it can +honestly observe about itself; Idunn decides keepalive action through the +shared typed record path. + +Source audit debt: `Mimir.EveSensorReceiver`, `Mimir.VerseRecorder`, and the +browser/dashboard WebSocket paths are still renderer/client lowerings. They may +remain as lowering adapters, but any provider catalog, retained service state, +command boundary, transport profile, or lifecycle health claim must be +published as typed CultNet/RUDP records instead of being inferred from those +TCP/WebSocket surfaces. + ## Audio Field The six-microphone path is separate from the bridge. Scarlett speaker loopback diff --git a/notes/fresh-workspace-handoff.md b/notes/fresh-workspace-handoff.md index 71c4569..5982226 100644 --- a/notes/fresh-workspace-handoff.md +++ b/notes/fresh-workspace-handoff.md @@ -25,7 +25,19 @@ Get-Content .\state\evidence.jsonl -Tail 8 - V1 now also has an explicit CultMesh media bridge for Raven program feeds: `src/Mimir.CultMeshMedia` sends rolling `mimir.cultmesh_media_frame` documents over CultNet reliable UDP through Yggdrasil and lowers them on - Starfire to local MPEG-TS UDP for OBS. + Starfire to local MPEG-TS UDP for OBS. Source audit warning: the current C# + bridge still uses older `CultMesh.StartNodeAsync`/`CultMesh.ConnectClient`; + migrate it to explicit C# RUDP helpers before treating the media bridge as + fully aligned with the swarm transport cut. +- CultLib has moved the daemon-swarm direction to CultNet over RUDP across + runtimes. Mimir's typed daemon truth should default to + `cultnet.transport.rudp.v0`; TCP/HTTP/WebSocket are client lowerings, + compatibility probes, or migration debt unless a specific runtime has not + earned RUDP yet. +- Mimir has daemon-health publication edges into the Odin/Idunn swarm: + `src/Mimir.EveDashboard` and `src/Mimir.EveBrowserReference` publish + `idunn.daemon_health` records over `cultnet.transport.rudp.v0` when + configured. These are self-health witnesses, not lifecycle owners. - The live stream app is C# plus Fensalir: `Mimir.slnx` contains `src/Mimir.App` and `src/Mimir.Runtime`. - `src/Mimir.App` hosts Fensalir as the windowing/rendering/D3D12 bridge. @@ -85,6 +97,15 @@ Get-Content .\state\evidence.jsonl -Tail 8 `Raven Monitor + Realtek` has been repointed from old SRT to that local UDP endpoint. Raven SSH timed out, so launch `scripts/start-raven-cultmesh-av-sender.ps1` on Raven directly. +- Keep Eve dashboard/browser-reference RUDP health aligned with Odin/Idunn: + Odin accepts the Verse/service map, Idunn owns daemon continuity, and Mimir + processes publish typed health/freshness only for themselves. The next + dashboard boundary cut is provider advertisement, retained state, + command_boundary, and transport_profile over RUDP so HTTP/WebSocket catalog + ingestion can be demoted to client/debug lowering. +- Cut `Mimir.CultMeshMedia` to explicit CultNet RUDP helpers next; no new TCP, + HTTP, or WebSocket surface should be allowed to become daemon or transport + truth. - Kiyo Pro has two UVC extension units. Moving it to a motherboard USB3 port changed the descriptor path to `root_hub30` / `bcdUSB=0x0320` and exposed 720p/1080p YUY2/MJPG/H264/NV12 at 60 fps, but Windows still reports diff --git a/state/evidence.jsonl b/state/evidence.jsonl index fc13f1c..6ea427a 100644 --- a/state/evidence.jsonl +++ b/state/evidence.jsonl @@ -139,3 +139,6 @@ {"ts": "2026-06-12T15:05:00+01:00", "type": "correction", "status": "ok", "note": "Updated the Move calibration preflight witness from Periwinkle to the USB-connected Quest headset plus left/right controllers. ADB sees serial 1WMHHB68PG1515 but reports unauthorized, so headset-side USB debugging approval is required before Quest pose capture can become live evidence. The protocol treats Quest poses as an optional external VR reference frame around the Move, not as a Mimir fusion owner."} {"ts":"2026-06-12T15:17:22.2571251+01:00","type":"verification","status":"ok","note":"Quest USB access is now authorized for calibration preflight: adb devices -l reports serial 1WMHHB68PG1515 as Quest_2/hollywood. Added and ran --quest-usb-preflight-smoke, which wrote mimir.quest_usb_preflight.v1 with poseCaptureStatus=usb-authorized-no-pose-bridge-yet. ADB access proves USB/device identity only; headset/controller pose samples still require a Quest/OpenXR witness bridge before Mimir can use Quest as external calibration evidence."} {"ts":"2026-06-12T16:05:00+01:00","type":"correction","status":"ok","note":"Moved Quest access ownership out of Mimir and under Odin/Muninn. Mimir's local mimir.quest_usb_preflight path was deleted; Mimir now treats muninn.quest_access.v1 and later muninn.quest_pose_frame.v1 as input evidence. Brokkr owns Unity editor routing for Quest input/pose consumption and warp-corrected Unity play-mode video toward Muninn's Quest video input surface."} +{"ts":"2026-06-16T00:00:00+01:00","type":"correction","status":"ok","note":"Reoriented Mimir's daemon-swarm map after Odin/CultLib RUDP work: Raven media body transport remains src/Mimir.CultMeshMedia over CultNet/CultMesh reliable UDP with OBS-local UDP as egress only, while Eve dashboard/browser reference health now publishes idunn.daemon_health over cultnet.transport.rudp.v0 as self-witness state. Odin owns accepted Verse/service discovery and Idunn owns keepalive decisions; Mimir health publishers do not own lifecycle."} +{"ts":"2026-06-16T00:05:00+01:00","type":"correction","status":"ok","note":"Corrected the transport model: CultLib has added authorized RUDP helpers across runtimes and Odin/Idunn now treats daemon truth as typed CultCache/CultMesh state carried over cultnet.transport.rudp.v0. Mimir should not assume TCP is needed for any daemon-truth path once the runtime has RUDP support; HTTP/WebSocket/TCP are client lowerings, compatibility probes, or migration debt. Health is separate from media by authority, not because it needs a separate TCP transport."} +{"ts":"2026-06-16T00:12:00+01:00","type":"correction","status":"ok","note":"Source audit found Mimir.CultMeshMedia still using older C# CultMesh.StartNodeAsync/CultMesh.ConnectClient entrypoints while CultLib now exposes C# CultMesh.CreateRudpServer/CreateRudpClient/CreateRudpClientForAuthorizedPeer. Updated maps to treat the media bridge's current transport path as migration debt: typed program/media documents should move to explicit CultNet RUDP helpers, with OBS-local UDP preserved only as compatibility egress."} diff --git a/state/map.yaml b/state/map.yaml index 38460ce..89ccbb1 100644 --- a/state/map.yaml +++ b/state/map.yaml @@ -40,6 +40,18 @@ constraints: - CultMesh/CultNet is the default Raven-to-Starfire media transit. OBS may consume a Starfire-local UDP MPEG-TS egress as a compatibility sink, but Mimir owns program selection, composition, preview/control, and publication. + - CultLib is moving every runtime's typed CultNet/CultMesh document transport + to `cultnet.transport.rudp.v0`. Health, provider advertisements, command + boundaries, transport profiles, and program/media document lanes should use + RUDP by default. TCP/HTTP/WebSocket surfaces are renderer lowerings, + compatibility probes, or migration debt unless a specific runtime has not + earned its RUDP path yet. + - Daemon health and freshness are separate in authority from media transport, + not separate because they need TCP. Mimir-facing Eve dashboards and browser + reference lowerers publish `idunn.daemon_health` records over + `cultnet.transport.rudp.v0` for Idunn. Idunn owns continuity once Odin has + accepted a daemon; Mimir-owned surfaces only publish their own health + witnesses. - Mimir explicitly trades latency and memory for throughput and field quality: the default five-second buffer is compute budget for stream alignment, GPU/audio analysis, and volumetric sound-field extraction. @@ -371,7 +383,23 @@ accepted_design: `mimir.cultmesh_media_frame` documents over CultNet reliable UDP, Yggdrasil relays them on `10.77.0.1:3075`, and Starfire lowers the subscribed stream to `udp://127.0.0.1:5200` for the OBS source - `Raven Monitor + Realtek`. + `Raven Monitor + Realtek`. Source audit warning: the current C# bridge + still calls older `CultMesh.StartNodeAsync`/`CultMesh.ConnectClient` + entrypoints; now that CultLib exposes C# RUDP facade helpers, the next + transport cut should move this bridge onto explicit RUDP server/client or + authorized-peer helpers and demote any TCP-like node/client path to + compatibility evidence. + - `src/Mimir.EveDashboard` publishes `mimir.eve_dashboard_state` through + CultNet/CultMesh and can push `idunn.daemon_health` records over + `cultnet.transport.rudp.v0` for itself and a paired service daemon. Its + intended daemon shape is to publish provider advertisement, retained state, + command boundary, and transport profile over RUDP as typed records; HTTP and + WebSocket remain client lowerings. It owns Eve surface publication and + dashboard broker health only; it does not own daemon lifecycle. + - `src/Mimir.EveBrowserReference` serves a static Eve/browser lowering and + can publish its own `idunn.daemon_health` record over + `cultnet.transport.rudp.v0`. It is a renderer/reference health witness, not + an authority over Mimir program state or Idunn keepalive decisions. - `research/perfect-machine-study-2026-05-23/` preserves the architecture rumination, optimization ledger, research references, source/hotspot audits, Fensalir/native boundary maps, benchmark plan, calibration-session spec, @@ -400,6 +428,14 @@ active_subgoals: replaces them. - Launch Raven's CultMesh sender directly on Raven because SSH to Raven over WireGuard timed out during the initial relay deployment pass. + - Keep Mimir Eve dashboard and browser reference health publication aligned + with Odin/Idunn doctrine: Odin accepts Verse/service visibility, Idunn owns + keepalive, and Mimir surfaces publish typed RUDP self-health rather than + private watchdog loops or TCP/HTTP status truth. + - Cut remaining older CultMesh node/client transport assumptions in + `src/Mimir.CultMeshMedia`, `src/Mimir.EveDashboard`, and witness tooling: + daemon truth and typed program/media document paths should use explicit + CultNet RUDP helpers; HTTP/WebSocket remain render/client lowerings only. current_status: summary: >