Repository navigation
Expand file tree
/
Copy pathplugin.schema.json
More file actions
154 lines (154 loc) · 4.14 KB
/
Copy pathplugin.schema.json
File metadata and controls
154 lines (154 loc) · 4.14 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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "OpenCode plugin manifest (contract 1.15)",
"description": "plugin.toml: a plugin folder's manifest. Generated from crates/opencode-plugin-spec/contract.json.",
"type": "object",
"required": [
"id",
"name",
"version",
"contract"
],
"additionalProperties": false,
"properties": {
"id": {
"type": "string",
"description": "The plugin's id: lowercase letters, digits and hyphens. It prefixes commands (<id>.<command>) and contracts.",
"pattern": "^[a-z][a-z0-9-]{0,63}$"
},
"name": {
"type": "string",
"description": "The display name."
},
"version": {
"type": "string",
"description": "The plugin's own version, as semver.",
"pattern": "^\\d+\\.\\d+\\.\\d+([-+][0-9A-Za-z.-]+)?$"
},
"contract": {
"type": "string",
"description": "The contract version the plugin targets, such as \"1.0\".",
"pattern": "^\\d+\\.\\d+$"
},
"description": {
"type": "string",
"description": "One sentence about what the plugin adds."
},
"entry": {
"type": "string",
"description": "The window half's module, relative to the plugin folder.",
"pattern": "^[A-Za-z0-9_./-]+\\.js$",
"default": "init.js"
},
"app": {
"type": "string",
"description": "The app half's module, such as \"app.js\". Omit it for a plugin with no app half.",
"pattern": "^[A-Za-z0-9_./-]+\\.js$"
},
"os": {
"type": "array",
"uniqueItems": true,
"items": {
"type": "string",
"enum": [
"windows",
"macos",
"linux",
"web"
]
},
"description": "The platforms it runs on. Omit it for all."
},
"channels": {
"type": "array",
"uniqueItems": true,
"items": {
"type": "string",
"enum": [
"local",
"dev",
"beta",
"prod"
]
},
"description": "The app channels it loads in. Omit it for all."
},
"authors": {
"type": "array",
"items": {
"type": "string"
},
"description": "Its authors."
},
"homepage": {
"type": "string",
"description": "Its homepage.",
"format": "uri"
},
"license": {
"type": "string",
"description": "An SPDX license expression."
},
"stores": {
"type": "array",
"items": {
"type": "object",
"required": [
"name"
],
"additionalProperties": false,
"properties": {
"name": {
"type": "string",
"description": "The name passed to Store.Value or Store.SessionValue."
},
"scope": {
"type": "string",
"enum": [
"global",
"session"
],
"description": "One value for the app, or one per session.",
"default": "global"
}
}
},
"description": "The stores it uses, by name and scope. Every store of a plugin is in memory before its setup runs, declared or not; the list documents them."
},
"settings_search": {
"type": "array",
"items": {
"type": "object",
"required": [
"id",
"page",
"title"
],
"additionalProperties": false,
"properties": {
"id": {
"type": "string",
"description": "The ui.settingsRow id search reveals."
},
"page": {
"type": "string",
"description": "The page: plugins, a host page, or one of this plugin's settings pages."
},
"title": {
"type": "string",
"description": "The title in search results."
},
"description": {
"type": "string",
"description": "Its second line."
},
"keywords": {
"type": "string",
"description": "More words search matches."
}
}
},
"description": "Settings search entries found without loading the plugin."
}
}
}