Repository navigation
Expand file tree
/
Copy pathschema.json
More file actions
95 lines (95 loc) · 3.45 KB
/
Copy pathschema.json
File metadata and controls
95 lines (95 loc) · 3.45 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
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://raw.githubusercontent.com/vmvarela/opencode-model-aliases/v0.4.0/schema.json",
"title": "opencode-model-aliases plugin options",
"description": "Schema for the plugin configuration file `.opencode/opencode-model-aliases.jsonc` and for the inline plugin `options` in `opencode.json`; file and inline options are merged before validation, so `aliases` may be omitted in the file when it is provided inline. The schema describes the JSON shape only: glob compilation, provider equality between match patterns and the alias key, and model-catalog collisions are enforced by the plugin at runtime. `$schema` is file-only metadata: it is accepted here and stripped before merging; inline options never accept it.",
"type": "object",
"additionalProperties": false,
"properties": {
"$schema": { "type": "string", "minLength": 1, "description": "File-only metadata; removed before merging and never accepted in inline options." },
"aliases": {
"type": "object",
"propertyNames": { "$ref": "#/definitions/selector" },
"additionalProperties": { "$ref": "#/definitions/alias" }
},
"strict": { "type": "boolean" },
"debug": { "type": "boolean" }
},
"definitions": {
"selector": {
"type": "string",
"minLength": 1,
"pattern": "^[^#/*?\\[\\]{}()!+@|\\\\]+/[^#]+$"
},
"alias": {
"type": "object",
"additionalProperties": false,
"required": ["match"],
"properties": {
"match": {
"oneOf": [
{ "$ref": "#/definitions/selector" },
{
"type": "array",
"minItems": 1,
"items": { "$ref": "#/definitions/selector" }
}
]
},
"exclude": {
"oneOf": [
{ "$ref": "#/definitions/selector" },
{
"type": "array",
"items": { "$ref": "#/definitions/selector" }
}
]
},
"filter": { "$ref": "#/definitions/filter" },
"select": { "$ref": "#/definitions/select" },
"name": { "type": "string", "minLength": 1 }
}
},
"filter": {
"type": "object",
"additionalProperties": false,
"properties": {
"status": {
"type": "array",
"minItems": 1,
"items": { "type": "string", "enum": ["active", "alpha", "beta"] }
},
"capabilities": { "$ref": "#/definitions/capabilities" },
"minContext": { "type": "integer", "minimum": 1 },
"minAge": {
"type": "string",
"pattern": "^[1-9][0-9]*(h|d)$",
"description": "Minimum candidate age in whole hours or days, e.g. \"48h\" or \"3d\"; models released more recently are not eligible. Upper bound on magnitude is enforced at runtime."
}
}
},
"capabilities": {
"type": "object",
"additionalProperties": false,
"properties": {
"tools": { "type": "boolean" },
"input": {
"type": "array",
"minItems": 1,
"items": { "type": "string", "minLength": 1 }
},
"output": {
"type": "array",
"minItems": 1,
"items": { "type": "string", "minLength": 1 }
}
}
},
"select": {
"type": "object",
"additionalProperties": false,
"required": ["strategy"],
"properties": { "strategy": { "type": "string", "enum": ["latest"] } }
}
}
}