-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathpack.schema.json
More file actions
109 lines (109 loc) · 2.95 KB
/
pack.schema.json
File metadata and controls
109 lines (109 loc) · 2.95 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://promptg.io/schemas/v1/pack.schema.json",
"title": "PromptG Pack",
"description": "Schema for PromptG pack files - bundles of prompts and templates",
"type": "object",
"required": ["kind", "schemaVersion", "name", "version"],
"additionalProperties": false,
"properties": {
"$schema": {
"type": "string",
"format": "uri",
"description": "Optional JSON Schema identifier for editor tooling."
},
"kind": {
"type": "string",
"description": "Discriminator for the document kind",
"const": "pack"
},
"schemaVersion": {
"type": "string",
"description": "Pack schema version",
"const": "1"
},
"name": {
"type": "string",
"description": "Pack name in kebab-case",
"pattern": "^[a-z0-9]+(-[a-z0-9]+)*$",
"minLength": 1,
"maxLength": 100
},
"version": {
"type": "string",
"description": "Semantic version (semver 2.0.0)",
"pattern": "^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$"
},
"displayName": {
"type": "string",
"description": "Human-readable name for display",
"minLength": 1,
"maxLength": 200
},
"description": {
"type": "string",
"description": "Brief description of this pack",
"maxLength": 1000
},
"homepage": {
"type": "string",
"description": "Homepage URL for this pack",
"format": "uri"
},
"author": {
"type": "string",
"description": "Pack author or maintainer",
"maxLength": 200
},
"tags": {
"type": "array",
"description": "Tags for categorization",
"items": {
"type": "string",
"pattern": "^[a-z0-9]+(-[a-z0-9]+)*$",
"maxLength": 50
},
"maxItems": 50,
"uniqueItems": true
},
"x-promptg-time": { "$ref": "#/$defs/PromptGTime" },
"prompts": {
"type": "array",
"description": "Prompts included in this pack",
"items": {
"$ref": "prompt.schema.json"
}
},
"templates": {
"type": "array",
"description": "Templates included in this pack",
"items": {
"$ref": "template.schema.json"
}
}
},
"patternProperties": {
"^x-[a-z0-9][a-z0-9-]*$": {
"description": "Extension fields (tool/vendor-specific)."
}
},
"$defs": {
"PromptGTime": {
"type": "object",
"additionalProperties": false,
"properties": {
"createdAt": { "type": "string", "format": "date-time" }
}
}
},
"anyOf": [
{
"required": ["prompts"],
"properties": { "prompts": { "type": "array", "minItems": 1 } }
},
{
"required": ["templates"],
"properties": { "templates": { "type": "array", "minItems": 1 } }
}
]
}