@mhome/app-facade-protocol 1.93.0 → 1.109.2

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.
Files changed (34) hide show
  1. package/README.md +13 -1
  2. package/contract/automation-presentation-v1.md +76 -0
  3. package/contract/automation-v1.md +28 -0
  4. package/contract/client-space-focus-v1.md +26 -0
  5. package/contract/entity-presentation-v1.md +24 -1
  6. package/contract/integration-presentation-v1.md +1 -1
  7. package/contract/plugin-preview-v1.md +16 -0
  8. package/contract/reference-presentation-v1.md +35 -0
  9. package/contract/resource-read-v1.md +2 -2
  10. package/contract/space-presentation-v1.md +45 -0
  11. package/contract/storage-v1.md +3 -1
  12. package/contract/widget-presentation-v1.md +36 -0
  13. package/contract/widget-writes-v1.md +44 -0
  14. package/fixtures/authorization/decisions.json +96 -0
  15. package/fixtures/entity-presentation.conformance.json +216 -0
  16. package/fixtures/nfc.conformance.json +442 -0
  17. package/fixtures/presentation/cases.json +48 -50
  18. package/fixtures/reference-presentation.v1.json +5 -0
  19. package/fixtures/routing/cases.json +192 -0
  20. package/fixtures/widget-presentation.v1.json +96 -0
  21. package/manifest/app-facade.v1.json +87 -6
  22. package/manifest/authorization.v1.json +75 -99
  23. package/manifest/host-provision-targets.v1.json +1 -1
  24. package/manifest/hub-targets.v1.json +1 -1
  25. package/manifest/pod-targets.v1.json +1 -1
  26. package/manifest/presentation-times.v1.json +50 -1
  27. package/manifest/routing.v1.json +14 -4
  28. package/manifest/targets.v1.json +1 -1
  29. package/package.json +1 -1
  30. package/protocol.json +1 -1
  31. package/schema/automation-presentation.v1.schema.json +602 -0
  32. package/schema/automation.v1.schema.json +142 -0
  33. package/schema/entity-presentation.v1.schema.json +111 -0
  34. package/schema/routing.v1.schema.json +5 -1
@@ -3028,56 +3028,6 @@
3028
3028
  "status": "error",
3029
3029
  "code": "INVALID_RESPONSE"
3030
3030
  },
3031
- {
3032
- "name": "/app/automation/start acknowledgement True",
3033
- "target": "/app/automation/start",
3034
- "data": {
3035
- "success": true
3036
- },
3037
- "status": "success",
3038
- "acknowledgement": true
3039
- },
3040
- {
3041
- "name": "/app/automation/start acknowledgement False",
3042
- "target": "/app/automation/start",
3043
- "data": {
3044
- "success": false
3045
- },
3046
- "status": "error",
3047
- "code": "OPERATION_FAILED"
3048
- },
3049
- {
3050
- "name": "/app/automation/start acknowledgement None",
3051
- "target": "/app/automation/start",
3052
- "data": {},
3053
- "status": "error",
3054
- "code": "INVALID_RESPONSE"
3055
- },
3056
- {
3057
- "name": "/app/automation/stop acknowledgement True",
3058
- "target": "/app/automation/stop",
3059
- "data": {
3060
- "success": true
3061
- },
3062
- "status": "success",
3063
- "acknowledgement": true
3064
- },
3065
- {
3066
- "name": "/app/automation/stop acknowledgement False",
3067
- "target": "/app/automation/stop",
3068
- "data": {
3069
- "success": false
3070
- },
3071
- "status": "error",
3072
- "code": "OPERATION_FAILED"
3073
- },
3074
- {
3075
- "name": "/app/automation/stop acknowledgement None",
3076
- "target": "/app/automation/stop",
3077
- "data": {},
3078
- "status": "error",
3079
- "code": "INVALID_RESPONSE"
3080
- },
3081
3031
  {
3082
3032
  "name": "/app/widget/delete acknowledgement True",
3083
3033
  "target": "/app/widget/delete",
@@ -3908,5 +3858,53 @@
3908
3858
  }
3909
3859
  ]
3910
3860
  }
3861
+ },
3862
+ {
3863
+ "name": "/app/automation/start control state",
3864
+ "target": "/app/automation/start",
3865
+ "data": {
3866
+ "automationId": "a",
3867
+ "enabled": true,
3868
+ "running": false
3869
+ },
3870
+ "status": "success",
3871
+ "essential": {
3872
+ "automationId": "a",
3873
+ "enabled": true,
3874
+ "running": false
3875
+ }
3876
+ },
3877
+ {
3878
+ "name": "/app/automation/start rejects acknowledgement",
3879
+ "target": "/app/automation/start",
3880
+ "data": {
3881
+ "success": true
3882
+ },
3883
+ "status": "error",
3884
+ "code": "INVALID_RESPONSE"
3885
+ },
3886
+ {
3887
+ "name": "/app/automation/stop control state",
3888
+ "target": "/app/automation/stop",
3889
+ "data": {
3890
+ "automationId": "a",
3891
+ "enabled": false,
3892
+ "running": false
3893
+ },
3894
+ "status": "success",
3895
+ "essential": {
3896
+ "automationId": "a",
3897
+ "enabled": false,
3898
+ "running": false
3899
+ }
3900
+ },
3901
+ {
3902
+ "name": "/app/automation/stop rejects acknowledgement",
3903
+ "target": "/app/automation/stop",
3904
+ "data": {
3905
+ "success": true
3906
+ },
3907
+ "status": "error",
3908
+ "code": "INVALID_RESPONSE"
3911
3909
  }
3912
3910
  ]
@@ -0,0 +1,5 @@
1
+ {
2
+ "description": "Fictional picker business DTOs, excluding the Facade result envelope.",
3
+ "types": {"types":[{"entityType":"basic.device.Device","name":"Device","category":"device"},{"entityType":"basic.widget.ButtonWidget","name":"Button","category":"widget"}]},
4
+ "items": {"items":[{"id":"example:lamp","name":"Desk lamp","entityType":"basic.device.Device","category":"device","capabilities":["switch"],"group":false},{"id":"g:example-lights","name":"All lights","entityType":"basic.device.Device","category":"device","capabilities":[],"group":true}]}
5
+ }
@@ -702,5 +702,197 @@
702
702
  "hubReady": false,
703
703
  "cloudReady": false,
704
704
  "entry": "unavailable"
705
+ },
706
+ {
707
+ "target": "/app/presentation/space/list",
708
+ "execution": "cloud",
709
+ "placement": null,
710
+ "hubReady": true,
711
+ "cloudReady": true,
712
+ "entry": "cloud"
713
+ },
714
+ {
715
+ "target": "/app/presentation/space/list",
716
+ "execution": "cloud",
717
+ "placement": null,
718
+ "hubReady": true,
719
+ "cloudReady": false,
720
+ "entry": "unavailable"
721
+ },
722
+ {
723
+ "target": "/app/presentation/space/list",
724
+ "execution": "cloud",
725
+ "placement": null,
726
+ "hubReady": false,
727
+ "cloudReady": true,
728
+ "entry": "cloud"
729
+ },
730
+ {
731
+ "target": "/app/presentation/space/list",
732
+ "execution": "cloud",
733
+ "placement": null,
734
+ "hubReady": false,
735
+ "cloudReady": false,
736
+ "entry": "unavailable"
737
+ },
738
+ {
739
+ "target": "/app/presentation/space/get",
740
+ "execution": "cloud",
741
+ "placement": null,
742
+ "hubReady": true,
743
+ "cloudReady": true,
744
+ "entry": "cloud"
745
+ },
746
+ {
747
+ "target": "/app/presentation/space/get",
748
+ "execution": "cloud",
749
+ "placement": null,
750
+ "hubReady": true,
751
+ "cloudReady": false,
752
+ "entry": "unavailable"
753
+ },
754
+ {
755
+ "target": "/app/presentation/space/get",
756
+ "execution": "cloud",
757
+ "placement": null,
758
+ "hubReady": false,
759
+ "cloudReady": true,
760
+ "entry": "cloud"
761
+ },
762
+ {
763
+ "target": "/app/presentation/space/get",
764
+ "execution": "cloud",
765
+ "placement": null,
766
+ "hubReady": false,
767
+ "cloudReady": false,
768
+ "entry": "unavailable"
769
+ },
770
+ {
771
+ "target": "/app/space/location/list",
772
+ "execution": "scopeMode",
773
+ "placement": null,
774
+ "hubReady": true,
775
+ "cloudReady": true,
776
+ "entry": "hub"
777
+ },
778
+ {
779
+ "target": "/app/space/location/list",
780
+ "execution": "scopeMode",
781
+ "placement": null,
782
+ "hubReady": true,
783
+ "cloudReady": false,
784
+ "entry": "hub"
785
+ },
786
+ {
787
+ "target": "/app/space/location/list",
788
+ "execution": "scopeMode",
789
+ "placement": null,
790
+ "hubReady": false,
791
+ "cloudReady": true,
792
+ "entry": "cloud"
793
+ },
794
+ {
795
+ "target": "/app/space/location/list",
796
+ "execution": "scopeMode",
797
+ "placement": null,
798
+ "hubReady": false,
799
+ "cloudReady": false,
800
+ "entry": "unavailable"
801
+ },
802
+ {
803
+ "target": "/app/space/delete/status",
804
+ "execution": "cloud",
805
+ "placement": null,
806
+ "hubReady": true,
807
+ "cloudReady": true,
808
+ "entry": "cloud"
809
+ },
810
+ {
811
+ "target": "/app/space/delete/status",
812
+ "execution": "cloud",
813
+ "placement": null,
814
+ "hubReady": true,
815
+ "cloudReady": false,
816
+ "entry": "unavailable"
817
+ },
818
+ {
819
+ "target": "/app/space/delete/status",
820
+ "execution": "cloud",
821
+ "placement": null,
822
+ "hubReady": false,
823
+ "cloudReady": true,
824
+ "entry": "cloud"
825
+ },
826
+ {
827
+ "target": "/app/space/delete/status",
828
+ "execution": "cloud",
829
+ "placement": null,
830
+ "hubReady": false,
831
+ "cloudReady": false,
832
+ "entry": "unavailable"
833
+ },
834
+ {
835
+ "target": "/app/space/beta/update",
836
+ "execution": "cloud",
837
+ "placement": null,
838
+ "hubReady": true,
839
+ "cloudReady": true,
840
+ "entry": "cloud"
841
+ },
842
+ {
843
+ "target": "/app/space/beta/update",
844
+ "execution": "cloud",
845
+ "placement": null,
846
+ "hubReady": true,
847
+ "cloudReady": false,
848
+ "entry": "unavailable"
849
+ },
850
+ {
851
+ "target": "/app/space/beta/update",
852
+ "execution": "cloud",
853
+ "placement": null,
854
+ "hubReady": false,
855
+ "cloudReady": true,
856
+ "entry": "cloud"
857
+ },
858
+ {
859
+ "target": "/app/space/beta/update",
860
+ "execution": "cloud",
861
+ "placement": null,
862
+ "hubReady": false,
863
+ "cloudReady": false,
864
+ "entry": "unavailable"
865
+ },
866
+ {
867
+ "target": "/app/client/space/focus",
868
+ "execution": "connection",
869
+ "placement": null,
870
+ "hubReady": true,
871
+ "cloudReady": true,
872
+ "entry": "hub"
873
+ },
874
+ {
875
+ "target": "/app/client/space/focus",
876
+ "execution": "connection",
877
+ "placement": null,
878
+ "hubReady": true,
879
+ "cloudReady": false,
880
+ "entry": "hub"
881
+ },
882
+ {
883
+ "target": "/app/client/space/focus",
884
+ "execution": "connection",
885
+ "placement": null,
886
+ "hubReady": false,
887
+ "cloudReady": true,
888
+ "entry": "cloud"
889
+ },
890
+ {
891
+ "target": "/app/client/space/focus",
892
+ "execution": "connection",
893
+ "placement": null,
894
+ "hubReady": false,
895
+ "cloudReady": false,
896
+ "entry": "unavailable"
705
897
  }
706
898
  ]
@@ -0,0 +1,96 @@
1
+ {
2
+ "description": "Fictional Widget presentation conformance examples; expectedFields are business-field excerpts.",
3
+ "cases": [
4
+ {
5
+ "type": "data",
6
+ "id": "flags-d",
7
+ "displayName": "Flags",
8
+ "value": false,
9
+ "expectedFields": {
10
+ "id": "flags-d",
11
+ "type": "data",
12
+ "displayName": "Flags",
13
+ "source": "widget",
14
+ "baseId": "flags-d",
15
+ "global": true,
16
+ "revision": 7,
17
+ "dataType": "Bool",
18
+ "repeated": false,
19
+ "value": false
20
+ },
21
+ "absentFields": [
22
+ "schedules",
23
+ "location",
24
+ "tenantId",
25
+ "scopeId",
26
+ "items"
27
+ ]
28
+ },
29
+ {
30
+ "type": "button",
31
+ "id": "run-b",
32
+ "displayName": "Run",
33
+ "expectedFields": {
34
+ "id": "run-b",
35
+ "type": "button",
36
+ "displayName": "Run",
37
+ "label": "Run",
38
+ "value": null
39
+ },
40
+ "absentFields": [
41
+ "dataType",
42
+ "repeated",
43
+ "schedules",
44
+ "location",
45
+ "tenantId",
46
+ "scopeId",
47
+ "items"
48
+ ]
49
+ },
50
+ {
51
+ "type": "circadian",
52
+ "id": "day-c",
53
+ "displayName": "Day",
54
+ "value": 0.0,
55
+ "preview": [
56
+ {
57
+ "time": {
58
+ "hour": 6.0,
59
+ "minute": 0.0
60
+ },
61
+ "value": 10.0,
62
+ "transition": "linear"
63
+ }
64
+ ],
65
+ "expectedFields": {
66
+ "id": "day-c",
67
+ "type": "circadian",
68
+ "displayName": "Day",
69
+ "dataType": "Number",
70
+ "value": 0.0,
71
+ "next": 10.0,
72
+ "nextTimestamp": 1794000000000,
73
+ "curve": "Day",
74
+ "curvePreview": [
75
+ {
76
+ "time": {
77
+ "hour": 6.0,
78
+ "minute": 0.0
79
+ },
80
+ "value": 10.0,
81
+ "transition": "linear"
82
+ }
83
+ ]
84
+ },
85
+ "absentFields": [
86
+ "repeated",
87
+ "schedules",
88
+ "location",
89
+ "tenantId",
90
+ "scopeId",
91
+ "items",
92
+ "offsetPrev"
93
+ ]
94
+ }
95
+ ]
96
+ }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "manifest": "mhome.app-facade.v1",
3
- "contractVersion": "1.93.0",
3
+ "contractVersion": "1.109.2",
4
4
  "callSchema": "schema/facade-call.v1.schema.json",
5
5
  "routing": "manifest/routing.v1.json",
6
6
  "routingSchema": "schema/routing.v1.schema.json",
@@ -57,7 +57,8 @@
57
57
  "/app/plugin/profile/update",
58
58
  "/app/plugin/install/prepare",
59
59
  "/app/plugin/install/start",
60
- "/app/plugin/install/status"
60
+ "/app/plugin/install/status",
61
+ "/app/plugin/preview/check"
61
62
  ],
62
63
  "eventTargets": [
63
64
  "/app/plugin/settings/changed"
@@ -65,7 +66,8 @@
65
66
  "extensionFamily": "/app/plugin/{nodeType}/{route...}",
66
67
  "extensionPriority": "after_exact",
67
68
  "installSchema": "schema/plugin-install.v1.schema.json",
68
- "installContract": "contract/plugin-install-v1.md"
69
+ "installContract": "contract/plugin-install-v1.md",
70
+ "previewContract": "contract/plugin-preview-v1.md"
69
71
  },
70
72
  "runtime": {
71
73
  "contract": "mhome.runtime.status.v1",
@@ -120,7 +122,9 @@
120
122
  "/app/integration/connect",
121
123
  "/app/integration/disconnect",
122
124
  "/app/integration/installed/list",
123
- "/app/integration/capability/detail/get"
125
+ "/app/integration/capability/detail/get",
126
+ "/app/integration/preview/apply",
127
+ "/app/integration/preview/status"
124
128
  ],
125
129
  "includeDocumentationDefault": true
126
130
  },
@@ -243,14 +247,15 @@
243
247
  "schema": "schema/entity-presentation.v1.schema.json",
244
248
  "contract": "contract/entity-presentation-v1.md",
245
249
  "requestTargets": [
246
- "/app/entity/presentation/get"
250
+ "/app/presentation/entity/get",
251
+ "/app/presentation/entity/meta/get"
247
252
  ]
248
253
  },
249
254
  "integrationPresentation": {
250
255
  "schema": "schema/integration-presentation.v1.schema.json",
251
256
  "contract": "contract/integration-presentation-v1.md",
252
257
  "requestTargets": [
253
- "/app/integration/presentation/get"
258
+ "/app/presentation/integration/get"
254
259
  ]
255
260
  },
256
261
  "group": {
@@ -318,6 +323,82 @@
318
323
  "/app/object-storage/folders/set-limit",
319
324
  "/app/object-storage/session/acquire"
320
325
  ]
326
+ },
327
+ "spacePresentation": {
328
+ "contract": "contract/space-presentation-v1.md",
329
+ "requestTargets": [
330
+ "/app/presentation/space/list",
331
+ "/app/presentation/space/get",
332
+ "/app/space/delete/status",
333
+ "/app/space/beta/update",
334
+ "/app/space/location/list"
335
+ ]
336
+ },
337
+ "automationPresentation": {
338
+ "schema": "schema/automation-presentation.v1.schema.json",
339
+ "contract": "contract/automation-presentation-v1.md",
340
+ "uiRequestTargets": [
341
+ "/app/presentation/automation/names/get",
342
+ "/app/presentation/automation/list",
343
+ "/app/presentation/automation/overview/get",
344
+ "/app/presentation/automation/placements/get",
345
+ "/app/presentation/automation/summaries/get",
346
+ "/app/presentation/automation/overview/init",
347
+ "/app/presentation/automation/overview/config/update",
348
+ "/app/presentation/automation/overview/config/provide",
349
+ "/app/presentation/automation/overview/save",
350
+ "/app/presentation/automation/overview/cancel",
351
+ "/app/presentation/automation/copy",
352
+ "/app/presentation/automation/enroll",
353
+ "/app/presentation/automation/share",
354
+ "/app/presentation/automation/generated/enable",
355
+ "/app/presentation/automation/generated/disable",
356
+ "/app/presentation/automation/generated/run"
357
+ ]
358
+ },
359
+ "resourceTransfer": {
360
+ "requestTargets": [
361
+ "/app/resource/transfer/prepare"
362
+ ]
363
+ },
364
+ "widgetPresentation": {
365
+ "contract": "contract/widget-presentation-v1.md",
366
+ "uiRequestTargets": [
367
+ "/app/presentation/widget/list",
368
+ "/app/presentation/widget/names/get",
369
+ "/app/presentation/widget/defaults/get"
370
+ ]
371
+ },
372
+ "clientSpace": {
373
+ "requestTargets": [
374
+ "/app/client/space/focus"
375
+ ],
376
+ "contract": "contract/client-space-focus-v1.md"
377
+ },
378
+ "automation": {
379
+ "schema": "schema/automation.v1.schema.json",
380
+ "contract": "contract/automation-v1.md",
381
+ "requestTargets": [
382
+ "/app/automation/start",
383
+ "/app/automation/stop",
384
+ "/app/automation/rename",
385
+ "/app/automation/description/update"
386
+ ]
387
+ },
388
+ "widgetWrites": {
389
+ "contract": "contract/widget-writes-v1.md",
390
+ "requestTargets": [
391
+ "/app/widget/data/create",
392
+ "/app/widget/button/create",
393
+ "/app/widget/circadian/create",
394
+ "/app/widget/data/config/update",
395
+ "/app/widget/button/config/update",
396
+ "/app/widget/circadian/config/update",
397
+ "/app/widget/circadian/runtime/update",
398
+ "/app/widget/data/update",
399
+ "/app/widget/button/trigger",
400
+ "/app/widget/delete"
401
+ ]
321
402
  }
322
403
  },
323
404
  "authorization": "manifest/authorization.v1.json",