@mhome/core-protocol 1.38.4 → 1.39.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/README.md CHANGED
@@ -136,11 +136,13 @@ only the canonical DTOs cross HTTP/IPC boundaries. The permissions contract is i
136
136
  `contract/host-permissions.md`; runtime permission handlers remain a separate
137
137
  implementation step. The existing Core external runtime protocol stays at 15.
138
138
 
139
- ## Offline Host authorization (core-api 1.15.0)
139
+ ## Host management authorization
140
140
 
141
- `host::auth` is the language-neutral Client–Host authorization payload contract.
142
- See [`contract/host-offline-auth.md`](contract/host-offline-auth.md). This crate
143
- does not implement signing, key storage, or transport.
141
+ `host::access` owns cloud-issued short User tokens, fixed Admin/Space modes,
142
+ signed challenge/claim/receipt types and permissions. `host::auth` owns Host public
143
+ keys and the cloud signing-key directory. See
144
+ [`contract/host-management-auth.md`](contract/host-management-auth.md).
145
+ Business Client–Core identities are a separate protocol.
144
146
 
145
147
  ## Native Client Host management
146
148
 
@@ -153,4 +155,4 @@ Desktop/CLI use Clientd IPC `host.list` and `host.runtime`; mobile Clients expos
153
155
  same operations through `hostList` / `hostRuntime`. None accepts a Space ID. Clients
154
156
  discover `_mhome-host._tcp`, verify reply Host IDs, and unwrap the HTTP runtime envelope.
155
157
  Install/restart submissions are not automatically replayed after transport failure.
156
- Existing LAN access semantics remain; this release does not add a trust/pairing protocol.
158
+ First claim is direct LAN only; daily User management can use the current Core as a token-forwarding proxy.
@@ -44,6 +44,34 @@
44
44
  "restartOperation": {
45
45
  "path": "/v1/runtime",
46
46
  "method": "POST"
47
+ },
48
+ "administratorRemove": {
49
+ "path": "/v1/runtime",
50
+ "method": "POST"
51
+ },
52
+ "administratorRequest": {
53
+ "path": "/v1/auth/administrators",
54
+ "method": "POST"
55
+ },
56
+ "administratorRequestStatus": {
57
+ "path": "/v1/auth/administrators",
58
+ "method": "POST"
59
+ },
60
+ "administratorRequestCancel": {
61
+ "path": "/v1/auth/administrators",
62
+ "method": "POST"
63
+ },
64
+ "administrators": {
65
+ "path": "/v1/runtime",
66
+ "method": "POST"
67
+ },
68
+ "administratorDecide": {
69
+ "path": "/v1/runtime",
70
+ "method": "POST"
71
+ },
72
+ "configureService": {
73
+ "path": "/v1/runtime",
74
+ "method": "POST"
47
75
  }
48
76
  },
49
77
  "requestFields": [
@@ -53,7 +81,13 @@
53
81
  "all",
54
82
  "planId",
55
83
  "operationId",
56
- "component"
84
+ "component",
85
+ "proof",
86
+ "userId",
87
+ "requestId",
88
+ "approve",
89
+ "serviceId",
90
+ "enabled"
57
91
  ],
58
92
  "listResponse": {
59
93
  "hosts": "array of HostListEntry",
@@ -65,8 +99,10 @@
65
99
  ],
66
100
  "info": "HostInfo or null",
67
101
  "infoError": "string or null",
68
- "claimable": "boolean; verified empty-ACL challenge, not a permission result",
69
- "identityUnverified": "boolean; blocks automatic TOFU and management; an explicit native reauthorization may start a new claim"
102
+ "claimable": "boolean; verified unclaimed Host status",
103
+ "identityUnverified": "boolean; blocks automatic TOFU and management; an explicit native reauthorization may start a new claim",
104
+ "authorization": "verified HostStatus or null: mode, claim, env, generation and host key id",
105
+ "claimPending": "boolean; this native Client has an unfinished claim that can be resumed"
70
106
  },
71
107
  "runtimeResponse": {
72
108
  "metrics": "HostMetrics",
@@ -78,13 +114,15 @@
78
114
  "mutationsAutomaticallyRetried": false
79
115
  },
80
116
  "claimRequest": {
81
- "hostId": "non-empty string; no scope or endpoint accepted",
117
+ "hostId": "non-empty string; endpoint resolved from native LAN discovery",
82
118
  "claimToken": "optional string from a completed Bluetooth setup; forwarded to the Host claim unchanged",
83
- "recoverIdentity": "optional boolean, default false; only an explicit user reauthorization may replace this account’s old Host key; never enable for background/Bluetooth automatic claim"
119
+ "recoverIdentity": "optional boolean, default false; only an explicit user reauthorization may replace this account\u2019s old Host key; never enable for background/Bluetooth automatic claim",
120
+ "scopeId": "optional selected Space id; required for Space Hosts. Cloud derives the tenant from the authenticated user and checks ownership."
84
121
  },
85
122
  "claimResponse": {
86
- "claimed": "true only after Host persistence and cloud receipt commit",
123
+ "claimed": "true only after Host persistence and cloud receipt commit; false when explicit identity recovery submitted an administrator application awaiting approval/confirmation",
124
+ "application": "present for explicit recovery on an already claimed Admin Host; the Host administrator request result. The App confirms an approved receipt through /app/host/authorization before treating it as claimed",
87
125
  "hostId": "requested Host identity when supplied",
88
- "identityConflict": "HOST_IDENTITY_CHANGED requires explicit reauthorization; failure never changes the trusted key"
126
+ "identityConflict": "HOST_IDENTITY_CHANGED requires explicit native LAN reauthorization. A new locally confirmed pin and unfinished-confirmation marker persist before submitting the mutation; retries remain bound to that pin. The cloud directory changes only after a Host approval receipt"
89
127
  }
90
128
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "manifest": "mhome.core.v1",
3
- "contractVersion": "1.38.4",
3
+ "contractVersion": "1.39.0",
4
4
  "protocols": {
5
5
  "agentGateway": {
6
6
  "submitTarget": "/agent/submit",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mhome/core-protocol",
3
- "version": "1.38.4",
3
+ "version": "1.39.0",
4
4
  "description": "Build-time protocol artifacts for mhome.core",
5
5
  "license": "MIT",
6
6
  "repository": {
package/protocol.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "protocol": "mhome.core",
3
- "contractVersion": "1.38.4",
3
+ "contractVersion": "1.39.0",
4
4
  "manifest": "manifest/core.v1.json",
5
5
  "schemas": {
6
6
  "hostManagementRequest": "schema/host-management-request.v1.schema.json",
@@ -133,6 +133,172 @@
133
133
  "minLength": 1
134
134
  }
135
135
  }
136
+ },
137
+ {
138
+ "type": "object",
139
+ "additionalProperties": false,
140
+ "required": [
141
+ "hostId",
142
+ "action",
143
+ "userId"
144
+ ],
145
+ "properties": {
146
+ "hostId": {
147
+ "type": "string",
148
+ "minLength": 1
149
+ },
150
+ "action": {
151
+ "const": "administratorRemove"
152
+ },
153
+ "userId": {
154
+ "type": "string",
155
+ "minLength": 1
156
+ }
157
+ }
158
+ },
159
+ {
160
+ "type": "object",
161
+ "additionalProperties": false,
162
+ "required": [
163
+ "hostId",
164
+ "action",
165
+ "proof"
166
+ ],
167
+ "properties": {
168
+ "hostId": {
169
+ "type": "string",
170
+ "minLength": 1,
171
+ "maxLength": 256
172
+ },
173
+ "action": {
174
+ "const": "administratorRequest"
175
+ },
176
+ "proof": {
177
+ "type": "string",
178
+ "minLength": 1,
179
+ "maxLength": 16384
180
+ }
181
+ }
182
+ },
183
+ {
184
+ "type": "object",
185
+ "additionalProperties": false,
186
+ "required": [
187
+ "hostId",
188
+ "action",
189
+ "proof"
190
+ ],
191
+ "properties": {
192
+ "hostId": {
193
+ "type": "string",
194
+ "minLength": 1,
195
+ "maxLength": 256
196
+ },
197
+ "action": {
198
+ "const": "administratorRequestStatus"
199
+ },
200
+ "proof": {
201
+ "type": "string",
202
+ "minLength": 1,
203
+ "maxLength": 16384
204
+ }
205
+ }
206
+ },
207
+ {
208
+ "type": "object",
209
+ "additionalProperties": false,
210
+ "required": [
211
+ "hostId",
212
+ "action",
213
+ "proof"
214
+ ],
215
+ "properties": {
216
+ "hostId": {
217
+ "type": "string",
218
+ "minLength": 1,
219
+ "maxLength": 256
220
+ },
221
+ "action": {
222
+ "const": "administratorRequestCancel"
223
+ },
224
+ "proof": {
225
+ "type": "string",
226
+ "minLength": 1,
227
+ "maxLength": 16384
228
+ }
229
+ }
230
+ },
231
+ {
232
+ "type": "object",
233
+ "additionalProperties": false,
234
+ "required": [
235
+ "hostId",
236
+ "action"
237
+ ],
238
+ "properties": {
239
+ "hostId": {
240
+ "type": "string",
241
+ "minLength": 1,
242
+ "maxLength": 256
243
+ },
244
+ "action": {
245
+ "const": "administrators"
246
+ }
247
+ }
248
+ },
249
+ {
250
+ "type": "object",
251
+ "additionalProperties": false,
252
+ "required": [
253
+ "hostId",
254
+ "action",
255
+ "requestId",
256
+ "approve"
257
+ ],
258
+ "properties": {
259
+ "hostId": {
260
+ "type": "string",
261
+ "minLength": 1,
262
+ "maxLength": 256
263
+ },
264
+ "action": {
265
+ "const": "administratorDecide"
266
+ },
267
+ "requestId": {
268
+ "type": "string",
269
+ "minLength": 1,
270
+ "maxLength": 256
271
+ },
272
+ "approve": {
273
+ "type": "boolean"
274
+ }
275
+ }
276
+ },
277
+ {
278
+ "type": "object",
279
+ "additionalProperties": false,
280
+ "required": [
281
+ "hostId",
282
+ "action",
283
+ "serviceId",
284
+ "enabled"
285
+ ],
286
+ "properties": {
287
+ "hostId": {
288
+ "type": "string",
289
+ "minLength": 1
290
+ },
291
+ "action": {
292
+ "const": "configureService"
293
+ },
294
+ "serviceId": {
295
+ "type": "string",
296
+ "minLength": 1
297
+ },
298
+ "enabled": {
299
+ "type": "boolean"
300
+ }
301
+ }
136
302
  }
137
303
  ]
138
304
  }