@mhome/app-facade-protocol 1.0.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/LICENSE +9 -0
- package/README.md +11 -0
- package/fixtures/actor-link-claim-confirm.request.json +1 -0
- package/fixtures/actor-link-claim-confirm.response.json +1 -0
- package/fixtures/actor-link-claim-event.response.json +1 -0
- package/fixtures/actor-link-claim-status.request.json +1 -0
- package/fixtures/actor-link-claim-status.response.json +1 -0
- package/fixtures/actor-link-code-create.request.json +1 -0
- package/fixtures/actor-link-code-create.response.json +1 -0
- package/fixtures/actor-link-delete.request.json +1 -0
- package/fixtures/actor-link-delete.response.json +1 -0
- package/fixtures/actor-link-list.request.json +1 -0
- package/fixtures/actor-link-list.response.json +1 -0
- package/fixtures/invalid/mismatched-direction.json +5 -0
- package/fixtures/invalid/missing-required-extension.json +5 -0
- package/fixtures/invalid/unknown-request-field.json +5 -0
- package/fixtures/provider-account-delete.request.json +9 -0
- package/fixtures/provider-account-delete.response.json +5 -0
- package/fixtures/provider-account-list.request.json +5 -0
- package/fixtures/provider-account-list.response.json +21 -0
- package/fixtures/provider-account-status.request.json +5 -0
- package/fixtures/provider-account-status.response.json +12 -0
- package/fixtures/provider-account-test.request.json +5 -0
- package/fixtures/provider-account-test.response.json +5 -0
- package/fixtures/provider-account-update.request.json +10 -0
- package/fixtures/provider-account-update.response.json +15 -0
- package/fixtures/provider-list.request.json +14 -0
- package/fixtures/provider-list.response.json +35 -0
- package/fixtures/route-delete.request.json +5 -0
- package/fixtures/route-delete.response.json +5 -0
- package/fixtures/route-list.request.json +5 -0
- package/fixtures/route-list.response.json +55 -0
- package/fixtures/route-update.request.json +21 -0
- package/fixtures/route-update.response.json +29 -0
- package/fixtures/setup-options.request.json +5 -0
- package/fixtures/setup-options.response.json +5 -0
- package/fixtures/setup-start.request.json +9 -0
- package/fixtures/setup-start.response.json +12 -0
- package/fixtures/setup-status.request.json +5 -0
- package/fixtures/setup-status.response.json +14 -0
- package/fixtures/shared-account-grant-create.request.json +5 -0
- package/fixtures/shared-account-grant-create.response.json +5 -0
- package/fixtures/shared-account-grant-delete.request.json +5 -0
- package/fixtures/shared-account-grant-delete.response.json +5 -0
- package/fixtures/shared-account-grant-list.request.json +5 -0
- package/fixtures/shared-account-grant-list.response.json +9 -0
- package/fixtures/surface-bind-code-create.request.json +1 -0
- package/fixtures/surface-bind-code-create.response.json +1 -0
- package/fixtures/surface-dismiss.request.json +1 -0
- package/fixtures/surface-dismiss.response.json +1 -0
- package/fixtures/surface-list.request.json +1 -0
- package/fixtures/surface-list.response.json +1 -0
- package/manifest/app-facade.v1.json +32 -0
- package/manifest/targets.v1.json +57 -0
- package/package.json +43 -0
- package/protocol.json +13 -0
- package/schema/facade-call.v1.schema.json +46 -0
- package/schema/messaging-frame.v3.schema.json +2683 -0
package/package.json
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@mhome/app-facade-protocol",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Build-time protocol artifacts for mhome.app-facade",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "git+https://github.com/mhome-ai/foundation.git",
|
|
9
|
+
"directory": "crates/app-facade-api"
|
|
10
|
+
},
|
|
11
|
+
"homepage": "https://github.com/mhome-ai/foundation#readme",
|
|
12
|
+
"bugs": {
|
|
13
|
+
"url": "https://github.com/mhome-ai/foundation/issues"
|
|
14
|
+
},
|
|
15
|
+
"keywords": [
|
|
16
|
+
"mhome",
|
|
17
|
+
"protocol",
|
|
18
|
+
"json-schema",
|
|
19
|
+
"fixtures"
|
|
20
|
+
],
|
|
21
|
+
"private": false,
|
|
22
|
+
"files": [
|
|
23
|
+
"protocol.json",
|
|
24
|
+
"manifest",
|
|
25
|
+
"contract",
|
|
26
|
+
"schema",
|
|
27
|
+
"fixtures",
|
|
28
|
+
"README.md",
|
|
29
|
+
"LICENSE"
|
|
30
|
+
],
|
|
31
|
+
"exports": {
|
|
32
|
+
"./package.json": "./package.json",
|
|
33
|
+
"./protocol.json": "./protocol.json",
|
|
34
|
+
"./manifest/*": "./manifest/*",
|
|
35
|
+
"./contract/*": "./contract/*",
|
|
36
|
+
"./schema/*": "./schema/*",
|
|
37
|
+
"./fixtures/*": "./fixtures/*"
|
|
38
|
+
},
|
|
39
|
+
"publishConfig": {
|
|
40
|
+
"access": "public",
|
|
41
|
+
"provenance": true
|
|
42
|
+
}
|
|
43
|
+
}
|
package/protocol.json
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"protocol": "mhome.app-facade",
|
|
3
|
+
"contractVersion": "1.0.0",
|
|
4
|
+
"manifest": "manifest/app-facade.v1.json",
|
|
5
|
+
"schemas": {
|
|
6
|
+
"call": "schema/facade-call.v1.schema.json",
|
|
7
|
+
"frame": "schema/messaging-frame.v3.schema.json"
|
|
8
|
+
},
|
|
9
|
+
"fixtures": {
|
|
10
|
+
"valid": "fixtures",
|
|
11
|
+
"invalid": "fixtures/invalid"
|
|
12
|
+
}
|
|
13
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://schemas.mhome.ai/app-facade/facade-call.v1.schema.json",
|
|
4
|
+
"title": "App Facade call",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": ["control", "input"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"control": {
|
|
10
|
+
"type": "object",
|
|
11
|
+
"additionalProperties": false,
|
|
12
|
+
"required": ["mode"],
|
|
13
|
+
"properties": {
|
|
14
|
+
"mode": { "enum": ["direct", "prepare", "commit", "reject"] },
|
|
15
|
+
"preparedActionId": { "type": "string", "minLength": 1, "pattern": ".*\\S.*" },
|
|
16
|
+
"approvalToken": { "type": "string", "minLength": 1, "pattern": ".*\\S.*" },
|
|
17
|
+
"responseFormat": { "enum": ["json", "text"] }
|
|
18
|
+
},
|
|
19
|
+
"allOf": [
|
|
20
|
+
{
|
|
21
|
+
"if": { "properties": { "mode": { "enum": ["direct", "prepare"] } } },
|
|
22
|
+
"then": {
|
|
23
|
+
"not": {
|
|
24
|
+
"anyOf": [
|
|
25
|
+
{ "required": ["preparedActionId"] },
|
|
26
|
+
{ "required": ["approvalToken"] }
|
|
27
|
+
]
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"if": { "properties": { "mode": { "const": "commit" } } },
|
|
33
|
+
"then": { "required": ["preparedActionId", "approvalToken"] }
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"if": { "properties": { "mode": { "const": "reject" } } },
|
|
37
|
+
"then": {
|
|
38
|
+
"required": ["preparedActionId"],
|
|
39
|
+
"not": { "required": ["approvalToken"] }
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
]
|
|
43
|
+
},
|
|
44
|
+
"input": true
|
|
45
|
+
}
|
|
46
|
+
}
|