@mhome/app-facade-protocol 1.173.1 → 1.179.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.
@@ -6,7 +6,7 @@ Full and Essential use the same business read scope; UI requests Full.
6
6
 
7
7
  | Target | Input | Output and read boundary |
8
8
  | --- | --- | --- |
9
- | `/app/presentation/automation/names/get` | `{ids}`: 1–100 selected, trimmed/deduplicated IDs | `{automations: {id: label}}`. Missing IDs omitted. Selected definition metadata only; no source downloads, parsing, state, history or graph reads. |
9
+ | `/app/presentation/automation/names/get` | `{ids}`: one or more selected, trimmed/deduplicated IDs | `{automations: {id: label}}`. Missing IDs omitted. Selected definition metadata only; no source downloads, parsing, state, history or graph reads. |
10
10
  | `/app/presentation/automation/list` | `{type: "RECURRING" \| "TASK_FLOW"}` | `{automations}`: current-type regular user programs, with labels, runnable/last-execution/expiry metadata, enabled/running/blocked, last-run `timestamp`, status timestamps and tags. No temporary-program, Group, Widget, snapshot, graph or authored-source expansion. |
11
11
  | `/app/presentation/automation/overview/get` | `{automationId}`: nonblank, trimmed | `{id,name,type,enabled,runnable,lastExecution,blocked,saveIncomplete?,widgets}`. Selected metadata, status, cloud quota display state and owned Widget configuration/current values. No source, graph traversal, running history or snapshots. Missing definition is not-found. |
12
12
  | `/app/presentation/automation/placements/get` | `{automationId}`: nonblank, trimmed | `{canvases:[{id,name,containsAutomation}]}`. Matches both owned Widget-to-Card relations and dedicated Automation Cards by `meta.automationId`, against Canvas leaf IDs including composition members. Backends read current-Space Card records to resolve these business references; responses contain only Canvas labels and membership flags. Retains existing default-canvas initialization when the Space has none. |
@@ -1,25 +1,40 @@
1
- # Published standard capability contracts
1
+ # Developer capability contracts
2
2
 
3
3
  `/app/developer/contracts/list` and `/app/developer/contracts/export` are read-only
4
4
  Hub operations. The authenticated caller needs Space read access to reach its
5
5
  online Hub. The Hub requests the matching `/bridge/schema/contracts/*` operation
6
- from Lion using its existing authenticated connection. Space identity authorizes
7
- and routes the request; it never chooses contract content. There is no direct
8
- Client-to-cloud implementation of these operations.
6
+ from Lion using its existing authenticated connection. There is no direct
7
+ Client-to-cloud implementation of these operations. Both accept optional
8
+ `source: "published" | "space"`, defaulting to `published`. Explicit null and
9
+ unknown source values are invalid. A caller never supplies another Space ID,
10
+ schema channel, package version, Preview snapshot or source body.
9
11
 
10
- Lion selects the latest complete, unarchived official production packages and
12
+ For `published`, Lion selects the latest complete, unarchived official production packages and
11
13
  their necessary dependencies, including `base`. Space Beta settings, installed
12
14
  versions, personal staging and local Preview do not participate. A missing or
13
15
  invalid requested dependency fails the operation. Unrelated catalog packages are
14
16
  not loaded. Sources are checked again before returning a result; a publication
15
17
  change causes a bounded retry, then an explicit temporary-unavailable error.
16
18
 
17
- List input is exactly `{ "integrationId": "basic.device" }`. The result contains
19
+ For `space`, Lion reads the authenticated Space's effective resource selection
20
+ through the existing source-owner interface. Active Preview overrides the same
21
+ installed ID. Only selected packages and their selected dependencies are read;
22
+ an unpublished author-owned Preview does not need production publication.
23
+ The existing compiler validates those exact inputs. A missing selected package
24
+ fails instead of falling back to a published version or another Space's cache.
25
+ Recheck the resource selection and Space schema mode after compilation; a
26
+ concurrent replacement retries the whole capture once, then reports temporary
27
+ unavailability. Export remains read-only: it does not mount Preview, install
28
+ packages, or select packages based on authorship.
29
+
30
+ List input is `{ "integrationId": "basic.device", "source": "published" }`
31
+ (the source field may be omitted). The result contains
18
32
  `integrationId`, `sourceSnapshot` and `capabilities`, with each capability's `id`,
19
33
  `method`, `abstract` flag and `description` from the resolved compiler graph.
20
34
 
21
35
  Export input contains `selected` (1..64 unique fully-qualified command/state/event/
22
- data IDs) and optional lowercase SHA-256 `ifNoneMatch`. Unknown fields are rejected.
36
+ data IDs), optional `source`, and optional lowercase SHA-256 `ifNoneMatch`.
37
+ Unknown fields are rejected.
23
38
  The result is either `{ "kind": "ready", "document": <export> }` or
24
39
  `{ "kind": "unchanged", "sha256": <digest> }`. These are business results inside
25
40
  the ordinary Facade response. The compiler-owned document keeps the
@@ -29,8 +44,8 @@ referenced types, plus its canonical result digest. It preserves inheritance,
29
44
  main entity routing fields, request/result semantics, constraints and data
30
45
  discovery dependencies. It executes no provider code or live business queries.
31
46
 
32
- `ifNoneMatch` is only a transfer optimization: Lion first checks current official
33
- sources, and may reuse immutable content and compiled/exported results. Cached
47
+ `ifNoneMatch` is only a transfer optimization: Lion first checks the current
48
+ sources for the selected mode, and may reuse immutable content and compiled/exported results. Cached
34
49
  data is never a freshness fallback when the cloud cannot be reached. A digest is
35
50
  a content identity, not a publication signature or operation grant.
36
51
 
@@ -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
- and bounded to 100 input entries. Empty input and unknown fields are rejected.
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"`.
@@ -11,7 +11,7 @@ built-in Entity types; other types are Integration-defined.
11
11
  - `/app/entity/detail/get`: `{entityType, ids}` returns ordered deduplicated
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
- - `/app/entity/state/get`: `{entityType, ids}` (1–100 nonblank IDs before
14
+ - `/app/entity/state/get`: `{entityType, ids}` (one or more nonblank IDs before
15
15
  deduplication) returns ordered `{items: [{requestedId, found, reason?, resource?}]}`.
16
16
  `resource` is `{entityId, latest: [{capabilityId, state?, event?, log?}]}`.
17
17
  These are latest persisted observations, without refreshing a Provider or deriving
@@ -46,7 +46,7 @@ card relationships or current observations. UI Resources and House compose domai
46
46
  reads; they do not require a multi-type backend catalog.
47
47
 
48
48
  `/app/device/source/resolve` is a read-only onboarding helper. Input is
49
- `{integrationId, connectId?, sourceIds}` (1–100 nonblank opaque IDs before
49
+ `{integrationId, connectId?, sourceIds}` (one or more nonblank opaque IDs before
50
50
  ordered deduplication). A connected Provider requires one exact Connection; a
51
51
  direct Provider omits it. Each result is `{requestedSourceId, found, entityId?,
52
52
  reason?}`. Missing IDs return `not_found`; multiple canonical IDs for one source
@@ -15,7 +15,7 @@ also checks whitespace, source identity uniqueness and merged policy constraints
15
15
  | `/app/nfc/create` | required name, policy; optional description, trustedSources | `{tagId,createState:"pending",writePayload}` | direct, Space write |
16
16
  | `/app/nfc/activate` | `{tagId}` | no data; `{status:"success"}` | direct, Space write |
17
17
  | `/app/nfc/update` | tagId and at least one of name, description, policy, trustedSources | no data | direct, Space write |
18
- | `/app/nfc/delete` | `{tagIds:[...]}`, 1–100 unique IDs | no data | direct or prepared, Space write |
18
+ | `/app/nfc/delete` | `{tagIds:[...]}`, one or more unique IDs | no data | direct or prepared, Space write |
19
19
 
20
20
  Name is trimmed, nonempty and unique case-insensitively within the tenant/Space,
21
21
  including pending records. Duplicate create never removes or replaces pending.
@@ -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. SQLite and
37
- DynamoDB delete a request atomically. Tablestore batch deletion can partially
38
- apply before returning an error. Physical tags retain their written content.
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
@@ -43,3 +43,18 @@ not saved Start and still has its physical window open. Do not infer durable
43
43
  device state from Cloud approval, automatically downgrade a saved connection, or
44
44
  allocate a new Plan/candidate. A normal initial Start also reuses an already
45
45
  approved identical Plan rather than replacing it.
46
+
47
+ `/local/onboard/lan/discover` is a Native Client operation, not Core discovery.
48
+ Its Full result is `{devices:[{address,description,productId?}],incomplete}`.
49
+ `description` is the canonical common PublicDescription. `productId`, when
50
+ present, is a 32-lowercase-hex Wave model hint for display only; it is outside
51
+ `description`, Start, and Plan and never proves brand/device trust. The current
52
+ adapter accepts only standalone Wave, compares the public Wave physical ID to
53
+ its component ID, and omits an unavailable/mismatched model hint without discarding
54
+ the common candidate. App metadata lookup is an independent anonymous exact-ID
55
+ catalog read, never an addition prerequisite or business install request.
56
+
57
+ After observing device completion, UI may independently read `/app/wave/list`
58
+ for prepared business projections. Missing definitions or unavailable catalog
59
+ metadata do not reverse completion; an explicit `/app/wave/refresh` retries
60
+ business inventory only. No additional onboarding state machine is introduced.
@@ -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.
@@ -31,7 +31,7 @@ accepts physical IDs only. This does not add Group enablement or alter lifecycle
31
31
 
32
32
  See [Device lifecycle outcomes](device-lifecycle-v1.md) for batch writes and retry behavior.
33
33
 
34
- Observation batches accept 1–100 IDs, reject blanks, trim and deduplicate preserving
34
+ Observation batches accept one or more IDs, reject blanks, trim and deduplicate preserving
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.
@@ -102,8 +102,8 @@ for removed capabilities must not be merged back into the current view. History
102
102
  remains available through its separate read.
103
103
 
104
104
  The frontend batches selected observations after reading definitions. Automation Cards
105
- also read selected Automation definitions for their name and type. Canvas IDs are
106
- split into bounded batches and deduplicated across Cards. History is requested by an
105
+ also read selected Automation definitions for their name and type. Selected IDs are sent in one request per owning resource read; there is no arbitrary
106
+ item-count cap or client pagination. The Facade validates and deduplicates IDs. History is requested by an
107
107
  open detail renderer; relationships by the view that displays them. Pushes received
108
108
  during a snapshot request are applied after it lands. Switching scopes or disposing
109
109
  controllers prevents late responses from landing in another Space.
@@ -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).
@@ -207,7 +207,7 @@ The following are contract declarations, not a current support inventory.
207
207
  | `/app/suggestion/generation/get` | `GenerationGetInput`: optional `runId` | `GenerationGetOutput`: current/latest run, or null before any run |
208
208
  | `/app/suggestion/list` | `ListInput`: type/status filters, cursor, limit (default 50, maximum 100) | `ListOutput`: summaries and optional cursor |
209
209
  | `/app/suggestion/detail/get` | `DetailInput`: `suggestionId` | Complete typed Suggestion |
210
- | `/app/suggestion/handle` | `HandleInput`: ID, expected version, declared action | Canonical business result, also stored in the resolution |
210
+ | `/app/suggestion/handle` | `HandleInput`: ID, expected version, declared action | Accepted PROCESSING receipt; read detail for the final business result stored in the resolution |
211
211
  | `/app/suggestion/feedback` | `FeedbackInput`: ID, expected version, `DISMISS`, optional comment | Updated Suggestion summary on completed success |
212
212
  | `/app/suggestion/settings/get` | Empty input | `SuggestionSettings` |
213
213
  | `/app/suggestion/settings/save` | `SaveSettingsInput`: one or both of `enabled`, `intervalMinutes` | Complete saved `SuggestionSettings` |
@@ -8,8 +8,14 @@ Physical addition uses the common device-owned operation and its Cloud approval;
8
8
  see [onboarding](../../onboard-api/contract/onboarding-v1.md). There is no separate
9
9
  Wave discovery/pair Facade or Integration Connect initial writer.
10
10
 
11
- - `/app/wave/list`: `{}` -> `{bindings:[{deviceId,grantState}]}`. Candidate,
12
- committed and removing describe saved authorization, not reachability or Twins.
11
+ - `/app/wave/list`: `{}` -> `{bindings:[{deviceId,grantState,inventoryState,entityIds}]}`. Candidate,
12
+ committed and removing describe saved authorization. This is a read-only snapshot:
13
+ `inventoryState:ready` means at least one currently available business Entity
14
+ has been projected for this committed binding; `entityIds` lists those Entities.
15
+ Disabled/offline devices retain prepared Entities. Missing/unavailable definitions
16
+ do not: an empty projection is `unavailable`, including candidates/removing
17
+ bindings. This is not a reachability probe or a guarantee that every endpoint
18
+ is available. Reading never triggers acquisition, refresh, or onboarding.
13
19
  - `/app/wave/refresh`: `{deviceId}` -> AdmissionResult. Only an already committed
14
20
  common-operation binding may supply authenticated inventory. The operation
15
21
  validates it against installed business contracts and feeds ordinary Twin
@@ -24,7 +30,8 @@ Wave discovery/pair Facade or Integration Connect initial writer.
24
30
  cleared with the binding. Integration uninstall is independent.
25
31
 
26
32
  AdmissionResult is `{deviceId,grantState,inventoryState,entityIds,reason?}`.
27
- `inventoryState:ready` means business synchronization completed. An unavailable
33
+ `inventoryState:ready` means at least one business Entity was projected; warnings
34
+ can still identify unavailable endpoints. An unavailable
28
35
  business definition or endpoint preserves committed product ownership and may
29
36
  produce partial results/warnings. Business failure never starts onboarding.
30
37
  Normal Device/capability interfaces own later observations and control.
@@ -35,19 +42,18 @@ bounded, cancellable derived-projection jobs, not another onboarding state
35
42
  machine. Periodic recovery need not reread products with retained Twin sources;
36
43
  resource changes can revalidate all committed products.
37
44
 
38
- A concrete Integration with `connectAdapter:wave` may use ordinary
39
- `/app/integration/connect` for an explicit business association. Its one typed
40
- form chooses a product already bound to this Hub. There are no transport, PIN,
41
- window or discovery-candidate fields. Authenticated inventory must advertise the
42
- chosen Integration before normal Integration installation and Twin publication.
43
- The flow creates no ordinary Connection or product credentials.
45
+ Authenticated product inventory selects its business Integration definitions. Core
46
+ resolves missing pure Wave definitions from the published or active Preview source
47
+ and maintains them while bound products use them. `wave.device` is installed by
48
+ default. A custom pure Wave package may use ordinary `installType:direct` as an
49
+ optional data-only preinstallation; this does not bind a product or create a
50
+ Connection. There is no Wave-specific `/app/integration/connect` selection flow,
51
+ InstallWave session, lifecycle `wave` result, or accepted-install receipt.
44
52
 
45
- The lifecycle result retains
46
- `wave:{deviceId,grantState,inventoryState,installed,entityIds,warnings,reason?}`.
47
- Complete business projection returns `status:done`; interrupted work returns
48
- `status:failed,recoverable:true,canCancel:false`. An immutable accepted receipt
49
- survives restart. Retry resumes only business installation/synchronization for
50
- its original caller, device and selected resource; a removed device cannot
51
- resume. It never reconstructs pairing input, changes keys or repeats a business
52
- command. Missing definitions do not authorize arbitrary script or Plugin code
53
- installation. Credentials remain Core-local and outside sync/exported Twins.
53
+ Whole-product onboarding owns binding and credentials. Missing or unsupported
54
+ business definitions preserve that ownership and leave the affected endpoint
55
+ unavailable. `/app/wave/refresh` explicitly synchronizes an existing product's
56
+ business inventory and rechecks the binding before applying its result. Normal
57
+ Integration installation/removal and product removal retain their own contracts.
58
+ Definitions never authorize arbitrary provider script or Plugin installation.
59
+ Credentials remain Core-local and outside sync/exported Twins.
@@ -6,7 +6,7 @@ policy. They are not Agent/CLI/MCP tools. Inputs reject unknown fields.
6
6
  | Target | Input | Business output and read boundary |
7
7
  | --- | --- | --- |
8
8
  | `/app/presentation/widget/list` | Required `{type: "data" \| "button" \| "circadian"}` | `{items, automationNames}`. Reads only that type's Widget table. Global standalone Widgets, defaults and Automation-owned parameters are included. Active card interiors, Twin and weather internals are excluded. Pending Data, Button and Circadian Widgets eligible for manual deletion are included for cleanup, regardless of their usual visibility. Owner labels use one selected metadata batch, only for returned Automation owners. No script, relation, history or all-type reads. |
9
- | `/app/presentation/widget/names/get` | `{ids}`: 1–100 selected, trimmed, deduplicated IDs | `{names: {id: displayName}}`. Missing/blank names omitted. Only selected Widget rows; no legacy `name` fallback. |
9
+ | `/app/presentation/widget/names/get` | `{ids}`: one or more selected, trimmed, deduplicated IDs | `{names: {id: displayName}}`. Missing/blank names omitted. Only selected Widget rows; no legacy `name` fallback. |
10
10
  | `/app/presentation/widget/defaults/get` | `{}` | `{items, automationNames:{}}`. Preserves the existing default Widget lookup and lazy initialization, then reads the selected Data Widgets. |
11
11
 
12
12
  Rows carry ID, revision, displayName, description, source/baseId, global, tag,
@@ -67,28 +67,6 @@
67
67
  "ids": [
68
68
  "auto-1"
69
69
  ]
70
- }
71
- ],
72
- "invalid": [
73
- {},
74
- {
75
- "entityType": " ",
76
- "ids": [
77
- " lamp ",
78
- "g:room",
79
- "missing",
80
- "lamp"
81
- ]
82
- },
83
- {
84
- "entityType": "basic.device.Device",
85
- "ids": []
86
- },
87
- {
88
- "entityType": "basic.device.Device",
89
- "ids": [
90
- ""
91
- ]
92
70
  },
93
71
  {
94
72
  "entityType": "basic.device.Device",
@@ -195,6 +173,28 @@
195
173
  "lamp",
196
174
  "lamp"
197
175
  ]
176
+ }
177
+ ],
178
+ "invalid": [
179
+ {},
180
+ {
181
+ "entityType": " ",
182
+ "ids": [
183
+ " lamp ",
184
+ "g:room",
185
+ "missing",
186
+ "lamp"
187
+ ]
188
+ },
189
+ {
190
+ "entityType": "basic.device.Device",
191
+ "ids": []
192
+ },
193
+ {
194
+ "entityType": "basic.device.Device",
195
+ "ids": [
196
+ ""
197
+ ]
198
198
  },
199
199
  {
200
200
  "entityType": "basic.device.Device",
@@ -209,82 +209,6 @@
209
209
  "message": "Group name update is incomplete; save the name again"
210
210
  }
211
211
  }
212
- }
213
- ],
214
- "invalid": [
215
- {
216
- "definition": "RenameGroupInput",
217
- "value": {
218
- "groupId": "g:1",
219
- "name": "Renamed"
220
- }
221
- },
222
- {
223
- "definition": "UpdateGroupMembersInput",
224
- "value": {
225
- "groupId": "g:1",
226
- "entityIds": [
227
- "lamp-b"
228
- ],
229
- "expectedRevision": 3,
230
- "name": "Unexpected"
231
- }
232
- },
233
- {
234
- "definition": "DeleteGroupInput",
235
- "value": {
236
- "groupId": "g:1",
237
- "expectedRevision": 0
238
- }
239
- },
240
- {
241
- "definition": "CreateGroupInput",
242
- "value": {
243
- "creationId": "11111111-1111-4111-8111-111111111111",
244
- "name": "Lights",
245
- "entityType": "basic.device.Device",
246
- "entityIds": [
247
- "lamp-a",
248
- "lamp-b",
249
- "lamp-a"
250
- ],
251
- "members": [
252
- {
253
- "data": "internal"
254
- }
255
- ]
256
- }
257
- },
258
- {
259
- "definition": "GroupDetail",
260
- "value": {
261
- "groupId": "g:11111111-1111-4111-8111-111111111111",
262
- "name": "Lights",
263
- "entityType": "basic.device.Device",
264
- "memberCount": 2,
265
- "revision": 3,
266
- "applyState": "ready",
267
- "createdAt": 1900000000000,
268
- "updatedAt": 1900000001000,
269
- "entityIds": [
270
- "lamp-a",
271
- "lamp-b"
272
- ],
273
- "capabilities": [
274
- {
275
- "id": "basic.device.command.onOff",
276
- "memberCount": 1
277
- }
278
- ],
279
- "memberProblems": [
280
- {
281
- "entityId": "lamp-b",
282
- "code": "MEMBER_UNAVAILABLE",
283
- "message": "Member is unavailable"
284
- }
285
- ],
286
- "blueprintSignature": "internal"
287
- }
288
212
  },
289
213
  {
290
214
  "definition": "GetGroupsInput",
@@ -393,6 +317,82 @@
393
317
  "a"
394
318
  ]
395
319
  }
320
+ }
321
+ ],
322
+ "invalid": [
323
+ {
324
+ "definition": "RenameGroupInput",
325
+ "value": {
326
+ "groupId": "g:1",
327
+ "name": "Renamed"
328
+ }
329
+ },
330
+ {
331
+ "definition": "UpdateGroupMembersInput",
332
+ "value": {
333
+ "groupId": "g:1",
334
+ "entityIds": [
335
+ "lamp-b"
336
+ ],
337
+ "expectedRevision": 3,
338
+ "name": "Unexpected"
339
+ }
340
+ },
341
+ {
342
+ "definition": "DeleteGroupInput",
343
+ "value": {
344
+ "groupId": "g:1",
345
+ "expectedRevision": 0
346
+ }
347
+ },
348
+ {
349
+ "definition": "CreateGroupInput",
350
+ "value": {
351
+ "creationId": "11111111-1111-4111-8111-111111111111",
352
+ "name": "Lights",
353
+ "entityType": "basic.device.Device",
354
+ "entityIds": [
355
+ "lamp-a",
356
+ "lamp-b",
357
+ "lamp-a"
358
+ ],
359
+ "members": [
360
+ {
361
+ "data": "internal"
362
+ }
363
+ ]
364
+ }
365
+ },
366
+ {
367
+ "definition": "GroupDetail",
368
+ "value": {
369
+ "groupId": "g:11111111-1111-4111-8111-111111111111",
370
+ "name": "Lights",
371
+ "entityType": "basic.device.Device",
372
+ "memberCount": 2,
373
+ "revision": 3,
374
+ "applyState": "ready",
375
+ "createdAt": 1900000000000,
376
+ "updatedAt": 1900000001000,
377
+ "entityIds": [
378
+ "lamp-a",
379
+ "lamp-b"
380
+ ],
381
+ "capabilities": [
382
+ {
383
+ "id": "basic.device.command.onOff",
384
+ "memberCount": 1
385
+ }
386
+ ],
387
+ "memberProblems": [
388
+ {
389
+ "entityId": "lamp-b",
390
+ "code": "MEMBER_UNAVAILABLE",
391
+ "message": "Member is unavailable"
392
+ }
393
+ ],
394
+ "blueprintSignature": "internal"
395
+ }
396
396
  },
397
397
  {
398
398
  "definition": "GroupSummary",
@@ -203,59 +203,67 @@
203
203
  "target": "/app/automation/detail/get",
204
204
  "status": "success",
205
205
  "data": {
206
- "automations": [
206
+ "items": [
207
207
  {
208
- "id": "a1",
209
- "name": "Morning",
210
- "description": "Turn on light",
211
- "enabled": true,
212
- "singleUse": false,
213
- "hasExpire": false,
214
- "usedCapabilities": [
215
- "light.command.on"
216
- ],
217
- "inputVars": [
218
- {
219
- "name": "$room",
220
- "type": "String",
221
- "description": "Room"
222
- }
223
- ],
224
- "scriptHash": "source-hash",
225
- "script": {
226
- "script": "private source",
227
- "scripts": {
228
- "function": "private"
229
- }
230
- },
231
- "updatedAt": 2,
232
- "descriptionTemplate": "Turn on {! $room !}",
233
- "automationType": "TASK_FLOW"
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
- "automations": [
242
+ "items": [
239
243
  {
240
- "id": "a1",
241
- "name": "Morning",
242
- "description": "Turn on light",
243
- "enabled": true,
244
- "singleUse": false,
245
- "hasExpire": false,
246
- "usedCapabilities": [
247
- "light.command.on"
248
- ],
249
- "inputVars": [
250
- {
251
- "name": "$room",
252
- "type": "String",
253
- "description": "Room"
254
- }
255
- ],
256
- "scriptHash": "source-hash",
257
- "descriptionTemplate": "Turn on {! $room !}",
258
- "automationType": "TASK_FLOW"
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-truncation-and-values",
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
  ]
@@ -371,7 +371,7 @@
371
371
  "value": {
372
372
  "type": "AUTOMATION",
373
373
  "operation": "CREATE",
374
- "title": "",
374
+ "title": "\ufeff",
375
375
  "summary": "Suggest a lower evening brightness",
376
376
  "reasons": [
377
377
  "Observed manual adjustments after the evening routine"
@@ -729,6 +729,45 @@
729
729
  },
730
730
  "request": "Use lower evening brightness"
731
731
  }
732
+ },
733
+ {
734
+ "name": "processing has no final result",
735
+ "type": "AutomationSuggestion",
736
+ "value": {
737
+ "type": "AUTOMATION",
738
+ "operation": "CREATE",
739
+ "title": "Evening lighting",
740
+ "summary": "Suggest a lower evening brightness",
741
+ "reasons": [
742
+ "Observed manual adjustments after the evening routine"
743
+ ],
744
+ "evidence": [
745
+ {
746
+ "sourceType": "BEHAVIOR",
747
+ "sourceId": "fixture-operation-1",
748
+ "occurredAt": 1000,
749
+ "excerpt": "The user selected brightness 30 after brightness 80"
750
+ }
751
+ ],
752
+ "id": "fixture-suggestion-1",
753
+ "spaceId": "fixture-space",
754
+ "runId": "fixture-run",
755
+ "version": 1,
756
+ "status": "PROCESSING",
757
+ "createdAt": 2000,
758
+ "updatedAt": 2000,
759
+ "request": "Use lower evening brightness",
760
+ "resolution": {
761
+ "action": "APPLY",
762
+ "operationId": "fixture-op",
763
+ "handledAt": 2000,
764
+ "actor": {
765
+ "kind": "user",
766
+ "userId": "fixture-user"
767
+ },
768
+ "resourceIds": {}
769
+ }
770
+ }
732
771
  }
733
772
  ],
734
773
  "invalid": [
@@ -1139,7 +1178,7 @@
1139
1178
  "value": {
1140
1179
  "type": "AUTOMATION",
1141
1180
  "operation": "CREATE",
1142
- "title": "…",
1181
+ "title": "\u0085",
1143
1182
  "summary": "Suggest a lower evening brightness",
1144
1183
  "reasons": [
1145
1184
  "Observed manual adjustments after the evening routine"
@@ -1424,6 +1463,88 @@
1424
1463
  "enabled": true,
1425
1464
  "intervalMinutes": null
1426
1465
  }
1466
+ },
1467
+ {
1468
+ "name": "processing rejects result",
1469
+ "type": "AutomationSuggestion",
1470
+ "value": {
1471
+ "type": "AUTOMATION",
1472
+ "operation": "CREATE",
1473
+ "title": "Evening lighting",
1474
+ "summary": "Suggest a lower evening brightness",
1475
+ "reasons": [
1476
+ "Observed manual adjustments after the evening routine"
1477
+ ],
1478
+ "evidence": [
1479
+ {
1480
+ "sourceType": "BEHAVIOR",
1481
+ "sourceId": "fixture-operation-1",
1482
+ "occurredAt": 1000,
1483
+ "excerpt": "The user selected brightness 30 after brightness 80"
1484
+ }
1485
+ ],
1486
+ "id": "fixture-suggestion-1",
1487
+ "spaceId": "fixture-space",
1488
+ "runId": "fixture-run",
1489
+ "version": 1,
1490
+ "status": "PROCESSING",
1491
+ "createdAt": 2000,
1492
+ "updatedAt": 2000,
1493
+ "request": "Use lower evening brightness",
1494
+ "resolution": {
1495
+ "action": "APPLY",
1496
+ "operationId": "fixture-op",
1497
+ "handledAt": 2000,
1498
+ "actor": {
1499
+ "kind": "user",
1500
+ "userId": "fixture-user"
1501
+ },
1502
+ "resourceIds": {},
1503
+ "result": {
1504
+ "status": "success"
1505
+ }
1506
+ }
1507
+ }
1508
+ },
1509
+ {
1510
+ "name": "processing rejects feedback",
1511
+ "type": "AutomationSuggestion",
1512
+ "value": {
1513
+ "type": "AUTOMATION",
1514
+ "operation": "CREATE",
1515
+ "title": "Evening lighting",
1516
+ "summary": "Suggest a lower evening brightness",
1517
+ "reasons": [
1518
+ "Observed manual adjustments after the evening routine"
1519
+ ],
1520
+ "evidence": [
1521
+ {
1522
+ "sourceType": "BEHAVIOR",
1523
+ "sourceId": "fixture-operation-1",
1524
+ "occurredAt": 1000,
1525
+ "excerpt": "The user selected brightness 30 after brightness 80"
1526
+ }
1527
+ ],
1528
+ "id": "fixture-suggestion-1",
1529
+ "spaceId": "fixture-space",
1530
+ "runId": "fixture-run",
1531
+ "version": 1,
1532
+ "status": "PROCESSING",
1533
+ "createdAt": 2000,
1534
+ "updatedAt": 2000,
1535
+ "request": "Use lower evening brightness",
1536
+ "resolution": {
1537
+ "action": "APPLY",
1538
+ "operationId": "fixture-op",
1539
+ "handledAt": 2000,
1540
+ "actor": {
1541
+ "kind": "user",
1542
+ "userId": "fixture-user"
1543
+ },
1544
+ "resourceIds": {},
1545
+ "feedback": "already done"
1546
+ }
1547
+ }
1427
1548
  }
1428
1549
  ]
1429
1550
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "manifest": "mhome.app-facade.v1",
3
- "contractVersion": "1.173.1",
3
+ "contractVersion": "1.179.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",
@@ -1,5 +1,5 @@
1
1
  {
2
- "contractVersion": "1.173.1",
2
+ "contractVersion": "1.179.1",
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.173.1",
3
+ "contractVersion": "1.179.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.173.1",
3
+ "contractVersion": "1.179.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.173.1",
3
+ "contractVersion": "1.179.1",
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.173.1",
3
+ "contractVersion": "1.179.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.173.1",
3
+ "contractVersion": "1.179.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.173.1",
3
+ "version": "1.179.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.173.1",
3
+ "contractVersion": "1.179.1",
4
4
  "manifest": "manifest/app-facade.v1.json",
5
5
  "schemas": {
6
6
  "dashboardCardAuthoring": "schema/dashboard-card-authoring.v1.schema.json",
@@ -12,7 +12,6 @@
12
12
  "ids": {
13
13
  "type": "array",
14
14
  "minItems": 1,
15
- "maxItems": 100,
16
15
  "items": {
17
16
  "type": "string",
18
17
  "pattern": "\\S"
@@ -94,7 +94,6 @@
94
94
  "ids": {
95
95
  "type": "array",
96
96
  "minItems": 1,
97
- "maxItems": 100,
98
97
  "items": {
99
98
  "type": "string",
100
99
  "pattern": "\\S"
@@ -183,7 +182,6 @@
183
182
  "properties": {
184
183
  "items": {
185
184
  "type": "array",
186
- "maxItems": 100,
187
185
  "items": {
188
186
  "$ref": "#/$defs/metaItem"
189
187
  }
@@ -23,8 +23,7 @@
23
23
  "items": {
24
24
  "type": "string",
25
25
  "minLength": 1
26
- },
27
- "maxItems": 100
26
+ }
28
27
  }
29
28
  },
30
29
  "required": [
@@ -375,6 +375,33 @@
375
375
  },
376
376
  "type": "object"
377
377
  }
378
+ },
379
+ {
380
+ "if": {
381
+ "properties": {
382
+ "status": {
383
+ "const": "PROCESSING"
384
+ }
385
+ },
386
+ "required": [
387
+ "status"
388
+ ]
389
+ },
390
+ "then": {
391
+ "properties": {
392
+ "resolution": {
393
+ "properties": {
394
+ "result": {
395
+ "type": "null"
396
+ },
397
+ "feedback": {
398
+ "type": "null"
399
+ }
400
+ },
401
+ "type": "object"
402
+ }
403
+ }
404
+ }
378
405
  }
379
406
  ]
380
407
  },
@@ -696,6 +723,33 @@
696
723
  },
697
724
  "type": "object"
698
725
  }
726
+ },
727
+ {
728
+ "if": {
729
+ "properties": {
730
+ "status": {
731
+ "const": "PROCESSING"
732
+ }
733
+ },
734
+ "required": [
735
+ "status"
736
+ ]
737
+ },
738
+ "then": {
739
+ "properties": {
740
+ "resolution": {
741
+ "properties": {
742
+ "result": {
743
+ "type": "null"
744
+ },
745
+ "feedback": {
746
+ "type": "null"
747
+ }
748
+ },
749
+ "type": "object"
750
+ }
751
+ }
752
+ }
699
753
  }
700
754
  ]
701
755
  },