@opensoha/contracts 0.1.6 → 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/auth/catalog_generated.go +3 -3
- package/auth/permission-catalog.json +108 -2
- package/capabilities/cluster-capability-matrix.schema.json +30 -1
- package/compat/json-schema-ecosystem-0.1.0.json +1 -1
- package/compat/openapi-loose-boundaries-0.1.0.json +1 -1
- package/examples/gateway-manifest/minimal.json +6 -6
- package/examples/openapi/agent-run-tool-call-request.json +1 -1
- package/examples/openapi/agent-tool-call-result-envelope.json +1 -1
- package/examples/openapi/gateway-manifest-envelope.json +4 -4
- package/examples/openapi/tool-invocation-request.json +1 -1
- package/examples/openapi/tool-invocation-result-envelope.json +1 -1
- package/examples/plugin-manifest/skill-pack.json +2 -2
- package/examples/skill-manifest/k8s-sre.json +2 -2
- package/examples/token-claims/service-account.json +1 -1
- package/fixtures/json-schema/cluster-capability-matrix/valid/runtime-parity.json +3 -0
- 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/gateway-manifest/valid/minimal.json +4 -4
- 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/json-schema/skill-manifest/valid/minimal.json +2 -2
- package/fixtures/json-schema/token-claims/valid/service-account.json +1 -1
- package/fixtures/openapi/AIGatewayManifestEnvelope/valid/minimal.json +1 -1
- package/fixtures/openapi/AgentInstallationEnvelope/invalid/missing-command.json +7 -0
- package/fixtures/openapi/AgentInstallationEnvelope/valid/minimal.json +8 -0
- package/fixtures/openapi/ApplicationInput/invalid/missing-key.json +4 -0
- package/fixtures/openapi/ApplicationInput/valid/minimal.json +5 -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/HelmReleaseImportRequest/invalid/empty-releases.json +10 -0
- package/fixtures/openapi/HelmReleaseImportRequest/valid/managed.json +14 -0
- package/fixtures/openapi/HelmReleaseImportResultEnvelope/invalid/missing-mode.json +20 -0
- package/fixtures/openapi/HelmReleaseImportResultEnvelope/valid/created.json +35 -0
- package/fixtures/openapi/KubernetesImportCandidateListEnvelope/invalid/unknown-kind.json +14 -0
- package/fixtures/openapi/KubernetesImportCandidateListEnvelope/valid/grouped.json +31 -0
- package/fixtures/openapi/KubernetesServiceImportRequest/invalid/unsupported-mode.json +15 -0
- package/fixtures/openapi/KubernetesServiceImportRequest/valid/managed.json +15 -0
- package/fixtures/openapi/KubernetesServiceImportRequest/valid/observe-only.json +15 -0
- package/fixtures/openapi/KubernetesServiceImportResultEnvelope/invalid/missing-mode.json +20 -0
- package/fixtures/openapi/KubernetesServiceImportResultEnvelope/valid/created.json +37 -0
- package/fixtures/openapi/MCPCapabilityListEnvelope/invalid/missing-scopes.json +1 -1
- package/fixtures/openapi/MCPCapabilityListEnvelope/valid/minimal.json +1 -1
- package/fixtures/openapi/ObservabilityDashboardImportResultEnvelope/invalid/missing-dashboard.json +7 -0
- package/fixtures/openapi/ObservabilityDashboardImportResultEnvelope/valid/imported.json +36 -0
- package/fixtures/openapi/ObservabilityGrafanaDashboardImportInput/invalid/missing-data-source.json +3 -0
- package/fixtures/openapi/ObservabilityGrafanaDashboardImportInput/invalid/missing-json.json +3 -0
- package/fixtures/openapi/ObservabilityGrafanaDashboardImportInput/valid/classic.json +4 -0
- package/fixtures/openapi/ObservabilityMetricDataSourceListEnvelope/invalid/missing-name.json +7 -0
- package/fixtures/openapi/ObservabilityMetricDataSourceListEnvelope/valid/list.json +8 -0
- package/fixtures/openapi/PersonalAccessTokenInput/invalid/extra-field.json +1 -1
- package/fixtures/openapi/PersonalAccessTokenInput/valid/create.json +1 -1
- package/fixtures/openapi/PluginProvenanceStatement/invalid/algorithm.json +10 -0
- package/fixtures/openapi/PluginProvenanceStatement/valid/minimal.json +10 -0
- package/fixtures/openapi/RegistryConnectionInput/invalid/missing-type.json +4 -0
- package/fixtures/openapi/RegistryConnectionInput/valid/harbor.json +9 -0
- package/fixtures/openapi/RegistryConnectionListEnvelope/invalid/exposed-secret.json +18 -0
- package/fixtures/openapi/RegistryConnectionListEnvelope/valid/configured.json +19 -0
- package/fixtures/openapi/SoftwarePackage/invalid/unsafe-software-package.json +15 -0
- package/fixtures/openapi/SoftwarePackage/valid/software-package.json +17 -0
- package/fixtures/openapi/SoftwarePackageURLImportRequest/invalid/software-package-url-import-request.json +9 -0
- package/fixtures/openapi/SoftwarePackageURLImportRequest/valid/software-package-url-import-request.json +12 -0
- package/fixtures/openapi/SoftwareStorage/invalid/software-storage.json +6 -0
- package/fixtures/openapi/SoftwareStorage/valid/software-storage.json +22 -0
- package/gen/go/sohaapi/client.go +1 -1
- package/gen/go/sohaapi/types.go +1251 -21
- package/gen/ts/sohaapi/index.ts +1855 -129
- package/openapi/soha-api.json +3280 -4
- package/openapi/soha-api.yaml +1876 -71
- 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
|
@@ -5,9 +5,9 @@ package openapi
|
|
|
5
5
|
import _ "embed"
|
|
6
6
|
|
|
7
7
|
const (
|
|
8
|
-
Version = "0.1.
|
|
9
|
-
YAMLSHA256 = "
|
|
10
|
-
JSONSHA256 = "
|
|
8
|
+
Version = "0.1.8"
|
|
9
|
+
YAMLSHA256 = "67feba4d2b47ae3982a9feb7a2286be4c856e0d29d63f445be165335acf364ef"
|
|
10
|
+
JSONSHA256 = "dd0200945f41e4d87553ef88fdeb14577b219367768a43487ac3c23f5380eabb"
|
|
11
11
|
)
|
|
12
12
|
|
|
13
13
|
//go:embed soha-api.yaml
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opensoha/contracts",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.8",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Shared OpenSoha API, agent, MCP, skill, event, and auth contracts.",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -53,6 +53,8 @@
|
|
|
53
53
|
"./mcp/gateway-capability-baseline.schema.json": "./mcp/gateway-capability-baseline.schema.json",
|
|
54
54
|
"./skills/skill-manifest.schema.json": "./skills/skill-manifest.schema.json",
|
|
55
55
|
"./plugins/plugin-manifest.schema.json": "./plugins/plugin-manifest.schema.json",
|
|
56
|
+
"./plugins/companion-pack.schema.json": "./plugins/companion-pack.schema.json",
|
|
57
|
+
"./plugins/companion-provenance.schema.json": "./plugins/companion-provenance.schema.json",
|
|
56
58
|
"./plugins/marketplace-catalog.schema.json": "./plugins/marketplace-catalog.schema.json",
|
|
57
59
|
"./events/event-envelope.schema.json": "./events/event-envelope.schema.json",
|
|
58
60
|
"./auth/token-claims.schema.json": "./auth/token-claims.schema.json",
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://contracts.opensoha.dev/plugins/companion-pack.schema.json",
|
|
4
|
+
"title": "OpenSoha Companion Pack",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"required": ["renderer", "entryAsset", "assets", "license"],
|
|
7
|
+
"properties": {
|
|
8
|
+
"renderer": {
|
|
9
|
+
"type": "string",
|
|
10
|
+
"enum": ["svg", "sprite", "live2d-cubism"]
|
|
11
|
+
},
|
|
12
|
+
"entryAsset": { "$ref": "#/$defs/safePath" },
|
|
13
|
+
"thumbnailAsset": { "$ref": "#/$defs/safePath" },
|
|
14
|
+
"modelFormatVersion": { "type": "string", "minLength": 1 },
|
|
15
|
+
"assets": {
|
|
16
|
+
"type": "array",
|
|
17
|
+
"minItems": 1,
|
|
18
|
+
"maxItems": 512,
|
|
19
|
+
"items": { "$ref": "#/$defs/asset" }
|
|
20
|
+
},
|
|
21
|
+
"animations": { "$ref": "#/$defs/animations" },
|
|
22
|
+
"interactions": {
|
|
23
|
+
"type": "array",
|
|
24
|
+
"maxItems": 64,
|
|
25
|
+
"items": { "$ref": "#/$defs/interaction" }
|
|
26
|
+
},
|
|
27
|
+
"unlocks": {
|
|
28
|
+
"type": "array",
|
|
29
|
+
"maxItems": 128,
|
|
30
|
+
"items": { "$ref": "#/$defs/unlock" }
|
|
31
|
+
},
|
|
32
|
+
"license": { "$ref": "#/$defs/license" }
|
|
33
|
+
},
|
|
34
|
+
"$defs": {
|
|
35
|
+
"safePath": {
|
|
36
|
+
"type": "string",
|
|
37
|
+
"minLength": 1,
|
|
38
|
+
"maxLength": 512,
|
|
39
|
+
"pattern": "^(?!/)(?!.*(?:^|/)\\.\\.(?:/|$))(?!.*\\\\)[A-Za-z0-9._/-]+$"
|
|
40
|
+
},
|
|
41
|
+
"sha256": {
|
|
42
|
+
"type": "string",
|
|
43
|
+
"pattern": "^sha256:[a-f0-9]{64}$"
|
|
44
|
+
},
|
|
45
|
+
"asset": {
|
|
46
|
+
"type": "object",
|
|
47
|
+
"required": ["path", "kind", "contentType", "sizeBytes", "sha256"],
|
|
48
|
+
"properties": {
|
|
49
|
+
"path": { "$ref": "#/$defs/safePath" },
|
|
50
|
+
"kind": {
|
|
51
|
+
"type": "string",
|
|
52
|
+
"enum": ["entry", "model", "texture", "motion", "expression", "physics", "pose", "thumbnail", "audio"]
|
|
53
|
+
},
|
|
54
|
+
"contentType": {
|
|
55
|
+
"type": "string",
|
|
56
|
+
"enum": ["application/json", "application/octet-stream", "image/png", "image/jpeg", "image/webp", "image/svg+xml", "audio/mpeg", "audio/ogg"]
|
|
57
|
+
},
|
|
58
|
+
"sizeBytes": { "type": "integer", "minimum": 1, "maximum": 67108864 },
|
|
59
|
+
"sha256": { "$ref": "#/$defs/sha256" }
|
|
60
|
+
},
|
|
61
|
+
"additionalProperties": false
|
|
62
|
+
},
|
|
63
|
+
"animations": {
|
|
64
|
+
"type": "object",
|
|
65
|
+
"properties": {
|
|
66
|
+
"idle": { "type": "string", "minLength": 1 },
|
|
67
|
+
"listening": { "type": "string", "minLength": 1 },
|
|
68
|
+
"thinking": { "type": "string", "minLength": 1 },
|
|
69
|
+
"speaking": { "type": "string", "minLength": 1 },
|
|
70
|
+
"error": { "type": "string", "minLength": 1 },
|
|
71
|
+
"dragging": { "type": "string", "minLength": 1 },
|
|
72
|
+
"hover": { "type": "string", "minLength": 1 },
|
|
73
|
+
"tap": { "type": "string", "minLength": 1 }
|
|
74
|
+
},
|
|
75
|
+
"additionalProperties": false
|
|
76
|
+
},
|
|
77
|
+
"interaction": {
|
|
78
|
+
"type": "object",
|
|
79
|
+
"required": ["id", "action"],
|
|
80
|
+
"properties": {
|
|
81
|
+
"id": { "type": "string", "pattern": "^[a-z][a-z0-9._-]*$" },
|
|
82
|
+
"label": { "type": "string", "minLength": 1, "maxLength": 64 },
|
|
83
|
+
"action": { "type": "string", "enum": ["tap", "pet", "feed", "play", "greet"] },
|
|
84
|
+
"animation": { "type": "string", "minLength": 1 },
|
|
85
|
+
"cooldownSeconds": { "type": "integer", "minimum": 0, "maximum": 86400 },
|
|
86
|
+
"rewardXp": { "type": "integer", "minimum": 0, "maximum": 1000 },
|
|
87
|
+
"rewardAffinity": { "type": "integer", "minimum": 0, "maximum": 100 }
|
|
88
|
+
},
|
|
89
|
+
"additionalProperties": false
|
|
90
|
+
},
|
|
91
|
+
"unlock": {
|
|
92
|
+
"type": "object",
|
|
93
|
+
"required": ["id", "kind", "level", "ref"],
|
|
94
|
+
"properties": {
|
|
95
|
+
"id": { "type": "string", "pattern": "^[a-z][a-z0-9._-]*$" },
|
|
96
|
+
"kind": { "type": "string", "enum": ["interaction", "animation", "expression", "asset"] },
|
|
97
|
+
"level": { "type": "integer", "minimum": 1, "maximum": 100 },
|
|
98
|
+
"ref": { "type": "string", "minLength": 1 }
|
|
99
|
+
},
|
|
100
|
+
"additionalProperties": false
|
|
101
|
+
},
|
|
102
|
+
"license": {
|
|
103
|
+
"type": "object",
|
|
104
|
+
"required": ["name", "url", "redistributionAllowed", "commercialUseAllowed"],
|
|
105
|
+
"properties": {
|
|
106
|
+
"name": { "type": "string", "minLength": 1 },
|
|
107
|
+
"spdxId": { "type": "string", "minLength": 1 },
|
|
108
|
+
"url": { "type": "string", "format": "uri" },
|
|
109
|
+
"sourceUrl": { "type": "string", "format": "uri" },
|
|
110
|
+
"attribution": { "type": "string", "maxLength": 2048 },
|
|
111
|
+
"redistributionAllowed": { "const": true },
|
|
112
|
+
"commercialUseAllowed": { "type": "boolean" }
|
|
113
|
+
},
|
|
114
|
+
"additionalProperties": false
|
|
115
|
+
}
|
|
116
|
+
},
|
|
117
|
+
"additionalProperties": false
|
|
118
|
+
}
|
|
@@ -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": [
|