@blueharford/scrypted-spatial-awareness 0.2.0 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/main.nodejs.js +1 -1
- package/dist/main.nodejs.js.map +1 -1
- package/dist/plugin.zip +0 -0
- package/out/main.nodejs.js +5 -5
- package/out/main.nodejs.js.map +1 -1
- package/out/plugin.zip +0 -0
- package/package.json +1 -1
- package/src/core/spatial-reasoning.ts +1 -1
- package/src/models/topology.ts +4 -4
package/dist/plugin.zip
CHANGED
|
Binary file
|
package/out/main.nodejs.js
CHANGED
|
@@ -35108,7 +35108,7 @@ class SpatialReasoningEngine {
|
|
|
35108
35108
|
});
|
|
35109
35109
|
}
|
|
35110
35110
|
// Landmark contexts
|
|
35111
|
-
for (const landmark of this.topology.landmarks) {
|
|
35111
|
+
for (const landmark of this.topology.landmarks || []) {
|
|
35112
35112
|
this.contextChunks.push({
|
|
35113
35113
|
id: `landmark_${landmark.id}`,
|
|
35114
35114
|
type: 'landmark',
|
|
@@ -37954,7 +37954,7 @@ function findCamera(topology, deviceId) {
|
|
|
37954
37954
|
}
|
|
37955
37955
|
/** Finds a landmark by ID */
|
|
37956
37956
|
function findLandmark(topology, landmarkId) {
|
|
37957
|
-
return topology.landmarks
|
|
37957
|
+
return topology.landmarks?.find(l => l.id === landmarkId);
|
|
37958
37958
|
}
|
|
37959
37959
|
/** Finds connections from a camera */
|
|
37960
37960
|
function findConnectionsFrom(topology, cameraId) {
|
|
@@ -38012,7 +38012,7 @@ function inferRelationships(topology, proximityThreshold = 50) {
|
|
|
38012
38012
|
entities.push({ id: camera.deviceId, position: camera.floorPlanPosition, type: 'camera' });
|
|
38013
38013
|
}
|
|
38014
38014
|
}
|
|
38015
|
-
for (const landmark of topology.landmarks) {
|
|
38015
|
+
for (const landmark of topology.landmarks || []) {
|
|
38016
38016
|
entities.push({ id: landmark.id, position: landmark.position, type: 'landmark' });
|
|
38017
38017
|
}
|
|
38018
38018
|
// Find adjacent entities based on proximity
|
|
@@ -38043,9 +38043,9 @@ function generateTopologyDescription(topology) {
|
|
|
38043
38043
|
lines.push(`Front of property faces ${topology.property.frontFacing}.`);
|
|
38044
38044
|
}
|
|
38045
38045
|
// Landmarks
|
|
38046
|
-
if (topology.landmarks
|
|
38046
|
+
if (topology.landmarks?.length > 0) {
|
|
38047
38047
|
lines.push('\nLandmarks on property:');
|
|
38048
|
-
for (const landmark of topology.landmarks) {
|
|
38048
|
+
for (const landmark of topology.landmarks || []) {
|
|
38049
38049
|
let desc = `- ${landmark.name} (${landmark.type})`;
|
|
38050
38050
|
if (landmark.description)
|
|
38051
38051
|
desc += `: ${landmark.description}`;
|