Files
invest-harness/designDocument/contracts/package-manifest.schema.json
T

189 lines
3.4 KiB
JSON

{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "Invest Harness package manifest v1",
"type": "object",
"additionalProperties": false,
"required": [
"manifestVersion",
"kind",
"name",
"version",
"artifact",
"dependencies"
],
"properties": {
"manifestVersion": {
"const": "1"
},
"kind": {
"enum": [
"harness",
"plugin",
"skill",
"template"
]
},
"name": {
"type": "string",
"minLength": 1
},
"version": {
"type": "string",
"pattern": "^\\d+\\.\\d+\\.\\d+(-[0-9A-Za-z.-]+)?(\\+[0-9A-Za-z.-]+)?$"
},
"artifact": {
"type": "object",
"additionalProperties": false,
"required": [
"ref",
"digest",
"mediaType"
],
"properties": {
"ref": {
"type": "string",
"minLength": 1
},
"digest": {
"type": "string",
"pattern": "^sha256:[a-f0-9]{64}$"
},
"mediaType": {
"type": "string",
"minLength": 1
}
}
},
"dependencies": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"required": [
"packageVersionId",
"digest"
],
"properties": {
"packageVersionId": {
"type": "string",
"minLength": 1,
"maxLength": 128
},
"digest": {
"type": "string",
"pattern": "^sha256:[a-f0-9]{64}$"
}
}
}
},
"harnessVersionId": {
"type": "string",
"minLength": 1,
"maxLength": 128
},
"configSchemaRef": {
"type": "string",
"minLength": 1
},
"defaultsRef": {
"type": "string",
"minLength": 1
},
"uiSchemaRef": {
"type": "string",
"minLength": 1
},
"executionKind": {
"enum": [
"oci",
"native"
]
},
"entrypoint": {
"type": "array",
"minItems": 1,
"items": {
"type": "string",
"minLength": 1
}
},
"supportedHarnesses": {
"type": "array",
"minItems": 1,
"items": {
"type": "string",
"minLength": 1,
"maxLength": 128
}
},
"requiredCapabilities": {
"type": "array",
"uniqueItems": true,
"items": {
"type": "string",
"minLength": 1
}
},
"requiredPermissions": {
"type": "array",
"uniqueItems": true,
"items": {
"type": "string",
"minLength": 1
}
},
"retrySafe": {
"type": "boolean"
}
},
"allOf": [
{
"if": {
"properties": {
"kind": {
"const": "template"
}
}
},
"then": {
"required": [
"harnessVersionId",
"configSchemaRef"
]
}
},
{
"if": {
"properties": {
"kind": {
"const": "harness"
}
}
},
"then": {
"required": [
"executionKind",
"entrypoint"
]
}
},
{
"if": {
"properties": {
"kind": {
"enum": [
"plugin",
"skill"
]
}
}
},
"then": {
"required": [
"supportedHarnesses"
]
}
}
]
}