@mhome/core-protocol 1.53.0 → 1.57.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 +9 -0
- package/contract/plugin-management-v1.md +63 -0
- package/fixtures/camera-plugin-management.conformance.json +26 -2
- package/fixtures/operation-timeouts.conformance.json +3 -1
- package/manifest/core.v1.json +24 -3
- package/manifest/operation-timeouts.v1.json +2 -1
- package/package.json +2 -3
- package/protocol.json +3 -1
- package/schema/camera-plugin-management.v1.schema.json +126 -13
- package/schema/matter-plugin-management.v1.schema.json +302 -0
- package/schema/plugin-management.v1.schema.json +27 -0
package/README.md
CHANGED
|
@@ -5,6 +5,11 @@ provider runtimes. Public `/app/*` contracts belong to
|
|
|
5
5
|
`mhome-app-facade-api`; this crate owns internal MWS, authentication, LLM,
|
|
6
6
|
Messaging normalization, Node runtime, and Storage contracts.
|
|
7
7
|
|
|
8
|
+
Plugin management uses the [generic transport contract](contract/plugin-management-v1.md).
|
|
9
|
+
This package distributes shared Node wire contracts, including Matter and Camera
|
|
10
|
+
management schemas; each Plugin owns their execution. App consumers use the
|
|
11
|
+
opaque Plugin Facade envelope, and Core does not aggregate these inventories.
|
|
12
|
+
|
|
8
13
|
`messaging::IngressRedeem` carries a parsed identity code and a dedicated
|
|
9
14
|
`IdentityRedemptionContext`: event ID, receiving address, sender and optional
|
|
10
15
|
conversation display name. Redemption is independent of normalized message
|
|
@@ -191,6 +196,10 @@ of a completed result or timeout error; it never grants the callee more executio
|
|
|
191
196
|
time. Existing domain-owned lifetimes (streams, subscriptions, long batch jobs)
|
|
192
197
|
and implementation-specific step timeouts are not replaced by a default request
|
|
193
198
|
budget. New shared operations need an explicit catalog entry and selector tests.
|
|
199
|
+
`hubMigration` gives an accepted migration worker up to ten minutes, including drain
|
|
200
|
+
and transfer. Starting a migration and querying its status remain ordinary requests.
|
|
201
|
+
Expiry fails the attempt; it does not prove that source requests drained or reopen
|
|
202
|
+
the Space. Explicit retries replace uncommitted snapshots and finish committed ownership.
|
|
194
203
|
|
|
195
204
|
`execution_budget::Budgeted<T>` adds optional `executionBudget: { remainingMs }`
|
|
196
205
|
metadata alongside an object envelope's existing fields. Bridge uses it on MWS
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
# Plugin management transport
|
|
2
|
+
|
|
3
|
+
Business management runs in the selected Plugin. Core authenticates the caller,
|
|
4
|
+
resolves the exact current-Space binding, enforces the connected Node's declared
|
|
5
|
+
`appAccess`, and forwards `/app/plugin/{nodeType}/{route}` to
|
|
6
|
+
`/{nodeType}/app/{route}`. Input is `{nodeId, version, payload}`; the Node receives
|
|
7
|
+
`{version, payload}`. The App Facade's successful data is
|
|
8
|
+
`{nodeId, nodeType, version, data}`. Consumers validate identity and version before
|
|
9
|
+
reading the business `data`. Business payloads are never Integration inventories
|
|
10
|
+
or Twin entity IDs merely because a field is named `devices`.
|
|
11
|
+
|
|
12
|
+
## Preparation
|
|
13
|
+
|
|
14
|
+
A Plugin can implement a read-only `/{nodeType}/app/{route}/prepare` handler with
|
|
15
|
+
its own `appAccess` declaration at least as restrictive as execution. The request
|
|
16
|
+
uses the same version and original payload. Its runtime response data is
|
|
17
|
+
`{preview:{title,message,details},payload:{...}}`. `payload` is the concrete
|
|
18
|
+
business command with any revision or resource-set preconditions; `details` is
|
|
19
|
+
safe public confirmation content. Neither may contain credentials.
|
|
20
|
+
|
|
21
|
+
Core stores both but exposes only the public preview, adding the trusted Node ID
|
|
22
|
+
to its details. Commit revalidates authority and binding, repeats preparation,
|
|
23
|
+
and rejects changed previews or execution payloads. It then replaces only the
|
|
24
|
+
original request's payload. Target, Node ID, version and approval identity remain
|
|
25
|
+
Core-owned. The Plugin checks its preconditions atomically with the mutation.
|
|
26
|
+
There is no guarantee of exactly-once external effects. Existing platform-owned
|
|
27
|
+
LLM and AudioBridge previews retain their adapters.
|
|
28
|
+
|
|
29
|
+
## Management events
|
|
30
|
+
|
|
31
|
+
A bound Node may publish `/node/app/event` with
|
|
32
|
+
`{version:"v1",event:"inventory/changed",data:{...}}`. Event names consist of
|
|
33
|
+
nonempty lowercase alphanumeric, underscore or hyphen segments separated by `/`,
|
|
34
|
+
up to 256 bytes. Core derives tenant, Space, Node ID and Node type from the
|
|
35
|
+
authenticated session and publishes `/app/plugin/event` to that Space with
|
|
36
|
+
`{nodeId,nodeType,version,event,data}`. A Node cannot supply another publisher's
|
|
37
|
+
identity or choose a platform event target. Consumers filter publisher identity
|
|
38
|
+
and Space. This is an observation; capability subscriptions retain their separate
|
|
39
|
+
protocol and delivery ledger.
|
|
40
|
+
|
|
41
|
+
## Matter
|
|
42
|
+
|
|
43
|
+
The Matter Plugin owns `status`, `commissionable/list`, `fabric/get`,
|
|
44
|
+
`fabric/node/detail`, `inventory/get`, `onboarding/start`, `onboarding/input`,
|
|
45
|
+
`onboarding/status` and `fabric/node/remove`. Read routes require Space read;
|
|
46
|
+
start, input and removal require Space write. There is no `/app/matter/*` Facade.
|
|
47
|
+
The management inventory and detail payload schema is
|
|
48
|
+
`schema/matter-plugin-management.v1.schema.json`.
|
|
49
|
+
|
|
50
|
+
`status` returns runtime information or `runtimeError`, plus trusted `spaceId`.
|
|
51
|
+
Binding and offline observations come from `/app/plugin/enabled/list`, which can
|
|
52
|
+
answer even when the Plugin is unavailable. Commissioning retains operation ID,
|
|
53
|
+
session ID and expected revision semantics. Consumers pin the Node ID throughout
|
|
54
|
+
the operation and its durable continuation; closing a UI does not cancel it.
|
|
55
|
+
Discovery publishes `commissionable/report` through the generic event channel.
|
|
56
|
+
|
|
57
|
+
The separate Integration `/matter/device/list` response remains
|
|
58
|
+
`{"ok":true,"data":[...]}`. It enumerates source entities and is not a management
|
|
59
|
+
list. ESP implementations must implement and advertise only supported routes;
|
|
60
|
+
they must not dual-write alternate array/object envelopes.
|
|
61
|
+
|
|
62
|
+
These contracts continue to ship with Foundation. Plugin execution ownership does
|
|
63
|
+
not introduce a new package publication system or move provider schema sources.
|
|
@@ -70,8 +70,7 @@
|
|
|
70
70
|
{
|
|
71
71
|
"name": "device list",
|
|
72
72
|
"value": {
|
|
73
|
-
"
|
|
74
|
-
"onlineStates": []
|
|
73
|
+
"connections": []
|
|
75
74
|
}
|
|
76
75
|
},
|
|
77
76
|
{
|
|
@@ -168,6 +167,31 @@
|
|
|
168
167
|
"postRollSeconds": 30
|
|
169
168
|
}
|
|
170
169
|
}
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
"name": "grouped inventory with unknown observation time",
|
|
173
|
+
"value": {
|
|
174
|
+
"connections": [
|
|
175
|
+
{
|
|
176
|
+
"id": "conn",
|
|
177
|
+
"provider": "onvif",
|
|
178
|
+
"name": "Entrance",
|
|
179
|
+
"revision": 2,
|
|
180
|
+
"deviceCount": 1,
|
|
181
|
+
"devices": [
|
|
182
|
+
{
|
|
183
|
+
"id": "cam",
|
|
184
|
+
"name": "Door",
|
|
185
|
+
"health": "ready",
|
|
186
|
+
"resolutionStatus": "ready",
|
|
187
|
+
"online": {
|
|
188
|
+
"state": "unknown"
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
]
|
|
192
|
+
}
|
|
193
|
+
]
|
|
194
|
+
}
|
|
171
195
|
}
|
|
172
196
|
],
|
|
173
197
|
"invalid": [
|
|
@@ -21,5 +21,7 @@
|
|
|
21
21
|
{"target":"/dispatch/app/integration/entity/refresh","payload":{},"operation":"entityRefresh","totalMs":85000,"lionWaitMs":90000},
|
|
22
22
|
{"target":"/dispatch/agent/app/integration/entity/refresh","payload":{},"operation":"entityRefresh","totalMs":85000,"lionWaitMs":90000},
|
|
23
23
|
{"target":"/bridge/automation/parse","payload":{"script":{"scripts":{"lighting":"source"}}},"operation":"scriptValidation","totalMs":205000,"lionWaitMs":230000},
|
|
24
|
-
{"target":"/bridge/automation/format","payload":{"script":{"scripts":{"lighting":"source"}}},"operation":"scriptValidation","totalMs":205000,"lionWaitMs":230000}
|
|
24
|
+
{"target":"/bridge/automation/format","payload":{"script":{"scripts":{"lighting":"source"}}},"operation":"scriptValidation","totalMs":205000,"lionWaitMs":230000},
|
|
25
|
+
{"target":"/dispatch/hub/revoke/start","payload":{},"operation":"hubMigration","totalMs":600000},
|
|
26
|
+
{"target":"/bridge/hub/revoke/dataUploaded","payload":{},"operation":"hubMigration","totalMs":600000}
|
|
25
27
|
]
|
package/manifest/core.v1.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"manifest": "mhome.core.v1",
|
|
3
|
-
"contractVersion": "1.
|
|
3
|
+
"contractVersion": "1.57.0",
|
|
4
4
|
"protocols": {
|
|
5
5
|
"agentGateway": {
|
|
6
6
|
"submitTarget": "/agent/submit",
|
|
@@ -10,6 +10,9 @@
|
|
|
10
10
|
"completeTarget": "/llm/complete"
|
|
11
11
|
},
|
|
12
12
|
"node": {
|
|
13
|
+
"managementEventTarget": "/node/app/event",
|
|
14
|
+
"managementEventAppTarget": "/app/plugin/event",
|
|
15
|
+
"managementContract": "contract/plugin-management-v1.md",
|
|
13
16
|
"settingsChangedTarget": "/node/settings/changed",
|
|
14
17
|
"statusContract": "mhome.node.status.v1",
|
|
15
18
|
"runtimeVersion": "v1",
|
|
@@ -24,6 +27,24 @@
|
|
|
24
27
|
"metadataSchema": "schema/node-metadata.v1.schema.json",
|
|
25
28
|
"metadataContract": "contract/node-metadata-v1.md"
|
|
26
29
|
},
|
|
30
|
+
"matterPlugin": {
|
|
31
|
+
"version": "v1",
|
|
32
|
+
"nodeType": "matter",
|
|
33
|
+
"appTargetPrefix": "/app/plugin/matter/",
|
|
34
|
+
"runtimeTargetPrefix": "/matter/app/",
|
|
35
|
+
"managementSchema": "schema/matter-plugin-management.v1.schema.json",
|
|
36
|
+
"routes": {
|
|
37
|
+
"status": "status",
|
|
38
|
+
"inventoryGet": "inventory/get",
|
|
39
|
+
"commissionableList": "commissionable/list",
|
|
40
|
+
"fabricGet": "fabric/get",
|
|
41
|
+
"nodeDetail": "fabric/node/detail",
|
|
42
|
+
"onboardingStart": "onboarding/start",
|
|
43
|
+
"onboardingInput": "onboarding/input",
|
|
44
|
+
"onboardingStatus": "onboarding/status",
|
|
45
|
+
"nodeRemove": "fabric/node/remove"
|
|
46
|
+
}
|
|
47
|
+
},
|
|
27
48
|
"cameraPlugin": {
|
|
28
49
|
"version": "v1",
|
|
29
50
|
"nodeType": "camera",
|
|
@@ -69,10 +90,10 @@
|
|
|
69
90
|
"commandsSchema": "schema/messaging-commands.v1.schema.json"
|
|
70
91
|
},
|
|
71
92
|
"storage": {
|
|
72
|
-
"version": "storage.
|
|
93
|
+
"version": "storage.v5"
|
|
73
94
|
},
|
|
74
95
|
"hostDelivery": {
|
|
75
|
-
"externalProtocolVersion":
|
|
96
|
+
"externalProtocolVersion": 25,
|
|
76
97
|
"requestKind": "deliveryRequested",
|
|
77
98
|
"connectionControlKind": "connectionControlRequested",
|
|
78
99
|
"acceptanceBoundaries": [
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
"manifest": "mhome.operation-timeouts.v1",
|
|
3
3
|
"operations": {
|
|
4
4
|
"coreRequest": { "totalMs": 60000, "description": "Default Core request execution." },
|
|
5
|
+
"hubMigration": { "totalMs": 600000, "description": "One accepted Hub migration attempt, including drain and transfer; ordinary start/status requests retain their request budget." },
|
|
5
6
|
"eventProcessing": { "totalMs": 60000, "description": "One Automation event delivery and its execution slice, including admission and preparation; durable waits are separate." },
|
|
6
7
|
"entityRefresh": { "totalMs": 85000, "description": "Integration entity refresh including source loading and response preparation." },
|
|
7
8
|
"harnessSessionOpen": { "totalMs": 150000, "description": "Harness session initialization." },
|
|
@@ -24,6 +25,6 @@
|
|
|
24
25
|
"storedScriptSave": ["/automation/snapshot/rollback", "/app/automation/snapshot/rollback", "/automation/overview/save", "/automation/copy", "/automation/enroll"],
|
|
25
26
|
"sourceScriptSave": ["/automation/save", "/app/automation/save"],
|
|
26
27
|
"sourceScriptValidation": ["/app/automation/verify", "/bridge/automation/parse", "/bridge/automation/format", "/bridge/automation/verify", "/automation/format", "/bridge/automation/compile", "/bridge/agent/automation/compile"],
|
|
27
|
-
"ordinaryOverrides": { "/app/integration/entity/refresh": "entityRefresh", "/harness/test/session/open": "harnessSessionOpen" }
|
|
28
|
+
"ordinaryOverrides": { "/hub/revoke/start": "hubMigration", "/bridge/hub/revoke/dataUploaded": "hubMigration", "/app/integration/entity/refresh": "entityRefresh", "/harness/test/session/open": "harnessSessionOpen" }
|
|
28
29
|
}
|
|
29
30
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mhome/core-protocol",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.57.0",
|
|
4
4
|
"description": "Build-time protocol artifacts for mhome.core",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -37,7 +37,6 @@
|
|
|
37
37
|
"./fixtures/*": "./fixtures/*"
|
|
38
38
|
},
|
|
39
39
|
"publishConfig": {
|
|
40
|
-
"access": "public"
|
|
41
|
-
"provenance": true
|
|
40
|
+
"access": "public"
|
|
42
41
|
}
|
|
43
42
|
}
|
package/protocol.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"protocol": "mhome.core",
|
|
3
|
-
"contractVersion": "1.
|
|
3
|
+
"contractVersion": "1.57.0",
|
|
4
4
|
"manifest": "manifest/core.v1.json",
|
|
5
5
|
"schemas": {
|
|
6
6
|
"hostManagementRequest": "schema/host-management-request.v1.schema.json",
|
|
@@ -8,6 +8,8 @@
|
|
|
8
8
|
"normalizedInbound": "schema/normalized-inbound.v4.schema.json",
|
|
9
9
|
"messagingCommands": "schema/messaging-commands.v1.schema.json",
|
|
10
10
|
"interactionFlowNode": "schema/interaction-flow-node.v1.schema.json",
|
|
11
|
+
"matterPluginManagement": "schema/matter-plugin-management.v1.schema.json",
|
|
12
|
+
"pluginManagement": "schema/plugin-management.v1.schema.json",
|
|
11
13
|
"cameraPluginManagement": "schema/camera-plugin-management.v1.schema.json"
|
|
12
14
|
},
|
|
13
15
|
"fixtures": {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
3
|
"$id": "https://mhome.ai/schema/camera-plugin-management.v1.schema.json",
|
|
4
4
|
"title": "Camera Plugin management values",
|
|
5
|
-
"
|
|
5
|
+
"anyOf": [
|
|
6
6
|
{
|
|
7
7
|
"$ref": "#/$defs/emptyRequest"
|
|
8
8
|
},
|
|
@@ -220,25 +220,18 @@
|
|
|
220
220
|
},
|
|
221
221
|
"deviceListResponse": {
|
|
222
222
|
"type": "object",
|
|
223
|
+
"additionalProperties": false,
|
|
223
224
|
"required": [
|
|
224
|
-
"
|
|
225
|
-
"onlineStates"
|
|
225
|
+
"connections"
|
|
226
226
|
],
|
|
227
227
|
"properties": {
|
|
228
|
-
"
|
|
229
|
-
"type": "array",
|
|
230
|
-
"items": {
|
|
231
|
-
"$ref": "#/$defs/cameraDevice"
|
|
232
|
-
}
|
|
233
|
-
},
|
|
234
|
-
"onlineStates": {
|
|
228
|
+
"connections": {
|
|
235
229
|
"type": "array",
|
|
236
230
|
"items": {
|
|
237
|
-
"$ref": "#/$defs/
|
|
231
|
+
"$ref": "#/$defs/connectionBrief"
|
|
238
232
|
}
|
|
239
233
|
}
|
|
240
|
-
}
|
|
241
|
-
"additionalProperties": false
|
|
234
|
+
}
|
|
242
235
|
},
|
|
243
236
|
"connectionMutationResponse": {
|
|
244
237
|
"type": "object",
|
|
@@ -554,6 +547,126 @@
|
|
|
554
547
|
}
|
|
555
548
|
},
|
|
556
549
|
"additionalProperties": false
|
|
550
|
+
},
|
|
551
|
+
"connectionBrief": {
|
|
552
|
+
"type": "object",
|
|
553
|
+
"additionalProperties": false,
|
|
554
|
+
"required": [
|
|
555
|
+
"id",
|
|
556
|
+
"provider",
|
|
557
|
+
"name",
|
|
558
|
+
"revision",
|
|
559
|
+
"deviceCount",
|
|
560
|
+
"devices"
|
|
561
|
+
],
|
|
562
|
+
"properties": {
|
|
563
|
+
"id": {
|
|
564
|
+
"type": "string"
|
|
565
|
+
},
|
|
566
|
+
"provider": {
|
|
567
|
+
"type": "string"
|
|
568
|
+
},
|
|
569
|
+
"name": {
|
|
570
|
+
"type": "string"
|
|
571
|
+
},
|
|
572
|
+
"revision": {
|
|
573
|
+
"type": "integer",
|
|
574
|
+
"minimum": 1
|
|
575
|
+
},
|
|
576
|
+
"lastError": {
|
|
577
|
+
"type": [
|
|
578
|
+
"string",
|
|
579
|
+
"null"
|
|
580
|
+
]
|
|
581
|
+
},
|
|
582
|
+
"deviceCount": {
|
|
583
|
+
"type": "integer",
|
|
584
|
+
"minimum": 0
|
|
585
|
+
},
|
|
586
|
+
"devices": {
|
|
587
|
+
"type": "array",
|
|
588
|
+
"items": {
|
|
589
|
+
"$ref": "#/$defs/deviceBrief"
|
|
590
|
+
}
|
|
591
|
+
}
|
|
592
|
+
}
|
|
593
|
+
},
|
|
594
|
+
"deviceBrief": {
|
|
595
|
+
"type": "object",
|
|
596
|
+
"additionalProperties": false,
|
|
597
|
+
"required": [
|
|
598
|
+
"id",
|
|
599
|
+
"name",
|
|
600
|
+
"health",
|
|
601
|
+
"resolutionStatus",
|
|
602
|
+
"online"
|
|
603
|
+
],
|
|
604
|
+
"properties": {
|
|
605
|
+
"id": {
|
|
606
|
+
"type": "string"
|
|
607
|
+
},
|
|
608
|
+
"name": {
|
|
609
|
+
"type": "string"
|
|
610
|
+
},
|
|
611
|
+
"manufacturerName": {
|
|
612
|
+
"type": [
|
|
613
|
+
"string",
|
|
614
|
+
"null"
|
|
615
|
+
]
|
|
616
|
+
},
|
|
617
|
+
"health": {
|
|
618
|
+
"enum": [
|
|
619
|
+
"applying",
|
|
620
|
+
"ready",
|
|
621
|
+
"degraded",
|
|
622
|
+
"error"
|
|
623
|
+
]
|
|
624
|
+
},
|
|
625
|
+
"resolutionStatus": {
|
|
626
|
+
"enum": [
|
|
627
|
+
"unresolved",
|
|
628
|
+
"ready",
|
|
629
|
+
"failed"
|
|
630
|
+
]
|
|
631
|
+
},
|
|
632
|
+
"lastError": {
|
|
633
|
+
"type": [
|
|
634
|
+
"string",
|
|
635
|
+
"null"
|
|
636
|
+
]
|
|
637
|
+
},
|
|
638
|
+
"online": {
|
|
639
|
+
"anyOf": [
|
|
640
|
+
{
|
|
641
|
+
"type": "null"
|
|
642
|
+
},
|
|
643
|
+
{
|
|
644
|
+
"type": "object",
|
|
645
|
+
"additionalProperties": false,
|
|
646
|
+
"required": [
|
|
647
|
+
"state"
|
|
648
|
+
],
|
|
649
|
+
"properties": {
|
|
650
|
+
"state": {
|
|
651
|
+
"type": "string"
|
|
652
|
+
},
|
|
653
|
+
"observedAt": {
|
|
654
|
+
"type": [
|
|
655
|
+
"integer",
|
|
656
|
+
"null"
|
|
657
|
+
]
|
|
658
|
+
},
|
|
659
|
+
"reason": {
|
|
660
|
+
"type": [
|
|
661
|
+
"string",
|
|
662
|
+
"null"
|
|
663
|
+
]
|
|
664
|
+
}
|
|
665
|
+
}
|
|
666
|
+
}
|
|
667
|
+
]
|
|
668
|
+
}
|
|
669
|
+
}
|
|
557
670
|
}
|
|
558
671
|
}
|
|
559
672
|
}
|
|
@@ -0,0 +1,302 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://mhome.ai/schema/core/matter-plugin-management.v1.schema.json",
|
|
4
|
+
"title": "Matter Plugin management payloads",
|
|
5
|
+
"$defs": {
|
|
6
|
+
"nodeDetailRequest": {
|
|
7
|
+
"type": "object",
|
|
8
|
+
"additionalProperties": false,
|
|
9
|
+
"properties": {
|
|
10
|
+
"matterNodeIds": {
|
|
11
|
+
"type": "array",
|
|
12
|
+
"minItems": 1,
|
|
13
|
+
"maxItems": 20,
|
|
14
|
+
"uniqueItems": true,
|
|
15
|
+
"items": {
|
|
16
|
+
"type": "string",
|
|
17
|
+
"minLength": 1,
|
|
18
|
+
"maxLength": 128
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
"required": [
|
|
23
|
+
"matterNodeIds"
|
|
24
|
+
]
|
|
25
|
+
},
|
|
26
|
+
"nodeDetailResponse": {
|
|
27
|
+
"type": "object",
|
|
28
|
+
"additionalProperties": false,
|
|
29
|
+
"properties": {
|
|
30
|
+
"spaceId": {
|
|
31
|
+
"type": "string",
|
|
32
|
+
"minLength": 1,
|
|
33
|
+
"maxLength": 128
|
|
34
|
+
},
|
|
35
|
+
"items": {
|
|
36
|
+
"type": "array",
|
|
37
|
+
"items": {
|
|
38
|
+
"type": "object",
|
|
39
|
+
"additionalProperties": false,
|
|
40
|
+
"properties": {
|
|
41
|
+
"matterNodeId": {
|
|
42
|
+
"type": "string",
|
|
43
|
+
"minLength": 1,
|
|
44
|
+
"maxLength": 128
|
|
45
|
+
},
|
|
46
|
+
"node": {
|
|
47
|
+
"anyOf": [
|
|
48
|
+
{
|
|
49
|
+
"type": "object"
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
"type": "null"
|
|
53
|
+
}
|
|
54
|
+
]
|
|
55
|
+
},
|
|
56
|
+
"error": {
|
|
57
|
+
"anyOf": [
|
|
58
|
+
{
|
|
59
|
+
"type": "object",
|
|
60
|
+
"additionalProperties": false,
|
|
61
|
+
"properties": {
|
|
62
|
+
"message": {
|
|
63
|
+
"type": "string"
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
"required": [
|
|
67
|
+
"message"
|
|
68
|
+
]
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
"type": "null"
|
|
72
|
+
}
|
|
73
|
+
]
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
"required": [
|
|
77
|
+
"matterNodeId",
|
|
78
|
+
"node",
|
|
79
|
+
"error"
|
|
80
|
+
]
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
"required": [
|
|
85
|
+
"spaceId",
|
|
86
|
+
"items"
|
|
87
|
+
]
|
|
88
|
+
},
|
|
89
|
+
"inventoryResponse": {
|
|
90
|
+
"type": "object",
|
|
91
|
+
"additionalProperties": false,
|
|
92
|
+
"properties": {
|
|
93
|
+
"spaceId": {
|
|
94
|
+
"type": "string",
|
|
95
|
+
"minLength": 1,
|
|
96
|
+
"maxLength": 128
|
|
97
|
+
},
|
|
98
|
+
"fabric": {
|
|
99
|
+
"anyOf": [
|
|
100
|
+
{
|
|
101
|
+
"type": "object"
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
"type": "null"
|
|
105
|
+
}
|
|
106
|
+
]
|
|
107
|
+
},
|
|
108
|
+
"membershipComplete": {
|
|
109
|
+
"type": "boolean"
|
|
110
|
+
},
|
|
111
|
+
"inventoryComplete": {
|
|
112
|
+
"type": "boolean"
|
|
113
|
+
},
|
|
114
|
+
"nodes": {
|
|
115
|
+
"type": "array",
|
|
116
|
+
"items": {
|
|
117
|
+
"type": "object",
|
|
118
|
+
"additionalProperties": false,
|
|
119
|
+
"properties": {
|
|
120
|
+
"matterNodeId": {
|
|
121
|
+
"type": "string",
|
|
122
|
+
"minLength": 1,
|
|
123
|
+
"maxLength": 128
|
|
124
|
+
},
|
|
125
|
+
"summary": {
|
|
126
|
+
"anyOf": [
|
|
127
|
+
{
|
|
128
|
+
"type": "object"
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
"type": "null"
|
|
132
|
+
}
|
|
133
|
+
]
|
|
134
|
+
},
|
|
135
|
+
"inventoryComplete": {
|
|
136
|
+
"anyOf": [
|
|
137
|
+
{
|
|
138
|
+
"type": "boolean"
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
"type": "null"
|
|
142
|
+
}
|
|
143
|
+
]
|
|
144
|
+
},
|
|
145
|
+
"devices": {
|
|
146
|
+
"type": "array",
|
|
147
|
+
"items": {
|
|
148
|
+
"type": "object",
|
|
149
|
+
"additionalProperties": false,
|
|
150
|
+
"properties": {
|
|
151
|
+
"sourceDeviceId": {
|
|
152
|
+
"type": "string",
|
|
153
|
+
"minLength": 1,
|
|
154
|
+
"maxLength": 128
|
|
155
|
+
},
|
|
156
|
+
"name": {
|
|
157
|
+
"anyOf": [
|
|
158
|
+
{
|
|
159
|
+
"type": "string"
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
"type": "null"
|
|
163
|
+
}
|
|
164
|
+
]
|
|
165
|
+
},
|
|
166
|
+
"reachable": {
|
|
167
|
+
"anyOf": [
|
|
168
|
+
{
|
|
169
|
+
"type": "boolean"
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
"type": "null"
|
|
173
|
+
}
|
|
174
|
+
]
|
|
175
|
+
},
|
|
176
|
+
"parentSourceDeviceId": {
|
|
177
|
+
"anyOf": [
|
|
178
|
+
{
|
|
179
|
+
"type": "string",
|
|
180
|
+
"minLength": 1,
|
|
181
|
+
"maxLength": 128
|
|
182
|
+
},
|
|
183
|
+
{
|
|
184
|
+
"type": "null"
|
|
185
|
+
}
|
|
186
|
+
]
|
|
187
|
+
},
|
|
188
|
+
"manufacturerName": {
|
|
189
|
+
"anyOf": [
|
|
190
|
+
{
|
|
191
|
+
"type": "string"
|
|
192
|
+
},
|
|
193
|
+
{
|
|
194
|
+
"type": "null"
|
|
195
|
+
}
|
|
196
|
+
]
|
|
197
|
+
},
|
|
198
|
+
"productName": {
|
|
199
|
+
"anyOf": [
|
|
200
|
+
{
|
|
201
|
+
"type": "string"
|
|
202
|
+
},
|
|
203
|
+
{
|
|
204
|
+
"type": "null"
|
|
205
|
+
}
|
|
206
|
+
]
|
|
207
|
+
},
|
|
208
|
+
"endpointId": {
|
|
209
|
+
"anyOf": [
|
|
210
|
+
{
|
|
211
|
+
"type": "integer",
|
|
212
|
+
"minimum": 0
|
|
213
|
+
},
|
|
214
|
+
{
|
|
215
|
+
"type": "null"
|
|
216
|
+
}
|
|
217
|
+
]
|
|
218
|
+
},
|
|
219
|
+
"endpointIds": {
|
|
220
|
+
"anyOf": [
|
|
221
|
+
{
|
|
222
|
+
"type": "array",
|
|
223
|
+
"items": {
|
|
224
|
+
"type": "integer",
|
|
225
|
+
"minimum": 0
|
|
226
|
+
}
|
|
227
|
+
},
|
|
228
|
+
{
|
|
229
|
+
"type": "null"
|
|
230
|
+
}
|
|
231
|
+
]
|
|
232
|
+
},
|
|
233
|
+
"capabilities": {
|
|
234
|
+
"anyOf": [
|
|
235
|
+
{
|
|
236
|
+
"type": "array",
|
|
237
|
+
"items": {
|
|
238
|
+
"type": "string"
|
|
239
|
+
}
|
|
240
|
+
},
|
|
241
|
+
{
|
|
242
|
+
"type": "null"
|
|
243
|
+
}
|
|
244
|
+
]
|
|
245
|
+
}
|
|
246
|
+
},
|
|
247
|
+
"required": [
|
|
248
|
+
"sourceDeviceId",
|
|
249
|
+
"name",
|
|
250
|
+
"reachable",
|
|
251
|
+
"parentSourceDeviceId",
|
|
252
|
+
"manufacturerName",
|
|
253
|
+
"productName",
|
|
254
|
+
"endpointId",
|
|
255
|
+
"endpointIds",
|
|
256
|
+
"capabilities"
|
|
257
|
+
]
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
},
|
|
261
|
+
"required": [
|
|
262
|
+
"matterNodeId",
|
|
263
|
+
"summary",
|
|
264
|
+
"inventoryComplete",
|
|
265
|
+
"devices"
|
|
266
|
+
]
|
|
267
|
+
}
|
|
268
|
+
},
|
|
269
|
+
"errors": {
|
|
270
|
+
"type": "array",
|
|
271
|
+
"items": {
|
|
272
|
+
"type": "object",
|
|
273
|
+
"additionalProperties": false,
|
|
274
|
+
"properties": {
|
|
275
|
+
"source": {
|
|
276
|
+
"enum": [
|
|
277
|
+
"fabric",
|
|
278
|
+
"inventory"
|
|
279
|
+
]
|
|
280
|
+
},
|
|
281
|
+
"message": {
|
|
282
|
+
"type": "string"
|
|
283
|
+
}
|
|
284
|
+
},
|
|
285
|
+
"required": [
|
|
286
|
+
"source",
|
|
287
|
+
"message"
|
|
288
|
+
]
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
},
|
|
292
|
+
"required": [
|
|
293
|
+
"spaceId",
|
|
294
|
+
"fabric",
|
|
295
|
+
"membershipComplete",
|
|
296
|
+
"inventoryComplete",
|
|
297
|
+
"nodes",
|
|
298
|
+
"errors"
|
|
299
|
+
]
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://mhome.ai/schema/core/plugin-management.v1.schema.json",
|
|
4
|
+
"$defs": {
|
|
5
|
+
"preparedOperation": {
|
|
6
|
+
"type": "object", "additionalProperties": false,
|
|
7
|
+
"required": ["preview", "payload"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"preview": {
|
|
10
|
+
"type": "object", "additionalProperties": false,
|
|
11
|
+
"required": ["title", "message", "details"],
|
|
12
|
+
"properties": {"title":{"type":"string","minLength":1},"message":{"type":"string"},"details":{"type":"object"}}
|
|
13
|
+
},
|
|
14
|
+
"payload": {"type":"object"}
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
"event": {
|
|
18
|
+
"type":"object", "additionalProperties":false,
|
|
19
|
+
"required":["version","event","data"],
|
|
20
|
+
"properties": {
|
|
21
|
+
"version":{"const":"v1"},
|
|
22
|
+
"event":{"type":"string","maxLength":256,"pattern":"^[a-z0-9_-]+(/[a-z0-9_-]+)*$"},
|
|
23
|
+
"data":{}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
}
|