@mhome/app-facade-protocol 1.84.1 → 1.85.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.
@@ -75,11 +75,17 @@ Fallback characteristic UUIDs: the standard endpoints as for pods, `host-info`
75
75
  "productId": "camera",
76
76
  "firmwareVersion": "0.9.0",
77
77
  "fingerprint": "<hex SHA-256 of the bootstrap public key>",
78
- "wifiConfigured": false
78
+ "wifiConfigured": false,
79
+ "onboardingRequired": true,
80
+ "networkOnline": false
79
81
  }
80
82
  ```
81
83
 
82
- `productId` is optional.
84
+ `productId` is optional. `onboardingRequired` reports whether this Host still
85
+ awaits its first claim. `networkOnline` reports current LAN readiness. Both
86
+ are optional for older Hosts. A securely paired Host with `networkOnline: true`
87
+ and `onboardingRequired: true` can finish without resubmitting Wi-Fi. `finish` issues a fresh first-claim token after checking authoritative
88
+ Host ownership. Already claimed Hosts never issue a new first-claim token.
83
89
  - `{"op":"finish"}` → `{"ok":true,"claimToken":"…"}`. After a successful join
84
90
  during first provisioning the response carries the claim token: 32 random
85
91
  bytes as 43 unpadded base64url characters. It is created when the join
@@ -120,17 +126,26 @@ Candidates come from the shared discovery (`/local/pod/discovery/*`) with
120
126
  | `/local/host/provision/wifi` | `{"sessionId","ssid","password"?}` | session snapshot |
121
127
  | `/local/host/provision/wifi/scan` | `{"sessionId"}` | session snapshot |
122
128
  | `/local/host/provision/status` | `{}` | `{"session": snapshot or null}` |
129
+ | `/local/host/provision/cancel` | `{"sessionId"}` | session snapshot |
123
130
 
124
131
  Event `/local/host/provision/changed` carries a session snapshot. One session
125
132
  per native Client, and none while a pod session is active; discovery scanning
126
133
  pauses during either. Rejected requests use the error envelope and the stable
127
134
  `details.reason` values of `pod-commissioning-v1.md` section 7. The session is
128
- owned by the native core until success, failure or the session deadline.
129
- There is no cancellation or renewal endpoint; leaving the UI does not end it.
135
+ owned by the native core until success, failure or the session deadline. Host
136
+ setup is bound to the signed-in native account context, including before a Space
137
+ exists. An account change retires the session and its claim token; status and
138
+ queued events cannot transfer an old handoff to the new login.
139
+ Cancellation is explicit. It transitions through `cancelling` and reaches
140
+ `cancelled` only after the link and radio are released. Repeated cancellation
141
+ returns the same session; a different session ID is rejected. Cancellation during
142
+ `joining_wifi` is rejected as busy: applying Wi-Fi and handing off the first-claim
143
+ token form a bounded critical section. Leaving the UI does not cancel a session.
144
+ There is no renewal endpoint.
130
145
 
131
146
  Session states, in order: `connecting`, `awaiting_code`, `securing`,
132
147
  `reading_info`, `awaiting_wifi`, `joining_wifi`, `completed`; terminal `failed`,
133
- `timed_out`. `completed` carries `host`, the reported `addresses`
148
+ `timed_out`, `cancelled`; transitional `cancelling`. `completed` carries `host`, the reported `addresses`
134
149
  (IPv4 only, possibly empty) and `claimToken` from the `finish` response; the
135
150
  commissioner sends `finish` (up to 3 times while the secure session lasts)
136
151
  before reporting it. `claimToken` is absent when `finish` could not be
@@ -158,6 +173,10 @@ The schema is `schema/host-provision.v1.schema.json`.
158
173
  ## 5. Host-side entry points
159
174
 
160
175
  - First provisioning starts BLE at boot when the Host has no known network.
176
+ BLE-capable Hosts whose authoritative local claim is still absent also restore
177
+ setup after restart, keeping saved Wi-Fi. Network readiness is not ownership.
178
+ An existing local claim, including one awaiting cloud confirmation, must never
179
+ reopen first-claim authority. An unreadable ownership store refuses recovery.
161
180
  - Re-provision window: opened from the Host's local interface (display settings
162
181
  or `meowhostd provision open`). Mutating local provisioning commands (`open`,
163
182
  `close`, `factory-reset`) require root or membership in the `meow-admin`
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "manifest": "mhome.app-facade.v1",
3
- "contractVersion": "1.84.1",
3
+ "contractVersion": "1.85.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.84.1",
2
+ "contractVersion": "1.85.0",
3
3
  "operations": {
4
4
  "/app/agent/context/get": "spaceRead",
5
5
  "/app/agent/credit/usage": "spaceRead",
@@ -1,13 +1,14 @@
1
1
  {
2
2
  "manifest": "mhome.host-provision.targets.v1",
3
- "contractVersion": "1.84.1",
3
+ "contractVersion": "1.85.0",
4
4
  "contract": "contract/host-provisioning-v1.md",
5
5
  "localTargets": [
6
6
  "/local/host/provision/start",
7
7
  "/local/host/provision/code",
8
8
  "/local/host/provision/wifi",
9
9
  "/local/host/provision/wifi/scan",
10
- "/local/host/provision/status"
10
+ "/local/host/provision/status",
11
+ "/local/host/provision/cancel"
11
12
  ],
12
13
  "eventTargets": [
13
14
  "/local/host/provision/changed"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "manifest": "mhome.hub.targets.v1",
3
- "contractVersion": "1.84.1",
3
+ "contractVersion": "1.85.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.84.1",
3
+ "contractVersion": "1.85.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.84.1",
3
+ "contractVersion": "1.85.0",
4
4
  "targetPrefix": "/app/",
5
5
  "default": {
6
6
  "execution": "scopeMode"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "manifest": "mhome.messaging.targets.v1",
3
- "contractVersion": "1.84.1",
3
+ "contractVersion": "1.85.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.84.1",
3
+ "version": "1.85.0",
4
4
  "description": "Build-time protocol artifacts for mhome.app-facade",
5
5
  "license": "MIT",
6
6
  "repository": {
package/protocol.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "protocol": "mhome.app-facade",
3
- "contractVersion": "1.84.1",
3
+ "contractVersion": "1.85.0",
4
4
  "manifest": "manifest/app-facade.v1.json",
5
5
  "schemas": {
6
6
  "pluginInstall": "schema/plugin-install.v1.schema.json",
@@ -16,6 +16,8 @@
16
16
  "reading_info",
17
17
  "awaiting_wifi",
18
18
  "joining_wifi",
19
+ "cancelling",
20
+ "cancelled",
19
21
  "completed",
20
22
  "failed",
21
23
  "timed_out"