@mhome/artifact-protocol 1.3.0 → 1.5.1
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 +2 -0
- package/manifest/artifact.v1.json +1 -1
- package/package.json +1 -1
- package/protocol.json +1 -1
- package/schema/artifact-put.v1.schema.json +82 -16
- package/schema/artifact-upload.v1.schema.json +61 -13
package/README.md
CHANGED
|
@@ -17,3 +17,5 @@ TTL, storage placement, filesystem paths, signed URLs, and cloud object keys are
|
|
|
17
17
|
runtime concerns and are deliberately not encoded into an artifact reference.
|
|
18
18
|
|
|
19
19
|
Capability media values (`Image`, `Audio`) use `MediaReference`: exactly `{ "uri": "meow-artifact://v1/..." }`. The reference has no URL, inline bytes, MIME or creation timestamp fields. Parse and check kind and tenant/scope at capability boundaries; do not implicitly import media. Upload bytes with `PutArtifactRequest` or explicitly download finite HTTP(S) content with `ImportArtifactRequest` via `/app/artifact/put` and `/app/artifact/import`. Storage metadata and upload transports retain their MIME and byte fields. Resolve to temporary delivery URLs only at consumers. Conversation media sources retain their existing tagged artifact protocol. Video storage remains unsupported by the runtimes.
|
|
20
|
+
|
|
21
|
+
Upload/import preserves bytes. Callers perform conversion before upload. Public ingress is limited to 1 MiB; internal producers retain their own limits. The shared reference and storage contracts do not impose the public ingress limit.
|
package/package.json
CHANGED
package/protocol.json
CHANGED
|
@@ -3,35 +3,101 @@
|
|
|
3
3
|
"$id": "https://mhome.ai/schema/artifact-put.v1.schema.json",
|
|
4
4
|
"title": "mHome Artifact Put v1",
|
|
5
5
|
"oneOf": [
|
|
6
|
-
{
|
|
7
|
-
|
|
6
|
+
{
|
|
7
|
+
"$ref": "#/$defs/request"
|
|
8
|
+
},
|
|
9
|
+
{
|
|
10
|
+
"$ref": "#/$defs/response"
|
|
11
|
+
}
|
|
8
12
|
],
|
|
9
13
|
"$defs": {
|
|
10
14
|
"metadata": {
|
|
11
15
|
"type": "object",
|
|
12
16
|
"additionalProperties": false,
|
|
13
|
-
"required": [
|
|
17
|
+
"required": [
|
|
18
|
+
"uri",
|
|
19
|
+
"kind",
|
|
20
|
+
"mimeType",
|
|
21
|
+
"sizeBytes"
|
|
22
|
+
],
|
|
14
23
|
"properties": {
|
|
15
|
-
"uri": {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
"
|
|
21
|
-
|
|
24
|
+
"uri": {
|
|
25
|
+
"type": "string",
|
|
26
|
+
"pattern": "^meow-artifact://v1/",
|
|
27
|
+
"maxLength": 2048
|
|
28
|
+
},
|
|
29
|
+
"kind": {
|
|
30
|
+
"enum": [
|
|
31
|
+
"IMAGE",
|
|
32
|
+
"AUDIO",
|
|
33
|
+
"VIDEO",
|
|
34
|
+
"FILE"
|
|
35
|
+
]
|
|
36
|
+
},
|
|
37
|
+
"mimeType": {
|
|
38
|
+
"type": "string",
|
|
39
|
+
"minLength": 3,
|
|
40
|
+
"maxLength": 255
|
|
41
|
+
},
|
|
42
|
+
"sizeBytes": {
|
|
43
|
+
"type": "integer",
|
|
44
|
+
"minimum": 1,
|
|
45
|
+
"maximum": 9007199254740991
|
|
46
|
+
},
|
|
47
|
+
"width": {
|
|
48
|
+
"type": "integer",
|
|
49
|
+
"minimum": 1,
|
|
50
|
+
"maximum": 2147483647
|
|
51
|
+
},
|
|
52
|
+
"height": {
|
|
53
|
+
"type": "integer",
|
|
54
|
+
"minimum": 1,
|
|
55
|
+
"maximum": 2147483647
|
|
56
|
+
},
|
|
57
|
+
"durationMillis": {
|
|
58
|
+
"type": "integer",
|
|
59
|
+
"minimum": 1,
|
|
60
|
+
"maximum": 9007199254740991
|
|
61
|
+
}
|
|
22
62
|
}
|
|
23
63
|
},
|
|
24
64
|
"request": {
|
|
25
65
|
"type": "object",
|
|
26
66
|
"additionalProperties": false,
|
|
27
|
-
"required": [
|
|
67
|
+
"required": [
|
|
68
|
+
"kind",
|
|
69
|
+
"mimeType",
|
|
70
|
+
"dataBase64"
|
|
71
|
+
],
|
|
28
72
|
"properties": {
|
|
29
|
-
"kind": {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
73
|
+
"kind": {
|
|
74
|
+
"enum": [
|
|
75
|
+
"IMAGE",
|
|
76
|
+
"AUDIO",
|
|
77
|
+
"VIDEO",
|
|
78
|
+
"FILE"
|
|
79
|
+
]
|
|
80
|
+
},
|
|
81
|
+
"mimeType": {
|
|
82
|
+
"type": "string",
|
|
83
|
+
"minLength": 3,
|
|
84
|
+
"maxLength": 255
|
|
85
|
+
},
|
|
86
|
+
"dataBase64": {
|
|
87
|
+
"type": "string",
|
|
88
|
+
"minLength": 4,
|
|
89
|
+
"maxLength": 70000000,
|
|
90
|
+
"pattern": "^[A-Za-z0-9+/]+={0,2}$"
|
|
91
|
+
},
|
|
92
|
+
"durationMillis": {
|
|
93
|
+
"type": "integer",
|
|
94
|
+
"minimum": 1,
|
|
95
|
+
"maximum": 9007199254740991
|
|
96
|
+
}
|
|
33
97
|
}
|
|
34
98
|
},
|
|
35
|
-
"response": {
|
|
99
|
+
"response": {
|
|
100
|
+
"$ref": "#/$defs/metadata"
|
|
101
|
+
}
|
|
36
102
|
}
|
|
37
103
|
}
|
|
@@ -3,34 +3,82 @@
|
|
|
3
3
|
"$id": "https://mhome.ai/schema/artifact-upload.v1.schema.json",
|
|
4
4
|
"title": "mHome Artifact Upload v1",
|
|
5
5
|
"oneOf": [
|
|
6
|
-
{
|
|
7
|
-
|
|
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": [
|
|
17
|
+
"required": [
|
|
18
|
+
"kind",
|
|
19
|
+
"mimeType",
|
|
20
|
+
"sizeBytes",
|
|
21
|
+
"sha256"
|
|
22
|
+
],
|
|
14
23
|
"properties": {
|
|
15
|
-
"kind": {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
24
|
+
"kind": {
|
|
25
|
+
"enum": [
|
|
26
|
+
"IMAGE",
|
|
27
|
+
"AUDIO",
|
|
28
|
+
"VIDEO",
|
|
29
|
+
"FILE"
|
|
30
|
+
]
|
|
31
|
+
},
|
|
32
|
+
"mimeType": {
|
|
33
|
+
"type": "string",
|
|
34
|
+
"minLength": 3,
|
|
35
|
+
"maxLength": 255
|
|
36
|
+
},
|
|
37
|
+
"sizeBytes": {
|
|
38
|
+
"type": "integer",
|
|
39
|
+
"minimum": 1,
|
|
40
|
+
"maximum": 9007199254740991
|
|
41
|
+
},
|
|
42
|
+
"sha256": {
|
|
43
|
+
"type": "string",
|
|
44
|
+
"pattern": "^[0-9a-f]{64}$"
|
|
45
|
+
},
|
|
46
|
+
"durationMillis": {
|
|
47
|
+
"type": "integer",
|
|
48
|
+
"minimum": 1,
|
|
49
|
+
"maximum": 9007199254740991
|
|
50
|
+
}
|
|
20
51
|
}
|
|
21
52
|
},
|
|
22
53
|
"response": {
|
|
23
54
|
"type": "object",
|
|
24
55
|
"additionalProperties": false,
|
|
25
|
-
"required": [
|
|
56
|
+
"required": [
|
|
57
|
+
"uploadId",
|
|
58
|
+
"url",
|
|
59
|
+
"headers",
|
|
60
|
+
"expiresAtUnixMs"
|
|
61
|
+
],
|
|
26
62
|
"properties": {
|
|
27
|
-
"uploadId": {
|
|
28
|
-
|
|
63
|
+
"uploadId": {
|
|
64
|
+
"type": "string",
|
|
65
|
+
"minLength": 1
|
|
66
|
+
},
|
|
67
|
+
"url": {
|
|
68
|
+
"type": "string",
|
|
69
|
+
"pattern": "^https?://"
|
|
70
|
+
},
|
|
29
71
|
"headers": {
|
|
30
72
|
"type": "object",
|
|
31
|
-
"additionalProperties": {
|
|
73
|
+
"additionalProperties": {
|
|
74
|
+
"type": "string"
|
|
75
|
+
}
|
|
32
76
|
},
|
|
33
|
-
"expiresAtUnixMs": {
|
|
77
|
+
"expiresAtUnixMs": {
|
|
78
|
+
"type": "integer",
|
|
79
|
+
"minimum": 1,
|
|
80
|
+
"maximum": 9007199254740991
|
|
81
|
+
}
|
|
34
82
|
}
|
|
35
83
|
}
|
|
36
84
|
}
|