Carry Mimir branding through repo

This commit is contained in:
Meta Vens 2026-05-21 10:27:09 +01:00
commit 5960c700db
62 changed files with 937 additions and 142 deletions

View file

@ -1,8 +1,8 @@
# Aquarium Spatial Audio
# Aquarium Spatial Audio
## Objective
Publish the live spatial audio field through the same typed state discipline as the splat renderer. Aquarium consumes the AmbiX bus and hands it to native Faust DSP; LocalCastBridge owns capture, sync, calibration, and stream timing.
Publish the live spatial audio field through the same typed state discipline as the splat renderer. Aquarium consumes the AmbiX bus and hands it to native Faust DSP; Mimir owns capture, sync, calibration, and stream timing.
## Current Mechanism
@ -88,8 +88,8 @@ the next OBS-facing publisher.
## Invariants
- Aquarium owns rendering and Faust DSP, not microphone capture or clock correction.
- LocalCastBridge publishes declared AmbiX blocks for the spatial bed and aligned six-mic blocks for Faust voice separation. Unaligned heterogeneous microphones still do not cross this boundary.
- LocalCastBridge publishes source-event geometry separately from AmbiX audio; render effects do not have to infer transient positions from the sound bed.
- Mimir publishes declared AmbiX blocks for the spatial bed and aligned six-mic blocks for Faust voice separation. Unaligned heterogeneous microphones still do not cross this boundary.
- Mimir publishes source-event geometry separately from AmbiX audio; render effects do not have to infer transient positions from the sound bed.
- Faust owns the voice-separation graph once the aligned mic field has crossed into Aquarium. Python may publish controls and telemetry, but it must not become the hot separation engine.
- Aquarium/Spout packaging selects audio source events against each visual frame's `audio_alignment_time_ns`; OBS should receive the already synchronized output rather than trying to align independent media sources.
- The audio frame carries `start_sample` and `audio_time_ns` so visual packets can align against the same bounded-latency timeline.

View file

@ -1,4 +1,4 @@
# Architecture
# Architecture
## Objective

View file

@ -1,4 +1,4 @@
# Audio Field Spine
# Audio Field Spine
## Objective
@ -255,7 +255,7 @@ The audio code is split so the hard parts can be tested without the room, driver
- `audio_field.phase_meaning` owns live extraction of meaning from phase/chirplet evidence. It consumes known reference audio plus aligned mic windows, keeps the smoothed phase/frequency state internal, and emits only actionable state for alignment, suppression, and probe control.
- Room suppression owns stream-side cleanup: dialogue anchors define desired direct energy, spatial/context mics act as witnesses for room and transient clutter, and the cleaned aligned field feeds FOA/Aquarium/Faust.
- Source-event analysis owns non-vocal spatial facts: dialogue focus weights and localized transient vectors are published beside the AmbiX bed, not hidden inside it.
- Aquarium/Faust owns the hot voice-separation graph after `localcast.audio.mic_field`; LocalCastBridge owns alignment, timing, roles, and control publication.
- Aquarium/Faust owns the hot voice-separation graph after `localcast.audio.mic_field`; Mimir owns alignment, timing, roles, and control publication.
- `scripts/audio_field.py` stays as the operator CLI and hardware probe surface.
This is the portfolio-piece line: each module owns one invariant, and the tests use mocks/fakes instead of asking a driver stack to please be emotionally available.

View file

@ -1,4 +1,4 @@
# Implementation Plan
# Implementation Plan
## Current Cut Line
@ -13,10 +13,28 @@ The native reservoir is now one time-ordered rolling buffer with typed views.
The previous shared-edge typed rings proved the retention invariant; the new
shape removes independent per-kind storage from the live foundation.
The v1 OBS bridge is now gated by a bounded smoke-test witness ledger. No
plugin/native receiver expansion is justified until
`calibration/runs/obs-v1-smoke-ledger.json` records sender capture, SRT receive,
and OBS presentation timestamps for every planned endpoint with bounded drift,
latency, and confidence.
## Implemented
- Mimir public identity and repo Face:
- `README.md` now presents the project as Mimir: local sensors, coherent
field.
- `Mimir.png` is the user-repixelized 256px avatar source.
- `assets/branding/mimir-avatar-256.png` is the project branding copy.
- `.voidbot/voice/mimir.png` and `.voidbot/voice/identity.json` are the
VoidBot-facing persona surfaces for the Mimir Face.
- `.voidbot/state/mimir.cc` is the typed persistent Face state. It is seeded
with durable birth memories for Mimir identity, native-reservoir target,
ownership boundaries, audio-field discipline, and heartbeat agency pressure.
- `docs/mimir-face.md` defines Mimir's jurisdiction, voice, heartbeat
behavior, and inherited memories. VoidBot is only the mouth/scheduler.
- Perfect Machine contract:
- `docs/perfect-machine.md` defines the target native machine: one five-second spatiotemporal reservoir, Aquarium-owned dense visual fusion/material/brush rendering, Faust-owned hot audio DSP, OBS-owned broadcast controls, and LocalCastBridge-owned calibration/config/status.
- `docs/perfect-machine.md` defines the target native machine: one five-second spatiotemporal reservoir, Aquarium-owned dense visual fusion/material/brush rendering, Faust-owned hot audio DSP, OBS-owned broadcast controls, and Mimir-owned calibration/config/status.
- `config/perfect-machine.example.json` declares the contract shape for six cameras, six microphones, reservoir typed views, native authorities, outputs, and the demotion of bridge scripts to tooling.
- `native/reservoir` is the first native Rust crate. It implements one
shared-edge five-second rolling buffer with typed views and proves that
@ -51,12 +69,12 @@ shape removes independent per-kind storage from the live foundation.
- Sender device discovery script.
- Sender launch script with dry-run mode and per-source FFmpeg commands.
- OBS receiver setup notes.
- Neighbor sender deployment under `C:\Meta\LocalCastBridge`.
- Neighbor sender deployment under `C:\Meta\Mimir`.
- Madman's desktop start/stop launchers for the sender.
- Receiver OBS scene has `Neighbor PC - Video` and `Neighbor PC - Focusrite` Media Sources.
- Direct co-streamer loopback capture is now attempted with the repo WASAPI shim instead of Voicemeeter.
- Receiver OBS scene has `Neighbor PC - System Audio` on SRT port `5102`.
- Sender script uses `-nostdin` and repo-root logs so desktop launchers stay alive and diagnostics land in `C:\Meta\LocalCastBridge\logs`.
- Sender script uses `-nostdin` and repo-root logs so desktop launchers stay alive and diagnostics land in `C:\Meta\Mimir\logs`.
- Sender video config is `1920x1080` for the interactive desktop. The `1024x768` SSH session size is not the streaming target.
- Desktop `.cmd` launchers delegate to PowerShell wrappers so paths with spaces and apostrophes are handled in one place.
- Audio-field sidecar profile and tool:
@ -94,11 +112,19 @@ shape removes independent per-kind storage from the live foundation.
- `docs/typed-visual-state.md` documents the diagnostic CultCache file shape
and the CultNet visual schema target.
- OBS synchronized program surface:
- `scripts/obs_smoke_test.py` creates the v1 OBS smoke-test endpoint plan,
event template, and witness ledger.
- `localcast.obs_smoke` owns the pure endpoint planning and ledger summary
logic: per-stage timestamps, matched end-to-end latency, endpoint drift, and
confidence.
- `docs/obs-v1-smoke-test.md` is the runbook for collecting
`sender_capture`, `srt_receive`, and `obs_present` evidence before receiver
expansion.
- `scripts/setup_obs_synced_program.py` derives OBS-controllable stems from an aligned program audio timeline: host voice, co-streamer voice, ambient, transients, co-streamer loopback, and local loopback.
- `scripts/capture_co_streamer_surfaces.py` captures neighbor Focusrite and neighbor loopback with local loopback ground truth, estimates the late remote-family offset, and writes aligned co-streamer surfaces for the stem packer.
- `scripts/wasapi-loopback-capture.ps1` is the direct primary-playback loopback path. It must run in the neighbor's interactive console session; SSH-only capture sees the device but receives no render packets.
- The tool creates/updates local OBS Media Sources for those stems and mutes/disables raw unsynchronized inputs.
- Strict mode disables every scene item except the synchronized LocalCastBridge program video and stem controls.
- Strict mode disables every scene item except the synchronized Mimir program video and stem controls.
- Live phase-field meaning:
- `audio_field.phase_meaning` extracts actionable delay, coherence, confidence, suppression, correction-energy, and active-probe need from internal phase/chirplet evidence.
- `localcast.audio.phase_field` is a typed CultCache document at `calibration/runs/audio-phase-field.msgpack`.
@ -116,6 +142,8 @@ shape removes independent per-kind storage from the live foundation.
## Temporary
- Audio and video are separate SRT endpoints. This preserves OBS mixing authority but may need latency tuning.
- The OBS v1 smoke ledger currently owns the receiver expansion gate. Until a
real run passes, endpoint coherence is unknown rather than assumed.
- Audio defaults to AAC inside MPEG-TS for compatibility; test Opus later only if there is a concrete reason.
- Desktop capture uses `gdigrab` first because it is broadly available. `ddagrab` is a candidate once the installed FFmpeg build is confirmed.
- The scripts assume Windows sender and OBS receiver on the same LAN.
@ -151,3 +179,5 @@ shape removes independent per-kind storage from the live foundation.
spatialization, and stem generation into Faust/native DSP.
6. Keep FFmpeg/SRT scripts as simple LAN ingest/capture utilities, not the
synchronized program authority.
7. Run the v1 OBS smoke test against the actual sender/receiver setup and keep
the ledger as evidence before any receiver/plugin/native OBS expansion.

View file

@ -1,4 +1,4 @@
# Mimir Face
# Mimir Face
![Mimir avatar](../assets/branding/mimir-avatar-256.png)
@ -39,10 +39,10 @@ Mimir must not:
## Prime Memory
Mimir's public name is Mimir. The implementation still contains
`LocalCastBridge` and `localcast` names where they are already part of scripts,
ABIs, paths, and compatibility surfaces. Rename public-facing prose first.
Rename code only when the ownership boundary is clear.
Mimir's public name is Mimir. The implementation still contains `localcast`
names where they are already part of scripts, schemas, ABIs, paths, and
compatibility surfaces. Rename public-facing prose first. Rename code only when
the ownership boundary is clear.
Mimir exists to turn cameras, microphones, speakers, timing signals, and
distributed capture surfaces into one realtime coherent volumetric field. The
@ -156,7 +156,7 @@ a monitoring daemon.
These are the lessons Mimir should remember at birth:
- The repo began as LocalCastBridge, a LAN OBS bridge for a second Windows PC.
- The repo began as a LAN OBS bridge for a second Windows PC.
That scaffold is still useful, but it is no longer the product story.
- The public brand is now Mimir: local sensors, coherent field.
- The finished 256px avatar is `assets/branding/mimir-avatar-256.png`; the root

View file

@ -1,4 +1,4 @@
# Native Rebuild Plan
# Native Rebuild Plan
This is the cut line after the architectural teardown.
@ -14,7 +14,7 @@ to extend the deadline bridge.
Make the second PC available in OBS as synchronized program video plus
separately controllable audio while preserving the real ownership model:
- LocalCastBridge owns config, calibration, contract tests, launch, status, and
- Mimir owns config, calibration, contract tests, launch, status, and
CultNet schema.
- One native runtime owns live sample timing and retention.
- Aquarium owns GPU visual fusion, material/brush/splat rendering, and Spout2

View file

@ -1,10 +1,10 @@
# Neighbor Sender Setup
# Neighbor Sender Setup
## Host
- Sender: `192.168.1.84` / `DESKTOP-M9FTRLL`
- SSH: `ssh "madman's lullaby@192.168.1.84"`
- Install root: `C:\Meta\LocalCastBridge`
- Install root: `C:\Meta\Mimir`
- Receiver OBS workstation: `192.168.1.66`
## Installed State
@ -25,7 +25,7 @@
Live local config on the sender:
```text
C:\Meta\LocalCastBridge\config\localcast.json
C:\Meta\Mimir\config\localcast.json
```
Current endpoints:
@ -66,8 +66,8 @@ The pre-edit backup is next to the scene file with a
Madman's desktop has:
```text
C:\Users\Madman's Lullaby\Desktop\Start LocalCast Sender.cmd
C:\Users\Madman's Lullaby\Desktop\Stop LocalCast Sender.cmd
C:\Users\Madman's Lullaby\Desktop\Start Mimir Sender.cmd
C:\Users\Madman's Lullaby\Desktop\Stop Mimir Sender.cmd
```
Start launcher:
@ -79,7 +79,7 @@ Start launcher:
winget alias is not reliably available in interactive `cmd.exe`
- sets Windows default render to `Focusrite USB Audio\Device\Speakers\Render`
- sets Windows default capture to `Focusrite USB Audio\Device\Analogue 1 + 2\Capture`
- writes FFmpeg logs under `C:\Meta\LocalCastBridge\logs`
- writes FFmpeg logs under `C:\Meta\Mimir\logs`
Stop launcher:
@ -121,7 +121,7 @@ can fail with `Failed to capture image (error 5)`. The sender video process
must be launched from Madman's interactive desktop, normally through:
```text
C:\Users\Madman's Lullaby\Desktop\Start LocalCast Sender.cmd
C:\Users\Madman's Lullaby\Desktop\Start Mimir Sender.cmd
```
Attached SSH probes are still useful for audio devices and SRT reachability.

View file

@ -28,6 +28,22 @@ If using a passphrase, append:
OBS should be open before the sender starts if OBS is the SRT listener. If a source gets wedged, deactivate and reactivate the Media Source before changing ports; port churn is a symptom, not a configuration strategy.
## V1 Smoke Gate
Before adding receiver plugins, native OBS surfaces, or new bridge elegance, run
the bounded witness ledger in `docs/obs-v1-smoke-test.md`.
The required artifact is:
```text
calibration/runs/obs-v1-smoke-ledger.json
```
It must include `sender_capture`, `srt_receive`, and `obs_present` evidence for
every planned endpoint, plus endpoint drift, end-to-end latency, and confidence.
If the ledger fails, fix the clocks before expanding the receiver. The field may
be charming while lying. Still a liar.
## Synchronization
The video SRT source is a timed media artifact in the Aquarium path, not just

View file

@ -1,10 +1,10 @@
# OBS Spout Streaming
# OBS Spout Streaming
## Current Status
The Python/OpenGL Spout sender has been deleted.
LocalCastBridge no longer carries a runnable OpenGL publication path. The only
Mimir no longer carries a runnable OpenGL publication path. The only
surviving pieces are diagnostic packet/brush math in
`localcast.diagnostics.render_math` and typed diagnostic visual documents in
`localcast.diagnostics.visual_cache`.
@ -25,7 +25,7 @@ native rolling reservoir
## Invariants
- OBS receives a named Spout2 texture from Aquarium, not Python/OpenGL.
- LocalCastBridge may expose diagnostic typed documents and CPU render math, but
- Mimir may expose diagnostic typed documents and CPU render math, but
it does not own the production renderer.
- JSON remains a diagnostic/status surface only.
- The neighbor SRT video feed is a timed media artifact and must share the same

85
docs/obs-v1-smoke-test.md Normal file
View file

@ -0,0 +1,85 @@
# OBS V1 Smoke Test
No plugin/native receiver work gets promoted until this ledger exists for the
plain FFmpeg/SRT OBS path.
The smoke test is deliberately small:
- `sender_capture`: sender-side flash/chirp or packet-origin timestamp.
- `srt_receive`: receiver-side stream arrival timestamp.
- `obs_present`: OBS preview/recording presentation timestamp.
- endpoint drift: media-time slope versus receiver monotonic time.
- end-to-end latency: matched `eventId` from `sender_capture` to `obs_present`.
- confidence: stage coverage, observation count, event confidence, latency, and drift.
The output ledger is `calibration/runs/obs-v1-smoke-ledger.json`. A passing
ledger sets `gate.pluginOrNativeReceiverExpansionAllowed` to `true`. Anything
else means the bridge is still talking without enough clocks. Adorable, but no.
## Run
From the repo root:
```powershell
& 'C:\Users\Meta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\python.exe' .\scripts\obs_smoke_test.py --config .\config\localcast.json plan
& 'C:\Users\Meta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\python.exe' .\scripts\obs_smoke_test.py --config .\config\localcast.json template-events
```
Edit `calibration/runs/obs-v1-smoke-events.jsonl` with real observations from
one bounded pass. Use the same `eventId` for the same visible flash or audible
chirp as it moves through stages.
Then summarize:
```powershell
& 'C:\Users\Meta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\python.exe' .\scripts\obs_smoke_test.py --config .\config\localcast.json summarize
```
## Event Shape
Each line is one JSON object:
```json
{
"endpoint": "video",
"stage": "obs_present",
"eventId": "video-flash-001",
"monotonicNs": 1000180000000,
"wallTimeNs": null,
"mediaTimeNs": 180000000,
"confidence": 0.9,
"note": "OBS recording frame containing flash"
}
```
Required stages are:
- `sender_capture`
- `srt_receive`
- `obs_present`
`monotonicNs` is mandatory because wall clocks lie casually. `wallTimeNs` is
optional human correlation only. `mediaTimeNs` is optional for individual events,
but drift confidence needs at least two receiver-side media-time observations.
## Thresholds
Defaults:
- maximum absolute endpoint drift: `100 ppm`
- maximum end-to-end latency: `500 ms`
Override them when running the summary:
```powershell
& 'C:\Users\Meta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\python.exe' .\scripts\obs_smoke_test.py --config .\config\localcast.json --max-abs-drift-ppm 50 --max-latency-ms 350 summarize
```
## Interpretation
`status: ok` means every planned endpoint has enough timestamp evidence for this
bounded pass. It does not prove the native reservoir is done. It proves the v1
OBS bridge has a clocked witness.
`status: fail` means stop bridge expansion and fix the missing or drifting
stage first.

View file

@ -1,4 +1,4 @@
# Perfect Machine
# Perfect Machine
## Objective
@ -41,7 +41,7 @@ not the runtime API.
brush/splat generation, final render target, and Spout publication.
- Faust owns hot audio DSP: voice separation, room suppression, Ambisonic/HOA
spatialization, and loopback/source stem generation.
- LocalCastBridge owns configuration, calibration, typed contracts, launch,
- Mimir owns configuration, calibration, typed contracts, launch,
status, persistence, and compatibility surfaces.
## Native Runtime Shape

View file

@ -1,4 +1,4 @@
# Sensor Fusion Architecture
# Sensor Fusion Architecture
## Objective
@ -79,7 +79,7 @@ flowchart TD
camera projection, brush lowering, and CPU rasterization. It has unit tests
and does not require a GPU context.
- `scripts/sensor_fusion.py` owns CLI composition for offline observation files.
- The Python/OpenGL Spout publisher has been deleted. No LocalCastBridge Python
- The Python/OpenGL Spout publisher has been deleted. No Mimir Python
module owns OBS publication.
- `config/sensor-fusion.example.json` owns the declarative rig shape: capture hints, intrinsics, extrinsics, latency, and fusion thresholds.
@ -137,12 +137,12 @@ OBS should see a named Spout sender, not a camera window, file tail, or desktop
The intended production handoff is:
```text
LocalCastBridge TrackCache
Mimir TrackCache
-> CultCache render-frame document
-> Aquarium Engine typed runtime state
-> GPU point/brush/splat buffer
-> D3D render target
-> Spout2 sender named "LocalCastBridge Point Cloud"
-> Spout2 sender named "Mimir Point Cloud"
-> OBS Spout2 Capture source
```

View file

@ -1,4 +1,4 @@
# Diagnostic Typed Visual State
# Diagnostic Typed Visual State
## Objective
@ -87,7 +87,7 @@ channels before publication so the downstream accumulator can use Leap as the
strongest timing/motion witness without pretending the packed image is one
ordinary RGB camera.
LocalCastBridge does not own the final splat budget. It publishes dense typed
Mimir does not own the final splat budget. It publishes dense typed
claims with stable keys and timestamps; Aquarium owns temporal accumulation,
renderer residency, and any GPU-side reduction needed to make million-splat
frames presentable.