@mhome/app-facade-protocol 1.169.1 → 1.170.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.
@@ -1,94 +1,53 @@
1
- # Wave authorization management
1
+ # Wave authorization and business management
2
2
 
3
3
  These Hub-routed App Facades require current-Space Manage access and an active
4
- local Hub. Each physical Wave device permits at most one Space grant at a time,
5
- for both Wi-Fi and pure BLE. New addition requires an unbound device and an
6
- explicit local initial/recovery window; no additional-Space invitation exists.
7
- Moving to another Space requires confirmed removal or a local Wave reset first.
8
- Connection capacity is separate from this one-grant policy.
9
- They do not make Wave devices Hosts, Nodes or Plugins. No device URL,
10
- Space/Hub selector, grant, certificate or private key is an input/output.
11
-
12
- - `/app/wave/discover`: `{transport:"lan"|"ble"}` ->
13
- `{candidates:[{candidateId,deviceId,productId,proof,purpose}]}`.
14
- `productId` is a lowercase 32-hex public model lookup hint, separate from the
15
- physical `deviceId`. The controller rechecks it in the protected device session
16
- before saving candidate credentials or committing a grant. A mismatch requires
17
- a new explicit selection. It does not attest the manufacturer or grant any
18
- authority. Missing/unreachable product metadata never blocks normal addition;
19
- callers show a generic Wave device label and short physical candidate reference.
20
- Metadata refresh never overwrites a user-supplied Space device name.
21
- LAN discovery browses `_meow-wave._tcp.local.`; it never invokes BLE Relay.
22
- BLE discovery searches only bound relays for pure BLE operation. It does not
23
- discover unconfigured Wi-Fi devices for network setup. The caller selects
24
- exactly one transport; there is no implicit discovery or fallback.
25
- Results are untrusted location hints, scoped to this caller, Space and Hub
26
- generation and transport, expiring after two minutes. They never grant operation
27
- authority. No connected BLE Relay, all-busy Relays or failed scans return an
28
- availability error rather than a successful empty list. Partial scan coverage
29
- returns available candidates with a `WAVE_BLE_DISCOVERY_INCOMPLETE` warning.
30
- A successful empty scan has no such warning.
31
- - `/app/wave/list`: `{}` -> `{bindings:[{deviceId,grantState}]}`. States are
32
- `candidate`, `committed` or `removing`; this is authorization bookkeeping, not
33
- Device/Twin inventory, online state or evidence that a candidate committed on the device.
34
- - `/app/wave/refresh`: `{deviceId}` -> AdmissionResult. Reconcile the same saved
35
- credential, validate full Entity self-description against installed contracts,
36
- then use ordinary Twin source synchronization. It cannot open a pairing window.
4
+ local Hub. Each physical product has one Space owner. Keys, grants, certificates,
5
+ Hub selectors and device addresses never enter these inputs or results.
6
+
7
+ Physical addition uses the common device-owned operation and its Cloud approval;
8
+ see [onboarding](../../onboard-api/contract/onboarding-v1.md). There is no separate
9
+ Wave discovery/pair Facade or Integration Connect initial writer.
10
+
11
+ - `/app/wave/list`: `{}` -> `{bindings:[{deviceId,grantState}]}`. Candidate,
12
+ committed and removing describe saved authorization, not reachability or Twins.
13
+ - `/app/wave/refresh`: `{deviceId}` -> AdmissionResult. Only an already committed
14
+ common-operation binding may supply authenticated inventory. The operation
15
+ validates it against installed business contracts and feeds ordinary Twin
16
+ synchronization. It cannot create credentials, promote a candidate, open a
17
+ physical window or renew operation authority.
37
18
  - `/app/wave/remove`: `{deviceId,forgetAfterDeviceReset?:boolean}` ->
38
- `{deviceId,grantState}`. An authenticated App caller with current-Space Manage
39
- access requests physical grant removal. The optional flag defaults to false.
40
- `removed` confirms the device revoked the grant and Core cleared the local
41
- binding. `removing` is a partial outcome retaining an unconfirmed removal.
42
- Retry can complete while the device still accepts the saved grant. If the
43
- device already revoked it and its reply was lost, the old credential cannot
44
- authenticate another attempt, even when the device is reachable. The user
45
- clears Wave authorization locally on the device, then explicitly confirms
46
- `forgetAfterDeviceReset:true` to clear this Space's saved binding. This confirmation
47
- does not itself reset or revoke anything on the device. `unbound` means no saved
48
- binding remains.
49
- `forgotten` clears its saved local binding without a device revocation reply.
50
- Clearing a local binding also clears its published inventory. Ordinary
51
- Integration uninstall remains a separate operation.
19
+ `{deviceId,grantState}`. `removed` confirms authenticated device revocation and
20
+ local cleanup. `removing` retains an uncertain outcome for explicit recovery.
21
+ `unbound` reports no saved binding. After local device reset, explicit
22
+ `forgetAfterDeviceReset:true` may return `forgotten`; this clears bookkeeping
23
+ without claiming that Core reset or revoked the device. Published sources are
24
+ cleared with the binding. Integration uninstall is independent.
52
25
 
53
26
  AdmissionResult is `{deviceId,grantState,inventoryState,entityIds,reason?}`.
54
- `inventoryState:ready` means existing inventory synchronization completed;
55
- `unavailable` with a committed grant is a partial result. Authorization may have
56
- committed even when metadata/contract acquisition or inventory synchronization
57
- fails. A later refresh uses the existing grant, without consuming another slot.
58
- Missing/uninstalled or incompatible contracts never install code automatically.
59
- Normal Device/capability APIs own subsequent observations, control and subscriptions.
60
-
61
- Standard onboarding uses `/app/integration/connect` for a concrete local Integration
62
- whose compiled model declares `connectAdapter: wave`. It uses the same interactive
63
- start/input/resolve/next/confirm/read/retry lifecycle as other custom connections.
64
- The built-in typed form supports PIN6 and explicitly opened initial no-PIN windows.
65
- Core checks the selected resource before pairing, verifies it against authenticated
66
- inventory after grant confirmation, writes the normal IntegrationInstall, and
67
- publishes compatible entities. It creates no ordinary Connection record.
68
-
69
- The lifecycle response has optional top-level `warnings` for partial discovery,
70
- including before a device is selected. Committed authorizations are labeled
71
- “already added”; discovery does not assert that they are online.
72
-
73
- The lifecycle response includes `wave: {deviceId,grantState,inventoryState,installed,
74
- entityIds,warnings,reason?}`. Completed projection is `status: done`; interrupted
75
- setup is `status: failed, recoverable: true, canCancel: false`, preserving committed
76
- facts. Retry first reconciles the durable candidate/identity through authenticated
77
- operation. A committed grant continues installation without pairing. If the grant
78
- is still unconfirmed, retry returns `needs_input` with a standard typed Flow view
79
- for the same device. The user opens its pairing window again and re-enters its
80
- current PIN when required; confirmation reuses the exact saved key/grant/attempt.
81
- No retry replaces an existing device identity or replays a business command.
82
-
83
- The decision to request new pairing input survives Core restart. Status can return
84
- the reconstructed input view. Clients replace their displayed flow with this
85
- authoritative retry/status view, including its step and revision; they must not
86
- reuse commands or PINs from the previous page. Reconstructed pages use new step
87
- identities, while ordinary next/refresh/confirm retain their revision fences.
88
- Closing this input cancels only the interaction, preserving candidate credentials.
89
- Additional unavailable capabilities warn without erasing compatible entities.
90
- Preview selection does not install a business Integration. Integration uninstall
91
- and physical grant removal are separate operations.
92
-
93
- Credentials remain Core-local, outside ordinary Connection/privateData/Twin/sync.
94
- Explicit Hub migration is outside this increment. Physical target acceptance and publication remain separate from source implementation. Commands are never replayed.
27
+ `inventoryState:ready` means business synchronization completed. An unavailable
28
+ business definition or endpoint preserves committed product ownership and may
29
+ produce partial results/warnings. Business failure never starts onboarding.
30
+ Normal Device/capability interfaces own later observations and control.
31
+
32
+ Core initiates business inventory after successful operating confirmation, on
33
+ Hub readiness, and through the existing resource-recovery lifecycle. These are
34
+ bounded, cancellable derived-projection jobs, not another onboarding state
35
+ machine. Periodic recovery need not reread products with retained Twin sources;
36
+ resource changes can revalidate all committed products.
37
+
38
+ A concrete Integration with `connectAdapter:wave` may use ordinary
39
+ `/app/integration/connect` for an explicit business association. Its one typed
40
+ form chooses a product already bound to this Hub. There are no transport, PIN,
41
+ window or discovery-candidate fields. Authenticated inventory must advertise the
42
+ chosen Integration before normal Integration installation and Twin publication.
43
+ The flow creates no ordinary Connection or product credentials.
44
+
45
+ The lifecycle result retains
46
+ `wave:{deviceId,grantState,inventoryState,installed,entityIds,warnings,reason?}`.
47
+ Complete business projection returns `status:done`; interrupted work returns
48
+ `status:failed,recoverable:true,canCancel:false`. An immutable accepted receipt
49
+ survives restart. Retry resumes only business installation/synchronization for
50
+ its original caller, device and selected resource; a removed device cannot
51
+ resume. It never reconstructs pairing input, changes keys or repeats a business
52
+ command. Missing definitions do not authorize arbitrary script or Plugin code
53
+ installation. Credentials remain Core-local and outside sync/exported Twins.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "manifest": "mhome.app-facade.v1",
3
- "contractVersion": "1.169.1",
3
+ "contractVersion": "1.170.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",
@@ -489,7 +489,6 @@
489
489
  "wave": {
490
490
  "contract": "contract/wave-v1.md",
491
491
  "requestTargets": [
492
- "/app/wave/discover",
493
492
  "/app/wave/list",
494
493
  "/app/wave/refresh",
495
494
  "/app/wave/remove"
@@ -1,5 +1,5 @@
1
1
  {
2
- "contractVersion": "1.169.1",
2
+ "contractVersion": "1.170.0",
3
3
  "operations": {
4
4
  "/app/agent/context/get": "spaceRead",
5
5
  "/app/agent/conversation/get": "spaceRead",
@@ -332,7 +332,6 @@
332
332
  "/app/user/profile/avatar/prepare": "userWrite",
333
333
  "/app/user/profile/get": "userRead",
334
334
  "/app/user/profile/update": "userWrite",
335
- "/app/wave/discover": "spaceManage",
336
335
  "/app/wave/list": "spaceManage",
337
336
  "/app/wave/refresh": "spaceManage",
338
337
  "/app/wave/remove": "spaceManage",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "manifest": "mhome.host-provision.targets.v1",
3
- "contractVersion": "1.169.1",
3
+ "contractVersion": "1.170.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.169.1",
3
+ "contractVersion": "1.170.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.169.1",
3
+ "contractVersion": "1.170.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.169.1",
3
+ "contractVersion": "1.170.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.169.1",
3
+ "contractVersion": "1.170.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.169.1",
3
+ "version": "1.170.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.169.1",
3
+ "contractVersion": "1.170.0",
4
4
  "manifest": "manifest/app-facade.v1.json",
5
5
  "schemas": {
6
6
  "dashboardCardAuthoring": "schema/dashboard-card-authoring.v1.schema.json",