@stina/extension-api 0.22.1 → 0.23.0
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/dist/{chunk-U3PEHSBG.js → chunk-DGUM43GV.js} +2 -8
- package/dist/chunk-DGUM43GV.js.map +1 -0
- package/dist/chunk-PTPOHFA4.js +9 -0
- package/dist/{chunk-U3PEHSBG.js.map → chunk-PTPOHFA4.js.map} +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/dist/runtime.cjs +134 -41
- package/dist/runtime.cjs.map +1 -1
- package/dist/runtime.d.cts +2 -2
- package/dist/runtime.d.ts +2 -2
- package/dist/runtime.js +138 -43
- package/dist/runtime.js.map +1 -1
- package/dist/schemas/index.cjs +711 -0
- package/dist/schemas/index.cjs.map +1 -0
- package/dist/schemas/index.d.cts +4707 -0
- package/dist/schemas/index.d.ts +4707 -0
- package/dist/schemas/index.js +615 -0
- package/dist/schemas/index.js.map +1 -0
- package/dist/{types.tools-BXGZf8zc.d.cts → types.tools-6o0mTWW-.d.cts} +311 -85
- package/dist/{types.tools-BXGZf8zc.d.ts → types.tools-6o0mTWW-.d.ts} +311 -85
- package/package.json +16 -4
- package/schema/extension-manifest.schema.json +993 -0
- package/scripts/generate-schema.ts +41 -0
- package/src/background.test.ts +33 -0
- package/src/background.ts +24 -0
- package/src/index.ts +8 -2
- package/src/messages.ts +31 -4
- package/src/runtime.ts +149 -43
- package/src/schemas/components.schema.ts +465 -0
- package/src/schemas/contributions.schema.ts +473 -0
- package/src/schemas/index.ts +162 -0
- package/src/schemas/manifest.schema.ts +71 -0
- package/src/schemas/permissions.schema.ts +141 -0
- package/src/types.context.ts +36 -93
- package/src/types.contributions.ts +9 -0
- package/src/types.permissions.ts +1 -1
- package/src/types.storage.ts +287 -0
- package/src/types.ts +10 -2
- package/tsup.config.ts +1 -1
|
@@ -0,0 +1,993 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$ref": "#/definitions/ExtensionManifest",
|
|
3
|
+
"definitions": {
|
|
4
|
+
"ExtensionManifest": {
|
|
5
|
+
"type": "object",
|
|
6
|
+
"properties": {
|
|
7
|
+
"id": {
|
|
8
|
+
"type": "string",
|
|
9
|
+
"pattern": "^[a-z0-9-]+$",
|
|
10
|
+
"errorMessage": {
|
|
11
|
+
"pattern": "ID must be lowercase alphanumeric with hyphens"
|
|
12
|
+
},
|
|
13
|
+
"description": "Unique identifier (e.g., \"ollama-provider\")"
|
|
14
|
+
},
|
|
15
|
+
"name": {
|
|
16
|
+
"type": "string",
|
|
17
|
+
"minLength": 1,
|
|
18
|
+
"description": "Human-readable name"
|
|
19
|
+
},
|
|
20
|
+
"version": {
|
|
21
|
+
"type": "string",
|
|
22
|
+
"pattern": "^\\d+\\.\\d+\\.\\d+",
|
|
23
|
+
"errorMessage": {
|
|
24
|
+
"pattern": "Must be semver format (e.g., \"1.0.0\")"
|
|
25
|
+
},
|
|
26
|
+
"description": "Version string (semver)"
|
|
27
|
+
},
|
|
28
|
+
"description": {
|
|
29
|
+
"type": "string",
|
|
30
|
+
"minLength": 1,
|
|
31
|
+
"description": "Short description"
|
|
32
|
+
},
|
|
33
|
+
"author": {
|
|
34
|
+
"type": "object",
|
|
35
|
+
"properties": {
|
|
36
|
+
"name": {
|
|
37
|
+
"type": "string",
|
|
38
|
+
"minLength": 1,
|
|
39
|
+
"description": "Author name"
|
|
40
|
+
},
|
|
41
|
+
"url": {
|
|
42
|
+
"type": "string",
|
|
43
|
+
"format": "uri",
|
|
44
|
+
"description": "Author URL"
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
"required": [
|
|
48
|
+
"name"
|
|
49
|
+
],
|
|
50
|
+
"additionalProperties": false,
|
|
51
|
+
"description": "Author information"
|
|
52
|
+
},
|
|
53
|
+
"repository": {
|
|
54
|
+
"type": "string",
|
|
55
|
+
"format": "uri",
|
|
56
|
+
"description": "Repository URL"
|
|
57
|
+
},
|
|
58
|
+
"license": {
|
|
59
|
+
"type": "string",
|
|
60
|
+
"description": "License identifier"
|
|
61
|
+
},
|
|
62
|
+
"engines": {
|
|
63
|
+
"type": "object",
|
|
64
|
+
"properties": {
|
|
65
|
+
"stina": {
|
|
66
|
+
"type": "string",
|
|
67
|
+
"description": "Minimum Stina version required"
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
"required": [
|
|
71
|
+
"stina"
|
|
72
|
+
],
|
|
73
|
+
"additionalProperties": false,
|
|
74
|
+
"description": "Minimum Stina version required"
|
|
75
|
+
},
|
|
76
|
+
"platforms": {
|
|
77
|
+
"type": "array",
|
|
78
|
+
"items": {
|
|
79
|
+
"type": "string",
|
|
80
|
+
"enum": [
|
|
81
|
+
"web",
|
|
82
|
+
"electron",
|
|
83
|
+
"tui"
|
|
84
|
+
],
|
|
85
|
+
"description": "Supported platform"
|
|
86
|
+
},
|
|
87
|
+
"description": "Supported platforms"
|
|
88
|
+
},
|
|
89
|
+
"main": {
|
|
90
|
+
"type": "string",
|
|
91
|
+
"description": "Entry point file (relative to extension root)"
|
|
92
|
+
},
|
|
93
|
+
"permissions": {
|
|
94
|
+
"type": "array",
|
|
95
|
+
"items": {
|
|
96
|
+
"anyOf": [
|
|
97
|
+
{
|
|
98
|
+
"type": "string",
|
|
99
|
+
"enum": [
|
|
100
|
+
"network:*",
|
|
101
|
+
"network:localhost",
|
|
102
|
+
"storage.collections",
|
|
103
|
+
"secrets.manage",
|
|
104
|
+
"user.profile.read",
|
|
105
|
+
"user.location.read",
|
|
106
|
+
"chat.history.read",
|
|
107
|
+
"chat.current.read",
|
|
108
|
+
"chat.message.write",
|
|
109
|
+
"provider.register",
|
|
110
|
+
"tools.register",
|
|
111
|
+
"actions.register",
|
|
112
|
+
"settings.register",
|
|
113
|
+
"commands.register",
|
|
114
|
+
"panels.register",
|
|
115
|
+
"events.emit",
|
|
116
|
+
"scheduler.register",
|
|
117
|
+
"background.workers",
|
|
118
|
+
"files.read",
|
|
119
|
+
"files.write",
|
|
120
|
+
"clipboard.read",
|
|
121
|
+
"clipboard.write"
|
|
122
|
+
]
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
"type": "string",
|
|
126
|
+
"pattern": "^network:[a-zA-Z0-9.-]+(:\\d+)?$",
|
|
127
|
+
"errorMessage": {
|
|
128
|
+
"pattern": "Invalid network permission format"
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
],
|
|
132
|
+
"description": "Extension permission"
|
|
133
|
+
},
|
|
134
|
+
"description": "Required permissions"
|
|
135
|
+
},
|
|
136
|
+
"contributes": {
|
|
137
|
+
"type": "object",
|
|
138
|
+
"properties": {
|
|
139
|
+
"settings": {
|
|
140
|
+
"type": "array",
|
|
141
|
+
"items": {
|
|
142
|
+
"type": "object",
|
|
143
|
+
"properties": {
|
|
144
|
+
"id": {
|
|
145
|
+
"type": "string",
|
|
146
|
+
"description": "Setting ID (namespaced automatically)"
|
|
147
|
+
},
|
|
148
|
+
"title": {
|
|
149
|
+
"type": "string",
|
|
150
|
+
"description": "Display title"
|
|
151
|
+
},
|
|
152
|
+
"description": {
|
|
153
|
+
"type": "string",
|
|
154
|
+
"description": "Help text"
|
|
155
|
+
},
|
|
156
|
+
"type": {
|
|
157
|
+
"type": "string",
|
|
158
|
+
"enum": [
|
|
159
|
+
"string",
|
|
160
|
+
"number",
|
|
161
|
+
"boolean",
|
|
162
|
+
"select"
|
|
163
|
+
],
|
|
164
|
+
"description": "Setting type"
|
|
165
|
+
},
|
|
166
|
+
"default": {
|
|
167
|
+
"description": "Default value"
|
|
168
|
+
},
|
|
169
|
+
"options": {
|
|
170
|
+
"type": "array",
|
|
171
|
+
"items": {
|
|
172
|
+
"type": "object",
|
|
173
|
+
"properties": {
|
|
174
|
+
"value": {
|
|
175
|
+
"type": "string"
|
|
176
|
+
},
|
|
177
|
+
"label": {
|
|
178
|
+
"type": "string"
|
|
179
|
+
}
|
|
180
|
+
},
|
|
181
|
+
"required": [
|
|
182
|
+
"value",
|
|
183
|
+
"label"
|
|
184
|
+
],
|
|
185
|
+
"additionalProperties": false
|
|
186
|
+
},
|
|
187
|
+
"description": "For select type: available options"
|
|
188
|
+
},
|
|
189
|
+
"optionsToolId": {
|
|
190
|
+
"type": "string",
|
|
191
|
+
"description": "For select type: load options from tool"
|
|
192
|
+
},
|
|
193
|
+
"optionsParams": {
|
|
194
|
+
"type": "object",
|
|
195
|
+
"additionalProperties": {},
|
|
196
|
+
"description": "Params for options tool"
|
|
197
|
+
},
|
|
198
|
+
"optionsMapping": {
|
|
199
|
+
"type": "object",
|
|
200
|
+
"properties": {
|
|
201
|
+
"itemsKey": {
|
|
202
|
+
"type": "string",
|
|
203
|
+
"description": "Key for items array in tool result data"
|
|
204
|
+
},
|
|
205
|
+
"valueKey": {
|
|
206
|
+
"type": "string",
|
|
207
|
+
"description": "Key for option value"
|
|
208
|
+
},
|
|
209
|
+
"labelKey": {
|
|
210
|
+
"type": "string",
|
|
211
|
+
"description": "Key for option label"
|
|
212
|
+
},
|
|
213
|
+
"descriptionKey": {
|
|
214
|
+
"type": "string",
|
|
215
|
+
"description": "Optional key for description"
|
|
216
|
+
}
|
|
217
|
+
},
|
|
218
|
+
"required": [
|
|
219
|
+
"itemsKey",
|
|
220
|
+
"valueKey",
|
|
221
|
+
"labelKey"
|
|
222
|
+
],
|
|
223
|
+
"additionalProperties": false,
|
|
224
|
+
"description": "Mapping for options tool response"
|
|
225
|
+
},
|
|
226
|
+
"createToolId": {
|
|
227
|
+
"type": "string",
|
|
228
|
+
"description": "Tool ID for creating a new option"
|
|
229
|
+
},
|
|
230
|
+
"createLabel": {
|
|
231
|
+
"type": "string",
|
|
232
|
+
"description": "Label for create action"
|
|
233
|
+
},
|
|
234
|
+
"createFields": {
|
|
235
|
+
"type": "array",
|
|
236
|
+
"items": {
|
|
237
|
+
"$ref": "#/definitions/ExtensionManifest/properties/contributes/properties/settings/items"
|
|
238
|
+
},
|
|
239
|
+
"description": "Fields for create form"
|
|
240
|
+
},
|
|
241
|
+
"createParams": {
|
|
242
|
+
"type": "object",
|
|
243
|
+
"additionalProperties": {},
|
|
244
|
+
"description": "Static params for create tool"
|
|
245
|
+
},
|
|
246
|
+
"createMapping": {
|
|
247
|
+
"type": "object",
|
|
248
|
+
"properties": {
|
|
249
|
+
"resultKey": {
|
|
250
|
+
"type": "string",
|
|
251
|
+
"description": "Key for result data object"
|
|
252
|
+
},
|
|
253
|
+
"valueKey": {
|
|
254
|
+
"type": "string",
|
|
255
|
+
"description": "Key for option value (defaults to \"id\")"
|
|
256
|
+
}
|
|
257
|
+
},
|
|
258
|
+
"required": [
|
|
259
|
+
"valueKey"
|
|
260
|
+
],
|
|
261
|
+
"additionalProperties": false,
|
|
262
|
+
"description": "Mapping for create tool response"
|
|
263
|
+
},
|
|
264
|
+
"validation": {
|
|
265
|
+
"type": "object",
|
|
266
|
+
"properties": {
|
|
267
|
+
"required": {
|
|
268
|
+
"type": "boolean",
|
|
269
|
+
"description": "Whether the field is required"
|
|
270
|
+
},
|
|
271
|
+
"min": {
|
|
272
|
+
"type": "number",
|
|
273
|
+
"description": "Minimum value (number) or length (string)"
|
|
274
|
+
},
|
|
275
|
+
"max": {
|
|
276
|
+
"type": "number",
|
|
277
|
+
"description": "Maximum value (number) or length (string)"
|
|
278
|
+
},
|
|
279
|
+
"pattern": {
|
|
280
|
+
"type": "string",
|
|
281
|
+
"description": "Regex pattern for validation"
|
|
282
|
+
}
|
|
283
|
+
},
|
|
284
|
+
"additionalProperties": false,
|
|
285
|
+
"description": "Validation rules"
|
|
286
|
+
}
|
|
287
|
+
},
|
|
288
|
+
"required": [
|
|
289
|
+
"id",
|
|
290
|
+
"title",
|
|
291
|
+
"type"
|
|
292
|
+
],
|
|
293
|
+
"additionalProperties": false,
|
|
294
|
+
"description": "Setting definition"
|
|
295
|
+
},
|
|
296
|
+
"description": "User-configurable settings"
|
|
297
|
+
},
|
|
298
|
+
"toolSettings": {
|
|
299
|
+
"type": "array",
|
|
300
|
+
"items": {
|
|
301
|
+
"type": "object",
|
|
302
|
+
"properties": {
|
|
303
|
+
"id": {
|
|
304
|
+
"type": "string",
|
|
305
|
+
"description": "Unique view ID within the extension"
|
|
306
|
+
},
|
|
307
|
+
"title": {
|
|
308
|
+
"type": "string",
|
|
309
|
+
"description": "Display title"
|
|
310
|
+
},
|
|
311
|
+
"description": {
|
|
312
|
+
"type": "string",
|
|
313
|
+
"description": "Help text"
|
|
314
|
+
},
|
|
315
|
+
"view": {
|
|
316
|
+
"anyOf": [
|
|
317
|
+
{
|
|
318
|
+
"type": "object",
|
|
319
|
+
"properties": {
|
|
320
|
+
"kind": {
|
|
321
|
+
"type": "string",
|
|
322
|
+
"const": "list",
|
|
323
|
+
"description": "View kind"
|
|
324
|
+
},
|
|
325
|
+
"listToolId": {
|
|
326
|
+
"type": "string",
|
|
327
|
+
"description": "Tool ID for listing items"
|
|
328
|
+
},
|
|
329
|
+
"getToolId": {
|
|
330
|
+
"type": "string",
|
|
331
|
+
"description": "Tool ID for fetching details"
|
|
332
|
+
},
|
|
333
|
+
"upsertToolId": {
|
|
334
|
+
"type": "string",
|
|
335
|
+
"description": "Tool ID for creating/updating items"
|
|
336
|
+
},
|
|
337
|
+
"deleteToolId": {
|
|
338
|
+
"type": "string",
|
|
339
|
+
"description": "Tool ID for deleting items"
|
|
340
|
+
},
|
|
341
|
+
"mapping": {
|
|
342
|
+
"type": "object",
|
|
343
|
+
"properties": {
|
|
344
|
+
"itemsKey": {
|
|
345
|
+
"type": "string",
|
|
346
|
+
"description": "Key for items array in tool result data"
|
|
347
|
+
},
|
|
348
|
+
"countKey": {
|
|
349
|
+
"type": "string",
|
|
350
|
+
"description": "Key for total count"
|
|
351
|
+
},
|
|
352
|
+
"idKey": {
|
|
353
|
+
"type": "string",
|
|
354
|
+
"description": "Key for item ID"
|
|
355
|
+
},
|
|
356
|
+
"labelKey": {
|
|
357
|
+
"type": "string",
|
|
358
|
+
"description": "Key for item label"
|
|
359
|
+
},
|
|
360
|
+
"descriptionKey": {
|
|
361
|
+
"type": "string",
|
|
362
|
+
"description": "Key for item description"
|
|
363
|
+
},
|
|
364
|
+
"secondaryKey": {
|
|
365
|
+
"type": "string",
|
|
366
|
+
"description": "Key for secondary label"
|
|
367
|
+
}
|
|
368
|
+
},
|
|
369
|
+
"required": [
|
|
370
|
+
"itemsKey",
|
|
371
|
+
"idKey",
|
|
372
|
+
"labelKey"
|
|
373
|
+
],
|
|
374
|
+
"additionalProperties": false,
|
|
375
|
+
"description": "Mapping from tool data to UI"
|
|
376
|
+
},
|
|
377
|
+
"searchParam": {
|
|
378
|
+
"type": "string",
|
|
379
|
+
"description": "Param name for search query"
|
|
380
|
+
},
|
|
381
|
+
"limitParam": {
|
|
382
|
+
"type": "string",
|
|
383
|
+
"description": "Param name for limit"
|
|
384
|
+
},
|
|
385
|
+
"idParam": {
|
|
386
|
+
"type": "string",
|
|
387
|
+
"description": "Param name for get/delete ID"
|
|
388
|
+
},
|
|
389
|
+
"listParams": {
|
|
390
|
+
"type": "object",
|
|
391
|
+
"additionalProperties": {},
|
|
392
|
+
"description": "Static params for list tool"
|
|
393
|
+
}
|
|
394
|
+
},
|
|
395
|
+
"required": [
|
|
396
|
+
"kind",
|
|
397
|
+
"listToolId",
|
|
398
|
+
"mapping"
|
|
399
|
+
],
|
|
400
|
+
"additionalProperties": false,
|
|
401
|
+
"description": "List view backed by tools"
|
|
402
|
+
},
|
|
403
|
+
{
|
|
404
|
+
"type": "object",
|
|
405
|
+
"properties": {
|
|
406
|
+
"kind": {
|
|
407
|
+
"type": "string",
|
|
408
|
+
"const": "component",
|
|
409
|
+
"description": "View kind"
|
|
410
|
+
},
|
|
411
|
+
"data": {
|
|
412
|
+
"type": "object",
|
|
413
|
+
"additionalProperties": {
|
|
414
|
+
"type": "object",
|
|
415
|
+
"properties": {
|
|
416
|
+
"action": {
|
|
417
|
+
"type": "string",
|
|
418
|
+
"description": "Action ID to call for fetching data"
|
|
419
|
+
},
|
|
420
|
+
"params": {
|
|
421
|
+
"type": "object",
|
|
422
|
+
"additionalProperties": {},
|
|
423
|
+
"description": "Parameters to pass to the action"
|
|
424
|
+
},
|
|
425
|
+
"refreshOn": {
|
|
426
|
+
"type": "array",
|
|
427
|
+
"items": {
|
|
428
|
+
"type": "string"
|
|
429
|
+
},
|
|
430
|
+
"description": "Event names that trigger refresh"
|
|
431
|
+
}
|
|
432
|
+
},
|
|
433
|
+
"required": [
|
|
434
|
+
"action"
|
|
435
|
+
],
|
|
436
|
+
"additionalProperties": false,
|
|
437
|
+
"description": "Action-based data source"
|
|
438
|
+
},
|
|
439
|
+
"description": "Data sources"
|
|
440
|
+
},
|
|
441
|
+
"content": {
|
|
442
|
+
"type": "object",
|
|
443
|
+
"properties": {
|
|
444
|
+
"component": {
|
|
445
|
+
"type": "string",
|
|
446
|
+
"description": "Component type name"
|
|
447
|
+
},
|
|
448
|
+
"style": {
|
|
449
|
+
"type": "object",
|
|
450
|
+
"additionalProperties": {
|
|
451
|
+
"type": "string"
|
|
452
|
+
},
|
|
453
|
+
"propertyNames": {
|
|
454
|
+
"enum": [
|
|
455
|
+
"color",
|
|
456
|
+
"background-color",
|
|
457
|
+
"background",
|
|
458
|
+
"border-color",
|
|
459
|
+
"border",
|
|
460
|
+
"border-width",
|
|
461
|
+
"border-style",
|
|
462
|
+
"border-radius",
|
|
463
|
+
"border-top",
|
|
464
|
+
"border-right",
|
|
465
|
+
"border-bottom",
|
|
466
|
+
"border-left",
|
|
467
|
+
"border-top-left-radius",
|
|
468
|
+
"border-top-right-radius",
|
|
469
|
+
"border-bottom-left-radius",
|
|
470
|
+
"border-bottom-right-radius",
|
|
471
|
+
"padding",
|
|
472
|
+
"padding-top",
|
|
473
|
+
"padding-right",
|
|
474
|
+
"padding-bottom",
|
|
475
|
+
"padding-left",
|
|
476
|
+
"margin",
|
|
477
|
+
"margin-top",
|
|
478
|
+
"margin-right",
|
|
479
|
+
"margin-bottom",
|
|
480
|
+
"margin-left",
|
|
481
|
+
"gap",
|
|
482
|
+
"row-gap",
|
|
483
|
+
"column-gap",
|
|
484
|
+
"font-size",
|
|
485
|
+
"font-weight",
|
|
486
|
+
"font-style",
|
|
487
|
+
"text-align",
|
|
488
|
+
"text-decoration",
|
|
489
|
+
"line-height",
|
|
490
|
+
"letter-spacing",
|
|
491
|
+
"white-space",
|
|
492
|
+
"word-break",
|
|
493
|
+
"overflow-wrap",
|
|
494
|
+
"width",
|
|
495
|
+
"height",
|
|
496
|
+
"min-width",
|
|
497
|
+
"min-height",
|
|
498
|
+
"max-width",
|
|
499
|
+
"max-height",
|
|
500
|
+
"flex",
|
|
501
|
+
"flex-grow",
|
|
502
|
+
"flex-shrink",
|
|
503
|
+
"flex-basis",
|
|
504
|
+
"flex-wrap",
|
|
505
|
+
"align-self",
|
|
506
|
+
"justify-self",
|
|
507
|
+
"align-items",
|
|
508
|
+
"justify-content",
|
|
509
|
+
"opacity",
|
|
510
|
+
"visibility",
|
|
511
|
+
"overflow",
|
|
512
|
+
"overflow-x",
|
|
513
|
+
"overflow-y",
|
|
514
|
+
"box-shadow",
|
|
515
|
+
"outline",
|
|
516
|
+
"cursor",
|
|
517
|
+
"border-collapse",
|
|
518
|
+
"border-spacing"
|
|
519
|
+
]
|
|
520
|
+
},
|
|
521
|
+
"description": "Safe CSS styles for the component"
|
|
522
|
+
}
|
|
523
|
+
},
|
|
524
|
+
"required": [
|
|
525
|
+
"component"
|
|
526
|
+
],
|
|
527
|
+
"additionalProperties": true,
|
|
528
|
+
"description": "Root component to render"
|
|
529
|
+
}
|
|
530
|
+
},
|
|
531
|
+
"required": [
|
|
532
|
+
"kind",
|
|
533
|
+
"content"
|
|
534
|
+
],
|
|
535
|
+
"additionalProperties": false,
|
|
536
|
+
"description": "Component-based tool settings view"
|
|
537
|
+
}
|
|
538
|
+
],
|
|
539
|
+
"description": "View configuration"
|
|
540
|
+
},
|
|
541
|
+
"fields": {
|
|
542
|
+
"type": "array",
|
|
543
|
+
"items": {
|
|
544
|
+
"$ref": "#/definitions/ExtensionManifest/properties/contributes/properties/settings/items"
|
|
545
|
+
},
|
|
546
|
+
"description": "Fields for create/edit forms"
|
|
547
|
+
}
|
|
548
|
+
},
|
|
549
|
+
"required": [
|
|
550
|
+
"id",
|
|
551
|
+
"title",
|
|
552
|
+
"view"
|
|
553
|
+
],
|
|
554
|
+
"additionalProperties": false,
|
|
555
|
+
"description": "Tool settings view definition"
|
|
556
|
+
},
|
|
557
|
+
"description": "Tool settings views"
|
|
558
|
+
},
|
|
559
|
+
"panels": {
|
|
560
|
+
"type": "array",
|
|
561
|
+
"items": {
|
|
562
|
+
"type": "object",
|
|
563
|
+
"properties": {
|
|
564
|
+
"id": {
|
|
565
|
+
"type": "string",
|
|
566
|
+
"description": "Unique panel ID within the extension"
|
|
567
|
+
},
|
|
568
|
+
"title": {
|
|
569
|
+
"type": "string",
|
|
570
|
+
"description": "Display title"
|
|
571
|
+
},
|
|
572
|
+
"icon": {
|
|
573
|
+
"type": "string",
|
|
574
|
+
"description": "Icon name (from huge-icons)"
|
|
575
|
+
},
|
|
576
|
+
"view": {
|
|
577
|
+
"anyOf": [
|
|
578
|
+
{
|
|
579
|
+
"type": "object",
|
|
580
|
+
"properties": {
|
|
581
|
+
"kind": {
|
|
582
|
+
"type": "string",
|
|
583
|
+
"const": "component",
|
|
584
|
+
"description": "View kind"
|
|
585
|
+
},
|
|
586
|
+
"data": {
|
|
587
|
+
"type": "object",
|
|
588
|
+
"additionalProperties": {
|
|
589
|
+
"type": "object",
|
|
590
|
+
"properties": {
|
|
591
|
+
"action": {
|
|
592
|
+
"type": "string",
|
|
593
|
+
"description": "Action ID to call for fetching data"
|
|
594
|
+
},
|
|
595
|
+
"params": {
|
|
596
|
+
"type": "object",
|
|
597
|
+
"additionalProperties": {},
|
|
598
|
+
"description": "Parameters to pass to the action"
|
|
599
|
+
},
|
|
600
|
+
"refreshOn": {
|
|
601
|
+
"type": "array",
|
|
602
|
+
"items": {
|
|
603
|
+
"type": "string"
|
|
604
|
+
},
|
|
605
|
+
"description": "Event names that trigger refresh"
|
|
606
|
+
}
|
|
607
|
+
},
|
|
608
|
+
"required": [
|
|
609
|
+
"action"
|
|
610
|
+
],
|
|
611
|
+
"additionalProperties": false,
|
|
612
|
+
"description": "Panel data source"
|
|
613
|
+
},
|
|
614
|
+
"description": "Data sources"
|
|
615
|
+
},
|
|
616
|
+
"content": {
|
|
617
|
+
"type": "object",
|
|
618
|
+
"properties": {
|
|
619
|
+
"component": {
|
|
620
|
+
"type": "string",
|
|
621
|
+
"description": "Component type name"
|
|
622
|
+
},
|
|
623
|
+
"style": {
|
|
624
|
+
"$ref": "#/definitions/ExtensionManifest/properties/contributes/properties/toolSettings/items/properties/view/anyOf/1/properties/content/properties/style",
|
|
625
|
+
"description": "Safe CSS styles for the component"
|
|
626
|
+
}
|
|
627
|
+
},
|
|
628
|
+
"required": [
|
|
629
|
+
"component"
|
|
630
|
+
],
|
|
631
|
+
"additionalProperties": true,
|
|
632
|
+
"description": "Root component to render"
|
|
633
|
+
}
|
|
634
|
+
},
|
|
635
|
+
"required": [
|
|
636
|
+
"kind",
|
|
637
|
+
"content"
|
|
638
|
+
],
|
|
639
|
+
"additionalProperties": false,
|
|
640
|
+
"description": "Component-based panel view"
|
|
641
|
+
},
|
|
642
|
+
{
|
|
643
|
+
"type": "object",
|
|
644
|
+
"properties": {
|
|
645
|
+
"kind": {
|
|
646
|
+
"type": "string",
|
|
647
|
+
"description": "View kind"
|
|
648
|
+
}
|
|
649
|
+
},
|
|
650
|
+
"required": [
|
|
651
|
+
"kind"
|
|
652
|
+
],
|
|
653
|
+
"additionalProperties": true,
|
|
654
|
+
"description": "Unknown panel view"
|
|
655
|
+
}
|
|
656
|
+
],
|
|
657
|
+
"description": "Panel view schema"
|
|
658
|
+
}
|
|
659
|
+
},
|
|
660
|
+
"required": [
|
|
661
|
+
"id",
|
|
662
|
+
"title",
|
|
663
|
+
"view"
|
|
664
|
+
],
|
|
665
|
+
"additionalProperties": false,
|
|
666
|
+
"description": "Panel definition"
|
|
667
|
+
},
|
|
668
|
+
"description": "Right panel contributions"
|
|
669
|
+
},
|
|
670
|
+
"providers": {
|
|
671
|
+
"type": "array",
|
|
672
|
+
"items": {
|
|
673
|
+
"type": "object",
|
|
674
|
+
"properties": {
|
|
675
|
+
"id": {
|
|
676
|
+
"type": "string",
|
|
677
|
+
"description": "Provider ID"
|
|
678
|
+
},
|
|
679
|
+
"name": {
|
|
680
|
+
"type": "string",
|
|
681
|
+
"description": "Display name"
|
|
682
|
+
},
|
|
683
|
+
"description": {
|
|
684
|
+
"type": "string",
|
|
685
|
+
"description": "Description"
|
|
686
|
+
},
|
|
687
|
+
"suggestedDefaultModel": {
|
|
688
|
+
"type": "string",
|
|
689
|
+
"description": "Suggested default model"
|
|
690
|
+
},
|
|
691
|
+
"defaultSettings": {
|
|
692
|
+
"type": "object",
|
|
693
|
+
"additionalProperties": {},
|
|
694
|
+
"description": "Default settings"
|
|
695
|
+
},
|
|
696
|
+
"configSchema": {
|
|
697
|
+
"type": "object",
|
|
698
|
+
"properties": {
|
|
699
|
+
"properties": {
|
|
700
|
+
"type": "object",
|
|
701
|
+
"additionalProperties": {
|
|
702
|
+
"type": "object",
|
|
703
|
+
"properties": {
|
|
704
|
+
"type": {
|
|
705
|
+
"type": "string",
|
|
706
|
+
"enum": [
|
|
707
|
+
"string",
|
|
708
|
+
"number",
|
|
709
|
+
"boolean",
|
|
710
|
+
"select",
|
|
711
|
+
"password",
|
|
712
|
+
"url"
|
|
713
|
+
],
|
|
714
|
+
"description": "Property type"
|
|
715
|
+
},
|
|
716
|
+
"title": {
|
|
717
|
+
"type": "string",
|
|
718
|
+
"description": "Display label"
|
|
719
|
+
},
|
|
720
|
+
"description": {
|
|
721
|
+
"type": "string",
|
|
722
|
+
"description": "Help text"
|
|
723
|
+
},
|
|
724
|
+
"default": {
|
|
725
|
+
"description": "Default value"
|
|
726
|
+
},
|
|
727
|
+
"required": {
|
|
728
|
+
"type": "boolean",
|
|
729
|
+
"description": "Whether the field is required"
|
|
730
|
+
},
|
|
731
|
+
"placeholder": {
|
|
732
|
+
"type": "string",
|
|
733
|
+
"description": "Placeholder text"
|
|
734
|
+
},
|
|
735
|
+
"options": {
|
|
736
|
+
"type": "array",
|
|
737
|
+
"items": {
|
|
738
|
+
"type": "object",
|
|
739
|
+
"properties": {
|
|
740
|
+
"value": {
|
|
741
|
+
"type": "string",
|
|
742
|
+
"description": "Value stored in settings"
|
|
743
|
+
},
|
|
744
|
+
"label": {
|
|
745
|
+
"type": "string",
|
|
746
|
+
"description": "Display label"
|
|
747
|
+
}
|
|
748
|
+
},
|
|
749
|
+
"required": [
|
|
750
|
+
"value",
|
|
751
|
+
"label"
|
|
752
|
+
],
|
|
753
|
+
"additionalProperties": false,
|
|
754
|
+
"description": "Select option"
|
|
755
|
+
},
|
|
756
|
+
"description": "For select type"
|
|
757
|
+
},
|
|
758
|
+
"validation": {
|
|
759
|
+
"type": "object",
|
|
760
|
+
"properties": {
|
|
761
|
+
"pattern": {
|
|
762
|
+
"type": "string",
|
|
763
|
+
"description": "Regex pattern the value must match"
|
|
764
|
+
},
|
|
765
|
+
"minLength": {
|
|
766
|
+
"type": "number",
|
|
767
|
+
"description": "Minimum string length"
|
|
768
|
+
},
|
|
769
|
+
"maxLength": {
|
|
770
|
+
"type": "number",
|
|
771
|
+
"description": "Maximum string length"
|
|
772
|
+
},
|
|
773
|
+
"min": {
|
|
774
|
+
"type": "number",
|
|
775
|
+
"description": "Minimum number value"
|
|
776
|
+
},
|
|
777
|
+
"max": {
|
|
778
|
+
"type": "number",
|
|
779
|
+
"description": "Maximum number value"
|
|
780
|
+
}
|
|
781
|
+
},
|
|
782
|
+
"additionalProperties": false,
|
|
783
|
+
"description": "Validation rules"
|
|
784
|
+
}
|
|
785
|
+
},
|
|
786
|
+
"required": [
|
|
787
|
+
"type",
|
|
788
|
+
"title"
|
|
789
|
+
],
|
|
790
|
+
"additionalProperties": false,
|
|
791
|
+
"description": "Provider config property"
|
|
792
|
+
},
|
|
793
|
+
"description": "Property definitions"
|
|
794
|
+
},
|
|
795
|
+
"order": {
|
|
796
|
+
"type": "array",
|
|
797
|
+
"items": {
|
|
798
|
+
"type": "string"
|
|
799
|
+
},
|
|
800
|
+
"description": "Display order of properties"
|
|
801
|
+
}
|
|
802
|
+
},
|
|
803
|
+
"required": [
|
|
804
|
+
"properties"
|
|
805
|
+
],
|
|
806
|
+
"additionalProperties": false,
|
|
807
|
+
"description": "Configuration UI schema"
|
|
808
|
+
}
|
|
809
|
+
},
|
|
810
|
+
"required": [
|
|
811
|
+
"id",
|
|
812
|
+
"name"
|
|
813
|
+
],
|
|
814
|
+
"additionalProperties": false,
|
|
815
|
+
"description": "Provider definition"
|
|
816
|
+
},
|
|
817
|
+
"description": "AI providers"
|
|
818
|
+
},
|
|
819
|
+
"tools": {
|
|
820
|
+
"type": "array",
|
|
821
|
+
"items": {
|
|
822
|
+
"type": "object",
|
|
823
|
+
"properties": {
|
|
824
|
+
"id": {
|
|
825
|
+
"type": "string",
|
|
826
|
+
"description": "Tool ID"
|
|
827
|
+
},
|
|
828
|
+
"name": {
|
|
829
|
+
"anyOf": [
|
|
830
|
+
{
|
|
831
|
+
"type": "string"
|
|
832
|
+
},
|
|
833
|
+
{
|
|
834
|
+
"type": "object",
|
|
835
|
+
"additionalProperties": {
|
|
836
|
+
"type": "string"
|
|
837
|
+
}
|
|
838
|
+
}
|
|
839
|
+
],
|
|
840
|
+
"description": "Display name"
|
|
841
|
+
},
|
|
842
|
+
"description": {
|
|
843
|
+
"anyOf": [
|
|
844
|
+
{
|
|
845
|
+
"$ref": "#/definitions/ExtensionManifest/properties/contributes/properties/tools/items/properties/name/anyOf/0"
|
|
846
|
+
},
|
|
847
|
+
{
|
|
848
|
+
"$ref": "#/definitions/ExtensionManifest/properties/contributes/properties/tools/items/properties/name/anyOf/1"
|
|
849
|
+
}
|
|
850
|
+
],
|
|
851
|
+
"description": "Description for Stina"
|
|
852
|
+
},
|
|
853
|
+
"parameters": {
|
|
854
|
+
"type": "object",
|
|
855
|
+
"additionalProperties": {},
|
|
856
|
+
"description": "Parameter schema (JSON Schema)"
|
|
857
|
+
}
|
|
858
|
+
},
|
|
859
|
+
"required": [
|
|
860
|
+
"id",
|
|
861
|
+
"name",
|
|
862
|
+
"description"
|
|
863
|
+
],
|
|
864
|
+
"additionalProperties": false,
|
|
865
|
+
"description": "Tool definition"
|
|
866
|
+
},
|
|
867
|
+
"description": "Tools for Stina to use"
|
|
868
|
+
},
|
|
869
|
+
"commands": {
|
|
870
|
+
"type": "array",
|
|
871
|
+
"items": {
|
|
872
|
+
"type": "object",
|
|
873
|
+
"properties": {
|
|
874
|
+
"id": {
|
|
875
|
+
"type": "string",
|
|
876
|
+
"description": "Command ID (e.g., \"weather\" for /weather)"
|
|
877
|
+
},
|
|
878
|
+
"name": {
|
|
879
|
+
"type": "string",
|
|
880
|
+
"description": "Display name"
|
|
881
|
+
},
|
|
882
|
+
"description": {
|
|
883
|
+
"type": "string",
|
|
884
|
+
"description": "Description"
|
|
885
|
+
}
|
|
886
|
+
},
|
|
887
|
+
"required": [
|
|
888
|
+
"id",
|
|
889
|
+
"name",
|
|
890
|
+
"description"
|
|
891
|
+
],
|
|
892
|
+
"additionalProperties": false,
|
|
893
|
+
"description": "Command definition"
|
|
894
|
+
},
|
|
895
|
+
"description": "Slash commands"
|
|
896
|
+
},
|
|
897
|
+
"prompts": {
|
|
898
|
+
"type": "array",
|
|
899
|
+
"items": {
|
|
900
|
+
"type": "object",
|
|
901
|
+
"properties": {
|
|
902
|
+
"id": {
|
|
903
|
+
"type": "string",
|
|
904
|
+
"description": "Unique ID within the extension"
|
|
905
|
+
},
|
|
906
|
+
"title": {
|
|
907
|
+
"type": "string",
|
|
908
|
+
"description": "Optional title for the prompt chunk"
|
|
909
|
+
},
|
|
910
|
+
"section": {
|
|
911
|
+
"type": "string",
|
|
912
|
+
"enum": [
|
|
913
|
+
"system",
|
|
914
|
+
"behavior",
|
|
915
|
+
"tools"
|
|
916
|
+
],
|
|
917
|
+
"description": "Prompt section placement"
|
|
918
|
+
},
|
|
919
|
+
"text": {
|
|
920
|
+
"type": "string",
|
|
921
|
+
"description": "Plain text prompt content"
|
|
922
|
+
},
|
|
923
|
+
"i18n": {
|
|
924
|
+
"type": "object",
|
|
925
|
+
"additionalProperties": {
|
|
926
|
+
"type": "string"
|
|
927
|
+
},
|
|
928
|
+
"description": "Localized prompt content"
|
|
929
|
+
},
|
|
930
|
+
"order": {
|
|
931
|
+
"type": "number",
|
|
932
|
+
"description": "Ordering hint (lower comes first)"
|
|
933
|
+
}
|
|
934
|
+
},
|
|
935
|
+
"required": [
|
|
936
|
+
"id"
|
|
937
|
+
],
|
|
938
|
+
"additionalProperties": false,
|
|
939
|
+
"description": "Prompt contribution"
|
|
940
|
+
},
|
|
941
|
+
"description": "Prompt contributions"
|
|
942
|
+
},
|
|
943
|
+
"storage": {
|
|
944
|
+
"type": "object",
|
|
945
|
+
"properties": {
|
|
946
|
+
"collections": {
|
|
947
|
+
"type": "object",
|
|
948
|
+
"additionalProperties": {
|
|
949
|
+
"type": "object",
|
|
950
|
+
"properties": {
|
|
951
|
+
"indexes": {
|
|
952
|
+
"type": "array",
|
|
953
|
+
"items": {
|
|
954
|
+
"type": "string"
|
|
955
|
+
},
|
|
956
|
+
"description": "Fields to index for fast queries"
|
|
957
|
+
}
|
|
958
|
+
},
|
|
959
|
+
"additionalProperties": false,
|
|
960
|
+
"description": "Collection configuration"
|
|
961
|
+
},
|
|
962
|
+
"description": "Collection definitions"
|
|
963
|
+
}
|
|
964
|
+
},
|
|
965
|
+
"required": [
|
|
966
|
+
"collections"
|
|
967
|
+
],
|
|
968
|
+
"additionalProperties": false,
|
|
969
|
+
"description": "Storage collection declarations"
|
|
970
|
+
}
|
|
971
|
+
},
|
|
972
|
+
"additionalProperties": false,
|
|
973
|
+
"description": "What the extension contributes"
|
|
974
|
+
}
|
|
975
|
+
},
|
|
976
|
+
"required": [
|
|
977
|
+
"id",
|
|
978
|
+
"name",
|
|
979
|
+
"version",
|
|
980
|
+
"description",
|
|
981
|
+
"author",
|
|
982
|
+
"main",
|
|
983
|
+
"permissions"
|
|
984
|
+
],
|
|
985
|
+
"additionalProperties": false,
|
|
986
|
+
"description": "Extension manifest format"
|
|
987
|
+
}
|
|
988
|
+
},
|
|
989
|
+
"$schema": "https://json-schema.org/draft-07/schema#",
|
|
990
|
+
"$id": "https://stina.app/schemas/extension-manifest.json",
|
|
991
|
+
"title": "Stina Extension Manifest",
|
|
992
|
+
"description": "Schema for Stina extension manifest.json files"
|
|
993
|
+
}
|