@mhome/app-facade-protocol 1.10.2 → 1.11.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.
@@ -48,12 +48,10 @@
48
48
  }
49
49
  },
50
50
  {
51
- "kind": "sourceDevice",
51
+ "kind": "matterBridge",
52
52
  "id": "source:matter:node-123",
53
- "sourceType": "matter",
54
- "sourceId": "node-123",
53
+ "nodeId": "node-123",
55
54
  "displayName": "Aqara Matter Bridge",
56
- "role": "bridge",
57
55
  "runtime": {
58
56
  "state": "healthy",
59
57
  "updatedAtMs": 1777777777000
@@ -122,10 +120,10 @@
122
120
  }
123
121
  },
124
122
  {
125
- "id": "edge:connection-source",
123
+ "id": "edge:connection-bridge",
126
124
  "source": "connection:mlinkMatter.device:matter-1",
127
125
  "target": "source:matter:node-123",
128
- "relation": "connection-source",
126
+ "relation": "connection-bridge",
129
127
  "basis": "sourceProjection",
130
128
  "durability": "durable",
131
129
  "observation": {
@@ -134,10 +132,10 @@
134
132
  }
135
133
  },
136
134
  {
137
- "id": "edge:source-device",
135
+ "id": "edge:bridge-device",
138
136
  "source": "source:matter:node-123",
139
137
  "target": "device:desk-light",
140
- "relation": "source-device",
138
+ "relation": "bridge-device",
141
139
  "basis": "sourceProjection",
142
140
  "durability": "durable",
143
141
  "observation": {
@@ -922,22 +920,12 @@
922
920
  ]
923
921
  },
924
922
  {
925
- "name": "missing /entities/4/sourceType",
923
+ "name": "missing /entities/4/nodeId",
926
924
  "valid": false,
927
925
  "mutations": [
928
926
  {
929
927
  "op": "remove",
930
- "path": "/entities/4/sourceType"
931
- }
932
- ]
933
- },
934
- {
935
- "name": "missing /entities/4/sourceId",
936
- "valid": false,
937
- "mutations": [
938
- {
939
- "op": "remove",
940
- "path": "/entities/4/sourceId"
928
+ "path": "/entities/4/nodeId"
941
929
  }
942
930
  ]
943
931
  },
@@ -951,16 +939,6 @@
951
939
  }
952
940
  ]
953
941
  },
954
- {
955
- "name": "missing /entities/4/role",
956
- "valid": false,
957
- "mutations": [
958
- {
959
- "op": "remove",
960
- "path": "/entities/4/role"
961
- }
962
- ]
963
- },
964
942
  {
965
943
  "name": "missing /entities/4/runtime",
966
944
  "valid": false,
@@ -983,23 +961,12 @@
983
961
  ]
984
962
  },
985
963
  {
986
- "name": "empty /entities/4/sourceType",
987
- "valid": false,
988
- "mutations": [
989
- {
990
- "op": "set",
991
- "path": "/entities/4/sourceType",
992
- "value": ""
993
- }
994
- ]
995
- },
996
- {
997
- "name": "empty /entities/4/sourceId",
964
+ "name": "empty /entities/4/nodeId",
998
965
  "valid": false,
999
966
  "mutations": [
1000
967
  {
1001
968
  "op": "set",
1002
- "path": "/entities/4/sourceId",
969
+ "path": "/entities/4/nodeId",
1003
970
  "value": ""
1004
971
  }
1005
972
  ]
@@ -1015,17 +982,6 @@
1015
982
  }
1016
983
  ]
1017
984
  },
1018
- {
1019
- "name": "unknown /entities/4/role",
1020
- "valid": false,
1021
- "mutations": [
1022
- {
1023
- "op": "set",
1024
- "path": "/entities/4/role",
1025
- "value": "invalid"
1026
- }
1027
- ]
1028
- },
1029
985
  {
1030
986
  "name": "unknown field /entities/4",
1031
987
  "valid": false,
@@ -47,12 +47,10 @@
47
47
  }
48
48
  },
49
49
  {
50
- "kind": "sourceDevice",
50
+ "kind": "matterBridge",
51
51
  "id": "source:matter:node-123",
52
- "sourceType": "matter",
53
- "sourceId": "node-123",
52
+ "nodeId": "node-123",
54
53
  "displayName": "Aqara Matter Bridge",
55
- "role": "bridge",
56
54
  "runtime": {
57
55
  "state": "healthy",
58
56
  "updatedAtMs": 1777777777000
@@ -121,10 +119,10 @@
121
119
  }
122
120
  },
123
121
  {
124
- "id": "edge:connection-source",
122
+ "id": "edge:connection-bridge",
125
123
  "source": "connection:mlinkMatter.device:matter-1",
126
124
  "target": "source:matter:node-123",
127
- "relation": "connection-source",
125
+ "relation": "connection-bridge",
128
126
  "basis": "sourceProjection",
129
127
  "durability": "durable",
130
128
  "observation": {
@@ -133,10 +131,10 @@
133
131
  }
134
132
  },
135
133
  {
136
- "id": "edge:source-device",
134
+ "id": "edge:bridge-device",
137
135
  "source": "source:matter:node-123",
138
136
  "target": "device:desk-light",
139
- "relation": "source-device",
137
+ "relation": "bridge-device",
140
138
  "basis": "sourceProjection",
141
139
  "durability": "durable",
142
140
  "observation": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "manifest": "mhome.app-facade.v1",
3
- "contractVersion": "1.10.2",
3
+ "contractVersion": "1.11.0",
4
4
  "callSchema": "schema/facade-call.v1.schema.json",
5
5
  "routing": "manifest/routing.v1.json",
6
6
  "routingSchema": "schema/routing.v1.schema.json",
@@ -85,7 +85,8 @@
85
85
  "/app/system/host/plan",
86
86
  "/app/system/host/start",
87
87
  "/app/system/host/operation/get",
88
- "/app/system/host/restart"
88
+ "/app/system/host/restart",
89
+ "/app/system/host/permissions/get"
89
90
  ]
90
91
  }
91
92
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "manifest": "mhome.app-facade.routing.v1",
3
- "contractVersion": "1.10.2",
3
+ "contractVersion": "1.11.0",
4
4
  "targetPrefix": "/app/",
5
5
  "default": {
6
6
  "execution": "scopeMode",
@@ -56,7 +56,8 @@
56
56
  "/app/system/host/plan",
57
57
  "/app/system/host/start",
58
58
  "/app/system/host/operation/get",
59
- "/app/system/host/restart"
59
+ "/app/system/host/restart",
60
+ "/app/system/host/permissions/get"
60
61
  ]
61
62
  }
62
63
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "manifest": "mhome.messaging.targets.v1",
3
- "contractVersion": "1.10.2",
3
+ "contractVersion": "1.11.0",
4
4
  "requestTargets": [
5
5
  "/app/messaging/provider/list",
6
6
  "/app/messaging/provider-account/list",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mhome/app-facade-protocol",
3
- "version": "1.10.2",
3
+ "version": "1.11.0",
4
4
  "description": "Build-time protocol artifacts for mhome.app-facade",
5
5
  "license": "MIT",
6
6
  "repository": {
package/protocol.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "protocol": "mhome.app-facade",
3
- "contractVersion": "1.10.2",
3
+ "contractVersion": "1.11.0",
4
4
  "manifest": "manifest/app-facade.v1.json",
5
5
  "schemas": {
6
6
  "call": "schema/facade-call.v1.schema.json",
@@ -10,6 +10,7 @@
10
10
  "hubState": "schema/hub-state.v1.schema.json",
11
11
  "localHubState": "schema/local-hub-state.v1.schema.json",
12
12
  "systemClients": "schema/system-clients.v1.schema.json",
13
+ "systemPermissions": "schema/system-permissions.v1.schema.json",
13
14
  "systemMetrics": "schema/system-metrics.v1.schema.json",
14
15
  "systemInventory": "schema/system-inventory.v1.schema.json",
15
16
  "topology": "schema/topology.v1.schema.json",
@@ -186,19 +186,15 @@
186
186
  "required": [
187
187
  "id",
188
188
  "kind",
189
- "sourceType",
190
- "sourceId",
189
+ "nodeId",
191
190
  "displayName",
192
- "role",
193
191
  "runtime"
194
192
  ],
195
193
  "properties": {
196
194
  "id": { "type": "string", "minLength": 1 },
197
- "kind": { "const": "sourceDevice" },
198
- "sourceType": { "type": "string", "minLength": 1 },
199
- "sourceId": { "type": "string", "minLength": 1 },
195
+ "kind": { "const": "matterBridge" },
196
+ "nodeId": { "type": "string", "minLength": 1 },
200
197
  "displayName": { "type": "string", "minLength": 1 },
201
- "role": { "enum": ["bridge", "device", "unknown"] },
202
198
  "runtime": { "$ref": "#/$defs/runtime" }
203
199
  }
204
200
  },
@@ -250,8 +246,8 @@
250
246
  "provider-connection",
251
247
  "provider-device",
252
248
  "connection-device",
253
- "connection-source",
254
- "source-device"
249
+ "connection-bridge",
250
+ "bridge-device"
255
251
  ]
256
252
  },
257
253
  "basis": {
@@ -298,7 +294,7 @@
298
294
  {
299
295
  "properties": {
300
296
  "relation": {
301
- "enum": ["connection-source", "source-device"]
297
+ "enum": ["connection-bridge", "bridge-device"]
302
298
  },
303
299
  "basis": { "const": "sourceProjection" }
304
300
  }
@@ -0,0 +1,274 @@
1
+ {
2
+ "type": "object",
3
+ "additionalProperties": false,
4
+ "required": [
5
+ "hostId",
6
+ "snapshot"
7
+ ],
8
+ "properties": {
9
+ "hostId": {
10
+ "type": "string",
11
+ "minLength": 1
12
+ },
13
+ "snapshot": {
14
+ "type": "object",
15
+ "additionalProperties": false,
16
+ "required": [
17
+ "status",
18
+ "data",
19
+ "observedAtMs",
20
+ "lastAttemptAtMs",
21
+ "stale",
22
+ "errorCode"
23
+ ],
24
+ "properties": {
25
+ "status": {
26
+ "enum": [
27
+ "ok",
28
+ "unavailable",
29
+ "unsupported",
30
+ "notQueried"
31
+ ]
32
+ },
33
+ "data": {
34
+ "anyOf": [
35
+ {
36
+ "type": "object",
37
+ "additionalProperties": false,
38
+ "required": [
39
+ "hostId",
40
+ "subjectId",
41
+ "subjectName",
42
+ "hostVersion",
43
+ "platform",
44
+ "observedAtMs",
45
+ "permissions",
46
+ "declarationErrors"
47
+ ],
48
+ "properties": {
49
+ "hostId": {
50
+ "type": "string",
51
+ "minLength": 1
52
+ },
53
+ "subjectId": {
54
+ "type": "string",
55
+ "minLength": 1
56
+ },
57
+ "subjectName": {
58
+ "type": "string",
59
+ "minLength": 1
60
+ },
61
+ "hostVersion": {
62
+ "type": "string",
63
+ "minLength": 1
64
+ },
65
+ "platform": {
66
+ "type": "string",
67
+ "minLength": 1
68
+ },
69
+ "observedAtMs": {
70
+ "type": "integer",
71
+ "minimum": 0
72
+ },
73
+ "permissions": {
74
+ "type": "array",
75
+ "items": {
76
+ "type": "object",
77
+ "additionalProperties": false,
78
+ "required": [
79
+ "permission",
80
+ "state",
81
+ "evidence",
82
+ "observedAtMs",
83
+ "uses",
84
+ "supportedActions",
85
+ "error"
86
+ ],
87
+ "properties": {
88
+ "permission": {
89
+ "oneOf": [
90
+ {
91
+ "type": "object",
92
+ "additionalProperties": false,
93
+ "required": [
94
+ "id"
95
+ ],
96
+ "properties": {
97
+ "id": {
98
+ "enum": [
99
+ "localNetwork",
100
+ "bluetooth",
101
+ "microphone",
102
+ "reminders"
103
+ ]
104
+ }
105
+ }
106
+ },
107
+ {
108
+ "type": "object",
109
+ "additionalProperties": false,
110
+ "required": [
111
+ "id",
112
+ "targetBundleId"
113
+ ],
114
+ "properties": {
115
+ "id": {
116
+ "const": "automation"
117
+ },
118
+ "targetBundleId": {
119
+ "type": "string",
120
+ "minLength": 1
121
+ }
122
+ }
123
+ }
124
+ ]
125
+ },
126
+ "state": {
127
+ "enum": [
128
+ "unknown",
129
+ "notDetermined",
130
+ "granted",
131
+ "denied",
132
+ "restricted",
133
+ "unsupported"
134
+ ]
135
+ },
136
+ "evidence": {
137
+ "enum": [
138
+ "system",
139
+ "probe",
140
+ "unavailable"
141
+ ]
142
+ },
143
+ "observedAtMs": {
144
+ "anyOf": [
145
+ {
146
+ "type": "integer",
147
+ "minimum": 0
148
+ },
149
+ {
150
+ "type": "null"
151
+ }
152
+ ]
153
+ },
154
+ "uses": {
155
+ "type": "array",
156
+ "items": {
157
+ "type": "object",
158
+ "additionalProperties": false,
159
+ "required": [
160
+ "componentId",
161
+ "componentName",
162
+ "feature",
163
+ "reason"
164
+ ],
165
+ "properties": {
166
+ "componentId": {
167
+ "type": "string",
168
+ "minLength": 1
169
+ },
170
+ "componentName": {
171
+ "type": "string",
172
+ "minLength": 1
173
+ },
174
+ "feature": {
175
+ "type": "string",
176
+ "minLength": 1
177
+ },
178
+ "reason": {
179
+ "type": "string",
180
+ "minLength": 1
181
+ }
182
+ }
183
+ }
184
+ },
185
+ "supportedActions": {
186
+ "type": "array",
187
+ "uniqueItems": true,
188
+ "items": {
189
+ "enum": [
190
+ "request",
191
+ "openSettings"
192
+ ]
193
+ }
194
+ },
195
+ "error": {
196
+ "anyOf": [
197
+ {
198
+ "type": "string"
199
+ },
200
+ {
201
+ "type": "null"
202
+ }
203
+ ]
204
+ }
205
+ }
206
+ }
207
+ },
208
+ "declarationErrors": {
209
+ "type": "array",
210
+ "items": {
211
+ "type": "object",
212
+ "additionalProperties": false,
213
+ "required": [
214
+ "componentId",
215
+ "message"
216
+ ],
217
+ "properties": {
218
+ "componentId": {
219
+ "type": "string",
220
+ "minLength": 1
221
+ },
222
+ "message": {
223
+ "type": "string",
224
+ "minLength": 1
225
+ }
226
+ }
227
+ }
228
+ }
229
+ }
230
+ },
231
+ {
232
+ "type": "null"
233
+ }
234
+ ]
235
+ },
236
+ "observedAtMs": {
237
+ "anyOf": [
238
+ {
239
+ "type": "integer",
240
+ "minimum": 0
241
+ },
242
+ {
243
+ "type": "null"
244
+ }
245
+ ]
246
+ },
247
+ "lastAttemptAtMs": {
248
+ "anyOf": [
249
+ {
250
+ "type": "integer",
251
+ "minimum": 0
252
+ },
253
+ {
254
+ "type": "null"
255
+ }
256
+ ]
257
+ },
258
+ "stale": {
259
+ "type": "boolean"
260
+ },
261
+ "errorCode": {
262
+ "anyOf": [
263
+ {
264
+ "type": "string"
265
+ },
266
+ {
267
+ "type": "null"
268
+ }
269
+ ]
270
+ }
271
+ }
272
+ }
273
+ }
274
+ }