@lunchbox-labs/opencode-model-profiles 0.0.0-stage → 0.1.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/LICENSE +21 -0
- package/README.md +90 -2
- package/dist/apply.d.ts +11 -0
- package/dist/apply.js +70 -0
- package/dist/model-config-view.d.ts +36 -0
- package/dist/model-config-view.js +128 -0
- package/dist/models-file.d.ts +22 -0
- package/dist/models-file.js +155 -0
- package/dist/report.d.ts +17 -0
- package/dist/report.js +73 -0
- package/dist/resolution.d.ts +27 -0
- package/dist/resolution.js +140 -0
- package/dist/selection.d.ts +17 -0
- package/dist/selection.js +95 -0
- package/dist/server.d.ts +6 -0
- package/dist/server.js +40 -0
- package/dist/tui.d.ts +6 -0
- package/dist/tui.js +204 -0
- package/package.json +73 -4
- package/schema.json +97 -0
package/schema.json
ADDED
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://cdn.jsdelivr.net/npm/@lunchbox-labs/opencode-model-profiles/schema.json",
|
|
4
|
+
"title": "OpenCode Model Profiles",
|
|
5
|
+
"description": "Named model refs for OpenCode agents: defaults, per-worktree profiles and built-in agent refs.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"additionalProperties": false,
|
|
8
|
+
"properties": {
|
|
9
|
+
"$schema": {
|
|
10
|
+
"type": "string"
|
|
11
|
+
},
|
|
12
|
+
"defaultProfile": {
|
|
13
|
+
"description": "Profile used when no profile is saved for the worktree and OPENCODE_MODEL_PROFILE is unset.",
|
|
14
|
+
"type": "string",
|
|
15
|
+
"minLength": 1
|
|
16
|
+
},
|
|
17
|
+
"defaults": {
|
|
18
|
+
"description": "Model for each ref when the selected profile does not define it.",
|
|
19
|
+
"$ref": "#/$defs/refs"
|
|
20
|
+
},
|
|
21
|
+
"profiles": {
|
|
22
|
+
"description": "Profiles by name, each mapping ref names to models.",
|
|
23
|
+
"type": "object",
|
|
24
|
+
"propertyNames": {
|
|
25
|
+
"minLength": 1
|
|
26
|
+
},
|
|
27
|
+
"additionalProperties": {
|
|
28
|
+
"$ref": "#/$defs/refs"
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
"builtins": {
|
|
32
|
+
"description": "Ref for each built-in OpenCode agent. Built-in agents without a ref keep OpenCode's default model.",
|
|
33
|
+
"type": "object",
|
|
34
|
+
"additionalProperties": false,
|
|
35
|
+
"properties": {
|
|
36
|
+
"build": {
|
|
37
|
+
"$ref": "#/$defs/refName"
|
|
38
|
+
},
|
|
39
|
+
"plan": {
|
|
40
|
+
"$ref": "#/$defs/refName"
|
|
41
|
+
},
|
|
42
|
+
"general": {
|
|
43
|
+
"$ref": "#/$defs/refName"
|
|
44
|
+
},
|
|
45
|
+
"explore": {
|
|
46
|
+
"$ref": "#/$defs/refName"
|
|
47
|
+
},
|
|
48
|
+
"compaction": {
|
|
49
|
+
"$ref": "#/$defs/refName"
|
|
50
|
+
},
|
|
51
|
+
"title": {
|
|
52
|
+
"$ref": "#/$defs/refName"
|
|
53
|
+
},
|
|
54
|
+
"summary": {
|
|
55
|
+
"$ref": "#/$defs/refName"
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
"$defs": {
|
|
61
|
+
"refName": {
|
|
62
|
+
"type": "string",
|
|
63
|
+
"minLength": 1
|
|
64
|
+
},
|
|
65
|
+
"modelIdentifier": {
|
|
66
|
+
"type": "string",
|
|
67
|
+
"pattern": "^[^\\s/]+/\\S+$"
|
|
68
|
+
},
|
|
69
|
+
"refs": {
|
|
70
|
+
"type": "object",
|
|
71
|
+
"propertyNames": {
|
|
72
|
+
"minLength": 1
|
|
73
|
+
},
|
|
74
|
+
"additionalProperties": {
|
|
75
|
+
"oneOf": [
|
|
76
|
+
{
|
|
77
|
+
"$ref": "#/$defs/modelIdentifier"
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
"type": "object",
|
|
81
|
+
"additionalProperties": false,
|
|
82
|
+
"required": ["model"],
|
|
83
|
+
"properties": {
|
|
84
|
+
"model": {
|
|
85
|
+
"$ref": "#/$defs/modelIdentifier"
|
|
86
|
+
},
|
|
87
|
+
"variant": {
|
|
88
|
+
"type": "string",
|
|
89
|
+
"minLength": 1
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
]
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
}
|