@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.
- package/README.md +4 -0
- package/fixtures/device-topology.graph-conformance.json +10 -54
- package/fixtures/device-topology.snapshot.json +6 -8
- package/manifest/app-facade.v1.json +35 -13
- package/manifest/routing.v1.json +13 -3
- package/manifest/targets.v1.json +1 -1
- package/package.json +1 -1
- package/protocol.json +5 -1
- package/schema/device-topology.v1.schema.json +6 -10
- package/schema/system-clients.v1.schema.json +67 -0
- package/schema/system-inventory.v1.schema.json +517 -0
- package/schema/system-metrics.v1.schema.json +225 -0
- package/schema/system-permissions.v1.schema.json +274 -0
package/README.md
CHANGED
|
@@ -88,3 +88,7 @@ from the Foundation root; omit `--write` to check conformance. Resource paths ar
|
|
|
88
88
|
## Shared messaging codes (1.10)
|
|
89
89
|
|
|
90
90
|
Code creation may omit bot/account and group/surface identifiers. The receiving authenticated provider determines the bot; shared candidates are confirmed in the App. The existing actor link claim status/confirm/event endpoints carry both kinds, distinguished by `kind` (`link` by default, or `bind`). Bind code responses include `challengeId`; completed bind claims omit `linkId`. Private link completes on receipt. A code is single-use within its provider and service deployment, never a cross-provider or cross-Hub credential.
|
|
91
|
+
|
|
92
|
+
## System inventory
|
|
93
|
+
|
|
94
|
+
The system facade is executed by the local Space Hub, with Cloud relay allowed. All Space members may read it. The Hub reads its Host discovery snapshot and queries LAN Host info, service inventory and metrics. Host does not aggregate remote machines. Instances are derived exclusively from the authenticated tenant/Space commissioned records; disconnected does not mean unloaded. Client sessions use a separate endpoint. No remote Space lifecycle queries or graph coordinates are part of this contract. Legacy topology is deprecated; consumers migrate to system inventory.
|
|
@@ -48,12 +48,10 @@
|
|
|
48
48
|
}
|
|
49
49
|
},
|
|
50
50
|
{
|
|
51
|
-
"kind": "
|
|
51
|
+
"kind": "matterBridge",
|
|
52
52
|
"id": "source:matter:node-123",
|
|
53
|
-
"
|
|
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-
|
|
123
|
+
"id": "edge:connection-bridge",
|
|
126
124
|
"source": "connection:mlinkMatter.device:matter-1",
|
|
127
125
|
"target": "source:matter:node-123",
|
|
128
|
-
"relation": "connection-
|
|
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:
|
|
135
|
+
"id": "edge:bridge-device",
|
|
138
136
|
"source": "source:matter:node-123",
|
|
139
137
|
"target": "device:desk-light",
|
|
140
|
-
"relation": "
|
|
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/
|
|
923
|
+
"name": "missing /entities/4/nodeId",
|
|
926
924
|
"valid": false,
|
|
927
925
|
"mutations": [
|
|
928
926
|
{
|
|
929
927
|
"op": "remove",
|
|
930
|
-
"path": "/entities/4/
|
|
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/
|
|
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/
|
|
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": "
|
|
50
|
+
"kind": "matterBridge",
|
|
51
51
|
"id": "source:matter:node-123",
|
|
52
|
-
"
|
|
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-
|
|
122
|
+
"id": "edge:connection-bridge",
|
|
125
123
|
"source": "connection:mlinkMatter.device:matter-1",
|
|
126
124
|
"target": "source:matter:node-123",
|
|
127
|
-
"relation": "connection-
|
|
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:
|
|
134
|
+
"id": "edge:bridge-device",
|
|
137
135
|
"source": "source:matter:node-123",
|
|
138
136
|
"target": "device:desk-light",
|
|
139
|
-
"relation": "
|
|
137
|
+
"relation": "bridge-device",
|
|
140
138
|
"basis": "sourceProjection",
|
|
141
139
|
"durability": "durable",
|
|
142
140
|
"observation": {
|
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"manifest": "mhome.app-facade.v1",
|
|
3
|
-
"contractVersion": "1.
|
|
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",
|
|
7
7
|
"domains": {
|
|
8
8
|
"artifact": {
|
|
9
9
|
"contract": "mhome.artifact.v1",
|
|
10
|
-
"requestTargets": [
|
|
10
|
+
"requestTargets": [
|
|
11
|
+
"/app/artifact/resolve"
|
|
12
|
+
]
|
|
11
13
|
},
|
|
12
14
|
"hub": {
|
|
13
15
|
"targets": "manifest/hub-targets.v1.json",
|
|
@@ -33,26 +35,31 @@
|
|
|
33
35
|
"/app/plugin/remove",
|
|
34
36
|
"/app/plugin/profile/update"
|
|
35
37
|
],
|
|
36
|
-
"eventTargets": [
|
|
38
|
+
"eventTargets": [
|
|
39
|
+
"/app/plugin/settings/changed"
|
|
40
|
+
],
|
|
37
41
|
"extensionFamily": "/app/plugin/{nodeType}/{route...}",
|
|
38
42
|
"extensionPriority": "after_exact"
|
|
39
43
|
},
|
|
40
44
|
"runtime": {
|
|
41
45
|
"contract": "mhome.runtime.status.v1",
|
|
42
|
-
"resourceTypes": [
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
"
|
|
50
|
-
|
|
46
|
+
"resourceTypes": [
|
|
47
|
+
"nodeInstance",
|
|
48
|
+
"nodeRuntime"
|
|
49
|
+
],
|
|
50
|
+
"requestTargets": [
|
|
51
|
+
"/app/runtime/status/list"
|
|
52
|
+
],
|
|
53
|
+
"eventTargets": [
|
|
54
|
+
"/app/runtime/status/changed"
|
|
55
|
+
]
|
|
51
56
|
},
|
|
52
57
|
"deviceTopology": {
|
|
53
58
|
"contract": "mhome.device.topology.v1",
|
|
54
59
|
"schema": "schema/device-topology.v1.schema.json",
|
|
55
|
-
"requestTargets": [
|
|
60
|
+
"requestTargets": [
|
|
61
|
+
"/app/device/topology/get"
|
|
62
|
+
],
|
|
56
63
|
"eventTargets": []
|
|
57
64
|
},
|
|
58
65
|
"interactionFlow": {
|
|
@@ -66,6 +73,21 @@
|
|
|
66
73
|
"/app/interaction-flow/cancel"
|
|
67
74
|
],
|
|
68
75
|
"sessionPersistence": "memory"
|
|
76
|
+
},
|
|
77
|
+
"system": {
|
|
78
|
+
"contract": "mhome.system.inventory.v1",
|
|
79
|
+
"schema": "schema/system-inventory.v1.schema.json",
|
|
80
|
+
"requestTargets": [
|
|
81
|
+
"/app/system/inventory/get",
|
|
82
|
+
"/app/system/clients/get",
|
|
83
|
+
"/app/system/host/metrics/get",
|
|
84
|
+
"/app/system/host/inspect",
|
|
85
|
+
"/app/system/host/plan",
|
|
86
|
+
"/app/system/host/start",
|
|
87
|
+
"/app/system/host/operation/get",
|
|
88
|
+
"/app/system/host/restart",
|
|
89
|
+
"/app/system/host/permissions/get"
|
|
90
|
+
]
|
|
69
91
|
}
|
|
70
92
|
}
|
|
71
93
|
}
|
package/manifest/routing.v1.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"manifest": "mhome.app-facade.routing.v1",
|
|
3
|
-
"contractVersion": "1.
|
|
3
|
+
"contractVersion": "1.11.0",
|
|
4
4
|
"targetPrefix": "/app/",
|
|
5
5
|
"default": {
|
|
6
6
|
"execution": "scopeMode",
|
|
@@ -32,7 +32,9 @@
|
|
|
32
32
|
"/app/interaction-flow/",
|
|
33
33
|
"/app/object-storage/",
|
|
34
34
|
"/app/runtime/",
|
|
35
|
-
"/app/
|
|
35
|
+
"/app/system/inventory/",
|
|
36
|
+
"/app/system/clients/",
|
|
37
|
+
"/app/system/host/"
|
|
36
38
|
],
|
|
37
39
|
"requestPlacementPrefixes": [
|
|
38
40
|
"/app/messaging/"
|
|
@@ -47,7 +49,15 @@
|
|
|
47
49
|
"/app/object-storage/folders/update",
|
|
48
50
|
"/app/object-storage/folders/list",
|
|
49
51
|
"/app/object-storage/settings/update",
|
|
50
|
-
"/app/
|
|
52
|
+
"/app/system/inventory/get",
|
|
53
|
+
"/app/system/clients/get",
|
|
54
|
+
"/app/system/host/metrics/get",
|
|
55
|
+
"/app/system/host/inspect",
|
|
56
|
+
"/app/system/host/plan",
|
|
57
|
+
"/app/system/host/start",
|
|
58
|
+
"/app/system/host/operation/get",
|
|
59
|
+
"/app/system/host/restart",
|
|
60
|
+
"/app/system/host/permissions/get"
|
|
51
61
|
]
|
|
52
62
|
}
|
|
53
63
|
}
|
package/manifest/targets.v1.json
CHANGED
package/package.json
CHANGED
package/protocol.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"protocol": "mhome.app-facade",
|
|
3
|
-
"contractVersion": "1.
|
|
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",
|
|
@@ -9,6 +9,10 @@
|
|
|
9
9
|
"routing": "schema/routing.v1.schema.json",
|
|
10
10
|
"hubState": "schema/hub-state.v1.schema.json",
|
|
11
11
|
"localHubState": "schema/local-hub-state.v1.schema.json",
|
|
12
|
+
"systemClients": "schema/system-clients.v1.schema.json",
|
|
13
|
+
"systemPermissions": "schema/system-permissions.v1.schema.json",
|
|
14
|
+
"systemMetrics": "schema/system-metrics.v1.schema.json",
|
|
15
|
+
"systemInventory": "schema/system-inventory.v1.schema.json",
|
|
12
16
|
"topology": "schema/topology.v1.schema.json",
|
|
13
17
|
"deviceTopology": "schema/device-topology.v1.schema.json"
|
|
14
18
|
},
|
|
@@ -186,19 +186,15 @@
|
|
|
186
186
|
"required": [
|
|
187
187
|
"id",
|
|
188
188
|
"kind",
|
|
189
|
-
"
|
|
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": "
|
|
198
|
-
"
|
|
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-
|
|
254
|
-
"
|
|
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-
|
|
297
|
+
"enum": ["connection-bridge", "bridge-device"]
|
|
302
298
|
},
|
|
303
299
|
"basis": { "const": "sourceProjection" }
|
|
304
300
|
}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
{
|
|
2
|
+
"type": "object",
|
|
3
|
+
"additionalProperties": false,
|
|
4
|
+
"required": [
|
|
5
|
+
"contract",
|
|
6
|
+
"scopeId",
|
|
7
|
+
"observedAtMs",
|
|
8
|
+
"sessions"
|
|
9
|
+
],
|
|
10
|
+
"properties": {
|
|
11
|
+
"contract": {
|
|
12
|
+
"const": "mhome.system.clients.v1"
|
|
13
|
+
},
|
|
14
|
+
"scopeId": {
|
|
15
|
+
"type": "string"
|
|
16
|
+
},
|
|
17
|
+
"observedAtMs": {
|
|
18
|
+
"type": "integer",
|
|
19
|
+
"minimum": 0
|
|
20
|
+
},
|
|
21
|
+
"sessions": {
|
|
22
|
+
"type": "array",
|
|
23
|
+
"items": {
|
|
24
|
+
"type": "object",
|
|
25
|
+
"additionalProperties": false,
|
|
26
|
+
"required": [
|
|
27
|
+
"appClientId",
|
|
28
|
+
"sessionId",
|
|
29
|
+
"source",
|
|
30
|
+
"deviceType",
|
|
31
|
+
"isCurrent",
|
|
32
|
+
"routeKind"
|
|
33
|
+
],
|
|
34
|
+
"properties": {
|
|
35
|
+
"appClientId": {
|
|
36
|
+
"type": "string"
|
|
37
|
+
},
|
|
38
|
+
"sessionId": {
|
|
39
|
+
"type": "string"
|
|
40
|
+
},
|
|
41
|
+
"source": {
|
|
42
|
+
"type": "string"
|
|
43
|
+
},
|
|
44
|
+
"deviceType": {
|
|
45
|
+
"type": "string"
|
|
46
|
+
},
|
|
47
|
+
"isCurrent": {
|
|
48
|
+
"type": "boolean"
|
|
49
|
+
},
|
|
50
|
+
"routeKind": {
|
|
51
|
+
"anyOf": [
|
|
52
|
+
{
|
|
53
|
+
"enum": [
|
|
54
|
+
"localDirect",
|
|
55
|
+
"cloudBridgeShadow"
|
|
56
|
+
]
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
"type": "null"
|
|
60
|
+
}
|
|
61
|
+
]
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|