@mhome/app-facade-protocol 1.141.0 → 1.142.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/host-management-v1.md +24 -2
- package/contract/host-provisioning-v1.md +94 -37
- package/contract/pod-commissioning-v1.md +62 -2
- package/fixtures/host-provision.completed.json +11 -3
- package/manifest/app-facade.v1.json +1 -1
- package/manifest/authorization.v1.json +1 -1
- package/manifest/host-provision-targets.v1.json +2 -1
- package/manifest/hub-targets.v1.json +1 -1
- package/manifest/pod-targets.v1.json +1 -1
- package/manifest/routing.v1.json +5 -1
- package/manifest/targets.v1.json +1 -1
- package/package.json +1 -1
- package/protocol.json +1 -1
- package/schema/host-provision.v1.schema.json +258 -37
- package/schema/routing.v1.schema.json +4 -0
|
@@ -18,10 +18,18 @@ Business execution follows Space mode, independently of LLM placement:
|
|
|
18
18
|
cloud forwarding. Core obtains cloud-owned directory metadata and user grants
|
|
19
19
|
through the private `/bridge/management/control` endpoint; this endpoint neither
|
|
20
20
|
dispatches Host commands nor impersonates a Client.
|
|
21
|
-
- Cloud Space: cloud executes business through the initiating personal
|
|
22
|
-
Client. No other online App is selected. MCP
|
|
21
|
+
- Cloud Space: cloud executes business through the initiating personal Native
|
|
22
|
+
Client (desktop, Android or iOS). No other online App is selected. MCP and web have no such
|
|
23
23
|
transport and management calls fail if no suitable route exists. List still
|
|
24
24
|
returns registrations with unavailable observations.
|
|
25
|
+
- No Space: `/app/host/metrics` and `/app/host/permissions/get` execute through
|
|
26
|
+
the authenticated initiating Native Client, using the same Facade DTO and
|
|
27
|
+
caller-selected Full/Essential protocol. Only an Admin Host is accepted; a
|
|
28
|
+
Space Host still requires its Space. The Cloud verifies the current socket
|
|
29
|
+
identity directly because no Space presence index exists yet. It never chooses
|
|
30
|
+
another online Client. These two exceptions are declared by
|
|
31
|
+
`routing.v1.json.unspacedCloudTargets`; with a Space, normal Space-mode routing
|
|
32
|
+
applies. MCP has no Native Client execution route.
|
|
25
33
|
|
|
26
34
|
Host mode, ACL and Space ownership remain authoritative. The private bridge is
|
|
27
35
|
bound to its authenticated tenant/Space and rechecks personal User read access;
|
|
@@ -32,6 +40,20 @@ Public signing endpoints remain Client-only and are not Agent/MCP tools.
|
|
|
32
40
|
|
|
33
41
|
The private `/app/host/execute` Client request is a fixed management transport,
|
|
34
42
|
not a capability or public Facade. It accepts no service switch or admin removal.
|
|
43
|
+
Its authenticated Cloud socket, personal User, tenant and explicit `spaceId` must
|
|
44
|
+
match the receiving Client's current membership. UI focus does not select or
|
|
45
|
+
authorize this execution. `inventory` accepts `{}` for a list or `{hostId}` for a
|
|
46
|
+
single target; the Client selects that target before probing devices. `runtime`
|
|
47
|
+
and `permissions` address one explicit Host ID. Private requests never enter the
|
|
48
|
+
WebView event stream. Each exchange remains bound to the initiating login and
|
|
49
|
+
connection attempt; an expired attempt cannot dispatch further work or reply on
|
|
50
|
+
its replacement. A result uses exactly `{value: ...}` or
|
|
51
|
+
`{error: {code, message}}`, keeping business refusal codes intact.
|
|
52
|
+
For an account read, the private request body's `spaceId` is explicitly `null`
|
|
53
|
+
and its envelope has no Space selection. The only admitted forms are `inventory {hostId}`,
|
|
54
|
+
`runtime {hostId,action:"metrics"}` and `permissions {hostId}`. Each receiver
|
|
55
|
+
verifies its current personal user/tenant and the Host's signed Admin mode;
|
|
56
|
+
missing `spaceId`, arbitrary unscoped writes and local Host aliases are rejected.
|
|
35
57
|
A missing route fails; a mutation is never replayed through another transport.
|
|
36
58
|
If a cloud entrypoint cannot reach a local Space's Core, list alone may return
|
|
37
59
|
cloud registrations with unavailable observations and `sourceErrors.hub`.
|
|
@@ -3,9 +3,10 @@
|
|
|
3
3
|
BLE-capable embedded Linux Hosts get Wi-Fi or recover an unfinished first claim
|
|
4
4
|
over BLE from a native Client (desktop/CLI Clientd, Android, iOS). Desktop, Docker
|
|
5
5
|
and Android Hosts use LAN discovery rather than advertising BLE setup.
|
|
6
|
-
Provisioning connects the Host to the LAN
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
Provisioning connects the Host to the LAN. The Native Client retains the BLE
|
|
7
|
+
claim token privately and, after explicit user confirmation, establishes ownership
|
|
8
|
+
through the existing LAN claim protocol. CLI/UI drive this session protocol;
|
|
9
|
+
they never receive the token or compose the claim and Hub setup themselves.
|
|
9
10
|
|
|
10
11
|
The BLE layer is the one pods use (`pod-commissioning-v1.md` sections 2 and 3):
|
|
11
12
|
same service UUID, manufacturer data with device kind `2`, protocomm security 2
|
|
@@ -79,6 +80,7 @@ Fallback characteristic UUIDs: the standard endpoints as for pods, `host-info`
|
|
|
79
80
|
"firmwareVersion": "0.9.0",
|
|
80
81
|
"fingerprint": "<hex SHA-256 of the bootstrap public key>",
|
|
81
82
|
"wifiConfigured": false,
|
|
83
|
+
"authorizationMode": "spaceSelf",
|
|
82
84
|
"onboardingRequired": true,
|
|
83
85
|
"networkOnline": false
|
|
84
86
|
}
|
|
@@ -86,10 +88,26 @@ Fallback characteristic UUIDs: the standard endpoints as for pods, `host-info`
|
|
|
86
88
|
|
|
87
89
|
`productId` is optional. `onboardingRequired` reports whether this Host still
|
|
88
90
|
awaits its first claim and is required. `networkOnline` reports current LAN
|
|
89
|
-
readiness.
|
|
91
|
+
readiness. `authorizationMode` is the persisted installation role, independent
|
|
92
|
+
of upgrades. A securely paired Admin Host with `networkOnline: true`
|
|
90
93
|
and `onboardingRequired: true` can finish without resubmitting Wi-Fi. `finish`
|
|
91
94
|
issues a fresh first-claim token after checking authoritative Host ownership.
|
|
92
95
|
Already claimed Hosts never issue a new first-claim token.
|
|
96
|
+
- `{"op":"identity"}` → `{"hostId":"…","publicKey":["<P-256 x>","<P-256 y>"]}`.
|
|
97
|
+
The separate encrypted record fits the BLE attribute budget. Native retains
|
|
98
|
+
this key and pins the subsequent LAN TLS connection to it before sending any
|
|
99
|
+
claim token, exchange secret or cloud grant.
|
|
100
|
+
- `{"op":"networkTarget"}` reports `user`, `space` (with claimed Space/Tenant),
|
|
101
|
+
`ownHub`, `firstHub` or `unclaimed`, derived from Host authority and the installed Core's
|
|
102
|
+
durable identity. It does not trust Pod profile caches or caller assertions.
|
|
103
|
+
- `{"op":"prepareWifi","mode":"user|space|bootstrap|bootstrapRecovery|ownHub","hub":[…]?}`
|
|
104
|
+
prepares the network policy in the same secure session before `set_config`.
|
|
105
|
+
Space uses the compact exact Hub identity tuple defined in the Pod contract.
|
|
106
|
+
Only an explicit first-Hub enrollment may request bootstrap; an existing Hub
|
|
107
|
+
is exempt from finding a different Hub only when its own Core identity matches
|
|
108
|
+
its Host claim. Ordinary Space re-provisioning obtains current Hub identity
|
|
109
|
+
online. The Host validates its own role/claim and rejects changed targets while
|
|
110
|
+
joining. A new central cannot reuse the preceding central's target or password.
|
|
93
111
|
- `{"op":"finish"}` → `{"ok":true,"claimToken":"…"}`. After a successful
|
|
94
112
|
first-provisioning join, or secure recovery with an already working network,
|
|
95
113
|
the response carries a claim token: 32 random bytes as 43 unpadded base64url
|
|
@@ -123,7 +141,8 @@ most 4 at a time).
|
|
|
123
141
|
|
|
124
142
|
`prov-config` status reports `connected` with the IPv4 address after the Host
|
|
125
143
|
has saved the new profile. The Linux backend first activates a temporary
|
|
126
|
-
profile
|
|
144
|
+
profile, then proves the exact target Hub through that trial interface within
|
|
145
|
+
30 seconds of obtaining an IP for ordinary Space devices. On failure or local cancellation it removes that profile and attempts
|
|
127
146
|
to reactivate the previous one. `connection_failed` may distinguish
|
|
128
147
|
`auth_error` or `network_not_found`. After a failed join the commissioner sends
|
|
129
148
|
`prov-ctrl` reset before the next `set_config`.
|
|
@@ -138,9 +157,10 @@ Candidates come from the shared discovery (`/local/pod/discovery/*`) with
|
|
|
138
157
|
| --- | --- | --- |
|
|
139
158
|
| `/local/host/provision/start` | `{"candidateId"}` | session snapshot |
|
|
140
159
|
| `/local/host/provision/code` | `{"sessionId","code"}` | session snapshot |
|
|
141
|
-
| `/local/host/provision/wifi` | `{"sessionId","ssid","password"?}` | session snapshot |
|
|
160
|
+
| `/local/host/provision/wifi` | `{"sessionId","ssid","password"?,"enrollment"?}` | session snapshot |
|
|
142
161
|
| `/local/host/provision/wifi/scan` | `{"sessionId"}` | session snapshot |
|
|
143
162
|
| `/local/host/provision/status` | `{}` | `{"session": snapshot or null}` |
|
|
163
|
+
| `/local/host/provision/authorize` | `{"sessionId"}` | session snapshot |
|
|
144
164
|
| `/local/host/provision/cancel` | `{"sessionId"}` | session snapshot |
|
|
145
165
|
|
|
146
166
|
Event `/local/host/provision/changed` carries a session snapshot. One session
|
|
@@ -158,37 +178,40 @@ returns the same session; a different session ID is rejected. Cancellation durin
|
|
|
158
178
|
token form a bounded critical section. Leaving the UI does not cancel a session.
|
|
159
179
|
There is no renewal endpoint.
|
|
160
180
|
|
|
161
|
-
Session states
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
`
|
|
190
|
-
`
|
|
191
|
-
|
|
181
|
+
Session states: `connecting` → `awaiting_code` → `securing` → `reading_info`
|
|
182
|
+
→ `awaiting_wifi` → `joining_wifi`. A Host that already has an authoritative
|
|
183
|
+
claim completes here; this only changes its network. An unclaimed Host continues
|
|
184
|
+
through `awaiting_authorization` → `authorizing` → `completed`. User confirmation
|
|
185
|
+
calls `/local/host/provision/authorize`. Failure returns to
|
|
186
|
+
`awaiting_authorization` with `issue_failed`; retry is explicit, never an automatic
|
|
187
|
+
repeat of a write whose response may have been lost. The same paired Host key
|
|
188
|
+
and account remain required. Cancellation during `authorizing` is rejected as
|
|
189
|
+
busy, as it is during `joining_wifi`.
|
|
190
|
+
|
|
191
|
+
Space Hosts require an owner Space and explicit `firstHub` enrollment before
|
|
192
|
+
Wi-Fi is sent. Ordinary Space Hosts must verify the existing exact Hub. Explicit
|
|
193
|
+
first-Hub enrollment reuses the durable Hub setup engine after Host claim; the
|
|
194
|
+
result is accepted only for the same BLE-paired Host key and original Client LAN.
|
|
195
|
+
Admin Hosts require no Space. A combined Pod/Host uses the Pod session instead.
|
|
196
|
+
|
|
197
|
+
The Host first-claim token remains private to Native. It is sent with the existing
|
|
198
|
+
LAN `POST /v1/auth/claim` proof and exchange secret. The Host rejects a missing or
|
|
199
|
+
incorrect token with `HOST_CLAIM_TOKEN_REQUIRED`. Its validity ends at successful
|
|
200
|
+
claim, replacement by another secure setup, or factory reset. Repeating the same
|
|
201
|
+
owner's already committed claim reconciles through the ordinary claim contract.
|
|
202
|
+
There is no Core-proxied first-claim route. Hosts already online without BLE use
|
|
203
|
+
the ordinary direct LAN claim operation.
|
|
204
|
+
|
|
205
|
+
Only `completed` carries `result`: `{hostId,wifiConfigured:true,commissioned:true,
|
|
206
|
+
hubId?}`. `hubId` is present when this operation explicitly established the first
|
|
207
|
+
Hub. `host` and optional reported IPv4 `addresses` remain in the snapshot. No
|
|
208
|
+
public snapshot, event, CLI or UI result contains `claimToken`. Terminal errors
|
|
209
|
+
are `failed` and `timed_out`, both with `error`; cancellation uses `cancelling`
|
|
210
|
+
then `cancelled`. Wrong codes and failed Wi-Fi joins return to their input states.
|
|
211
|
+
The supported errors include `bluetooth_unavailable`, `device_busy`,
|
|
212
|
+
`disconnected`, `code_rejected`, `code_locked`, `wifi_auth_failed`,
|
|
213
|
+
`wifi_not_found`, `wifi_failed`, `lan_unavailable`, `device_mismatch`,
|
|
214
|
+
`issue_failed` and `session_timeout`.
|
|
192
215
|
|
|
193
216
|
The schema is `schema/host-provision.v1.schema.json`.
|
|
194
217
|
|
|
@@ -211,3 +234,37 @@ The schema is `schema/host-provision.v1.schema.json`.
|
|
|
211
234
|
services, forgets saved Wi-Fi on BLE provisioning appliances, erases owners,
|
|
212
235
|
the Host security store and bootstrap key, and returns to first provisioning.
|
|
213
236
|
Machine identity and installed software are retained.
|
|
237
|
+
|
|
238
|
+
## Interrupted first-Hub installation
|
|
239
|
+
|
|
240
|
+
The explicit first-Hub BLE flow records a durable installation intent before
|
|
241
|
+
trying Wi-Fi. Native obtains the securely paired Host identity and calls
|
|
242
|
+
`POST /api/v1/host/first-hub/begin` with `{spaceId, hostId, env, hostPublicKey}`
|
|
243
|
+
under the signed-in Owner. Cloud checks Space ownership and current Hub state,
|
|
244
|
+
returning `{intentId, space: {tenantId, spaceId}}`. The encrypted `prepareWifi`
|
|
245
|
+
bootstrap record carries this object as `firstHub`. It is not a Host claim or
|
|
246
|
+
permission to replace a Hub. Host persists it bound to its own installation key.
|
|
247
|
+
|
|
248
|
+
If Host was claimed to that Space but Core setup was interrupted, the next secure
|
|
249
|
+
`networkTarget` returns `{mode:"firstHub", intentId, spaceId, tenantId}`.
|
|
250
|
+
Native retains this exact Space and gets a fresh online Owner permit with
|
|
251
|
+
`POST /api/v1/host/first-hub/recovery/prepare {spaceId,intentId}`. It sends
|
|
252
|
+
`{op:"prepareWifi",mode:"bootstrapRecovery",firstHub:{intentId,space},authorizationId}`.
|
|
253
|
+
This is a compact private BLE record, not part of the public session snapshot.
|
|
254
|
+
|
|
255
|
+
After trial Wi-Fi obtains an IP, Host signs its current claimed status using the
|
|
256
|
+
permit as `probeId` and calls `/api/v1/host/first-hub/recovery/verify` over its
|
|
257
|
+
configured trusted HTTPS endpoint, bound to the trial Wi-Fi interface. Cloud
|
|
258
|
+
checks the Host signature and key, original Space, current Owner, five-minute
|
|
259
|
+
permit and absence of another Host's Hub/operation. The cloud permit determines
|
|
260
|
+
freshness; a rebooted Host clock does not extend it. Verification shares the
|
|
261
|
+
30-second post-IP trial deadline. Failure discards the trial and restores the
|
|
262
|
+
previous network; the Host's original claim is retained.
|
|
263
|
+
|
|
264
|
+
A successful recovery enters `awaiting_authorization`, then the existing Hub
|
|
265
|
+
setup engine continues for the same paired Host. It does not submit another Host
|
|
266
|
+
claim. Hub completion closes the cloud intent generation before publication;
|
|
267
|
+
removing that Hub later does not revive the old intent. A local Core identity
|
|
268
|
+
already durably installed uses `ownHub` network change instead. Neither path
|
|
269
|
+
changes the installation role. Reset removes this pending intent with identity
|
|
270
|
+
and ownership, while preserving the installation role.
|
|
@@ -134,6 +134,20 @@ confirming connectivity with `prov-config` status. Inside a Wi-Fi change window
|
|
|
134
134
|
the response also carries `"mode":"reprovision"` and `wifiConfigured` is false
|
|
135
135
|
(section 4).
|
|
136
136
|
|
|
137
|
+
BLE `pod-info` is the network-phase DTO, not the LAN identity/receipt DTO above.
|
|
138
|
+
It carries `protocol`, `env`, `deviceId`, `model`, `firmwareVersion`,
|
|
139
|
+
`publicKey: [x, y]`, `wifiConfigured`, `state`, `dependentHost`, and optional
|
|
140
|
+
`mode`/`error: {code}`. It never includes `deviceBinding`, `podId`, `clientMode`
|
|
141
|
+
or a credential. `publicKey` is the same ES256 P-256 key as LAN: derive
|
|
142
|
+
`fingerprint = hex(SHA256(0x04 || x || y))` and `keyId = "p256:" + fingerprint`.
|
|
143
|
+
Coordinates are unpadded base64url. The complete JSON must fit 480 bytes,
|
|
144
|
+
leaving room for the authenticated record in one 512-byte ATT value.
|
|
145
|
+
`dependentHost` identifies a combined product eligible for explicit first-Hub
|
|
146
|
+
network setup; it is not an ownership grant. After the LAN handoff, the Client
|
|
147
|
+
requires the exact same key, device ID, environment and dependent-Host role,
|
|
148
|
+
then verifies the complete product binding and Host proof before authorization.
|
|
149
|
+
No fallback accepts the former full LAN DTO on BLE.
|
|
150
|
+
|
|
137
151
|
`pod-credential` requests:
|
|
138
152
|
|
|
139
153
|
- `{"op":"deliver","clientMode":"user","podId","loginGrant","spaceId","cloudApi","cloudWs"}` →
|
|
@@ -357,8 +371,13 @@ trial and rejects a credential from a different Hub.
|
|
|
357
371
|
embedded dependent Host. The selected Space must have no existing Hub or
|
|
358
372
|
pending Hub transition. For BLE, include the flag in `enrollment` before sending
|
|
359
373
|
Wi-Fi and repeat the same intent during authorization. An already-networked
|
|
360
|
-
product supplies its intent during authorization. A
|
|
361
|
-
|
|
374
|
+
product supplies its intent during authorization. A retry may resume an existing
|
|
375
|
+
setup or published Hub only when its Host ID matches the securely paired
|
|
376
|
+
product. Removal, revocation, or another Host's operation blocks that retry.
|
|
377
|
+
The existing Hub setup engine owns continuation; the Client adopts the newly
|
|
378
|
+
published Hub only after checking its Host key, account, explicit Space and
|
|
379
|
+
unchanged local network. UI focus changes do not change this destination.
|
|
380
|
+
A standalone Pod rejects first Hub setup.
|
|
362
381
|
|
|
363
382
|
Discovery is shared by every MeowLink device kind: each candidate carries
|
|
364
383
|
`kind` (`pod` or `host`). `/local/pod/commission/start` accepts only `pod`
|
|
@@ -394,6 +413,29 @@ interface. On failure it discards the attempted network. A pod that reports
|
|
|
394
413
|
example `wifi_hub_unverified` or `storage_failed`) in `detail`. UIs show such a session as changing the
|
|
395
414
|
pod's Wi-Fi rather than adding a pod.
|
|
396
415
|
|
|
416
|
+
For a combined Linux product (`dependentHost: true`), the Native Client is the
|
|
417
|
+
single Security 2 pairing authority on both BLE and LAN. The Host peripheral
|
|
418
|
+
forwards encrypted records over the OS-private Pod socket; the Host owns the
|
|
419
|
+
Wi-Fi trial, verification and rollback. This is not a BLE discovery relay.
|
|
420
|
+
A secured `pod-info` `{"op":"networkTarget"}` read before a Wi-Fi trial returns
|
|
421
|
+
`{"mode":"space","spaceId":"...","tenantId":"..."}` for an ordinary Space
|
|
422
|
+
product, `{"mode":"unclaimed"}` before Host binding, or `{"mode":"ownHub"}` when its installed Core durable identity matches its
|
|
423
|
+
local Host claim. The ordinary product requires the signed-in owner to obtain the
|
|
424
|
+
current Hub identity online and send the `space` preparation record above.
|
|
425
|
+
An own-Hub product accepts `{"op":"prepareWifi","mode":"ownHub"}` only after
|
|
426
|
+
checking the installed Core identity against its local Host claim. It
|
|
427
|
+
changes network without trying to prove LAN membership against itself. Both
|
|
428
|
+
paths retain authorization and issue no new Pod credential.
|
|
429
|
+
The `commissioned` response in this Wi-Fi-only mode confirms the saved network;
|
|
430
|
+
it does not restore a revoked credential. A Linux product that already needs
|
|
431
|
+
reauthorization keeps that state and its existing binding after a network change.
|
|
432
|
+
|
|
433
|
+
The Linux trial binds discovery and the pinned connection to the new Wi-Fi
|
|
434
|
+
interface. It saves the NetworkManager profile only after Hub proof succeeds;
|
|
435
|
+
a failure or cancellation discards the trial and restores the previous profile.
|
|
436
|
+
Its total session polling budget also covers bounded network activation and
|
|
437
|
+
rollback; the Hub proof budget remains 30 seconds after obtaining an IP.
|
|
438
|
+
|
|
397
439
|
Session states, in order: `connecting`, `awaiting_code`, `securing`,
|
|
398
440
|
`reading_info`, `awaiting_wifi`, `joining_wifi`, `discovering_lan`,
|
|
399
441
|
`connecting_lan`, `awaiting_authorization`,
|
|
@@ -526,3 +568,21 @@ An older registration for the same device cannot complete a different attempt.
|
|
|
526
568
|
active local credential, returning `clientMode: "space"`; this read requires Space
|
|
527
569
|
MANAGE. A cloud Space has no such local enrollment and returns `registered:false`.
|
|
528
570
|
Both checks are read-only completion hooks. They do not issue or renew credentials.
|
|
571
|
+
|
|
572
|
+
### Interrupted combined first Hub
|
|
573
|
+
|
|
574
|
+
A combined product uses the same durable first-Hub network intent and cloud
|
|
575
|
+
recovery permit as [Host provisioning](host-provisioning-v1.md#interrupted-first-hub-installation).
|
|
576
|
+
The secured `pod-info {op:"hostIdentity"}` returns the local Host's
|
|
577
|
+
`{hostId,publicKey:[x,y]}` through OS-private IPC while a network window is open.
|
|
578
|
+
The commissioner retains this identity across BLE-to-LAN handoff and checks it
|
|
579
|
+
against the product's signed binding before any claim or credential delivery.
|
|
580
|
+
The BLE record contains only the public identity and compact intent/permit;
|
|
581
|
+
full Host claim messages and Pod credentials remain on the LAN Security 2 channel.
|
|
582
|
+
|
|
583
|
+
If the Host is already bound and its first-Hub setup is pending, `networkTarget`
|
|
584
|
+
returns `firstHub` with the original intent and Space. Native obtains an online
|
|
585
|
+
Owner permit and submits `bootstrapRecovery`. If no Pod profile has been saved,
|
|
586
|
+
Wi-Fi success continues the defined LAN binding/Hub setup/Pod credential protocol.
|
|
587
|
+
An existing Pod profile keeps the Wi-Fi-only reprovision flow. Neither case
|
|
588
|
+
changes Space or clears the current Host authorization to bypass a failed check.
|
|
@@ -20,8 +20,16 @@
|
|
|
20
20
|
"productId": "camera",
|
|
21
21
|
"firmwareVersion": "0.9.0",
|
|
22
22
|
"fingerprint": "5e6f7a8b0c1d2e3f405162738495a6b7c8d9eaf0123456789abcdef012345678",
|
|
23
|
-
"wifiConfigured": false
|
|
23
|
+
"wifiConfigured": false,
|
|
24
|
+
"authorizationMode": "admin",
|
|
25
|
+
"onboardingRequired": true
|
|
24
26
|
},
|
|
25
|
-
"addresses": [
|
|
26
|
-
|
|
27
|
+
"addresses": [
|
|
28
|
+
"192.168.1.42"
|
|
29
|
+
],
|
|
30
|
+
"result": {
|
|
31
|
+
"hostId": "host-0f3c9a",
|
|
32
|
+
"wifiConfigured": true,
|
|
33
|
+
"commissioned": true
|
|
34
|
+
}
|
|
27
35
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"manifest": "mhome.host-provision.targets.v1",
|
|
3
|
-
"contractVersion": "1.
|
|
3
|
+
"contractVersion": "1.142.0",
|
|
4
4
|
"contract": "contract/host-provisioning-v1.md",
|
|
5
5
|
"localTargets": [
|
|
6
6
|
"/local/host/provision/start",
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
"/local/host/provision/wifi",
|
|
9
9
|
"/local/host/provision/wifi/scan",
|
|
10
10
|
"/local/host/provision/status",
|
|
11
|
+
"/local/host/provision/authorize",
|
|
11
12
|
"/local/host/provision/cancel"
|
|
12
13
|
],
|
|
13
14
|
"eventTargets": [
|
package/manifest/routing.v1.json
CHANGED
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"manifest": "mhome.app-facade.routing.v1",
|
|
3
|
-
"contractVersion": "1.
|
|
3
|
+
"contractVersion": "1.142.0",
|
|
4
4
|
"targetPrefix": "/app/",
|
|
5
5
|
"default": {
|
|
6
6
|
"execution": "spaceMode"
|
|
7
7
|
},
|
|
8
8
|
"matching": "exactBeforePrefix",
|
|
9
9
|
"placementJsonPointer": "/input/placement",
|
|
10
|
+
"unspacedCloudTargets": [
|
|
11
|
+
"/app/host/metrics",
|
|
12
|
+
"/app/host/permissions/get"
|
|
13
|
+
],
|
|
10
14
|
"rules": {
|
|
11
15
|
"cloudPrefixes": [
|
|
12
16
|
"/app/space/",
|
package/manifest/targets.v1.json
CHANGED
package/package.json
CHANGED
package/protocol.json
CHANGED
|
@@ -4,10 +4,22 @@
|
|
|
4
4
|
"title": "Native-client Host provisioning session snapshot",
|
|
5
5
|
"type": "object",
|
|
6
6
|
"additionalProperties": false,
|
|
7
|
-
"required": [
|
|
7
|
+
"required": [
|
|
8
|
+
"sessionId",
|
|
9
|
+
"revision",
|
|
10
|
+
"state",
|
|
11
|
+
"candidate",
|
|
12
|
+
"expiresAtMs"
|
|
13
|
+
],
|
|
8
14
|
"properties": {
|
|
9
|
-
"sessionId": {
|
|
10
|
-
|
|
15
|
+
"sessionId": {
|
|
16
|
+
"type": "string",
|
|
17
|
+
"minLength": 1
|
|
18
|
+
},
|
|
19
|
+
"revision": {
|
|
20
|
+
"type": "integer",
|
|
21
|
+
"minimum": 0
|
|
22
|
+
},
|
|
11
23
|
"state": {
|
|
12
24
|
"enum": [
|
|
13
25
|
"connecting",
|
|
@@ -16,6 +28,8 @@
|
|
|
16
28
|
"reading_info",
|
|
17
29
|
"awaiting_wifi",
|
|
18
30
|
"joining_wifi",
|
|
31
|
+
"awaiting_authorization",
|
|
32
|
+
"authorizing",
|
|
19
33
|
"cancelling",
|
|
20
34
|
"cancelled",
|
|
21
35
|
"completed",
|
|
@@ -23,19 +37,58 @@
|
|
|
23
37
|
"timed_out"
|
|
24
38
|
]
|
|
25
39
|
},
|
|
26
|
-
"candidate": {
|
|
27
|
-
|
|
40
|
+
"candidate": {
|
|
41
|
+
"$ref": "pod-discovery.v1.schema.json#/$defs/candidate"
|
|
42
|
+
},
|
|
43
|
+
"expiresAtMs": {
|
|
44
|
+
"type": "integer",
|
|
45
|
+
"minimum": 0
|
|
46
|
+
},
|
|
28
47
|
"host": {
|
|
29
48
|
"type": "object",
|
|
30
49
|
"additionalProperties": false,
|
|
31
|
-
"required": [
|
|
50
|
+
"required": [
|
|
51
|
+
"hostId",
|
|
52
|
+
"name",
|
|
53
|
+
"firmwareVersion",
|
|
54
|
+
"fingerprint",
|
|
55
|
+
"wifiConfigured",
|
|
56
|
+
"authorizationMode",
|
|
57
|
+
"onboardingRequired"
|
|
58
|
+
],
|
|
32
59
|
"properties": {
|
|
33
|
-
"hostId": {
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
"
|
|
38
|
-
|
|
60
|
+
"hostId": {
|
|
61
|
+
"type": "string",
|
|
62
|
+
"minLength": 1
|
|
63
|
+
},
|
|
64
|
+
"name": {
|
|
65
|
+
"type": "string",
|
|
66
|
+
"minLength": 1
|
|
67
|
+
},
|
|
68
|
+
"productId": {
|
|
69
|
+
"type": "string"
|
|
70
|
+
},
|
|
71
|
+
"firmwareVersion": {
|
|
72
|
+
"type": "string",
|
|
73
|
+
"minLength": 1
|
|
74
|
+
},
|
|
75
|
+
"fingerprint": {
|
|
76
|
+
"type": "string",
|
|
77
|
+
"minLength": 1
|
|
78
|
+
},
|
|
79
|
+
"wifiConfigured": {
|
|
80
|
+
"type": "boolean"
|
|
81
|
+
},
|
|
82
|
+
"authorizationMode": {
|
|
83
|
+
"enum": [
|
|
84
|
+
"admin",
|
|
85
|
+
"spaceSelf",
|
|
86
|
+
"spaceDep"
|
|
87
|
+
]
|
|
88
|
+
},
|
|
89
|
+
"onboardingRequired": {
|
|
90
|
+
"type": "boolean"
|
|
91
|
+
}
|
|
39
92
|
}
|
|
40
93
|
},
|
|
41
94
|
"networks": {
|
|
@@ -43,28 +96,46 @@
|
|
|
43
96
|
"items": {
|
|
44
97
|
"type": "object",
|
|
45
98
|
"additionalProperties": false,
|
|
46
|
-
"required": [
|
|
99
|
+
"required": [
|
|
100
|
+
"ssid",
|
|
101
|
+
"rssi",
|
|
102
|
+
"secured"
|
|
103
|
+
],
|
|
47
104
|
"properties": {
|
|
48
|
-
"ssid": {
|
|
49
|
-
|
|
50
|
-
|
|
105
|
+
"ssid": {
|
|
106
|
+
"type": "string",
|
|
107
|
+
"minLength": 1
|
|
108
|
+
},
|
|
109
|
+
"rssi": {
|
|
110
|
+
"type": "integer"
|
|
111
|
+
},
|
|
112
|
+
"secured": {
|
|
113
|
+
"type": "boolean"
|
|
114
|
+
}
|
|
51
115
|
}
|
|
52
116
|
}
|
|
53
117
|
},
|
|
118
|
+
"authorization": {
|
|
119
|
+
"$ref": "pod-commission.v1.schema.json#/properties/authorization"
|
|
120
|
+
},
|
|
121
|
+
"enrollment": {
|
|
122
|
+
"$ref": "pod-commission.v1.schema.json#/properties/enrollment"
|
|
123
|
+
},
|
|
54
124
|
"addresses": {
|
|
55
125
|
"description": "IPv4 LAN addresses reported by the Host; may be empty",
|
|
56
126
|
"type": "array",
|
|
57
|
-
"items": {
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
"type": "string",
|
|
62
|
-
"pattern": "^[A-Za-z0-9_-]{43}$"
|
|
127
|
+
"items": {
|
|
128
|
+
"type": "string",
|
|
129
|
+
"format": "ipv4"
|
|
130
|
+
}
|
|
63
131
|
},
|
|
64
132
|
"error": {
|
|
65
133
|
"type": "object",
|
|
66
134
|
"additionalProperties": false,
|
|
67
|
-
"required": [
|
|
135
|
+
"required": [
|
|
136
|
+
"code",
|
|
137
|
+
"message"
|
|
138
|
+
],
|
|
68
139
|
"properties": {
|
|
69
140
|
"code": {
|
|
70
141
|
"enum": [
|
|
@@ -76,48 +147,198 @@
|
|
|
76
147
|
"wifi_auth_failed",
|
|
77
148
|
"wifi_not_found",
|
|
78
149
|
"wifi_failed",
|
|
79
|
-
"
|
|
150
|
+
"lan_unavailable",
|
|
151
|
+
"device_mismatch",
|
|
152
|
+
"session_timeout",
|
|
153
|
+
"issue_failed"
|
|
80
154
|
]
|
|
81
155
|
},
|
|
82
|
-
"message": {
|
|
83
|
-
|
|
156
|
+
"message": {
|
|
157
|
+
"type": "string"
|
|
158
|
+
},
|
|
159
|
+
"detail": {
|
|
160
|
+
"type": "string"
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
},
|
|
164
|
+
"result": {
|
|
165
|
+
"type": "object",
|
|
166
|
+
"additionalProperties": false,
|
|
167
|
+
"required": [
|
|
168
|
+
"hostId",
|
|
169
|
+
"wifiConfigured",
|
|
170
|
+
"commissioned"
|
|
171
|
+
],
|
|
172
|
+
"properties": {
|
|
173
|
+
"hostId": {
|
|
174
|
+
"type": "string",
|
|
175
|
+
"minLength": 1
|
|
176
|
+
},
|
|
177
|
+
"wifiConfigured": {
|
|
178
|
+
"const": true
|
|
179
|
+
},
|
|
180
|
+
"commissioned": {
|
|
181
|
+
"const": true
|
|
182
|
+
},
|
|
183
|
+
"hubId": {
|
|
184
|
+
"type": "string",
|
|
185
|
+
"minLength": 1
|
|
186
|
+
}
|
|
84
187
|
}
|
|
85
188
|
}
|
|
86
189
|
},
|
|
87
190
|
"allOf": [
|
|
88
191
|
{
|
|
89
|
-
"if": {
|
|
90
|
-
|
|
192
|
+
"if": {
|
|
193
|
+
"properties": {
|
|
194
|
+
"state": {
|
|
195
|
+
"enum": [
|
|
196
|
+
"failed",
|
|
197
|
+
"timed_out"
|
|
198
|
+
]
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
},
|
|
202
|
+
"then": {
|
|
203
|
+
"properties": {
|
|
204
|
+
"error": {}
|
|
205
|
+
},
|
|
206
|
+
"required": [
|
|
207
|
+
"error"
|
|
208
|
+
]
|
|
209
|
+
}
|
|
91
210
|
},
|
|
92
211
|
{
|
|
93
212
|
"if": {
|
|
94
213
|
"properties": {
|
|
95
|
-
"state": {
|
|
214
|
+
"state": {
|
|
215
|
+
"not": {
|
|
216
|
+
"enum": [
|
|
217
|
+
"failed",
|
|
218
|
+
"timed_out",
|
|
219
|
+
"awaiting_code",
|
|
220
|
+
"awaiting_wifi",
|
|
221
|
+
"awaiting_authorization"
|
|
222
|
+
]
|
|
223
|
+
}
|
|
224
|
+
}
|
|
96
225
|
}
|
|
97
226
|
},
|
|
98
|
-
"then": {
|
|
227
|
+
"then": {
|
|
228
|
+
"not": {
|
|
229
|
+
"properties": {
|
|
230
|
+
"error": {}
|
|
231
|
+
},
|
|
232
|
+
"required": [
|
|
233
|
+
"error"
|
|
234
|
+
]
|
|
235
|
+
}
|
|
236
|
+
}
|
|
99
237
|
},
|
|
100
238
|
{
|
|
101
|
-
"if": {
|
|
102
|
-
|
|
239
|
+
"if": {
|
|
240
|
+
"properties": {
|
|
241
|
+
"state": {
|
|
242
|
+
"const": "awaiting_code"
|
|
243
|
+
}
|
|
244
|
+
},
|
|
245
|
+
"required": [
|
|
246
|
+
"error"
|
|
247
|
+
]
|
|
248
|
+
},
|
|
249
|
+
"then": {
|
|
250
|
+
"properties": {
|
|
251
|
+
"error": {
|
|
252
|
+
"type": "object",
|
|
253
|
+
"properties": {
|
|
254
|
+
"code": {
|
|
255
|
+
"const": "code_rejected"
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
}
|
|
103
261
|
},
|
|
104
262
|
{
|
|
105
|
-
"if": {
|
|
263
|
+
"if": {
|
|
264
|
+
"properties": {
|
|
265
|
+
"state": {
|
|
266
|
+
"const": "awaiting_wifi"
|
|
267
|
+
}
|
|
268
|
+
},
|
|
269
|
+
"required": [
|
|
270
|
+
"error"
|
|
271
|
+
]
|
|
272
|
+
},
|
|
106
273
|
"then": {
|
|
107
274
|
"properties": {
|
|
108
275
|
"error": {
|
|
109
276
|
"type": "object",
|
|
110
277
|
"properties": {
|
|
111
|
-
"code": {
|
|
278
|
+
"code": {
|
|
279
|
+
"enum": [
|
|
280
|
+
"wifi_auth_failed",
|
|
281
|
+
"wifi_not_found",
|
|
282
|
+
"wifi_failed"
|
|
283
|
+
]
|
|
284
|
+
}
|
|
112
285
|
}
|
|
113
286
|
}
|
|
114
287
|
}
|
|
115
288
|
}
|
|
116
289
|
},
|
|
117
290
|
{
|
|
118
|
-
"if": {
|
|
119
|
-
|
|
120
|
-
|
|
291
|
+
"if": {
|
|
292
|
+
"properties": {
|
|
293
|
+
"state": {
|
|
294
|
+
"const": "completed"
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
},
|
|
298
|
+
"then": {
|
|
299
|
+
"properties": {
|
|
300
|
+
"host": {},
|
|
301
|
+
"result": {}
|
|
302
|
+
},
|
|
303
|
+
"required": [
|
|
304
|
+
"host",
|
|
305
|
+
"result"
|
|
306
|
+
]
|
|
307
|
+
},
|
|
308
|
+
"else": {
|
|
309
|
+
"not": {
|
|
310
|
+
"properties": {
|
|
311
|
+
"result": {}
|
|
312
|
+
},
|
|
313
|
+
"required": [
|
|
314
|
+
"result"
|
|
315
|
+
]
|
|
316
|
+
}
|
|
317
|
+
}
|
|
318
|
+
},
|
|
319
|
+
{
|
|
320
|
+
"if": {
|
|
321
|
+
"properties": {
|
|
322
|
+
"state": {
|
|
323
|
+
"const": "awaiting_authorization"
|
|
324
|
+
}
|
|
325
|
+
},
|
|
326
|
+
"required": [
|
|
327
|
+
"error"
|
|
328
|
+
]
|
|
329
|
+
},
|
|
330
|
+
"then": {
|
|
331
|
+
"properties": {
|
|
332
|
+
"error": {
|
|
333
|
+
"type": "object",
|
|
334
|
+
"properties": {
|
|
335
|
+
"code": {
|
|
336
|
+
"const": "issue_failed"
|
|
337
|
+
}
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
}
|
|
341
|
+
}
|
|
121
342
|
}
|
|
122
343
|
]
|
|
123
344
|
}
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
"default",
|
|
12
12
|
"matching",
|
|
13
13
|
"placementJsonPointer",
|
|
14
|
+
"unspacedCloudTargets",
|
|
14
15
|
"rules"
|
|
15
16
|
],
|
|
16
17
|
"properties": {
|
|
@@ -42,6 +43,9 @@
|
|
|
42
43
|
"placementJsonPointer": {
|
|
43
44
|
"const": "/input/placement"
|
|
44
45
|
},
|
|
46
|
+
"unspacedCloudTargets": {
|
|
47
|
+
"$ref": "#/$defs/targetList"
|
|
48
|
+
},
|
|
45
49
|
"rules": {
|
|
46
50
|
"type": "object",
|
|
47
51
|
"additionalProperties": false,
|