@mhome/core-protocol 1.57.0 → 1.59.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.
@@ -38,26 +38,32 @@ identity or choose a platform event target. Consumers filter publisher identity
38
38
  and Space. This is an observation; capability subscriptions retain their separate
39
39
  protocol and delivery ledger.
40
40
 
41
- ## Matter
42
-
43
- The Matter Plugin owns `status`, `commissionable/list`, `fabric/get`,
44
- `fabric/node/detail`, `inventory/get`, `onboarding/start`, `onboarding/input`,
45
- `onboarding/status` and `fabric/node/remove`. Read routes require Space read;
46
- start, input and removal require Space write. There is no `/app/matter/*` Facade.
47
- The management inventory and detail payload schema is
48
- `schema/matter-plugin-management.v1.schema.json`.
49
-
50
- `status` returns runtime information or `runtimeError`, plus trusted `spaceId`.
51
- Binding and offline observations come from `/app/plugin/enabled/list`, which can
52
- answer even when the Plugin is unavailable. Commissioning retains operation ID,
53
- session ID and expected revision semantics. Consumers pin the Node ID throughout
54
- the operation and its durable continuation; closing a UI does not cancel it.
55
- Discovery publishes `commissionable/report` through the generic event channel.
56
-
57
- The separate Integration `/matter/device/list` response remains
58
- `{"ok":true,"data":[...]}`. It enumerates source entities and is not a management
59
- list. ESP implementations must implement and advertise only supported routes;
60
- they must not dual-write alternate array/object envelopes.
61
-
62
- These contracts continue to ship with Foundation. Plugin execution ownership does
63
- not introduce a new package publication system or move provider schema sources.
41
+ ## Business contract ownership and discovery
42
+
43
+ Plugin-owned JSON contracts live with their implementations, independently of
44
+ Foundation packages. The official Camera, Matter and Mac sources are
45
+ `mhome-ai/integration`, under `plugins/<id>/contract.json`. Their business payloads,
46
+ operation identifiers and fixtures are not published in Foundation. LLM and Storage
47
+ platform backend contracts and canonical capability schemas remain platform-owned.
48
+
49
+ A signed release can reference business contracts under
50
+ `nodeMetadata.plugin.businessContracts`: each reference contains `id`, `version`
51
+ (contract SemVer), `sha256` (exact JSON bytes), package-relative `path`, and implemented
52
+ `operations`. Native packages carry the referenced JSON; firmware can embed the
53
+ reference and retain the pinned JSON in its source distribution.
54
+
55
+ The authenticated Node description may advertise `details.businessContracts`, with
56
+ `id`, `version`, `sha256` and its actual supported `operations`. This is descriptive,
57
+ not an authorization grant. `routes` and `appAccess` still control availability and
58
+ permission. The Plugin detail Facade projects public `api.businessContracts` and
59
+ `api.appAccess` from that session, never arbitrary runtime details. `api: null`
60
+ means offline/loading/unavailable; a null `businessContracts` means this older
61
+ implementation has no advertisement. Neither is an empty supported set.
62
+
63
+ Clients pin the business contract's identity and compatible major, and check
64
+ operation availability separately. An implementation may support a subset. A
65
+ schema/document move does not change wire version, payload shape or permissions.
66
+ Consumers tolerate additive response fields. New requests must not send fields
67
+ or operations that the selected implementation has not advertised support for;
68
+ unknown enum variants require an explicit fallback or a new major. Legacy strict
69
+ readers do not become compatible simply because this rule was documented.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "manifest": "mhome.core.v1",
3
- "contractVersion": "1.57.0",
3
+ "contractVersion": "1.59.0",
4
4
  "protocols": {
5
5
  "agentGateway": {
6
6
  "submitTarget": "/agent/submit",
@@ -27,45 +27,6 @@
27
27
  "metadataSchema": "schema/node-metadata.v1.schema.json",
28
28
  "metadataContract": "contract/node-metadata-v1.md"
29
29
  },
30
- "matterPlugin": {
31
- "version": "v1",
32
- "nodeType": "matter",
33
- "appTargetPrefix": "/app/plugin/matter/",
34
- "runtimeTargetPrefix": "/matter/app/",
35
- "managementSchema": "schema/matter-plugin-management.v1.schema.json",
36
- "routes": {
37
- "status": "status",
38
- "inventoryGet": "inventory/get",
39
- "commissionableList": "commissionable/list",
40
- "fabricGet": "fabric/get",
41
- "nodeDetail": "fabric/node/detail",
42
- "onboardingStart": "onboarding/start",
43
- "onboardingInput": "onboarding/input",
44
- "onboardingStatus": "onboarding/status",
45
- "nodeRemove": "fabric/node/remove"
46
- }
47
- },
48
- "cameraPlugin": {
49
- "version": "v1",
50
- "nodeType": "camera",
51
- "appTargetPrefix": "/app/plugin/camera/",
52
- "runtimeTargetPrefix": "/camera/app/",
53
- "managementSchema": "schema/camera-plugin-management.v1.schema.json",
54
- "routes": {
55
- "deviceList": "device/list",
56
- "managementSnapshot": "management/snapshot",
57
- "deviceSettingsGet": "device/settings/get",
58
- "deviceSettingsUpdate": "device/settings/update",
59
- "providerList": "provider/list",
60
- "connectionList": "connection/list",
61
- "connectionDetail": "connection/detail",
62
- "connectionDisconnect": "connection/disconnect"
63
- },
64
- "flows": {
65
- "connectionCreate": "connection.create",
66
- "connectionReconfigure": "connection.reconfigure"
67
- }
68
- },
69
30
  "audioBridgePlugin": {
70
31
  "version": "v1",
71
32
  "nodeType": "audiobridge",
@@ -90,7 +51,7 @@
90
51
  "commandsSchema": "schema/messaging-commands.v1.schema.json"
91
52
  },
92
53
  "storage": {
93
- "version": "storage.v5"
54
+ "version": "storage.v1"
94
55
  },
95
56
  "hostDelivery": {
96
57
  "externalProtocolVersion": 25,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mhome/core-protocol",
3
- "version": "1.57.0",
3
+ "version": "1.59.0",
4
4
  "description": "Build-time protocol artifacts for mhome.core",
5
5
  "license": "MIT",
6
6
  "repository": {
package/protocol.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "protocol": "mhome.core",
3
- "contractVersion": "1.57.0",
3
+ "contractVersion": "1.59.0",
4
4
  "manifest": "manifest/core.v1.json",
5
5
  "schemas": {
6
6
  "hostManagementRequest": "schema/host-management-request.v1.schema.json",
@@ -8,15 +8,12 @@
8
8
  "normalizedInbound": "schema/normalized-inbound.v4.schema.json",
9
9
  "messagingCommands": "schema/messaging-commands.v1.schema.json",
10
10
  "interactionFlowNode": "schema/interaction-flow-node.v1.schema.json",
11
- "matterPluginManagement": "schema/matter-plugin-management.v1.schema.json",
12
- "pluginManagement": "schema/plugin-management.v1.schema.json",
13
- "cameraPluginManagement": "schema/camera-plugin-management.v1.schema.json"
11
+ "pluginManagement": "schema/plugin-management.v1.schema.json"
14
12
  },
15
13
  "fixtures": {
16
14
  "normalizedInbound": "fixtures/normalized-inbound.conformance.json",
17
15
  "messagingCommands": "fixtures/messaging-commands.conformance.json",
18
16
  "interactionFlowNode": "fixtures/interaction-flow-node.conformance.json",
19
- "cameraPluginManagement": "fixtures/camera-plugin-management.conformance.json",
20
17
  "recipientId": "fixtures/recipient-id.conformance.json"
21
18
  }
22
19
  }
@@ -1,389 +0,0 @@
1
- {
2
- "valid": [
3
- {
4
- "name": "empty request",
5
- "value": {}
6
- },
7
- {
8
- "name": "device request",
9
- "value": {
10
- "deviceId": "camera-1"
11
- }
12
- },
13
- {
14
- "name": "watch set request",
15
- "value": {
16
- "deviceId": "camera-1",
17
- "settings": {
18
- "watchMode": "auto"
19
- }
20
- }
21
- },
22
- {
23
- "name": "management snapshot",
24
- "value": {
25
- "providers": [
26
- {
27
- "id": "onvif",
28
- "displayName": "ONVIF",
29
- "description": "ONVIF cameras",
30
- "supportsMultipleCameras": true
31
- }
32
- ],
33
- "devices": [
34
- {
35
- "id": "camera-1",
36
- "name": "Front Door",
37
- "capabilities": [
38
- "state.cameraMotion"
39
- ],
40
- "health": "ready",
41
- "connectionId": "connection-1",
42
- "resolutionStatus": "ready"
43
- }
44
- ],
45
- "onlineStates": [
46
- {
47
- "id": "camera-1",
48
- "state": "online",
49
- "observedAt": 1767225600,
50
- "source": "onvif"
51
- }
52
- ],
53
- "connections": [],
54
- "cameraSettings": [
55
- {
56
- "deviceId": "camera-1",
57
- "revision": 1,
58
- "settings": {
59
- "watchMode": "off",
60
- "objectDetectionMode": "off",
61
- "personDetectionMode": "off",
62
- "recordMode": "off",
63
- "preRollSeconds": 8,
64
- "postRollSeconds": 15
65
- }
66
- }
67
- ]
68
- }
69
- },
70
- {
71
- "name": "device list",
72
- "value": {
73
- "connections": []
74
- }
75
- },
76
- {
77
- "name": "device mutation",
78
- "value": {
79
- "deviceIds": [
80
- "camera-1"
81
- ],
82
- "changed": true,
83
- "connectionId": "connection-1"
84
- }
85
- },
86
- {
87
- "name": "watch response",
88
- "value": {
89
- "deviceId": "camera-1",
90
- "revision": 1,
91
- "settings": {
92
- "watchMode": "off",
93
- "objectDetectionMode": "off",
94
- "personDetectionMode": "off",
95
- "recordMode": "off",
96
- "preRollSeconds": 8,
97
- "postRollSeconds": 15
98
- }
99
- }
100
- },
101
- {
102
- "name": "operation error",
103
- "value": {
104
- "ok": false,
105
- "reason": "CAMERA_OPERATION_FAILED",
106
- "detail": "failed"
107
- }
108
- },
109
- {
110
- "name": "connection-detail-request",
111
- "value": {
112
- "connectionId": "ha-1"
113
- }
114
- },
115
- {
116
- "name": "connected-empty-ha",
117
- "value": {
118
- "providers": [],
119
- "connections": [
120
- {
121
- "id": "ha-1",
122
- "name": "http://homeassistant.local:8123",
123
- "deviceCount": 0,
124
- "provider": "home_assistant",
125
- "revision": 1
126
- }
127
- ],
128
- "devices": [],
129
- "onlineStates": [],
130
- "cameraSettings": []
131
- }
132
- },
133
- {
134
- "name": "recording without preroll or postroll",
135
- "value": {
136
- "deviceId": "camera-1",
137
- "settings": {
138
- "preRollSeconds": 0,
139
- "postRollSeconds": 0
140
- }
141
- }
142
- },
143
- {
144
- "name": "recording retention limits",
145
- "value": {
146
- "deviceId": "camera-1",
147
- "settings": {
148
- "preRollSeconds": 120,
149
- "postRollSeconds": 300
150
- }
151
- }
152
- },
153
- {
154
- "name": "update only preroll",
155
- "value": {
156
- "deviceId": "camera-1",
157
- "settings": {
158
- "preRollSeconds": 60
159
- }
160
- }
161
- },
162
- {
163
- "name": "update only postroll",
164
- "value": {
165
- "deviceId": "camera-1",
166
- "settings": {
167
- "postRollSeconds": 30
168
- }
169
- }
170
- },
171
- {
172
- "name": "grouped inventory with unknown observation time",
173
- "value": {
174
- "connections": [
175
- {
176
- "id": "conn",
177
- "provider": "onvif",
178
- "name": "Entrance",
179
- "revision": 2,
180
- "deviceCount": 1,
181
- "devices": [
182
- {
183
- "id": "cam",
184
- "name": "Door",
185
- "health": "ready",
186
- "resolutionStatus": "ready",
187
- "online": {
188
- "state": "unknown"
189
- }
190
- }
191
- ]
192
- }
193
- ]
194
- }
195
- }
196
- ],
197
- "invalid": [
198
- {
199
- "name": "watch mutation missing enabled",
200
- "value": {
201
- "deviceId": "camera-1",
202
- "unexpected": true
203
- }
204
- },
205
- {
206
- "name": "unknown health",
207
- "value": {
208
- "providers": [],
209
- "devices": [
210
- {
211
- "id": "camera-1",
212
- "name": "Front",
213
- "capabilities": [],
214
- "health": "unknown",
215
- "connectionId": "connection-1",
216
- "resolutionStatus": "ready"
217
- }
218
- ],
219
- "onlineStates": [],
220
- "connections": [],
221
- "cameraSettings": []
222
- }
223
- },
224
- {
225
- "name": "device leaks internal field",
226
- "value": {
227
- "devices": [
228
- {
229
- "id": "camera-1",
230
- "name": "Front Door",
231
- "capabilities": [],
232
- "health": "ready",
233
- "sourceUid": "secret",
234
- "connectionId": "connection-1",
235
- "resolutionStatus": "ready"
236
- }
237
- ],
238
- "onlineStates": []
239
- }
240
- },
241
- {
242
- "name": "empty patch",
243
- "value": {
244
- "deviceId": "camera-1",
245
- "settings": {}
246
- }
247
- },
248
- {
249
- "name": "invalid mode",
250
- "value": {
251
- "deviceId": "camera-1",
252
- "settings": {
253
- "watchMode": "on"
254
- }
255
- }
256
- },
257
- {
258
- "name": "preRollSeconds null",
259
- "value": {
260
- "deviceId": "camera-1",
261
- "settings": {
262
- "preRollSeconds": null
263
- }
264
- }
265
- },
266
- {
267
- "name": "preRollSeconds negative",
268
- "value": {
269
- "deviceId": "camera-1",
270
- "settings": {
271
- "preRollSeconds": -1
272
- }
273
- }
274
- },
275
- {
276
- "name": "preRollSeconds fractional",
277
- "value": {
278
- "deviceId": "camera-1",
279
- "settings": {
280
- "preRollSeconds": 1.5
281
- }
282
- }
283
- },
284
- {
285
- "name": "preRollSeconds string",
286
- "value": {
287
- "deviceId": "camera-1",
288
- "settings": {
289
- "preRollSeconds": "15"
290
- }
291
- }
292
- },
293
- {
294
- "name": "preRollSeconds above limit",
295
- "value": {
296
- "deviceId": "camera-1",
297
- "settings": {
298
- "preRollSeconds": 121
299
- }
300
- }
301
- },
302
- {
303
- "name": "settings snapshot missing preRollSeconds",
304
- "value": {
305
- "deviceId": "camera-1",
306
- "revision": 1,
307
- "settings": {
308
- "watchMode": "off",
309
- "objectDetectionMode": "off",
310
- "personDetectionMode": "off",
311
- "recordMode": "off",
312
- "postRollSeconds": 15
313
- }
314
- }
315
- },
316
- {
317
- "name": "postRollSeconds null",
318
- "value": {
319
- "deviceId": "camera-1",
320
- "settings": {
321
- "postRollSeconds": null
322
- }
323
- }
324
- },
325
- {
326
- "name": "postRollSeconds negative",
327
- "value": {
328
- "deviceId": "camera-1",
329
- "settings": {
330
- "postRollSeconds": -1
331
- }
332
- }
333
- },
334
- {
335
- "name": "postRollSeconds fractional",
336
- "value": {
337
- "deviceId": "camera-1",
338
- "settings": {
339
- "postRollSeconds": 1.5
340
- }
341
- }
342
- },
343
- {
344
- "name": "postRollSeconds string",
345
- "value": {
346
- "deviceId": "camera-1",
347
- "settings": {
348
- "postRollSeconds": "15"
349
- }
350
- }
351
- },
352
- {
353
- "name": "postRollSeconds above limit",
354
- "value": {
355
- "deviceId": "camera-1",
356
- "settings": {
357
- "postRollSeconds": 301
358
- }
359
- }
360
- },
361
- {
362
- "name": "settings snapshot missing postRollSeconds",
363
- "value": {
364
- "deviceId": "camera-1",
365
- "revision": 1,
366
- "settings": {
367
- "watchMode": "off",
368
- "objectDetectionMode": "off",
369
- "personDetectionMode": "off",
370
- "recordMode": "off",
371
- "preRollSeconds": 8
372
- }
373
- }
374
- },
375
- {
376
- "name": "old source request",
377
- "value": {
378
- "sourceId": "ha-1"
379
- }
380
- },
381
- {
382
- "name": "disconnect without valid revision",
383
- "value": {
384
- "connectionId": "connection-1",
385
- "expectedRevision": 0
386
- }
387
- }
388
- ]
389
- }