rhombus-node-mcp 0.1.15 → 0.1.16
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/README.md +9 -1
- package/dist/api/camera-tool-api.js +108 -0
- package/dist/api/clips-tool-api.js +36 -0
- package/dist/api/create-camera-policy-tool-api.js +9 -0
- package/dist/api/create-tool-api.js +53 -0
- package/dist/api/entity-lookup-tool-api.js +37 -0
- package/dist/api/events-tool-api.js +320 -0
- package/dist/api/faces-tool-api.js +110 -0
- package/dist/api/get-entity-tool-api.js +176 -0
- package/dist/api/get-org-information-tool-api.js +9 -0
- package/dist/api/location-tool-api.js +9 -0
- package/dist/api/lpr-tool-api.js +68 -0
- package/dist/api/policy-alerts-tool-api.js +42 -0
- package/dist/api/reboot-cameras-tool-api.js +34 -0
- package/dist/api/report-tool-api.js +426 -0
- package/dist/api/time-tool-api.js +90 -0
- package/dist/api/update-tool-api.js +148 -0
- package/dist/createServer.js +7 -1
- package/dist/disabled-tools/endpoint-to-keys-tool.js +84 -0
- package/dist/disabled-tools/semantic-search-tool.js +90 -0
- package/dist/index.js +3 -5
- package/dist/logger.js +4 -3
- package/dist/network.js +42 -15
- package/dist/resources/routes.json.js +1 -1
- package/dist/services/embedding-service.js +153 -0
- package/dist/services/faiss-search-service.js +261 -0
- package/dist/tools/camera-tool.js +100 -0
- package/dist/tools/clips-tool.js +23 -37
- package/dist/tools/count-tool.js +25 -0
- package/dist/tools/create-camera-policy-tool.js +214 -0
- package/dist/tools/create-tool.js +25 -74
- package/dist/tools/entity-lookup-tool.js +35 -0
- package/dist/tools/events-tool.js +188 -92
- package/dist/tools/faces-tool.js +59 -132
- package/dist/tools/get-entity-tool.js +78 -0
- package/dist/tools/get-org-information-tool.js +18 -0
- package/dist/tools/location-tool.js +24 -31
- package/dist/tools/lpr-tool.js +71 -0
- package/dist/tools/policy-alerts-tool.js +32 -42
- package/dist/tools/reboot-cameras-tool.js +34 -0
- package/dist/tools/report-tool.js +190 -0
- package/dist/tools/time-conversion-tool.js +43 -0
- package/dist/tools/time-tool.js +17 -57
- package/dist/tools/update-tool.js +262 -0
- package/dist/transports/streamable-http.js +160 -57
- package/dist/{tools/devices/camera-tool/types.js → types/camera-tool-types.js} +13 -0
- package/dist/types/clips-tool-types.js +41 -0
- package/dist/types/create-camera-policy-tool-types.js +44 -0
- package/dist/types/create-tool-types.js +8 -0
- package/dist/types/deviceType.js +1 -0
- package/dist/types/endpoint-to-keys-tool-types.js +7 -0
- package/dist/types/entity-lookup-tool-types.js +70 -0
- package/dist/types/events-tools-types.js +257 -0
- package/dist/types/faces-tools-types.js +143 -0
- package/dist/types/get-entity-tool-types.js +25 -0
- package/dist/types/get-org-information-tool-types.js +3 -0
- package/dist/types/location-tool-types.js +11 -0
- package/dist/types/lpr-tool-types.js +97 -0
- package/dist/types/policy-alerts-tool-types.js +74 -0
- package/dist/types/reboot-cameras-tool-types.js +8 -0
- package/dist/types/report-tool-types.js +268 -0
- package/dist/types/schema-components.js +7093 -0
- package/dist/types/schema.js +1 -0
- package/dist/types/semantic-search-tool-types.js +5 -0
- package/dist/types/time-conversion-tool-types.js +8 -0
- package/dist/types/time-tool-types.js +11 -0
- package/dist/types/update-tool-types.js +186 -0
- package/dist/types/zod-schemas.js +21315 -0
- package/dist/types.js +17 -7
- package/dist/util.js +94 -2
- package/dist/utils/confirmation.js +1 -1
- package/dist/utils/reduce-output.js +35 -0
- package/dist/utils/remove-nulls.js +28 -0
- package/dist/utils/temp.js +8 -0
- package/dist/utils/timestampInput.js +12 -0
- package/package.json +23 -3
- package/dist/tools/devices/camera-tool/camera-tool.js +0 -218
- package/dist/tools/devices/get-entity-tool.js +0 -118
- package/dist/tools/get-org-information.js +0 -17
- package/dist/tools/reboot-cameras.js +0 -62
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export const TOOL_ARGS = {
|
|
3
|
+
time_to_convert: z.union([
|
|
4
|
+
z.string(),
|
|
5
|
+
z.number(),
|
|
6
|
+
]).describe("The time to convert. This can be either an ISO 8601 timestamp string (e.g., '2023-10-05T14:48:00.000Z') or a Unix timestamp in milliseconds."),
|
|
7
|
+
};
|
|
8
|
+
const TOOL_ARGS_SCHEMA = z.object(TOOL_ARGS);
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export const TOOL_ARGS = {
|
|
3
|
+
time_description: z
|
|
4
|
+
.string()
|
|
5
|
+
.describe("A natural language description of the time (e.g., '2pm today', 'tomorrow at noon')."),
|
|
6
|
+
timezone: z
|
|
7
|
+
.string()
|
|
8
|
+
.nullable()
|
|
9
|
+
.describe("Optional IANA timezone string (e.g., 'America/Los_Angeles', 'UTC'). Will default to system timezone if not provided."),
|
|
10
|
+
};
|
|
11
|
+
const TOOL_ARGS_SCHEMA = z.object(TOOL_ARGS);
|
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
// Define the entity types that can be updated
|
|
3
|
+
export const ENTITY_TYPE = z.enum([
|
|
4
|
+
"camera",
|
|
5
|
+
"climate-sensor",
|
|
6
|
+
"door-controller",
|
|
7
|
+
"environmental-gateway",
|
|
8
|
+
]);
|
|
9
|
+
// Camera-specific update schemas
|
|
10
|
+
export const CameraVideoSettings = z.object({
|
|
11
|
+
hdr_enabled: z.boolean().optional().describe("Enable HDR (High Dynamic Range)"),
|
|
12
|
+
img_brightness: z
|
|
13
|
+
.number()
|
|
14
|
+
.min(-255)
|
|
15
|
+
.max(255)
|
|
16
|
+
.optional()
|
|
17
|
+
.describe("Image brightness adjustment (-255 to 255)"),
|
|
18
|
+
img_contrast: z.number().min(0).max(128).optional().describe("Image contrast (0 to 128)"),
|
|
19
|
+
img_saturation: z.number().min(0).max(255).optional().describe("Image saturation (0 to 255)"),
|
|
20
|
+
img_sharpness: z.number().min(0).max(255).optional().describe("Image sharpness (0 to 255)"),
|
|
21
|
+
resolution: z
|
|
22
|
+
.object({
|
|
23
|
+
width: z.number().int().positive().optional(),
|
|
24
|
+
height: z.number().int().positive().optional(),
|
|
25
|
+
})
|
|
26
|
+
.optional()
|
|
27
|
+
.describe("Video resolution (width x height)"),
|
|
28
|
+
wdr_enabled: z.boolean().optional().describe("Enable Wide Dynamic Range"),
|
|
29
|
+
wdr_strength: z.number().min(0).max(128).optional().describe("WDR strength (0 to 128)"),
|
|
30
|
+
video_persist_disabled: z.boolean().optional().describe("Disable video persistence"),
|
|
31
|
+
zero_motion_video_bitrate_percent: z
|
|
32
|
+
.number()
|
|
33
|
+
.min(0)
|
|
34
|
+
.max(100)
|
|
35
|
+
.optional()
|
|
36
|
+
.describe("Zero motion video bitrate percentage"),
|
|
37
|
+
// Night mode settings
|
|
38
|
+
night_img_brightness: z
|
|
39
|
+
.number()
|
|
40
|
+
.min(-255)
|
|
41
|
+
.max(255)
|
|
42
|
+
.optional()
|
|
43
|
+
.describe("Night mode brightness (-255 to 255)"),
|
|
44
|
+
night_img_contrast: z
|
|
45
|
+
.number()
|
|
46
|
+
.min(0)
|
|
47
|
+
.max(128)
|
|
48
|
+
.optional()
|
|
49
|
+
.describe("Night mode contrast (0 to 128)"),
|
|
50
|
+
night_img_saturation: z
|
|
51
|
+
.number()
|
|
52
|
+
.min(0)
|
|
53
|
+
.max(255)
|
|
54
|
+
.optional()
|
|
55
|
+
.describe("Night mode saturation (0 to 255)"),
|
|
56
|
+
night_img_sharpness: z
|
|
57
|
+
.number()
|
|
58
|
+
.min(0)
|
|
59
|
+
.max(255)
|
|
60
|
+
.optional()
|
|
61
|
+
.describe("Night mode sharpness (0 to 255)"),
|
|
62
|
+
});
|
|
63
|
+
export const CameraAudioSettings = z.object({
|
|
64
|
+
audio_record: z.boolean().optional().describe("Enable audio recording"),
|
|
65
|
+
device_mic_enabled: z.boolean().optional().describe("Enable device microphone"),
|
|
66
|
+
device_speaker_enabled: z.boolean().optional().describe("Enable device speaker"),
|
|
67
|
+
audio_internal_mic_volume: z
|
|
68
|
+
.number()
|
|
69
|
+
.min(0)
|
|
70
|
+
.max(100)
|
|
71
|
+
.optional()
|
|
72
|
+
.describe("Internal microphone volume (0-100)"),
|
|
73
|
+
audio_internal_speaker_volume: z
|
|
74
|
+
.number()
|
|
75
|
+
.min(0)
|
|
76
|
+
.max(100)
|
|
77
|
+
.optional()
|
|
78
|
+
.describe("Internal speaker volume (0-100)"),
|
|
79
|
+
});
|
|
80
|
+
export const CameraDeviceSettings = z.object({
|
|
81
|
+
camera_name: z.string().optional().describe("Camera display name"),
|
|
82
|
+
camera_timezone: z.string().optional().describe("Camera timezone (e.g., 'America/Los_Angeles')"),
|
|
83
|
+
led_intensity: z.number().min(0).max(100).optional().describe("LED intensity (0-100)"),
|
|
84
|
+
led_mode: z
|
|
85
|
+
.enum(["auto", "always_on", "always_off"])
|
|
86
|
+
.optional()
|
|
87
|
+
.describe("LED mode - use 'always_off' to turn LED off"),
|
|
88
|
+
led_stealth_mode: z
|
|
89
|
+
.boolean()
|
|
90
|
+
.optional()
|
|
91
|
+
.describe("Enable stealth mode to turn off LED completely - set to true to turn LED off"),
|
|
92
|
+
});
|
|
93
|
+
// Input schema for the tool
|
|
94
|
+
export const TOOL_ARGS = {
|
|
95
|
+
entityType: ENTITY_TYPE.describe("Type of entity to update"),
|
|
96
|
+
entityUuid: z.string().nullable().describe("UUID of the entity to update"),
|
|
97
|
+
// Camera-specific update fields
|
|
98
|
+
cameraVideoSettings: z
|
|
99
|
+
.string()
|
|
100
|
+
.nullable()
|
|
101
|
+
.describe("JSON string of video settings to update for camera"),
|
|
102
|
+
cameraAudioSettings: z
|
|
103
|
+
.string()
|
|
104
|
+
.nullable()
|
|
105
|
+
.describe("JSON string of audio settings to update for camera"),
|
|
106
|
+
cameraDeviceSettings: z
|
|
107
|
+
.string()
|
|
108
|
+
.nullable()
|
|
109
|
+
.describe("JSON string of device settings to update for camera"),
|
|
110
|
+
// Step tracking for multi-step updates
|
|
111
|
+
step: z
|
|
112
|
+
.enum(["entity-selection", "settings-configuration", "confirmation"])
|
|
113
|
+
.nullable()
|
|
114
|
+
.describe("Current step in the update process"),
|
|
115
|
+
};
|
|
116
|
+
const TOOL_ARGS_SCHEMA = z.object(TOOL_ARGS);
|
|
117
|
+
// Output schema
|
|
118
|
+
export const OUTPUT_SCHEMA = z.object({
|
|
119
|
+
needUserInput: z.boolean().optional(),
|
|
120
|
+
message: z.string().optional(),
|
|
121
|
+
requestType: z.string().optional(),
|
|
122
|
+
submitAction: z.string().optional(),
|
|
123
|
+
entityType: z.string().optional(),
|
|
124
|
+
entityUuid: z.string().optional(),
|
|
125
|
+
currentSettings: z.any().optional(),
|
|
126
|
+
success: z.boolean().optional(),
|
|
127
|
+
error: z.string().optional(),
|
|
128
|
+
updatedSettings: z.any().optional(),
|
|
129
|
+
});
|
|
130
|
+
// API payload types
|
|
131
|
+
export const UpdateCameraConfigPayload = z.object({
|
|
132
|
+
configUpdate: z.object({
|
|
133
|
+
deviceUuid: z.string(),
|
|
134
|
+
videoFacetSettings: z
|
|
135
|
+
.record(z.string(), z.object({
|
|
136
|
+
hdr_enabled: z.boolean().nullable().optional(),
|
|
137
|
+
img_brightness: z.number().nullable().optional(),
|
|
138
|
+
img_contrast: z.number().nullable().optional(),
|
|
139
|
+
img_saturation: z.number().nullable().optional(),
|
|
140
|
+
img_sharpness: z.number().nullable().optional(),
|
|
141
|
+
resolution: z
|
|
142
|
+
.object({
|
|
143
|
+
width: z.number().nullable().optional(),
|
|
144
|
+
height: z.number().nullable().optional(),
|
|
145
|
+
})
|
|
146
|
+
.nullable()
|
|
147
|
+
.optional(),
|
|
148
|
+
wdr_enabled: z.boolean().nullable().optional(),
|
|
149
|
+
wdr_strength: z.number().nullable().optional(),
|
|
150
|
+
video_persist_disabled: z.boolean().nullable().optional(),
|
|
151
|
+
zero_motion_video_bitrate_percent: z.number().nullable().optional(),
|
|
152
|
+
night_img_brightness: z.number().nullable().optional(),
|
|
153
|
+
night_img_contrast: z.number().nullable().optional(),
|
|
154
|
+
night_img_saturation: z.number().nullable().optional(),
|
|
155
|
+
night_img_sharpness: z.number().nullable().optional(),
|
|
156
|
+
}))
|
|
157
|
+
.optional(),
|
|
158
|
+
audioFacetSettings: z
|
|
159
|
+
.record(z.string(), z.object({
|
|
160
|
+
audio_record: z.boolean().nullable().optional(),
|
|
161
|
+
device_mic_enabled: z.boolean().nullable().optional(),
|
|
162
|
+
device_speaker_enabled: z.boolean().nullable().optional(),
|
|
163
|
+
audio_internal_mic_volume: z.number().nullable().optional(),
|
|
164
|
+
audio_internal_speaker_volume: z.number().nullable().optional(),
|
|
165
|
+
}))
|
|
166
|
+
.optional(),
|
|
167
|
+
deviceSettings: z
|
|
168
|
+
.object({
|
|
169
|
+
camera_name: z.string().nullable().optional(),
|
|
170
|
+
camera_timezone: z.string().nullable().optional(),
|
|
171
|
+
led_intensity: z.number().nullable().optional(),
|
|
172
|
+
led_mode: z.string().nullable().optional(),
|
|
173
|
+
led_stealth_mode: z.boolean().nullable().optional(),
|
|
174
|
+
})
|
|
175
|
+
.optional(),
|
|
176
|
+
}),
|
|
177
|
+
});
|
|
178
|
+
// Helper function to parse faceted UUIDs
|
|
179
|
+
export function parseFacetedUuid(uuid) {
|
|
180
|
+
const parts = uuid.split(".");
|
|
181
|
+
if (parts.length === 2) {
|
|
182
|
+
return { baseUuid: parts[0], facet: parts[1] };
|
|
183
|
+
}
|
|
184
|
+
// Default to v0 facet if not specified
|
|
185
|
+
return { baseUuid: uuid, facet: "v0" };
|
|
186
|
+
}
|