diff --git a/Mimir.slnx b/Mimir.slnx
index a17d72d..de3451b 100644
--- a/Mimir.slnx
+++ b/Mimir.slnx
@@ -6,6 +6,7 @@
+
diff --git a/config/mimir-runtime.well.local.json b/config/mimir-runtime.well.local.json
new file mode 100644
index 0000000..014da77
--- /dev/null
+++ b/config/mimir-runtime.well.local.json
@@ -0,0 +1,187 @@
+{
+ "bufferSeconds": 5.0,
+ "audioSync": {
+ "mode": "passive",
+ "referenceSourceId": "asio-ch2",
+ "calibrationGain": 0.0,
+ "watermarkGain": 0.0,
+ "complexContourChannelModelPath": "../calibration/bioacoustic/complex-contour-channel-model.json",
+ "enableComplexContourRuntime": true
+ },
+ "streams": [
+ {
+ "sourceId": "focusrite-asio",
+ "displayName": "Starfire Scarlett ASIO",
+ "kind": "Audio",
+ "origin": "LocalDevice",
+ "enabled": true,
+ "adapter": "asio",
+ "command": "../native/asio_capture/build/Release/mimir_asio_capture.dll",
+ "sampleRate": 192000,
+ "acceptSourceIds": [
+ "asio-ch0",
+ "asio-ch1",
+ "asio-ch2",
+ "asio-ch3"
+ ],
+ "sourceLabels": {
+ "asio-ch0": "Shotgun hero mic",
+ "asio-ch1": "Cardioid hero mic",
+ "asio-ch2": "Starfire/Raven loopback L",
+ "asio-ch3": "Starfire/Raven loopback R"
+ }
+ },
+ {
+ "sourceId": "leap-stereo-ir",
+ "displayName": "LeapUVC stereo IR / depth root",
+ "kind": "Video",
+ "origin": "LocalDevice",
+ "enabled": true,
+ "adapter": "ks-camera",
+ "command": "../native/camera_capture/build/Release/mimir_camera_capture.dll",
+ "pathNeedle": "vid_f182&pid_0003&mi_00",
+ "width": 640,
+ "height": 240,
+ "inputFormat": "YUY2",
+ "pixelFormat": "LeapStereoIr",
+ "minimumFramesPerSecond": 100.0,
+ "queueDepth": 8
+ },
+ {
+ "sourceId": "kiyo-pro-rgb",
+ "displayName": "Kiyo Pro AR program view",
+ "kind": "Video",
+ "origin": "LocalDevice",
+ "enabled": true,
+ "adapter": "ks-camera",
+ "command": "../native/camera_capture/build/Release/mimir_camera_capture.dll",
+ "pathNeedle": "vid_1532&pid_0e05&mi_00",
+ "width": 640,
+ "height": 480,
+ "inputFormat": "YUY2",
+ "pixelFormat": "YUY2",
+ "minimumFramesPerSecond": 25.0,
+ "queueDepth": 8
+ },
+ {
+ "sourceId": "kiyo-basic-rgb",
+ "displayName": "Kiyo RGB context",
+ "kind": "Video",
+ "origin": "LocalDevice",
+ "enabled": true,
+ "adapter": "ks-camera",
+ "command": "../native/camera_capture/build/Release/mimir_camera_capture.dll",
+ "pathNeedle": "vid_1532&pid_0e03&mi_00",
+ "width": 640,
+ "height": 480,
+ "inputFormat": "YUY2",
+ "pixelFormat": "YUY2",
+ "minimumFramesPerSecond": 25.0,
+ "queueDepth": 8
+ },
+ {
+ "sourceId": "raven-display",
+ "displayName": "Raven screen capture",
+ "clockDomainId": "raven-sync",
+ "kind": "Video",
+ "origin": "Network",
+ "enabled": true,
+ "adapter": "ffmpeg-rawvideo",
+ "command": "ffmpeg",
+ "width": 1920,
+ "height": 1080,
+ "pixelFormat": "Bgra8",
+ "arguments": [
+ "-hide_banner",
+ "-nostdin",
+ "-loglevel",
+ "warning",
+ "-fflags",
+ "nobuffer",
+ "-flags",
+ "low_delay",
+ "-i",
+ "srt://0.0.0.0:5210?mode=listener&latency=20000&timeout=5000000",
+ "-an",
+ "-f",
+ "rawvideo",
+ "-pix_fmt",
+ "bgra",
+ "-"
+ ]
+ },
+ {
+ "sourceId": "raven-realtk-loopback",
+ "displayName": "Raven Realtek loopback",
+ "clockDomainId": "raven-sync",
+ "kind": "Audio",
+ "origin": "Network",
+ "enabled": true,
+ "adapter": "ffmpeg-pcmaudio",
+ "command": "ffmpeg",
+ "sampleRate": 48000,
+ "channels": 2,
+ "sampleFormat": "Float32",
+ "blockFrames": 960,
+ "arguments": [
+ "-hide_banner",
+ "-nostdin",
+ "-loglevel",
+ "warning",
+ "-fflags",
+ "nobuffer",
+ "-f",
+ "f32le",
+ "-ar",
+ "48000",
+ "-ac",
+ "2",
+ "-i",
+ "srt://0.0.0.0:5212?mode=listener&latency=20000&timeout=5000000",
+ "-f",
+ "f32le",
+ "-"
+ ]
+ },
+ {
+ "sourceId": "eve-camera",
+ "displayName": "Eve iPad camera capture",
+ "clockDomainId": "eve-local",
+ "kind": "Video",
+ "origin": "Network",
+ "enabled": true,
+ "adapter": "frame-events",
+ "command": "../src/Mimir.EveSensorReceiver/bin/Debug/net10.0/Mimir.EveSensorReceiver.exe",
+ "arguments": [
+ "--port",
+ "8793",
+ "--path",
+ "/eve/camera",
+ "--source-id",
+ "eve-camera",
+ "--type",
+ "video-frame"
+ ]
+ },
+ {
+ "sourceId": "eve-mic",
+ "displayName": "Eve iPad microphone capture",
+ "clockDomainId": "eve-local",
+ "kind": "Audio",
+ "origin": "Network",
+ "enabled": true,
+ "adapter": "frame-events",
+ "command": "../src/Mimir.EveSensorReceiver/bin/Debug/net10.0/Mimir.EveSensorReceiver.exe",
+ "arguments": [
+ "--port",
+ "8794",
+ "--path",
+ "/eve/mic",
+ "--source-id",
+ "eve-mic",
+ "--type",
+ "audio-block"
+ ]
+ }
+ ]
+}
diff --git a/docs/implementation-plan.md b/docs/implementation-plan.md
index 7a7f544..01b3bd6 100644
--- a/docs/implementation-plan.md
+++ b/docs/implementation-plan.md
@@ -575,14 +575,22 @@ a named invariant that the native runtime cannot protect yet.
serves a WebSocket subscriber lane on `/eve/periwinkle/subscribe`.
`Mimir.VerseRecorder` subscribes to that lane and writes a timestamped
`session.json` plus `observations.jsonl` under
- `C:\Users\Meta\Videos\Mimir\VerseCaptures` by default. The online supervisor
+ `C:\Users\Meta\Videos\Mimir\VerseCaptures` by default. `Mimir.Well` is the
+ long-running Starfire ingest/publish daemon: it loads
+ `config/mimir-runtime.well.local.json`, creates every configured source it
+ can, polls the `MimirSynchronizationHub` with a bounded daemon cadence,
+ updates audio sync/probe state, and publishes `mimir.well_snapshot.v1`
+ records with source buffers, composite controls, publication/stem contract,
+ and synchronized-frame status. The online supervisor
`scripts/start-online-verse-daemons.ps1` starts the relay, recorder,
- Nightwing Eyes/Move witness, music-synced Move gesture worker, and a local
- Starfire `Mimir.BufferSmoke` runtime capture worker from
- `config/mimir-runtime.mvp-leap-eyes-kiyo.local.json`. This cut records typed
- observation evidence and keeps local rolling capture alive; raw camera/audio
- payloads, aligned source windows, and stem descriptors still need a runtime
- publisher bridge from `MimirSynchronizationHub` into the same Verse surface.
+ Nightwing Eyes/Move/builtin-camera/builtin-mic witness, music-synced
+ de-Bruijn/microtonal Move gesture worker, and `Mimir.Well` from the broad
+ Well profile. This cut records typed observation evidence and Well state;
+ raw camera/audio payload publication into CultMesh remains a future heavy
+ media surface. The current live scar is explicit: ASIO device timestamps and
+ camera driver timestamps are different domains, so `Mimir.Well` publishes
+ degraded sync status until a camera-clock/global-time correction owner maps
+ those domains.
Eve now follows the same rule for its own device body:
`MimirDistributedWitnessConfigurations.EveLocalSensors` and the
`eve-local-sensors` Perfect Machine profile make Eve responsible for local
diff --git a/notes/fresh-workspace-handoff.md b/notes/fresh-workspace-handoff.md
index cf2849a..691e7ea 100644
--- a/notes/fresh-workspace-handoff.md
+++ b/notes/fresh-workspace-handoff.md
@@ -195,18 +195,23 @@ Get-Content .\state\evidence.jsonl -Tail 8
Native program-output recording/streaming should replace those actuators
behind the same owner.
- OBS receives final program surfaces; it does not own synchronization.
-- The first online Verse capture daemon pair exists. `Mimir.EveSensorReceiver`
- now has a subscriber WebSocket path beside its observation ingest path, and
- `Mimir.VerseRecorder` writes subscribed observations to
+- The online Well stack exists. `Mimir.EveSensorReceiver` has a subscriber
+ WebSocket path beside its observation ingest path, and `Mimir.VerseRecorder`
+ writes subscribed observations to
`C:\Users\Meta\Videos\Mimir\VerseCaptures\\session.json` plus
- `observations.jsonl`. `scripts/start-online-verse-daemons.ps1` supervises
- the local relay, recorder, Nightwing typed Eyes/Move witness, the
- music-synced Move gesture worker, and a Starfire `Mimir.BufferSmoke`
- runtime capture host for the MVP Leap/Eyes/Kiyo config. Treat this as the
- typed observation/witness ledger. The next coherent cut is a
- `MimirSynchronizationHub` publisher that emits aligned source windows, stem
- descriptors, sync states, and actuator state into the same Verse surface
- instead of leaving raw media/stem truth in local process memory only.
+ `observations.jsonl`. `Mimir.Well` loads
+ `config/mimir-runtime.well.local.json`, starts every configured source it
+ can, polls `MimirSynchronizationHub` with a bounded per-source budget, updates
+ audio sync/probe state, and publishes `mimir.well_snapshot.v1` records with
+ source buffers, composite controls, publication/stem contract, and sync
+ status. `scripts/start-online-verse-daemons.ps1` supervises the relay,
+ recorder, Nightwing typed Eyes/Move/builtin-camera/builtin-mic witness, the
+ music-synced de-Bruijn/microtonal Move gesture worker, and `Mimir.Well`.
+ Current live proof `online-verse-daemons-20260601-212502` wrote Well,
+ Nightwing builtin camera/mic, and Eye/Move records. Raven and Eve lanes are
+ configured but empty unless their producers are feeding the ports. Sync frame
+ status is degraded until a camera-clock/global-time correction owner maps
+ ASIO device time and camera driver time into one canonical timeline.
## Current Pressure
diff --git a/scripts/start-online-verse-daemons.ps1 b/scripts/start-online-verse-daemons.ps1
index 206714d..76353dc 100644
--- a/scripts/start-online-verse-daemons.ps1
+++ b/scripts/start-online-verse-daemons.ps1
@@ -2,7 +2,8 @@ param(
[string]$NightwingHost = "nightwing",
[string]$WitnessUrl = "ws://192.168.1.66:8796/eve/periwinkle",
[string]$SubscribeUrl = "ws://127.0.0.1:8796/eve/periwinkle/subscribe",
- [string]$ConfigPath = "E:\Projects\Mimir\config\mimir-runtime.mvp-leap-eyes-kiyo.local.json",
+ [string]$ConfigPath = "E:\Projects\Mimir\config\mimir-runtime.well.local.json",
+ [string]$WellPublishUrl = "ws://127.0.0.1:8796/eve/periwinkle",
[string]$RecorderRoot = "C:\Users\Meta\Videos\Mimir\VerseCaptures",
[int]$DurationSeconds = 0,
[int]$MoveFps = 120,
@@ -70,6 +71,7 @@ $manifest = [ordered]@{
runDir = $runDir
witnessUrl = $WitnessUrl
subscribeUrl = $SubscribeUrl
+ wellPublishUrl = $WellPublishUrl
recorderRoot = $RecorderRoot
configPath = $ConfigPath
startedAt = (Get-Date).ToString("o")
@@ -82,7 +84,12 @@ Write-Host "Online Verse daemon run: $runDir"
if (-not $DryRun) {
Get-CimInstance Win32_Process |
- Where-Object { $_.CommandLine -match "Mimir.EveSensorReceiver" -and $_.CommandLine -match "--port 8796" } |
+ Where-Object {
+ ($_.CommandLine -match "Mimir.EveSensorReceiver" -and $_.CommandLine -match "--port 8796") -or
+ ($_.CommandLine -match "Mimir.VerseRecorder") -or
+ ($_.CommandLine -match "Mimir.Well") -or
+ ($_.CommandLine -match "Mimir.BufferSmoke" -and $_.CommandLine -match "--poll-ms")
+ } |
ForEach-Object {
try { Stop-Process -Id $_.ProcessId -Force -ErrorAction Stop } catch {}
}
@@ -130,8 +137,16 @@ if (-not $SkipNightwing) {
scp (Join-Path $repo "tools\nightwing_typed_witness_publisher.py") "${NightwingHost}:/tmp/nightwing_typed_witness_publisher.py" | Out-Null
$remoteLog = "~/.local/state/gamecult/mimir-online-verse-witness-$runId.log"
$remotePid = "~/.local/state/gamecult/mimir-online-verse-witness-$runId.pid"
- $remote = "mkdir -p ~/.local/state/gamecult; pkill -f '/tmp/nightwing_typed_witness_publisher.py.*--track-eyes' || true; nohup python3 /tmp/nightwing_typed_witness_publisher.py --url '$WitnessUrl' --track-eyes --interval 0.10 --eye-devices /dev/video2,/dev/video3 --eye-window-seconds 0.08 --tracking-stride 6 > $remoteLog 2>&1 < /dev/null & sleep 0.2; pgrep -n -f '/tmp/nightwing_typed_witness_publisher.py.*--track-eyes' > $remotePid; cat $remotePid"
- $nightwingPid = ssh $NightwingHost $remote
+ $remoteScript = @"
+mkdir -p ~/.local/state/gamecult
+pkill -f '/tmp/nightwing_typed_witness_publisher.py.*--track-eyes' || true
+nohup python3 /tmp/nightwing_typed_witness_publisher.py --url '$WitnessUrl' --track-eyes --track-builtin-camera --track-builtin-mic --interval 0.10 --eye-devices /dev/video2,/dev/video3 --eye-window-seconds 0.08 --tracking-stride 6 > $remoteLog 2>&1 < /dev/null &
+sleep 0.5
+pgrep -n -f '/tmp/nightwing_typed_witness_publisher.py.*--track-eyes' > $remotePid
+cat $remotePid
+"@
+ $remoteB64 = [Convert]::ToBase64String([Text.Encoding]::UTF8.GetBytes($remoteScript))
+ $nightwingPid = ssh $NightwingHost "printf '%s' '$remoteB64' | base64 -d | bash"
$manifest.processes["nightwingWitnessPid"] = ($nightwingPid | Select-Object -First 1)
$manifest.processes["nightwingWitnessLog"] = $remoteLog
}
@@ -154,7 +169,10 @@ if (-not $SkipMoves) {
"--fps", "$MoveFps",
"--fft-size", "$MoveFftSize",
"--onset-cooldown-seconds", "0.065",
- "--warmup-seconds", "0.25"
+ "--warmup-seconds", "0.25",
+ "--debruijn-polyrhythm",
+ "--harmonic-base", "1.5",
+ "--microtonal-cents", "17"
)
foreach ($spec in $Move) {
$moveArgs += "--move"
@@ -167,17 +185,21 @@ if (-not $SkipMoves) {
if (-not $SkipRuntime) {
$runtime = Start-LoggedProcess `
- -Name "mimir-runtime" `
+ -Name "mimir-well" `
-FilePath "dotnet" `
-ArgumentList @(
"run",
"--project",
- (Join-Path $repo "src\Mimir.BufferSmoke\Mimir.BufferSmoke.csproj"),
+ (Join-Path $repo "src\Mimir.Well\Mimir.Well.csproj"),
"--",
"--seconds", $(if ($DurationSeconds -gt 0) { "$DurationSeconds" } else { "31536000" }),
"--poll-ms", "5",
- "--sync-reference", "asio-ch2",
- "--require-samples"
+ "--publish-url", $WellPublishUrl,
+ "--node-id", "starfire",
+ "--publish-ms", "250",
+ "--sync-ms", "250",
+ "--presentation-delay-ms", "2500",
+ "--max-samples-per-source", "4"
) `
-Environment @{
"MIMIR_RUNTIME_CONFIG" = $ConfigPath
diff --git a/src/Mimir.EveSensorReceiver/Program.cs b/src/Mimir.EveSensorReceiver/Program.cs
index 927b99f..7cdfc78 100644
--- a/src/Mimir.EveSensorReceiver/Program.cs
+++ b/src/Mimir.EveSensorReceiver/Program.cs
@@ -214,8 +214,9 @@ internal sealed class EveSensorReceiver(EveSensorReceiverOptions options) : IDis
return false;
}
- if (!root.TryGetProperty("sourceId", out var sourceId)
- || !string.Equals(sourceId.GetString(), options.SourceId, StringComparison.Ordinal))
+ if (!string.Equals(options.ExpectedType, "cultmesh-observation", StringComparison.OrdinalIgnoreCase)
+ && (!root.TryGetProperty("sourceId", out var sourceId)
+ || !string.Equals(sourceId.GetString(), options.SourceId, StringComparison.Ordinal)))
{
return false;
}
diff --git a/src/Mimir.Well/Mimir.Well.csproj b/src/Mimir.Well/Mimir.Well.csproj
new file mode 100644
index 0000000..33f03a6
--- /dev/null
+++ b/src/Mimir.Well/Mimir.Well.csproj
@@ -0,0 +1,16 @@
+
+
+
+ Exe
+ net10.0
+ Mimir.Well
+ Mimir.Well
+ enable
+ enable
+
+
+
+
+
+
+
diff --git a/src/Mimir.Well/Program.cs b/src/Mimir.Well/Program.cs
new file mode 100644
index 0000000..c23f39e
--- /dev/null
+++ b/src/Mimir.Well/Program.cs
@@ -0,0 +1,390 @@
+using System.Net.WebSockets;
+using System.Text;
+using System.Text.Json;
+using Mimir.Runtime.Synchronization;
+
+var options = MimirWellOptions.Parse(args);
+var runtimeConfig = MimirRuntimeConfiguration.Load();
+using var hub = new MimirSynchronizationHub(runtimeConfig.Settings);
+var sourceErrors = new List