@mhome/app-facade-protocol 1.172.0 → 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 +11 -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 +13 -3
- package/contract/suggestion-v1.md +31 -23
- 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 +204 -228
- package/fixtures/suggestion.migration.json +4 -20
- 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/recording.v1.json +3 -0
- 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 +7 -1
- package/schema/entity-presentation.v1.schema.json +0 -2
- package/schema/group.v1.schema.json +1 -2
- package/schema/suggestion.v1.schema.json +84 -46
|
@@ -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. |
|
|
@@ -102,3 +102,13 @@ disable alone preserve it. Out-of-order reports cannot replace a newer result.
|
|
|
102
102
|
The small activity summary is independent of detailed diagnostic retention and does
|
|
103
103
|
not add an activity-history row. Suppression follows the existing runtime outcome;
|
|
104
104
|
there is no separate suppressed terminal state. The durable `corrupted` flag is removed.
|
|
105
|
+
|
|
106
|
+
`lastExecution.failureCode` is optional. `FAILED` with `failureCode: SUPPRESSED`
|
|
107
|
+
means the whole Automation execution was blocked by its entry/resume suppression
|
|
108
|
+
gate. UI may render this as "Suppressed" without changing the outcome. An internal
|
|
109
|
+
command/member failure never supplies this classification, even when its own error
|
|
110
|
+
code is SUPPRESSED. Internal errors are not aggregated into this reason. A resume
|
|
111
|
+
gate may block a run after earlier actions have completed; the reason describes
|
|
112
|
+
that gate's rejection, not whether any prior action succeeded. Rule-store/evaluation
|
|
113
|
+
failures, older summaries and unknown reasons retain the ordinary outcome label.
|
|
114
|
+
The marker uses the existing summary independently of diagnostic-log retention.
|
|
@@ -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.
|
|
@@ -151,3 +151,13 @@ disable alone preserve it. Out-of-order reports cannot replace a newer result.
|
|
|
151
151
|
The small activity summary is independent of detailed diagnostic retention and does
|
|
152
152
|
not add an activity-history row. Suppression follows the existing runtime outcome;
|
|
153
153
|
there is no separate suppressed terminal state. The durable `corrupted` flag is removed.
|
|
154
|
+
|
|
155
|
+
`lastExecution.failureCode` is optional. `FAILED` with `failureCode: SUPPRESSED`
|
|
156
|
+
means the whole Automation execution was blocked by its entry/resume suppression
|
|
157
|
+
gate. UI may render this as "Suppressed" without changing the outcome. An internal
|
|
158
|
+
command/member failure never supplies this classification, even when its own error
|
|
159
|
+
code is SUPPRESSED. Internal errors are not aggregated into this reason. A resume
|
|
160
|
+
gate may block a run after earlier actions have completed; the reason describes
|
|
161
|
+
that gate's rejection, not whether any prior action succeeded. Rule-store/evaluation
|
|
162
|
+
failures, older summaries and unknown reasons retain the ordinary outcome label.
|
|
163
|
+
The marker uses the existing summary independently of diagnostic-log retention.
|
|
@@ -9,7 +9,7 @@ separately. Existing conversation and Now Attention protocols are unchanged.
|
|
|
9
9
|
|
|
10
10
|
- Foundation owns these DTOs, strict schemas and shared conformance fixtures.
|
|
11
11
|
- Agent owns SuggestionGenerator: prompts, allowed read/validation tools,
|
|
12
|
-
analysis,
|
|
12
|
+
analysis, natural-language intent and adoption-time draft generation. Automation is the first
|
|
13
13
|
production content type, not a restriction of the common framework.
|
|
14
14
|
- The backend responsible for a Space (Core or Lion) owns admission, budgets,
|
|
15
15
|
authorization, persistence, run completion, feedback and business handlers.
|
|
@@ -34,6 +34,7 @@ chat surfaces and threads. Its trigger selects payment attribution:
|
|
|
34
34
|
| Trigger | Payer | Result owner |
|
|
35
35
|
| --- | --- | --- |
|
|
36
36
|
| `EXPLICIT`, verified requesting `userId` | That user | The Space |
|
|
37
|
+
| `ADOPTION`, verified `principal` | Requesting User, or the current owner for a Space principal | The Space |
|
|
37
38
|
| `SCHEDULED` | Current Space owner, resolved by the billing adapter | The Space |
|
|
38
39
|
|
|
39
40
|
For example, if owner Alice and member Bob share a Space, a periodic run bills
|
|
@@ -53,7 +54,7 @@ Space access. Shape validation cannot substitute for those checks.
|
|
|
53
54
|
## Cloud transport
|
|
54
55
|
|
|
55
56
|
The existing authenticated execution envelope has a `suggestion` family with
|
|
56
|
-
`generate`, `read`, `completed`, `failed` and `cancel` messages. Each carries the
|
|
57
|
+
`generate`, `adopt`, `read`, `completed`, `failed` and `cancel` messages. Each carries the
|
|
57
58
|
trusted Suggestion invocation and existing dispatch/session binding, without
|
|
58
59
|
inventing a conversation identity. `generate` freezes the collected input, facts
|
|
59
60
|
and model plan. `completed` carries registered result documents, candidate
|
|
@@ -104,23 +105,28 @@ spell out that set because JavaScript `\s` treats NEXT LINE and BOM differently.
|
|
|
104
105
|
|
|
105
106
|
## Automation content
|
|
106
107
|
|
|
107
|
-
`AUTOMATION` adds `operation`, `
|
|
108
|
+
`AUTOMATION` adds `operation`, `request`, optional `automationId` and optional
|
|
109
|
+
`relatedAutomationIds`. `request` describes the proposed behavior in natural language.
|
|
110
|
+
CREATE has no target ID; UPDATE names the existing Automation. No script or source
|
|
111
|
+
hash is generated or stored in the proposal.
|
|
108
112
|
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
- Applying an update checks the base hash within the existing editing boundary.
|
|
117
|
-
It must not overwrite an intervening user change after a separate stale check.
|
|
113
|
+
Adoption uses a separately authorized `ADOPTION` invocation and the current Chat
|
|
114
|
+
model mapping, frozen at start. It reads current Automation source, generates and
|
|
115
|
+
verifies an ephemeral draft through the existing read-only workflow. The host saves
|
|
116
|
+
that draft; UPDATE checks the hash read during this adoption inside the editor's
|
|
117
|
+
atomic write boundary. An earlier change since discovery does not reject adoption;
|
|
118
|
+
a change during generation must not be overwritten. Background discovery continues
|
|
119
|
+
to use the Suggestion model and its own schedule/context watermark.
|
|
118
120
|
|
|
119
121
|
The first Automation handler declares `APPLY`: a newly created Automation is
|
|
120
122
|
saved and enabled; an update preserves the existing Automation's enabled or
|
|
121
123
|
stopped state within the editing boundary. A deliberately stopped Automation must
|
|
122
124
|
not be re-enabled by applying an update. UI labels state the resulting action.
|
|
123
|
-
Handling is one-shot.
|
|
125
|
+
Handling is one-shot. Admission returns `PROCESSING`; the detail and list show the
|
|
126
|
+
processing state until its durable receipt settles. The bounded owner survives caller
|
|
127
|
+
disconnection. Duplicate clicks do not start another generation or write. During
|
|
128
|
+
PROCESSING, resolution identifies the admitted operation and has no final result.
|
|
129
|
+
No queue, replay or recovery worker is introduced. After an admitted action ends, its Suggestion is `RESOLVED`
|
|
124
130
|
regardless of success, partial success, failure or an unknown write outcome. For
|
|
125
131
|
example, saving the new Automation and failing to enable it records a `partial`
|
|
126
132
|
result with its Automation ID and the enable failure. The UI says what succeeded
|
|
@@ -129,9 +135,9 @@ pending Suggestion, retry button, recovery task or compensation workflow.
|
|
|
129
135
|
Enabling a new task-flow Automation does not mean executing its task immediately.
|
|
130
136
|
|
|
131
137
|
Other type handlers declare their own actions. The common framework does not
|
|
132
|
-
equate acceptance with enabling or running a resource. UI
|
|
133
|
-
|
|
134
|
-
|
|
138
|
+
equate acceptance with enabling or running a resource. The UI shows the intent
|
|
139
|
+
and reasons. Adoption generates and validates source against current resources
|
|
140
|
+
and supported SDK rules before the host applies it.
|
|
135
141
|
|
|
136
142
|
## Run and result semantics
|
|
137
143
|
|
|
@@ -139,8 +145,9 @@ One Space has at most one active run. A duplicate admission returns that run wit
|
|
|
139
145
|
`accepted: false`; its focus is not incorporated and its payer is not substituted.
|
|
140
146
|
The host owns `SuggestionRun` status and measured model usage. The generator
|
|
141
147
|
returns drafts and an optional bounded context summary, never a success claim or
|
|
142
|
-
its own accounting.
|
|
143
|
-
|
|
148
|
+
its own accounting. Discovery analysis and reads share a bounded run budget.
|
|
149
|
+
Each adoption has a separate bounded generation and repair budget; it does not
|
|
150
|
+
alter the discovery run, watermark, context summary or periodic clock.
|
|
144
151
|
|
|
145
152
|
| Status | Meaning |
|
|
146
153
|
| --- | --- |
|
|
@@ -158,9 +165,10 @@ unbounded run log, a retry service or catch-up runs for every missed period.
|
|
|
158
165
|
|
|
159
166
|
## Suggestion lifecycle and handling
|
|
160
167
|
|
|
161
|
-
`PENDING` means available for review, `
|
|
168
|
+
`PENDING` means available for review, `PROCESSING` means adoption is in progress,
|
|
169
|
+
`RESOLVED` means one-shot handling has ended,
|
|
162
170
|
`DISMISSED` records rejection, and `EXPIRED` means no longer applicable.
|
|
163
|
-
|
|
171
|
+
Processing/resolved/dismissed records require a backend resolution. Pending/expired records
|
|
164
172
|
have none. Resolution records the action, existing operation ID, time, canonical
|
|
165
173
|
actor, resulting resource IDs/feedback, and the full canonical `FacadeResponse`
|
|
166
174
|
in `result`. Handling lifecycle and business outcome are independent: `RESOLVED`
|
|
@@ -199,13 +207,13 @@ The following are contract declarations, not a current support inventory.
|
|
|
199
207
|
| `/app/suggestion/generation/get` | `GenerationGetInput`: optional `runId` | `GenerationGetOutput`: current/latest run, or null before any run |
|
|
200
208
|
| `/app/suggestion/list` | `ListInput`: type/status filters, cursor, limit (default 50, maximum 100) | `ListOutput`: summaries and optional cursor |
|
|
201
209
|
| `/app/suggestion/detail/get` | `DetailInput`: `suggestionId` | Complete typed Suggestion |
|
|
202
|
-
| `/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 |
|
|
203
211
|
| `/app/suggestion/feedback` | `FeedbackInput`: ID, expected version, `DISMISS`, optional comment | Updated Suggestion summary on completed success |
|
|
204
212
|
| `/app/suggestion/settings/get` | Empty input | `SuggestionSettings` |
|
|
205
213
|
| `/app/suggestion/settings/save` | `SaveSettingsInput`: one or both of `enabled`, `intervalMinutes` | Complete saved `SuggestionSettings` |
|
|
206
214
|
|
|
207
215
|
An explicit unknown or no-longer-retained run ID returns `NOT_FOUND`; it must not
|
|
208
|
-
silently return an unrelated run. Lists are bounded and omit
|
|
216
|
+
silently return an unrelated run. Lists are bounded and omit full evidence,
|
|
209
217
|
evidence and resolutions; detail reads return the saved complete content.
|
|
210
218
|
Business errors/partial or unknown outcomes use the canonical Facade result;
|
|
211
219
|
marking handling finished must not replace that result with `success`.
|
|
@@ -247,7 +255,7 @@ owner and `schedule` (`SuggestionScheduleState`); `STATE` carries that owner,
|
|
|
247
255
|
`current` (run, trusted invocation, optional focus and observed usage), and optional
|
|
248
256
|
`contextSummary`; `SUGGESTION` carries `tenantId` and the full typed `item`, whose
|
|
249
257
|
`spaceId` supplies its Space owner. The shared `suggestion.migration.json` fixture
|
|
250
|
-
covers disabled settings, retained context,
|
|
258
|
+
covers disabled settings, retained context, structured intents and a partial
|
|
251
259
|
handling receipt. Internal dispatch bindings, object addresses and handling claims
|
|
252
260
|
are never transferred.
|
|
253
261
|
|
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",
|