@opensoha/contracts 0.1.7 → 0.1.8
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/compat/json-schema-ecosystem-0.1.0.json +1 -1
- package/compat/openapi-loose-boundaries-0.1.0.json +1 -1
- package/fixtures/json-schema/companion-pack/invalid/traversal.json +19 -0
- package/fixtures/json-schema/companion-pack/valid/svg.json +47 -0
- package/fixtures/json-schema/companion-provenance/invalid/missing-source.json +8 -0
- package/fixtures/json-schema/companion-provenance/valid/minimal.json +10 -0
- package/fixtures/json-schema/marketplace-catalog/valid/companion-pack.json +39 -0
- package/fixtures/json-schema/plugin-manifest/invalid/companion-pack-without-assets.json +17 -0
- package/fixtures/json-schema/plugin-manifest/valid/companion-pack.json +28 -0
- package/fixtures/openapi/CompanionInteractionReceiptEnvelope/invalid/missing-profile.json +9 -0
- package/fixtures/openapi/CompanionInteractionReceiptEnvelope/valid/applied.json +22 -0
- package/fixtures/openapi/CompanionInteractionRequest/invalid/client-reward.json +5 -0
- package/fixtures/openapi/CompanionInteractionRequest/valid/pet.json +5 -0
- package/fixtures/openapi/CompanionPackManifest/invalid/external-entry.json +11 -0
- package/fixtures/openapi/CompanionPackManifest/valid/svg.json +20 -0
- package/fixtures/openapi/CompanionProfileEnvelope/invalid/level-zero.json +15 -0
- package/fixtures/openapi/CompanionProfileEnvelope/valid/default.json +15 -0
- package/fixtures/openapi/PluginProvenanceStatement/invalid/algorithm.json +10 -0
- package/fixtures/openapi/PluginProvenanceStatement/valid/minimal.json +10 -0
- package/gen/go/sohaapi/client.go +1 -1
- package/gen/go/sohaapi/types.go +532 -18
- package/gen/ts/sohaapi/index.ts +515 -1
- package/openapi/soha-api.json +1040 -2
- package/openapi/soha-api.yaml +464 -1
- package/openapi/spec_generated.go +3 -3
- package/package.json +3 -1
- package/plugins/companion-pack.schema.json +118 -0
- package/plugins/companion-provenance.schema.json +19 -0
- package/plugins/marketplace-catalog.schema.json +20 -0
- package/plugins/plugin-manifest.schema.json +19 -1
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://contracts.opensoha.dev/plugins/companion-provenance.schema.json",
|
|
4
|
+
"title": "OpenSoha Companion Provenance Statement",
|
|
5
|
+
"description": "The Ed25519 signature covers UTF-8 lines subjectSha256, builderId, sourceUri, sourceCommit, and builtAt in that order, joined with LF and without a trailing LF.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": ["subjectSha256", "builderId", "sourceUri", "sourceCommit", "builtAt", "signingKeyId", "signatureAlgorithm", "signature"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"subjectSha256": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" },
|
|
10
|
+
"builderId": { "type": "string", "minLength": 1, "maxLength": 512 },
|
|
11
|
+
"sourceUri": { "type": "string", "format": "uri" },
|
|
12
|
+
"sourceCommit": { "type": "string", "pattern": "^[A-Fa-f0-9]{7,64}$" },
|
|
13
|
+
"builtAt": { "type": "string", "format": "date-time" },
|
|
14
|
+
"signingKeyId": { "type": "string", "pattern": "^[a-z][a-z0-9._-]*$" },
|
|
15
|
+
"signatureAlgorithm": { "const": "ed25519" },
|
|
16
|
+
"signature": { "type": "string", "minLength": 1 }
|
|
17
|
+
},
|
|
18
|
+
"additionalProperties": false
|
|
19
|
+
}
|
|
@@ -87,6 +87,7 @@
|
|
|
87
87
|
"packageUrl": { "type": "string" },
|
|
88
88
|
"checksum": { "type": "string" },
|
|
89
89
|
"signature": { "type": "string" },
|
|
90
|
+
"package": { "$ref": "#/$defs/package" },
|
|
90
91
|
"publishedAt": { "type": "string", "format": "date-time" },
|
|
91
92
|
"deprecated": { "type": "boolean" },
|
|
92
93
|
"suspended": { "type": "boolean" },
|
|
@@ -98,6 +99,25 @@
|
|
|
98
99
|
},
|
|
99
100
|
"additionalProperties": false
|
|
100
101
|
},
|
|
102
|
+
"package": {
|
|
103
|
+
"type": "object",
|
|
104
|
+
"required": ["url", "contentType", "sizeBytes", "sha256"],
|
|
105
|
+
"properties": {
|
|
106
|
+
"url": { "type": "string", "format": "uri" },
|
|
107
|
+
"contentType": {
|
|
108
|
+
"type": "string",
|
|
109
|
+
"enum": ["application/zip", "application/gzip", "application/x-tar"]
|
|
110
|
+
},
|
|
111
|
+
"sizeBytes": { "type": "integer", "minimum": 1, "maximum": 268435456 },
|
|
112
|
+
"sha256": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" },
|
|
113
|
+
"signature": { "type": "string", "minLength": 1 },
|
|
114
|
+
"signatureAlgorithm": { "type": "string", "enum": ["ed25519"] },
|
|
115
|
+
"signingKeyId": { "type": "string", "pattern": "^[a-z][a-z0-9._-]*$" },
|
|
116
|
+
"provenanceUrl": { "type": "string", "format": "uri" },
|
|
117
|
+
"sbomUrl": { "type": "string", "format": "uri" }
|
|
118
|
+
},
|
|
119
|
+
"additionalProperties": false
|
|
120
|
+
},
|
|
101
121
|
"advisory": {
|
|
102
122
|
"type": "object",
|
|
103
123
|
"required": ["id", "severity", "summary"],
|
|
@@ -28,7 +28,8 @@
|
|
|
28
28
|
"metric-extension",
|
|
29
29
|
"notification-channel",
|
|
30
30
|
"identity-template",
|
|
31
|
-
"ui-extension"
|
|
31
|
+
"ui-extension",
|
|
32
|
+
"companion-pack"
|
|
32
33
|
]
|
|
33
34
|
},
|
|
34
35
|
"description": { "type": "string" },
|
|
@@ -123,6 +124,9 @@
|
|
|
123
124
|
},
|
|
124
125
|
"additionalProperties": false
|
|
125
126
|
},
|
|
127
|
+
"companionPack": {
|
|
128
|
+
"$ref": "https://contracts.opensoha.dev/plugins/companion-pack.schema.json"
|
|
129
|
+
},
|
|
126
130
|
"configSchema": { "$ref": "#/$defs/jsonSchema" },
|
|
127
131
|
"extensionPoints": { "$ref": "#/$defs/extensionPoints" },
|
|
128
132
|
"metadata": {
|
|
@@ -131,6 +135,20 @@
|
|
|
131
135
|
}
|
|
132
136
|
},
|
|
133
137
|
"allOf": [
|
|
138
|
+
{
|
|
139
|
+
"if": {
|
|
140
|
+
"properties": { "type": { "const": "companion-pack" } },
|
|
141
|
+
"required": ["type"]
|
|
142
|
+
},
|
|
143
|
+
"then": {
|
|
144
|
+
"required": ["companionPack"],
|
|
145
|
+
"properties": {
|
|
146
|
+
"runtime": {
|
|
147
|
+
"properties": { "mode": { "const": "manifest-only" } }
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
},
|
|
134
152
|
{
|
|
135
153
|
"if": {
|
|
136
154
|
"anyOf": [
|