@riotprompt/riotprompt 0.0.7 → 0.0.8
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/builder.d.ts +3 -15
- package/dist/formatter.d.ts +27 -57
- package/dist/formatter.js +2 -2
- package/dist/formatter.js.map +1 -1
- package/dist/items/parameters.d.ts +1 -1
- package/dist/items/section.d.ts +2 -12
- package/dist/items/weighted.d.ts +3 -15
- package/dist/loader.d.ts +3 -11
- package/dist/override.d.ts +3 -13
- package/dist/parser.d.ts +2 -8
- package/dist/recipes.d.ts +28 -268
- package/dist/riotprompt.cjs +2 -2
- package/dist/riotprompt.cjs.map +1 -1
- package/package.json +13 -17
- package/.cursor/rules/focus-on-prompt.mdc +0 -5
package/dist/recipes.d.ts
CHANGED
|
@@ -1,319 +1,79 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { Prompt } from './riotprompt';
|
|
3
|
-
declare const ContentItemSchema: z.ZodUnion<[z.ZodString, z.ZodObject<{
|
|
3
|
+
declare const ContentItemSchema: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
4
4
|
content: z.ZodString;
|
|
5
5
|
title: z.ZodOptional<z.ZodString>;
|
|
6
6
|
weight: z.ZodOptional<z.ZodNumber>;
|
|
7
|
-
},
|
|
8
|
-
content: string;
|
|
9
|
-
weight?: number | undefined;
|
|
10
|
-
title?: string | undefined;
|
|
11
|
-
}, {
|
|
12
|
-
content: string;
|
|
13
|
-
weight?: number | undefined;
|
|
14
|
-
title?: string | undefined;
|
|
15
|
-
}>, z.ZodObject<{
|
|
7
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
16
8
|
path: z.ZodString;
|
|
17
9
|
title: z.ZodOptional<z.ZodString>;
|
|
18
10
|
weight: z.ZodOptional<z.ZodNumber>;
|
|
19
|
-
},
|
|
20
|
-
|
|
21
|
-
weight?: number | undefined;
|
|
22
|
-
title?: string | undefined;
|
|
23
|
-
}, {
|
|
24
|
-
path: string;
|
|
25
|
-
weight?: number | undefined;
|
|
26
|
-
title?: string | undefined;
|
|
27
|
-
}>, z.ZodObject<{
|
|
28
|
-
directories: z.ZodArray<z.ZodString, "many">;
|
|
11
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
12
|
+
directories: z.ZodArray<z.ZodString>;
|
|
29
13
|
title: z.ZodOptional<z.ZodString>;
|
|
30
14
|
weight: z.ZodOptional<z.ZodNumber>;
|
|
31
|
-
},
|
|
32
|
-
directories: string[];
|
|
33
|
-
weight?: number | undefined;
|
|
34
|
-
title?: string | undefined;
|
|
35
|
-
}, {
|
|
36
|
-
directories: string[];
|
|
37
|
-
weight?: number | undefined;
|
|
38
|
-
title?: string | undefined;
|
|
39
|
-
}>]>;
|
|
15
|
+
}, z.core.$strip>]>;
|
|
40
16
|
declare const RecipeConfigSchema: z.ZodObject<{
|
|
41
17
|
basePath: z.ZodString;
|
|
42
18
|
logger: z.ZodDefault<z.ZodOptional<z.ZodAny>>;
|
|
43
|
-
overridePaths: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString
|
|
19
|
+
overridePaths: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
44
20
|
overrides: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
45
|
-
parameters: z.ZodDefault<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean]
|
|
46
|
-
persona: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodObject<{
|
|
21
|
+
parameters: z.ZodDefault<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>]>>>>;
|
|
22
|
+
persona: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
47
23
|
content: z.ZodString;
|
|
48
24
|
title: z.ZodOptional<z.ZodString>;
|
|
49
25
|
weight: z.ZodOptional<z.ZodNumber>;
|
|
50
|
-
},
|
|
51
|
-
content: string;
|
|
52
|
-
weight?: number | undefined;
|
|
53
|
-
title?: string | undefined;
|
|
54
|
-
}, {
|
|
55
|
-
content: string;
|
|
56
|
-
weight?: number | undefined;
|
|
57
|
-
title?: string | undefined;
|
|
58
|
-
}>, z.ZodObject<{
|
|
26
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
59
27
|
path: z.ZodString;
|
|
60
28
|
title: z.ZodOptional<z.ZodString>;
|
|
61
29
|
weight: z.ZodOptional<z.ZodNumber>;
|
|
62
|
-
},
|
|
63
|
-
|
|
64
|
-
weight?: number | undefined;
|
|
65
|
-
title?: string | undefined;
|
|
66
|
-
}, {
|
|
67
|
-
path: string;
|
|
68
|
-
weight?: number | undefined;
|
|
69
|
-
title?: string | undefined;
|
|
70
|
-
}>, z.ZodObject<{
|
|
71
|
-
directories: z.ZodArray<z.ZodString, "many">;
|
|
30
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
31
|
+
directories: z.ZodArray<z.ZodString>;
|
|
72
32
|
title: z.ZodOptional<z.ZodString>;
|
|
73
33
|
weight: z.ZodOptional<z.ZodNumber>;
|
|
74
|
-
},
|
|
75
|
-
|
|
76
|
-
weight?: number | undefined;
|
|
77
|
-
title?: string | undefined;
|
|
78
|
-
}, {
|
|
79
|
-
directories: string[];
|
|
80
|
-
weight?: number | undefined;
|
|
81
|
-
title?: string | undefined;
|
|
82
|
-
}>]>>;
|
|
83
|
-
instructions: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodObject<{
|
|
34
|
+
}, z.core.$strip>]>>;
|
|
35
|
+
instructions: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
84
36
|
content: z.ZodString;
|
|
85
37
|
title: z.ZodOptional<z.ZodString>;
|
|
86
38
|
weight: z.ZodOptional<z.ZodNumber>;
|
|
87
|
-
},
|
|
88
|
-
content: string;
|
|
89
|
-
weight?: number | undefined;
|
|
90
|
-
title?: string | undefined;
|
|
91
|
-
}, {
|
|
92
|
-
content: string;
|
|
93
|
-
weight?: number | undefined;
|
|
94
|
-
title?: string | undefined;
|
|
95
|
-
}>, z.ZodObject<{
|
|
39
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
96
40
|
path: z.ZodString;
|
|
97
41
|
title: z.ZodOptional<z.ZodString>;
|
|
98
42
|
weight: z.ZodOptional<z.ZodNumber>;
|
|
99
|
-
},
|
|
100
|
-
|
|
101
|
-
weight?: number | undefined;
|
|
102
|
-
title?: string | undefined;
|
|
103
|
-
}, {
|
|
104
|
-
path: string;
|
|
105
|
-
weight?: number | undefined;
|
|
106
|
-
title?: string | undefined;
|
|
107
|
-
}>, z.ZodObject<{
|
|
108
|
-
directories: z.ZodArray<z.ZodString, "many">;
|
|
43
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
44
|
+
directories: z.ZodArray<z.ZodString>;
|
|
109
45
|
title: z.ZodOptional<z.ZodString>;
|
|
110
46
|
weight: z.ZodOptional<z.ZodNumber>;
|
|
111
|
-
},
|
|
112
|
-
|
|
113
|
-
weight?: number | undefined;
|
|
114
|
-
title?: string | undefined;
|
|
115
|
-
}, {
|
|
116
|
-
directories: string[];
|
|
117
|
-
weight?: number | undefined;
|
|
118
|
-
title?: string | undefined;
|
|
119
|
-
}>]>, "many">>>;
|
|
120
|
-
content: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodObject<{
|
|
47
|
+
}, z.core.$strip>]>>>>;
|
|
48
|
+
content: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
121
49
|
content: z.ZodString;
|
|
122
50
|
title: z.ZodOptional<z.ZodString>;
|
|
123
51
|
weight: z.ZodOptional<z.ZodNumber>;
|
|
124
|
-
},
|
|
125
|
-
content: string;
|
|
126
|
-
weight?: number | undefined;
|
|
127
|
-
title?: string | undefined;
|
|
128
|
-
}, {
|
|
129
|
-
content: string;
|
|
130
|
-
weight?: number | undefined;
|
|
131
|
-
title?: string | undefined;
|
|
132
|
-
}>, z.ZodObject<{
|
|
52
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
133
53
|
path: z.ZodString;
|
|
134
54
|
title: z.ZodOptional<z.ZodString>;
|
|
135
55
|
weight: z.ZodOptional<z.ZodNumber>;
|
|
136
|
-
},
|
|
137
|
-
|
|
138
|
-
weight?: number | undefined;
|
|
139
|
-
title?: string | undefined;
|
|
140
|
-
}, {
|
|
141
|
-
path: string;
|
|
142
|
-
weight?: number | undefined;
|
|
143
|
-
title?: string | undefined;
|
|
144
|
-
}>, z.ZodObject<{
|
|
145
|
-
directories: z.ZodArray<z.ZodString, "many">;
|
|
56
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
57
|
+
directories: z.ZodArray<z.ZodString>;
|
|
146
58
|
title: z.ZodOptional<z.ZodString>;
|
|
147
59
|
weight: z.ZodOptional<z.ZodNumber>;
|
|
148
|
-
},
|
|
149
|
-
|
|
150
|
-
weight?: number | undefined;
|
|
151
|
-
title?: string | undefined;
|
|
152
|
-
}, {
|
|
153
|
-
directories: string[];
|
|
154
|
-
weight?: number | undefined;
|
|
155
|
-
title?: string | undefined;
|
|
156
|
-
}>]>, "many">>>;
|
|
157
|
-
context: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodObject<{
|
|
60
|
+
}, z.core.$strip>]>>>>;
|
|
61
|
+
context: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
158
62
|
content: z.ZodString;
|
|
159
63
|
title: z.ZodOptional<z.ZodString>;
|
|
160
64
|
weight: z.ZodOptional<z.ZodNumber>;
|
|
161
|
-
},
|
|
162
|
-
content: string;
|
|
163
|
-
weight?: number | undefined;
|
|
164
|
-
title?: string | undefined;
|
|
165
|
-
}, {
|
|
166
|
-
content: string;
|
|
167
|
-
weight?: number | undefined;
|
|
168
|
-
title?: string | undefined;
|
|
169
|
-
}>, z.ZodObject<{
|
|
65
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
170
66
|
path: z.ZodString;
|
|
171
67
|
title: z.ZodOptional<z.ZodString>;
|
|
172
68
|
weight: z.ZodOptional<z.ZodNumber>;
|
|
173
|
-
},
|
|
174
|
-
|
|
175
|
-
weight?: number | undefined;
|
|
176
|
-
title?: string | undefined;
|
|
177
|
-
}, {
|
|
178
|
-
path: string;
|
|
179
|
-
weight?: number | undefined;
|
|
180
|
-
title?: string | undefined;
|
|
181
|
-
}>, z.ZodObject<{
|
|
182
|
-
directories: z.ZodArray<z.ZodString, "many">;
|
|
69
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
70
|
+
directories: z.ZodArray<z.ZodString>;
|
|
183
71
|
title: z.ZodOptional<z.ZodString>;
|
|
184
72
|
weight: z.ZodOptional<z.ZodNumber>;
|
|
185
|
-
},
|
|
186
|
-
directories: string[];
|
|
187
|
-
weight?: number | undefined;
|
|
188
|
-
title?: string | undefined;
|
|
189
|
-
}, {
|
|
190
|
-
directories: string[];
|
|
191
|
-
weight?: number | undefined;
|
|
192
|
-
title?: string | undefined;
|
|
193
|
-
}>]>, "many">>>;
|
|
73
|
+
}, z.core.$strip>]>>>>;
|
|
194
74
|
extends: z.ZodOptional<z.ZodString>;
|
|
195
75
|
template: z.ZodOptional<z.ZodString>;
|
|
196
|
-
},
|
|
197
|
-
parameters: Record<string, string | number | boolean | (string | number | boolean)[]>;
|
|
198
|
-
instructions: (string | {
|
|
199
|
-
content: string;
|
|
200
|
-
weight?: number | undefined;
|
|
201
|
-
title?: string | undefined;
|
|
202
|
-
} | {
|
|
203
|
-
path: string;
|
|
204
|
-
weight?: number | undefined;
|
|
205
|
-
title?: string | undefined;
|
|
206
|
-
} | {
|
|
207
|
-
directories: string[];
|
|
208
|
-
weight?: number | undefined;
|
|
209
|
-
title?: string | undefined;
|
|
210
|
-
})[];
|
|
211
|
-
overrides: boolean;
|
|
212
|
-
basePath: string;
|
|
213
|
-
overridePaths: string[];
|
|
214
|
-
content: (string | {
|
|
215
|
-
content: string;
|
|
216
|
-
weight?: number | undefined;
|
|
217
|
-
title?: string | undefined;
|
|
218
|
-
} | {
|
|
219
|
-
path: string;
|
|
220
|
-
weight?: number | undefined;
|
|
221
|
-
title?: string | undefined;
|
|
222
|
-
} | {
|
|
223
|
-
directories: string[];
|
|
224
|
-
weight?: number | undefined;
|
|
225
|
-
title?: string | undefined;
|
|
226
|
-
})[];
|
|
227
|
-
context: (string | {
|
|
228
|
-
content: string;
|
|
229
|
-
weight?: number | undefined;
|
|
230
|
-
title?: string | undefined;
|
|
231
|
-
} | {
|
|
232
|
-
path: string;
|
|
233
|
-
weight?: number | undefined;
|
|
234
|
-
title?: string | undefined;
|
|
235
|
-
} | {
|
|
236
|
-
directories: string[];
|
|
237
|
-
weight?: number | undefined;
|
|
238
|
-
title?: string | undefined;
|
|
239
|
-
})[];
|
|
240
|
-
persona?: string | {
|
|
241
|
-
content: string;
|
|
242
|
-
weight?: number | undefined;
|
|
243
|
-
title?: string | undefined;
|
|
244
|
-
} | {
|
|
245
|
-
path: string;
|
|
246
|
-
weight?: number | undefined;
|
|
247
|
-
title?: string | undefined;
|
|
248
|
-
} | {
|
|
249
|
-
directories: string[];
|
|
250
|
-
weight?: number | undefined;
|
|
251
|
-
title?: string | undefined;
|
|
252
|
-
} | undefined;
|
|
253
|
-
logger?: any;
|
|
254
|
-
extends?: string | undefined;
|
|
255
|
-
template?: string | undefined;
|
|
256
|
-
}, {
|
|
257
|
-
basePath: string;
|
|
258
|
-
parameters?: Record<string, string | number | boolean | (string | number | boolean)[]> | undefined;
|
|
259
|
-
persona?: string | {
|
|
260
|
-
content: string;
|
|
261
|
-
weight?: number | undefined;
|
|
262
|
-
title?: string | undefined;
|
|
263
|
-
} | {
|
|
264
|
-
path: string;
|
|
265
|
-
weight?: number | undefined;
|
|
266
|
-
title?: string | undefined;
|
|
267
|
-
} | {
|
|
268
|
-
directories: string[];
|
|
269
|
-
weight?: number | undefined;
|
|
270
|
-
title?: string | undefined;
|
|
271
|
-
} | undefined;
|
|
272
|
-
instructions?: (string | {
|
|
273
|
-
content: string;
|
|
274
|
-
weight?: number | undefined;
|
|
275
|
-
title?: string | undefined;
|
|
276
|
-
} | {
|
|
277
|
-
path: string;
|
|
278
|
-
weight?: number | undefined;
|
|
279
|
-
title?: string | undefined;
|
|
280
|
-
} | {
|
|
281
|
-
directories: string[];
|
|
282
|
-
weight?: number | undefined;
|
|
283
|
-
title?: string | undefined;
|
|
284
|
-
})[] | undefined;
|
|
285
|
-
logger?: any;
|
|
286
|
-
overrides?: boolean | undefined;
|
|
287
|
-
overridePaths?: string[] | undefined;
|
|
288
|
-
content?: (string | {
|
|
289
|
-
content: string;
|
|
290
|
-
weight?: number | undefined;
|
|
291
|
-
title?: string | undefined;
|
|
292
|
-
} | {
|
|
293
|
-
path: string;
|
|
294
|
-
weight?: number | undefined;
|
|
295
|
-
title?: string | undefined;
|
|
296
|
-
} | {
|
|
297
|
-
directories: string[];
|
|
298
|
-
weight?: number | undefined;
|
|
299
|
-
title?: string | undefined;
|
|
300
|
-
})[] | undefined;
|
|
301
|
-
context?: (string | {
|
|
302
|
-
content: string;
|
|
303
|
-
weight?: number | undefined;
|
|
304
|
-
title?: string | undefined;
|
|
305
|
-
} | {
|
|
306
|
-
path: string;
|
|
307
|
-
weight?: number | undefined;
|
|
308
|
-
title?: string | undefined;
|
|
309
|
-
} | {
|
|
310
|
-
directories: string[];
|
|
311
|
-
weight?: number | undefined;
|
|
312
|
-
title?: string | undefined;
|
|
313
|
-
})[] | undefined;
|
|
314
|
-
extends?: string | undefined;
|
|
315
|
-
template?: string | undefined;
|
|
316
|
-
}>;
|
|
76
|
+
}, z.core.$strip>;
|
|
317
77
|
type RecipeConfig = z.infer<typeof RecipeConfigSchema>;
|
|
318
78
|
type ContentItem = z.infer<typeof ContentItemSchema>;
|
|
319
79
|
export interface TemplateConfig {
|
package/dist/riotprompt.cjs
CHANGED
|
@@ -387,7 +387,7 @@ const FormatOptionsSchema = zod.z.object({
|
|
|
387
387
|
sectionTitleProperty: SectionTitlePropertySchema,
|
|
388
388
|
sectionTitlePrefix: zod.z.string().optional(),
|
|
389
389
|
sectionTitleSeparator: zod.z.string().optional(),
|
|
390
|
-
sectionDepth: zod.z.number().default(
|
|
390
|
+
sectionDepth: zod.z.number().default(0)
|
|
391
391
|
});
|
|
392
392
|
const OptionSchema$1 = zod.z.object({
|
|
393
393
|
logger: zod.z.any().optional().default(DEFAULT_LOGGER),
|
|
@@ -448,7 +448,7 @@ const create$5 = (formatterOptions)=>{
|
|
|
448
448
|
var _section_title, _section_title1;
|
|
449
449
|
return `<${(_section_title = section.title) !== null && _section_title !== void 0 ? _section_title : "section"}>\n${formattedItems}\n</${(_section_title1 = section.title) !== null && _section_title1 !== void 0 ? _section_title1 : "section"}>`;
|
|
450
450
|
} else {
|
|
451
|
-
//
|
|
451
|
+
// Use the current section depth for heading level
|
|
452
452
|
const headingLevel = currentSectionDepth;
|
|
453
453
|
const hashes = '#'.repeat(headingLevel);
|
|
454
454
|
logger.silly(`\t\tHeading level: ${headingLevel}`);
|