@mhome/app-facade-protocol 1.168.0 → 1.169.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.
@@ -14,7 +14,7 @@ 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 remains a bounded, merged business timeline.
17
+ Device history Facade returns the complete retained matching business timeline; see history-v1.md.
18
18
  - `/app/presentation/device/online/list`, `{entityIds?: []}`:
19
19
  `{devices:[{entityId,online,updatedAtSec}]}`. Normalizes and deduplicates selected
20
20
  IDs, preserves request order and returns only IDs with stored online records.
@@ -18,7 +18,7 @@ built-in Entity types; other types are Integration-defined.
18
18
  online status. Groups read their own observations without expanding members.
19
19
  Existing Location/AppClient endpoints return `latest: []`; missing resources use
20
20
  `found: false, reason: "not_found"` and omit resource. No observations is not missing.
21
- - `/app/entity/history/list` remains independent and returns at most 100 records.
21
+ - `/app/entity/history/list` remains independent and returns all retained matching records, with optional explicit time bounds.
22
22
 
23
23
  Metadata contains id, name, entityType, integration?, connectId?, active, capabilities, data,
24
24
  tags (Blueprint IDs), availabilityStatus?, issue, group and entityIds (Group members).
@@ -0,0 +1,34 @@
1
+ # Retained history reads
2
+
3
+ Device, general Entity (including Location weather), Widget and Automation activity
4
+ history support optional `startAt` and `endAt`, RFC3339 instants with explicit UTC
5
+ offsets. The range is inclusive at the start and exclusive at the end. An omitted
6
+ bound is unbounded. Invalid timestamps and reversed/equal bounds are BAD_REQUEST.
7
+ Range precision is never rounded downward to include an earlier stored second.
8
+
9
+ These reads return all matching, currently retained records without a public
10
+ cursor, quantity limit or an additional latest-100 projection. Storage batching
11
+ remains internal. Source-owned write, retention, compaction and expiry policies
12
+ are unchanged; erased observations cannot be recovered by a read. Historic reads
13
+ never refresh providers or trigger storage compaction/repair. Current state remains
14
+ a separate read. Device/Entity timelines preserve trace references and outcomes;
15
+ Widget values retain their original types, including false and null.
16
+
17
+ Automation activity also accepts the existing `since` duration as a convenient
18
+ relative window (up to seven days), mutually exclusive with explicit bounds. Both
19
+ forms use the same half-open filtering rule. Without `since`, activity defaults
20
+ its start to the Unix epoch and its end to the query time when those bounds are
21
+ omitted, returning retained past activity. Activity contains management events,
22
+ not proof of ordinary successful execution. Existing response fields remain;
23
+ `truncated` is false because this read no longer clips the overview.
24
+
25
+ `/app/behavior/history/list` requires both `startAt` and `endAt`, returning
26
+ `{records: BehaviorRecord[]}` in chronological order. Tenant and Space come from
27
+ authorized context, never caller-supplied partition keys. The backend consumes
28
+ all storage pages; raw immutable business records are returned without a second
29
+ excerpt/truncation policy. No new record is written by this read.
30
+
31
+ Existing per-domain Full/Essential output units and projections remain. Full
32
+ Device/Entity timeline and behavior timestamps are milliseconds; Full Widget
33
+ history timestamps remain seconds. Essential displays explicit time fields in
34
+ the authorized Space Home timezone. Numeric business values are not timestamps.
@@ -0,0 +1,98 @@
1
+ [
2
+ {
3
+ "name": "unbounded",
4
+ "input": {},
5
+ "start": null,
6
+ "end": null
7
+ },
8
+ {
9
+ "name": "offsets-and-fraction",
10
+ "input": {
11
+ "startAt": "1970-01-01T08:00:00.500+08:00",
12
+ "endAt": "1970-01-01T00:00:02.001Z"
13
+ },
14
+ "start": 500,
15
+ "end": 2001
16
+ },
17
+ {
18
+ "name": "nano-bounds-empty-ms-window",
19
+ "input": {
20
+ "startAt": "1970-01-01T00:00:00.0001Z",
21
+ "endAt": "1970-01-01T00:00:00.0002Z"
22
+ },
23
+ "start": 1,
24
+ "end": 1
25
+ },
26
+ {
27
+ "name": "open-start",
28
+ "input": {
29
+ "endAt": "1970-01-01T00:00:01Z"
30
+ },
31
+ "start": null,
32
+ "end": 1000
33
+ },
34
+ {
35
+ "name": "open-end",
36
+ "input": {
37
+ "startAt": "1970-01-01T00:00:01Z"
38
+ },
39
+ "start": 1000,
40
+ "end": null
41
+ },
42
+ {
43
+ "name": "no-offset",
44
+ "input": {
45
+ "startAt": "2026-11-30T08:00:00",
46
+ "endAt": "2026-11-30T10:00:00Z"
47
+ },
48
+ "error": true
49
+ },
50
+ {
51
+ "name": "equal",
52
+ "input": {
53
+ "startAt": "2026-11-30T10:00:00Z",
54
+ "endAt": "2026-11-30T10:00:00Z"
55
+ },
56
+ "error": true
57
+ },
58
+ {
59
+ "name": "reversed",
60
+ "input": {
61
+ "startAt": "2026-11-30T11:00:00Z",
62
+ "endAt": "2026-11-30T10:00:00Z"
63
+ },
64
+ "error": true
65
+ },
66
+ {
67
+ "name": "before-epoch",
68
+ "input": {
69
+ "startAt": "1969-12-31T23:59:59.999999999Z",
70
+ "endAt": "2026-11-30T10:00:00Z"
71
+ },
72
+ "error": true
73
+ },
74
+ {
75
+ "name": "invalid",
76
+ "input": {
77
+ "startAt": "not-a-time",
78
+ "endAt": "2026-11-30T10:00:00Z"
79
+ },
80
+ "error": true
81
+ },
82
+ {
83
+ "name": "too-much-precision",
84
+ "input": {
85
+ "startAt": "2026-11-30T00:00:00.1234567891Z",
86
+ "endAt": "2026-11-30T10:00:00Z"
87
+ },
88
+ "error": true
89
+ },
90
+ {
91
+ "name": "leap-second",
92
+ "input": {
93
+ "startAt": "2016-12-31T23:59:60Z",
94
+ "endAt": "2017-01-01T01:00:00Z"
95
+ },
96
+ "error": true
97
+ }
98
+ ]
@@ -5154,5 +5154,55 @@
5154
5154
  }
5155
5155
  ]
5156
5156
  }
5157
+ },
5158
+ {
5159
+ "name": "household-behavior-complete-history",
5160
+ "target": "/app/behavior/history/list",
5161
+ "timezone": "UTC",
5162
+ "status": "success",
5163
+ "data": {
5164
+ "records": [
5165
+ {
5166
+ "id": "b1",
5167
+ "occurredAtMs": 500,
5168
+ "finishedAtMs": 1001,
5169
+ "actor": {
5170
+ "type": "USER",
5171
+ "userId": "u"
5172
+ },
5173
+ "source": {
5174
+ "type": "APP"
5175
+ },
5176
+ "data": {
5177
+ "event": "value.set",
5178
+ "typedValue": false,
5179
+ "number": 0,
5180
+ "value": null
5181
+ }
5182
+ }
5183
+ ]
5184
+ },
5185
+ "essential": {
5186
+ "records": [
5187
+ {
5188
+ "id": "b1",
5189
+ "occurredAtMs": "1970-01-01 00:00:00.500 +00:00 (UTC)",
5190
+ "finishedAtMs": "1970-01-01 00:00:01.001 +00:00 (UTC)",
5191
+ "actor": {
5192
+ "type": "USER",
5193
+ "userId": "u"
5194
+ },
5195
+ "source": {
5196
+ "type": "APP"
5197
+ },
5198
+ "data": {
5199
+ "event": "value.set",
5200
+ "typedValue": false,
5201
+ "number": 0,
5202
+ "value": null
5203
+ }
5204
+ }
5205
+ ]
5206
+ }
5157
5207
  }
5158
5208
  ]
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "manifest": "mhome.app-facade.v1",
3
- "contractVersion": "1.168.0",
3
+ "contractVersion": "1.169.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",
@@ -551,6 +551,12 @@
551
551
  "requestTargets": [
552
552
  "/app/onboard/lan/attach"
553
553
  ]
554
+ },
555
+ "behavior": {
556
+ "contract": "contract/history-v1.md",
557
+ "requestTargets": [
558
+ "/app/behavior/history/list"
559
+ ]
554
560
  }
555
561
  },
556
562
  "authorization": "manifest/authorization.v1.json",
@@ -1,5 +1,5 @@
1
1
  {
2
- "contractVersion": "1.168.0",
2
+ "contractVersion": "1.169.1",
3
3
  "operations": {
4
4
  "/app/agent/context/get": "spaceRead",
5
5
  "/app/agent/conversation/get": "spaceRead",
@@ -39,8 +39,8 @@
39
39
  "/app/automation/description/update": "spaceWrite",
40
40
  "/app/automation/detail/get": "spaceRead",
41
41
  "/app/automation/diagnostic/get": "spaceRead",
42
- "/app/automation/instance/stop": "spaceWrite",
43
42
  "/app/automation/instance/list": "spaceRead",
43
+ "/app/automation/instance/stop": "spaceWrite",
44
44
  "/app/automation/list": "spaceRead",
45
45
  "/app/automation/rename": "spaceWrite",
46
46
  "/app/automation/save": "spaceWrite",
@@ -50,6 +50,7 @@
50
50
  "/app/automation/status": "spaceRead",
51
51
  "/app/automation/stop": "spaceWrite",
52
52
  "/app/automation/verify": "spaceWrite",
53
+ "/app/behavior/history/list": "spaceRead",
53
54
  "/app/billing/credit/usage": "userRead",
54
55
  "/app/billing/payment/list": "userRead",
55
56
  "/app/billing/subscription/cancel": "userWrite",
@@ -78,10 +79,10 @@
78
79
  "/app/dashboard/canvas/rename": "spaceWrite",
79
80
  "/app/dashboard/canvas/reorder": "spaceWrite",
80
81
  "/app/dashboard/card/add": "spaceWrite",
82
+ "/app/dashboard/card/authoring/get": "spaceRead",
81
83
  "/app/dashboard/card/copy": "spaceWrite",
82
84
  "/app/dashboard/card/delete": "spaceWrite",
83
85
  "/app/dashboard/card/detail/get": "spaceRead",
84
- "/app/dashboard/card/authoring/get": "spaceRead",
85
86
  "/app/dashboard/card/list": "spaceRead",
86
87
  "/app/dashboard/card/main-view/update": "spaceWrite",
87
88
  "/app/dashboard/card/move": "spaceWrite",
@@ -93,19 +94,17 @@
93
94
  "/app/device/disable": "spaceWrite",
94
95
  "/app/device/enable": "spaceWrite",
95
96
  "/app/device/history/list": "spaceRead",
96
- "/app/presentation/device/history/series/get": "spaceRead",
97
97
  "/app/device/list": "spaceRead",
98
- "/app/device/source/resolve": "spaceRead",
99
- "/app/presentation/device/online/list": "spaceRead",
100
98
  "/app/device/refresh": "spaceWrite",
99
+ "/app/device/source/resolve": "spaceRead",
101
100
  "/app/device/state/get": "spaceRead",
102
- "/app/presentation/device/view/get": "spaceRead",
103
101
  "/app/dialog/get": "spaceRead",
104
102
  "/app/dialog/list": "spaceRead",
105
103
  "/app/dialog/reply": "spaceWrite",
106
104
  "/app/entity/detail/get": "spaceRead",
107
105
  "/app/entity/history/list": "spaceRead",
108
106
  "/app/entity/list": "spaceRead",
107
+ "/app/entity/state/get": "spaceRead",
109
108
  "/app/graph/relations/get": "spaceRead",
110
109
  "/app/group/create": "spaceWrite",
111
110
  "/app/group/delete": "spaceWrite",
@@ -194,6 +193,7 @@
194
193
  "/app/object-storage/folders/set-limit": "spaceWrite",
195
194
  "/app/object-storage/overview": "spaceRead",
196
195
  "/app/object-storage/session/acquire": "spaceWrite",
196
+ "/app/onboard/lan/attach": "spaceManage",
197
197
  "/app/person/backup/close": "spaceWrite",
198
198
  "/app/person/backup/export": "spaceWrite",
199
199
  "/app/person/backup/import/commit": "spaceWrite",
@@ -211,12 +211,8 @@
211
211
  "/app/person/summary-images/batch-get": "spaceRead",
212
212
  "/app/plugin/candidate/list": "spaceRead",
213
213
  "/app/plugin/catalog/list": "spaceRead",
214
- "/app/plugin/detail/get": "spaceRead",
215
214
  "/app/plugin/contribution/read": "spaceRead",
216
- "/app/plugin/operations/list": "spaceRead",
217
- "/app/plugin/operation/invoke": "spaceRead",
218
- "/app/plugin/operation/submit": "spaceRead",
219
- "/app/plugin/operation/status": "spaceRead",
215
+ "/app/plugin/detail/get": "spaceRead",
220
216
  "/app/plugin/disable": "spaceManage",
221
217
  "/app/plugin/enable/start": "spaceManage",
222
218
  "/app/plugin/enable/status": "spaceManage",
@@ -224,6 +220,10 @@
224
220
  "/app/plugin/install/prepare": "spaceManage",
225
221
  "/app/plugin/install/start": "spaceManage",
226
222
  "/app/plugin/install/status": "spaceManage",
223
+ "/app/plugin/operation/invoke": "spaceRead",
224
+ "/app/plugin/operation/status": "spaceRead",
225
+ "/app/plugin/operation/submit": "spaceRead",
226
+ "/app/plugin/operations/list": "spaceRead",
227
227
  "/app/plugin/preview/check": "spaceManage",
228
228
  "/app/plugin/profile/update": "spaceManage",
229
229
  "/app/pod/enrollment/get": "userRead",
@@ -247,6 +247,9 @@
247
247
  "/app/presentation/automation/placements/get": "spaceRead",
248
248
  "/app/presentation/automation/share": "spaceWrite",
249
249
  "/app/presentation/automation/summaries/get": "spaceRead",
250
+ "/app/presentation/device/history/series/get": "spaceRead",
251
+ "/app/presentation/device/online/list": "spaceRead",
252
+ "/app/presentation/device/view/get": "spaceRead",
250
253
  "/app/presentation/entity/get": "spaceRead",
251
254
  "/app/presentation/entity/meta/get": "spaceRead",
252
255
  "/app/presentation/integration/get": "spaceRead",
@@ -254,6 +257,7 @@
254
257
  "/app/presentation/reference/type/list": "spaceRead",
255
258
  "/app/presentation/space/get": "spaceRead",
256
259
  "/app/presentation/space/list": "userRead",
260
+ "/app/presentation/space/location/list": "spaceRead",
257
261
  "/app/presentation/widget/defaults/get": "spaceRead",
258
262
  "/app/presentation/widget/list": "spaceRead",
259
263
  "/app/presentation/widget/names/get": "spaceRead",
@@ -283,7 +287,6 @@
283
287
  "/app/space/list": "userRead",
284
288
  "/app/space/location/create": "spaceManage",
285
289
  "/app/space/location/delete": "spaceManage",
286
- "/app/presentation/space/location/list": "spaceRead",
287
290
  "/app/space/location/search": "userRead",
288
291
  "/app/space/location/update": "spaceManage",
289
292
  "/app/space/member/invite": "spaceManage",
@@ -293,6 +296,14 @@
293
296
  "/app/space/preference/get": "spaceRead",
294
297
  "/app/space/preference/update": "userWrite",
295
298
  "/app/space/rename": "spaceManage",
299
+ "/app/suggestion/detail/get": "spaceRead",
300
+ "/app/suggestion/feedback": "spaceWrite",
301
+ "/app/suggestion/generate": "spaceWrite",
302
+ "/app/suggestion/generation/get": "spaceRead",
303
+ "/app/suggestion/handle": "spaceWrite",
304
+ "/app/suggestion/list": "spaceRead",
305
+ "/app/suggestion/settings/get": "spaceRead",
306
+ "/app/suggestion/settings/save": "spaceWrite",
296
307
  "/app/system/clients/get": "spaceRead",
297
308
  "/app/system/feedback/submit": "userWrite",
298
309
  "/app/system/hosts/get": "userRead",
@@ -321,6 +332,10 @@
321
332
  "/app/user/profile/avatar/prepare": "userWrite",
322
333
  "/app/user/profile/get": "userRead",
323
334
  "/app/user/profile/update": "userWrite",
335
+ "/app/wave/discover": "spaceManage",
336
+ "/app/wave/list": "spaceManage",
337
+ "/app/wave/refresh": "spaceManage",
338
+ "/app/wave/remove": "spaceManage",
324
339
  "/app/widget/button/config/update": "spaceWrite",
325
340
  "/app/widget/button/create": "spaceWrite",
326
341
  "/app/widget/button/trigger": "spaceWrite",
@@ -377,21 +392,7 @@
377
392
  "/pod/talk/request/get": "spaceRead",
378
393
  "/pod/talk/speech/prepare": "spaceWrite",
379
394
  "/pod/talk/turn/submit": "spaceWrite",
380
- "/pod/talk/view/get": "spaceRead",
381
- "/app/entity/state/get": "spaceRead",
382
- "/app/wave/discover": "spaceManage",
383
- "/app/wave/list": "spaceManage",
384
- "/app/wave/refresh": "spaceManage",
385
- "/app/wave/remove": "spaceManage",
386
- "/app/suggestion/detail/get": "spaceRead",
387
- "/app/suggestion/feedback": "spaceWrite",
388
- "/app/suggestion/generate": "spaceWrite",
389
- "/app/suggestion/generation/get": "spaceRead",
390
- "/app/suggestion/handle": "spaceWrite",
391
- "/app/suggestion/list": "spaceRead",
392
- "/app/suggestion/settings/get": "spaceRead",
393
- "/app/suggestion/settings/save": "spaceWrite",
394
- "/app/onboard/lan/attach": "spaceManage"
395
+ "/pod/talk/view/get": "spaceRead"
395
396
  },
396
397
  "nodePrefix": "/app/plugin/",
397
398
  "serviceOperations": [
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "manifest": "mhome.host-provision.targets.v1",
3
- "contractVersion": "1.168.0",
3
+ "contractVersion": "1.169.1",
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.168.0",
3
+ "contractVersion": "1.169.1",
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.168.0",
3
+ "contractVersion": "1.169.1",
4
4
  "contract": "contract/pod-commissioning-v1.md",
5
5
  "localTargets": [
6
6
  "/local/pod/discovery/start",
@@ -566,5 +566,6 @@
566
566
  "ms": [
567
567
  "status.updatedAtMs"
568
568
  ]
569
- }
569
+ },
570
+ "/app/behavior/history/list": { "ms": ["records.*.occurredAtMs", "records.*.finishedAtMs"] }
570
571
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "manifest": "mhome.app-facade.routing.v1",
3
- "contractVersion": "1.168.0",
3
+ "contractVersion": "1.169.1",
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.168.0",
3
+ "contractVersion": "1.169.1",
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.168.0",
3
+ "version": "1.169.1",
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.168.0",
3
+ "contractVersion": "1.169.1",
4
4
  "manifest": "manifest/app-facade.v1.json",
5
5
  "schemas": {
6
6
  "dashboardCardAuthoring": "schema/dashboard-card-authoring.v1.schema.json",