@mhome/artifact-protocol 1.2.0 → 1.3.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
|
@@ -15,3 +15,5 @@ cloud object store or an authenticated local streaming endpoint.
|
|
|
15
15
|
|
|
16
16
|
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
|
+
|
|
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.
|
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"manifest": "mhome.artifact.v1",
|
|
3
|
-
"contractVersion": "1.
|
|
3
|
+
"contractVersion": "1.3.0",
|
|
4
4
|
"uriPrefix": "meow-artifact://v1/",
|
|
5
|
-
"kinds": [
|
|
5
|
+
"kinds": [
|
|
6
|
+
"image",
|
|
7
|
+
"audio",
|
|
8
|
+
"video",
|
|
9
|
+
"file"
|
|
10
|
+
],
|
|
6
11
|
"resolve": {
|
|
7
12
|
"target": "/artifact/resolve",
|
|
8
13
|
"schema": "schema/artifact-resolve.v1.schema.json",
|
|
@@ -17,5 +22,13 @@
|
|
|
17
22
|
"target": "/artifact/upload/prepare",
|
|
18
23
|
"schema": "schema/artifact-upload.v1.schema.json",
|
|
19
24
|
"schemaVersion": 1
|
|
25
|
+
},
|
|
26
|
+
"mediaReference": {
|
|
27
|
+
"schema": "schema/media-reference.v1.schema.json",
|
|
28
|
+
"schemaVersion": 1
|
|
29
|
+
},
|
|
30
|
+
"import": {
|
|
31
|
+
"schema": "schema/artifact-import.v1.schema.json",
|
|
32
|
+
"schemaVersion": 1
|
|
20
33
|
}
|
|
21
34
|
}
|
package/package.json
CHANGED
package/protocol.json
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"protocol": "mhome.artifact",
|
|
3
|
-
"contractVersion": "1.
|
|
3
|
+
"contractVersion": "1.3.0",
|
|
4
4
|
"manifest": "manifest/artifact.v1.json",
|
|
5
5
|
"schemas": {
|
|
6
6
|
"artifactMetadata": "schema/artifact-metadata.v1.schema.json",
|
|
7
7
|
"artifactResolve": "schema/artifact-resolve.v1.schema.json",
|
|
8
8
|
"artifactPut": "schema/artifact-put.v1.schema.json",
|
|
9
|
+
"artifactImport": "schema/artifact-import.v1.schema.json",
|
|
10
|
+
"mediaReference": "schema/media-reference.v1.schema.json",
|
|
9
11
|
"artifactUpload": "schema/artifact-upload.v1.schema.json"
|
|
10
12
|
},
|
|
11
13
|
"fixtures": {
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://mhome.ai/schema/artifact-import.v1.schema.json",
|
|
4
|
+
"title": "MeowLink artifact import request",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": [
|
|
8
|
+
"kind",
|
|
9
|
+
"sourceUrl"
|
|
10
|
+
],
|
|
11
|
+
"properties": {
|
|
12
|
+
"kind": {
|
|
13
|
+
"enum": [
|
|
14
|
+
"IMAGE",
|
|
15
|
+
"AUDIO",
|
|
16
|
+
"FILE"
|
|
17
|
+
]
|
|
18
|
+
},
|
|
19
|
+
"sourceUrl": {
|
|
20
|
+
"type": "string",
|
|
21
|
+
"pattern": "^https?://",
|
|
22
|
+
"minLength": 8
|
|
23
|
+
},
|
|
24
|
+
"mimeType": {
|
|
25
|
+
"type": "string",
|
|
26
|
+
"minLength": 3,
|
|
27
|
+
"maxLength": 255
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://mhome.ai/schema/media-reference.v1.schema.json",
|
|
4
|
+
"title": "MeowLink media reference",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": [
|
|
8
|
+
"uri"
|
|
9
|
+
],
|
|
10
|
+
"properties": {
|
|
11
|
+
"uri": {
|
|
12
|
+
"type": "string",
|
|
13
|
+
"pattern": "^meow-artifact://v1/",
|
|
14
|
+
"maxLength": 2048
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|