@mhome/app-facade-protocol 1.118.4 → 1.119.1
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 +2 -0
- package/contract/device-presentation-v1.md +35 -0
- package/contract/resource-read-v1.md +4 -9
- package/manifest/app-facade.v1.json +10 -6
- package/manifest/authorization.v1.json +4 -4
- package/manifest/host-provision-targets.v1.json +1 -1
- package/manifest/hub-targets.v1.json +1 -1
- package/manifest/pod-targets.v1.json +1 -1
- package/manifest/routing.v1.json +1 -1
- package/manifest/targets.v1.json +1 -1
- package/package.json +1 -1
- package/protocol.json +1 -1
package/README.md
CHANGED
|
@@ -22,6 +22,8 @@ identity. Core-to-Node routes and provider runtime models belong to
|
|
|
22
22
|
|
|
23
23
|
See [resource definition, observation, history and relationship reads](contract/resource-read-v1.md)
|
|
24
24
|
for shared business reads and the separate UI rendering boundary.
|
|
25
|
+
Device-only rendering, online rows and chart series use the
|
|
26
|
+
[Device UI presentation contract](contract/device-presentation-v1.md).
|
|
25
27
|
|
|
26
28
|
See [Agent LLM settings](contract/agent-llm-v1.md) for active-mode reads,
|
|
27
29
|
independent saved configuration and Provider Operation boundaries.
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# Device UI presentation
|
|
2
|
+
|
|
3
|
+
Device-specific UI adapters use `/app/presentation/device/*`. All three are
|
|
4
|
+
read-only, use the standard App Facade envelope and follow Space-mode execution:
|
|
5
|
+
cloud Spaces execute in the cloud; local Spaces execute on their selected Hub.
|
|
6
|
+
They have no native Agent, external CLI Skill, MCP or CLI entrypoint. Shared
|
|
7
|
+
`/app/device/state/get`, list, detail and bounded history remain domain APIs.
|
|
8
|
+
|
|
9
|
+
- `/app/presentation/device/view/get`, `{deviceId}`: `{deviceId, primaryViewId, views, widgets, twin}`.
|
|
10
|
+
Reads the unique hidden Device render definition, preserving exact Widget/Twin
|
|
11
|
+
bindings. Disabled devices can have empty definitions. Multiple anchors fail rather
|
|
12
|
+
than choosing an arbitrary visible Card. Widgets contain configuration, never values. The optional `twin` metadata is
|
|
13
|
+
returned even when a known device has no render anchor.
|
|
14
|
+
- `/app/presentation/device/history/series/get`, `{deviceId, capabilityIds?: []}`:
|
|
15
|
+
`{deviceId, series}` with per-capability decoded `states`, `events`, `logs`. Empty
|
|
16
|
+
capability selection reads all series. This preserves chart structure; the shared
|
|
17
|
+
Device history Facade remains a bounded, merged business timeline.
|
|
18
|
+
- `/app/presentation/device/online/list`, `{entityIds?: []}`:
|
|
19
|
+
`{devices:[{entityId,online,updatedAtSec}]}`. Normalizes and deduplicates selected
|
|
20
|
+
IDs, preserves request order and returns only IDs with stored online records.
|
|
21
|
+
An empty selection returns no rows. This preserves the existing UI projection:
|
|
22
|
+
`online` is true for the stored `online` observation and false for other stored
|
|
23
|
+
states; an absent record is omitted. It never probes a device or reads capability
|
|
24
|
+
observations. The shared state API instead omits unknown `online` fields.
|
|
25
|
+
|
|
26
|
+
Device details and Device Group State tabs read static bindings first, then use
|
|
27
|
+
shared selected `/app/device/state/get` and `/app/widget/value/get` observations. Canvas
|
|
28
|
+
content reuses static Card assembly; it does not call the single-device view API.
|
|
29
|
+
History renderers request chart series only when needed. The Devices directory
|
|
30
|
+
reads selected online rows after loading its catalog. These reads never refresh
|
|
31
|
+
providers, change Twin lifecycle or initialize new business resources.
|
|
32
|
+
|
|
33
|
+
The backend adapters own visibility, unique render-anchor validation and existing
|
|
34
|
+
series filtering. Managers, persistence tables, group aggregation, generated
|
|
35
|
+
Automations and push protocols are unchanged. Only the namespaced UI routes are registered.
|
|
@@ -56,15 +56,10 @@ observation and graph reads preserve their bounded business fields in Essential.
|
|
|
56
56
|
|
|
57
57
|
## UI-only reads
|
|
58
58
|
|
|
59
|
-
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
returned even when a known device has no render anchor.
|
|
64
|
-
- `/app/device/history/series/get`, `{deviceId, capabilityIds?: []}`:
|
|
65
|
-
`{deviceId, series}` with per-capability decoded `states`, `events`, `logs`. Empty
|
|
66
|
-
capability selection reads all series. This preserves chart structure; the shared
|
|
67
|
-
Device history Facade remains a bounded, merged business timeline.
|
|
59
|
+
Device-specific rendering, chart series and selected online reads use the
|
|
60
|
+
[`/app/presentation/device/*` contract](device-presentation-v1.md). They are UI
|
|
61
|
+
adapters, separate from the shared definition/state/history contracts.
|
|
62
|
+
|
|
68
63
|
- `/app/dashboard/canvas/content/get`, `{canvasId}`: Canvas metadata plus Cards' static
|
|
69
64
|
titles, view bindings, layouts, settings, metadata and selected Widget definitions.
|
|
70
65
|
Each entity Card includes the same `twin` metadata, loaded once per entity in the
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"manifest": "mhome.app-facade.v1",
|
|
3
|
-
"contractVersion": "1.
|
|
3
|
+
"contractVersion": "1.119.1",
|
|
4
4
|
"callSchema": "schema/facade-call.v1.schema.json",
|
|
5
5
|
"routing": "manifest/routing.v1.json",
|
|
6
6
|
"routingSchema": "schema/routing.v1.schema.json",
|
|
@@ -276,11 +276,7 @@
|
|
|
276
276
|
"/app/automation/status",
|
|
277
277
|
"/app/graph/relations/get"
|
|
278
278
|
],
|
|
279
|
-
"contract": "contract/resource-read-v1.md"
|
|
280
|
-
"uiRequestTargets": [
|
|
281
|
-
"/app/device/view/get",
|
|
282
|
-
"/app/device/history/series/get"
|
|
283
|
-
]
|
|
279
|
+
"contract": "contract/resource-read-v1.md"
|
|
284
280
|
},
|
|
285
281
|
"agentLlm": {
|
|
286
282
|
"schema": "schema/agent-llm.v1.schema.json",
|
|
@@ -425,6 +421,14 @@
|
|
|
425
421
|
],
|
|
426
422
|
"owner": "cloudStandardCatalog",
|
|
427
423
|
"transport": "authorizedHub"
|
|
424
|
+
},
|
|
425
|
+
"devicePresentation": {
|
|
426
|
+
"contract": "contract/device-presentation-v1.md",
|
|
427
|
+
"uiRequestTargets": [
|
|
428
|
+
"/app/presentation/device/view/get",
|
|
429
|
+
"/app/presentation/device/history/series/get",
|
|
430
|
+
"/app/presentation/device/online/list"
|
|
431
|
+
]
|
|
428
432
|
}
|
|
429
433
|
},
|
|
430
434
|
"authorization": "manifest/authorization.v1.json",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"contractVersion": "1.
|
|
2
|
+
"contractVersion": "1.119.1",
|
|
3
3
|
"operations": {
|
|
4
4
|
"/app/agent/context/get": "spaceRead",
|
|
5
5
|
"/app/agent/credit/usage": "spaceRead",
|
|
@@ -84,12 +84,12 @@
|
|
|
84
84
|
"/app/device/disable": "spaceWrite",
|
|
85
85
|
"/app/device/enable": "spaceWrite",
|
|
86
86
|
"/app/device/history/list": "spaceRead",
|
|
87
|
-
"/app/device/history/series/get": "spaceRead",
|
|
87
|
+
"/app/presentation/device/history/series/get": "spaceRead",
|
|
88
88
|
"/app/device/list": "spaceRead",
|
|
89
|
-
"/app/device/online/list": "spaceRead",
|
|
89
|
+
"/app/presentation/device/online/list": "spaceRead",
|
|
90
90
|
"/app/device/refresh": "spaceWrite",
|
|
91
91
|
"/app/device/state/get": "spaceRead",
|
|
92
|
-
"/app/device/view/get": "spaceRead",
|
|
92
|
+
"/app/presentation/device/view/get": "spaceRead",
|
|
93
93
|
"/app/dialog/get": "spaceRead",
|
|
94
94
|
"/app/dialog/list": "spaceRead",
|
|
95
95
|
"/app/dialog/reply": "spaceWrite",
|
package/manifest/routing.v1.json
CHANGED
package/manifest/targets.v1.json
CHANGED
package/package.json
CHANGED