@mhome/app-facade-protocol 1.139.0 → 1.141.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.
@@ -324,7 +324,7 @@ never show these values or `message` verbatim.
324
324
  | `/local/pod/commission/code` | `{"sessionId","code"}` | session snapshot |
325
325
  | `/local/pod/commission/wifi` | `{"sessionId","ssid","password"?,"enrollment"?}` | session snapshot |
326
326
  | `/local/pod/commission/wifi/scan` | `{"sessionId"}` | session snapshot |
327
- | `/local/pod/commission/authorize` | `{"sessionId","spaceId"}` | session snapshot |
327
+ | `/local/pod/commission/authorize` | `{"sessionId","spaceId","clientMode","firstHub"?}` | session snapshot |
328
328
  | `/local/pod/commission/status` | `{}` | `{"session": snapshot or null}` |
329
329
  | `/local/pod/bluetooth/settings` | `{}` | `{"opened"}` |
330
330
 
@@ -339,7 +339,7 @@ not request Bluetooth permission. BLE discovery uses the current Client's radio.
339
339
  Snapshots may contain both transports when several callers hold leases. A running
340
340
  Pod setup may continue LAN browsing to complete a handoff.
341
341
 
342
- Initial BLE Wi-Fi setup requires `enrollment: {spaceId, clientMode}`. An
342
+ Initial BLE Wi-Fi setup requires `enrollment: {spaceId, clientMode, firstHub?}`. An
343
343
  already-bound Pod changing Wi-Fi uses the stored authorization and omits it.
344
344
  An already-networked Pod selects its authorization in the LAN session.
345
345
 
@@ -353,9 +353,12 @@ only after receiving a setup target or when in its authorized reprovision
353
353
  window. It verifies a selected Hub from the new Wi-Fi before committing the
354
354
  network. The Client later authorizes the exact enrollment selected before the
355
355
  trial and rejects a credential from a different Hub.
356
- `bootstrap` is reserved for a verified product with an embedded dependent Host
357
- when the selected Space has no existing Hub or pending Hub transition. A
358
- standalone Pod rejects that mode.
356
+ `bootstrap` requires explicit `firstHub: true` and a verified product with an
357
+ embedded dependent Host. The selected Space must have no existing Hub or
358
+ pending Hub transition. For BLE, include the flag in `enrollment` before sending
359
+ Wi-Fi and repeat the same intent during authorization. An already-networked
360
+ product supplies its intent during authorization. A standalone Pod rejects
361
+ first Hub setup.
359
362
 
360
363
  Discovery is shared by every MeowLink device kind: each candidate carries
361
364
  `kind` (`pod` or `host`). `/local/pod/commission/start` accepts only `pod`
@@ -20,6 +20,8 @@ Every row contains `registrationId`, `clientMode` (`user` or `space`), `register
20
20
  `spaceId` and `appClientId`. Personal rows contain the saved `name`, `deviceId`,
21
21
  `model`, `platform`, `firmwareVersion`, `issuedAt`, and `activatedAt`.
22
22
  No tokens, enrollment grants, credential IDs or private keys are returned.
23
+ `observedAtMs`, `issuedAt`, and `activatedAt` are Unix milliseconds in Full.
24
+ Essential renders them in the authorized display time zone.
23
25
 
24
26
  Connection is an observation in the indicated Space, not global power state.
25
27
  Personal registration IDs are keyed by User and device public-key fingerprint;
@@ -1,4 +1,4 @@
1
- # Native Wave admission
1
+ # Wave authorization management
2
2
 
3
3
  These Hub-routed App Facades require current-Space Manage access and an active
4
4
  local Hub. They do not make Wave devices Hosts, Nodes or Plugins. No device URL,
@@ -13,11 +13,9 @@ Space/Hub selector, grant, certificate or private key is an input/output.
13
13
  Results are untrusted location hints, scoped to this caller, Space and Hub
14
14
  generation and transport, expiring after two minutes. They never grant operation
15
15
  authority.
16
- - `/app/wave/pair`: `{candidateId,pin?}` -> AdmissionResult below. This is a direct
17
- authenticated App interaction; Agent/MCP/cloud delegation cannot submit PINs.
18
- PIN6 is required when the selected device requires it. Omitting it is allowed
19
- only for an explicitly opened initial local-claim window. No fallback occurs.
20
- Retry reconciles an existing candidate; an uncertain result never rotates a key.
16
+ - `/app/wave/pair` is retired. Core rejects it with guidance to select the
17
+ Integration and use `/app/integration/connect`. Its constant/input DTO remain
18
+ readable for older clients; this route cannot enroll a device.
21
19
  - `/app/wave/list`: `{}` -> `{bindings:[{deviceId,grantState}]}`. States are
22
20
  `candidate` or `committed`; this is authorization bookkeeping, not Device/Twin
23
21
  inventory, online state or evidence that a candidate committed on the device.
@@ -33,6 +31,33 @@ fails. A later refresh uses the existing grant, without consuming another slot.
33
31
  Missing/uninstalled or incompatible contracts never install code automatically.
34
32
  Normal Device/capability APIs own subsequent observations, control and subscriptions.
35
33
 
34
+ Standard onboarding uses `/app/integration/connect` for a concrete local Integration
35
+ whose compiled model declares `connectAdapter: wave`. It uses the same interactive
36
+ start/input/resolve/next/confirm/read/retry lifecycle as other custom connections.
37
+ The built-in typed form supports PIN6 and explicitly opened initial no-PIN windows.
38
+ Core checks the selected resource before pairing, verifies it against authenticated
39
+ inventory after grant confirmation, writes the normal IntegrationInstall, and
40
+ publishes compatible entities. It creates no ordinary Connection record.
41
+
42
+ The lifecycle response includes `wave: {deviceId,grantState,inventoryState,installed,
43
+ entityIds,warnings,reason?}`. Completed projection is `status: done`; interrupted
44
+ setup is `status: failed, recoverable: true, canCancel: false`, preserving committed
45
+ facts. Retry first reconciles the durable candidate/identity through authenticated
46
+ operation. A committed grant continues installation without pairing. If the grant
47
+ is still unconfirmed, retry returns `needs_input` with a standard typed Flow view
48
+ for the same device. The user opens its pairing window again and re-enters its
49
+ current PIN when required; confirmation reuses the exact saved key/grant/attempt.
50
+ No retry replaces an existing device identity or replays a business command.
51
+
52
+ The decision to request new pairing input survives Core restart. Status can return
53
+ the reconstructed input view. Clients replace their displayed flow with this
54
+ authoritative retry/status view, including its step and revision; they must not
55
+ reuse commands or PINs from the previous page. Reconstructed pages use new step
56
+ identities, while ordinary next/refresh/confirm retain their revision fences.
57
+ Closing this input cancels only the interaction, preserving candidate credentials.
58
+ Additional unavailable capabilities warn without erasing compatible entities.
59
+ Preview selection does not install a business Integration. Integration uninstall
60
+ and physical grant removal are separate operations.
61
+
36
62
  Credentials remain Core-local, outside ordinary Connection/privateData/Twin/sync.
37
- Explicit Hub migration is outside this increment. Removal/invitation UI, BLE and
38
- physical target acceptance remain separate increments. Commands are never replayed.
63
+ Explicit Hub migration is outside this increment. Physical target acceptance and publication remain separate from source implementation. Commands are never replayed.
@@ -1300,6 +1300,7 @@
1300
1300
  {
1301
1301
  "name": "pod-directory-unknown",
1302
1302
  "target": "/app/pod/list",
1303
+ "timezone": "Asia/Shanghai",
1303
1304
  "data": {
1304
1305
  "spaceId": "space-demo",
1305
1306
  "observedAtMs": 1800000000000,
@@ -1329,7 +1330,7 @@
1329
1330
  "status": "success",
1330
1331
  "essential": {
1331
1332
  "spaceId": "space-demo",
1332
- "observedAtMs": 1800000000000,
1333
+ "observedAtMs": "2027-01-15 16:00:00 +08:00 (Asia/Shanghai)",
1333
1334
  "pods": [
1334
1335
  {
1335
1336
  "registrationId": "pod-demo",
@@ -1340,8 +1341,8 @@
1340
1341
  "model": "Pod",
1341
1342
  "platform": "esp32",
1342
1343
  "firmwareVersion": "1.0.0",
1343
- "issuedAt": 1800000000000,
1344
- "activatedAt": 1800000001000,
1344
+ "issuedAt": "2027-01-15 16:00:00 +08:00 (Asia/Shanghai)",
1345
+ "activatedAt": "2027-01-15 16:00:01 +08:00 (Asia/Shanghai)",
1345
1346
  "connection": {
1346
1347
  "state": "unknown",
1347
1348
  "source": "unavailable",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "manifest": "mhome.app-facade.v1",
3
- "contractVersion": "1.139.0",
3
+ "contractVersion": "1.141.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.139.0",
2
+ "contractVersion": "1.141.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.139.0",
3
+ "contractVersion": "1.141.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.139.0",
3
+ "contractVersion": "1.141.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.139.0",
3
+ "contractVersion": "1.141.0",
4
4
  "contract": "contract/pod-commissioning-v1.md",
5
5
  "localTargets": [
6
6
  "/local/pod/discovery/start",
@@ -373,6 +373,13 @@
373
373
  "expiresAt"
374
374
  ]
375
375
  },
376
+ "/app/pod/list": {
377
+ "ms": [
378
+ "observedAtMs",
379
+ "pods.*.issuedAt",
380
+ "pods.*.activatedAt"
381
+ ]
382
+ },
376
383
  "/app/host/directory/list": {
377
384
  "ms": [
378
385
  "observedAtMs"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "manifest": "mhome.app-facade.routing.v1",
3
- "contractVersion": "1.139.0",
3
+ "contractVersion": "1.141.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.139.0",
3
+ "contractVersion": "1.141.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.139.0",
3
+ "version": "1.141.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.139.0",
3
+ "contractVersion": "1.141.0",
4
4
  "manifest": "manifest/app-facade.v1.json",
5
5
  "schemas": {
6
6
  "storage": "schema/storage.v1.schema.json",
@@ -107,7 +107,8 @@
107
107
  "required": ["spaceId", "clientMode"],
108
108
  "properties": {
109
109
  "spaceId": { "type": "string", "minLength": 1 },
110
- "clientMode": { "enum": ["user", "space"] }
110
+ "clientMode": { "enum": ["user", "space"] },
111
+ "firstHub": { "type": "boolean" }
111
112
  }
112
113
  },
113
114
  "authorization": {