@mhome/app-facade-protocol 1.173.1 → 1.177.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.
- package/contract/automation-presentation-v1.md +1 -1
- package/contract/developer-contracts-v1.md +24 -9
- package/contract/entity-v1.md +2 -2
- package/contract/nfc-v1.md +1 -1
- package/contract/onboard-v1.md +15 -0
- package/contract/resource-read-v1.md +3 -3
- package/contract/suggestion-v1.md +1 -1
- package/contract/wave-v1.md +24 -18
- package/contract/widget-presentation-v1.md +1 -1
- package/fixtures/entity-presentation.conformance.json +22 -22
- package/fixtures/group.conformance.json +76 -76
- package/fixtures/suggestion.conformance.json +123 -2
- 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
- package/schema/automation-presentation.v1.schema.json +0 -1
- package/schema/entity-presentation.v1.schema.json +0 -2
- package/schema/group.v1.schema.json +1 -2
- package/schema/suggestion.v1.schema.json +54 -0
|
@@ -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}`:
|
|
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
|
-
#
|
|
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.
|
|
7
|
-
|
|
8
|
-
|
|
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
|
-
|
|
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`.
|
|
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
|
|
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
|
|
package/contract/entity-v1.md
CHANGED
|
@@ -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}` (
|
|
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}` (
|
|
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
|
package/contract/nfc-v1.md
CHANGED
|
@@ -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:[...]}`,
|
|
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.
|
package/contract/onboard-v1.md
CHANGED
|
@@ -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.
|
|
@@ -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
|
|
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.
|
|
106
|
-
|
|
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.
|
|
@@ -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 |
|
|
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` |
|
package/contract/wave-v1.md
CHANGED
|
@@ -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
|
|
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
|
|
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
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
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
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
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}`:
|
|
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",
|
|
@@ -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
|
}
|
package/manifest/routing.v1.json
CHANGED
package/manifest/targets.v1.json
CHANGED
package/package.json
CHANGED
package/protocol.json
CHANGED
|
@@ -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
|
}
|
|
@@ -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
|
},
|