@mhome/app-facade-protocol 1.20.0 → 1.21.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,117 @@
1
+ {
2
+ "valid": [
3
+ {
4
+ "name": "main definition",
5
+ "value": {
6
+ "capabilityId": "basic.device.command.onOff",
7
+ "type": "COMMAND",
8
+ "displayName": "Power on / off",
9
+ "description": "Controls the device on/off state.",
10
+ "visibility": "full",
11
+ "tag": "on/off"
12
+ }
13
+ },
14
+ {
15
+ "name": "provider implementation",
16
+ "value": {
17
+ "capabilityId": "mlinkHue.device.command.onOff",
18
+ "type": "COMMAND",
19
+ "displayName": "Power on / off",
20
+ "description": "Controls the device on/off state.",
21
+ "visibility": "full",
22
+ "tag": "on/off",
23
+ "parentCapabilityId": "basic.device.command.onOff"
24
+ }
25
+ },
26
+ {
27
+ "name": "no primary tag",
28
+ "value": {
29
+ "capabilityId": "basic.device.command.onOff",
30
+ "type": "COMMAND",
31
+ "displayName": "Power on / off",
32
+ "description": "Controls the device on/off state.",
33
+ "visibility": "full"
34
+ }
35
+ },
36
+ {
37
+ "name": "parent without tag",
38
+ "value": {
39
+ "capabilityId": "mlinkHue.device.command.onOff",
40
+ "type": "COMMAND",
41
+ "displayName": "Power on / off",
42
+ "description": "Controls the device on/off state.",
43
+ "visibility": "full",
44
+ "parentCapabilityId": "basic.device.command.onOff"
45
+ }
46
+ },
47
+ {
48
+ "name": "data capability",
49
+ "value": {
50
+ "capabilityId": "basic.time.data.now",
51
+ "type": "DATA",
52
+ "displayName": "Power on / off",
53
+ "description": "Controls the device on/off state.",
54
+ "visibility": "full",
55
+ "tag": "time"
56
+ }
57
+ }
58
+ ],
59
+ "invalid": [
60
+ {
61
+ "name": "null tag",
62
+ "value": {
63
+ "capabilityId": "basic.device.command.onOff",
64
+ "type": "COMMAND",
65
+ "displayName": "Power on / off",
66
+ "description": "Controls the device on/off state.",
67
+ "visibility": "full",
68
+ "tag": null
69
+ }
70
+ },
71
+ {
72
+ "name": "empty tag",
73
+ "value": {
74
+ "capabilityId": "basic.device.command.onOff",
75
+ "type": "COMMAND",
76
+ "displayName": "Power on / off",
77
+ "description": "Controls the device on/off state.",
78
+ "visibility": "full",
79
+ "tag": ""
80
+ }
81
+ },
82
+ {
83
+ "name": "partial ID",
84
+ "value": {
85
+ "capabilityId": "command.onOff",
86
+ "type": "COMMAND",
87
+ "displayName": "Power on / off",
88
+ "description": "Controls the device on/off state.",
89
+ "visibility": "full",
90
+ "tag": "on/off"
91
+ }
92
+ },
93
+ {
94
+ "name": "obsolete definitionId",
95
+ "value": {
96
+ "capabilityId": "basic.device.command.onOff",
97
+ "type": "COMMAND",
98
+ "displayName": "Power on / off",
99
+ "description": "Controls the device on/off state.",
100
+ "visibility": "full",
101
+ "tag": "on/off",
102
+ "definitionId": "basic.device.command.onOff"
103
+ }
104
+ },
105
+ {
106
+ "name": "whitespace in ID",
107
+ "value": {
108
+ "capabilityId": "basic.device.command.on Off",
109
+ "type": "COMMAND",
110
+ "displayName": "Power on / off",
111
+ "description": "Controls the device on/off state.",
112
+ "visibility": "full",
113
+ "tag": "on/off"
114
+ }
115
+ }
116
+ ]
117
+ }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "manifest": "mhome.app-facade.v1",
3
- "contractVersion": "1.20.0",
3
+ "contractVersion": "1.21.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",
@@ -82,6 +82,15 @@
82
82
  "/app/system/hosts/runtime",
83
83
  "/app/system/hosts/claim"
84
84
  ]
85
+ },
86
+ "integration": {
87
+ "capabilitySchema": "schema/capability-descriptor.v1.schema.json",
88
+ "requestTargets": [
89
+ "/app/integration/detail/get",
90
+ "/app/integration/installed/list",
91
+ "/app/integration/capability/detail/get"
92
+ ],
93
+ "includeDocumentationDefault": true
85
94
  }
86
95
  }
87
96
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "manifest": "mhome.hub.targets.v1",
3
- "contractVersion": "1.20.0",
3
+ "contractVersion": "1.21.0",
4
4
  "appTargets": [
5
5
  "/app/hub/get",
6
6
  "/app/hub/remove",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "manifest": "mhome.app-facade.routing.v1",
3
- "contractVersion": "1.20.0",
3
+ "contractVersion": "1.21.0",
4
4
  "targetPrefix": "/app/",
5
5
  "default": {
6
6
  "execution": "scopeMode",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "manifest": "mhome.messaging.targets.v1",
3
- "contractVersion": "1.20.0",
3
+ "contractVersion": "1.21.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.20.0",
3
+ "version": "1.21.0",
4
4
  "description": "Build-time protocol artifacts for mhome.app-facade",
5
5
  "license": "MIT",
6
6
  "repository": {
package/protocol.json CHANGED
@@ -1,8 +1,9 @@
1
1
  {
2
2
  "protocol": "mhome.app-facade",
3
- "contractVersion": "1.20.0",
3
+ "contractVersion": "1.21.0",
4
4
  "manifest": "manifest/app-facade.v1.json",
5
5
  "schemas": {
6
+ "capabilityDescriptor": "schema/capability-descriptor.v1.schema.json",
6
7
  "call": "schema/facade-call.v1.schema.json",
7
8
  "frame": "schema/messaging-frame.v3.schema.json",
8
9
  "interactionFlow": "schema/interaction-flow-app.v1.schema.json",
@@ -18,6 +19,7 @@
18
19
  "fixtures": {
19
20
  "valid": "fixtures",
20
21
  "invalid": "fixtures/invalid",
22
+ "capabilityDescriptor": "fixtures/capability-descriptor.conformance.json",
21
23
  "interactionFlow": "fixtures/interaction-flow.conformance.json"
22
24
  }
23
25
  }
@@ -0,0 +1,49 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://mhome.ai/schema/capability-descriptor.v1.schema.json",
4
+ "title": "CapabilityDescriptor",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": [
8
+ "capabilityId",
9
+ "type",
10
+ "displayName",
11
+ "description",
12
+ "visibility"
13
+ ],
14
+ "properties": {
15
+ "capabilityId": {
16
+ "type": "string",
17
+ "pattern": "^[^.\\s]+\\.[^.\\s]+\\.(command|state|event|data)\\.[^.\\s]+$"
18
+ },
19
+ "parentCapabilityId": {
20
+ "type": "string",
21
+ "pattern": "^[^.\\s]+\\.[^.\\s]+\\.(command|state|event|data)\\.[^.\\s]+$"
22
+ },
23
+ "type": {
24
+ "enum": [
25
+ "COMMAND",
26
+ "STATE",
27
+ "EVENT",
28
+ "DATA"
29
+ ]
30
+ },
31
+ "displayName": {
32
+ "type": "string"
33
+ },
34
+ "description": {
35
+ "type": "string"
36
+ },
37
+ "visibility": {
38
+ "enum": [
39
+ "full",
40
+ "internal"
41
+ ]
42
+ },
43
+ "tag": {
44
+ "type": "string",
45
+ "minLength": 1,
46
+ "pattern": "^\\S(?:.*\\S)?$"
47
+ }
48
+ }
49
+ }