@mhome/app-facade-protocol 1.137.1 → 1.138.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.
@@ -85,8 +85,8 @@ Fallback characteristic UUIDs: the standard endpoints as for pods, `host-info`
85
85
  ```
86
86
 
87
87
  `productId` is optional. `onboardingRequired` reports whether this Host still
88
- awaits its first claim. `networkOnline` reports current LAN readiness. Both
89
- are optional for older Hosts. A securely paired Host with `networkOnline: true`
88
+ awaits its first claim and is required. `networkOnline` reports current LAN
89
+ readiness. A securely paired Host with `networkOnline: true`
90
90
  and `onboardingRequired: true` can finish without resubmitting Wi-Fi. `finish`
91
91
  issues a fresh first-claim token after checking authoritative Host ownership.
92
92
  Already claimed Hosts never issue a new first-claim token.
@@ -102,7 +102,8 @@ Fallback characteristic UUIDs: the standard endpoints as for pods, `host-info`
102
102
  established and the Host is not recovering an unfinished claim on a working
103
103
  network. Refusal keeps the current setup session open. The Client reports
104
104
  completion only after a positive receipt, with a valid token when the secured
105
- Host information indicated that first claim was pending.
105
+ Host information indicated that first claim was pending. A receipt that
106
+ unexpectedly carries a token for an already claimed Host also fails.
106
107
  `finish` ends the central's setup session. Without it, the Host disconnects the
107
108
  central 30 seconds after a successful join; the commissioner retries `finish`
108
109
  within that window. Network readiness and mDNS announcement do not establish
@@ -120,11 +121,12 @@ and stop at `result_count` or on an empty page. This also works with ESP-IDF
120
121
  devices, which return exactly the requested entries (commissioners ask for at
121
122
  most 4 at a time).
122
123
 
123
- `prov-config` status reports `connected` with the IPv4 address once the Host is
124
- on the LAN (the address may be empty when the Host has none yet); `connection_failed` with `auth_error` or `network_not_found` when
125
- the join failed. After a failed join the commissioner sends `prov-ctrl` reset
126
- before the next `set_config`. In a re-provision window the previous network
127
- stays saved until the new one connects.
124
+ `prov-config` status reports `connected` with the IPv4 address after the Host
125
+ has saved the new profile. The Linux backend first activates a temporary
126
+ profile. On failure or local cancellation it removes that profile and attempts
127
+ to reactivate the previous one. `connection_failed` may distinguish
128
+ `auth_error` or `network_not_found`. After a failed join the commissioner sends
129
+ `prov-ctrl` reset before the next `set_config`.
128
130
 
129
131
  ## 4. Native Client targets
130
132
 
@@ -161,9 +163,12 @@ Session states, in order: `connecting`, `awaiting_code`, `securing`,
161
163
  `timed_out`, `cancelled`; transitional `cancelling`. `completed` carries `host`, the reported `addresses`
162
164
  (IPv4 only, possibly empty) and `claimToken` from the `finish` response; the
163
165
  commissioner sends `finish` (up to 3 times while the secure session lasts)
164
- before reporting it. `claimToken` is absent when `finish` could not be
165
- delivered, in a re-provision window.
166
- No other state carries `claimToken`.
166
+ before reporting it. A missing or refused `finish` is a failed session. The
167
+ first-claim handoff includes `claimToken`. A completed Wi-Fi update on an
168
+ already claimed Host omits it. An account change can redact the token from a
169
+ terminal event, so confirm a tokenless completion through the native status
170
+ target before displaying the Wi-Fi update as successful. No other state
171
+ carries `claimToken`.
167
172
 
168
173
  The first claim (TOFU) after BLE provisioning must include the returned token.
169
174
  Native `host.claim` passes it to `POST /v1/auth/claim`, alongside the environment,
@@ -194,13 +199,14 @@ The schema is `schema/host-provision.v1.schema.json`.
194
199
  setup after restart, keeping saved Wi-Fi. Network readiness is not ownership.
195
200
  An existing local claim, including one awaiting cloud confirmation, must never
196
201
  reopen first-claim authority. An unreadable ownership store refuses recovery.
197
- - Re-provision window: opened from the Host's local interface (display settings
198
- or `meowhostd provision open`). Mutating local provisioning commands (`open`,
202
+ - Re-provision window: opened on the target Host with `meow host provision open`.
203
+ The CLI talks directly to the Host's local control socket, without a Client
204
+ daemon. Mutating local provisioning commands (`open`,
199
205
  `close`, `factory-reset`) require root or membership in the `meow-admin`
200
206
  group (checked with the peer credentials of the local control socket); status
201
- stays readable by the same user. The command help says to use `sudo`. Wi-Fi only; Host identity, owners and services
202
- are kept. Closes after a successful join, on `meowhostd provision close`, or
203
- after 10 minutes.
207
+ is available with `meow host provision status`.
208
+ Host identity, owners and services are kept. The window closes after a
209
+ successful join, on `meow host provision close`, or after 10 minutes.
204
210
  - Factory reset: from the local interface (`meowhostd factory-reset`). Stops
205
211
  services, forgets saved Wi-Fi on BLE provisioning appliances, erases owners,
206
212
  the Host security store and bootstrap key, and returns to first provisioning.
@@ -5,12 +5,13 @@ policy. They are not Agent/CLI/MCP tools. Inputs reject unknown fields.
5
5
 
6
6
  | Target | Input | Business output and read boundary |
7
7
  | --- | --- | --- |
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; card interiors, Twin and weather internals are excluded. Owner labels use one selected metadata batch, only for returned Automation owners. No script, relation, history or all-type reads. |
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
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. |
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,
13
- current value, and type-specific control configuration. Circadian rows contain
13
+ current value, and type-specific control configuration. `pendingDeletion: true`
14
+ identifies a Widget whose deletion can be completed through the delete Facade. Circadian rows contain
14
15
  only `curve`, `curvePreview` (active curve's UI points), current/next values and
15
16
  `nextTimestamp`; they omit complete schedules, location and internal state.
16
17
  Complete configuration uses `/app/widget/detail/get`; runtime uses
@@ -40,5 +40,12 @@ Create/configuration responses retain action, widgetId, type and displayName.
40
40
  to preserve its previous deletion behavior. This migration does not change the
41
41
  shared safe=true protection for Widgets referenced by Automations.
42
42
 
43
+ After validation, deletion marks each Widget before removing its associated
44
+ resources. A pending Widget remains readable and rejects controls, edits and
45
+ new Automation or Dashboard references. Its list/detail projections carry
46
+ `pendingDeletion: true`. Call the same delete endpoint with the original IDs
47
+ to finish the operation. Missing IDs are already complete. A validation failure
48
+ leaves unstarted Widgets available.
49
+
43
50
  All legacy public /widget/* request Controllers are retired. /widget/reportUpdate
44
51
  is a push event and internal /dispatch/widget/* operations retain their own roles.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "manifest": "mhome.app-facade.v1",
3
- "contractVersion": "1.137.1",
3
+ "contractVersion": "1.138.0",
4
4
  "callSchema": "schema/facade-call.v1.schema.json",
5
5
  "routing": "manifest/routing.v1.json",
6
6
  "routingSchema": "schema/routing.v1.schema.json",
@@ -1,5 +1,5 @@
1
1
  {
2
- "contractVersion": "1.137.1",
2
+ "contractVersion": "1.138.0",
3
3
  "operations": {
4
4
  "/app/agent/context/get": "spaceRead",
5
5
  "/app/agent/credit/usage": "spaceRead",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "manifest": "mhome.host-provision.targets.v1",
3
- "contractVersion": "1.137.1",
3
+ "contractVersion": "1.138.0",
4
4
  "contract": "contract/host-provisioning-v1.md",
5
5
  "localTargets": [
6
6
  "/local/host/provision/start",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "manifest": "mhome.hub.targets.v1",
3
- "contractVersion": "1.137.1",
3
+ "contractVersion": "1.138.0",
4
4
  "appTargets": [
5
5
  "/app/hub/get",
6
6
  "/app/hub/remove"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "manifest": "mhome.pod.targets.v1",
3
- "contractVersion": "1.137.1",
3
+ "contractVersion": "1.138.0",
4
4
  "contract": "contract/pod-commissioning-v1.md",
5
5
  "localTargets": [
6
6
  "/local/pod/discovery/start",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "manifest": "mhome.app-facade.routing.v1",
3
- "contractVersion": "1.137.1",
3
+ "contractVersion": "1.138.0",
4
4
  "targetPrefix": "/app/",
5
5
  "default": {
6
6
  "execution": "spaceMode"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "manifest": "mhome.messaging.targets.v1",
3
- "contractVersion": "1.137.1",
3
+ "contractVersion": "1.138.0",
4
4
  "requestTargets": [
5
5
  "/app/messaging/provider/list",
6
6
  "/app/messaging/provider-account/list",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mhome/app-facade-protocol",
3
- "version": "1.137.1",
3
+ "version": "1.138.0",
4
4
  "description": "Build-time protocol artifacts for mhome.app-facade",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
package/protocol.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "protocol": "mhome.app-facade",
3
- "contractVersion": "1.137.1",
3
+ "contractVersion": "1.138.0",
4
4
  "manifest": "manifest/app-facade.v1.json",
5
5
  "schemas": {
6
6
  "storage": "schema/storage.v1.schema.json",