@mhome/core-protocol 1.33.0 → 1.35.0
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
CHANGED
|
@@ -5,6 +5,13 @@ provider runtimes. Public `/app/*` contracts belong to
|
|
|
5
5
|
`mhome-app-facade-api`; this crate owns internal MWS, authentication, LLM,
|
|
6
6
|
Messaging normalization, Node runtime, and Storage contracts.
|
|
7
7
|
|
|
8
|
+
The additive [`client_identity`](contract/client-identity.md) contract separates
|
|
9
|
+
User and Space Client identity, installation ID and enrollment ID. Runtime ingress
|
|
10
|
+
has not yet cut over to this contract; operation authorization remains separate.
|
|
11
|
+
The additive [`space_access`](contract/space-access.md) contract defines the
|
|
12
|
+
READ/WRITE/MANAGE hierarchy and its pure User/Space Client decision. It does not
|
|
13
|
+
change runtime admission until adapters and operation classifications adopt it.
|
|
14
|
+
|
|
8
15
|
MWS uses standard WebSocket Ping/Pong control frames for connection liveness.
|
|
9
16
|
There are no application `pi`/`po` messages or auth `heartbeatInterval` field.
|
|
10
17
|
The transport owns heartbeat timing and reports authenticated local connection
|
|
@@ -14,7 +14,9 @@
|
|
|
14
14
|
"name": "watch set request",
|
|
15
15
|
"value": {
|
|
16
16
|
"deviceId": "camera-1",
|
|
17
|
-
"
|
|
17
|
+
"settings": {
|
|
18
|
+
"watchMode": "auto"
|
|
19
|
+
}
|
|
18
20
|
}
|
|
19
21
|
},
|
|
20
22
|
{
|
|
@@ -48,14 +50,19 @@
|
|
|
48
50
|
"source": "onvif"
|
|
49
51
|
}
|
|
50
52
|
],
|
|
51
|
-
"
|
|
53
|
+
"sources": [],
|
|
54
|
+
"cameraSettings": [
|
|
52
55
|
{
|
|
53
|
-
"ok": true,
|
|
54
56
|
"deviceId": "camera-1",
|
|
55
|
-
"
|
|
57
|
+
"revision": 1,
|
|
58
|
+
"settings": {
|
|
59
|
+
"watchMode": "off",
|
|
60
|
+
"objectDetectionMode": "off",
|
|
61
|
+
"personDetectionMode": "off",
|
|
62
|
+
"recordMode": "off"
|
|
63
|
+
}
|
|
56
64
|
}
|
|
57
|
-
]
|
|
58
|
-
"sources": []
|
|
65
|
+
]
|
|
59
66
|
}
|
|
60
67
|
},
|
|
61
68
|
{
|
|
@@ -77,9 +84,14 @@
|
|
|
77
84
|
{
|
|
78
85
|
"name": "watch response",
|
|
79
86
|
"value": {
|
|
80
|
-
"ok": true,
|
|
81
87
|
"deviceId": "camera-1",
|
|
82
|
-
"
|
|
88
|
+
"revision": 1,
|
|
89
|
+
"settings": {
|
|
90
|
+
"watchMode": "off",
|
|
91
|
+
"objectDetectionMode": "off",
|
|
92
|
+
"personDetectionMode": "off",
|
|
93
|
+
"recordMode": "off"
|
|
94
|
+
}
|
|
83
95
|
}
|
|
84
96
|
},
|
|
85
97
|
{
|
|
@@ -109,7 +121,7 @@
|
|
|
109
121
|
],
|
|
110
122
|
"devices": [],
|
|
111
123
|
"onlineStates": [],
|
|
112
|
-
"
|
|
124
|
+
"cameraSettings": []
|
|
113
125
|
}
|
|
114
126
|
}
|
|
115
127
|
],
|
|
@@ -136,8 +148,8 @@
|
|
|
136
148
|
}
|
|
137
149
|
],
|
|
138
150
|
"onlineStates": [],
|
|
139
|
-
"
|
|
140
|
-
"
|
|
151
|
+
"sources": [],
|
|
152
|
+
"cameraSettings": []
|
|
141
153
|
}
|
|
142
154
|
},
|
|
143
155
|
{
|
|
@@ -156,6 +168,22 @@
|
|
|
156
168
|
],
|
|
157
169
|
"onlineStates": []
|
|
158
170
|
}
|
|
171
|
+
},
|
|
172
|
+
{
|
|
173
|
+
"name": "empty patch",
|
|
174
|
+
"value": {
|
|
175
|
+
"deviceId": "camera-1",
|
|
176
|
+
"settings": {}
|
|
177
|
+
}
|
|
178
|
+
},
|
|
179
|
+
{
|
|
180
|
+
"name": "invalid mode",
|
|
181
|
+
"value": {
|
|
182
|
+
"deviceId": "camera-1",
|
|
183
|
+
"settings": {
|
|
184
|
+
"watchMode": "on"
|
|
185
|
+
}
|
|
186
|
+
}
|
|
159
187
|
}
|
|
160
188
|
]
|
|
161
189
|
}
|
package/manifest/core.v1.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"manifest": "mhome.core.v1",
|
|
3
|
-
"contractVersion": "1.
|
|
3
|
+
"contractVersion": "1.35.0",
|
|
4
4
|
"protocols": {
|
|
5
5
|
"agentGateway": {
|
|
6
6
|
"submitTarget": "/agent/submit",
|
|
@@ -28,9 +28,9 @@
|
|
|
28
28
|
"deviceList": "device/list",
|
|
29
29
|
"managementSnapshot": "management/snapshot",
|
|
30
30
|
"deviceRemove": "device/remove",
|
|
31
|
-
"
|
|
32
|
-
"
|
|
33
|
-
"
|
|
31
|
+
"sourceRemove": "source/remove",
|
|
32
|
+
"deviceSettingsGet": "device/settings/get",
|
|
33
|
+
"deviceSettingsUpdate": "device/settings/update"
|
|
34
34
|
},
|
|
35
35
|
"flows": {
|
|
36
36
|
"deviceAdd": "device.add"
|
package/package.json
CHANGED
package/protocol.json
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"$ref": "#/$defs/deviceIdRequest"
|
|
11
11
|
},
|
|
12
12
|
{
|
|
13
|
-
"$ref": "#/$defs/
|
|
13
|
+
"$ref": "#/$defs/deviceSettingsUpdateRequest"
|
|
14
14
|
},
|
|
15
15
|
{
|
|
16
16
|
"$ref": "#/$defs/managementSnapshot"
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"$ref": "#/$defs/deviceMutationResponse"
|
|
23
23
|
},
|
|
24
24
|
{
|
|
25
|
-
"$ref": "#/$defs/
|
|
25
|
+
"$ref": "#/$defs/deviceSettingsResponse"
|
|
26
26
|
},
|
|
27
27
|
{
|
|
28
28
|
"$ref": "#/$defs/errorResponse"
|
|
@@ -49,23 +49,6 @@
|
|
|
49
49
|
},
|
|
50
50
|
"additionalProperties": false
|
|
51
51
|
},
|
|
52
|
-
"watchSetRequest": {
|
|
53
|
-
"type": "object",
|
|
54
|
-
"required": [
|
|
55
|
-
"deviceId",
|
|
56
|
-
"enabled"
|
|
57
|
-
],
|
|
58
|
-
"properties": {
|
|
59
|
-
"deviceId": {
|
|
60
|
-
"type": "string",
|
|
61
|
-
"minLength": 1
|
|
62
|
-
},
|
|
63
|
-
"enabled": {
|
|
64
|
-
"type": "boolean"
|
|
65
|
-
}
|
|
66
|
-
},
|
|
67
|
-
"additionalProperties": false
|
|
68
|
-
},
|
|
69
52
|
"providerCatalogItem": {
|
|
70
53
|
"type": "object",
|
|
71
54
|
"required": [
|
|
@@ -183,34 +166,13 @@
|
|
|
183
166
|
},
|
|
184
167
|
"additionalProperties": false
|
|
185
168
|
},
|
|
186
|
-
"watchControlResponse": {
|
|
187
|
-
"type": "object",
|
|
188
|
-
"required": [
|
|
189
|
-
"ok",
|
|
190
|
-
"deviceId",
|
|
191
|
-
"enabled"
|
|
192
|
-
],
|
|
193
|
-
"properties": {
|
|
194
|
-
"ok": {
|
|
195
|
-
"type": "boolean"
|
|
196
|
-
},
|
|
197
|
-
"deviceId": {
|
|
198
|
-
"type": "string",
|
|
199
|
-
"minLength": 1
|
|
200
|
-
},
|
|
201
|
-
"enabled": {
|
|
202
|
-
"type": "boolean"
|
|
203
|
-
}
|
|
204
|
-
},
|
|
205
|
-
"additionalProperties": false
|
|
206
|
-
},
|
|
207
169
|
"managementSnapshot": {
|
|
208
170
|
"type": "object",
|
|
209
171
|
"required": [
|
|
210
172
|
"providers",
|
|
211
173
|
"devices",
|
|
212
174
|
"onlineStates",
|
|
213
|
-
"
|
|
175
|
+
"cameraSettings",
|
|
214
176
|
"sources"
|
|
215
177
|
],
|
|
216
178
|
"properties": {
|
|
@@ -232,16 +194,16 @@
|
|
|
232
194
|
"$ref": "#/$defs/onlineStateObservation"
|
|
233
195
|
}
|
|
234
196
|
},
|
|
235
|
-
"
|
|
197
|
+
"sources": {
|
|
236
198
|
"type": "array",
|
|
237
199
|
"items": {
|
|
238
|
-
"$ref": "#/$defs/
|
|
200
|
+
"$ref": "#/$defs/homeAssistantSource"
|
|
239
201
|
}
|
|
240
202
|
},
|
|
241
|
-
"
|
|
203
|
+
"cameraSettings": {
|
|
242
204
|
"type": "array",
|
|
243
205
|
"items": {
|
|
244
|
-
"$ref": "#/$defs/
|
|
206
|
+
"$ref": "#/$defs/deviceSettingsResponse"
|
|
245
207
|
}
|
|
246
208
|
}
|
|
247
209
|
},
|
|
@@ -359,6 +321,112 @@
|
|
|
359
321
|
}
|
|
360
322
|
},
|
|
361
323
|
"additionalProperties": false
|
|
324
|
+
},
|
|
325
|
+
"cameraSettings": {
|
|
326
|
+
"type": "object",
|
|
327
|
+
"properties": {
|
|
328
|
+
"watchMode": {
|
|
329
|
+
"enum": [
|
|
330
|
+
"off",
|
|
331
|
+
"auto"
|
|
332
|
+
]
|
|
333
|
+
},
|
|
334
|
+
"objectDetectionMode": {
|
|
335
|
+
"enum": [
|
|
336
|
+
"off",
|
|
337
|
+
"auto"
|
|
338
|
+
]
|
|
339
|
+
},
|
|
340
|
+
"personDetectionMode": {
|
|
341
|
+
"enum": [
|
|
342
|
+
"off",
|
|
343
|
+
"auto"
|
|
344
|
+
]
|
|
345
|
+
},
|
|
346
|
+
"recordMode": {
|
|
347
|
+
"enum": [
|
|
348
|
+
"off",
|
|
349
|
+
"event"
|
|
350
|
+
]
|
|
351
|
+
}
|
|
352
|
+
},
|
|
353
|
+
"additionalProperties": false,
|
|
354
|
+
"required": [
|
|
355
|
+
"watchMode",
|
|
356
|
+
"objectDetectionMode",
|
|
357
|
+
"personDetectionMode",
|
|
358
|
+
"recordMode"
|
|
359
|
+
]
|
|
360
|
+
},
|
|
361
|
+
"cameraSettingsPatch": {
|
|
362
|
+
"type": "object",
|
|
363
|
+
"properties": {
|
|
364
|
+
"watchMode": {
|
|
365
|
+
"enum": [
|
|
366
|
+
"off",
|
|
367
|
+
"auto"
|
|
368
|
+
]
|
|
369
|
+
},
|
|
370
|
+
"objectDetectionMode": {
|
|
371
|
+
"enum": [
|
|
372
|
+
"off",
|
|
373
|
+
"auto"
|
|
374
|
+
]
|
|
375
|
+
},
|
|
376
|
+
"personDetectionMode": {
|
|
377
|
+
"enum": [
|
|
378
|
+
"off",
|
|
379
|
+
"auto"
|
|
380
|
+
]
|
|
381
|
+
},
|
|
382
|
+
"recordMode": {
|
|
383
|
+
"enum": [
|
|
384
|
+
"off",
|
|
385
|
+
"event"
|
|
386
|
+
]
|
|
387
|
+
}
|
|
388
|
+
},
|
|
389
|
+
"additionalProperties": false,
|
|
390
|
+
"minProperties": 1
|
|
391
|
+
},
|
|
392
|
+
"deviceSettingsUpdateRequest": {
|
|
393
|
+
"type": "object",
|
|
394
|
+
"required": [
|
|
395
|
+
"deviceId",
|
|
396
|
+
"settings"
|
|
397
|
+
],
|
|
398
|
+
"properties": {
|
|
399
|
+
"deviceId": {
|
|
400
|
+
"type": "string",
|
|
401
|
+
"minLength": 1
|
|
402
|
+
},
|
|
403
|
+
"settings": {
|
|
404
|
+
"$ref": "#/$defs/cameraSettingsPatch"
|
|
405
|
+
}
|
|
406
|
+
},
|
|
407
|
+
"additionalProperties": false
|
|
408
|
+
},
|
|
409
|
+
"deviceSettingsResponse": {
|
|
410
|
+
"type": "object",
|
|
411
|
+
"required": [
|
|
412
|
+
"deviceId",
|
|
413
|
+
"revision",
|
|
414
|
+
"settings"
|
|
415
|
+
],
|
|
416
|
+
"properties": {
|
|
417
|
+
"deviceId": {
|
|
418
|
+
"type": "string",
|
|
419
|
+
"minLength": 1
|
|
420
|
+
},
|
|
421
|
+
"revision": {
|
|
422
|
+
"type": "integer",
|
|
423
|
+
"minimum": 0
|
|
424
|
+
},
|
|
425
|
+
"settings": {
|
|
426
|
+
"$ref": "#/$defs/cameraSettings"
|
|
427
|
+
}
|
|
428
|
+
},
|
|
429
|
+
"additionalProperties": false
|
|
362
430
|
}
|
|
363
431
|
}
|
|
364
432
|
}
|