@mhome/app-facade-protocol 1.10.0 → 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.
@@ -0,0 +1,225 @@
1
+ {
2
+ "type": "object",
3
+ "additionalProperties": false,
4
+ "required": [
5
+ "hostId",
6
+ "sample"
7
+ ],
8
+ "properties": {
9
+ "hostId": {
10
+ "type": "string"
11
+ },
12
+ "sample": {
13
+ "type": "object",
14
+ "additionalProperties": false,
15
+ "required": [
16
+ "status",
17
+ "data",
18
+ "observedAtMs",
19
+ "lastAttemptAtMs",
20
+ "stale",
21
+ "errorCode"
22
+ ],
23
+ "properties": {
24
+ "status": {
25
+ "enum": [
26
+ "ok",
27
+ "unavailable",
28
+ "unsupported",
29
+ "notQueried"
30
+ ]
31
+ },
32
+ "data": {
33
+ "anyOf": [
34
+ {
35
+ "type": "object",
36
+ "additionalProperties": false,
37
+ "required": [
38
+ "hostId",
39
+ "sampledAtMs",
40
+ "cpuUsagePercent",
41
+ "memoryAvailableBytes",
42
+ "diskAvailableBytes",
43
+ "networkReceivedBytesPerSecond",
44
+ "networkSentBytesPerSecond",
45
+ "services"
46
+ ],
47
+ "properties": {
48
+ "hostId": {
49
+ "type": "string"
50
+ },
51
+ "sampledAtMs": {
52
+ "type": "integer",
53
+ "minimum": 0
54
+ },
55
+ "cpuUsagePercent": {
56
+ "anyOf": [
57
+ {
58
+ "type": "number"
59
+ },
60
+ {
61
+ "type": "null"
62
+ }
63
+ ]
64
+ },
65
+ "memoryAvailableBytes": {
66
+ "anyOf": [
67
+ {
68
+ "type": "integer",
69
+ "minimum": 0
70
+ },
71
+ {
72
+ "type": "null"
73
+ }
74
+ ]
75
+ },
76
+ "diskAvailableBytes": {
77
+ "anyOf": [
78
+ {
79
+ "type": "integer",
80
+ "minimum": 0
81
+ },
82
+ {
83
+ "type": "null"
84
+ }
85
+ ]
86
+ },
87
+ "networkReceivedBytesPerSecond": {
88
+ "anyOf": [
89
+ {
90
+ "type": "number"
91
+ },
92
+ {
93
+ "type": "null"
94
+ }
95
+ ]
96
+ },
97
+ "networkSentBytesPerSecond": {
98
+ "anyOf": [
99
+ {
100
+ "type": "number"
101
+ },
102
+ {
103
+ "type": "null"
104
+ }
105
+ ]
106
+ },
107
+ "services": {
108
+ "type": "array",
109
+ "items": {
110
+ "type": "object",
111
+ "additionalProperties": false,
112
+ "required": [
113
+ "serviceId",
114
+ "status",
115
+ "sampleState",
116
+ "processCount",
117
+ "cpuUsagePercent",
118
+ "memoryResidentBytes",
119
+ "diskReadBytesPerSecond",
120
+ "diskWrittenBytesPerSecond"
121
+ ],
122
+ "properties": {
123
+ "serviceId": {
124
+ "type": "string"
125
+ },
126
+ "status": {
127
+ "type": "string"
128
+ },
129
+ "sampleState": {
130
+ "type": "string"
131
+ },
132
+ "processCount": {
133
+ "type": "integer",
134
+ "minimum": 0
135
+ },
136
+ "cpuUsagePercent": {
137
+ "anyOf": [
138
+ {
139
+ "type": "number"
140
+ },
141
+ {
142
+ "type": "null"
143
+ }
144
+ ]
145
+ },
146
+ "memoryResidentBytes": {
147
+ "anyOf": [
148
+ {
149
+ "type": "integer",
150
+ "minimum": 0
151
+ },
152
+ {
153
+ "type": "null"
154
+ }
155
+ ]
156
+ },
157
+ "diskReadBytesPerSecond": {
158
+ "anyOf": [
159
+ {
160
+ "type": "number"
161
+ },
162
+ {
163
+ "type": "null"
164
+ }
165
+ ]
166
+ },
167
+ "diskWrittenBytesPerSecond": {
168
+ "anyOf": [
169
+ {
170
+ "type": "number"
171
+ },
172
+ {
173
+ "type": "null"
174
+ }
175
+ ]
176
+ }
177
+ }
178
+ }
179
+ }
180
+ }
181
+ },
182
+ {
183
+ "type": "null"
184
+ }
185
+ ]
186
+ },
187
+ "observedAtMs": {
188
+ "anyOf": [
189
+ {
190
+ "type": "integer",
191
+ "minimum": 0
192
+ },
193
+ {
194
+ "type": "null"
195
+ }
196
+ ]
197
+ },
198
+ "lastAttemptAtMs": {
199
+ "anyOf": [
200
+ {
201
+ "type": "integer",
202
+ "minimum": 0
203
+ },
204
+ {
205
+ "type": "null"
206
+ }
207
+ ]
208
+ },
209
+ "stale": {
210
+ "type": "boolean"
211
+ },
212
+ "errorCode": {
213
+ "anyOf": [
214
+ {
215
+ "type": "string"
216
+ },
217
+ {
218
+ "type": "null"
219
+ }
220
+ ]
221
+ }
222
+ }
223
+ }
224
+ }
225
+ }
@@ -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
+ }