@mhome/app-facade-protocol 1.177.0 → 1.179.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.
- package/contract/entity-presentation-v1.md +1 -1
- package/contract/nfc-v1.md +9 -3
- package/contract/resource-read-failures-v1.md +47 -0
- package/contract/resource-read-v1.md +3 -0
- package/fixtures/presentation/cases.json +199 -50
- package/manifest/app-facade.v1.json +1 -1
- package/manifest/authorization.v1.json +1 -1
- 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
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
`/app/presentation/entity/meta/get` accepts `{entityType, ids}` under the normal
|
|
6
6
|
Facade envelope. It is a Space-read UI operation, routed by Space mode, not an
|
|
7
7
|
Agent/MCP catalog entry. IDs are nonblank, trimmed, deduplicated in request order
|
|
8
|
-
|
|
8
|
+
without a fixed input count limit. Empty input and unknown fields are rejected.
|
|
9
9
|
The response is `{items: [{requestedId, found, resource? , reason?}]}`. A found
|
|
10
10
|
resource contains only `id`, `entityType`, `displayName`, and `group`. A missing,
|
|
11
11
|
deleted or wrong-type reference returns `found: false, reason: "not_found"`.
|
package/contract/nfc-v1.md
CHANGED
|
@@ -33,11 +33,17 @@ Only activation changes pending to active and sets createdAt. Repeating activati
|
|
|
33
33
|
preserves createdAt and lastUsedAt. Cancelled/failed physical writes explicitly
|
|
34
34
|
delete pending; read/list/sync do not clean it up. No TTL or background cleanup.
|
|
35
35
|
Update patches configuration without activating or resetting metadata.
|
|
36
|
-
Delete treats missing IDs as complete and returns an acknowledgement
|
|
37
|
-
|
|
38
|
-
|
|
36
|
+
Delete treats missing IDs as complete and returns an acknowledgement only after
|
|
37
|
+
the complete selection finishes. Cloud storage adapters split physical batches
|
|
38
|
+
internally; clients submit the complete selection. Failure or an unconfirmed
|
|
39
|
+
result can leave part of the selection deleted, including on DynamoDB and
|
|
40
|
+
Tablestore. Reread the records or retry the same IDs; deleted IDs remain complete.
|
|
41
|
+
SQLite retains its transaction, but whole-request atomicity is not a portable
|
|
42
|
+
Facade guarantee. Physical tags retain their written content.
|
|
39
43
|
Prepared preview includes requested IDs, found state, name and creation state;
|
|
40
44
|
last-use observations do not invalidate a preview.
|
|
45
|
+
When retrying through prepare/commit, prepare the original IDs again against the
|
|
46
|
+
current records rather than reusing a consumed or stale prepared action.
|
|
41
47
|
|
|
42
48
|
Full list timestamps are Unix milliseconds. Essential retains all business fields
|
|
43
49
|
in YAML, localizes positive timestamps, and preserves zero as unknown. Mutations
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# Independent resource read failures
|
|
2
|
+
|
|
3
|
+
Independent resource reads isolate errors at the smallest boundary whose outcome
|
|
4
|
+
is known. Facades own the complete outcome; adapters preserve it. Atomic writes,
|
|
5
|
+
prepare/commit and dependent workflows retain their separate failure contracts.
|
|
6
|
+
|
|
7
|
+
Validate the complete request and Space authority first. Invalid input and
|
|
8
|
+
permission/authentication failures fail the request. A failed common enumeration
|
|
9
|
+
or mandatory shared read fails the request when no reliable complete scope can be
|
|
10
|
+
established. Never catch such errors and return an empty successful directory.
|
|
11
|
+
Storage batch readers must report unresolved failures, never omit failed keys as
|
|
12
|
+
if they were absent. Isolate only failures whose affected resource is known.
|
|
13
|
+
|
|
14
|
+
For selected reads preserve normalized request order, one item per unique ID.
|
|
15
|
+
`found: true` carries a definition. `found: false, reason: not_found` means the
|
|
16
|
+
resource is confirmed absent in the authorized view. `found: false,
|
|
17
|
+
reason: unavailable` carries a structured `problem` and means the read failed;
|
|
18
|
+
it does not establish absence. Consumers must inspect `reason`, not infer
|
|
19
|
+
absence or delete local records from `found: false` alone.
|
|
20
|
+
|
|
21
|
+
A known definition whose optional projection failed remains `found: true`.
|
|
22
|
+
Retain its identity and authoritative definition fields and attach `problem`.
|
|
23
|
+
Omit unknown derived fields; empty arrays, false, zero and null are values, not
|
|
24
|
+
failure substitutes. Device Group member projections use
|
|
25
|
+
`GROUP_MEMBERS_UNAVAILABLE`; their persisted applyState is unchanged by a read.
|
|
26
|
+
|
|
27
|
+
Complete lookups, including any number of confirmed not_found items, return
|
|
28
|
+
`success`. Item/projection failures with reliable remaining results return
|
|
29
|
+
`partial` with data and ID-scoped warnings. If every selected lookup is
|
|
30
|
+
unavailable, return `error` with per-item diagnostics in error.details.items.
|
|
31
|
+
A directory that enumerated all definitions retains unavailable definitions and
|
|
32
|
+
returns partial; it does not silently shorten the directory.
|
|
33
|
+
|
|
34
|
+
Full and Essential preserve identical outcomes, item identity, reason and
|
|
35
|
+
problem/warnings. Essential may omit executable source and localize display
|
|
36
|
+
values. UI renders healthy results and local errors; tools retain the canonical
|
|
37
|
+
result. No client read/rebuild fallback, automatic absence inference or hidden
|
|
38
|
+
retry is introduced. Required evidence for a dependent mutation remains required.
|
|
39
|
+
|
|
40
|
+
## Current entrypoints
|
|
41
|
+
|
|
42
|
+
- Device list and detail retain Group definitions when their member/Twin
|
|
43
|
+
projection fails; the Group's capabilities and Blueprint IDs remain unknown.
|
|
44
|
+
- Automation detail uses `items: [{requestedId, found, reason?, automation?,
|
|
45
|
+
problem?}]`, not an uncorrelated automations array. The list endpoint retains
|
|
46
|
+
its automations summaries array. Source/internal program ID rejection remains
|
|
47
|
+
request validation; known user program and Automation Group lookups are isolated.
|
|
@@ -161,3 +161,6 @@ gate may block a run after earlier actions have completed; the reason describes
|
|
|
161
161
|
that gate's rejection, not whether any prior action succeeded. Rule-store/evaluation
|
|
162
162
|
failures, older summaries and unknown reasons retain the ordinary outcome label.
|
|
163
163
|
The marker uses the existing summary independently of diagnostic-log retention.
|
|
164
|
+
|
|
165
|
+
Independent read failure and partial-result rules are defined in
|
|
166
|
+
[resource-read-failures-v1.md](resource-read-failures-v1.md).
|
|
@@ -203,59 +203,67 @@
|
|
|
203
203
|
"target": "/app/automation/detail/get",
|
|
204
204
|
"status": "success",
|
|
205
205
|
"data": {
|
|
206
|
-
"
|
|
206
|
+
"items": [
|
|
207
207
|
{
|
|
208
|
-
"
|
|
209
|
-
"
|
|
210
|
-
"
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
"
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
"
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
208
|
+
"requestedId": "a1",
|
|
209
|
+
"found": true,
|
|
210
|
+
"automation": {
|
|
211
|
+
"id": "a1",
|
|
212
|
+
"name": "Morning",
|
|
213
|
+
"description": "Turn on light",
|
|
214
|
+
"enabled": true,
|
|
215
|
+
"singleUse": false,
|
|
216
|
+
"hasExpire": false,
|
|
217
|
+
"usedCapabilities": [
|
|
218
|
+
"light.command.on"
|
|
219
|
+
],
|
|
220
|
+
"inputVars": [
|
|
221
|
+
{
|
|
222
|
+
"name": "$room",
|
|
223
|
+
"type": "String",
|
|
224
|
+
"description": "Room"
|
|
225
|
+
}
|
|
226
|
+
],
|
|
227
|
+
"scriptHash": "source-hash",
|
|
228
|
+
"script": {
|
|
229
|
+
"script": "private source",
|
|
230
|
+
"scripts": {
|
|
231
|
+
"function": "private"
|
|
232
|
+
}
|
|
233
|
+
},
|
|
234
|
+
"updatedAt": 2,
|
|
235
|
+
"descriptionTemplate": "Turn on {! $room !}",
|
|
236
|
+
"automationType": "TASK_FLOW"
|
|
237
|
+
}
|
|
234
238
|
}
|
|
235
239
|
]
|
|
236
240
|
},
|
|
237
241
|
"essential": {
|
|
238
|
-
"
|
|
242
|
+
"items": [
|
|
239
243
|
{
|
|
240
|
-
"
|
|
241
|
-
"
|
|
242
|
-
"
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
"
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
244
|
+
"requestedId": "a1",
|
|
245
|
+
"found": true,
|
|
246
|
+
"automation": {
|
|
247
|
+
"id": "a1",
|
|
248
|
+
"name": "Morning",
|
|
249
|
+
"description": "Turn on light",
|
|
250
|
+
"enabled": true,
|
|
251
|
+
"singleUse": false,
|
|
252
|
+
"hasExpire": false,
|
|
253
|
+
"usedCapabilities": [
|
|
254
|
+
"light.command.on"
|
|
255
|
+
],
|
|
256
|
+
"inputVars": [
|
|
257
|
+
{
|
|
258
|
+
"name": "$room",
|
|
259
|
+
"type": "String",
|
|
260
|
+
"description": "Room"
|
|
261
|
+
}
|
|
262
|
+
],
|
|
263
|
+
"scriptHash": "source-hash",
|
|
264
|
+
"descriptionTemplate": "Turn on {! $room !}",
|
|
265
|
+
"automationType": "TASK_FLOW"
|
|
266
|
+
}
|
|
259
267
|
}
|
|
260
268
|
]
|
|
261
269
|
}
|
|
@@ -826,13 +834,12 @@
|
|
|
826
834
|
}
|
|
827
835
|
},
|
|
828
836
|
{
|
|
829
|
-
"name": "device-recent-preserves-window-
|
|
837
|
+
"name": "device-recent-preserves-complete-window-and-values",
|
|
830
838
|
"target": "/app/device/activity/recent/list",
|
|
831
839
|
"data": {
|
|
832
840
|
"since": "10min",
|
|
833
841
|
"from": 1793065800000,
|
|
834
842
|
"until": 1793066400000,
|
|
835
|
-
"truncated": true,
|
|
836
843
|
"updates": [
|
|
837
844
|
{
|
|
838
845
|
"deviceId": "d1",
|
|
@@ -876,7 +883,6 @@
|
|
|
876
883
|
"since": "10min",
|
|
877
884
|
"from": "2026-10-27 01:50:00 +00:00 (UTC)",
|
|
878
885
|
"until": "2026-10-27 02:00:00 +00:00 (UTC)",
|
|
879
|
-
"truncated": true,
|
|
880
886
|
"updates": [
|
|
881
887
|
{
|
|
882
888
|
"deviceId": "d1",
|
|
@@ -5390,5 +5396,148 @@
|
|
|
5390
5396
|
}
|
|
5391
5397
|
]
|
|
5392
5398
|
}
|
|
5399
|
+
},
|
|
5400
|
+
{
|
|
5401
|
+
"name": "automation-detail-partial",
|
|
5402
|
+
"target": "/app/automation/detail/get",
|
|
5403
|
+
"status": "partial",
|
|
5404
|
+
"data": {
|
|
5405
|
+
"items": [
|
|
5406
|
+
{
|
|
5407
|
+
"requestedId": "a",
|
|
5408
|
+
"found": true,
|
|
5409
|
+
"automation": {
|
|
5410
|
+
"id": "a",
|
|
5411
|
+
"name": "A",
|
|
5412
|
+
"script": {
|
|
5413
|
+
"script": "private"
|
|
5414
|
+
},
|
|
5415
|
+
"scriptHash": "hash"
|
|
5416
|
+
}
|
|
5417
|
+
},
|
|
5418
|
+
{
|
|
5419
|
+
"requestedId": "bad",
|
|
5420
|
+
"found": false,
|
|
5421
|
+
"reason": "unavailable",
|
|
5422
|
+
"problem": {
|
|
5423
|
+
"code": "RESOURCE_UNAVAILABLE",
|
|
5424
|
+
"message": "The selected resource could not be read",
|
|
5425
|
+
"details": {
|
|
5426
|
+
"requestedId": "bad"
|
|
5427
|
+
}
|
|
5428
|
+
}
|
|
5429
|
+
}
|
|
5430
|
+
]
|
|
5431
|
+
},
|
|
5432
|
+
"essential": {
|
|
5433
|
+
"items": [
|
|
5434
|
+
{
|
|
5435
|
+
"requestedId": "a",
|
|
5436
|
+
"found": true,
|
|
5437
|
+
"automation": {
|
|
5438
|
+
"id": "a",
|
|
5439
|
+
"name": "A",
|
|
5440
|
+
"scriptHash": "hash"
|
|
5441
|
+
}
|
|
5442
|
+
},
|
|
5443
|
+
{
|
|
5444
|
+
"requestedId": "bad",
|
|
5445
|
+
"found": false,
|
|
5446
|
+
"reason": "unavailable",
|
|
5447
|
+
"problem": {
|
|
5448
|
+
"code": "RESOURCE_UNAVAILABLE",
|
|
5449
|
+
"message": "The selected resource could not be read",
|
|
5450
|
+
"details": {
|
|
5451
|
+
"requestedId": "bad"
|
|
5452
|
+
}
|
|
5453
|
+
}
|
|
5454
|
+
}
|
|
5455
|
+
]
|
|
5456
|
+
}
|
|
5457
|
+
},
|
|
5458
|
+
{
|
|
5459
|
+
"name": "device-list-projection-partial",
|
|
5460
|
+
"target": "/app/device/list",
|
|
5461
|
+
"status": "partial",
|
|
5462
|
+
"data": {
|
|
5463
|
+
"devices": [
|
|
5464
|
+
{
|
|
5465
|
+
"entityId": "a",
|
|
5466
|
+
"name": "A",
|
|
5467
|
+
"active": true,
|
|
5468
|
+
"lifecycle": "enabled",
|
|
5469
|
+
"roomId": "",
|
|
5470
|
+
"roomName": "unassigned",
|
|
5471
|
+
"capabilities": [],
|
|
5472
|
+
"group": false
|
|
5473
|
+
},
|
|
5474
|
+
{
|
|
5475
|
+
"entityId": "g:1",
|
|
5476
|
+
"name": "Lights",
|
|
5477
|
+
"group": true,
|
|
5478
|
+
"roomId": "",
|
|
5479
|
+
"roomName": "unassigned",
|
|
5480
|
+
"applyState": "ready",
|
|
5481
|
+
"problem": {
|
|
5482
|
+
"code": "GROUP_MEMBERS_UNAVAILABLE",
|
|
5483
|
+
"message": "Group definition is available; its projection could not be read",
|
|
5484
|
+
"details": {
|
|
5485
|
+
"groupId": "g:1"
|
|
5486
|
+
}
|
|
5487
|
+
}
|
|
5488
|
+
}
|
|
5489
|
+
]
|
|
5490
|
+
},
|
|
5491
|
+
"essential": {
|
|
5492
|
+
"devices": [
|
|
5493
|
+
{
|
|
5494
|
+
"entityId": "a",
|
|
5495
|
+
"name": "A",
|
|
5496
|
+
"active": true,
|
|
5497
|
+
"lifecycle": "enabled",
|
|
5498
|
+
"roomId": "",
|
|
5499
|
+
"roomName": "unassigned",
|
|
5500
|
+
"capabilities": [],
|
|
5501
|
+
"group": false
|
|
5502
|
+
},
|
|
5503
|
+
{
|
|
5504
|
+
"entityId": "g:1",
|
|
5505
|
+
"name": "Lights",
|
|
5506
|
+
"group": true,
|
|
5507
|
+
"roomId": "",
|
|
5508
|
+
"roomName": "unassigned",
|
|
5509
|
+
"applyState": "ready",
|
|
5510
|
+
"problem": {
|
|
5511
|
+
"code": "GROUP_MEMBERS_UNAVAILABLE",
|
|
5512
|
+
"message": "Group definition is available; its projection could not be read",
|
|
5513
|
+
"details": {
|
|
5514
|
+
"groupId": "g:1"
|
|
5515
|
+
}
|
|
5516
|
+
}
|
|
5517
|
+
}
|
|
5518
|
+
]
|
|
5519
|
+
}
|
|
5520
|
+
},
|
|
5521
|
+
{
|
|
5522
|
+
"name": "automation-detail-all-unavailable",
|
|
5523
|
+
"target": "/app/automation/detail/get",
|
|
5524
|
+
"status": "error",
|
|
5525
|
+
"code": "RESOURCE_UNAVAILABLE",
|
|
5526
|
+
"data": {
|
|
5527
|
+
"items": [
|
|
5528
|
+
{
|
|
5529
|
+
"requestedId": "bad",
|
|
5530
|
+
"found": false,
|
|
5531
|
+
"reason": "unavailable",
|
|
5532
|
+
"problem": {
|
|
5533
|
+
"code": "RESOURCE_UNAVAILABLE",
|
|
5534
|
+
"message": "The selected resource could not be read",
|
|
5535
|
+
"details": {
|
|
5536
|
+
"requestedId": "bad"
|
|
5537
|
+
}
|
|
5538
|
+
}
|
|
5539
|
+
}
|
|
5540
|
+
]
|
|
5541
|
+
}
|
|
5393
5542
|
}
|
|
5394
5543
|
]
|
package/manifest/routing.v1.json
CHANGED
package/manifest/targets.v1.json
CHANGED
package/package.json
CHANGED