@osovv/vv-opencode 0.14.0 → 0.17.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.
@@ -1,5 +1,13 @@
1
- export declare const VVOC_CONFIG_VERSION = 1;
1
+ import { type SupportedModelTargetName } from "./agent-models.js";
2
+ export declare const VVOC_CONFIG_VERSION = 2;
2
3
  export declare const VVOC_CONFIG_SCHEMA_URL: string;
4
+ type VvocConfigVersion = 1 | 2;
5
+ export type VvocPresetAgents = Partial<Record<SupportedModelTargetName, string>>;
6
+ export type VvocPreset = {
7
+ description?: string;
8
+ agents: VvocPresetAgents;
9
+ };
10
+ export type VvocPresets = Record<string, VvocPreset>;
3
11
  export type GuardianConfig = {
4
12
  model?: string;
5
13
  variant?: string;
@@ -42,151 +50,185 @@ export type VvocConfig = {
42
50
  guardian: GuardianConfig;
43
51
  memory: MemoryConfig;
44
52
  secretsRedaction: SecretsRedactionConfig;
53
+ presets: VvocPresets;
54
+ };
55
+ export type ParsedVvocConfig = {
56
+ sourceSchema: string;
57
+ sourceVersion: VvocConfigVersion;
58
+ config: VvocConfig;
45
59
  };
46
60
  export declare const VVOC_CONFIG_SCHEMA: {
47
- readonly $schema: "https://json-schema.org/draft/2020-12/schema";
48
- readonly $id: string;
49
- readonly title: "vvoc config";
50
- readonly description: "Canonical vvoc configuration document.";
51
- readonly type: "object";
52
- readonly additionalProperties: false;
53
- readonly required: readonly ["$schema", "version", "guardian", "memory", "secretsRedaction"];
54
- readonly properties: {
55
- readonly $schema: {
56
- readonly type: "string";
57
- readonly minLength: 1;
58
- readonly description: "Hosted JSON Schema URL for vvoc.json.";
61
+ $schema: string;
62
+ $id: string;
63
+ title: string;
64
+ description: string;
65
+ type: string;
66
+ additionalProperties: boolean;
67
+ required: string[];
68
+ properties: {
69
+ $schema: {
70
+ type: string;
71
+ minLength: number;
72
+ description: string;
59
73
  };
60
- readonly version: {
61
- readonly type: "integer";
62
- readonly const: 1;
74
+ version: {
75
+ type: string;
76
+ const: number;
63
77
  };
64
- readonly guardian: {
65
- readonly type: "object";
66
- readonly additionalProperties: false;
67
- readonly required: readonly ["timeoutMs", "approvalRiskThreshold", "reviewToastDurationMs"];
68
- readonly properties: {
69
- readonly model: {
70
- readonly type: "string";
71
- readonly minLength: 1;
72
- };
73
- readonly variant: {
74
- readonly type: "string";
75
- readonly minLength: 1;
76
- };
77
- readonly timeoutMs: {
78
- readonly type: "integer";
79
- readonly minimum: 1;
80
- };
81
- readonly approvalRiskThreshold: {
82
- readonly type: "integer";
83
- readonly minimum: 0;
84
- readonly maximum: 100;
85
- };
86
- readonly reviewToastDurationMs: {
87
- readonly type: "integer";
88
- readonly minimum: 1;
78
+ guardian: {
79
+ type: string;
80
+ additionalProperties: boolean;
81
+ required: string[];
82
+ properties: {
83
+ model: {
84
+ type: string;
85
+ minLength: number;
86
+ };
87
+ variant: {
88
+ type: string;
89
+ minLength: number;
90
+ };
91
+ timeoutMs: {
92
+ type: string;
93
+ minimum: number;
94
+ };
95
+ approvalRiskThreshold: {
96
+ type: string;
97
+ minimum: number;
98
+ maximum: number;
99
+ };
100
+ reviewToastDurationMs: {
101
+ type: string;
102
+ minimum: number;
89
103
  };
90
104
  };
91
105
  };
92
- readonly memory: {
93
- readonly type: "object";
94
- readonly additionalProperties: false;
95
- readonly required: readonly ["enabled", "defaultSearchLimit"];
96
- readonly properties: {
97
- readonly enabled: {
98
- readonly type: "boolean";
99
- };
100
- readonly defaultSearchLimit: {
101
- readonly type: "integer";
102
- readonly minimum: 1;
103
- };
104
- readonly reviewerModel: {
105
- readonly type: "string";
106
- readonly minLength: 1;
107
- };
108
- readonly reviewerVariant: {
109
- readonly type: "string";
110
- readonly minLength: 1;
106
+ memory: {
107
+ type: string;
108
+ additionalProperties: boolean;
109
+ required: string[];
110
+ properties: {
111
+ enabled: {
112
+ type: string;
113
+ };
114
+ defaultSearchLimit: {
115
+ type: string;
116
+ minimum: number;
117
+ };
118
+ reviewerModel: {
119
+ type: string;
120
+ minLength: number;
121
+ };
122
+ reviewerVariant: {
123
+ type: string;
124
+ minLength: number;
111
125
  };
112
126
  };
113
127
  };
114
- readonly secretsRedaction: {
115
- readonly type: "object";
116
- readonly additionalProperties: false;
117
- readonly required: readonly ["enabled", "secret", "ttlMs", "maxMappings", "patterns", "debug"];
118
- readonly properties: {
119
- readonly enabled: {
120
- readonly type: "boolean";
121
- };
122
- readonly secret: {
123
- readonly type: "string";
124
- readonly minLength: 1;
125
- };
126
- readonly ttlMs: {
127
- readonly type: "integer";
128
- readonly minimum: 0;
129
- };
130
- readonly maxMappings: {
131
- readonly type: "integer";
132
- readonly minimum: 1;
133
- };
134
- readonly debug: {
135
- readonly type: "boolean";
136
- };
137
- readonly patterns: {
138
- readonly type: "object";
139
- readonly additionalProperties: false;
140
- readonly required: readonly ["keywords", "regex", "builtin", "exclude"];
141
- readonly properties: {
142
- readonly keywords: {
143
- readonly type: "array";
144
- readonly items: {
145
- readonly type: "object";
146
- readonly additionalProperties: false;
147
- readonly required: readonly ["value"];
148
- readonly properties: {
149
- readonly value: {
150
- readonly type: "string";
151
- readonly minLength: 1;
128
+ secretsRedaction: {
129
+ type: string;
130
+ additionalProperties: boolean;
131
+ required: string[];
132
+ properties: {
133
+ enabled: {
134
+ type: string;
135
+ };
136
+ secret: {
137
+ type: string;
138
+ minLength: number;
139
+ };
140
+ ttlMs: {
141
+ type: string;
142
+ minimum: number;
143
+ };
144
+ maxMappings: {
145
+ type: string;
146
+ minimum: number;
147
+ };
148
+ debug: {
149
+ type: string;
150
+ };
151
+ patterns: {
152
+ type: string;
153
+ additionalProperties: boolean;
154
+ required: string[];
155
+ properties: {
156
+ keywords: {
157
+ type: string;
158
+ items: {
159
+ type: string;
160
+ additionalProperties: boolean;
161
+ required: string[];
162
+ properties: {
163
+ value: {
164
+ type: string;
165
+ minLength: number;
152
166
  };
153
- readonly category: {
154
- readonly type: "string";
155
- readonly minLength: 1;
167
+ category: {
168
+ type: string;
169
+ minLength: number;
156
170
  };
157
171
  };
158
172
  };
159
173
  };
160
- readonly regex: {
161
- readonly type: "array";
162
- readonly items: {
163
- readonly type: "object";
164
- readonly additionalProperties: false;
165
- readonly required: readonly ["pattern", "category"];
166
- readonly properties: {
167
- readonly pattern: {
168
- readonly type: "string";
169
- readonly minLength: 1;
174
+ regex: {
175
+ type: string;
176
+ items: {
177
+ type: string;
178
+ additionalProperties: boolean;
179
+ required: string[];
180
+ properties: {
181
+ pattern: {
182
+ type: string;
183
+ minLength: number;
170
184
  };
171
- readonly category: {
172
- readonly type: "string";
173
- readonly minLength: 1;
185
+ category: {
186
+ type: string;
187
+ minLength: number;
174
188
  };
175
189
  };
176
190
  };
177
191
  };
178
- readonly builtin: {
179
- readonly type: "array";
180
- readonly items: {
181
- readonly type: "string";
182
- readonly minLength: 1;
192
+ builtin: {
193
+ type: string;
194
+ items: {
195
+ type: string;
196
+ minLength: number;
183
197
  };
184
198
  };
185
- readonly exclude: {
186
- readonly type: "array";
187
- readonly items: {
188
- readonly type: "string";
189
- readonly minLength: 1;
199
+ exclude: {
200
+ type: string;
201
+ items: {
202
+ type: string;
203
+ minLength: number;
204
+ };
205
+ };
206
+ };
207
+ };
208
+ };
209
+ };
210
+ presets: {
211
+ type: string;
212
+ propertyNames: {
213
+ minLength: number;
214
+ };
215
+ additionalProperties: {
216
+ type: string;
217
+ additionalProperties: boolean;
218
+ required: string[];
219
+ properties: {
220
+ description: {
221
+ type: string;
222
+ minLength: number;
223
+ };
224
+ agents: {
225
+ type: string;
226
+ additionalProperties: boolean;
227
+ minProperties: number;
228
+ properties: {
229
+ [k: string]: {
230
+ type: string;
231
+ minLength: number;
190
232
  };
191
233
  };
192
234
  };
@@ -198,12 +240,15 @@ export declare const VVOC_CONFIG_SCHEMA: {
198
240
  export declare function createGuardianConfig(overrides?: GuardianConfigOverrides): GuardianConfig;
199
241
  export declare function createMemoryConfig(overrides?: MemoryConfigOverrides): MemoryConfig;
200
242
  export declare function createDefaultSecretsRedactionConfig(): SecretsRedactionConfig;
243
+ export declare function createDefaultVvocPresets(): VvocPresets;
201
244
  export declare function createDefaultVvocConfig(): VvocConfig;
202
245
  export declare function parseGuardianConfigText(text: string, label: string): GuardianConfigOverrides;
203
246
  export declare function renderGuardianConfig(overrides?: GuardianConfigOverrides): string;
204
247
  export declare function parseMemoryConfigText(text: string, label: string): MemoryConfigOverrides;
205
248
  export declare function renderMemoryConfig(overrides?: MemoryConfigOverrides): string;
249
+ export declare function parseVersionedVvocConfigText(text: string, label: string): ParsedVvocConfig;
206
250
  export declare function parseVvocConfigText(text: string, label: string): VvocConfig;
207
251
  export declare function loadLenientVvocConfigText(text: string, label: string, warnings: string[]): VvocConfig;
208
252
  export declare function renderVvocConfig(config?: VvocConfig): string;
209
253
  export declare function validateVvocConfigDocument(document: unknown): string[];
254
+ export {};