@mhome/core-protocol 1.52.2 → 1.53.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
|
@@ -46,6 +46,16 @@ idempotent within a source session: replaying the same `operationId` and
|
|
|
46
46
|
request returns the original result, while reusing the ID for a different
|
|
47
47
|
request is rejected.
|
|
48
48
|
|
|
49
|
+
Final business input uses the fixed `complete` route. Its submission identity
|
|
50
|
+
contains the Flow ID, completion command ID, and an owner derived by Core from
|
|
51
|
+
the authenticated Space and principal. The Node persists this input before
|
|
52
|
+
installation in its own business store. Independent `submission/status` and
|
|
53
|
+
`submission/retry` routes work after source-session or Core restart; they still
|
|
54
|
+
require the exact bound Node and current access checks. Status never installs.
|
|
55
|
+
Closing the source session does not undo accepted data. Business mutations and
|
|
56
|
+
applied receipts must commit atomically; a later retry uses current business
|
|
57
|
+
credentials rather than replaying the old final input.
|
|
58
|
+
|
|
49
59
|
Storage separates backing-filesystem capacity from Storage-owned logical
|
|
50
60
|
usage. Namespace is an internal protocol term; user-facing clients present it
|
|
51
61
|
as a Folder.
|
|
@@ -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
|
}
|
package/manifest/core.v1.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"manifest": "mhome.core.v1",
|
|
3
|
-
"contractVersion": "1.
|
|
3
|
+
"contractVersion": "1.53.0",
|
|
4
4
|
"protocols": {
|
|
5
5
|
"agentGateway": {
|
|
6
6
|
"submitTarget": "/agent/submit",
|
|
@@ -16,6 +16,9 @@
|
|
|
16
16
|
"interactionFlowSchema": "schema/interaction-flow-node.v1.schema.json",
|
|
17
17
|
"interactionFlowDefinitionTarget": "/{nodeType}/interaction-flow/definition",
|
|
18
18
|
"interactionFlowExecuteTarget": "/{nodeType}/interaction-flow/execute",
|
|
19
|
+
"interactionFlowCompleteTarget": "/{nodeType}/interaction-flow/complete",
|
|
20
|
+
"interactionFlowSubmissionStatusTarget": "/{nodeType}/interaction-flow/submission/status",
|
|
21
|
+
"interactionFlowSubmissionRetryTarget": "/{nodeType}/interaction-flow/submission/retry",
|
|
19
22
|
"interactionFlowCloseTarget": "/{nodeType}/interaction-flow/close",
|
|
20
23
|
"metadataTarget": "/node/metadata",
|
|
21
24
|
"metadataSchema": "schema/node-metadata.v1.schema.json",
|
package/package.json
CHANGED
package/protocol.json
CHANGED
|
@@ -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
|
}
|