@mhome/app-facade-protocol 1.190.0 → 1.192.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.
@@ -64,7 +64,7 @@ also uses metadata rather than downloading authored source.
64
64
  | `/app/presentation/automation/overview/init` | `{automationId?,inspireId?,inspireVersion?,snapshotId?,args?}` | Existing editor session, required installs, AutomationOverview and already-loaded metadata. Snapshot takes precedence over existing program, then Inspire. Uses the authenticated Client and existing staged-Inspire developer session. |
65
65
  | `/app/presentation/automation/overview/config/provide` | `{sessionId,var,input}` | Existing option query and editor revision. |
66
66
  | `/app/presentation/automation/overview/config/update` | `{sessionId,var,inputs?,widgetize?}` | Existing config evaluation, diagnostics and revision. |
67
- | `/app/presentation/automation/overview/save` | `{sessionId,automationId?,inspireId?,inspireVersion?,snapshotId?,preferredName?,debug?,addCard?,canvasIds?}` | `{automationId,runnable,enabled?,restoreIssue?}`. Updating an existing definition preserves its previous enabled intent; restoration runs after releasing the edit lock, is fenced by the saved revision, and cannot override a newer stop. A committed save with failed/unconfirmed restoration or an unavailable post-save enabled observation returns `partial`; unknown enabled is omitted. New saves retain existing creation semantics and saving never triggers a Task Flow. Existing single-save guard, Client ownership, prepare/save/complete revision checks and internal normalized-source persistence. Legacy snapshotId/addCard/canvasIds are accepted but do not perform placement; frontend creates placements separately. |
67
+ | `/app/presentation/automation/overview/save` | `{sessionId,automationId?,inspireId?,inspireVersion?,snapshotId?,preferredName?,debug?,addCard?,canvasIds?}` | `{automationId,runnable,enabled?,restoreIssue?}`. Updating an existing definition preserves its previous enabled intent; restoration runs after releasing the edit lock, is fenced by the saved revision, and cannot override a newer stop. A committed save with failed/unconfirmed restoration or an unavailable post-save enabled observation returns `partial`; unknown enabled is omitted. New saves retain existing creation semantics and saving never triggers a Task Flow. Existing single-save guard, Client ownership, prepare/save/complete revision checks and internal normalized-source persistence. Legacy snapshotId/addCard/canvasIds are accepted but do not perform placement. Adding a Dashboard Card is a separate user operation. |
68
68
  | `/app/presentation/automation/overview/cancel` | `{sessionId}` | Canonical acknowledgement without data. Existing Client ownership check and session cleanup. |
69
69
  | `/app/presentation/automation/copy` | `{automationId,name?}` | `{automationId,runnable,enabled}`. Copies the existing script/template metadata using the internal save operation. |
70
70
  | `/app/presentation/automation/enroll` | `{automationId,name?}` | `{automationId,runnable,enabled}`. Existing enrollment behavior. |
@@ -126,4 +126,17 @@ unclassified fatal runtime fault must not reuse a prior handled action's reason.
126
126
  Old generated Plans can remain generic until normal regeneration; no automatic
127
127
  migration is required. The summary is independent of diagnostic-log retention.
128
128
 
129
- Selected definition detail parses saved YAML only when its declared metadata is required. Failed optional parsing preserves the known definition and source/hash, attaches an ID-scoped problem, and omits unknown inputVars/descriptionTemplate. Corrupt stored JSON is not an empty source or capability list; strict dependent operations fail rather than rewriting fabricated values. No derived-metadata cache or extra database fields are required.
129
+ Selected definition detail parses only the saved YAML declarations it exposes.
130
+ Failure to decode source, capabilities or declarations makes that Automation item
131
+ `unavailable`: omit its entire `automation` object and retain its ID-scoped problem.
132
+ Other selected Automations remain readable. A confirmed absence is `not_found`;
133
+ a failed shared status read remains a request error. Tags are lightweight filters:
134
+ unreadable Core tags may degrade to an empty array, as in list. Strict dependent
135
+ reads and writes do not fabricate empty source or capability lists. No derived
136
+ metadata cache or extra database fields are required.
137
+
138
+ Editor initialization has two existing response branches: an `automationOverview`
139
+ for editing, or nonempty `requiredInstalls` without an overview. Initial selections
140
+ are applied only to an available overview. Core preserves both branches through
141
+ the Cloud bridge. Runtime observation refresh is an independent summary read and
142
+ preserves the editor session and unsaved configuration.
@@ -8,10 +8,14 @@ Generated Twin and Group programs remain internal resources.
8
8
  Recurring programs are enabled; Task Flows are activated and triggered.
9
9
  - `/app/automation/stop` accepts `automationId`, disables the program and cancels
10
10
  all its instances, including durable waits. Completed actions are not undone.
11
- - Both return Full `data: {automationId, enabled, running}` with observed state.
12
- A short Task Flow may already be idle when start returns. Essential renders the
13
- same fields as YAML. Failures use the canonical error envelope, never `success:false`
14
- inside successful business data. State pushes may supersede a request result.
11
+ - Both return a control receipt with `automationId`, `accepted: true` and
12
+ `stateStatus`. Known observation includes boolean `enabled` and `running`;
13
+ unknown observation omits both and carries `AUTOMATION_STATE_UNAVAILABLE`.
14
+ Both are Facade success. A short Task Flow may already be idle when start
15
+ returns. Essential preserves the same receipt and warnings as YAML. Input,
16
+ authority, prerequisite and control failures remain canonical errors. See
17
+ [control receipts](automation-control-v1.md); never replay accepted control
18
+ to repair an observation failure.
15
19
  - `/app/automation/rename` accepts only Standard Automations (`AutomationUtil.is_std`),
16
20
  excluding Group entity IDs. Twin, Group, Temporary and other prefixed internal
17
21
  programs cannot be renamed here. Rename a Group through its Group operation.
@@ -27,8 +27,13 @@ built-in Entity types; other types are Integration-defined.
27
27
  `found: false, reason: "not_found"` and omit resource. No observations is not missing.
28
28
  - `/app/entity/history/list` remains independent and returns all retained matching records, with optional explicit time bounds.
29
29
 
30
- Metadata contains id, name, entityType, integration?, connectId?, active, capabilities, data,
30
+ Metadata contains id, name, entityType, integration?, connectId?, active, capabilities, visibleCapabilities, data,
31
31
  tags (Blueprint IDs), availabilityStatus?, issue, group and entityIds (Group members).
32
+ `capabilities` retains the complete callable set; `visibleCapabilities` is the
33
+ default UI/Agent discovery set after author-declared shadow rules. Both use the
34
+ same capability-part notation. Explicit calls may still use a shadowed capability.
35
+ An empty visible list is authoritative; an omitted list means its projection is
36
+ unknown and must not fall back to the complete set. No caller recomputes shadow.
32
37
  It contains no current capability values. Full retains the complete metadata.
33
38
  Essential omits Blueprint tags, ordinary entityIds, absent optional values and
34
39
  redundant built-in data identity fields. It preserves arbitrary Integration data,
@@ -60,7 +65,7 @@ Source synchronization remains `/app/integration/entity/refresh`; onboarding rea
60
65
  standard Device metadata only after an explicitly successful synchronization.
61
66
 
62
67
  General Entity list/detail and reference candidates retain Group definitions when
63
- optional projection fails. `capabilities`, `tags`, `active` and `issue` are omitted
68
+ optional projection fails. `capabilities`, `visibleCapabilities`, `tags`, `active` and `issue` are omitted
64
69
  when unknown, with `problem`; confirmed empty/false values remain valid. Selected
65
70
  definition failures are unavailable items. Selected reference-name reads preserve
66
71
  the same ID order and diagnostics. See [independent reads](resource-read-failures-v1.md).
@@ -48,3 +48,9 @@ baseline policy. No startup conversion or automatic deletion is performed.
48
48
  Selected definition failures carry `reason: unavailable` and an ID-scoped `problem`.
49
49
  Member projection failures retain the definition, omit unknown derived fields and
50
50
  carry `problem`. Outcomes follow [independent resource reads](resource-read-failures-v1.md).
51
+
52
+ Group detail keeps the complete callable `capabilities` entries with member counts.
53
+ `visibleCapabilities` contains full capability IDs for default UI/Agent choices,
54
+ derived from the same ready, revision-matched Twin projection and intersected with
55
+ current callable support. Both are omitted when the projection cannot be read;
56
+ an empty visible list is a confirmed result. Shadow changes presentation only.
@@ -8,12 +8,16 @@ Essential represents them as YAML.
8
8
  | Target | Input | Business output |
9
9
  | --- | --- | --- |
10
10
  | `/app/presentation/reference/type/list` | `{}` | `{types:[{entityType,name,category}]}` |
11
- | `/app/presentation/reference/item/list` | `{entityType}` | `{items:[{id,name,entityType,category,capabilities,group}]}` |
11
+ | `/app/presentation/reference/item/list` | `{entityType}` | `{items:[{id,name,entityType,category,capabilities?,visibleCapabilities?,group,problem?}]}` |
12
12
 
13
13
  Inputs reject unknown fields. entityType is a nonblank string, trimmed at the
14
14
  boundary. category is device, widget, automation or entity, derived by the server.
15
15
  Candidate names do not replace IDs. Empty capabilities and false group values are
16
- preserved. No business input selects another Space.
16
+ preserved. `visibleCapabilities` carries the default discovery projection;
17
+ `capabilities` retains shadowed callable support. Empty visibility is authoritative;
18
+ omitted visibility is unknown and must not fall back to full support. Group
19
+ projection failures retain identity and `problem` while omitting unknown lists.
20
+ No business input selects another Space.
17
21
 
18
22
  Types come from installed and auto-installed Integration standalone declarations,
19
23
  deduplicated and sorted by entityType. Empty types are not hidden by counting their
@@ -40,7 +40,7 @@ retry is introduced. Required evidence for a dependent mutation remains required
40
40
  ## Current entrypoints
41
41
 
42
42
  - Device list and detail retain Group definitions when their member/Twin
43
- projection fails; the Group's capabilities and Blueprint IDs remain unknown.
43
+ projection fails; the Group's capabilities, visible capabilities and Blueprint IDs remain unknown.
44
44
  - Automation detail uses `items: [{requestedId, found, reason?, automation?,
45
45
  problem?}]`, not an uncorrelated automations array. The list endpoint retains
46
46
  its automations summaries array. Automation definitions use the entire Automation
@@ -58,7 +58,7 @@ retry is introduced. Required evidence for a dependent mutation remains required
58
58
  the caller's requestedId in diagnostics.
59
59
 
60
60
  - Group detail, general Entity list/detail and reference candidates retain known
61
- definitions when member/runtime projection fails; unknown capabilities, tags,
61
+ definitions when member/runtime projection fails; unknown capabilities, visible capabilities, tags,
62
62
  active and issue are omitted. Selected Group definition/name failures use
63
63
  unavailable items, never not_found.
64
64
  - Integration batch detail completes mandatory shared context reads before
@@ -29,6 +29,11 @@ Twin lookup; `ready` confirms application, not member reachability. Group diagno
29
29
  and application errors are available through Group detail. Device enable/disable
30
30
  accepts physical IDs only. This does not add Group enablement or alter lifecycle writes.
31
31
 
32
+ Device discovery keeps full callable `capabilities` and separate default
33
+ `visibleCapabilities` after schema shadow. Empty visibility is authoritative;
34
+ unknown projections omit it without falling back to full support. Both Full and
35
+ Essential preserve this distinction. See [Entity discovery](entity-v1.md).
36
+
32
37
  See [Device lifecycle outcomes](device-lifecycle-v1.md) for batch writes and retry behavior.
33
38
 
34
39
  Observation batches accept one or more IDs, reject blanks, trim and deduplicate preserving
@@ -317,6 +317,70 @@
317
317
  "a"
318
318
  ]
319
319
  }
320
+ },
321
+ {
322
+ "definition": "GroupDetail",
323
+ "value": {
324
+ "groupId": "g:11111111-1111-4111-8111-111111111111",
325
+ "name": "Lights",
326
+ "entityType": "basic.device.Device",
327
+ "memberCount": 2,
328
+ "revision": 3,
329
+ "applyState": "ready",
330
+ "createdAt": 1900000000000,
331
+ "updatedAt": 1900000001000,
332
+ "entityIds": [
333
+ "lamp-a",
334
+ "lamp-b"
335
+ ],
336
+ "capabilities": [
337
+ {
338
+ "id": "basic.device.command.onOff",
339
+ "memberCount": 1
340
+ }
341
+ ],
342
+ "memberProblems": [
343
+ {
344
+ "entityId": "lamp-b",
345
+ "code": "MEMBER_UNAVAILABLE",
346
+ "message": "Member is unavailable"
347
+ }
348
+ ],
349
+ "visibleCapabilities": []
350
+ }
351
+ },
352
+ {
353
+ "definition": "GroupDetail",
354
+ "value": {
355
+ "groupId": "g:11111111-1111-4111-8111-111111111111",
356
+ "name": "Lights",
357
+ "entityType": "basic.device.Device",
358
+ "memberCount": 2,
359
+ "revision": 3,
360
+ "applyState": "ready",
361
+ "createdAt": 1900000000000,
362
+ "updatedAt": 1900000001000,
363
+ "entityIds": [
364
+ "lamp-a",
365
+ "lamp-b"
366
+ ],
367
+ "capabilities": [
368
+ {
369
+ "id": "basic.device.command.onOff",
370
+ "memberCount": 1
371
+ }
372
+ ],
373
+ "memberProblems": [
374
+ {
375
+ "entityId": "lamp-b",
376
+ "code": "MEMBER_UNAVAILABLE",
377
+ "message": "Member is unavailable"
378
+ }
379
+ ],
380
+ "visibleCapabilities": [
381
+ "basic.device.command.onOff"
382
+ ]
383
+ }
320
384
  }
321
385
  ],
322
386
  "invalid": [
@@ -422,6 +486,39 @@
422
486
  ],
423
487
  "expectedRevision": 1
424
488
  }
489
+ },
490
+ {
491
+ "definition": "GroupDetail",
492
+ "value": {
493
+ "groupId": "g:11111111-1111-4111-8111-111111111111",
494
+ "name": "Lights",
495
+ "entityType": "basic.device.Device",
496
+ "memberCount": 2,
497
+ "revision": 3,
498
+ "applyState": "ready",
499
+ "createdAt": 1900000000000,
500
+ "updatedAt": 1900000001000,
501
+ "entityIds": [
502
+ "lamp-a",
503
+ "lamp-b"
504
+ ],
505
+ "capabilities": [
506
+ {
507
+ "id": "basic.device.command.onOff",
508
+ "memberCount": 1
509
+ }
510
+ ],
511
+ "memberProblems": [
512
+ {
513
+ "entityId": "lamp-b",
514
+ "code": "MEMBER_UNAVAILABLE",
515
+ "message": "Member is unavailable"
516
+ }
517
+ ],
518
+ "visibleCapabilities": [
519
+ false
520
+ ]
521
+ }
425
522
  }
426
523
  ]
427
524
  }
@@ -7070,5 +7070,87 @@
7070
7070
  "accepted": true,
7071
7071
  "stateStatus": "unknown"
7072
7072
  }
7073
+ },
7074
+ {
7075
+ "name": "device-shadow-enhanced",
7076
+ "target": "/app/device/list",
7077
+ "status": "success",
7078
+ "data": {
7079
+ "devices": [
7080
+ {
7081
+ "entityId": "camera",
7082
+ "name": "Door",
7083
+ "group": false,
7084
+ "active": true,
7085
+ "lifecycle": "enabled",
7086
+ "integration": "mlinkMatter.device",
7087
+ "capabilities": [
7088
+ "command.captureSnapshots",
7089
+ "command.cameraSnapshots"
7090
+ ],
7091
+ "visibleCapabilities": [
7092
+ "command.cameraSnapshots"
7093
+ ]
7094
+ }
7095
+ ]
7096
+ },
7097
+ "essential": {
7098
+ "devices": [
7099
+ {
7100
+ "entityId": "camera",
7101
+ "name": "Door",
7102
+ "group": false,
7103
+ "active": true,
7104
+ "lifecycle": "enabled",
7105
+ "integration": "mlinkMatter.device",
7106
+ "capabilities": [
7107
+ "command.captureSnapshots",
7108
+ "command.cameraSnapshots"
7109
+ ],
7110
+ "visibleCapabilities": [
7111
+ "command.cameraSnapshots"
7112
+ ]
7113
+ }
7114
+ ]
7115
+ }
7116
+ },
7117
+ {
7118
+ "name": "device-shadow-empty",
7119
+ "target": "/app/device/list",
7120
+ "status": "success",
7121
+ "data": {
7122
+ "devices": [
7123
+ {
7124
+ "entityId": "camera",
7125
+ "name": "Door",
7126
+ "group": false,
7127
+ "active": true,
7128
+ "lifecycle": "enabled",
7129
+ "integration": "mlinkMatter.device",
7130
+ "capabilities": [
7131
+ "command.captureSnapshots",
7132
+ "command.cameraSnapshots"
7133
+ ],
7134
+ "visibleCapabilities": []
7135
+ }
7136
+ ]
7137
+ },
7138
+ "essential": {
7139
+ "devices": [
7140
+ {
7141
+ "entityId": "camera",
7142
+ "name": "Door",
7143
+ "group": false,
7144
+ "active": true,
7145
+ "lifecycle": "enabled",
7146
+ "integration": "mlinkMatter.device",
7147
+ "capabilities": [
7148
+ "command.captureSnapshots",
7149
+ "command.cameraSnapshots"
7150
+ ],
7151
+ "visibleCapabilities": []
7152
+ }
7153
+ ]
7154
+ }
7073
7155
  }
7074
7156
  ]
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "manifest": "mhome.app-facade.v1",
3
- "contractVersion": "1.190.0",
3
+ "contractVersion": "1.192.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.190.0",
2
+ "contractVersion": "1.192.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.190.0",
3
+ "contractVersion": "1.192.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.190.0",
3
+ "contractVersion": "1.192.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.190.0",
3
+ "contractVersion": "1.192.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.190.0",
3
+ "contractVersion": "1.192.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.190.0",
3
+ "contractVersion": "1.192.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.190.0",
3
+ "version": "1.192.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.190.0",
3
+ "contractVersion": "1.192.0",
4
4
  "manifest": "manifest/app-facade.v1.json",
5
5
  "schemas": {
6
6
  "dashboardCardAuthoring": "schema/dashboard-card-authoring.v1.schema.json",
@@ -204,35 +204,6 @@
204
204
  "instanceId"
205
205
  ]
206
206
  },
207
- "diagnosticReadInput": {
208
- "type": "object",
209
- "additionalProperties": false,
210
- "properties": {
211
- "automationId": {
212
- "type": "string",
213
- "pattern": "\\S"
214
- },
215
- "threadId": {
216
- "type": "integer",
217
- "minimum": 0
218
- },
219
- "instanceId": {
220
- "type": "string",
221
- "pattern": "\\S"
222
- },
223
- "cursor": {
224
- "type": [
225
- "string",
226
- "null"
227
- ]
228
- }
229
- },
230
- "required": [
231
- "automationId",
232
- "threadId",
233
- "instanceId"
234
- ]
235
- },
236
207
  "instanceStopOutput": {
237
208
  "type": "object",
238
209
  "additionalProperties": false,
@@ -293,20 +264,6 @@
293
264
  "automationId": {
294
265
  "type": "string",
295
266
  "pattern": "\\S"
296
- },
297
- "cursor": {
298
- "type": [
299
- "string",
300
- "null"
301
- ]
302
- },
303
- "limit": {
304
- "type": [
305
- "integer",
306
- "null"
307
- ],
308
- "minimum": 1,
309
- "maximum": 100
310
267
  }
311
268
  },
312
269
  "required": [
@@ -316,6 +316,14 @@
316
316
  "code",
317
317
  "message"
318
318
  ]
319
+ },
320
+ "visibleCapabilities": {
321
+ "type": "array",
322
+ "items": {
323
+ "type": "string",
324
+ "minLength": 1
325
+ },
326
+ "uniqueItems": true
319
327
  }
320
328
  },
321
329
  "required": [