@mhome/app-facade-protocol 1.61.0 → 1.64.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 CHANGED
@@ -73,7 +73,10 @@ App UI requests full and unwraps the envelope at its transport boundary. Agent
73
73
  and MCP public results use essential; internal workflow reads use full. The CLI
74
74
  uses `--response-detail full|essential`, and the bundled external Skill requests
75
75
  essential. Dashboard essential projection keeps card identity, title, type,
76
- layouts and view choices, excluding renderer configuration and resource payloads.
76
+ view choices, excluding renderer configuration and resource payloads. Card list
77
+ returns only ID/type/title; card detail essential omits layouts. Canvas layout get
78
+ requires one sm/md/lg size and retains every card ID/title/layout in full and essential;
79
+ uninitialized layouts or coordinates are null.
77
80
  Device brief-list essential retains identity, room, capability IDs, Integration and
78
81
  availability, omitting `connectId`, `manufacturerId` and `manufacturerName`.
79
82
  Selected Device detail, history, recent activity and mutation outcomes keep their
@@ -96,6 +99,10 @@ asset manifests and renderer configuration schemas. Selected release detail keep
96
99
  Revisions, installation IDs, existing override config and supported patterns remain.
97
100
  Empty mutation acknowledgements remain empty; they do not invent a new revision.
98
101
 
102
+ Room uses one `/app/room/list` read. Every Room has `roomId`, `roomName`,
103
+ `index`, `deviceCount`, and `deviceIds`; full and essential keep all five fields.
104
+ Membership IDs include Device groups without expanding their members or state.
105
+
99
106
  Targets without a dedicated projection retain their business fields in YAML;
100
107
  essential does not promise a smaller field set for every domain. Targets own that selection.
101
108
 
@@ -0,0 +1,22 @@
1
+ # Entity UI presentation
2
+
3
+ `/app/entity/presentation/get` is a read-only App Facade for the UI. Its direct
4
+ input is `{entityType, entityId}`; tenant, Space and caller come from authenticated
5
+ context. It requires Space read access. It is not an Agent or MCP catalog entry.
6
+
7
+ The successful data object contains `entityEntry`, nullable `entityCard`, and
8
+ `twinAutomations`. The entry and card reuse the existing UI renderer models;
9
+ the schema owns this boundary without duplicating their nested widget/runtime
10
+ contracts. A missing, deleted or differently typed Twin is not found. Device
11
+ presentation reads reuse the device manager; other Twin entities reuse the general
12
+ manager. Ordinary Entity business detail and Group detail retain their own APIs.
13
+
14
+ Device card assembly is best effort. An absent card is `null`, with an empty
15
+ association list. Association-read failures retain the existing execution policy:
16
+ local Core returns an empty list; cloud propagates the error. No writes or repairs
17
+ are performed. Current Twin states still have their separate read/subscription.
18
+
19
+ UI uses `control: {mode: "direct", responseDetail: "full"}` and receives the shared
20
+ `{status: "success", data: ...}` envelope. The generic essential projection returns
21
+ `{status: "success", text: ...}` with the same business fields rendered as YAML;
22
+ there is no domain field reduction. This is not the compact business detail API.
@@ -13,11 +13,11 @@ bridge. A cloud Space composes it in cloud. LLM placement does not change this
13
13
  owner. Cloud entrypoints forward local-Space business to Core; only an unavailable
14
14
  Hub transport permits the explicit read-only registration fallback below.
15
15
 
16
- The result contains `pods`, `scopeId`, `observedAtMs`, and `sourceErrors`.
16
+ The result contains `pods`, `spaceId`, `observedAtMs`, and `sourceErrors`.
17
17
  Every row contains `registrationId`, `clientMode` (`user` or `space`), `registered`
18
- (true), and `connection` with `scopeId`, `state` (`connected`, `disconnected`, or
18
+ (true), and `connection` with `spaceId`, `state` (`connected`, `disconnected`, or
19
19
  `unknown`), and `source` (`hub`, `cloud`, or `unavailable`). Space rows also contain
20
- `scopeId` and `appClientId`. Personal rows contain the saved `name`, `deviceId`,
20
+ `spaceId` and `appClientId`. Personal rows contain the saved `name`, `deviceId`,
21
21
  `model`, `platform`, `firmwareVersion`, `issuedAt`, and `activatedAt`.
22
22
  No tokens, enrollment grants, credential IDs or private keys are returned.
23
23
 
@@ -9,7 +9,7 @@
9
9
  "placement": "local",
10
10
  "accountId": "bot",
11
11
  "conversationId": "group",
12
- "scopeId": "home",
12
+ "spaceId": "home",
13
13
  "displayName": "Family",
14
14
  "createdAtMs": 1
15
15
  }
@@ -0,0 +1,54 @@
1
+ {
2
+ "input": {
3
+ "valid": [
4
+ {
5
+ "entityType": "basic.device.Device",
6
+ "entityId": "device-1"
7
+ }
8
+ ],
9
+ "invalid": [
10
+ {},
11
+ {
12
+ "entityType": " ",
13
+ "entityId": "device-1"
14
+ },
15
+ {
16
+ "entityType": "basic.device.Device",
17
+ "entityId": ""
18
+ },
19
+ {
20
+ "entityType": "basic.device.Device",
21
+ "entityId": "device-1",
22
+ "scopeId": "other"
23
+ }
24
+ ]
25
+ },
26
+ "output": {
27
+ "valid": [
28
+ {
29
+ "entityEntry": {
30
+ "uid": "device-1",
31
+ "type": "basic.device.Device",
32
+ "integration": "example.device",
33
+ "name": "Desk lamp",
34
+ "active": false,
35
+ "data": {},
36
+ "capabilities": [],
37
+ "twinTags": [],
38
+ "cardCount": 0,
39
+ "issue": false
40
+ },
41
+ "entityCard": null,
42
+ "twinAutomations": []
43
+ }
44
+ ],
45
+ "invalid": [
46
+ {},
47
+ {
48
+ "entityEntry": null,
49
+ "entityCard": null,
50
+ "twinAutomations": []
51
+ }
52
+ ]
53
+ }
54
+ }
@@ -1,5 +1,5 @@
1
1
  {
2
- "scopeId": "scope-1",
2
+ "spaceId": "scope-1",
3
3
  "configured": true,
4
4
  "hub": {
5
5
  "id": "hub-1",
@@ -1,5 +1,5 @@
1
1
  {
2
- "scopeId": "scope-1",
2
+ "spaceId": "scope-1",
3
3
  "configured": false,
4
4
  "operation": {
5
5
  "kind": "REMOVE",