Add Mimir Move proof surface
This commit is contained in:
parent
7e2d35ad59
commit
a040792a1c
7 changed files with 631 additions and 121 deletions
|
|
@ -52,6 +52,12 @@ a named invariant that the native runtime cannot protect yet.
|
|||
- The realtime Move witness path uses CultMesh streaming, not CultCache polling:
|
||||
Muninn publishes shared-memory stream frames, Mimir consumes the latest read
|
||||
lease, normalizes the frame, and admits it to native `move_evidence`.
|
||||
- `MimirMuninnMoveEvidenceAdapter.TryAdmitLatestCultMeshFrame` now exposes a
|
||||
typed admission receipt for that latest read: decoded frame id, producer,
|
||||
publish/read timestamps, sample counts by kind, source/arrival ranges, native
|
||||
reservoir handle, and reservoir edge/window. `Mimir.BufferSmoke
|
||||
--muninn-move-cultmesh-stream-smoke` asserts the receipt so the named proof
|
||||
spine can be traced instead of inferred.
|
||||
- `mimir.move_controller_pose.v1` is Mimir's resolved wand pose contract.
|
||||
Mimir owns calibration, association, triangulation, IMU fusion, prediction,
|
||||
confidence, and latency accounting for those poses before Fensalir consumes
|
||||
|
|
@ -67,6 +73,15 @@ a named invariant that the native runtime cannot protect yet.
|
|||
`mimir.move_controller_pose_stream_frame.v1` over CultMesh shared-memory
|
||||
bytes streams so Fensalir and other consumers have a realtime stream contract
|
||||
for Mimir-fused controller input.
|
||||
- `MimirMoveProofSurface` is the observer-only dev proof surface for the named
|
||||
Move chain. It combines a Muninn evidence admission receipt with a Mimir pose
|
||||
stream frame and a Fensalir presentation/probe timestamp into
|
||||
`mimir.move_proof_surface.v1`, then lowers the verdict to a Fensalir
|
||||
`AquariumSplineFrame` probe. `Mimir.BufferSmoke --move-proof-surface-smoke`
|
||||
proves the explicit
|
||||
`muninn:nightwing:move-evidence:79 -> mimir:starfire:move-evidence:79 ->
|
||||
mimir:starfire:move-pose:79 -> fensalir:starfire:presented-frame:79` chain,
|
||||
and rejects single-ray fallback as not full pose.
|
||||
- `MimirMoveCalibrationProtocol` publishes the typed calibration preflight for
|
||||
Starfire/Nightwing Moves: required Muninn evidence streams, optional
|
||||
Quest headset/controller pose witnesses, stillness/sweep/validation phases, and
|
||||
|
|
@ -75,13 +90,12 @@ a named invariant that the native runtime cannot protect yet.
|
|||
- Muninn publishes Quest access as `muninn.quest_access.v1` for the USB-attached
|
||||
Quest. Mimir consumes that access surface and later `muninn.quest_pose_frame.v1`
|
||||
samples as optional calibration evidence; Mimir does not own ADB/Quest access.
|
||||
- `scripts/start-nightwing-move-tracking.ps1` is the narrow live Nightwing
|
||||
bring-up path: it starts the `/eve/periwinkle` receiver/recorder on Starfire,
|
||||
stages the Nightwing Eye/Move Python worker, keeps a heartbeat for field
|
||||
liveness, and publishes `mimir.psmove_light_state.v1` plus
|
||||
`mimir.move_controller_observation_state.v1` blob observations from both PS3
|
||||
Eyes. The blob stream is optical witness evidence for later pose fusion, not
|
||||
the final 6DoF pose owner.
|
||||
- The old `scripts/start-nightwing-move-tracking.ps1` bring-up path is
|
||||
archived. It no longer starts a receiver/recorder pair or stages a socket
|
||||
witness worker. Nightwing Eye/Move evidence must enter through Muninn/Mimir
|
||||
typed CultMesh stream frames and Odin-discovered CultMesh documents. The blob
|
||||
stream remains optical witness evidence for later pose fusion, not the final
|
||||
6DoF pose owner.
|
||||
- Structured PS Move light pulses are Muninn output commands. Mimir publishes
|
||||
`muninn.move_light_command.v1` over CultNet/CultMesh to the Muninn daemon on
|
||||
the host that owns the USB-attached Move. Muninn writes PS Move HID report
|
||||
|
|
@ -95,6 +109,17 @@ a named invariant that the native runtime cannot protect yet.
|
|||
streams; it does not own raw optical extraction. Final pose, stereo
|
||||
triangulation, calibration, association, IMU fusion, and prediction belong to
|
||||
Mimir.
|
||||
- Muninn's Move evidence stream frame no longer hardcodes an empty optical
|
||||
candidate slice. The daemon frame uses the canonical
|
||||
`muninn.move_marker_candidate.v1` record shape, and the Odin unit
|
||||
`move_marker_candidates_publish_in_mimir_compatible_cultmesh_frame` proves a
|
||||
bright Y8 frame can pass through `muninn-move-tracker` and serialize as a
|
||||
non-empty marker candidate beside controller evidence. The daemon now has a
|
||||
source-local Y8 extraction/publish seam and a first `serve` camera producer:
|
||||
`--move-marker-camera <camera-id>=<device-path>` polls a Unix V4L2 YUYV frame,
|
||||
converts it to compact Y8, and feeds that same seam. Unit tests prove the
|
||||
configured camera tick publishes marker evidence through the shared frame
|
||||
contract; Nightwing hardware/live V4L2 proof is still pending.
|
||||
- `MimirProcessStreamSource` for bridge/network command edges.
|
||||
- `MimirFrameEventProcessStreamSource` for temporary JSON-line frame metadata
|
||||
from native probes into the same rolling buffers Fensalir inspects. One probe
|
||||
|
|
@ -284,22 +309,31 @@ a named invariant that the native runtime cannot protect yet.
|
|||
`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. Its C# implementation now uses explicit CultLib
|
||||
RUDP client/session helpers; the older
|
||||
RUDP client/session helpers behind
|
||||
`cultmesh://asgard.yggdrasil.mimir/media/raven-primary-av`; the older
|
||||
`CultMesh.StartNodeAsync`/`CultMesh.ConnectClient` entrypoints no longer own
|
||||
the media transport lane.
|
||||
the media transport lane, and sender/receiver launchers no longer accept raw
|
||||
relay host/port configuration.
|
||||
- `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.
|
||||
operators. `start-raven-cultmesh-av-sender.ps1` is the Mimir-owned
|
||||
`Mimir.CultMeshMedia` bootstrap/body-bridge lane; it is not the real Muninn
|
||||
OBS/SRT feed owner. The actual Raven OBS/plugin feed now routes through
|
||||
Odin's Muninn actuator `E:\Projects\Odin\scripts\activate-muninn-raven-av-srt.ps1`,
|
||||
with `scripts/start-raven-muninn-obs-feed.ps1` in this repo as a thin local
|
||||
wrapper around the real `GameCult-Muninn-Activate` task and
|
||||
`muninn.exe activate` body. `-LocalBootstrap` on the CultMesh sender remains
|
||||
a direct local bootstrap edge only for the separate body-bridge lane. Raven
|
||||
capture still 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 archived until the dashboard returns as a pure
|
||||
CultMesh/Odin publisher and Eve lowering. The old HTTP/WebSocket deck broker,
|
||||
local health route, socket command channel, and provider route catalog are not
|
||||
daemon transport. Dashboard state must be published as typed CultMesh/Eve
|
||||
documents through Odin, and dashboard commands must arrive as typed Odin/
|
||||
CultMesh command documents.
|
||||
- `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
|
||||
|
|
@ -313,17 +347,17 @@ a named invariant that the native runtime cannot protect yet.
|
|||
testing, but Mimir/Eve owns independent controls.
|
||||
- The CultMesh media bridge still lowers to local UDP for compatibility sinks
|
||||
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.
|
||||
Yggdrasil, and Starfire is the Odin-discovered 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.
|
||||
surfaces only report their own observed state. Product/debug render surfaces
|
||||
stay lowerings or compatibility evidence.
|
||||
- `Mimir.CultMeshMedia` has completed its explicit RUDP transport cut. Do not
|
||||
add another TCP bridge, HTTP status shim, or WebSocket-derived service truth
|
||||
add another private bridge, status shim, or renderer-derived service truth
|
||||
while the RUDP document lane exists.
|
||||
- Process-backed stream sources are only acceptable for network bridge feeds or
|
||||
diagnostics. Six-camera local ingest belongs behind direct capture drivers.
|
||||
|
|
@ -337,8 +371,8 @@ 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. Cut the remaining dashboard, recorder, and witness service truth paths from
|
||||
older TCP/WebSocket-derived assumptions to explicit CultNet RUDP records,
|
||||
2. Cut the remaining dashboard service truth paths from older renderer-derived
|
||||
assumptions to explicit CultNet RUDP records,
|
||||
preferably authorized-peer dialing where the peer catalog exists. Preserve
|
||||
OBS-local UDP as egress only for compatibility sinks.
|
||||
3. Feed those drivers into `MimirVideoCaptureDriverSource` and prove sustained
|
||||
|
|
@ -356,22 +390,26 @@ a named invariant that the native runtime cannot protect yet.
|
|||
becomes a deterministic timeline anchor before the actuator moves samples.
|
||||
6. Prove the bioacoustic hybrid fallback through real loopback and microphones
|
||||
with probe durations long enough to keep loopback and mic windows live.
|
||||
7. Bind Fensalir UI to the synchronization hub so buffer depth, stream cadence,
|
||||
7. Attach the Move proof surface to the live runtime/Fensalir presentation path:
|
||||
ingest real Muninn Nightwing and Starfire evidence, require calibrated
|
||||
optical witnesses, publish `mimir:starfire:move-pose:<sequence>`, and capture
|
||||
a presented Fensalir frame/probe for the same sequence.
|
||||
8. Bind Fensalir UI to the synchronization hub so buffer depth, stream cadence,
|
||||
source timestamps, and output settings are visible and adjustable.
|
||||
8. Implement the Mimir program scene graph as the shared commit primitive for
|
||||
9. 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.
|
||||
9. Add the Yggdrasil-facing site publisher daemon that consumes the Mimir
|
||||
10. Add the Yggdrasil-facing site publisher daemon that consumes the Mimir
|
||||
program output and publishes it without owning a second composition.
|
||||
10. Lower `AquariumBufferFieldFrame` spline tube fields into Fensalir compute:
|
||||
11. 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.
|
||||
11. Move GPU feature extraction, fusion, material fitting, render budgeting, and
|
||||
12. Move GPU feature extraction, fusion, material fitting, render budgeting, and
|
||||
Spout2 publication into Fensalir.
|
||||
12. Move mic alignment, room suppression, voice separation, spatialization, and
|
||||
13. Move mic alignment, room suppression, voice separation, spatialization, and
|
||||
stem generation into Faust/native DSP.
|
||||
13. Keep the OBS bridge witness ledger as evidence before expanding receiver
|
||||
14. Keep the OBS bridge witness ledger as evidence before expanding receiver
|
||||
machinery.
|
||||
|
|
|
|||
|
|
@ -53,11 +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.
|
||||
- Mimir's old Eve dashboard broker is archived; it does not publish health,
|
||||
provider catalogs, or command surfaces while the socket path is cut. The
|
||||
browser reference remains a client lowering, not daemon truth. Dashboard state
|
||||
must return as typed CultMesh/Eve documents through Odin; product/debug render
|
||||
surfaces 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,
|
||||
|
|
@ -161,17 +161,13 @@ reported authorized Quest 2 device `1WMHHB68PG1515` with product/device
|
|||
provide Quest headset/controller poses until a Quest/OpenXR witness bridge
|
||||
publishes those pose samples through Muninn.
|
||||
|
||||
Live Nightwing bring-up uses `scripts/start-nightwing-move-tracking.ps1`.
|
||||
Starfire starts `Mimir.EveSensorReceiver` on `/eve/periwinkle`, stages
|
||||
`nw_eye_cap.py`, `nw_move_hint.py`, and `nightwing_typed_witness_publisher.py`
|
||||
onto Nightwing, and launches the publisher with `--track-eyes` plus a heartbeat
|
||||
freshness file. The publisher can still accept
|
||||
`--move-light name=/dev/hidrawN:#rrggbb` as an explicit smoke/bootstrap edge,
|
||||
but runtime structured light commands belong to Muninn. The worker publishes
|
||||
compact
|
||||
`mimir.move_controller_observation_state.v1` blob observations from both PS3
|
||||
Eyes. Those Eye/Move observations are the live optical witness feeding the later
|
||||
pose/fusion owner; they are not themselves the final 6DoF pose authority.
|
||||
The old Nightwing bring-up path is archived:
|
||||
`scripts/start-nightwing-move-tracking.ps1`, `Mimir.EveSensorReceiver`,
|
||||
`Mimir.VerseRecorder`, and `nightwing_typed_witness_publisher.py` now fail
|
||||
closed. Runtime structured light commands belong to Muninn. Eye/Move
|
||||
observations must enter through typed CultMesh stream frames or
|
||||
Odin-discovered CultMesh documents; they are optical witness evidence for the
|
||||
later pose/fusion owner, not the final 6DoF pose authority.
|
||||
|
||||
Starfire-local Move illumination smoke uses `scripts/start-starfire-move-light.ps1`.
|
||||
That launcher runs `Mimir.PsMoveProbe` against the local Windows HID col01
|
||||
|
|
@ -193,6 +189,24 @@ those Muninn candidate streams into tracking buffers; it does not own raw
|
|||
optical extraction. Mimir is now the explicit owner for stereo triangulation,
|
||||
camera calibration, controller association, IMU fusion, prediction, and final
|
||||
6DoF wand pose.
|
||||
Muninn's `muninn:nightwing:move-evidence:<sequence>` shared-memory frame now
|
||||
uses the canonical `muninn.move_marker_candidate.v1` document shape for optical
|
||||
markers instead of a placeholder empty slice. A daemon unit proves that a bright
|
||||
Y8 frame run through `muninn-move-tracker` serializes a non-empty marker
|
||||
candidate into the Mimir-compatible evidence frame. The daemon now has a
|
||||
source-local Y8 extraction/publish seam plus a first `serve` camera producer:
|
||||
`--move-marker-camera <camera-id>=<device-path>` polls a Unix V4L2 YUYV frame,
|
||||
converts it to compact Y8, and feeds that same seam. Windows unit tests prove
|
||||
the configured camera tick publishes marker evidence through the shared frame
|
||||
contract; Nightwing hardware/live V4L2 proof is still pending.
|
||||
`MimirMoveProofSurface` is the first Fensalir-visible proof surface for this
|
||||
chain. It consumes the Mimir admission receipt and the Mimir-owned pose stream
|
||||
frame, emits `mimir.move_proof_surface.v1`, and lowers an observer-only
|
||||
`AquariumSplineFrame` probe with the explicit
|
||||
`muninn:nightwing:move-evidence:<sequence> -> mimir:starfire:move-evidence:<sequence> -> mimir:starfire:move-pose:<sequence> -> fensalir:starfire:presented-frame:<sequence>`
|
||||
chain. It does not decide pose. Single-ray fallback remains a visible
|
||||
non-final verdict until calibrated multi-camera optical evidence earns full
|
||||
pose.
|
||||
|
||||
## Program Composition
|
||||
|
||||
|
|
@ -239,7 +253,7 @@ not become the synchronized program authority.
|
|||
flowchart TD
|
||||
A["Raven FFmpeg desktop + WASAPI loopback mux"] --> B["Mimir.CultMeshMedia send"]
|
||||
B --> C["CultNet reliable UDP media-frame documents"]
|
||||
C --> D["Yggdrasil CultMesh relay on 10.77.0.1:3075"]
|
||||
C --> D["Yggdrasil CultMesh relay discovered through Odin/CultMesh"]
|
||||
D --> E["Starfire Mimir.CultMeshMedia recv"]
|
||||
E --> F["local MPEG-TS UDP udp://127.0.0.1:5200"]
|
||||
F --> G["OBS Raven Monitor + Realtek"]
|
||||
|
|
@ -253,9 +267,10 @@ mature.
|
|||
|
||||
Invariant: Raven media body state is live and bounded. Sender writes rolling
|
||||
`mimir.cultmesh_media_frame` slot documents rather than an unbounded durable
|
||||
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.
|
||||
video archive. Yggdrasil relays CultNet reliable UDP behind the logical
|
||||
`cultmesh://asgard.yggdrasil.mimir/media/raven-primary-av` route discovered
|
||||
through Odin/CultMesh. Starfire lowers the subscribed stream to local UDP for
|
||||
compatibility sinks because OBS is not a CultMesh runtime.
|
||||
|
||||
Source audit correction resolved: `Mimir.CultMeshMedia` now uses explicit
|
||||
CultLib RUDP helpers for the sender/receiver and a relay-owned RUDP
|
||||
|
|
@ -267,14 +282,21 @@ for inspection; live network transit is the RUDP schema-document path.
|
|||
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
|
||||
`/var/log/gamecult/mimir-cultmesh-media.log`. Starfire runs the receiver from
|
||||
`artifacts/mimir-cultmesh-media-win-x64-selfcontained/Mimir.CultMeshMedia.exe`
|
||||
and writes `raven-primary-av` to `udp://127.0.0.1:5200`. OBS source
|
||||
`Raven Monitor + Realtek` points at that local UDP endpoint.
|
||||
`/var/log/gamecult/mimir-cultmesh-media.log`. Senders and receivers target
|
||||
`cultmesh://asgard.yggdrasil.mimir/media/raven-primary-av`; concrete RUDP
|
||||
bootstrap lives in the CultMesh resolver environment, not in daemon launch
|
||||
arguments. Starfire writes `raven-primary-av` to `udp://127.0.0.1:5200`. OBS
|
||||
source `Raven Monitor + Realtek` points at that local UDP endpoint.
|
||||
|
||||
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`.
|
||||
`scripts/start-raven-cultmesh-av-sender.ps1` is the Mimir-owned CultMesh bridge
|
||||
bootstrap for Raven media-body transit. It is not the actual Muninn OBS feed
|
||||
owner. The real Raven OBS/SRT feed owner is Odin's Muninn:
|
||||
`E:\Projects\Odin\scripts\activate-muninn-raven-av-srt.ps1` drives the
|
||||
existing `GameCult-Muninn-Activate` hidden task and `muninn.exe activate`
|
||||
body on Raven, and `scripts/start-raven-muninn-obs-feed.ps1` in this repo is
|
||||
the thin local wrapper for that actuator. Keep `-LocalBootstrap` on the
|
||||
CultMesh sender only as a staging/bootstrap edge when the separate body-bridge
|
||||
lane needs direct local proof.
|
||||
|
||||
## Daemon Health And Idunn
|
||||
|
||||
|
|
@ -286,20 +308,16 @@ 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.
|
||||
default to `cultnet.transport.rudp.v0`. Product/debug render surfaces are
|
||||
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.EveDashboard` is a fail-closed archive tombstone. It no longer
|
||||
starts a TCP listener, serves `/eve/deck`, accepts WebSocket commands, or
|
||||
publishes daemon health. `mimir.eve_dashboard_state` must return through Odin/
|
||||
CultMesh state publication before this service can be redeployed.
|
||||
- `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
|
||||
|
|
@ -309,13 +327,12 @@ 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. The media-frame bridge is already on that side of the
|
||||
line.
|
||||
Source audit cut: `Mimir.EveSensorReceiver`, `Mimir.VerseRecorder`, the
|
||||
Nightwing typed witness publisher, and `start-nightwing-move-tracking.ps1` are
|
||||
archived. The old Nightwing/EVE witness lane no longer opens a renderer/client
|
||||
subscription surface. Witness publication and recording must use typed
|
||||
CultMesh/CultNet documents or CultMesh stream frames discovered through Odin.
|
||||
The media-frame bridge is already on that side of the line.
|
||||
|
||||
## Audio Field
|
||||
|
||||
|
|
|
|||
|
|
@ -135,6 +135,11 @@ if (args.Any(arg => string.Equals(arg, "--move-fusion-smoke", StringComparison.O
|
|||
return RunMoveFusionSmoke();
|
||||
}
|
||||
|
||||
if (args.Any(arg => string.Equals(arg, "--move-proof-surface-smoke", StringComparison.OrdinalIgnoreCase)))
|
||||
{
|
||||
return RunMoveProofSurfaceSmoke();
|
||||
}
|
||||
|
||||
if (args.Any(arg => string.Equals(arg, "--move-calibration-protocol-smoke", StringComparison.OrdinalIgnoreCase)))
|
||||
{
|
||||
return await RunMoveCalibrationProtocolSmokeAsync(
|
||||
|
|
@ -1911,19 +1916,32 @@ static int RunMuninnMoveCultMeshStreamSmoke(string nativeReservoirPath)
|
|||
"mimir:muninn-move-cultmesh-stream-smoke",
|
||||
"mimir-move-stage-calibration-v1",
|
||||
"mimir-stage-space",
|
||||
out var handle,
|
||||
out var sampleCount);
|
||||
out var admission);
|
||||
var status = runtime.Status;
|
||||
var latest = catalog.LatestFrame(streamId);
|
||||
var sampleCount = admission?.SampleCount ?? 0;
|
||||
var handle = admission?.Handle ?? default;
|
||||
|
||||
Console.WriteLine(
|
||||
$"muninn-move-cultmesh-stream-smoke stream={streamId} bytes={payload.Length} publishedSeq={published.Sequence} latestSeq={latest?.Sequence.ToString() ?? "none"} samples={sampleCount} payload=0x{handle.PayloadHandle:X} total={status.TotalSampleCount} moveEvidence={status.MoveEvidenceCount} edgeNs={status.EdgeNs}");
|
||||
$"muninn-move-cultmesh-stream-smoke stream={streamId} frame={admission?.FrameId ?? "none"} producer={admission?.ProducerPeerId ?? "none"} publishedNs={admission?.PublishedAtNs ?? 0} readNs={admission?.MimirReadAtNs ?? 0} bytes={payload.Length} publishedSeq={published.Sequence} latestSeq={latest?.Sequence.ToString() ?? "none"} samples={sampleCount} optical={admission?.OpticalMarkerCount ?? 0} controller={admission?.ControllerStateCount ?? 0} sourceMinNs={admission?.SourceTimeMinNs ?? 0} sourceMaxNs={admission?.SourceTimeMaxNs ?? 0} payload=0x{handle.PayloadHandle:X} reservoirEdgeNs={admission?.ReservoirEdgeNs ?? 0} reservoirWindowStartNs={admission?.ReservoirWindowStartNs ?? 0} total={status.TotalSampleCount} moveEvidence={status.MoveEvidenceCount} edgeNs={status.EdgeNs}");
|
||||
|
||||
return admitted &&
|
||||
admission is not null &&
|
||||
admission.FrameId == frame.FrameId &&
|
||||
admission.ProducerPeerId == frame.ProducerPeerId &&
|
||||
admission.PublishedAtNs == frame.PublishedAtNs &&
|
||||
admission.MimirReadAtNs > 0 &&
|
||||
payload.Length > 0 &&
|
||||
sampleCount == 2 &&
|
||||
admission.OpticalMarkerCount == 1 &&
|
||||
admission.ControllerStateCount == 1 &&
|
||||
admission.SourceTimeMinNs <= admission.SourceTimeMaxNs &&
|
||||
admission.ArrivalMinNs <= admission.ArrivalMaxNs &&
|
||||
latest?.Sequence == published.Sequence &&
|
||||
handle.PayloadHandle != 0 &&
|
||||
admission.ReservoirEdgeNs == status.EdgeNs &&
|
||||
admission.ReservoirWindowStartNs == status.WindowStartNs &&
|
||||
admission.ReservoirMoveEvidenceCount == status.MoveEvidenceCount.ToUInt64() &&
|
||||
status.TotalSampleCount.ToUInt64() == 1 &&
|
||||
status.MoveEvidenceCount.ToUInt64() == 1
|
||||
? 0
|
||||
|
|
@ -2081,6 +2099,124 @@ static int RunMoveFusionSmoke()
|
|||
: 1;
|
||||
}
|
||||
|
||||
static int RunMoveProofSurfaceSmoke()
|
||||
{
|
||||
var pose = new MimirMoveControllerPoseDocument(
|
||||
PoseId: "move:0xA11CE:79",
|
||||
WandId: "move:0xA11CE",
|
||||
TrackingSpaceId: "mimir-stage-space",
|
||||
CalibrationId: "mimir-move-stage-calibration-v1",
|
||||
FusionAuthorityId: "mimir.runtime.move-fusion",
|
||||
SourceTimestampNs: 1_781_202_600_004_000_000,
|
||||
EstimatedAtNs: 1_781_202_600_006_200_000,
|
||||
Sequence: 79,
|
||||
PositionMeters: new MimirVector3Snapshot(0.0, 1.1, 1.0),
|
||||
Orientation: new MimirQuaternionSnapshot(0.0, 0.0, 0.0, 1.0),
|
||||
LinearVelocityMetersPerSecond: new MimirVector3Snapshot(0.0, 0.0, 0.0),
|
||||
AngularVelocityRadiansPerSecond: new MimirVector3Snapshot(0.02, -0.01, 0.04),
|
||||
Confidence: 0.82,
|
||||
LatencyMilliseconds: 2.2,
|
||||
Battery01: 0.72,
|
||||
Buttons:
|
||||
[
|
||||
new MimirTrackingButtonSnapshot("move", true, 1.0),
|
||||
new MimirTrackingButtonSnapshot("trigger", true, 0.5)
|
||||
],
|
||||
EvidenceStreamIds:
|
||||
[
|
||||
"witness:0x00000000000A11CE",
|
||||
"witness:0x0000000000000B0B",
|
||||
"controller:0x00000000000A11CE"
|
||||
],
|
||||
EvidenceKinds:
|
||||
[
|
||||
"optical-marker:triangulated",
|
||||
"controller-state:buttons-imu",
|
||||
"orientation:imu-unresolved"
|
||||
],
|
||||
ConsumerContract: "fensalir.move-controller-input");
|
||||
var admission = new MimirMuninnMoveEvidenceAdmission(
|
||||
FrameId: "muninn:nightwing:move-evidence:79",
|
||||
ProducerPeerId: "muninn:nightwing",
|
||||
PublishedAtNs: 1_781_202_600_005_000_000,
|
||||
MimirReadAtNs: 1_781_202_600_005_700_000,
|
||||
SampleCount: 3,
|
||||
OpticalMarkerCount: 2,
|
||||
ControllerStateCount: 1,
|
||||
SourceTimeMinNs: 1_781_202_600_004_000_000,
|
||||
SourceTimeMaxNs: 1_781_202_600_004_000_000,
|
||||
ArrivalMinNs: 1_781_202_600_004_500_000,
|
||||
ArrivalMaxNs: 1_781_202_600_005_700_000,
|
||||
Handle: new MimirNativeSampleHandle(
|
||||
SensorIdHash: 0xF00D,
|
||||
TimestampNs: 1_781_202_600_004_000_000,
|
||||
ArrivalNs: 1_781_202_600_005_700_000,
|
||||
Sequence: 79,
|
||||
PayloadHandle: 0xBEEF,
|
||||
Flags: 0,
|
||||
Reserved: 0),
|
||||
ReservoirEdgeNs: 1_781_202_600_004_000_000,
|
||||
ReservoirWindowStartNs: 1_781_197_600_004_000_000,
|
||||
ReservoirMoveEvidenceCount: 1);
|
||||
var poseFrame = MimirMovePoseStream.CreateFrame(
|
||||
frameId: "mimir:starfire:move-pose:79",
|
||||
producerPeerId: "mimir:starfire",
|
||||
publishedAtNs: pose.EstimatedAtNs,
|
||||
trackingSpaceId: pose.TrackingSpaceId,
|
||||
calibrationId: pose.CalibrationId,
|
||||
poses: [pose]);
|
||||
var surface = MimirMoveProofSurface.Create(
|
||||
admission,
|
||||
poseFrame,
|
||||
"fensalir:starfire:presented-frame:79",
|
||||
fensalirPresentedAtNs: 1_781_202_600_007_100_000);
|
||||
var probeFrame = MimirMoveProofSurface.BuildFensalirProbeFrame(surface);
|
||||
var encoded = MessagePackSerializer.Serialize(surface);
|
||||
var decoded = MessagePackSerializer.Deserialize<MimirMoveProofSurfaceDocument>(encoded);
|
||||
var fallbackPose = pose with
|
||||
{
|
||||
EvidenceKinds =
|
||||
[
|
||||
"optical-marker:single-ray-depth-prior",
|
||||
"controller-state:buttons-imu",
|
||||
"orientation:imu-unresolved"
|
||||
]
|
||||
};
|
||||
var fallbackSurface = MimirMoveProofSurface.Create(
|
||||
admission with { OpticalMarkerCount = 1 },
|
||||
MimirMovePoseStream.CreateFrame(
|
||||
"mimir:starfire:move-pose:80",
|
||||
"mimir:starfire",
|
||||
fallbackPose.EstimatedAtNs,
|
||||
fallbackPose.TrackingSpaceId,
|
||||
fallbackPose.CalibrationId,
|
||||
[fallbackPose]),
|
||||
"fensalir:starfire:presented-frame:80",
|
||||
fensalirPresentedAtNs: 1_781_202_600_008_100_000);
|
||||
|
||||
Console.WriteLine(
|
||||
$"move-proof-surface-smoke proof={surface.ProofId} chain={surface.MuninnEvidenceFrameId}->{surface.MimirEvidenceFrameId}->{surface.MimirPoseFrameId}->{surface.FensalirFrameId} verdict={surface.Verdict} splines={probeFrame.Splines.Count} encodedBytes={encoded.Length} fallbackVerdict={fallbackSurface.Verdict}");
|
||||
|
||||
return surface.IsFullPose &&
|
||||
surface.MuninnEvidenceFrameId == "muninn:nightwing:move-evidence:79" &&
|
||||
surface.MimirEvidenceFrameId == "mimir:starfire:move-evidence:79" &&
|
||||
surface.MimirPoseFrameId == "mimir:starfire:move-pose:79" &&
|
||||
surface.FensalirFrameId == "fensalir:starfire:presented-frame:79" &&
|
||||
surface.OpticalMarkerCount == 2 &&
|
||||
surface.ControllerStateCount == 1 &&
|
||||
surface.MimirReadAtNs > (ulong)surface.MuninnPublishedAtNs &&
|
||||
surface.FusionEstimatedAtNs >= surface.SourceTimestampNs &&
|
||||
surface.FensalirPresentedAtNs > (ulong)surface.FusionEstimatedAtNs &&
|
||||
probeFrame.HasInput &&
|
||||
probeFrame.Splines.Count >= 3 &&
|
||||
decoded.ProofId == surface.ProofId &&
|
||||
fallbackSurface.Verdict == MimirMoveProofVerdict.SingleRayFallback &&
|
||||
!fallbackSurface.IsFullPose &&
|
||||
fallbackSurface.FailureReason.Contains("single-ray", StringComparison.Ordinal)
|
||||
? 0
|
||||
: 1;
|
||||
}
|
||||
|
||||
static async Task<int> RunMoveCalibrationProtocolSmokeAsync(string outputPath)
|
||||
{
|
||||
var protocol = MimirMoveCalibrationProtocol.CreateStarfireNightwingProtocol(
|
||||
|
|
|
|||
232
src/Mimir.Runtime/Synchronization/MimirMoveProofSurface.cs
Normal file
232
src/Mimir.Runtime/Synchronization/MimirMoveProofSurface.cs
Normal file
|
|
@ -0,0 +1,232 @@
|
|||
using Aquarium.Engine.Render;
|
||||
using GameCult.Caching;
|
||||
using MessagePack;
|
||||
using System.Numerics;
|
||||
|
||||
namespace Mimir.Runtime.Synchronization;
|
||||
|
||||
public enum MimirMoveProofVerdict
|
||||
{
|
||||
Unknown,
|
||||
NoPose,
|
||||
SingleRayFallback,
|
||||
FullPose
|
||||
}
|
||||
|
||||
[CultDocument("mimir.move_proof_surface", "mimir.move_proof_surface.v1")]
|
||||
[MessagePackObject]
|
||||
public sealed record MimirMoveProofSurfaceDocument(
|
||||
[property: Key(0)]
|
||||
[property: CultName]
|
||||
string ProofId,
|
||||
[property: Key(1)] string MuninnEvidenceFrameId,
|
||||
[property: Key(2)] string MimirEvidenceFrameId,
|
||||
[property: Key(3)] string MimirPoseFrameId,
|
||||
[property: Key(4)] string FensalirFrameId,
|
||||
[property: Key(5)] string ProducerPeerId,
|
||||
[property: Key(6)] string FusionAuthorityId,
|
||||
[property: Key(7)] string TrackingSpaceId,
|
||||
[property: Key(8)] string CalibrationId,
|
||||
[property: Key(9)] long SourceTimestampNs,
|
||||
[property: Key(10)] long MuninnPublishedAtNs,
|
||||
[property: Key(11)] ulong MimirReadAtNs,
|
||||
[property: Key(12)] ulong MimirAdmittedAtNs,
|
||||
[property: Key(13)] long FusionEstimatedAtNs,
|
||||
[property: Key(14)] ulong FensalirPresentedAtNs,
|
||||
[property: Key(15)] ulong ReservoirEdgeNs,
|
||||
[property: Key(16)] ulong ReservoirWindowStartNs,
|
||||
[property: Key(17)] int OpticalMarkerCount,
|
||||
[property: Key(18)] int ControllerStateCount,
|
||||
[property: Key(19)] int PoseCount,
|
||||
[property: Key(20)] double PoseConfidence,
|
||||
[property: Key(21)] double LatencyMilliseconds,
|
||||
[property: Key(22)] MimirMoveProofVerdict Verdict,
|
||||
[property: Key(23)] string FailureReason,
|
||||
[property: Key(24)] MimirMoveControllerPoseDocument[] Poses)
|
||||
{
|
||||
[IgnoreMember]
|
||||
public bool IsFullPose => Verdict == MimirMoveProofVerdict.FullPose;
|
||||
}
|
||||
|
||||
public static class MimirMoveProofSurface
|
||||
{
|
||||
public const string ConsumerContract = "fensalir.move-proof-surface";
|
||||
|
||||
public static MimirMoveProofSurfaceDocument Create(
|
||||
MimirMuninnMoveEvidenceAdmission admission,
|
||||
MimirMoveControllerPoseStreamFrame poseFrame,
|
||||
string fensalirFrameId,
|
||||
ulong fensalirPresentedAtNs)
|
||||
{
|
||||
ArgumentNullException.ThrowIfNull(admission);
|
||||
ArgumentNullException.ThrowIfNull(poseFrame);
|
||||
ArgumentException.ThrowIfNullOrWhiteSpace(fensalirFrameId);
|
||||
|
||||
var poses = poseFrame.Poses
|
||||
.OrderBy(pose => pose.SourceTimestampNs)
|
||||
.ThenBy(pose => pose.Sequence)
|
||||
.ToArray();
|
||||
var selectedPose = poses
|
||||
.OrderByDescending(pose => pose.Confidence)
|
||||
.FirstOrDefault();
|
||||
var verdict = ResolveVerdict(poses);
|
||||
var failureReason = ResolveFailureReason(admission, poses, verdict);
|
||||
var sourceNs = selectedPose?.SourceTimestampNs ??
|
||||
checked((long)Math.Min(admission.SourceTimeMaxNs, (ulong)long.MaxValue));
|
||||
var estimatedAtNs = selectedPose?.EstimatedAtNs ?? 0L;
|
||||
var confidence = selectedPose?.Confidence ?? 0.0;
|
||||
var latencyMs = selectedPose?.LatencyMilliseconds ?? 0.0;
|
||||
|
||||
return new MimirMoveProofSurfaceDocument(
|
||||
ProofId: $"{poseFrame.ProducerPeerId}:move-proof:{SequenceSuffix(poseFrame.FrameId)}",
|
||||
MuninnEvidenceFrameId: admission.FrameId,
|
||||
MimirEvidenceFrameId: $"mimir:starfire:move-evidence:{SequenceSuffix(admission.FrameId)}",
|
||||
MimirPoseFrameId: poseFrame.FrameId,
|
||||
FensalirFrameId: fensalirFrameId,
|
||||
ProducerPeerId: poseFrame.ProducerPeerId,
|
||||
FusionAuthorityId: selectedPose?.FusionAuthorityId ?? "mimir.runtime.move-fusion",
|
||||
TrackingSpaceId: poseFrame.TrackingSpaceId,
|
||||
CalibrationId: poseFrame.CalibrationId,
|
||||
SourceTimestampNs: sourceNs,
|
||||
MuninnPublishedAtNs: admission.PublishedAtNs,
|
||||
MimirReadAtNs: admission.MimirReadAtNs,
|
||||
MimirAdmittedAtNs: admission.ArrivalMaxNs,
|
||||
FusionEstimatedAtNs: estimatedAtNs,
|
||||
FensalirPresentedAtNs: fensalirPresentedAtNs,
|
||||
ReservoirEdgeNs: admission.ReservoirEdgeNs,
|
||||
ReservoirWindowStartNs: admission.ReservoirWindowStartNs,
|
||||
OpticalMarkerCount: admission.OpticalMarkerCount,
|
||||
ControllerStateCount: admission.ControllerStateCount,
|
||||
PoseCount: poses.Length,
|
||||
PoseConfidence: Math.Clamp(confidence, 0.0, 1.0),
|
||||
LatencyMilliseconds: Math.Max(0.0, latencyMs),
|
||||
Verdict: verdict,
|
||||
FailureReason: failureReason,
|
||||
Poses: poses);
|
||||
}
|
||||
|
||||
public static AquariumSplineFrame BuildFensalirProbeFrame(MimirMoveProofSurfaceDocument surface)
|
||||
{
|
||||
ArgumentNullException.ThrowIfNull(surface);
|
||||
if (surface.Poses.Length == 0)
|
||||
{
|
||||
return BuildFailureProbe(surface);
|
||||
}
|
||||
|
||||
var splines = new List<AquariumSpline3D>();
|
||||
foreach (var pose in surface.Poses)
|
||||
{
|
||||
var center = ToVector(pose.PositionMeters);
|
||||
var confidence = (float)Math.Clamp(pose.Confidence, 0.0, 1.0);
|
||||
var color = surface.IsFullPose
|
||||
? new Vector4(0.15f, 1.35f, 0.92f, 0.92f)
|
||||
: new Vector4(1.35f, 0.78f, 0.18f, 0.86f);
|
||||
var radius = MathF.Max(0.03f, 0.08f * confidence);
|
||||
splines.Add(new AquariumSpline3D(
|
||||
$"move-proof-{SanitizeId(pose.PoseId)}-x",
|
||||
[
|
||||
new(center + new Vector3(-radius, 0.0f, 0.0f), color),
|
||||
new(center + new Vector3(radius, 0.0f, 0.0f), color)
|
||||
],
|
||||
new AquariumSplineStyle(0.012f, 2.0f, 0.94f, 0.7f, 0.10f),
|
||||
CatmullRomSubdivisions: 1));
|
||||
splines.Add(new AquariumSpline3D(
|
||||
$"move-proof-{SanitizeId(pose.PoseId)}-y",
|
||||
[
|
||||
new(center + new Vector3(0.0f, -radius, 0.0f), color),
|
||||
new(center + new Vector3(0.0f, radius, 0.0f), color)
|
||||
],
|
||||
new AquariumSplineStyle(0.012f, 2.0f, 0.94f, 0.7f, 0.10f),
|
||||
CatmullRomSubdivisions: 1));
|
||||
splines.Add(new AquariumSpline3D(
|
||||
$"move-proof-{SanitizeId(pose.PoseId)}-z",
|
||||
[
|
||||
new(center + new Vector3(0.0f, 0.0f, -radius), color),
|
||||
new(center + new Vector3(0.0f, 0.0f, radius), color)
|
||||
],
|
||||
new AquariumSplineStyle(0.012f, 2.0f, 0.94f, 0.7f, 0.10f),
|
||||
CatmullRomSubdivisions: 1));
|
||||
}
|
||||
|
||||
return new AquariumSplineFrame { Splines = splines };
|
||||
}
|
||||
|
||||
private static AquariumSplineFrame BuildFailureProbe(MimirMoveProofSurfaceDocument surface)
|
||||
{
|
||||
var color = new Vector4(1.2f, 0.2f, 0.12f, 0.85f);
|
||||
var z = surface.OpticalMarkerCount > 0 ? 0.35f : 0.0f;
|
||||
return new AquariumSplineFrame
|
||||
{
|
||||
Splines =
|
||||
[
|
||||
new AquariumSpline3D(
|
||||
$"move-proof-{SanitizeId(surface.ProofId)}-missing-pose",
|
||||
[
|
||||
new(new Vector3(-0.16f, 0.0f, z), color),
|
||||
new(new Vector3(0.16f, 0.0f, z), color),
|
||||
new(new Vector3(0.0f, 0.16f, z), color),
|
||||
new(new Vector3(-0.16f, 0.0f, z), color)
|
||||
],
|
||||
new AquariumSplineStyle(0.01f, 1.2f, 0.85f, 0.8f, 0.12f),
|
||||
CatmullRomSubdivisions: 1)
|
||||
]
|
||||
};
|
||||
}
|
||||
|
||||
private static MimirMoveProofVerdict ResolveVerdict(IReadOnlyList<MimirMoveControllerPoseDocument> poses)
|
||||
{
|
||||
if (poses.Count == 0)
|
||||
{
|
||||
return MimirMoveProofVerdict.NoPose;
|
||||
}
|
||||
|
||||
return poses.Any(pose => pose.EvidenceKinds.Contains("optical-marker:triangulated", StringComparer.Ordinal))
|
||||
? MimirMoveProofVerdict.FullPose
|
||||
: MimirMoveProofVerdict.SingleRayFallback;
|
||||
}
|
||||
|
||||
private static string ResolveFailureReason(
|
||||
MimirMuninnMoveEvidenceAdmission admission,
|
||||
IReadOnlyList<MimirMoveControllerPoseDocument> poses,
|
||||
MimirMoveProofVerdict verdict)
|
||||
{
|
||||
if (verdict == MimirMoveProofVerdict.FullPose)
|
||||
{
|
||||
return "";
|
||||
}
|
||||
|
||||
if (admission.OpticalMarkerCount == 0)
|
||||
{
|
||||
return "missing optical marker candidates";
|
||||
}
|
||||
|
||||
if (admission.ControllerStateCount == 0)
|
||||
{
|
||||
return "missing controller state";
|
||||
}
|
||||
|
||||
if (poses.Count == 0)
|
||||
{
|
||||
return "Mimir fusion produced no calibrated pose";
|
||||
}
|
||||
|
||||
return "pose is single-ray fallback, not full calibrated optical fusion";
|
||||
}
|
||||
|
||||
private static string SequenceSuffix(string frameId)
|
||||
{
|
||||
var separator = frameId.LastIndexOf(':');
|
||||
return separator >= 0 && separator < frameId.Length - 1
|
||||
? frameId[(separator + 1)..]
|
||||
: frameId;
|
||||
}
|
||||
|
||||
private static Vector3 ToVector(MimirVector3Snapshot value) =>
|
||||
new((float)value.X, (float)value.Y, (float)value.Z);
|
||||
|
||||
private static string SanitizeId(string value)
|
||||
{
|
||||
var chars = value.Select(ch => char.IsLetterOrDigit(ch) ? ch : '-').ToArray();
|
||||
return new string(chars);
|
||||
}
|
||||
}
|
||||
|
|
@ -87,6 +87,23 @@ public sealed record MimirMuninnMoveEvidenceStreamFrame(
|
|||
[property: Key(3)] MuninnMoveMarkerCandidateDocument[] MarkerCandidates,
|
||||
[property: Key(4)] MuninnMoveControllerStateDocument[] ControllerStates);
|
||||
|
||||
public sealed record MimirMuninnMoveEvidenceAdmission(
|
||||
string FrameId,
|
||||
string ProducerPeerId,
|
||||
long PublishedAtNs,
|
||||
ulong MimirReadAtNs,
|
||||
int SampleCount,
|
||||
int OpticalMarkerCount,
|
||||
int ControllerStateCount,
|
||||
ulong SourceTimeMinNs,
|
||||
ulong SourceTimeMaxNs,
|
||||
ulong ArrivalMinNs,
|
||||
ulong ArrivalMaxNs,
|
||||
MimirNativeSampleHandle Handle,
|
||||
ulong ReservoirEdgeNs,
|
||||
ulong ReservoirWindowStartNs,
|
||||
ulong ReservoirMoveEvidenceCount);
|
||||
|
||||
public static class MimirMuninnMoveEvidenceAdapter
|
||||
{
|
||||
private const ulong LiveIdentityWindowNs = 60_000_000_000UL;
|
||||
|
|
@ -126,11 +143,30 @@ public static class MimirMuninnMoveEvidenceAdapter
|
|||
string trackingSpaceId,
|
||||
out MimirNativeSampleHandle handle,
|
||||
out int sampleCount)
|
||||
{
|
||||
var admitted = TryAdmitLatestCultMeshFrame(
|
||||
ring,
|
||||
runtime,
|
||||
producerSourceId,
|
||||
calibrationId,
|
||||
trackingSpaceId,
|
||||
out var admission);
|
||||
handle = admission?.Handle ?? default;
|
||||
sampleCount = admission?.SampleCount ?? 0;
|
||||
return admitted;
|
||||
}
|
||||
|
||||
public static bool TryAdmitLatestCultMeshFrame(
|
||||
CultMeshSharedMemoryFrameRing ring,
|
||||
MimirNativeReservoirRuntime runtime,
|
||||
string producerSourceId,
|
||||
string calibrationId,
|
||||
string trackingSpaceId,
|
||||
out MimirMuninnMoveEvidenceAdmission? admission)
|
||||
{
|
||||
ArgumentNullException.ThrowIfNull(ring);
|
||||
ArgumentNullException.ThrowIfNull(runtime);
|
||||
handle = default;
|
||||
sampleCount = 0;
|
||||
admission = null;
|
||||
if (!ring.TryAcquireLatestRead(out var lease))
|
||||
{
|
||||
return false;
|
||||
|
|
@ -138,15 +174,32 @@ public static class MimirMuninnMoveEvidenceAdapter
|
|||
|
||||
using (lease)
|
||||
{
|
||||
var mimirReadAtNs = NowUnixNs();
|
||||
var frame = DeserializeStreamFrame(lease.Memory[..lease.Handle.ByteLength]);
|
||||
var samples = BuildNativeSamples(frame.MarkerCandidates, frame.ControllerStates);
|
||||
sampleCount = samples.Count;
|
||||
if (sampleCount == 0)
|
||||
if (samples.Count == 0)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
handle = runtime.AdmitMoveEvidence(producerSourceId, samples, calibrationId, trackingSpaceId);
|
||||
var handle = runtime.AdmitMoveEvidence(producerSourceId, samples, calibrationId, trackingSpaceId);
|
||||
var status = runtime.Status;
|
||||
admission = new MimirMuninnMoveEvidenceAdmission(
|
||||
FrameId: frame.FrameId,
|
||||
ProducerPeerId: frame.ProducerPeerId,
|
||||
PublishedAtNs: frame.PublishedAtNs,
|
||||
MimirReadAtNs: mimirReadAtNs,
|
||||
SampleCount: samples.Count,
|
||||
OpticalMarkerCount: samples.Count(sample => sample.EvidenceKind == (uint)MimirNativeMoveEvidenceKind.OpticalMarker),
|
||||
ControllerStateCount: samples.Count(sample => sample.EvidenceKind == (uint)MimirNativeMoveEvidenceKind.ControllerState),
|
||||
SourceTimeMinNs: samples.Min(sample => sample.SourceTimestampNs),
|
||||
SourceTimeMaxNs: samples.Max(sample => sample.SourceTimestampNs),
|
||||
ArrivalMinNs: samples.Min(sample => sample.ArrivalNs),
|
||||
ArrivalMaxNs: samples.Max(sample => sample.ArrivalNs),
|
||||
Handle: handle,
|
||||
ReservoirEdgeNs: status.EdgeNs,
|
||||
ReservoirWindowStartNs: status.WindowStartNs,
|
||||
ReservoirMoveEvidenceCount: status.MoveEvidenceCount.ToUInt64());
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
@ -416,6 +469,14 @@ public static class MimirMuninnMoveEvidenceAdapter
|
|||
return hash == 0 ? 1 : hash;
|
||||
}
|
||||
|
||||
private static ulong NowUnixNs()
|
||||
{
|
||||
var now = DateTimeOffset.UtcNow;
|
||||
var secondsNs = checked((ulong)now.ToUnixTimeSeconds() * 1_000_000_000UL);
|
||||
var tickRemainderNs = checked((ulong)(now.Ticks % TimeSpan.TicksPerSecond) * 100UL);
|
||||
return checked(secondsNs + tickRemainderNs);
|
||||
}
|
||||
|
||||
private static ulong ObservedAtToUnixNs(string observedAt)
|
||||
{
|
||||
const string unixPrefix = "unix-";
|
||||
|
|
|
|||
|
|
@ -154,3 +154,9 @@
|
|||
{"ts": "2026-06-17T13:16:04+01:00", "type": "verification", "status": "ok", "note": "Odin ef4c51a deployed to Starfire Muninn. Windows Move identity status now reads paired Bluetooth host from the sibling PS Move pairing collection when --move-host is omitted: no-flag move-identity-status reports A8 as usb-visible with bluetooth_host=5C:93:A2:9C:A8:A8, and the claim log shows controller=00:07:04:a8:00:d0 host_after=5c:93:a2:9c:a8:a8. Installed Starfire Muninn hash matches target/debug hash 6062D174FF9DF281C098B35E84E7D3488606F6EC8842D6B5F1C8B6ACBD30C7E7."}
|
||||
{"ts": "2026-06-17T13:27:55+01:00", "type": "verification", "status": "ok", "note": "Mimir live Muninn roster smoke after Odin ef4c51a and refreshed Nightwing store loaded Starfire+Nightwing identity stores 2/2, identities=6, roster=4, readinessCoherent=True. A8 now resolves as usb-owned on Starfire with bluetoothHost=5C:93:A2:9C:A8:A8 while Nightwing contributes bluetooth-unreachable for the same move id; F5 is bluetooth-connected, A3 is usb-owned on Nightwing, and A6 remains bluetooth-unreachable."}
|
||||
{"ts": "2026-06-17T14:05:52+01:00", "type": "verification", "status": "ok", "note": "After Odin b6f8119 deployed to Nightwing and Starfire, Muninn live source merge drops stale configured platform Move sources when platform discovery has live sources, so static --move-state joystick paths no longer keep unplugged Moves USB-owned. Mimir roster derivation now ignores identity snapshots older than the live identity window relative to each Move's newest observation. Focused identity smoke reports staleReleased=bluetooth-waiting/pickup-ready. Cross-host live roster smoke with refreshed Nightwing store loaded stores=2/2, identities=6, roster=4, readinessCoherent=True: F5 bluetooth-connected, A3 usb-owned on Starfire with Nightwing unreachable witness, A6 bluetooth-unreachable, A8 usb-owned on Nightwing."}
|
||||
{"ts": "2026-07-04T00:00:00Z", "type": "transport-cut", "status": "ok", "note": "Archived the old Nightwing/EVE witness socket lane: Mimir.EveSensorReceiver, Mimir.VerseRecorder, tools/nightwing_typed_witness_publisher.py, and scripts/start-nightwing-move-tracking.ps1 now fail closed. Eye/Move witness publication and recording must use typed CultMesh/CultNet documents or CultMesh stream frames discovered through Odin; the old receiver/recorder/subscription path no longer owns live transport."}
|
||||
{"ts": "2026-07-08T22:06:14+01:00", "type": "decision", "status": "ok", "note": "Move proof spine cut: Odin Muninn evidence frames now carry canonical muninn.move_marker_candidate.v1 records instead of a forced empty marker slice, with a bright-Y8 tracker unit proving non-empty marker candidates serialize into the Mimir-compatible CultMesh frame. Mimir TryAdmitLatestCultMeshFrame now exposes a typed admission receipt with frame id, producer, publish/read times, sample kind counts, source/arrival ranges, native handle, and reservoir edge/window. Verified cargo test -p muninn-daemon, dotnet build Mimir.Runtime, dotnet build Mimir.BufferSmoke, and BufferSmoke --muninn-move-cultmesh-stream-smoke against native reservoir debug DLL."}
|
||||
{"ts": "2026-07-08T22:10:10+01:00", "type": "decision", "status": "ok", "note": "Move optical extraction seam sharpened in Odin: Muninn daemon now has MoveMarkerFrameSource plus extract/publish functions that take one source-local Y8 frame, run muninn-move-tracker, build canonical muninn.move_marker_candidate.v1 records, and publish them through the same Mimir-compatible move-evidence stream. Full cargo test -p muninn-daemon passed. Live raw camera-frame ownership is still missing in Muninn serve; do not revive the archived Python/EVE witness lane to fake it."}
|
||||
{"ts": "2026-07-08T22:18:44+01:00", "type": "decision", "status": "ok", "note": "Muninn serve now has a first daemon-owned Move marker camera producer path: --move-marker-camera <camera-id>=<device-path> configures a source-local camera, the serve loop polls a platform frame reader, Unix builds use a V4L2 YUYV single-frame reader that converts to compact Y8, and the shared extraction/publish seam emits canonical muninn.move_marker_candidate.v1 records into the Mimir-compatible move-evidence stream. Verified on Windows with cargo test -p muninn-daemon (148 passed) and marker-camera unit tests; Linux cross-target check could not run because x86_64-unknown-linux-gnu target is not installed, and Nightwing hardware live proof remains pending."}
|
||||
{"ts": "2026-07-08T22:21:57+01:00", "type": "verification", "status": "ok", "note": "Correction to the earlier Move marker camera evidence: after installing/using the x86_64-unknown-linux-gnu Rust target, Muninn's V4L2 YUYV Move marker camera producer compiled with cargo check -p muninn-daemon --target x86_64-unknown-linux-gnu. cargo test -p muninn-daemon passes 148 tests. Nightwing hardware live proof remains pending, so this proves owned producer code and target compatibility, not calibrated live pose."}
|
||||
{"ts": "2026-07-08T22:28:32+01:00", "type": "implementation", "status": "ok", "note": "Added MimirMoveProofSurface as the first observer-only Fensalir-visible Move proof surface: it combines a Muninn evidence admission receipt, Mimir pose stream frame, and Fensalir presentation/probe timestamp into mimir.move_proof_surface.v1, lowers a dev AquariumSplineFrame probe, preserves source/publish/read/admit/fusion/present timing, and refuses to treat single-ray fallback as full pose. Verified dotnet build Mimir.Runtime, dotnet build Mimir.BufferSmoke, BufferSmoke --move-proof-surface-smoke, and BufferSmoke --move-fusion-smoke. Live Nightwing hardware, calibrated camera witnesses, and actual Fensalir presented-frame capture remain pending."}
|
||||
|
|
|
|||
|
|
@ -43,15 +43,14 @@ constraints:
|
|||
- 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,
|
||||
RUDP by default. Product/debug render surfaces are 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.
|
||||
not separate because they need TCP. The old Mimir Eve dashboard broker is
|
||||
archived and no longer publishes Idunn health, deck routes, or WebSocket
|
||||
commands. Idunn owns continuity once Odin has accepted a daemon; Mimir-owned
|
||||
surfaces may only return as typed CultMesh/Odin state publishers.
|
||||
- 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.
|
||||
|
|
@ -131,6 +130,13 @@ accepted_design:
|
|||
`mimir.move_controller_pose_stream_frame.v1` CultMesh shared-memory byte
|
||||
frames for Fensalir and other realtime consumers; it carries poses and does
|
||||
not own calibration or fusion decisions.
|
||||
- `MimirMoveProofSurface` publishes the observer-only
|
||||
`mimir.move_proof_surface.v1` receipt and Fensalir spline probe for the
|
||||
named proof spine. It combines the Muninn evidence admission receipt, the
|
||||
Mimir-owned pose frame, and a Fensalir presentation/probe timestamp without
|
||||
becoming a pose owner. Single-ray fallback is surfaced as non-final; only
|
||||
triangulated calibrated optical marker evidence can earn a full-pose
|
||||
verdict.
|
||||
- `MimirMoveCalibrationProtocol` defines the runnable Starfire/Nightwing Move
|
||||
calibration preflight as typed state: required Muninn Move evidence streams,
|
||||
optional Quest headset/controller pose witnesses over USB,
|
||||
|
|
@ -147,18 +153,30 @@ accepted_design:
|
|||
shared-memory byte rings. Current remote media body transport is not
|
||||
same-machine zero-copy into Fensalir; Raven media uses CultNet/CultMesh
|
||||
documents over the mesh and lowers to local UDP only for OBS compatibility.
|
||||
- `scripts/start-nightwing-move-tracking.ps1` restores the live Nightwing
|
||||
Eye/Move witness path: Starfire owns the `/eve/periwinkle` receiver and
|
||||
recorder, Nightwing owns PS Move HID report `0x06` LED writes and PS3 Eye
|
||||
blob extraction, and the stream currently emits `mimir.psmove_light_state.v1`
|
||||
plus `mimir.move_controller_observation_state.v1` optical witness records
|
||||
before later fusion into full tracking poses.
|
||||
- The old `scripts/start-nightwing-move-tracking.ps1` Nightwing Eye/Move
|
||||
witness path is archived. Starfire no longer owns a receiver/recorder
|
||||
socket lane for this evidence; Nightwing/Mimir witness publication must use
|
||||
typed CultMesh stream frames or Odin-discovered CultMesh documents.
|
||||
- Odin's Muninn organ owns Move optical candidate extraction in
|
||||
`E:\Projects\Odin\crates\muninn-move-tracker` and publishes/feeds
|
||||
`muninn.move_marker_candidate.v1` records. Mimir consumes those candidate
|
||||
streams; it does not own raw optical extraction. Mimir explicitly owns
|
||||
calibration, multi-camera association, triangulation, IMU fusion,
|
||||
prediction, and final 6DoF wand pose.
|
||||
- Muninn's Move evidence stream frame now uses canonical
|
||||
`muninn.move_marker_candidate.v1` records for optical candidates instead of
|
||||
a hardcoded empty marker slice. A daemon unit proves a bright Y8 frame
|
||||
extracted by `muninn-move-tracker` serializes as non-empty Mimir-compatible
|
||||
evidence. The daemon now has a source-local Y8 extraction/publish seam and
|
||||
a first `serve` camera producer: `--move-marker-camera <camera-id>=<device-path>`
|
||||
polls a Unix V4L2 YUYV frame, converts it to compact Y8, and feeds that
|
||||
same seam. Unit tests prove the configured camera tick publishes marker
|
||||
evidence through the shared frame contract; Nightwing hardware/live V4L2
|
||||
proof is still pending.
|
||||
- `MimirMuninnMoveEvidenceAdapter.TryAdmitLatestCultMeshFrame` now exposes a
|
||||
typed admission receipt with decoded frame id, producer, publish/read
|
||||
timestamps, sample counts by kind, source/arrival ranges, native reservoir
|
||||
handle, and reservoir edge/window so the named proof spine can be traced.
|
||||
- `MimirFrameEventProcessStreamSource` is a temporary diagnostic adapter for
|
||||
JSON-line video frame and audio block metadata from native probes into
|
||||
runtime rolling buffers; it does not carry pixels/audio payloads or own the
|
||||
|
|
@ -387,19 +405,20 @@ accepted_design:
|
|||
- `src/Mimir.CultMeshMedia` owns the first explicit CultMesh media/body
|
||||
bridge. Raven publishes muxed H.264/AAC MPEG-TS chunks as rolling
|
||||
`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`. The bridge now uses explicit CultLib RUDP
|
||||
socket/session helpers for relay, sender, and receiver. The old
|
||||
`CultMesh.StartNodeAsync`/`CultMesh.ConnectClient` node/client path is no
|
||||
longer a transport authority for this media lane.
|
||||
- `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.
|
||||
Yggdrasil relay routing comes from
|
||||
`cultmesh://asgard.yggdrasil.mimir/media/raven-primary-av` through
|
||||
Odin/CultMesh discovery, and Starfire lowers the subscribed stream to local
|
||||
UDP for the OBS source `Raven Monitor + Realtek`. The bridge now uses
|
||||
explicit CultLib RUDP socket/session helpers for relay, sender, and
|
||||
receiver. The old `CultMesh.StartNodeAsync`/`CultMesh.ConnectClient`
|
||||
node/client path and raw sender/receiver host-port config are no longer
|
||||
transport authorities for this media lane.
|
||||
- `src/Mimir.EveDashboard` is archived as a fail-closed tombstone. It no
|
||||
longer opens a TCP listener, serves `/eve/deck`, accepts WebSocket commands,
|
||||
or publishes Idunn health. Its replacement must publish provider
|
||||
advertisement, retained state, command boundary, and transport profile as
|
||||
typed CultMesh/Odin documents; product/debug render surfaces remain client
|
||||
lowerings.
|
||||
- `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
|
||||
|
|
@ -432,15 +451,16 @@ 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.EveDashboard` and witness tooling: daemon truth, provider
|
||||
catalogs, command boundaries, and typed program document paths should use
|
||||
explicit CultNet RUDP helpers; HTTP/WebSocket remain render/client
|
||||
lowerings only. `src/Mimir.CultMeshMedia` has completed this cut for the
|
||||
- Keep Mimir Eve dashboard and browser reference aligned with Odin/Idunn
|
||||
doctrine: Odin accepts Verse/service visibility, Idunn owns keepalive, and
|
||||
Mimir surfaces publish typed CultMesh/Odin state rather than private
|
||||
watchdog loops, product status probes, or socket brokers.
|
||||
- Rebuild `src/Mimir.EveDashboard` only after daemon truth, provider catalogs,
|
||||
command boundaries, and typed program document paths use explicit CultMesh/
|
||||
Odin documents. `Mimir.EveSensorReceiver`, `Mimir.VerseRecorder`, the
|
||||
Nightwing typed witness publisher, and `start-nightwing-move-tracking.ps1`
|
||||
are archived so the old witness subscription lane cannot retake transport
|
||||
authority. `src/Mimir.CultMeshMedia` has completed this cut for the
|
||||
Raven/Yggdrasil/Starfire media-frame lane.
|
||||
|
||||
current_status:
|
||||
|
|
|
|||
Loading…
Reference in a new issue