@holdpoint/yaml-core 0.1.0-alpha.7 → 0.1.0-alpha.9
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/index.d.ts +36 -322
- package/dist/index.js +8 -5
- package/dist/index.js.map +1 -1
- package/package.json +6 -6
package/dist/index.d.ts
CHANGED
|
@@ -24,362 +24,76 @@ declare function generateYaml(config: HoldpointConfig): string;
|
|
|
24
24
|
*/
|
|
25
25
|
declare function matchesWhen(when: string | undefined, changedFiles: string[], userPatterns?: Record<string, string>): boolean;
|
|
26
26
|
|
|
27
|
-
declare const HookEventSchema: z.ZodEnum<
|
|
27
|
+
declare const HookEventSchema: z.ZodEnum<{
|
|
28
|
+
before_done: "before_done";
|
|
29
|
+
}>;
|
|
28
30
|
declare const ConditionDefSchema: z.ZodObject<{
|
|
29
31
|
id: z.ZodString;
|
|
30
|
-
operator: z.ZodEnum<
|
|
32
|
+
operator: z.ZodEnum<{
|
|
33
|
+
file_exists: "file_exists";
|
|
34
|
+
file_contains: "file_contains";
|
|
35
|
+
env_var_set: "env_var_set";
|
|
36
|
+
shell_returns_0: "shell_returns_0";
|
|
37
|
+
}>;
|
|
31
38
|
path: z.ZodOptional<z.ZodString>;
|
|
32
39
|
contains: z.ZodOptional<z.ZodString>;
|
|
33
40
|
envVar: z.ZodOptional<z.ZodString>;
|
|
34
41
|
cmd: z.ZodOptional<z.ZodString>;
|
|
35
|
-
},
|
|
36
|
-
|
|
37
|
-
operator: "file_exists" | "file_contains" | "env_var_set" | "shell_returns_0";
|
|
38
|
-
path?: string | undefined;
|
|
39
|
-
contains?: string | undefined;
|
|
40
|
-
envVar?: string | undefined;
|
|
41
|
-
cmd?: string | undefined;
|
|
42
|
-
}, {
|
|
43
|
-
id: string;
|
|
44
|
-
operator: "file_exists" | "file_contains" | "env_var_set" | "shell_returns_0";
|
|
45
|
-
path?: string | undefined;
|
|
46
|
-
contains?: string | undefined;
|
|
47
|
-
envVar?: string | undefined;
|
|
48
|
-
cmd?: string | undefined;
|
|
49
|
-
}>;
|
|
50
|
-
declare const CheckDefSchema: z.ZodEffects<z.ZodEffects<z.ZodObject<{
|
|
42
|
+
}, z.core.$strip>;
|
|
43
|
+
declare const CheckDefSchema: z.ZodPreprocess<z.ZodObject<{
|
|
51
44
|
id: z.ZodString;
|
|
52
45
|
label: z.ZodString;
|
|
53
|
-
on: z.ZodOptional<z.ZodEnum<
|
|
46
|
+
on: z.ZodOptional<z.ZodEnum<{
|
|
47
|
+
before_done: "before_done";
|
|
48
|
+
}>>;
|
|
54
49
|
when: z.ZodOptional<z.ZodString>;
|
|
55
50
|
cmd: z.ZodOptional<z.ZodString>;
|
|
56
51
|
prompt: z.ZodOptional<z.ZodString>;
|
|
57
52
|
conditionId: z.ZodOptional<z.ZodString>;
|
|
58
|
-
},
|
|
59
|
-
|
|
60
|
-
label: string;
|
|
61
|
-
cmd?: string | undefined;
|
|
62
|
-
on?: "before_done" | undefined;
|
|
63
|
-
when?: string | undefined;
|
|
64
|
-
prompt?: string | undefined;
|
|
65
|
-
conditionId?: string | undefined;
|
|
66
|
-
}, {
|
|
67
|
-
id: string;
|
|
68
|
-
label: string;
|
|
69
|
-
cmd?: string | undefined;
|
|
70
|
-
on?: "before_done" | undefined;
|
|
71
|
-
when?: string | undefined;
|
|
72
|
-
prompt?: string | undefined;
|
|
73
|
-
conditionId?: string | undefined;
|
|
74
|
-
}>, {
|
|
75
|
-
id: string;
|
|
76
|
-
label: string;
|
|
77
|
-
cmd?: string | undefined;
|
|
78
|
-
on?: "before_done" | undefined;
|
|
79
|
-
when?: string | undefined;
|
|
80
|
-
prompt?: string | undefined;
|
|
81
|
-
conditionId?: string | undefined;
|
|
82
|
-
}, {
|
|
83
|
-
id: string;
|
|
84
|
-
label: string;
|
|
85
|
-
cmd?: string | undefined;
|
|
86
|
-
on?: "before_done" | undefined;
|
|
87
|
-
when?: string | undefined;
|
|
88
|
-
prompt?: string | undefined;
|
|
89
|
-
conditionId?: string | undefined;
|
|
90
|
-
}>, {
|
|
91
|
-
id: string;
|
|
92
|
-
label: string;
|
|
93
|
-
cmd?: string | undefined;
|
|
94
|
-
on?: "before_done" | undefined;
|
|
95
|
-
when?: string | undefined;
|
|
96
|
-
prompt?: string | undefined;
|
|
97
|
-
conditionId?: string | undefined;
|
|
98
|
-
}, unknown>;
|
|
99
|
-
declare const HoldpointConfigSchema: z.ZodEffects<z.ZodEffects<z.ZodObject<{
|
|
53
|
+
}, z.core.$strip>>;
|
|
54
|
+
declare const HoldpointConfigSchema: z.ZodPreprocess<z.ZodObject<{
|
|
100
55
|
version: z.ZodDefault<z.ZodNumber>;
|
|
101
56
|
context: z.ZodDefault<z.ZodObject<{
|
|
102
57
|
guides: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
103
|
-
},
|
|
104
|
-
guides: Record<string, string>;
|
|
105
|
-
}, {
|
|
106
|
-
guides?: Record<string, string> | undefined;
|
|
107
|
-
}>>;
|
|
58
|
+
}, z.core.$strip>>;
|
|
108
59
|
conditions: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
109
60
|
id: z.ZodString;
|
|
110
|
-
operator: z.ZodEnum<
|
|
61
|
+
operator: z.ZodEnum<{
|
|
62
|
+
file_exists: "file_exists";
|
|
63
|
+
file_contains: "file_contains";
|
|
64
|
+
env_var_set: "env_var_set";
|
|
65
|
+
shell_returns_0: "shell_returns_0";
|
|
66
|
+
}>;
|
|
111
67
|
path: z.ZodOptional<z.ZodString>;
|
|
112
68
|
contains: z.ZodOptional<z.ZodString>;
|
|
113
69
|
envVar: z.ZodOptional<z.ZodString>;
|
|
114
70
|
cmd: z.ZodOptional<z.ZodString>;
|
|
115
|
-
},
|
|
116
|
-
|
|
117
|
-
operator: "file_exists" | "file_contains" | "env_var_set" | "shell_returns_0";
|
|
118
|
-
path?: string | undefined;
|
|
119
|
-
contains?: string | undefined;
|
|
120
|
-
envVar?: string | undefined;
|
|
121
|
-
cmd?: string | undefined;
|
|
122
|
-
}, {
|
|
123
|
-
id: string;
|
|
124
|
-
operator: "file_exists" | "file_contains" | "env_var_set" | "shell_returns_0";
|
|
125
|
-
path?: string | undefined;
|
|
126
|
-
contains?: string | undefined;
|
|
127
|
-
envVar?: string | undefined;
|
|
128
|
-
cmd?: string | undefined;
|
|
129
|
-
}>, "many">>;
|
|
130
|
-
checks: z.ZodDefault<z.ZodArray<z.ZodEffects<z.ZodEffects<z.ZodObject<{
|
|
71
|
+
}, z.core.$strip>>>;
|
|
72
|
+
checks: z.ZodDefault<z.ZodArray<z.ZodPreprocess<z.ZodObject<{
|
|
131
73
|
id: z.ZodString;
|
|
132
74
|
label: z.ZodString;
|
|
133
|
-
on: z.ZodOptional<z.ZodEnum<
|
|
75
|
+
on: z.ZodOptional<z.ZodEnum<{
|
|
76
|
+
before_done: "before_done";
|
|
77
|
+
}>>;
|
|
134
78
|
when: z.ZodOptional<z.ZodString>;
|
|
135
79
|
cmd: z.ZodOptional<z.ZodString>;
|
|
136
80
|
prompt: z.ZodOptional<z.ZodString>;
|
|
137
81
|
conditionId: z.ZodOptional<z.ZodString>;
|
|
138
|
-
},
|
|
139
|
-
id: string;
|
|
140
|
-
label: string;
|
|
141
|
-
cmd?: string | undefined;
|
|
142
|
-
on?: "before_done" | undefined;
|
|
143
|
-
when?: string | undefined;
|
|
144
|
-
prompt?: string | undefined;
|
|
145
|
-
conditionId?: string | undefined;
|
|
146
|
-
}, {
|
|
147
|
-
id: string;
|
|
148
|
-
label: string;
|
|
149
|
-
cmd?: string | undefined;
|
|
150
|
-
on?: "before_done" | undefined;
|
|
151
|
-
when?: string | undefined;
|
|
152
|
-
prompt?: string | undefined;
|
|
153
|
-
conditionId?: string | undefined;
|
|
154
|
-
}>, {
|
|
155
|
-
id: string;
|
|
156
|
-
label: string;
|
|
157
|
-
cmd?: string | undefined;
|
|
158
|
-
on?: "before_done" | undefined;
|
|
159
|
-
when?: string | undefined;
|
|
160
|
-
prompt?: string | undefined;
|
|
161
|
-
conditionId?: string | undefined;
|
|
162
|
-
}, {
|
|
163
|
-
id: string;
|
|
164
|
-
label: string;
|
|
165
|
-
cmd?: string | undefined;
|
|
166
|
-
on?: "before_done" | undefined;
|
|
167
|
-
when?: string | undefined;
|
|
168
|
-
prompt?: string | undefined;
|
|
169
|
-
conditionId?: string | undefined;
|
|
170
|
-
}>, {
|
|
171
|
-
id: string;
|
|
172
|
-
label: string;
|
|
173
|
-
cmd?: string | undefined;
|
|
174
|
-
on?: "before_done" | undefined;
|
|
175
|
-
when?: string | undefined;
|
|
176
|
-
prompt?: string | undefined;
|
|
177
|
-
conditionId?: string | undefined;
|
|
178
|
-
}, unknown>, "many">>;
|
|
82
|
+
}, z.core.$strip>>>>;
|
|
179
83
|
patterns: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
180
|
-
session_context_files: z.ZodOptional<z.ZodArray<z.ZodString
|
|
84
|
+
session_context_files: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
181
85
|
engines: z.ZodOptional<z.ZodObject<{
|
|
182
86
|
claude: z.ZodOptional<z.ZodObject<{
|
|
183
87
|
stop_command: z.ZodOptional<z.ZodString>;
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
}, {
|
|
187
|
-
stop_command?: string | undefined;
|
|
188
|
-
}>>;
|
|
88
|
+
live_command: z.ZodOptional<z.ZodString>;
|
|
89
|
+
}, z.core.$strip>>;
|
|
189
90
|
codex: z.ZodOptional<z.ZodObject<{
|
|
190
91
|
stop_command: z.ZodOptional<z.ZodString>;
|
|
191
|
-
},
|
|
192
|
-
stop_command?: string | undefined;
|
|
193
|
-
}, {
|
|
194
|
-
stop_command?: string | undefined;
|
|
195
|
-
}>>;
|
|
92
|
+
}, z.core.$strip>>;
|
|
196
93
|
copilot: z.ZodOptional<z.ZodObject<{
|
|
197
94
|
check_command: z.ZodOptional<z.ZodString>;
|
|
198
|
-
},
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
check_command?: string | undefined;
|
|
202
|
-
}>>;
|
|
203
|
-
}, "strip", z.ZodTypeAny, {
|
|
204
|
-
claude?: {
|
|
205
|
-
stop_command?: string | undefined;
|
|
206
|
-
} | undefined;
|
|
207
|
-
codex?: {
|
|
208
|
-
stop_command?: string | undefined;
|
|
209
|
-
} | undefined;
|
|
210
|
-
copilot?: {
|
|
211
|
-
check_command?: string | undefined;
|
|
212
|
-
} | undefined;
|
|
213
|
-
}, {
|
|
214
|
-
claude?: {
|
|
215
|
-
stop_command?: string | undefined;
|
|
216
|
-
} | undefined;
|
|
217
|
-
codex?: {
|
|
218
|
-
stop_command?: string | undefined;
|
|
219
|
-
} | undefined;
|
|
220
|
-
copilot?: {
|
|
221
|
-
check_command?: string | undefined;
|
|
222
|
-
} | undefined;
|
|
223
|
-
}>>;
|
|
224
|
-
}, "strip", z.ZodTypeAny, {
|
|
225
|
-
checks: {
|
|
226
|
-
id: string;
|
|
227
|
-
label: string;
|
|
228
|
-
cmd?: string | undefined;
|
|
229
|
-
on?: "before_done" | undefined;
|
|
230
|
-
when?: string | undefined;
|
|
231
|
-
prompt?: string | undefined;
|
|
232
|
-
conditionId?: string | undefined;
|
|
233
|
-
}[];
|
|
234
|
-
version: number;
|
|
235
|
-
context: {
|
|
236
|
-
guides: Record<string, string>;
|
|
237
|
-
};
|
|
238
|
-
conditions: {
|
|
239
|
-
id: string;
|
|
240
|
-
operator: "file_exists" | "file_contains" | "env_var_set" | "shell_returns_0";
|
|
241
|
-
path?: string | undefined;
|
|
242
|
-
contains?: string | undefined;
|
|
243
|
-
envVar?: string | undefined;
|
|
244
|
-
cmd?: string | undefined;
|
|
245
|
-
}[];
|
|
246
|
-
patterns?: Record<string, string> | undefined;
|
|
247
|
-
session_context_files?: string[] | undefined;
|
|
248
|
-
engines?: {
|
|
249
|
-
claude?: {
|
|
250
|
-
stop_command?: string | undefined;
|
|
251
|
-
} | undefined;
|
|
252
|
-
codex?: {
|
|
253
|
-
stop_command?: string | undefined;
|
|
254
|
-
} | undefined;
|
|
255
|
-
copilot?: {
|
|
256
|
-
check_command?: string | undefined;
|
|
257
|
-
} | undefined;
|
|
258
|
-
} | undefined;
|
|
259
|
-
}, {
|
|
260
|
-
checks?: unknown[] | undefined;
|
|
261
|
-
version?: number | undefined;
|
|
262
|
-
context?: {
|
|
263
|
-
guides?: Record<string, string> | undefined;
|
|
264
|
-
} | undefined;
|
|
265
|
-
conditions?: {
|
|
266
|
-
id: string;
|
|
267
|
-
operator: "file_exists" | "file_contains" | "env_var_set" | "shell_returns_0";
|
|
268
|
-
path?: string | undefined;
|
|
269
|
-
contains?: string | undefined;
|
|
270
|
-
envVar?: string | undefined;
|
|
271
|
-
cmd?: string | undefined;
|
|
272
|
-
}[] | undefined;
|
|
273
|
-
patterns?: Record<string, string> | undefined;
|
|
274
|
-
session_context_files?: string[] | undefined;
|
|
275
|
-
engines?: {
|
|
276
|
-
claude?: {
|
|
277
|
-
stop_command?: string | undefined;
|
|
278
|
-
} | undefined;
|
|
279
|
-
codex?: {
|
|
280
|
-
stop_command?: string | undefined;
|
|
281
|
-
} | undefined;
|
|
282
|
-
copilot?: {
|
|
283
|
-
check_command?: string | undefined;
|
|
284
|
-
} | undefined;
|
|
285
|
-
} | undefined;
|
|
286
|
-
}>, {
|
|
287
|
-
checks: {
|
|
288
|
-
id: string;
|
|
289
|
-
label: string;
|
|
290
|
-
cmd?: string | undefined;
|
|
291
|
-
on?: "before_done" | undefined;
|
|
292
|
-
when?: string | undefined;
|
|
293
|
-
prompt?: string | undefined;
|
|
294
|
-
conditionId?: string | undefined;
|
|
295
|
-
}[];
|
|
296
|
-
version: number;
|
|
297
|
-
context: {
|
|
298
|
-
guides: Record<string, string>;
|
|
299
|
-
};
|
|
300
|
-
conditions: {
|
|
301
|
-
id: string;
|
|
302
|
-
operator: "file_exists" | "file_contains" | "env_var_set" | "shell_returns_0";
|
|
303
|
-
path?: string | undefined;
|
|
304
|
-
contains?: string | undefined;
|
|
305
|
-
envVar?: string | undefined;
|
|
306
|
-
cmd?: string | undefined;
|
|
307
|
-
}[];
|
|
308
|
-
patterns?: Record<string, string> | undefined;
|
|
309
|
-
session_context_files?: string[] | undefined;
|
|
310
|
-
engines?: {
|
|
311
|
-
claude?: {
|
|
312
|
-
stop_command?: string | undefined;
|
|
313
|
-
} | undefined;
|
|
314
|
-
codex?: {
|
|
315
|
-
stop_command?: string | undefined;
|
|
316
|
-
} | undefined;
|
|
317
|
-
copilot?: {
|
|
318
|
-
check_command?: string | undefined;
|
|
319
|
-
} | undefined;
|
|
320
|
-
} | undefined;
|
|
321
|
-
}, {
|
|
322
|
-
checks?: unknown[] | undefined;
|
|
323
|
-
version?: number | undefined;
|
|
324
|
-
context?: {
|
|
325
|
-
guides?: Record<string, string> | undefined;
|
|
326
|
-
} | undefined;
|
|
327
|
-
conditions?: {
|
|
328
|
-
id: string;
|
|
329
|
-
operator: "file_exists" | "file_contains" | "env_var_set" | "shell_returns_0";
|
|
330
|
-
path?: string | undefined;
|
|
331
|
-
contains?: string | undefined;
|
|
332
|
-
envVar?: string | undefined;
|
|
333
|
-
cmd?: string | undefined;
|
|
334
|
-
}[] | undefined;
|
|
335
|
-
patterns?: Record<string, string> | undefined;
|
|
336
|
-
session_context_files?: string[] | undefined;
|
|
337
|
-
engines?: {
|
|
338
|
-
claude?: {
|
|
339
|
-
stop_command?: string | undefined;
|
|
340
|
-
} | undefined;
|
|
341
|
-
codex?: {
|
|
342
|
-
stop_command?: string | undefined;
|
|
343
|
-
} | undefined;
|
|
344
|
-
copilot?: {
|
|
345
|
-
check_command?: string | undefined;
|
|
346
|
-
} | undefined;
|
|
347
|
-
} | undefined;
|
|
348
|
-
}>, {
|
|
349
|
-
checks: {
|
|
350
|
-
id: string;
|
|
351
|
-
label: string;
|
|
352
|
-
cmd?: string | undefined;
|
|
353
|
-
on?: "before_done" | undefined;
|
|
354
|
-
when?: string | undefined;
|
|
355
|
-
prompt?: string | undefined;
|
|
356
|
-
conditionId?: string | undefined;
|
|
357
|
-
}[];
|
|
358
|
-
version: number;
|
|
359
|
-
context: {
|
|
360
|
-
guides: Record<string, string>;
|
|
361
|
-
};
|
|
362
|
-
conditions: {
|
|
363
|
-
id: string;
|
|
364
|
-
operator: "file_exists" | "file_contains" | "env_var_set" | "shell_returns_0";
|
|
365
|
-
path?: string | undefined;
|
|
366
|
-
contains?: string | undefined;
|
|
367
|
-
envVar?: string | undefined;
|
|
368
|
-
cmd?: string | undefined;
|
|
369
|
-
}[];
|
|
370
|
-
patterns?: Record<string, string> | undefined;
|
|
371
|
-
session_context_files?: string[] | undefined;
|
|
372
|
-
engines?: {
|
|
373
|
-
claude?: {
|
|
374
|
-
stop_command?: string | undefined;
|
|
375
|
-
} | undefined;
|
|
376
|
-
codex?: {
|
|
377
|
-
stop_command?: string | undefined;
|
|
378
|
-
} | undefined;
|
|
379
|
-
copilot?: {
|
|
380
|
-
check_command?: string | undefined;
|
|
381
|
-
} | undefined;
|
|
382
|
-
} | undefined;
|
|
383
|
-
}, unknown>;
|
|
95
|
+
}, z.core.$strip>>;
|
|
96
|
+
}, z.core.$strip>>;
|
|
97
|
+
}, z.core.$strip>>;
|
|
384
98
|
|
|
385
99
|
export { CheckDefSchema, ConditionDefSchema, HoldpointConfigSchema, HookEventSchema, generateYaml, matchesWhen, parseHoldpointYaml, validateConfig };
|
package/dist/index.js
CHANGED
|
@@ -76,7 +76,7 @@ var CheckDefSchema = z.preprocess(
|
|
|
76
76
|
})
|
|
77
77
|
);
|
|
78
78
|
var HoldpointContextSchema = z.object({
|
|
79
|
-
guides: z.record(z.string()).default({})
|
|
79
|
+
guides: z.record(z.string(), z.string()).default({})
|
|
80
80
|
});
|
|
81
81
|
var BUILTIN_SCOPES = /* @__PURE__ */ new Set([
|
|
82
82
|
"frontend",
|
|
@@ -97,7 +97,10 @@ var BUILTIN_SCOPES = /* @__PURE__ */ new Set([
|
|
|
97
97
|
"structural"
|
|
98
98
|
]);
|
|
99
99
|
var EnginesConfigSchema = z.object({
|
|
100
|
-
claude: z.object({
|
|
100
|
+
claude: z.object({
|
|
101
|
+
stop_command: z.string().optional(),
|
|
102
|
+
live_command: z.string().optional()
|
|
103
|
+
}).optional(),
|
|
101
104
|
codex: z.object({ stop_command: z.string().optional() }).optional(),
|
|
102
105
|
copilot: z.object({ check_command: z.string().optional() }).optional()
|
|
103
106
|
}).optional();
|
|
@@ -108,7 +111,7 @@ var HoldpointConfigSchema = z.preprocess(
|
|
|
108
111
|
context: HoldpointContextSchema.default({ guides: {} }),
|
|
109
112
|
conditions: z.array(ConditionDefSchema).default([]),
|
|
110
113
|
checks: z.array(CheckDefSchema).default([]),
|
|
111
|
-
patterns: z.record(z.string()).optional(),
|
|
114
|
+
patterns: z.record(z.string(), z.string()).optional(),
|
|
112
115
|
session_context_files: z.array(z.string()).optional(),
|
|
113
116
|
engines: EnginesConfigSchema
|
|
114
117
|
}).superRefine((data, ctx) => {
|
|
@@ -139,7 +142,7 @@ function parseHoldpointYaml(text) {
|
|
|
139
142
|
const raw = yaml.load(text);
|
|
140
143
|
const result = HoldpointConfigSchema.safeParse(raw);
|
|
141
144
|
if (!result.success) {
|
|
142
|
-
const messages = result.error.
|
|
145
|
+
const messages = result.error.issues.map((e) => `${e.path.join(".")}: ${e.message}`).join("\n");
|
|
143
146
|
throw new Error(`Invalid checks.yaml:
|
|
144
147
|
${messages}`);
|
|
145
148
|
}
|
|
@@ -152,7 +155,7 @@ function validateConfig(config) {
|
|
|
152
155
|
}
|
|
153
156
|
return {
|
|
154
157
|
valid: false,
|
|
155
|
-
errors: result.error.
|
|
158
|
+
errors: result.error.issues.map((e) => ({
|
|
156
159
|
path: e.path.join("."),
|
|
157
160
|
message: e.message
|
|
158
161
|
}))
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/parser.ts","../src/schema.ts"],"sourcesContent":["import * as yaml from \"js-yaml\";\nimport type { HoldpointConfig, ValidationResult } from \"@holdpoint/types\";\nimport { HoldpointConfigSchema } from \"./schema.js\";\n\n/**\n * Parse a checks.yaml text into a HoldpointConfig.\n * Throws on invalid YAML or schema violations.\n */\nexport function parseHoldpointYaml(text: string): HoldpointConfig {\n const raw = yaml.load(text);\n const result = HoldpointConfigSchema.safeParse(raw);\n if (!result.success) {\n const messages = result.error.errors.map((e) => `${e.path.join(\".\")}: ${e.message}`).join(\"\\n\");\n throw new Error(`Invalid checks.yaml:\\n${messages}`);\n }\n return result.data as HoldpointConfig;\n}\n\n/**\n * Validate a parsed HoldpointConfig, returning structured errors.\n */\nexport function validateConfig(config: HoldpointConfig): ValidationResult {\n const result = HoldpointConfigSchema.safeParse(config);\n if (result.success) {\n return { valid: true, errors: [] };\n }\n return {\n valid: false,\n errors: result.error.errors.map((e) => ({\n path: e.path.join(\".\"),\n message: e.message,\n })),\n };\n}\n\n/**\n * Serialize a HoldpointConfig back to YAML text.\n */\nexport function generateYaml(config: HoldpointConfig): string {\n return yaml.dump(config, {\n indent: 2,\n lineWidth: 120,\n quotingType: '\"',\n forceQuotes: false,\n noRefs: true,\n });\n}\n","import { z } from \"zod\";\n\n// ─── Zod schemas ─────────────────────────────────────────────────────────────\n\nexport const HookEventSchema = z.enum([\"before_done\"]);\n\nexport const ConditionOperatorSchema = z.enum([\n \"file_exists\",\n \"file_contains\",\n \"env_var_set\",\n \"shell_returns_0\",\n]);\n\nexport const ConditionDefSchema = z.object({\n id: z.string().min(1),\n operator: ConditionOperatorSchema,\n path: z.string().optional(),\n contains: z.string().optional(),\n envVar: z.string().optional(),\n cmd: z.string().optional(),\n});\n\n/**\n * Per-item migration: handles legacy `trigger: { type, pattern }` → on/when\n * and legacy `manual:` field → `prompt:`.\n */\nfunction migrateLegacyCheckDef(raw: unknown): unknown {\n if (raw == null || typeof raw !== \"object\") return raw;\n const obj = raw as Record<string, unknown>;\n const result: Record<string, unknown> = { ...obj };\n\n // migrate trigger: { type, pattern } → on/when\n if (\"trigger\" in result && !(\"on\" in result) && !(\"when\" in result)) {\n const { trigger } = result;\n delete result.trigger;\n const t = trigger as Record<string, unknown>;\n if (t.type !== \"always\") {\n result.when = t.type === \"custom\" ? t.pattern : t.type;\n }\n }\n\n // migrate manual: → prompt:\n if (\"manual\" in result && !(\"prompt\" in result)) {\n result.prompt = result.manual;\n delete result.manual;\n }\n\n return result;\n}\n\n/**\n * Top-level migration: collapses ALL legacy array names into `checks:`.\n * Handles: deterministic, manual, task, prompt (any combination).\n * Existing `checks:` entries are preserved and come first.\n */\nfunction migrateLegacyConfig(raw: unknown): unknown {\n if (raw == null || typeof raw !== \"object\") return raw;\n const obj = raw as Record<string, unknown>;\n const result: Record<string, unknown> = { ...obj };\n\n const toArray = (key: string) => (Array.isArray(result[key]) ? (result[key] as unknown[]) : []);\n\n const merged = [\n ...toArray(\"checks\"),\n ...toArray(\"task\"),\n ...toArray(\"prompt\"),\n ...toArray(\"deterministic\"),\n ...toArray(\"manual\"),\n ].map(migrateLegacyCheckDef);\n\n if (\n \"checks\" in result ||\n \"task\" in result ||\n \"prompt\" in result ||\n \"deterministic\" in result ||\n \"manual\" in result\n ) {\n result.checks = merged;\n delete result.task;\n delete result.prompt;\n delete result.deterministic;\n delete result.manual;\n }\n\n return result;\n}\n\nexport const CheckDefSchema = z.preprocess(\n migrateLegacyCheckDef,\n z\n .object({\n id: z.string().min(1),\n label: z.string().min(1),\n on: HookEventSchema.optional(),\n when: z.string().optional(),\n cmd: z.string().optional(),\n prompt: z.string().optional(),\n conditionId: z.string().optional(),\n })\n .refine((c) => c.cmd !== undefined || c.prompt !== undefined, {\n message: \"A check must have either cmd (task) or prompt (agent instruction)\",\n }),\n);\n\nexport const HoldpointContextSchema = z.object({\n guides: z.record(z.string()).default({}),\n});\n\n/** Built-in scope names that cannot be overridden by user-defined patterns. */\nconst BUILTIN_SCOPES = new Set([\n \"frontend\",\n \"backend\",\n \"socket\",\n \"visual\",\n \"python\",\n \"go\",\n \"rust\",\n \"java\",\n \"ruby\",\n \"database\",\n \"prisma\",\n \"testing\",\n \"infra\",\n \"ci\",\n \"docs\",\n \"structural\",\n]);\n\nconst EnginesConfigSchema = z\n .object({\n claude: z.object({ stop_command: z.string().optional() }).optional(),\n codex: z.object({ stop_command: z.string().optional() }).optional(),\n copilot: z.object({ check_command: z.string().optional() }).optional(),\n })\n .optional();\n\nexport const HoldpointConfigSchema = z.preprocess(\n migrateLegacyConfig,\n z\n .object({\n version: z.number().int().positive().default(1),\n context: HoldpointContextSchema.default({ guides: {} }),\n conditions: z.array(ConditionDefSchema).default([]),\n checks: z.array(CheckDefSchema).default([]),\n patterns: z.record(z.string()).optional(),\n session_context_files: z.array(z.string()).optional(),\n engines: EnginesConfigSchema,\n })\n .superRefine((data, ctx) => {\n if (!data.patterns) return;\n for (const [key, value] of Object.entries(data.patterns)) {\n if (BUILTIN_SCOPES.has(key)) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n message: `'${key}' is a built-in scope name and cannot be redefined in patterns`,\n path: [\"patterns\", key],\n });\n }\n try {\n new RegExp(value);\n } catch {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n message: `Invalid regex in patterns.${key}: '${value}'`,\n path: [\"patterns\", key],\n });\n }\n }\n }),\n);\n"],"mappings":";;;;;AAAA,YAAY,UAAU;;;ACAtB,SAAS,SAAS;AAIX,IAAM,kBAAkB,EAAE,KAAK,CAAC,aAAa,CAAC;AAE9C,IAAM,0BAA0B,EAAE,KAAK;AAAA,EAC5C;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,CAAC;AAEM,IAAM,qBAAqB,EAAE,OAAO;AAAA,EACzC,IAAI,EAAE,OAAO,EAAE,IAAI,CAAC;AAAA,EACpB,UAAU;AAAA,EACV,MAAM,EAAE,OAAO,EAAE,SAAS;AAAA,EAC1B,UAAU,EAAE,OAAO,EAAE,SAAS;AAAA,EAC9B,QAAQ,EAAE,OAAO,EAAE,SAAS;AAAA,EAC5B,KAAK,EAAE,OAAO,EAAE,SAAS;AAC3B,CAAC;AAMD,SAAS,sBAAsB,KAA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O,SAAS;AAClB,WAAO,EAAE,OAAO,MAAM,QAAQ,CAAC,EAAE;AAAA,EACnC;AACA,SAAO;AAAA,IACL,OAAO;AAAA,IACP,QAAQ,OAAO,MAAM,OAAO,IAAI,CAAC,OAAO;AAAA,MACtC,MAAM,EAAE,KAAK,KAAK,GAAG;AAAA,MACrB,SAAS,EAAE;AAAA,IACb,EAAE;AAAA,EACJ;AACF;AAKO,SAAS,aAAa,QAAiC;AAC5D,SAAY,UAAK,QAAQ;AAAA,IACvB,QAAQ;AAAA,IACR,WAAW;AAAA,IACX,aAAa;AAAA,IACb,aAAa;AAAA,IACb,QAAQ;AAAA,EACV,CAAC;AACH;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../src/parser.ts","../src/schema.ts"],"sourcesContent":["import * as yaml from \"js-yaml\";\nimport type { HoldpointConfig, ValidationResult } from \"@holdpoint/types\";\nimport { HoldpointConfigSchema } from \"./schema.js\";\n\n/**\n * Parse a checks.yaml text into a HoldpointConfig.\n * Throws on invalid YAML or schema violations.\n */\nexport function parseHoldpointYaml(text: string): HoldpointConfig {\n const raw = yaml.load(text);\n const result = HoldpointConfigSchema.safeParse(raw);\n if (!result.success) {\n const messages = result.error.issues.map((e) => `${e.path.join(\".\")}: ${e.message}`).join(\"\\n\");\n throw new Error(`Invalid checks.yaml:\\n${messages}`);\n }\n return result.data as HoldpointConfig;\n}\n\n/**\n * Validate a parsed HoldpointConfig, returning structured errors.\n */\nexport function validateConfig(config: HoldpointConfig): ValidationResult {\n const result = HoldpointConfigSchema.safeParse(config);\n if (result.success) {\n return { valid: true, errors: [] };\n }\n return {\n valid: false,\n errors: result.error.issues.map((e) => ({\n path: e.path.join(\".\"),\n message: e.message,\n })),\n };\n}\n\n/**\n * Serialize a HoldpointConfig back to YAML text.\n */\nexport function generateYaml(config: HoldpointConfig): string {\n return yaml.dump(config, {\n indent: 2,\n lineWidth: 120,\n quotingType: '\"',\n forceQuotes: false,\n noRefs: true,\n });\n}\n","import { z } from \"zod\";\n\n// ─── Zod schemas ─────────────────────────────────────────────────────────────\n\nexport const HookEventSchema = z.enum([\"before_done\"]);\n\nexport const ConditionOperatorSchema = z.enum([\n \"file_exists\",\n \"file_contains\",\n \"env_var_set\",\n \"shell_returns_0\",\n]);\n\nexport const ConditionDefSchema = z.object({\n id: z.string().min(1),\n operator: ConditionOperatorSchema,\n path: z.string().optional(),\n contains: z.string().optional(),\n envVar: z.string().optional(),\n cmd: z.string().optional(),\n});\n\n/**\n * Per-item migration: handles legacy `trigger: { type, pattern }` → on/when\n * and legacy `manual:` field → `prompt:`.\n */\nfunction migrateLegacyCheckDef(raw: unknown): unknown {\n if (raw == null || typeof raw !== \"object\") return raw;\n const obj = raw as Record<string, unknown>;\n const result: Record<string, unknown> = { ...obj };\n\n // migrate trigger: { type, pattern } → on/when\n if (\"trigger\" in result && !(\"on\" in result) && !(\"when\" in result)) {\n const { trigger } = result;\n delete result.trigger;\n const t = trigger as Record<string, unknown>;\n if (t.type !== \"always\") {\n result.when = t.type === \"custom\" ? t.pattern : t.type;\n }\n }\n\n // migrate manual: → prompt:\n if (\"manual\" in result && !(\"prompt\" in result)) {\n result.prompt = result.manual;\n delete result.manual;\n }\n\n return result;\n}\n\n/**\n * Top-level migration: collapses ALL legacy array names into `checks:`.\n * Handles: deterministic, manual, task, prompt (any combination).\n * Existing `checks:` entries are preserved and come first.\n */\nfunction migrateLegacyConfig(raw: unknown): unknown {\n if (raw == null || typeof raw !== \"object\") return raw;\n const obj = raw as Record<string, unknown>;\n const result: Record<string, unknown> = { ...obj };\n\n const toArray = (key: string) => (Array.isArray(result[key]) ? (result[key] as unknown[]) : []);\n\n const merged = [\n ...toArray(\"checks\"),\n ...toArray(\"task\"),\n ...toArray(\"prompt\"),\n ...toArray(\"deterministic\"),\n ...toArray(\"manual\"),\n ].map(migrateLegacyCheckDef);\n\n if (\n \"checks\" in result ||\n \"task\" in result ||\n \"prompt\" in result ||\n \"deterministic\" in result ||\n \"manual\" in result\n ) {\n result.checks = merged;\n delete result.task;\n delete result.prompt;\n delete result.deterministic;\n delete result.manual;\n }\n\n return result;\n}\n\nexport const CheckDefSchema = z.preprocess(\n migrateLegacyCheckDef,\n z\n .object({\n id: z.string().min(1),\n label: z.string().min(1),\n on: HookEventSchema.optional(),\n when: z.string().optional(),\n cmd: z.string().optional(),\n prompt: z.string().optional(),\n conditionId: z.string().optional(),\n })\n .refine((c) => c.cmd !== undefined || c.prompt !== undefined, {\n message: \"A check must have either cmd (task) or prompt (agent instruction)\",\n }),\n);\n\nexport const HoldpointContextSchema = z.object({\n guides: z.record(z.string(), z.string()).default({}),\n});\n\n/** Built-in scope names that cannot be overridden by user-defined patterns. */\nconst BUILTIN_SCOPES = new Set([\n \"frontend\",\n \"backend\",\n \"socket\",\n \"visual\",\n \"python\",\n \"go\",\n \"rust\",\n \"java\",\n \"ruby\",\n \"database\",\n \"prisma\",\n \"testing\",\n \"infra\",\n \"ci\",\n \"docs\",\n \"structural\",\n]);\n\nconst EnginesConfigSchema = z\n .object({\n claude: z\n .object({\n stop_command: z.string().optional(),\n live_command: z.string().optional(),\n })\n .optional(),\n codex: z.object({ stop_command: z.string().optional() }).optional(),\n copilot: z.object({ check_command: z.string().optional() }).optional(),\n })\n .optional();\n\nexport const HoldpointConfigSchema = z.preprocess(\n migrateLegacyConfig,\n z\n .object({\n version: z.number().int().positive().default(1),\n context: HoldpointContextSchema.default({ guides: {} }),\n conditions: z.array(ConditionDefSchema).default([]),\n checks: z.array(CheckDefSchema).default([]),\n patterns: z.record(z.string(), z.string()).optional(),\n session_context_files: z.array(z.string()).optional(),\n engines: EnginesConfigSchema,\n })\n .superRefine((data, ctx) => {\n if (!data.patterns) return;\n for (const [key, value] of Object.entries(data.patterns)) {\n if (BUILTIN_SCOPES.has(key)) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n message: `'${key}' is a built-in scope name and cannot be redefined in patterns`,\n path: [\"patterns\", key],\n });\n }\n try {\n new RegExp(value);\n } catch {\n ctx.addIssue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
+
"version": "0.1.0-alpha.9",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public",
|
|
6
6
|
"tag": "alpha"
|
|
@@ -49,15 +49,15 @@
|
|
|
49
49
|
"dependencies": {
|
|
50
50
|
"js-yaml": "^4.1.0",
|
|
51
51
|
"minimatch": "^10.0.1",
|
|
52
|
-
"zod": "^
|
|
53
|
-
"@holdpoint/types": "0.1.0-alpha.
|
|
52
|
+
"zod": "^4.4.3",
|
|
53
|
+
"@holdpoint/types": "0.1.0-alpha.8"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
56
|
"@types/js-yaml": "^4.0.9",
|
|
57
|
-
"@types/node": "^
|
|
57
|
+
"@types/node": "^25.9.1",
|
|
58
58
|
"tsup": "^8.3.5",
|
|
59
|
-
"typescript": "^
|
|
60
|
-
"vitest": "^
|
|
59
|
+
"typescript": "^6.0.3",
|
|
60
|
+
"vitest": "^4.1.7"
|
|
61
61
|
},
|
|
62
62
|
"scripts": {
|
|
63
63
|
"build": "tsup",
|