@mhome/app-facade-protocol 1.179.4 → 1.180.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.
@@ -14,7 +14,10 @@ They have no native Agent, external CLI Skill, MCP or CLI entrypoint. Shared
14
14
  - `/app/presentation/device/history/series/get`, `{deviceId, capabilityIds?: []}`:
15
15
  `{deviceId, series}` with per-capability decoded `states`, `events`, `logs`. Empty
16
16
  capability selection reads all series. This preserves chart structure; the shared
17
- Device history Facade returns the complete retained matching business timeline; see history-v1.md.
17
+ Device history Facade returns the complete retained matching business timeline.
18
+ Both use the same pure retained-fact reader and source retention window. Series
19
+ adds no per-capability count clipping and never triggers compaction or cache
20
+ repair; see history-v1.md.
18
21
  - `/app/presentation/device/online/list`, `{entityIds?: []}`:
19
22
  `{devices:[{entityId,online,updatedAtSec}]}`. Normalizes and deduplicates selected
20
23
  IDs, preserves request order and returns only IDs with stored online records.
@@ -27,7 +30,11 @@ Device details and Device Group State tabs read static bindings first, then use
27
30
  shared selected `/app/device/state/get` and `/app/widget/value/get` observations. Canvas
28
31
  content reuses static Card assembly; it does not call the single-device view API.
29
32
  History renderers request chart series only when needed. The Devices directory
30
- reads selected online rows after loading its catalog. These reads never refresh
33
+ publishes its reliable Device definitions before independent display metadata or
34
+ online reads finish. Each failed section retains its own error/retry; unavailable
35
+ online is unknown, and unavailable rooms do not mean unassigned. Canvas similarly
36
+ keeps definitions and reliable/cached values while exposing scoped observation
37
+ errors and retry. These reads never refresh
31
38
  providers, change Twin lifecycle or initialize new business resources.
32
39
 
33
40
  The backend adapters own visibility, unique render-anchor validation and existing
@@ -12,14 +12,18 @@ built-in Entity types; other types are Integration-defined.
12
12
  `{items: [{requestedId, found, reason?, entity?}]}`. `entity` is exactly the same
13
13
  metadata model as a list row; callers with known IDs need not list first.
14
14
  - `/app/entity/state/get`: `{entityType, ids}` (one or more nonblank IDs before
15
- deduplication) returns ordered `{items: [{requestedId, found, reason?, resource?}]}`.
15
+ deduplication) returns ordered `{items: [{requestedId, found, reason?, resource?, problem?}]}`.
16
16
  `resource` is `{entityId, latest: [{capabilityId, state?, event?, log?}]}`.
17
17
  These are latest persisted observations, without refreshing a Provider or deriving
18
18
  online status. Groups read their own observations without expanding members.
19
19
  Saved Locations read their Twin observations, including retained current weather
20
20
  only when its coordinates match the saved Location. Weather from an old address
21
21
  is omitted; reads do not fetch replacement weather. Existing AppClient endpoints
22
- return `latest: []`; missing resources use
22
+ return `latest: []`. Failed per-ID Group or observation reads use `unavailable`
23
+ with a structured problem and no resource; they never imply absence or empty state.
24
+ Mixed reliable/failed reads are partial; all-unavailable returns error with
25
+ error.details.items. Input, authority and mandatory shared-read failures remain
26
+ request errors. Missing resources use
23
27
  `found: false, reason: "not_found"` and omit resource. No observations is not missing.
24
28
  - `/app/entity/history/list` remains independent and returns all retained matching records, with optional explicit time bounds.
25
29
 
@@ -45,3 +45,9 @@ retry is introduced. Required evidence for a dependent mutation remains required
45
45
  problem?}]`, not an uncorrelated automations array. The list endpoint retains
46
46
  its automations summaries array. Source/internal program ID rejection remains
47
47
  request validation; known user program and Automation Group lookups are isolated.
48
+
49
+ - Device and Entity state retain ordered items when a selected Group or observation
50
+ read fails. An unavailable item has no resource or fabricated latest/online values.
51
+ All-unavailable diagnostics live in error.details.items; shared cache/online reads
52
+ and strict visibility consumers still fail the request. Location aliases retain
53
+ the caller's requestedId in diagnostics.
@@ -35,6 +35,13 @@ Observation batches accept one or more IDs, reject blanks, trim and deduplicate
35
35
  request order. Every normalized ID gets `{requestedId, found, resource?}`; missing
36
36
  resources have `found: false, reason: "not_found"`. A known Device with no observations
37
37
  has `found: true` and `latest: []`. Unknown reachability omits `online`; it is not false.
38
+ Device and Entity state isolate Group-definition, per-ID recovery and decoding failures:
39
+ `found: false, reason: "unavailable", problem` omits resource. Reliable remaining
40
+ results yield partial; all-unavailable diagnostics are in error.details.items.
41
+ The complete input and Space authority are checked before fan-out. Unattributable
42
+ mandatory shared-cache and online reads still fail the request. Full/Essential
43
+ retain the same IDs, reasons and diagnostics; see resource-read-failures-v1.md.
44
+
38
45
  Device state supports visible physical devices and Device groups. General Entity state
39
46
  also requires entityType, supports same-type Groups and respects source visibility;
40
47
  saved Locations read their Twin observations, including retained weather matching
@@ -5539,5 +5539,221 @@
5539
5539
  }
5540
5540
  ]
5541
5541
  }
5542
+ },
5543
+ {
5544
+ "name": "device-state-mixed-unavailable",
5545
+ "target": "/app/device/state/get",
5546
+ "status": "partial",
5547
+ "data": {
5548
+ "items": [
5549
+ {
5550
+ "requestedId": "good",
5551
+ "found": true,
5552
+ "resource": {
5553
+ "entityId": "good",
5554
+ "latest": []
5555
+ }
5556
+ },
5557
+ {
5558
+ "requestedId": "bad",
5559
+ "found": false,
5560
+ "reason": "unavailable",
5561
+ "problem": {
5562
+ "code": "RESOURCE_UNAVAILABLE",
5563
+ "message": "The selected resource could not be read",
5564
+ "details": {
5565
+ "requestedId": "bad"
5566
+ }
5567
+ }
5568
+ },
5569
+ {
5570
+ "requestedId": "missing",
5571
+ "found": false,
5572
+ "reason": "not_found"
5573
+ }
5574
+ ]
5575
+ },
5576
+ "essential": {
5577
+ "items": [
5578
+ {
5579
+ "requestedId": "good",
5580
+ "found": true,
5581
+ "resource": {
5582
+ "entityId": "good",
5583
+ "latest": []
5584
+ }
5585
+ },
5586
+ {
5587
+ "requestedId": "bad",
5588
+ "found": false,
5589
+ "reason": "unavailable",
5590
+ "problem": {
5591
+ "code": "RESOURCE_UNAVAILABLE",
5592
+ "message": "The selected resource could not be read",
5593
+ "details": {
5594
+ "requestedId": "bad"
5595
+ }
5596
+ }
5597
+ },
5598
+ {
5599
+ "requestedId": "missing",
5600
+ "found": false,
5601
+ "reason": "not_found"
5602
+ }
5603
+ ]
5604
+ }
5605
+ },
5606
+ {
5607
+ "name": "device-state-all-unavailable",
5608
+ "target": "/app/device/state/get",
5609
+ "status": "error",
5610
+ "code": "RESOURCE_UNAVAILABLE",
5611
+ "data": {
5612
+ "items": [
5613
+ {
5614
+ "requestedId": "bad",
5615
+ "found": false,
5616
+ "reason": "unavailable",
5617
+ "problem": {
5618
+ "code": "RESOURCE_UNAVAILABLE",
5619
+ "message": "The selected resource could not be read",
5620
+ "details": {
5621
+ "requestedId": "bad"
5622
+ }
5623
+ }
5624
+ }
5625
+ ]
5626
+ }
5627
+ },
5628
+ {
5629
+ "name": "device-state-confirmed-absent",
5630
+ "target": "/app/device/state/get",
5631
+ "status": "success",
5632
+ "data": {
5633
+ "items": [
5634
+ {
5635
+ "requestedId": "missing",
5636
+ "found": false,
5637
+ "reason": "not_found"
5638
+ }
5639
+ ]
5640
+ },
5641
+ "essential": {
5642
+ "items": [
5643
+ {
5644
+ "requestedId": "missing",
5645
+ "found": false,
5646
+ "reason": "not_found"
5647
+ }
5648
+ ]
5649
+ }
5650
+ },
5651
+ {
5652
+ "name": "entity-state-mixed-unavailable",
5653
+ "target": "/app/entity/state/get",
5654
+ "status": "partial",
5655
+ "data": {
5656
+ "items": [
5657
+ {
5658
+ "requestedId": "good",
5659
+ "found": true,
5660
+ "resource": {
5661
+ "entityId": "good",
5662
+ "latest": []
5663
+ }
5664
+ },
5665
+ {
5666
+ "requestedId": "bad",
5667
+ "found": false,
5668
+ "reason": "unavailable",
5669
+ "problem": {
5670
+ "code": "RESOURCE_UNAVAILABLE",
5671
+ "message": "The selected resource could not be read",
5672
+ "details": {
5673
+ "requestedId": "bad"
5674
+ }
5675
+ }
5676
+ },
5677
+ {
5678
+ "requestedId": "missing",
5679
+ "found": false,
5680
+ "reason": "not_found"
5681
+ }
5682
+ ]
5683
+ },
5684
+ "essential": {
5685
+ "items": [
5686
+ {
5687
+ "requestedId": "good",
5688
+ "found": true,
5689
+ "resource": {
5690
+ "entityId": "good",
5691
+ "latest": []
5692
+ }
5693
+ },
5694
+ {
5695
+ "requestedId": "bad",
5696
+ "found": false,
5697
+ "reason": "unavailable",
5698
+ "problem": {
5699
+ "code": "RESOURCE_UNAVAILABLE",
5700
+ "message": "The selected resource could not be read",
5701
+ "details": {
5702
+ "requestedId": "bad"
5703
+ }
5704
+ }
5705
+ },
5706
+ {
5707
+ "requestedId": "missing",
5708
+ "found": false,
5709
+ "reason": "not_found"
5710
+ }
5711
+ ]
5712
+ }
5713
+ },
5714
+ {
5715
+ "name": "entity-state-all-unavailable",
5716
+ "target": "/app/entity/state/get",
5717
+ "status": "error",
5718
+ "code": "RESOURCE_UNAVAILABLE",
5719
+ "data": {
5720
+ "items": [
5721
+ {
5722
+ "requestedId": "bad",
5723
+ "found": false,
5724
+ "reason": "unavailable",
5725
+ "problem": {
5726
+ "code": "RESOURCE_UNAVAILABLE",
5727
+ "message": "The selected resource could not be read",
5728
+ "details": {
5729
+ "requestedId": "bad"
5730
+ }
5731
+ }
5732
+ }
5733
+ ]
5734
+ }
5735
+ },
5736
+ {
5737
+ "name": "entity-state-confirmed-absent",
5738
+ "target": "/app/entity/state/get",
5739
+ "status": "success",
5740
+ "data": {
5741
+ "items": [
5742
+ {
5743
+ "requestedId": "missing",
5744
+ "found": false,
5745
+ "reason": "not_found"
5746
+ }
5747
+ ]
5748
+ },
5749
+ "essential": {
5750
+ "items": [
5751
+ {
5752
+ "requestedId": "missing",
5753
+ "found": false,
5754
+ "reason": "not_found"
5755
+ }
5756
+ ]
5757
+ }
5542
5758
  }
5543
5759
  ]
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "manifest": "mhome.app-facade.v1",
3
- "contractVersion": "1.179.4",
3
+ "contractVersion": "1.180.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",
@@ -1,5 +1,5 @@
1
1
  {
2
- "contractVersion": "1.179.4",
2
+ "contractVersion": "1.180.0",
3
3
  "operations": {
4
4
  "/app/agent/context/get": "spaceRead",
5
5
  "/app/agent/conversation/get": "spaceRead",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "manifest": "mhome.host-provision.targets.v1",
3
- "contractVersion": "1.179.4",
3
+ "contractVersion": "1.180.0",
4
4
  "contract": "contract/host-provisioning-v1.md",
5
5
  "localTargets": [
6
6
  "/local/host/provision/start",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "manifest": "mhome.hub.targets.v1",
3
- "contractVersion": "1.179.4",
3
+ "contractVersion": "1.180.0",
4
4
  "appTargets": [
5
5
  "/app/hub/get",
6
6
  "/app/hub/remove"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "manifest": "mhome.pod.targets.v1",
3
- "contractVersion": "1.179.4",
3
+ "contractVersion": "1.180.0",
4
4
  "contract": "contract/pod-commissioning-v1.md",
5
5
  "localTargets": [
6
6
  "/local/pod/discovery/start",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "manifest": "mhome.app-facade.routing.v1",
3
- "contractVersion": "1.179.4",
3
+ "contractVersion": "1.180.0",
4
4
  "targetPrefix": "/app/",
5
5
  "default": {
6
6
  "execution": "spaceMode"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "manifest": "mhome.messaging.targets.v1",
3
- "contractVersion": "1.179.4",
3
+ "contractVersion": "1.180.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.179.4",
3
+ "version": "1.180.0",
4
4
  "description": "Build-time protocol artifacts for mhome.app-facade",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
package/protocol.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "protocol": "mhome.app-facade",
3
- "contractVersion": "1.179.4",
3
+ "contractVersion": "1.180.0",
4
4
  "manifest": "manifest/app-facade.v1.json",
5
5
  "schemas": {
6
6
  "dashboardCardAuthoring": "schema/dashboard-card-authoring.v1.schema.json",