@changw98ic/core 1.0.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.
@@ -0,0 +1,676 @@
1
+ /**
2
+ * Skill Schema - 通用 Skill 定义格式
3
+ *
4
+ * 设计目标:
5
+ * - 平台无关: 可编译到 Claude Code / OpenAI / Cursor / OpenClaw
6
+ * - 类型安全: 使用 Zod 进行运行时验证
7
+ * - 可扩展: 支持自定义工具和工作流
8
+ */
9
+ import { z } from 'zod';
10
+ export declare const ToolTypeSchema: z.ZodEnum<["read", "write", "edit", "bash", "http", "task", "grep", "glob", "ask", "custom"]>;
11
+ export type ToolType = z.infer<typeof ToolTypeSchema>;
12
+ export declare const ToolDefinitionSchema: z.ZodObject<{
13
+ name: z.ZodString;
14
+ type: z.ZodEnum<["read", "write", "edit", "bash", "http", "task", "grep", "glob", "ask", "custom"]>;
15
+ description: z.ZodOptional<z.ZodString>;
16
+ schema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
17
+ required: z.ZodDefault<z.ZodBoolean>;
18
+ }, "strip", z.ZodTypeAny, {
19
+ type: "read" | "write" | "edit" | "bash" | "http" | "task" | "grep" | "glob" | "ask" | "custom";
20
+ name: string;
21
+ required: boolean;
22
+ description?: string | undefined;
23
+ schema?: Record<string, unknown> | undefined;
24
+ }, {
25
+ type: "read" | "write" | "edit" | "bash" | "http" | "task" | "grep" | "glob" | "ask" | "custom";
26
+ name: string;
27
+ description?: string | undefined;
28
+ schema?: Record<string, unknown> | undefined;
29
+ required?: boolean | undefined;
30
+ }>;
31
+ export type ToolDefinition = z.infer<typeof ToolDefinitionSchema>;
32
+ export declare const PromptRoleSchema: z.ZodEnum<["system", "user", "assistant"]>;
33
+ export type PromptRole = z.infer<typeof PromptRoleSchema>;
34
+ export declare const PromptTemplateSchema: z.ZodObject<{
35
+ role: z.ZodEnum<["system", "user", "assistant"]>;
36
+ content: z.ZodString;
37
+ condition: z.ZodOptional<z.ZodString>;
38
+ template: z.ZodOptional<z.ZodString>;
39
+ variables: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
40
+ }, "strip", z.ZodTypeAny, {
41
+ role: "system" | "user" | "assistant";
42
+ content: string;
43
+ condition?: string | undefined;
44
+ template?: string | undefined;
45
+ variables?: Record<string, string> | undefined;
46
+ }, {
47
+ role: "system" | "user" | "assistant";
48
+ content: string;
49
+ condition?: string | undefined;
50
+ template?: string | undefined;
51
+ variables?: Record<string, string> | undefined;
52
+ }>;
53
+ export type PromptTemplate = z.infer<typeof PromptTemplateSchema>;
54
+ export declare const WorkflowStepSchema: z.ZodObject<{
55
+ step: z.ZodString;
56
+ name: z.ZodOptional<z.ZodString>;
57
+ action: z.ZodString;
58
+ tools: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
59
+ references: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
60
+ condition: z.ZodOptional<z.ZodString>;
61
+ optional: z.ZodDefault<z.ZodBoolean>;
62
+ timeout: z.ZodOptional<z.ZodNumber>;
63
+ retry: z.ZodOptional<z.ZodNumber>;
64
+ onFailure: z.ZodDefault<z.ZodEnum<["abort", "skip", "continue"]>>;
65
+ }, "strip", z.ZodTypeAny, {
66
+ step: string;
67
+ action: string;
68
+ optional: boolean;
69
+ onFailure: "abort" | "skip" | "continue";
70
+ name?: string | undefined;
71
+ condition?: string | undefined;
72
+ tools?: string[] | undefined;
73
+ references?: string[] | undefined;
74
+ timeout?: number | undefined;
75
+ retry?: number | undefined;
76
+ }, {
77
+ step: string;
78
+ action: string;
79
+ name?: string | undefined;
80
+ condition?: string | undefined;
81
+ tools?: string[] | undefined;
82
+ references?: string[] | undefined;
83
+ optional?: boolean | undefined;
84
+ timeout?: number | undefined;
85
+ retry?: number | undefined;
86
+ onFailure?: "abort" | "skip" | "continue" | undefined;
87
+ }>;
88
+ export type WorkflowStep = z.infer<typeof WorkflowStepSchema>;
89
+ export declare const ReferenceLoadLevelSchema: z.ZodEnum<["L0", "L1", "L2", "L3"]>;
90
+ export type ReferenceLoadLevel = z.infer<typeof ReferenceLoadLevelSchema>;
91
+ export declare const ReferenceDefinitionSchema: z.ZodObject<{
92
+ path: z.ZodString;
93
+ purpose: z.ZodOptional<z.ZodString>;
94
+ level: z.ZodDefault<z.ZodEnum<["L0", "L1", "L2", "L3"]>>;
95
+ trigger: z.ZodOptional<z.ZodString>;
96
+ }, "strip", z.ZodTypeAny, {
97
+ path: string;
98
+ level: "L0" | "L1" | "L2" | "L3";
99
+ purpose?: string | undefined;
100
+ trigger?: string | undefined;
101
+ }, {
102
+ path: string;
103
+ purpose?: string | undefined;
104
+ level?: "L0" | "L1" | "L2" | "L3" | undefined;
105
+ trigger?: string | undefined;
106
+ }>;
107
+ export type ReferenceDefinition = z.infer<typeof ReferenceDefinitionSchema>;
108
+ export declare const SuccessCriterionSchema: z.ZodObject<{
109
+ id: z.ZodString;
110
+ description: z.ZodString;
111
+ required: z.ZodDefault<z.ZodBoolean>;
112
+ validateCommand: z.ZodOptional<z.ZodString>;
113
+ }, "strip", z.ZodTypeAny, {
114
+ description: string;
115
+ required: boolean;
116
+ id: string;
117
+ validateCommand?: string | undefined;
118
+ }, {
119
+ description: string;
120
+ id: string;
121
+ required?: boolean | undefined;
122
+ validateCommand?: string | undefined;
123
+ }>;
124
+ export type SuccessCriterion = z.infer<typeof SuccessCriterionSchema>;
125
+ export declare const SkillSchema: z.ZodObject<{
126
+ name: z.ZodString;
127
+ version: z.ZodString;
128
+ description: z.ZodString;
129
+ triggers: z.ZodArray<z.ZodString, "many">;
130
+ tools: z.ZodArray<z.ZodObject<{
131
+ name: z.ZodString;
132
+ type: z.ZodEnum<["read", "write", "edit", "bash", "http", "task", "grep", "glob", "ask", "custom"]>;
133
+ description: z.ZodOptional<z.ZodString>;
134
+ schema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
135
+ required: z.ZodDefault<z.ZodBoolean>;
136
+ }, "strip", z.ZodTypeAny, {
137
+ type: "read" | "write" | "edit" | "bash" | "http" | "task" | "grep" | "glob" | "ask" | "custom";
138
+ name: string;
139
+ required: boolean;
140
+ description?: string | undefined;
141
+ schema?: Record<string, unknown> | undefined;
142
+ }, {
143
+ type: "read" | "write" | "edit" | "bash" | "http" | "task" | "grep" | "glob" | "ask" | "custom";
144
+ name: string;
145
+ description?: string | undefined;
146
+ schema?: Record<string, unknown> | undefined;
147
+ required?: boolean | undefined;
148
+ }>, "many">;
149
+ prompts: z.ZodArray<z.ZodObject<{
150
+ role: z.ZodEnum<["system", "user", "assistant"]>;
151
+ content: z.ZodString;
152
+ condition: z.ZodOptional<z.ZodString>;
153
+ template: z.ZodOptional<z.ZodString>;
154
+ variables: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
155
+ }, "strip", z.ZodTypeAny, {
156
+ role: "system" | "user" | "assistant";
157
+ content: string;
158
+ condition?: string | undefined;
159
+ template?: string | undefined;
160
+ variables?: Record<string, string> | undefined;
161
+ }, {
162
+ role: "system" | "user" | "assistant";
163
+ content: string;
164
+ condition?: string | undefined;
165
+ template?: string | undefined;
166
+ variables?: Record<string, string> | undefined;
167
+ }>, "many">;
168
+ workflow: z.ZodArray<z.ZodObject<{
169
+ step: z.ZodString;
170
+ name: z.ZodOptional<z.ZodString>;
171
+ action: z.ZodString;
172
+ tools: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
173
+ references: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
174
+ condition: z.ZodOptional<z.ZodString>;
175
+ optional: z.ZodDefault<z.ZodBoolean>;
176
+ timeout: z.ZodOptional<z.ZodNumber>;
177
+ retry: z.ZodOptional<z.ZodNumber>;
178
+ onFailure: z.ZodDefault<z.ZodEnum<["abort", "skip", "continue"]>>;
179
+ }, "strip", z.ZodTypeAny, {
180
+ step: string;
181
+ action: string;
182
+ optional: boolean;
183
+ onFailure: "abort" | "skip" | "continue";
184
+ name?: string | undefined;
185
+ condition?: string | undefined;
186
+ tools?: string[] | undefined;
187
+ references?: string[] | undefined;
188
+ timeout?: number | undefined;
189
+ retry?: number | undefined;
190
+ }, {
191
+ step: string;
192
+ action: string;
193
+ name?: string | undefined;
194
+ condition?: string | undefined;
195
+ tools?: string[] | undefined;
196
+ references?: string[] | undefined;
197
+ optional?: boolean | undefined;
198
+ timeout?: number | undefined;
199
+ retry?: number | undefined;
200
+ onFailure?: "abort" | "skip" | "continue" | undefined;
201
+ }>, "many">;
202
+ references: z.ZodOptional<z.ZodArray<z.ZodObject<{
203
+ path: z.ZodString;
204
+ purpose: z.ZodOptional<z.ZodString>;
205
+ level: z.ZodDefault<z.ZodEnum<["L0", "L1", "L2", "L3"]>>;
206
+ trigger: z.ZodOptional<z.ZodString>;
207
+ }, "strip", z.ZodTypeAny, {
208
+ path: string;
209
+ level: "L0" | "L1" | "L2" | "L3";
210
+ purpose?: string | undefined;
211
+ trigger?: string | undefined;
212
+ }, {
213
+ path: string;
214
+ purpose?: string | undefined;
215
+ level?: "L0" | "L1" | "L2" | "L3" | undefined;
216
+ trigger?: string | undefined;
217
+ }>, "many">>;
218
+ successCriteria: z.ZodOptional<z.ZodArray<z.ZodObject<{
219
+ id: z.ZodString;
220
+ description: z.ZodString;
221
+ required: z.ZodDefault<z.ZodBoolean>;
222
+ validateCommand: z.ZodOptional<z.ZodString>;
223
+ }, "strip", z.ZodTypeAny, {
224
+ description: string;
225
+ required: boolean;
226
+ id: string;
227
+ validateCommand?: string | undefined;
228
+ }, {
229
+ description: string;
230
+ id: string;
231
+ required?: boolean | undefined;
232
+ validateCommand?: string | undefined;
233
+ }>, "many">>;
234
+ author: z.ZodOptional<z.ZodString>;
235
+ license: z.ZodDefault<z.ZodString>;
236
+ keywords: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
237
+ homepage: z.ZodOptional<z.ZodString>;
238
+ repository: z.ZodOptional<z.ZodString>;
239
+ adapters: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
240
+ }, "strip", z.ZodTypeAny, {
241
+ name: string;
242
+ description: string;
243
+ tools: {
244
+ type: "read" | "write" | "edit" | "bash" | "http" | "task" | "grep" | "glob" | "ask" | "custom";
245
+ name: string;
246
+ required: boolean;
247
+ description?: string | undefined;
248
+ schema?: Record<string, unknown> | undefined;
249
+ }[];
250
+ version: string;
251
+ triggers: string[];
252
+ prompts: {
253
+ role: "system" | "user" | "assistant";
254
+ content: string;
255
+ condition?: string | undefined;
256
+ template?: string | undefined;
257
+ variables?: Record<string, string> | undefined;
258
+ }[];
259
+ workflow: {
260
+ step: string;
261
+ action: string;
262
+ optional: boolean;
263
+ onFailure: "abort" | "skip" | "continue";
264
+ name?: string | undefined;
265
+ condition?: string | undefined;
266
+ tools?: string[] | undefined;
267
+ references?: string[] | undefined;
268
+ timeout?: number | undefined;
269
+ retry?: number | undefined;
270
+ }[];
271
+ license: string;
272
+ references?: {
273
+ path: string;
274
+ level: "L0" | "L1" | "L2" | "L3";
275
+ purpose?: string | undefined;
276
+ trigger?: string | undefined;
277
+ }[] | undefined;
278
+ successCriteria?: {
279
+ description: string;
280
+ required: boolean;
281
+ id: string;
282
+ validateCommand?: string | undefined;
283
+ }[] | undefined;
284
+ author?: string | undefined;
285
+ keywords?: string[] | undefined;
286
+ homepage?: string | undefined;
287
+ repository?: string | undefined;
288
+ adapters?: Record<string, unknown> | undefined;
289
+ }, {
290
+ name: string;
291
+ description: string;
292
+ tools: {
293
+ type: "read" | "write" | "edit" | "bash" | "http" | "task" | "grep" | "glob" | "ask" | "custom";
294
+ name: string;
295
+ description?: string | undefined;
296
+ schema?: Record<string, unknown> | undefined;
297
+ required?: boolean | undefined;
298
+ }[];
299
+ version: string;
300
+ triggers: string[];
301
+ prompts: {
302
+ role: "system" | "user" | "assistant";
303
+ content: string;
304
+ condition?: string | undefined;
305
+ template?: string | undefined;
306
+ variables?: Record<string, string> | undefined;
307
+ }[];
308
+ workflow: {
309
+ step: string;
310
+ action: string;
311
+ name?: string | undefined;
312
+ condition?: string | undefined;
313
+ tools?: string[] | undefined;
314
+ references?: string[] | undefined;
315
+ optional?: boolean | undefined;
316
+ timeout?: number | undefined;
317
+ retry?: number | undefined;
318
+ onFailure?: "abort" | "skip" | "continue" | undefined;
319
+ }[];
320
+ references?: {
321
+ path: string;
322
+ purpose?: string | undefined;
323
+ level?: "L0" | "L1" | "L2" | "L3" | undefined;
324
+ trigger?: string | undefined;
325
+ }[] | undefined;
326
+ successCriteria?: {
327
+ description: string;
328
+ id: string;
329
+ required?: boolean | undefined;
330
+ validateCommand?: string | undefined;
331
+ }[] | undefined;
332
+ author?: string | undefined;
333
+ license?: string | undefined;
334
+ keywords?: string[] | undefined;
335
+ homepage?: string | undefined;
336
+ repository?: string | undefined;
337
+ adapters?: Record<string, unknown> | undefined;
338
+ }>;
339
+ export type Skill = z.infer<typeof SkillSchema>;
340
+ export declare const SkillCollectionSchema: z.ZodObject<{
341
+ name: z.ZodString;
342
+ version: z.ZodString;
343
+ description: z.ZodOptional<z.ZodString>;
344
+ skills: z.ZodArray<z.ZodObject<{
345
+ name: z.ZodString;
346
+ version: z.ZodString;
347
+ description: z.ZodString;
348
+ triggers: z.ZodArray<z.ZodString, "many">;
349
+ tools: z.ZodArray<z.ZodObject<{
350
+ name: z.ZodString;
351
+ type: z.ZodEnum<["read", "write", "edit", "bash", "http", "task", "grep", "glob", "ask", "custom"]>;
352
+ description: z.ZodOptional<z.ZodString>;
353
+ schema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
354
+ required: z.ZodDefault<z.ZodBoolean>;
355
+ }, "strip", z.ZodTypeAny, {
356
+ type: "read" | "write" | "edit" | "bash" | "http" | "task" | "grep" | "glob" | "ask" | "custom";
357
+ name: string;
358
+ required: boolean;
359
+ description?: string | undefined;
360
+ schema?: Record<string, unknown> | undefined;
361
+ }, {
362
+ type: "read" | "write" | "edit" | "bash" | "http" | "task" | "grep" | "glob" | "ask" | "custom";
363
+ name: string;
364
+ description?: string | undefined;
365
+ schema?: Record<string, unknown> | undefined;
366
+ required?: boolean | undefined;
367
+ }>, "many">;
368
+ prompts: z.ZodArray<z.ZodObject<{
369
+ role: z.ZodEnum<["system", "user", "assistant"]>;
370
+ content: z.ZodString;
371
+ condition: z.ZodOptional<z.ZodString>;
372
+ template: z.ZodOptional<z.ZodString>;
373
+ variables: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
374
+ }, "strip", z.ZodTypeAny, {
375
+ role: "system" | "user" | "assistant";
376
+ content: string;
377
+ condition?: string | undefined;
378
+ template?: string | undefined;
379
+ variables?: Record<string, string> | undefined;
380
+ }, {
381
+ role: "system" | "user" | "assistant";
382
+ content: string;
383
+ condition?: string | undefined;
384
+ template?: string | undefined;
385
+ variables?: Record<string, string> | undefined;
386
+ }>, "many">;
387
+ workflow: z.ZodArray<z.ZodObject<{
388
+ step: z.ZodString;
389
+ name: z.ZodOptional<z.ZodString>;
390
+ action: z.ZodString;
391
+ tools: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
392
+ references: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
393
+ condition: z.ZodOptional<z.ZodString>;
394
+ optional: z.ZodDefault<z.ZodBoolean>;
395
+ timeout: z.ZodOptional<z.ZodNumber>;
396
+ retry: z.ZodOptional<z.ZodNumber>;
397
+ onFailure: z.ZodDefault<z.ZodEnum<["abort", "skip", "continue"]>>;
398
+ }, "strip", z.ZodTypeAny, {
399
+ step: string;
400
+ action: string;
401
+ optional: boolean;
402
+ onFailure: "abort" | "skip" | "continue";
403
+ name?: string | undefined;
404
+ condition?: string | undefined;
405
+ tools?: string[] | undefined;
406
+ references?: string[] | undefined;
407
+ timeout?: number | undefined;
408
+ retry?: number | undefined;
409
+ }, {
410
+ step: string;
411
+ action: string;
412
+ name?: string | undefined;
413
+ condition?: string | undefined;
414
+ tools?: string[] | undefined;
415
+ references?: string[] | undefined;
416
+ optional?: boolean | undefined;
417
+ timeout?: number | undefined;
418
+ retry?: number | undefined;
419
+ onFailure?: "abort" | "skip" | "continue" | undefined;
420
+ }>, "many">;
421
+ references: z.ZodOptional<z.ZodArray<z.ZodObject<{
422
+ path: z.ZodString;
423
+ purpose: z.ZodOptional<z.ZodString>;
424
+ level: z.ZodDefault<z.ZodEnum<["L0", "L1", "L2", "L3"]>>;
425
+ trigger: z.ZodOptional<z.ZodString>;
426
+ }, "strip", z.ZodTypeAny, {
427
+ path: string;
428
+ level: "L0" | "L1" | "L2" | "L3";
429
+ purpose?: string | undefined;
430
+ trigger?: string | undefined;
431
+ }, {
432
+ path: string;
433
+ purpose?: string | undefined;
434
+ level?: "L0" | "L1" | "L2" | "L3" | undefined;
435
+ trigger?: string | undefined;
436
+ }>, "many">>;
437
+ successCriteria: z.ZodOptional<z.ZodArray<z.ZodObject<{
438
+ id: z.ZodString;
439
+ description: z.ZodString;
440
+ required: z.ZodDefault<z.ZodBoolean>;
441
+ validateCommand: z.ZodOptional<z.ZodString>;
442
+ }, "strip", z.ZodTypeAny, {
443
+ description: string;
444
+ required: boolean;
445
+ id: string;
446
+ validateCommand?: string | undefined;
447
+ }, {
448
+ description: string;
449
+ id: string;
450
+ required?: boolean | undefined;
451
+ validateCommand?: string | undefined;
452
+ }>, "many">>;
453
+ author: z.ZodOptional<z.ZodString>;
454
+ license: z.ZodDefault<z.ZodString>;
455
+ keywords: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
456
+ homepage: z.ZodOptional<z.ZodString>;
457
+ repository: z.ZodOptional<z.ZodString>;
458
+ adapters: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
459
+ }, "strip", z.ZodTypeAny, {
460
+ name: string;
461
+ description: string;
462
+ tools: {
463
+ type: "read" | "write" | "edit" | "bash" | "http" | "task" | "grep" | "glob" | "ask" | "custom";
464
+ name: string;
465
+ required: boolean;
466
+ description?: string | undefined;
467
+ schema?: Record<string, unknown> | undefined;
468
+ }[];
469
+ version: string;
470
+ triggers: string[];
471
+ prompts: {
472
+ role: "system" | "user" | "assistant";
473
+ content: string;
474
+ condition?: string | undefined;
475
+ template?: string | undefined;
476
+ variables?: Record<string, string> | undefined;
477
+ }[];
478
+ workflow: {
479
+ step: string;
480
+ action: string;
481
+ optional: boolean;
482
+ onFailure: "abort" | "skip" | "continue";
483
+ name?: string | undefined;
484
+ condition?: string | undefined;
485
+ tools?: string[] | undefined;
486
+ references?: string[] | undefined;
487
+ timeout?: number | undefined;
488
+ retry?: number | undefined;
489
+ }[];
490
+ license: string;
491
+ references?: {
492
+ path: string;
493
+ level: "L0" | "L1" | "L2" | "L3";
494
+ purpose?: string | undefined;
495
+ trigger?: string | undefined;
496
+ }[] | undefined;
497
+ successCriteria?: {
498
+ description: string;
499
+ required: boolean;
500
+ id: string;
501
+ validateCommand?: string | undefined;
502
+ }[] | undefined;
503
+ author?: string | undefined;
504
+ keywords?: string[] | undefined;
505
+ homepage?: string | undefined;
506
+ repository?: string | undefined;
507
+ adapters?: Record<string, unknown> | undefined;
508
+ }, {
509
+ name: string;
510
+ description: string;
511
+ tools: {
512
+ type: "read" | "write" | "edit" | "bash" | "http" | "task" | "grep" | "glob" | "ask" | "custom";
513
+ name: string;
514
+ description?: string | undefined;
515
+ schema?: Record<string, unknown> | undefined;
516
+ required?: boolean | undefined;
517
+ }[];
518
+ version: string;
519
+ triggers: string[];
520
+ prompts: {
521
+ role: "system" | "user" | "assistant";
522
+ content: string;
523
+ condition?: string | undefined;
524
+ template?: string | undefined;
525
+ variables?: Record<string, string> | undefined;
526
+ }[];
527
+ workflow: {
528
+ step: string;
529
+ action: string;
530
+ name?: string | undefined;
531
+ condition?: string | undefined;
532
+ tools?: string[] | undefined;
533
+ references?: string[] | undefined;
534
+ optional?: boolean | undefined;
535
+ timeout?: number | undefined;
536
+ retry?: number | undefined;
537
+ onFailure?: "abort" | "skip" | "continue" | undefined;
538
+ }[];
539
+ references?: {
540
+ path: string;
541
+ purpose?: string | undefined;
542
+ level?: "L0" | "L1" | "L2" | "L3" | undefined;
543
+ trigger?: string | undefined;
544
+ }[] | undefined;
545
+ successCriteria?: {
546
+ description: string;
547
+ id: string;
548
+ required?: boolean | undefined;
549
+ validateCommand?: string | undefined;
550
+ }[] | undefined;
551
+ author?: string | undefined;
552
+ license?: string | undefined;
553
+ keywords?: string[] | undefined;
554
+ homepage?: string | undefined;
555
+ repository?: string | undefined;
556
+ adapters?: Record<string, unknown> | undefined;
557
+ }>, "many">;
558
+ }, "strip", z.ZodTypeAny, {
559
+ name: string;
560
+ version: string;
561
+ skills: {
562
+ name: string;
563
+ description: string;
564
+ tools: {
565
+ type: "read" | "write" | "edit" | "bash" | "http" | "task" | "grep" | "glob" | "ask" | "custom";
566
+ name: string;
567
+ required: boolean;
568
+ description?: string | undefined;
569
+ schema?: Record<string, unknown> | undefined;
570
+ }[];
571
+ version: string;
572
+ triggers: string[];
573
+ prompts: {
574
+ role: "system" | "user" | "assistant";
575
+ content: string;
576
+ condition?: string | undefined;
577
+ template?: string | undefined;
578
+ variables?: Record<string, string> | undefined;
579
+ }[];
580
+ workflow: {
581
+ step: string;
582
+ action: string;
583
+ optional: boolean;
584
+ onFailure: "abort" | "skip" | "continue";
585
+ name?: string | undefined;
586
+ condition?: string | undefined;
587
+ tools?: string[] | undefined;
588
+ references?: string[] | undefined;
589
+ timeout?: number | undefined;
590
+ retry?: number | undefined;
591
+ }[];
592
+ license: string;
593
+ references?: {
594
+ path: string;
595
+ level: "L0" | "L1" | "L2" | "L3";
596
+ purpose?: string | undefined;
597
+ trigger?: string | undefined;
598
+ }[] | undefined;
599
+ successCriteria?: {
600
+ description: string;
601
+ required: boolean;
602
+ id: string;
603
+ validateCommand?: string | undefined;
604
+ }[] | undefined;
605
+ author?: string | undefined;
606
+ keywords?: string[] | undefined;
607
+ homepage?: string | undefined;
608
+ repository?: string | undefined;
609
+ adapters?: Record<string, unknown> | undefined;
610
+ }[];
611
+ description?: string | undefined;
612
+ }, {
613
+ name: string;
614
+ version: string;
615
+ skills: {
616
+ name: string;
617
+ description: string;
618
+ tools: {
619
+ type: "read" | "write" | "edit" | "bash" | "http" | "task" | "grep" | "glob" | "ask" | "custom";
620
+ name: string;
621
+ description?: string | undefined;
622
+ schema?: Record<string, unknown> | undefined;
623
+ required?: boolean | undefined;
624
+ }[];
625
+ version: string;
626
+ triggers: string[];
627
+ prompts: {
628
+ role: "system" | "user" | "assistant";
629
+ content: string;
630
+ condition?: string | undefined;
631
+ template?: string | undefined;
632
+ variables?: Record<string, string> | undefined;
633
+ }[];
634
+ workflow: {
635
+ step: string;
636
+ action: string;
637
+ name?: string | undefined;
638
+ condition?: string | undefined;
639
+ tools?: string[] | undefined;
640
+ references?: string[] | undefined;
641
+ optional?: boolean | undefined;
642
+ timeout?: number | undefined;
643
+ retry?: number | undefined;
644
+ onFailure?: "abort" | "skip" | "continue" | undefined;
645
+ }[];
646
+ references?: {
647
+ path: string;
648
+ purpose?: string | undefined;
649
+ level?: "L0" | "L1" | "L2" | "L3" | undefined;
650
+ trigger?: string | undefined;
651
+ }[] | undefined;
652
+ successCriteria?: {
653
+ description: string;
654
+ id: string;
655
+ required?: boolean | undefined;
656
+ validateCommand?: string | undefined;
657
+ }[] | undefined;
658
+ author?: string | undefined;
659
+ license?: string | undefined;
660
+ keywords?: string[] | undefined;
661
+ homepage?: string | undefined;
662
+ repository?: string | undefined;
663
+ adapters?: Record<string, unknown> | undefined;
664
+ }[];
665
+ description?: string | undefined;
666
+ }>;
667
+ export type SkillCollection = z.infer<typeof SkillCollectionSchema>;
668
+ export declare function validateSkill(data: unknown): Skill;
669
+ export declare function safeValidateSkill(data: unknown): {
670
+ success: true;
671
+ data: Skill;
672
+ } | {
673
+ success: false;
674
+ error: z.ZodError;
675
+ };
676
+ //# sourceMappingURL=skill.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"skill.d.ts","sourceRoot":"","sources":["../../src/types/skill.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB,eAAO,MAAM,cAAc,+FAWzB,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