@mhome/artifact-protocol 1.6.1 → 1.7.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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "manifest": "mhome.artifact.v1",
3
- "contractVersion": "1.6.1",
3
+ "contractVersion": "1.7.0",
4
4
  "uriPrefix": "meow-artifact://v1/",
5
5
  "kinds": [
6
6
  "image",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mhome/artifact-protocol",
3
- "version": "1.6.1",
3
+ "version": "1.7.0",
4
4
  "description": "Build-time protocol artifacts for mhome.artifact",
5
5
  "license": "MIT",
6
6
  "repository": {
package/protocol.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "protocol": "mhome.artifact",
3
- "contractVersion": "1.6.1",
3
+ "contractVersion": "1.7.0",
4
4
  "manifest": "manifest/artifact.v1.json",
5
5
  "schemas": {
6
6
  "artifactMetadata": "schema/artifact-metadata.v1.schema.json",
@@ -3,52 +3,152 @@
3
3
  "$id": "https://mhome.ai/schema/artifact-resolve.v1.schema.json",
4
4
  "title": "mHome Artifact Resolve v1",
5
5
  "oneOf": [
6
- { "$ref": "#/$defs/request" },
7
- { "$ref": "#/$defs/response" }
6
+ {
7
+ "$ref": "#/$defs/request"
8
+ },
9
+ {
10
+ "$ref": "#/$defs/response"
11
+ }
8
12
  ],
9
13
  "$defs": {
10
14
  "request": {
11
15
  "type": "object",
12
16
  "additionalProperties": false,
13
- "required": ["uri"],
17
+ "required": [
18
+ "uri"
19
+ ],
14
20
  "properties": {
15
- "uri": { "type": "string", "pattern": "^meow-artifact://v1/", "maxLength": 2048 }
21
+ "uri": {
22
+ "type": "string",
23
+ "pattern": "^meow-artifact://v1/",
24
+ "maxLength": 2048
25
+ }
16
26
  }
17
27
  },
18
28
  "response": {
19
29
  "type": "object",
20
30
  "additionalProperties": false,
21
- "required": ["uri", "kind", "mimeType", "sizeBytes", "delivery"],
31
+ "required": [
32
+ "uri",
33
+ "kind",
34
+ "mimeType",
35
+ "sizeBytes",
36
+ "delivery"
37
+ ],
22
38
  "properties": {
23
- "uri": { "type": "string", "pattern": "^meow-artifact://v1/", "maxLength": 2048 },
24
- "kind": { "enum": ["IMAGE", "AUDIO", "VIDEO", "FILE"] },
25
- "mimeType": { "type": "string", "minLength": 3, "maxLength": 255 },
26
- "sizeBytes": { "type": "integer", "minimum": 1, "maximum": 9007199254740991 },
27
- "width": { "type": "integer", "minimum": 1, "maximum": 2147483647 },
28
- "height": { "type": "integer", "minimum": 1, "maximum": 2147483647 },
29
- "durationMillis": { "type": "integer", "minimum": 1, "maximum": 9007199254740991 },
39
+ "uri": {
40
+ "type": "string",
41
+ "pattern": "^meow-artifact://v1/",
42
+ "maxLength": 2048
43
+ },
44
+ "kind": {
45
+ "enum": [
46
+ "IMAGE",
47
+ "AUDIO",
48
+ "VIDEO",
49
+ "FILE"
50
+ ]
51
+ },
52
+ "mimeType": {
53
+ "type": "string",
54
+ "minLength": 3,
55
+ "maxLength": 255
56
+ },
57
+ "sizeBytes": {
58
+ "type": "integer",
59
+ "minimum": 1,
60
+ "maximum": 9007199254740991
61
+ },
62
+ "width": {
63
+ "type": "integer",
64
+ "minimum": 1,
65
+ "maximum": 2147483647
66
+ },
67
+ "height": {
68
+ "type": "integer",
69
+ "minimum": 1,
70
+ "maximum": 2147483647
71
+ },
72
+ "durationMillis": {
73
+ "type": "integer",
74
+ "minimum": 1,
75
+ "maximum": 9007199254740991
76
+ },
30
77
  "delivery": {
31
78
  "oneOf": [
32
79
  {
33
80
  "type": "object",
34
81
  "additionalProperties": false,
35
- "required": ["type", "dataUrl"],
82
+ "required": [
83
+ "type",
84
+ "dataUrl"
85
+ ],
36
86
  "properties": {
37
- "type": { "const": "DATA_URL" },
38
- "dataUrl": { "type": "string", "pattern": "^data:[^;,]+;base64,.+$" }
87
+ "type": {
88
+ "const": "DATA_URL"
89
+ },
90
+ "dataUrl": {
91
+ "type": "string",
92
+ "pattern": "^data:[^;,]+;base64,.+$"
93
+ }
39
94
  }
40
95
  },
41
96
  {
42
97
  "type": "object",
43
98
  "additionalProperties": false,
44
- "required": ["type", "url", "expiresAtUnixMs"],
99
+ "required": [
100
+ "type",
101
+ "url",
102
+ "expiresAtUnixMs"
103
+ ],
45
104
  "properties": {
46
- "type": { "const": "SIGNED_URL" },
47
- "url": { "type": "string", "pattern": "^https?://" },
48
- "expiresAtUnixMs": { "type": "integer", "minimum": 1, "maximum": 9007199254740991 }
105
+ "type": {
106
+ "const": "SIGNED_URL"
107
+ },
108
+ "url": {
109
+ "type": "string",
110
+ "pattern": "^https?://"
111
+ },
112
+ "expiresAtUnixMs": {
113
+ "type": "integer",
114
+ "minimum": 1,
115
+ "maximum": 9007199254740991
116
+ }
49
117
  }
50
118
  }
51
119
  ]
120
+ },
121
+ "hostIdentity": {
122
+ "type": "object",
123
+ "additionalProperties": false,
124
+ "required": [
125
+ "hostId",
126
+ "publicKey"
127
+ ],
128
+ "properties": {
129
+ "hostId": {
130
+ "type": "string",
131
+ "minLength": 1
132
+ },
133
+ "publicKey": {
134
+ "type": "object",
135
+ "additionalProperties": false,
136
+ "required": [
137
+ "x",
138
+ "y"
139
+ ],
140
+ "properties": {
141
+ "x": {
142
+ "type": "string",
143
+ "pattern": "^[A-Za-z0-9_-]{43}$"
144
+ },
145
+ "y": {
146
+ "type": "string",
147
+ "pattern": "^[A-Za-z0-9_-]{43}$"
148
+ }
149
+ }
150
+ }
151
+ }
52
152
  }
53
153
  }
54
154
  }
@@ -78,6 +78,38 @@
78
78
  "type": "integer",
79
79
  "minimum": 1,
80
80
  "maximum": 9007199254740991
81
+ },
82
+ "hostIdentity": {
83
+ "type": "object",
84
+ "additionalProperties": false,
85
+ "required": [
86
+ "hostId",
87
+ "publicKey"
88
+ ],
89
+ "properties": {
90
+ "hostId": {
91
+ "type": "string",
92
+ "minLength": 1
93
+ },
94
+ "publicKey": {
95
+ "type": "object",
96
+ "additionalProperties": false,
97
+ "required": [
98
+ "x",
99
+ "y"
100
+ ],
101
+ "properties": {
102
+ "x": {
103
+ "type": "string",
104
+ "pattern": "^[A-Za-z0-9_-]{43}$"
105
+ },
106
+ "y": {
107
+ "type": "string",
108
+ "pattern": "^[A-Za-z0-9_-]{43}$"
109
+ }
110
+ }
111
+ }
112
+ }
81
113
  }
82
114
  }
83
115
  }