@mhome/core-protocol 1.12.0 → 1.13.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 +13 -0
- package/contract/host-management-v1.json +73 -0
- package/manifest/core.v1.json +5 -1
- package/package.json +1 -1
- package/protocol.json +2 -1
- package/schema/host-management-request.v1.schema.json +138 -0
package/README.md
CHANGED
|
@@ -63,3 +63,16 @@ matching JSON structures. Platform collectors may keep private sampling structs;
|
|
|
63
63
|
only the canonical DTOs cross HTTP/IPC boundaries. The permissions contract is in
|
|
64
64
|
`contract/host-permissions.md`; runtime permission handlers remain a separate
|
|
65
65
|
implementation step. The existing Core external runtime protocol stays at 15.
|
|
66
|
+
|
|
67
|
+
## Native Client Host management
|
|
68
|
+
|
|
69
|
+
`host::management` defines the generic runtime request/action and response envelope.
|
|
70
|
+
Runtime implementations supply their component ID type. The matching language-neutral
|
|
71
|
+
contract is `contract/host-management-v1.json`; request validation uses
|
|
72
|
+
`schema/host-management-request.v1.schema.json`.
|
|
73
|
+
|
|
74
|
+
Desktop/CLI use Clientd IPC `host.list` and `host.runtime`; mobile Clients expose the
|
|
75
|
+
same operations through `hostList` / `hostRuntime`. None accepts a Space ID. Clients
|
|
76
|
+
discover `_mhome-host._tcp`, verify reply Host IDs, and unwrap the HTTP runtime envelope.
|
|
77
|
+
Install/restart submissions are not automatically replayed after transport failure.
|
|
78
|
+
Existing LAN access semantics remain; this release does not add a trust/pairing protocol.
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
{
|
|
2
|
+
"contract": "mhome.host-management.v1",
|
|
3
|
+
"transport": "native-client",
|
|
4
|
+
"requiresSpace": false,
|
|
5
|
+
"discoveryService": "_mhome-host._tcp",
|
|
6
|
+
"methods": {
|
|
7
|
+
"list": {
|
|
8
|
+
"nativeMethod": "hostList",
|
|
9
|
+
"desktopCommand": "host_list",
|
|
10
|
+
"ipcMethod": "host.list"
|
|
11
|
+
},
|
|
12
|
+
"runtime": {
|
|
13
|
+
"nativeMethod": "hostRuntime",
|
|
14
|
+
"desktopCommand": "host_runtime",
|
|
15
|
+
"ipcMethod": "host.runtime"
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
"actions": {
|
|
19
|
+
"inspect": {
|
|
20
|
+
"path": "/v1/runtime",
|
|
21
|
+
"method": "POST"
|
|
22
|
+
},
|
|
23
|
+
"metrics": {
|
|
24
|
+
"path": "/metrics",
|
|
25
|
+
"method": "GET"
|
|
26
|
+
},
|
|
27
|
+
"plan": {
|
|
28
|
+
"path": "/v1/runtime",
|
|
29
|
+
"method": "POST"
|
|
30
|
+
},
|
|
31
|
+
"start": {
|
|
32
|
+
"path": "/v1/runtime",
|
|
33
|
+
"method": "POST"
|
|
34
|
+
},
|
|
35
|
+
"operation": {
|
|
36
|
+
"path": "/v1/runtime",
|
|
37
|
+
"method": "POST"
|
|
38
|
+
},
|
|
39
|
+
"restartOperation": {
|
|
40
|
+
"path": "/v1/runtime",
|
|
41
|
+
"method": "POST"
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
"requestFields": [
|
|
45
|
+
"hostId",
|
|
46
|
+
"action",
|
|
47
|
+
"components",
|
|
48
|
+
"all",
|
|
49
|
+
"planId",
|
|
50
|
+
"operationId",
|
|
51
|
+
"component"
|
|
52
|
+
],
|
|
53
|
+
"listResponse": {
|
|
54
|
+
"hosts": "array of HostListEntry",
|
|
55
|
+
"entryRequired": [
|
|
56
|
+
"hostId",
|
|
57
|
+
"hostName",
|
|
58
|
+
"isLocal",
|
|
59
|
+
"reachable"
|
|
60
|
+
],
|
|
61
|
+
"info": "HostInfo or null",
|
|
62
|
+
"infoError": "string or null"
|
|
63
|
+
},
|
|
64
|
+
"runtimeResponse": {
|
|
65
|
+
"metrics": "HostMetrics",
|
|
66
|
+
"otherActions": "HostRuntimeResponse.data (envelope verified by Client)"
|
|
67
|
+
},
|
|
68
|
+
"networkPolicy": {
|
|
69
|
+
"requiresLocalNetwork": true,
|
|
70
|
+
"invalidateOnNetworkChange": true,
|
|
71
|
+
"mutationsAutomaticallyRetried": false
|
|
72
|
+
}
|
|
73
|
+
}
|
package/manifest/core.v1.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"manifest": "mhome.core.v1",
|
|
3
|
-
"contractVersion": "1.
|
|
3
|
+
"contractVersion": "1.13.0",
|
|
4
4
|
"protocols": {
|
|
5
5
|
"agentGateway": {
|
|
6
6
|
"submitTarget": "/agent/submit",
|
|
@@ -76,5 +76,9 @@
|
|
|
76
76
|
"unknown"
|
|
77
77
|
]
|
|
78
78
|
}
|
|
79
|
+
},
|
|
80
|
+
"hostManagement": {
|
|
81
|
+
"contract": "contract/host-management-v1.json",
|
|
82
|
+
"requestSchema": "schema/host-management-request.v1.schema.json"
|
|
79
83
|
}
|
|
80
84
|
}
|
package/package.json
CHANGED
package/protocol.json
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"protocol": "mhome.core",
|
|
3
|
-
"contractVersion": "1.
|
|
3
|
+
"contractVersion": "1.13.0",
|
|
4
4
|
"manifest": "manifest/core.v1.json",
|
|
5
5
|
"schemas": {
|
|
6
|
+
"hostManagementRequest": "schema/host-management-request.v1.schema.json",
|
|
6
7
|
"normalizedInbound": "schema/normalized-inbound.v4.schema.json",
|
|
7
8
|
"messagingCommands": "schema/messaging-commands.v1.schema.json",
|
|
8
9
|
"interactionFlowNode": "schema/interaction-flow-node.v1.schema.json",
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"oneOf": [
|
|
4
|
+
{
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": [
|
|
8
|
+
"hostId",
|
|
9
|
+
"action"
|
|
10
|
+
],
|
|
11
|
+
"properties": {
|
|
12
|
+
"hostId": {
|
|
13
|
+
"type": "string",
|
|
14
|
+
"minLength": 1
|
|
15
|
+
},
|
|
16
|
+
"action": {
|
|
17
|
+
"const": "inspect"
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"type": "object",
|
|
23
|
+
"additionalProperties": false,
|
|
24
|
+
"required": [
|
|
25
|
+
"hostId",
|
|
26
|
+
"action"
|
|
27
|
+
],
|
|
28
|
+
"properties": {
|
|
29
|
+
"hostId": {
|
|
30
|
+
"type": "string",
|
|
31
|
+
"minLength": 1
|
|
32
|
+
},
|
|
33
|
+
"action": {
|
|
34
|
+
"const": "metrics"
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"type": "object",
|
|
40
|
+
"additionalProperties": false,
|
|
41
|
+
"required": [
|
|
42
|
+
"hostId",
|
|
43
|
+
"action",
|
|
44
|
+
"components"
|
|
45
|
+
],
|
|
46
|
+
"properties": {
|
|
47
|
+
"hostId": {
|
|
48
|
+
"type": "string",
|
|
49
|
+
"minLength": 1
|
|
50
|
+
},
|
|
51
|
+
"action": {
|
|
52
|
+
"const": "plan"
|
|
53
|
+
},
|
|
54
|
+
"components": {
|
|
55
|
+
"type": "array",
|
|
56
|
+
"items": {
|
|
57
|
+
"type": "string",
|
|
58
|
+
"minLength": 1
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
"all": {
|
|
62
|
+
"type": "boolean"
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
"type": "object",
|
|
68
|
+
"additionalProperties": false,
|
|
69
|
+
"required": [
|
|
70
|
+
"hostId",
|
|
71
|
+
"action",
|
|
72
|
+
"planId"
|
|
73
|
+
],
|
|
74
|
+
"properties": {
|
|
75
|
+
"hostId": {
|
|
76
|
+
"type": "string",
|
|
77
|
+
"minLength": 1
|
|
78
|
+
},
|
|
79
|
+
"action": {
|
|
80
|
+
"const": "start"
|
|
81
|
+
},
|
|
82
|
+
"planId": {
|
|
83
|
+
"type": "string",
|
|
84
|
+
"minLength": 1
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
"type": "object",
|
|
90
|
+
"additionalProperties": false,
|
|
91
|
+
"required": [
|
|
92
|
+
"hostId",
|
|
93
|
+
"action",
|
|
94
|
+
"operationId"
|
|
95
|
+
],
|
|
96
|
+
"properties": {
|
|
97
|
+
"hostId": {
|
|
98
|
+
"type": "string",
|
|
99
|
+
"minLength": 1
|
|
100
|
+
},
|
|
101
|
+
"action": {
|
|
102
|
+
"const": "operation"
|
|
103
|
+
},
|
|
104
|
+
"operationId": {
|
|
105
|
+
"type": "string",
|
|
106
|
+
"minLength": 1
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
"type": "object",
|
|
112
|
+
"additionalProperties": false,
|
|
113
|
+
"required": [
|
|
114
|
+
"hostId",
|
|
115
|
+
"action",
|
|
116
|
+
"operationId",
|
|
117
|
+
"component"
|
|
118
|
+
],
|
|
119
|
+
"properties": {
|
|
120
|
+
"hostId": {
|
|
121
|
+
"type": "string",
|
|
122
|
+
"minLength": 1
|
|
123
|
+
},
|
|
124
|
+
"action": {
|
|
125
|
+
"const": "restartOperation"
|
|
126
|
+
},
|
|
127
|
+
"operationId": {
|
|
128
|
+
"type": "string",
|
|
129
|
+
"minLength": 1
|
|
130
|
+
},
|
|
131
|
+
"component": {
|
|
132
|
+
"type": "string",
|
|
133
|
+
"minLength": 1
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
]
|
|
138
|
+
}
|