mirror of
https://github.com/ruvnet/RuView.git
synced 2026-10-18 21:00:22 -05:00
Add virtual-view prototype: integrations/virtual-view/adapter.mjs
This commit is contained in:
1 parent
0ef6b96fe1
commit
2c7a0194f4
1 file changed
+15
@@ -0,0 +1,15 @@
|
||||
// Opt-in cross-repository prototype. Imports no hardware, network or model client.
|
||||
export function createVirtualViewAdapter({ broker, privateKey, enabled = false }) {
|
||||
if (typeof broker !== 'function' || typeof enabled !== 'boolean') throw new TypeError('adapter configuration');
|
||||
return Object.freeze({
|
||||
observe(snapshot) {
|
||||
if (!enabled) return { decision: 'BLOCK', reason: 'disabled', authority: 'none', svg: null };
|
||||
// Explicit metric scene contract only. RF Gaussians are not manipulation geometry.
|
||||
if (snapshot?.schema !== 'virtual-view.v1' || snapshot?.frame !== 'room_enu') {
|
||||
throw new TypeError('calibrated metric scene snapshot required; raw RF/LiDAR packets are not supported');
|
||||
}
|
||||
return broker(snapshot, { privateKey });
|
||||
},
|
||||
hardwareActuation: false,
|
||||
});
|
||||
}
|
||||
Reference in new issue
Block a user