@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.
Files changed (58) hide show
  1. package/LICENSE +9 -0
  2. package/README.md +11 -0
  3. package/fixtures/actor-link-claim-confirm.request.json +1 -0
  4. package/fixtures/actor-link-claim-confirm.response.json +1 -0
  5. package/fixtures/actor-link-claim-event.response.json +1 -0
  6. package/fixtures/actor-link-claim-status.request.json +1 -0
  7. package/fixtures/actor-link-claim-status.response.json +1 -0
  8. package/fixtures/actor-link-code-create.request.json +1 -0
  9. package/fixtures/actor-link-code-create.response.json +1 -0
  10. package/fixtures/actor-link-delete.request.json +1 -0
  11. package/fixtures/actor-link-delete.response.json +1 -0
  12. package/fixtures/actor-link-list.request.json +1 -0
  13. package/fixtures/actor-link-list.response.json +1 -0
  14. package/fixtures/invalid/mismatched-direction.json +5 -0
  15. package/fixtures/invalid/missing-required-extension.json +5 -0
  16. package/fixtures/invalid/unknown-request-field.json +5 -0
  17. package/fixtures/provider-account-delete.request.json +9 -0
  18. package/fixtures/provider-account-delete.response.json +5 -0
  19. package/fixtures/provider-account-list.request.json +5 -0
  20. package/fixtures/provider-account-list.response.json +21 -0
  21. package/fixtures/provider-account-status.request.json +5 -0
  22. package/fixtures/provider-account-status.response.json +12 -0
  23. package/fixtures/provider-account-test.request.json +5 -0
  24. package/fixtures/provider-account-test.response.json +5 -0
  25. package/fixtures/provider-account-update.request.json +10 -0
  26. package/fixtures/provider-account-update.response.json +15 -0
  27. package/fixtures/provider-list.request.json +14 -0
  28. package/fixtures/provider-list.response.json +35 -0
  29. package/fixtures/route-delete.request.json +5 -0
  30. package/fixtures/route-delete.response.json +5 -0
  31. package/fixtures/route-list.request.json +5 -0
  32. package/fixtures/route-list.response.json +55 -0
  33. package/fixtures/route-update.request.json +21 -0
  34. package/fixtures/route-update.response.json +29 -0
  35. package/fixtures/setup-options.request.json +5 -0
  36. package/fixtures/setup-options.response.json +5 -0
  37. package/fixtures/setup-start.request.json +9 -0
  38. package/fixtures/setup-start.response.json +12 -0
  39. package/fixtures/setup-status.request.json +5 -0
  40. package/fixtures/setup-status.response.json +14 -0
  41. package/fixtures/shared-account-grant-create.request.json +5 -0
  42. package/fixtures/shared-account-grant-create.response.json +5 -0
  43. package/fixtures/shared-account-grant-delete.request.json +5 -0
  44. package/fixtures/shared-account-grant-delete.response.json +5 -0
  45. package/fixtures/shared-account-grant-list.request.json +5 -0
  46. package/fixtures/shared-account-grant-list.response.json +9 -0
  47. package/fixtures/surface-bind-code-create.request.json +1 -0
  48. package/fixtures/surface-bind-code-create.response.json +1 -0
  49. package/fixtures/surface-dismiss.request.json +1 -0
  50. package/fixtures/surface-dismiss.response.json +1 -0
  51. package/fixtures/surface-list.request.json +1 -0
  52. package/fixtures/surface-list.response.json +1 -0
  53. package/manifest/app-facade.v1.json +32 -0
  54. package/manifest/targets.v1.json +57 -0
  55. package/package.json +43 -0
  56. package/protocol.json +13 -0
  57. package/schema/facade-call.v1.schema.json +46 -0
  58. 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
+ }