@mhome/core-protocol 1.52.4 → 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 +19 -0
- package/contract/plugin-management-v1.md +63 -0
- package/fixtures/camera-plugin-management.conformance.json +26 -2
- package/fixtures/interaction-flow-node.conformance.json +47 -6
- package/fixtures/operation-timeouts.conformance.json +3 -1
- package/manifest/core.v1.json +27 -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/interaction-flow-node.v1.schema.json +8 -2
- 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
|
|
@@ -46,6 +51,16 @@ idempotent within a source session: replaying the same `operationId` and
|
|
|
46
51
|
request returns the original result, while reusing the ID for a different
|
|
47
52
|
request is rejected.
|
|
48
53
|
|
|
54
|
+
Final business input uses the fixed `complete` route. Its submission identity
|
|
55
|
+
contains the Flow ID, completion command ID, and an owner derived by Core from
|
|
56
|
+
the authenticated Space and principal. The Node persists this input before
|
|
57
|
+
installation in its own business store. Independent `submission/status` and
|
|
58
|
+
`submission/retry` routes work after source-session or Core restart; they still
|
|
59
|
+
require the exact bound Node and current access checks. Status never installs.
|
|
60
|
+
Closing the source session does not undo accepted data. Business mutations and
|
|
61
|
+
applied receipts must commit atomically; a later retry uses current business
|
|
62
|
+
credentials rather than replaying the old final input.
|
|
63
|
+
|
|
49
64
|
Storage separates backing-filesystem capacity from Storage-owned logical
|
|
50
65
|
usage. Namespace is an internal protocol term; user-facing clients present it
|
|
51
66
|
as a Folder.
|
|
@@ -181,6 +196,10 @@ of a completed result or timeout error; it never grants the callee more executio
|
|
|
181
196
|
time. Existing domain-owned lifetimes (streams, subscriptions, long batch jobs)
|
|
182
197
|
and implementation-specific step timeouts are not replaced by a default request
|
|
183
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.
|
|
184
203
|
|
|
185
204
|
`execution_budget::Budgeted<T>` adds optional `executionBudget: { remainingMs }`
|
|
186
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": [
|
|
@@ -43,7 +43,9 @@
|
|
|
43
43
|
},
|
|
44
44
|
"renderRefs": []
|
|
45
45
|
},
|
|
46
|
-
"transition": {
|
|
46
|
+
"transition": {
|
|
47
|
+
"type": "finish"
|
|
48
|
+
}
|
|
47
49
|
}
|
|
48
50
|
},
|
|
49
51
|
"resolvers": {},
|
|
@@ -51,8 +53,18 @@
|
|
|
51
53
|
"complete": {
|
|
52
54
|
"operation": "provider.save",
|
|
53
55
|
"args": [
|
|
54
|
-
{
|
|
55
|
-
|
|
56
|
+
{
|
|
57
|
+
"type": "ref",
|
|
58
|
+
"valueRef": {
|
|
59
|
+
"root": "$host"
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
"type": "ref",
|
|
64
|
+
"valueRef": {
|
|
65
|
+
"root": "$password"
|
|
66
|
+
}
|
|
67
|
+
}
|
|
56
68
|
]
|
|
57
69
|
}
|
|
58
70
|
}
|
|
@@ -62,12 +74,16 @@
|
|
|
62
74
|
"flowId": "provider.connect",
|
|
63
75
|
"sourceSessionId": "source-session-1",
|
|
64
76
|
"definitionRevision": "sha256:demo",
|
|
65
|
-
"operation": "provider.
|
|
77
|
+
"operation": "provider.discover",
|
|
66
78
|
"operationId": "operation-1",
|
|
67
|
-
"args": [
|
|
79
|
+
"args": [
|
|
80
|
+
"192.0.2.1"
|
|
81
|
+
]
|
|
68
82
|
},
|
|
69
83
|
"executeResponse": {
|
|
70
|
-
"data": {
|
|
84
|
+
"data": {
|
|
85
|
+
"cameras": []
|
|
86
|
+
}
|
|
71
87
|
},
|
|
72
88
|
"closeRequest": {
|
|
73
89
|
"flowId": "provider.connect",
|
|
@@ -77,5 +93,30 @@
|
|
|
77
93
|
},
|
|
78
94
|
"closeResponse": {
|
|
79
95
|
"closed": true
|
|
96
|
+
},
|
|
97
|
+
"completeRequest": {
|
|
98
|
+
"submission": {
|
|
99
|
+
"flowId": "provider.connect",
|
|
100
|
+
"submissionId": "command-3",
|
|
101
|
+
"owner": "server-derived-owner"
|
|
102
|
+
},
|
|
103
|
+
"sourceSessionId": "source-session-1",
|
|
104
|
+
"definitionRevision": "sha256:demo",
|
|
105
|
+
"operation": "provider.save",
|
|
106
|
+
"args": [
|
|
107
|
+
"192.0.2.1",
|
|
108
|
+
"fictional-secret"
|
|
109
|
+
]
|
|
110
|
+
},
|
|
111
|
+
"submissionRequest": {
|
|
112
|
+
"flowId": "provider.connect",
|
|
113
|
+
"submissionId": "command-3",
|
|
114
|
+
"owner": "server-derived-owner"
|
|
115
|
+
},
|
|
116
|
+
"submissionResponse": {
|
|
117
|
+
"status": "completed",
|
|
118
|
+
"result": {
|
|
119
|
+
"providerConnectionId": "provider-1"
|
|
120
|
+
}
|
|
80
121
|
}
|
|
81
122
|
}
|
|
@@ -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,17 +10,41 @@
|
|
|
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",
|
|
16
19
|
"interactionFlowSchema": "schema/interaction-flow-node.v1.schema.json",
|
|
17
20
|
"interactionFlowDefinitionTarget": "/{nodeType}/interaction-flow/definition",
|
|
18
21
|
"interactionFlowExecuteTarget": "/{nodeType}/interaction-flow/execute",
|
|
22
|
+
"interactionFlowCompleteTarget": "/{nodeType}/interaction-flow/complete",
|
|
23
|
+
"interactionFlowSubmissionStatusTarget": "/{nodeType}/interaction-flow/submission/status",
|
|
24
|
+
"interactionFlowSubmissionRetryTarget": "/{nodeType}/interaction-flow/submission/retry",
|
|
19
25
|
"interactionFlowCloseTarget": "/{nodeType}/interaction-flow/close",
|
|
20
26
|
"metadataTarget": "/node/metadata",
|
|
21
27
|
"metadataSchema": "schema/node-metadata.v1.schema.json",
|
|
22
28
|
"metadataContract": "contract/node-metadata-v1.md"
|
|
23
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
|
+
},
|
|
24
48
|
"cameraPlugin": {
|
|
25
49
|
"version": "v1",
|
|
26
50
|
"nodeType": "camera",
|
|
@@ -66,10 +90,10 @@
|
|
|
66
90
|
"commandsSchema": "schema/messaging-commands.v1.schema.json"
|
|
67
91
|
},
|
|
68
92
|
"storage": {
|
|
69
|
-
"version": "storage.
|
|
93
|
+
"version": "storage.v5"
|
|
70
94
|
},
|
|
71
95
|
"hostDelivery": {
|
|
72
|
-
"externalProtocolVersion":
|
|
96
|
+
"externalProtocolVersion": 25,
|
|
73
97
|
"requestKind": "deliveryRequested",
|
|
74
98
|
"connectionControlKind": "connectionControlRequested",
|
|
75
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
|
}
|
|
@@ -11,7 +11,10 @@
|
|
|
11
11
|
"executeRequest": { "$ref": "#/$defs/executeRequest" },
|
|
12
12
|
"executeResponse": { "$ref": "#/$defs/executeResponse" },
|
|
13
13
|
"closeRequest": { "$ref": "#/$defs/closeRequest" },
|
|
14
|
-
"closeResponse": { "$ref": "#/$defs/closeResponse" }
|
|
14
|
+
"closeResponse": { "$ref": "#/$defs/closeResponse" },
|
|
15
|
+
"completeRequest": { "$ref": "#/$defs/completeRequest" },
|
|
16
|
+
"submissionRequest": { "$ref": "#/$defs/submissionRequest" },
|
|
17
|
+
"submissionResponse": { "$ref": "#/$defs/submissionResponse" }
|
|
15
18
|
},
|
|
16
19
|
"$defs": {
|
|
17
20
|
"nonEmpty": { "type": "string", "minLength": 1, "maxLength": 128 },
|
|
@@ -273,6 +276,9 @@
|
|
|
273
276
|
"additionalProperties": true,
|
|
274
277
|
"required": ["closed"],
|
|
275
278
|
"properties": { "closed": { "type": "boolean" } }
|
|
276
|
-
}
|
|
279
|
+
},
|
|
280
|
+
"submissionRequest": {"type": "object", "additionalProperties": false, "required": ["flowId", "submissionId", "owner"], "properties": {"flowId": {"type": "string", "minLength": 1, "maxLength": 256}, "submissionId": {"type": "string", "minLength": 1, "maxLength": 256}, "owner": {"type": "string", "minLength": 1, "maxLength": 256}}},
|
|
281
|
+
"submissionResponse": {"oneOf": [{"type": "object", "additionalProperties": false, "required": ["status"], "properties": {"status": {"const": "notFound"}}}, {"type": "object", "additionalProperties": false, "required": ["status"], "properties": {"status": {"const": "accepted"}}}, {"type": "object", "additionalProperties": false, "required": ["status", "result"], "properties": {"status": {"const": "completed"}, "result": true}}]},
|
|
282
|
+
"completeRequest": {"type": "object", "additionalProperties": false, "required": ["submission", "sourceSessionId", "definitionRevision", "operation"], "properties": {"submission": {"$ref": "#/$defs/submissionRequest"}, "sourceSessionId": {"type": "string", "minLength": 1, "maxLength": 256}, "definitionRevision": {"type": "string", "minLength": 1, "maxLength": 256}, "operation": {"type": "string", "minLength": 1, "maxLength": 256}, "args": {"type": "array", "maxItems": 128}}}
|
|
277
283
|
}
|
|
278
284
|
}
|
|
@@ -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
|
+
}
|