@character-foundry/character-foundry 0.1.3 → 0.1.5

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.
Files changed (100) hide show
  1. package/README.md +70 -0
  2. package/dist/app-framework.cjs +1742 -0
  3. package/dist/app-framework.cjs.map +1 -0
  4. package/dist/app-framework.d.cts +881 -0
  5. package/dist/app-framework.d.ts +881 -2
  6. package/dist/app-framework.js +1718 -1
  7. package/dist/app-framework.js.map +1 -1
  8. package/dist/charx.cjs +917 -0
  9. package/dist/charx.cjs.map +1 -0
  10. package/dist/charx.d.cts +640 -0
  11. package/dist/charx.d.ts +640 -2
  12. package/dist/charx.js +893 -1
  13. package/dist/charx.js.map +1 -1
  14. package/dist/core.cjs +668 -0
  15. package/dist/core.cjs.map +1 -0
  16. package/dist/core.d.cts +363 -0
  17. package/dist/core.d.ts +363 -2
  18. package/dist/core.js +644 -1
  19. package/dist/core.js.map +1 -1
  20. package/dist/exporter.cjs +7539 -0
  21. package/dist/exporter.cjs.map +1 -0
  22. package/dist/exporter.d.cts +681 -0
  23. package/dist/exporter.d.ts +681 -2
  24. package/dist/exporter.js +7522 -1
  25. package/dist/exporter.js.map +1 -1
  26. package/dist/federation.cjs +3915 -0
  27. package/dist/federation.cjs.map +1 -0
  28. package/dist/federation.d.cts +2951 -0
  29. package/dist/federation.d.ts +2951 -2
  30. package/dist/federation.js +3891 -1
  31. package/dist/federation.js.map +1 -1
  32. package/dist/index.cjs +9109 -0
  33. package/dist/index.cjs.map +1 -0
  34. package/dist/index.d.cts +1119 -0
  35. package/dist/index.d.ts +1113 -20
  36. package/dist/index.js +9092 -26
  37. package/dist/index.js.map +1 -1
  38. package/dist/loader.cjs +8923 -0
  39. package/dist/loader.cjs.map +1 -0
  40. package/dist/loader.d.cts +1037 -0
  41. package/dist/loader.d.ts +1037 -2
  42. package/dist/loader.js +8906 -1
  43. package/dist/loader.js.map +1 -1
  44. package/dist/lorebook.cjs +865 -0
  45. package/dist/lorebook.cjs.map +1 -0
  46. package/dist/lorebook.d.cts +1008 -0
  47. package/dist/lorebook.d.ts +1008 -2
  48. package/dist/lorebook.js +841 -1
  49. package/dist/lorebook.js.map +1 -1
  50. package/dist/media.cjs +6660 -0
  51. package/dist/media.cjs.map +1 -0
  52. package/dist/media.d.cts +87 -0
  53. package/dist/media.d.ts +87 -2
  54. package/dist/media.js +6643 -1
  55. package/dist/media.js.map +1 -1
  56. package/dist/normalizer.cjs +502 -0
  57. package/dist/normalizer.cjs.map +1 -0
  58. package/dist/normalizer.d.cts +1216 -0
  59. package/dist/normalizer.d.ts +1216 -2
  60. package/dist/normalizer.js +478 -1
  61. package/dist/normalizer.js.map +1 -1
  62. package/dist/png.cjs +778 -0
  63. package/dist/png.cjs.map +1 -0
  64. package/dist/png.d.cts +786 -0
  65. package/dist/png.d.ts +786 -2
  66. package/dist/png.js +754 -1
  67. package/dist/png.js.map +1 -1
  68. package/dist/schemas.cjs +799 -0
  69. package/dist/schemas.cjs.map +1 -0
  70. package/dist/schemas.d.cts +2178 -0
  71. package/dist/schemas.d.ts +2178 -2
  72. package/dist/schemas.js +775 -1
  73. package/dist/schemas.js.map +1 -1
  74. package/dist/tokenizers.cjs +153 -0
  75. package/dist/tokenizers.cjs.map +1 -0
  76. package/dist/tokenizers.d.cts +155 -0
  77. package/dist/tokenizers.d.ts +155 -2
  78. package/dist/tokenizers.js +129 -1
  79. package/dist/tokenizers.js.map +1 -1
  80. package/dist/voxta.cjs +7995 -0
  81. package/dist/voxta.cjs.map +1 -0
  82. package/dist/voxta.d.cts +1349 -0
  83. package/dist/voxta.d.ts +1349 -2
  84. package/dist/voxta.js +7978 -1
  85. package/dist/voxta.js.map +1 -1
  86. package/package.json +177 -45
  87. package/dist/app-framework.d.ts.map +0 -1
  88. package/dist/charx.d.ts.map +0 -1
  89. package/dist/core.d.ts.map +0 -1
  90. package/dist/exporter.d.ts.map +0 -1
  91. package/dist/federation.d.ts.map +0 -1
  92. package/dist/index.d.ts.map +0 -1
  93. package/dist/loader.d.ts.map +0 -1
  94. package/dist/lorebook.d.ts.map +0 -1
  95. package/dist/media.d.ts.map +0 -1
  96. package/dist/normalizer.d.ts.map +0 -1
  97. package/dist/png.d.ts.map +0 -1
  98. package/dist/schemas.d.ts.map +0 -1
  99. package/dist/tokenizers.d.ts.map +0 -1
  100. package/dist/voxta.d.ts.map +0 -1
package/dist/schemas.d.ts CHANGED
@@ -1,2 +1,2178 @@
1
- export * from '@character-foundry/schemas';
2
- //# sourceMappingURL=schemas.d.ts.map
1
+ import { z } from 'zod';
2
+
3
+ /**
4
+ * Character Card v3 Types
5
+ *
6
+ * Based on: https://github.com/kwaroran/character-card-spec-v3
7
+ */
8
+ /**
9
+ * Lorebook entry schema for v3 cards
10
+ */
11
+ export declare const CCv3LorebookEntrySchema: z.ZodObject<{
12
+ keys: z.ZodArray<z.ZodString, "many">;
13
+ content: z.ZodString;
14
+ enabled: z.ZodBoolean;
15
+ insertion_order: z.ZodNumber;
16
+ case_sensitive: z.ZodOptional<z.ZodBoolean>;
17
+ name: z.ZodOptional<z.ZodString>;
18
+ priority: z.ZodOptional<z.ZodNumber>;
19
+ id: z.ZodOptional<z.ZodNumber>;
20
+ comment: z.ZodOptional<z.ZodString>;
21
+ selective: z.ZodOptional<z.ZodBoolean>;
22
+ secondary_keys: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
23
+ constant: z.ZodOptional<z.ZodBoolean>;
24
+ position: z.ZodOptional<z.ZodEnum<[
25
+ "before_char",
26
+ "after_char"
27
+ ]>>;
28
+ extensions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
29
+ automation_id: z.ZodOptional<z.ZodString>;
30
+ role: z.ZodOptional<z.ZodEnum<[
31
+ "system",
32
+ "user",
33
+ "assistant"
34
+ ]>>;
35
+ group: z.ZodOptional<z.ZodString>;
36
+ scan_frequency: z.ZodOptional<z.ZodNumber>;
37
+ probability: z.ZodOptional<z.ZodNumber>;
38
+ use_regex: z.ZodOptional<z.ZodBoolean>;
39
+ depth: z.ZodOptional<z.ZodNumber>;
40
+ selective_logic: z.ZodOptional<z.ZodEnum<[
41
+ "AND",
42
+ "NOT"
43
+ ]>>;
44
+ }, "strip", z.ZodTypeAny, {
45
+ keys: string[];
46
+ content: string;
47
+ enabled: boolean;
48
+ insertion_order: number;
49
+ name?: string | undefined;
50
+ extensions?: Record<string, unknown> | undefined;
51
+ case_sensitive?: boolean | undefined;
52
+ priority?: number | undefined;
53
+ id?: number | undefined;
54
+ comment?: string | undefined;
55
+ selective?: boolean | undefined;
56
+ secondary_keys?: string[] | undefined;
57
+ constant?: boolean | undefined;
58
+ position?: "before_char" | "after_char" | undefined;
59
+ automation_id?: string | undefined;
60
+ role?: "system" | "user" | "assistant" | undefined;
61
+ group?: string | undefined;
62
+ scan_frequency?: number | undefined;
63
+ probability?: number | undefined;
64
+ use_regex?: boolean | undefined;
65
+ depth?: number | undefined;
66
+ selective_logic?: "AND" | "NOT" | undefined;
67
+ }, {
68
+ keys: string[];
69
+ content: string;
70
+ enabled: boolean;
71
+ insertion_order: number;
72
+ name?: string | undefined;
73
+ extensions?: Record<string, unknown> | undefined;
74
+ case_sensitive?: boolean | undefined;
75
+ priority?: number | undefined;
76
+ id?: number | undefined;
77
+ comment?: string | undefined;
78
+ selective?: boolean | undefined;
79
+ secondary_keys?: string[] | undefined;
80
+ constant?: boolean | undefined;
81
+ position?: "before_char" | "after_char" | undefined;
82
+ automation_id?: string | undefined;
83
+ role?: "system" | "user" | "assistant" | undefined;
84
+ group?: string | undefined;
85
+ scan_frequency?: number | undefined;
86
+ probability?: number | undefined;
87
+ use_regex?: boolean | undefined;
88
+ depth?: number | undefined;
89
+ selective_logic?: "AND" | "NOT" | undefined;
90
+ }>;
91
+ /**
92
+ * Character book (lorebook) schema for v3 cards
93
+ */
94
+ export declare const CCv3CharacterBookSchema: z.ZodObject<{
95
+ name: z.ZodOptional<z.ZodString>;
96
+ description: z.ZodOptional<z.ZodString>;
97
+ scan_depth: z.ZodOptional<z.ZodNumber>;
98
+ token_budget: z.ZodOptional<z.ZodNumber>;
99
+ recursive_scanning: z.ZodOptional<z.ZodBoolean>;
100
+ extensions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
101
+ entries: z.ZodArray<z.ZodObject<{
102
+ keys: z.ZodArray<z.ZodString, "many">;
103
+ content: z.ZodString;
104
+ enabled: z.ZodBoolean;
105
+ insertion_order: z.ZodNumber;
106
+ case_sensitive: z.ZodOptional<z.ZodBoolean>;
107
+ name: z.ZodOptional<z.ZodString>;
108
+ priority: z.ZodOptional<z.ZodNumber>;
109
+ id: z.ZodOptional<z.ZodNumber>;
110
+ comment: z.ZodOptional<z.ZodString>;
111
+ selective: z.ZodOptional<z.ZodBoolean>;
112
+ secondary_keys: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
113
+ constant: z.ZodOptional<z.ZodBoolean>;
114
+ position: z.ZodOptional<z.ZodEnum<[
115
+ "before_char",
116
+ "after_char"
117
+ ]>>;
118
+ extensions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
119
+ automation_id: z.ZodOptional<z.ZodString>;
120
+ role: z.ZodOptional<z.ZodEnum<[
121
+ "system",
122
+ "user",
123
+ "assistant"
124
+ ]>>;
125
+ group: z.ZodOptional<z.ZodString>;
126
+ scan_frequency: z.ZodOptional<z.ZodNumber>;
127
+ probability: z.ZodOptional<z.ZodNumber>;
128
+ use_regex: z.ZodOptional<z.ZodBoolean>;
129
+ depth: z.ZodOptional<z.ZodNumber>;
130
+ selective_logic: z.ZodOptional<z.ZodEnum<[
131
+ "AND",
132
+ "NOT"
133
+ ]>>;
134
+ }, "strip", z.ZodTypeAny, {
135
+ keys: string[];
136
+ content: string;
137
+ enabled: boolean;
138
+ insertion_order: number;
139
+ name?: string | undefined;
140
+ extensions?: Record<string, unknown> | undefined;
141
+ case_sensitive?: boolean | undefined;
142
+ priority?: number | undefined;
143
+ id?: number | undefined;
144
+ comment?: string | undefined;
145
+ selective?: boolean | undefined;
146
+ secondary_keys?: string[] | undefined;
147
+ constant?: boolean | undefined;
148
+ position?: "before_char" | "after_char" | undefined;
149
+ automation_id?: string | undefined;
150
+ role?: "system" | "user" | "assistant" | undefined;
151
+ group?: string | undefined;
152
+ scan_frequency?: number | undefined;
153
+ probability?: number | undefined;
154
+ use_regex?: boolean | undefined;
155
+ depth?: number | undefined;
156
+ selective_logic?: "AND" | "NOT" | undefined;
157
+ }, {
158
+ keys: string[];
159
+ content: string;
160
+ enabled: boolean;
161
+ insertion_order: number;
162
+ name?: string | undefined;
163
+ extensions?: Record<string, unknown> | undefined;
164
+ case_sensitive?: boolean | undefined;
165
+ priority?: number | undefined;
166
+ id?: number | undefined;
167
+ comment?: string | undefined;
168
+ selective?: boolean | undefined;
169
+ secondary_keys?: string[] | undefined;
170
+ constant?: boolean | undefined;
171
+ position?: "before_char" | "after_char" | undefined;
172
+ automation_id?: string | undefined;
173
+ role?: "system" | "user" | "assistant" | undefined;
174
+ group?: string | undefined;
175
+ scan_frequency?: number | undefined;
176
+ probability?: number | undefined;
177
+ use_regex?: boolean | undefined;
178
+ depth?: number | undefined;
179
+ selective_logic?: "AND" | "NOT" | undefined;
180
+ }>, "many">;
181
+ }, "strip", z.ZodTypeAny, {
182
+ entries: {
183
+ keys: string[];
184
+ content: string;
185
+ enabled: boolean;
186
+ insertion_order: number;
187
+ name?: string | undefined;
188
+ extensions?: Record<string, unknown> | undefined;
189
+ case_sensitive?: boolean | undefined;
190
+ priority?: number | undefined;
191
+ id?: number | undefined;
192
+ comment?: string | undefined;
193
+ selective?: boolean | undefined;
194
+ secondary_keys?: string[] | undefined;
195
+ constant?: boolean | undefined;
196
+ position?: "before_char" | "after_char" | undefined;
197
+ automation_id?: string | undefined;
198
+ role?: "system" | "user" | "assistant" | undefined;
199
+ group?: string | undefined;
200
+ scan_frequency?: number | undefined;
201
+ probability?: number | undefined;
202
+ use_regex?: boolean | undefined;
203
+ depth?: number | undefined;
204
+ selective_logic?: "AND" | "NOT" | undefined;
205
+ }[];
206
+ name?: string | undefined;
207
+ description?: string | undefined;
208
+ scan_depth?: number | undefined;
209
+ token_budget?: number | undefined;
210
+ recursive_scanning?: boolean | undefined;
211
+ extensions?: Record<string, unknown> | undefined;
212
+ }, {
213
+ entries: {
214
+ keys: string[];
215
+ content: string;
216
+ enabled: boolean;
217
+ insertion_order: number;
218
+ name?: string | undefined;
219
+ extensions?: Record<string, unknown> | undefined;
220
+ case_sensitive?: boolean | undefined;
221
+ priority?: number | undefined;
222
+ id?: number | undefined;
223
+ comment?: string | undefined;
224
+ selective?: boolean | undefined;
225
+ secondary_keys?: string[] | undefined;
226
+ constant?: boolean | undefined;
227
+ position?: "before_char" | "after_char" | undefined;
228
+ automation_id?: string | undefined;
229
+ role?: "system" | "user" | "assistant" | undefined;
230
+ group?: string | undefined;
231
+ scan_frequency?: number | undefined;
232
+ probability?: number | undefined;
233
+ use_regex?: boolean | undefined;
234
+ depth?: number | undefined;
235
+ selective_logic?: "AND" | "NOT" | undefined;
236
+ }[];
237
+ name?: string | undefined;
238
+ description?: string | undefined;
239
+ scan_depth?: number | undefined;
240
+ token_budget?: number | undefined;
241
+ recursive_scanning?: boolean | undefined;
242
+ extensions?: Record<string, unknown> | undefined;
243
+ }>;
244
+ /**
245
+ * Character Card v3 inner data structure schema.
246
+ *
247
+ * Note: Fields like group_only_greetings, creator, character_version, and tags
248
+ * are technically "required" per V3 spec but rarely present in wild cards.
249
+ * We use .default() to make parsing lenient while still producing valid output.
250
+ */
251
+ export declare const CCv3DataInnerSchema: z.ZodObject<{
252
+ name: z.ZodDefault<z.ZodString>;
253
+ description: z.ZodDefault<z.ZodString>;
254
+ personality: z.ZodDefault<z.ZodNullable<z.ZodString>>;
255
+ scenario: z.ZodDefault<z.ZodString>;
256
+ first_mes: z.ZodDefault<z.ZodString>;
257
+ mes_example: z.ZodDefault<z.ZodNullable<z.ZodString>>;
258
+ creator: z.ZodDefault<z.ZodString>;
259
+ character_version: z.ZodDefault<z.ZodString>;
260
+ tags: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
261
+ group_only_greetings: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
262
+ creator_notes: z.ZodOptional<z.ZodString>;
263
+ system_prompt: z.ZodOptional<z.ZodString>;
264
+ post_history_instructions: z.ZodOptional<z.ZodString>;
265
+ alternate_greetings: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
266
+ character_book: z.ZodNullable<z.ZodOptional<z.ZodObject<{
267
+ name: z.ZodOptional<z.ZodString>;
268
+ description: z.ZodOptional<z.ZodString>;
269
+ scan_depth: z.ZodOptional<z.ZodNumber>;
270
+ token_budget: z.ZodOptional<z.ZodNumber>;
271
+ recursive_scanning: z.ZodOptional<z.ZodBoolean>;
272
+ extensions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
273
+ entries: z.ZodArray<z.ZodObject<{
274
+ keys: z.ZodArray<z.ZodString, "many">;
275
+ content: z.ZodString;
276
+ enabled: z.ZodBoolean;
277
+ insertion_order: z.ZodNumber;
278
+ case_sensitive: z.ZodOptional<z.ZodBoolean>;
279
+ name: z.ZodOptional<z.ZodString>;
280
+ priority: z.ZodOptional<z.ZodNumber>;
281
+ id: z.ZodOptional<z.ZodNumber>;
282
+ comment: z.ZodOptional<z.ZodString>;
283
+ selective: z.ZodOptional<z.ZodBoolean>;
284
+ secondary_keys: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
285
+ constant: z.ZodOptional<z.ZodBoolean>;
286
+ position: z.ZodOptional<z.ZodEnum<[
287
+ "before_char",
288
+ "after_char"
289
+ ]>>;
290
+ extensions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
291
+ automation_id: z.ZodOptional<z.ZodString>;
292
+ role: z.ZodOptional<z.ZodEnum<[
293
+ "system",
294
+ "user",
295
+ "assistant"
296
+ ]>>;
297
+ group: z.ZodOptional<z.ZodString>;
298
+ scan_frequency: z.ZodOptional<z.ZodNumber>;
299
+ probability: z.ZodOptional<z.ZodNumber>;
300
+ use_regex: z.ZodOptional<z.ZodBoolean>;
301
+ depth: z.ZodOptional<z.ZodNumber>;
302
+ selective_logic: z.ZodOptional<z.ZodEnum<[
303
+ "AND",
304
+ "NOT"
305
+ ]>>;
306
+ }, "strip", z.ZodTypeAny, {
307
+ keys: string[];
308
+ content: string;
309
+ enabled: boolean;
310
+ insertion_order: number;
311
+ name?: string | undefined;
312
+ extensions?: Record<string, unknown> | undefined;
313
+ case_sensitive?: boolean | undefined;
314
+ priority?: number | undefined;
315
+ id?: number | undefined;
316
+ comment?: string | undefined;
317
+ selective?: boolean | undefined;
318
+ secondary_keys?: string[] | undefined;
319
+ constant?: boolean | undefined;
320
+ position?: "before_char" | "after_char" | undefined;
321
+ automation_id?: string | undefined;
322
+ role?: "system" | "user" | "assistant" | undefined;
323
+ group?: string | undefined;
324
+ scan_frequency?: number | undefined;
325
+ probability?: number | undefined;
326
+ use_regex?: boolean | undefined;
327
+ depth?: number | undefined;
328
+ selective_logic?: "AND" | "NOT" | undefined;
329
+ }, {
330
+ keys: string[];
331
+ content: string;
332
+ enabled: boolean;
333
+ insertion_order: number;
334
+ name?: string | undefined;
335
+ extensions?: Record<string, unknown> | undefined;
336
+ case_sensitive?: boolean | undefined;
337
+ priority?: number | undefined;
338
+ id?: number | undefined;
339
+ comment?: string | undefined;
340
+ selective?: boolean | undefined;
341
+ secondary_keys?: string[] | undefined;
342
+ constant?: boolean | undefined;
343
+ position?: "before_char" | "after_char" | undefined;
344
+ automation_id?: string | undefined;
345
+ role?: "system" | "user" | "assistant" | undefined;
346
+ group?: string | undefined;
347
+ scan_frequency?: number | undefined;
348
+ probability?: number | undefined;
349
+ use_regex?: boolean | undefined;
350
+ depth?: number | undefined;
351
+ selective_logic?: "AND" | "NOT" | undefined;
352
+ }>, "many">;
353
+ }, "strip", z.ZodTypeAny, {
354
+ entries: {
355
+ keys: string[];
356
+ content: string;
357
+ enabled: boolean;
358
+ insertion_order: number;
359
+ name?: string | undefined;
360
+ extensions?: Record<string, unknown> | undefined;
361
+ case_sensitive?: boolean | undefined;
362
+ priority?: number | undefined;
363
+ id?: number | undefined;
364
+ comment?: string | undefined;
365
+ selective?: boolean | undefined;
366
+ secondary_keys?: string[] | undefined;
367
+ constant?: boolean | undefined;
368
+ position?: "before_char" | "after_char" | undefined;
369
+ automation_id?: string | undefined;
370
+ role?: "system" | "user" | "assistant" | undefined;
371
+ group?: string | undefined;
372
+ scan_frequency?: number | undefined;
373
+ probability?: number | undefined;
374
+ use_regex?: boolean | undefined;
375
+ depth?: number | undefined;
376
+ selective_logic?: "AND" | "NOT" | undefined;
377
+ }[];
378
+ name?: string | undefined;
379
+ description?: string | undefined;
380
+ scan_depth?: number | undefined;
381
+ token_budget?: number | undefined;
382
+ recursive_scanning?: boolean | undefined;
383
+ extensions?: Record<string, unknown> | undefined;
384
+ }, {
385
+ entries: {
386
+ keys: string[];
387
+ content: string;
388
+ enabled: boolean;
389
+ insertion_order: number;
390
+ name?: string | undefined;
391
+ extensions?: Record<string, unknown> | undefined;
392
+ case_sensitive?: boolean | undefined;
393
+ priority?: number | undefined;
394
+ id?: number | undefined;
395
+ comment?: string | undefined;
396
+ selective?: boolean | undefined;
397
+ secondary_keys?: string[] | undefined;
398
+ constant?: boolean | undefined;
399
+ position?: "before_char" | "after_char" | undefined;
400
+ automation_id?: string | undefined;
401
+ role?: "system" | "user" | "assistant" | undefined;
402
+ group?: string | undefined;
403
+ scan_frequency?: number | undefined;
404
+ probability?: number | undefined;
405
+ use_regex?: boolean | undefined;
406
+ depth?: number | undefined;
407
+ selective_logic?: "AND" | "NOT" | undefined;
408
+ }[];
409
+ name?: string | undefined;
410
+ description?: string | undefined;
411
+ scan_depth?: number | undefined;
412
+ token_budget?: number | undefined;
413
+ recursive_scanning?: boolean | undefined;
414
+ extensions?: Record<string, unknown> | undefined;
415
+ }>>>;
416
+ extensions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
417
+ assets: z.ZodOptional<z.ZodArray<z.ZodObject<{
418
+ type: z.ZodEnum<[
419
+ "icon",
420
+ "background",
421
+ "emotion",
422
+ "user_icon",
423
+ "sound",
424
+ "video",
425
+ "custom",
426
+ "x-risu-asset"
427
+ ]>;
428
+ uri: z.ZodString;
429
+ name: z.ZodString;
430
+ ext: z.ZodString;
431
+ }, "strip", z.ZodTypeAny, {
432
+ name: string;
433
+ type: "custom" | "icon" | "background" | "emotion" | "user_icon" | "sound" | "video" | "x-risu-asset";
434
+ uri: string;
435
+ ext: string;
436
+ }, {
437
+ name: string;
438
+ type: "custom" | "icon" | "background" | "emotion" | "user_icon" | "sound" | "video" | "x-risu-asset";
439
+ uri: string;
440
+ ext: string;
441
+ }>, "many">>;
442
+ nickname: z.ZodOptional<z.ZodString>;
443
+ creator_notes_multilingual: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
444
+ source: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
445
+ creation_date: z.ZodOptional<z.ZodNumber>;
446
+ modification_date: z.ZodOptional<z.ZodNumber>;
447
+ }, "strip", z.ZodTypeAny, {
448
+ name: string;
449
+ description: string;
450
+ personality: string | null;
451
+ scenario: string;
452
+ first_mes: string;
453
+ mes_example: string | null;
454
+ tags: string[];
455
+ creator: string;
456
+ character_version: string;
457
+ group_only_greetings: string[];
458
+ extensions?: Record<string, unknown> | undefined;
459
+ creator_notes?: string | undefined;
460
+ system_prompt?: string | undefined;
461
+ post_history_instructions?: string | undefined;
462
+ alternate_greetings?: string[] | undefined;
463
+ character_book?: {
464
+ entries: {
465
+ keys: string[];
466
+ content: string;
467
+ enabled: boolean;
468
+ insertion_order: number;
469
+ name?: string | undefined;
470
+ extensions?: Record<string, unknown> | undefined;
471
+ case_sensitive?: boolean | undefined;
472
+ priority?: number | undefined;
473
+ id?: number | undefined;
474
+ comment?: string | undefined;
475
+ selective?: boolean | undefined;
476
+ secondary_keys?: string[] | undefined;
477
+ constant?: boolean | undefined;
478
+ position?: "before_char" | "after_char" | undefined;
479
+ automation_id?: string | undefined;
480
+ role?: "system" | "user" | "assistant" | undefined;
481
+ group?: string | undefined;
482
+ scan_frequency?: number | undefined;
483
+ probability?: number | undefined;
484
+ use_regex?: boolean | undefined;
485
+ depth?: number | undefined;
486
+ selective_logic?: "AND" | "NOT" | undefined;
487
+ }[];
488
+ name?: string | undefined;
489
+ description?: string | undefined;
490
+ scan_depth?: number | undefined;
491
+ token_budget?: number | undefined;
492
+ recursive_scanning?: boolean | undefined;
493
+ extensions?: Record<string, unknown> | undefined;
494
+ } | null | undefined;
495
+ assets?: {
496
+ name: string;
497
+ type: "custom" | "icon" | "background" | "emotion" | "user_icon" | "sound" | "video" | "x-risu-asset";
498
+ uri: string;
499
+ ext: string;
500
+ }[] | undefined;
501
+ nickname?: string | undefined;
502
+ creator_notes_multilingual?: Record<string, string> | undefined;
503
+ source?: string[] | undefined;
504
+ creation_date?: number | undefined;
505
+ modification_date?: number | undefined;
506
+ }, {
507
+ name?: string | undefined;
508
+ description?: string | undefined;
509
+ extensions?: Record<string, unknown> | undefined;
510
+ personality?: string | null | undefined;
511
+ scenario?: string | undefined;
512
+ first_mes?: string | undefined;
513
+ mes_example?: string | null | undefined;
514
+ creator_notes?: string | undefined;
515
+ system_prompt?: string | undefined;
516
+ post_history_instructions?: string | undefined;
517
+ alternate_greetings?: string[] | undefined;
518
+ character_book?: {
519
+ entries: {
520
+ keys: string[];
521
+ content: string;
522
+ enabled: boolean;
523
+ insertion_order: number;
524
+ name?: string | undefined;
525
+ extensions?: Record<string, unknown> | undefined;
526
+ case_sensitive?: boolean | undefined;
527
+ priority?: number | undefined;
528
+ id?: number | undefined;
529
+ comment?: string | undefined;
530
+ selective?: boolean | undefined;
531
+ secondary_keys?: string[] | undefined;
532
+ constant?: boolean | undefined;
533
+ position?: "before_char" | "after_char" | undefined;
534
+ automation_id?: string | undefined;
535
+ role?: "system" | "user" | "assistant" | undefined;
536
+ group?: string | undefined;
537
+ scan_frequency?: number | undefined;
538
+ probability?: number | undefined;
539
+ use_regex?: boolean | undefined;
540
+ depth?: number | undefined;
541
+ selective_logic?: "AND" | "NOT" | undefined;
542
+ }[];
543
+ name?: string | undefined;
544
+ description?: string | undefined;
545
+ scan_depth?: number | undefined;
546
+ token_budget?: number | undefined;
547
+ recursive_scanning?: boolean | undefined;
548
+ extensions?: Record<string, unknown> | undefined;
549
+ } | null | undefined;
550
+ tags?: string[] | undefined;
551
+ creator?: string | undefined;
552
+ character_version?: string | undefined;
553
+ group_only_greetings?: string[] | undefined;
554
+ assets?: {
555
+ name: string;
556
+ type: "custom" | "icon" | "background" | "emotion" | "user_icon" | "sound" | "video" | "x-risu-asset";
557
+ uri: string;
558
+ ext: string;
559
+ }[] | undefined;
560
+ nickname?: string | undefined;
561
+ creator_notes_multilingual?: Record<string, string> | undefined;
562
+ source?: string[] | undefined;
563
+ creation_date?: number | undefined;
564
+ modification_date?: number | undefined;
565
+ }>;
566
+ /**
567
+ * Character Card v3 full structure schema
568
+ */
569
+ export declare const CCv3DataSchema: z.ZodObject<{
570
+ spec: z.ZodLiteral<"chara_card_v3">;
571
+ spec_version: z.ZodLiteral<"3.0">;
572
+ data: z.ZodObject<{
573
+ name: z.ZodDefault<z.ZodString>;
574
+ description: z.ZodDefault<z.ZodString>;
575
+ personality: z.ZodDefault<z.ZodNullable<z.ZodString>>;
576
+ scenario: z.ZodDefault<z.ZodString>;
577
+ first_mes: z.ZodDefault<z.ZodString>;
578
+ mes_example: z.ZodDefault<z.ZodNullable<z.ZodString>>;
579
+ creator: z.ZodDefault<z.ZodString>;
580
+ character_version: z.ZodDefault<z.ZodString>;
581
+ tags: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
582
+ group_only_greetings: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
583
+ creator_notes: z.ZodOptional<z.ZodString>;
584
+ system_prompt: z.ZodOptional<z.ZodString>;
585
+ post_history_instructions: z.ZodOptional<z.ZodString>;
586
+ alternate_greetings: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
587
+ character_book: z.ZodNullable<z.ZodOptional<z.ZodObject<{
588
+ name: z.ZodOptional<z.ZodString>;
589
+ description: z.ZodOptional<z.ZodString>;
590
+ scan_depth: z.ZodOptional<z.ZodNumber>;
591
+ token_budget: z.ZodOptional<z.ZodNumber>;
592
+ recursive_scanning: z.ZodOptional<z.ZodBoolean>;
593
+ extensions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
594
+ entries: z.ZodArray<z.ZodObject<{
595
+ keys: z.ZodArray<z.ZodString, "many">;
596
+ content: z.ZodString;
597
+ enabled: z.ZodBoolean;
598
+ insertion_order: z.ZodNumber;
599
+ case_sensitive: z.ZodOptional<z.ZodBoolean>;
600
+ name: z.ZodOptional<z.ZodString>;
601
+ priority: z.ZodOptional<z.ZodNumber>;
602
+ id: z.ZodOptional<z.ZodNumber>;
603
+ comment: z.ZodOptional<z.ZodString>;
604
+ selective: z.ZodOptional<z.ZodBoolean>;
605
+ secondary_keys: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
606
+ constant: z.ZodOptional<z.ZodBoolean>;
607
+ position: z.ZodOptional<z.ZodEnum<[
608
+ "before_char",
609
+ "after_char"
610
+ ]>>;
611
+ extensions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
612
+ automation_id: z.ZodOptional<z.ZodString>;
613
+ role: z.ZodOptional<z.ZodEnum<[
614
+ "system",
615
+ "user",
616
+ "assistant"
617
+ ]>>;
618
+ group: z.ZodOptional<z.ZodString>;
619
+ scan_frequency: z.ZodOptional<z.ZodNumber>;
620
+ probability: z.ZodOptional<z.ZodNumber>;
621
+ use_regex: z.ZodOptional<z.ZodBoolean>;
622
+ depth: z.ZodOptional<z.ZodNumber>;
623
+ selective_logic: z.ZodOptional<z.ZodEnum<[
624
+ "AND",
625
+ "NOT"
626
+ ]>>;
627
+ }, "strip", z.ZodTypeAny, {
628
+ keys: string[];
629
+ content: string;
630
+ enabled: boolean;
631
+ insertion_order: number;
632
+ name?: string | undefined;
633
+ extensions?: Record<string, unknown> | undefined;
634
+ case_sensitive?: boolean | undefined;
635
+ priority?: number | undefined;
636
+ id?: number | undefined;
637
+ comment?: string | undefined;
638
+ selective?: boolean | undefined;
639
+ secondary_keys?: string[] | undefined;
640
+ constant?: boolean | undefined;
641
+ position?: "before_char" | "after_char" | undefined;
642
+ automation_id?: string | undefined;
643
+ role?: "system" | "user" | "assistant" | undefined;
644
+ group?: string | undefined;
645
+ scan_frequency?: number | undefined;
646
+ probability?: number | undefined;
647
+ use_regex?: boolean | undefined;
648
+ depth?: number | undefined;
649
+ selective_logic?: "AND" | "NOT" | undefined;
650
+ }, {
651
+ keys: string[];
652
+ content: string;
653
+ enabled: boolean;
654
+ insertion_order: number;
655
+ name?: string | undefined;
656
+ extensions?: Record<string, unknown> | undefined;
657
+ case_sensitive?: boolean | undefined;
658
+ priority?: number | undefined;
659
+ id?: number | undefined;
660
+ comment?: string | undefined;
661
+ selective?: boolean | undefined;
662
+ secondary_keys?: string[] | undefined;
663
+ constant?: boolean | undefined;
664
+ position?: "before_char" | "after_char" | undefined;
665
+ automation_id?: string | undefined;
666
+ role?: "system" | "user" | "assistant" | undefined;
667
+ group?: string | undefined;
668
+ scan_frequency?: number | undefined;
669
+ probability?: number | undefined;
670
+ use_regex?: boolean | undefined;
671
+ depth?: number | undefined;
672
+ selective_logic?: "AND" | "NOT" | undefined;
673
+ }>, "many">;
674
+ }, "strip", z.ZodTypeAny, {
675
+ entries: {
676
+ keys: string[];
677
+ content: string;
678
+ enabled: boolean;
679
+ insertion_order: number;
680
+ name?: string | undefined;
681
+ extensions?: Record<string, unknown> | undefined;
682
+ case_sensitive?: boolean | undefined;
683
+ priority?: number | undefined;
684
+ id?: number | undefined;
685
+ comment?: string | undefined;
686
+ selective?: boolean | undefined;
687
+ secondary_keys?: string[] | undefined;
688
+ constant?: boolean | undefined;
689
+ position?: "before_char" | "after_char" | undefined;
690
+ automation_id?: string | undefined;
691
+ role?: "system" | "user" | "assistant" | undefined;
692
+ group?: string | undefined;
693
+ scan_frequency?: number | undefined;
694
+ probability?: number | undefined;
695
+ use_regex?: boolean | undefined;
696
+ depth?: number | undefined;
697
+ selective_logic?: "AND" | "NOT" | undefined;
698
+ }[];
699
+ name?: string | undefined;
700
+ description?: string | undefined;
701
+ scan_depth?: number | undefined;
702
+ token_budget?: number | undefined;
703
+ recursive_scanning?: boolean | undefined;
704
+ extensions?: Record<string, unknown> | undefined;
705
+ }, {
706
+ entries: {
707
+ keys: string[];
708
+ content: string;
709
+ enabled: boolean;
710
+ insertion_order: number;
711
+ name?: string | undefined;
712
+ extensions?: Record<string, unknown> | undefined;
713
+ case_sensitive?: boolean | undefined;
714
+ priority?: number | undefined;
715
+ id?: number | undefined;
716
+ comment?: string | undefined;
717
+ selective?: boolean | undefined;
718
+ secondary_keys?: string[] | undefined;
719
+ constant?: boolean | undefined;
720
+ position?: "before_char" | "after_char" | undefined;
721
+ automation_id?: string | undefined;
722
+ role?: "system" | "user" | "assistant" | undefined;
723
+ group?: string | undefined;
724
+ scan_frequency?: number | undefined;
725
+ probability?: number | undefined;
726
+ use_regex?: boolean | undefined;
727
+ depth?: number | undefined;
728
+ selective_logic?: "AND" | "NOT" | undefined;
729
+ }[];
730
+ name?: string | undefined;
731
+ description?: string | undefined;
732
+ scan_depth?: number | undefined;
733
+ token_budget?: number | undefined;
734
+ recursive_scanning?: boolean | undefined;
735
+ extensions?: Record<string, unknown> | undefined;
736
+ }>>>;
737
+ extensions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
738
+ assets: z.ZodOptional<z.ZodArray<z.ZodObject<{
739
+ type: z.ZodEnum<[
740
+ "icon",
741
+ "background",
742
+ "emotion",
743
+ "user_icon",
744
+ "sound",
745
+ "video",
746
+ "custom",
747
+ "x-risu-asset"
748
+ ]>;
749
+ uri: z.ZodString;
750
+ name: z.ZodString;
751
+ ext: z.ZodString;
752
+ }, "strip", z.ZodTypeAny, {
753
+ name: string;
754
+ type: "custom" | "icon" | "background" | "emotion" | "user_icon" | "sound" | "video" | "x-risu-asset";
755
+ uri: string;
756
+ ext: string;
757
+ }, {
758
+ name: string;
759
+ type: "custom" | "icon" | "background" | "emotion" | "user_icon" | "sound" | "video" | "x-risu-asset";
760
+ uri: string;
761
+ ext: string;
762
+ }>, "many">>;
763
+ nickname: z.ZodOptional<z.ZodString>;
764
+ creator_notes_multilingual: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
765
+ source: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
766
+ creation_date: z.ZodOptional<z.ZodNumber>;
767
+ modification_date: z.ZodOptional<z.ZodNumber>;
768
+ }, "strip", z.ZodTypeAny, {
769
+ name: string;
770
+ description: string;
771
+ personality: string | null;
772
+ scenario: string;
773
+ first_mes: string;
774
+ mes_example: string | null;
775
+ tags: string[];
776
+ creator: string;
777
+ character_version: string;
778
+ group_only_greetings: string[];
779
+ extensions?: Record<string, unknown> | undefined;
780
+ creator_notes?: string | undefined;
781
+ system_prompt?: string | undefined;
782
+ post_history_instructions?: string | undefined;
783
+ alternate_greetings?: string[] | undefined;
784
+ character_book?: {
785
+ entries: {
786
+ keys: string[];
787
+ content: string;
788
+ enabled: boolean;
789
+ insertion_order: number;
790
+ name?: string | undefined;
791
+ extensions?: Record<string, unknown> | undefined;
792
+ case_sensitive?: boolean | undefined;
793
+ priority?: number | undefined;
794
+ id?: number | undefined;
795
+ comment?: string | undefined;
796
+ selective?: boolean | undefined;
797
+ secondary_keys?: string[] | undefined;
798
+ constant?: boolean | undefined;
799
+ position?: "before_char" | "after_char" | undefined;
800
+ automation_id?: string | undefined;
801
+ role?: "system" | "user" | "assistant" | undefined;
802
+ group?: string | undefined;
803
+ scan_frequency?: number | undefined;
804
+ probability?: number | undefined;
805
+ use_regex?: boolean | undefined;
806
+ depth?: number | undefined;
807
+ selective_logic?: "AND" | "NOT" | undefined;
808
+ }[];
809
+ name?: string | undefined;
810
+ description?: string | undefined;
811
+ scan_depth?: number | undefined;
812
+ token_budget?: number | undefined;
813
+ recursive_scanning?: boolean | undefined;
814
+ extensions?: Record<string, unknown> | undefined;
815
+ } | null | undefined;
816
+ assets?: {
817
+ name: string;
818
+ type: "custom" | "icon" | "background" | "emotion" | "user_icon" | "sound" | "video" | "x-risu-asset";
819
+ uri: string;
820
+ ext: string;
821
+ }[] | undefined;
822
+ nickname?: string | undefined;
823
+ creator_notes_multilingual?: Record<string, string> | undefined;
824
+ source?: string[] | undefined;
825
+ creation_date?: number | undefined;
826
+ modification_date?: number | undefined;
827
+ }, {
828
+ name?: string | undefined;
829
+ description?: string | undefined;
830
+ extensions?: Record<string, unknown> | undefined;
831
+ personality?: string | null | undefined;
832
+ scenario?: string | undefined;
833
+ first_mes?: string | undefined;
834
+ mes_example?: string | null | undefined;
835
+ creator_notes?: string | undefined;
836
+ system_prompt?: string | undefined;
837
+ post_history_instructions?: string | undefined;
838
+ alternate_greetings?: string[] | undefined;
839
+ character_book?: {
840
+ entries: {
841
+ keys: string[];
842
+ content: string;
843
+ enabled: boolean;
844
+ insertion_order: number;
845
+ name?: string | undefined;
846
+ extensions?: Record<string, unknown> | undefined;
847
+ case_sensitive?: boolean | undefined;
848
+ priority?: number | undefined;
849
+ id?: number | undefined;
850
+ comment?: string | undefined;
851
+ selective?: boolean | undefined;
852
+ secondary_keys?: string[] | undefined;
853
+ constant?: boolean | undefined;
854
+ position?: "before_char" | "after_char" | undefined;
855
+ automation_id?: string | undefined;
856
+ role?: "system" | "user" | "assistant" | undefined;
857
+ group?: string | undefined;
858
+ scan_frequency?: number | undefined;
859
+ probability?: number | undefined;
860
+ use_regex?: boolean | undefined;
861
+ depth?: number | undefined;
862
+ selective_logic?: "AND" | "NOT" | undefined;
863
+ }[];
864
+ name?: string | undefined;
865
+ description?: string | undefined;
866
+ scan_depth?: number | undefined;
867
+ token_budget?: number | undefined;
868
+ recursive_scanning?: boolean | undefined;
869
+ extensions?: Record<string, unknown> | undefined;
870
+ } | null | undefined;
871
+ tags?: string[] | undefined;
872
+ creator?: string | undefined;
873
+ character_version?: string | undefined;
874
+ group_only_greetings?: string[] | undefined;
875
+ assets?: {
876
+ name: string;
877
+ type: "custom" | "icon" | "background" | "emotion" | "user_icon" | "sound" | "video" | "x-risu-asset";
878
+ uri: string;
879
+ ext: string;
880
+ }[] | undefined;
881
+ nickname?: string | undefined;
882
+ creator_notes_multilingual?: Record<string, string> | undefined;
883
+ source?: string[] | undefined;
884
+ creation_date?: number | undefined;
885
+ modification_date?: number | undefined;
886
+ }>;
887
+ }, "strip", z.ZodTypeAny, {
888
+ data: {
889
+ name: string;
890
+ description: string;
891
+ personality: string | null;
892
+ scenario: string;
893
+ first_mes: string;
894
+ mes_example: string | null;
895
+ tags: string[];
896
+ creator: string;
897
+ character_version: string;
898
+ group_only_greetings: string[];
899
+ extensions?: Record<string, unknown> | undefined;
900
+ creator_notes?: string | undefined;
901
+ system_prompt?: string | undefined;
902
+ post_history_instructions?: string | undefined;
903
+ alternate_greetings?: string[] | undefined;
904
+ character_book?: {
905
+ entries: {
906
+ keys: string[];
907
+ content: string;
908
+ enabled: boolean;
909
+ insertion_order: number;
910
+ name?: string | undefined;
911
+ extensions?: Record<string, unknown> | undefined;
912
+ case_sensitive?: boolean | undefined;
913
+ priority?: number | undefined;
914
+ id?: number | undefined;
915
+ comment?: string | undefined;
916
+ selective?: boolean | undefined;
917
+ secondary_keys?: string[] | undefined;
918
+ constant?: boolean | undefined;
919
+ position?: "before_char" | "after_char" | undefined;
920
+ automation_id?: string | undefined;
921
+ role?: "system" | "user" | "assistant" | undefined;
922
+ group?: string | undefined;
923
+ scan_frequency?: number | undefined;
924
+ probability?: number | undefined;
925
+ use_regex?: boolean | undefined;
926
+ depth?: number | undefined;
927
+ selective_logic?: "AND" | "NOT" | undefined;
928
+ }[];
929
+ name?: string | undefined;
930
+ description?: string | undefined;
931
+ scan_depth?: number | undefined;
932
+ token_budget?: number | undefined;
933
+ recursive_scanning?: boolean | undefined;
934
+ extensions?: Record<string, unknown> | undefined;
935
+ } | null | undefined;
936
+ assets?: {
937
+ name: string;
938
+ type: "custom" | "icon" | "background" | "emotion" | "user_icon" | "sound" | "video" | "x-risu-asset";
939
+ uri: string;
940
+ ext: string;
941
+ }[] | undefined;
942
+ nickname?: string | undefined;
943
+ creator_notes_multilingual?: Record<string, string> | undefined;
944
+ source?: string[] | undefined;
945
+ creation_date?: number | undefined;
946
+ modification_date?: number | undefined;
947
+ };
948
+ spec: "chara_card_v3";
949
+ spec_version: "3.0";
950
+ }, {
951
+ data: {
952
+ name?: string | undefined;
953
+ description?: string | undefined;
954
+ extensions?: Record<string, unknown> | undefined;
955
+ personality?: string | null | undefined;
956
+ scenario?: string | undefined;
957
+ first_mes?: string | undefined;
958
+ mes_example?: string | null | undefined;
959
+ creator_notes?: string | undefined;
960
+ system_prompt?: string | undefined;
961
+ post_history_instructions?: string | undefined;
962
+ alternate_greetings?: string[] | undefined;
963
+ character_book?: {
964
+ entries: {
965
+ keys: string[];
966
+ content: string;
967
+ enabled: boolean;
968
+ insertion_order: number;
969
+ name?: string | undefined;
970
+ extensions?: Record<string, unknown> | undefined;
971
+ case_sensitive?: boolean | undefined;
972
+ priority?: number | undefined;
973
+ id?: number | undefined;
974
+ comment?: string | undefined;
975
+ selective?: boolean | undefined;
976
+ secondary_keys?: string[] | undefined;
977
+ constant?: boolean | undefined;
978
+ position?: "before_char" | "after_char" | undefined;
979
+ automation_id?: string | undefined;
980
+ role?: "system" | "user" | "assistant" | undefined;
981
+ group?: string | undefined;
982
+ scan_frequency?: number | undefined;
983
+ probability?: number | undefined;
984
+ use_regex?: boolean | undefined;
985
+ depth?: number | undefined;
986
+ selective_logic?: "AND" | "NOT" | undefined;
987
+ }[];
988
+ name?: string | undefined;
989
+ description?: string | undefined;
990
+ scan_depth?: number | undefined;
991
+ token_budget?: number | undefined;
992
+ recursive_scanning?: boolean | undefined;
993
+ extensions?: Record<string, unknown> | undefined;
994
+ } | null | undefined;
995
+ tags?: string[] | undefined;
996
+ creator?: string | undefined;
997
+ character_version?: string | undefined;
998
+ group_only_greetings?: string[] | undefined;
999
+ assets?: {
1000
+ name: string;
1001
+ type: "custom" | "icon" | "background" | "emotion" | "user_icon" | "sound" | "video" | "x-risu-asset";
1002
+ uri: string;
1003
+ ext: string;
1004
+ }[] | undefined;
1005
+ nickname?: string | undefined;
1006
+ creator_notes_multilingual?: Record<string, string> | undefined;
1007
+ source?: string[] | undefined;
1008
+ creation_date?: number | undefined;
1009
+ modification_date?: number | undefined;
1010
+ };
1011
+ spec: "chara_card_v3";
1012
+ spec_version: "3.0";
1013
+ }>;
1014
+ /**
1015
+ * Lorebook entry for v3 cards
1016
+ */
1017
+ export type CCv3LorebookEntry = z.infer<typeof CCv3LorebookEntrySchema>;
1018
+ /**
1019
+ * Character book (lorebook) for v3 cards
1020
+ */
1021
+ export type CCv3CharacterBook = z.infer<typeof CCv3CharacterBookSchema>;
1022
+ /**
1023
+ * Character Card v3 inner data structure
1024
+ */
1025
+ export type CCv3DataInner = z.infer<typeof CCv3DataInnerSchema>;
1026
+ /**
1027
+ * Character Card v3 full structure
1028
+ */
1029
+ export type CCv3Data = z.infer<typeof CCv3DataSchema>;
1030
+ /**
1031
+ * Check if data is a v3 card
1032
+ */
1033
+ export declare function isV3Card(data: unknown): data is CCv3Data;
1034
+ /**
1035
+ * Parse and validate a v3 card
1036
+ */
1037
+ export declare function parseV3Card(data: unknown): CCv3Data;
1038
+ /**
1039
+ * Parse and validate v3 card inner data
1040
+ */
1041
+ export declare function parseV3DataInner(data: unknown): CCv3DataInner;
1042
+ /**
1043
+ * Get v3 card inner data
1044
+ */
1045
+ export declare function getV3Data(card: CCv3Data): CCv3DataInner;
1046
+ /**
1047
+ * Check if data looks like a V3 card structurally (without strict validation).
1048
+ * More lenient than isV3Card - just checks structure, not full schema validity.
1049
+ */
1050
+ export declare function looksLikeV3Card(data: unknown): data is {
1051
+ spec: string;
1052
+ data: Record<string, unknown>;
1053
+ };
1054
+ /**
1055
+ * Common Types
1056
+ *
1057
+ * Shared types used across all card formats.
1058
+ */
1059
+ /**
1060
+ * ISO 8601 date string schema
1061
+ */
1062
+ export declare const ISO8601Schema: z.ZodString;
1063
+ /**
1064
+ * UUID string schema
1065
+ */
1066
+ export declare const UUIDSchema: z.ZodString;
1067
+ /**
1068
+ * Card specification version schema
1069
+ */
1070
+ export declare const SpecSchema: z.ZodEnum<[
1071
+ "v2",
1072
+ "v3"
1073
+ ]>;
1074
+ /**
1075
+ * Source format identifier schema
1076
+ */
1077
+ export declare const SourceFormatSchema: z.ZodEnum<[
1078
+ "png_v2",
1079
+ "png_v3",
1080
+ "json_v2",
1081
+ "json_v3",
1082
+ "charx",
1083
+ "charx_risu",
1084
+ "charx_jpeg",
1085
+ "voxta"
1086
+ ]>;
1087
+ /**
1088
+ * Original JSON shape schema
1089
+ */
1090
+ export declare const OriginalShapeSchema: z.ZodEnum<[
1091
+ "wrapped",
1092
+ "unwrapped",
1093
+ "legacy"
1094
+ ]>;
1095
+ /**
1096
+ * Asset type identifier schema
1097
+ */
1098
+ export declare const AssetTypeSchema: z.ZodEnum<[
1099
+ "icon",
1100
+ "background",
1101
+ "emotion",
1102
+ "user_icon",
1103
+ "sound",
1104
+ "video",
1105
+ "custom",
1106
+ "x-risu-asset"
1107
+ ]>;
1108
+ /**
1109
+ * Asset descriptor schema (v3 spec)
1110
+ */
1111
+ export declare const AssetDescriptorSchema: z.ZodObject<{
1112
+ type: z.ZodEnum<[
1113
+ "icon",
1114
+ "background",
1115
+ "emotion",
1116
+ "user_icon",
1117
+ "sound",
1118
+ "video",
1119
+ "custom",
1120
+ "x-risu-asset"
1121
+ ]>;
1122
+ uri: z.ZodString;
1123
+ name: z.ZodString;
1124
+ ext: z.ZodString;
1125
+ }, "strip", z.ZodTypeAny, {
1126
+ name: string;
1127
+ type: "custom" | "icon" | "background" | "emotion" | "user_icon" | "sound" | "video" | "x-risu-asset";
1128
+ uri: string;
1129
+ ext: string;
1130
+ }, {
1131
+ name: string;
1132
+ type: "custom" | "icon" | "background" | "emotion" | "user_icon" | "sound" | "video" | "x-risu-asset";
1133
+ uri: string;
1134
+ ext: string;
1135
+ }>;
1136
+ /**
1137
+ * Extracted asset with binary data schema
1138
+ */
1139
+ export declare const ExtractedAssetSchema: z.ZodObject<{
1140
+ descriptor: z.ZodObject<{
1141
+ type: z.ZodEnum<[
1142
+ "icon",
1143
+ "background",
1144
+ "emotion",
1145
+ "user_icon",
1146
+ "sound",
1147
+ "video",
1148
+ "custom",
1149
+ "x-risu-asset"
1150
+ ]>;
1151
+ uri: z.ZodString;
1152
+ name: z.ZodString;
1153
+ ext: z.ZodString;
1154
+ }, "strip", z.ZodTypeAny, {
1155
+ name: string;
1156
+ type: "custom" | "icon" | "background" | "emotion" | "user_icon" | "sound" | "video" | "x-risu-asset";
1157
+ uri: string;
1158
+ ext: string;
1159
+ }, {
1160
+ name: string;
1161
+ type: "custom" | "icon" | "background" | "emotion" | "user_icon" | "sound" | "video" | "x-risu-asset";
1162
+ uri: string;
1163
+ ext: string;
1164
+ }>;
1165
+ data: z.ZodType<Uint8Array<ArrayBuffer>, z.ZodTypeDef, Uint8Array<ArrayBuffer>>;
1166
+ mimeType: z.ZodString;
1167
+ }, "strip", z.ZodTypeAny, {
1168
+ descriptor: {
1169
+ name: string;
1170
+ type: "custom" | "icon" | "background" | "emotion" | "user_icon" | "sound" | "video" | "x-risu-asset";
1171
+ uri: string;
1172
+ ext: string;
1173
+ };
1174
+ data: Uint8Array<ArrayBuffer>;
1175
+ mimeType: string;
1176
+ }, {
1177
+ descriptor: {
1178
+ name: string;
1179
+ type: "custom" | "icon" | "background" | "emotion" | "user_icon" | "sound" | "video" | "x-risu-asset";
1180
+ uri: string;
1181
+ ext: string;
1182
+ };
1183
+ data: Uint8Array<ArrayBuffer>;
1184
+ mimeType: string;
1185
+ }>;
1186
+ /**
1187
+ * ISO 8601 date string
1188
+ */
1189
+ export type ISO8601 = z.infer<typeof ISO8601Schema>;
1190
+ /**
1191
+ * UUID string
1192
+ */
1193
+ export type UUID = z.infer<typeof UUIDSchema>;
1194
+ /**
1195
+ * Card specification version
1196
+ */
1197
+ export type Spec = z.infer<typeof SpecSchema>;
1198
+ /**
1199
+ * Source format identifier
1200
+ */
1201
+ export type SourceFormat = z.infer<typeof SourceFormatSchema>;
1202
+ /**
1203
+ * Original JSON shape
1204
+ */
1205
+ export type OriginalShape = z.infer<typeof OriginalShapeSchema>;
1206
+ /**
1207
+ * Asset type identifier
1208
+ */
1209
+ export type AssetType = z.infer<typeof AssetTypeSchema>;
1210
+ /**
1211
+ * Asset descriptor (v3 spec)
1212
+ */
1213
+ export type AssetDescriptor = z.infer<typeof AssetDescriptorSchema>;
1214
+ /**
1215
+ * Extracted asset with binary data
1216
+ */
1217
+ export type ExtractedAsset = z.infer<typeof ExtractedAssetSchema>;
1218
+ /**
1219
+ * Character Card v2 Types
1220
+ *
1221
+ * Based on: https://github.com/malfoyslastname/character-card-spec-v2
1222
+ */
1223
+ /**
1224
+ * Lorebook entry schema for v2 cards
1225
+ */
1226
+ export declare const CCv2LorebookEntrySchema: z.ZodObject<{
1227
+ keys: z.ZodArray<z.ZodString, "many">;
1228
+ content: z.ZodString;
1229
+ enabled: z.ZodBoolean;
1230
+ insertion_order: z.ZodNumber;
1231
+ extensions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1232
+ case_sensitive: z.ZodOptional<z.ZodBoolean>;
1233
+ name: z.ZodOptional<z.ZodString>;
1234
+ priority: z.ZodOptional<z.ZodNumber>;
1235
+ id: z.ZodOptional<z.ZodNumber>;
1236
+ comment: z.ZodOptional<z.ZodString>;
1237
+ selective: z.ZodOptional<z.ZodBoolean>;
1238
+ secondary_keys: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1239
+ constant: z.ZodOptional<z.ZodBoolean>;
1240
+ position: z.ZodOptional<z.ZodEnum<[
1241
+ "before_char",
1242
+ "after_char"
1243
+ ]>>;
1244
+ }, "strip", z.ZodTypeAny, {
1245
+ keys: string[];
1246
+ content: string;
1247
+ enabled: boolean;
1248
+ insertion_order: number;
1249
+ name?: string | undefined;
1250
+ extensions?: Record<string, unknown> | undefined;
1251
+ case_sensitive?: boolean | undefined;
1252
+ priority?: number | undefined;
1253
+ id?: number | undefined;
1254
+ comment?: string | undefined;
1255
+ selective?: boolean | undefined;
1256
+ secondary_keys?: string[] | undefined;
1257
+ constant?: boolean | undefined;
1258
+ position?: "before_char" | "after_char" | undefined;
1259
+ }, {
1260
+ keys: string[];
1261
+ content: string;
1262
+ enabled: boolean;
1263
+ insertion_order: number;
1264
+ name?: string | undefined;
1265
+ extensions?: Record<string, unknown> | undefined;
1266
+ case_sensitive?: boolean | undefined;
1267
+ priority?: number | undefined;
1268
+ id?: number | undefined;
1269
+ comment?: string | undefined;
1270
+ selective?: boolean | undefined;
1271
+ secondary_keys?: string[] | undefined;
1272
+ constant?: boolean | undefined;
1273
+ position?: "before_char" | "after_char" | undefined;
1274
+ }>;
1275
+ /**
1276
+ * Character book (lorebook) schema for v2 cards
1277
+ */
1278
+ export declare const CCv2CharacterBookSchema: z.ZodObject<{
1279
+ name: z.ZodOptional<z.ZodString>;
1280
+ description: z.ZodOptional<z.ZodString>;
1281
+ scan_depth: z.ZodOptional<z.ZodNumber>;
1282
+ token_budget: z.ZodOptional<z.ZodNumber>;
1283
+ recursive_scanning: z.ZodOptional<z.ZodBoolean>;
1284
+ extensions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1285
+ entries: z.ZodArray<z.ZodObject<{
1286
+ keys: z.ZodArray<z.ZodString, "many">;
1287
+ content: z.ZodString;
1288
+ enabled: z.ZodBoolean;
1289
+ insertion_order: z.ZodNumber;
1290
+ extensions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1291
+ case_sensitive: z.ZodOptional<z.ZodBoolean>;
1292
+ name: z.ZodOptional<z.ZodString>;
1293
+ priority: z.ZodOptional<z.ZodNumber>;
1294
+ id: z.ZodOptional<z.ZodNumber>;
1295
+ comment: z.ZodOptional<z.ZodString>;
1296
+ selective: z.ZodOptional<z.ZodBoolean>;
1297
+ secondary_keys: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1298
+ constant: z.ZodOptional<z.ZodBoolean>;
1299
+ position: z.ZodOptional<z.ZodEnum<[
1300
+ "before_char",
1301
+ "after_char"
1302
+ ]>>;
1303
+ }, "strip", z.ZodTypeAny, {
1304
+ keys: string[];
1305
+ content: string;
1306
+ enabled: boolean;
1307
+ insertion_order: number;
1308
+ name?: string | undefined;
1309
+ extensions?: Record<string, unknown> | undefined;
1310
+ case_sensitive?: boolean | undefined;
1311
+ priority?: number | undefined;
1312
+ id?: number | undefined;
1313
+ comment?: string | undefined;
1314
+ selective?: boolean | undefined;
1315
+ secondary_keys?: string[] | undefined;
1316
+ constant?: boolean | undefined;
1317
+ position?: "before_char" | "after_char" | undefined;
1318
+ }, {
1319
+ keys: string[];
1320
+ content: string;
1321
+ enabled: boolean;
1322
+ insertion_order: number;
1323
+ name?: string | undefined;
1324
+ extensions?: Record<string, unknown> | undefined;
1325
+ case_sensitive?: boolean | undefined;
1326
+ priority?: number | undefined;
1327
+ id?: number | undefined;
1328
+ comment?: string | undefined;
1329
+ selective?: boolean | undefined;
1330
+ secondary_keys?: string[] | undefined;
1331
+ constant?: boolean | undefined;
1332
+ position?: "before_char" | "after_char" | undefined;
1333
+ }>, "many">;
1334
+ }, "strip", z.ZodTypeAny, {
1335
+ entries: {
1336
+ keys: string[];
1337
+ content: string;
1338
+ enabled: boolean;
1339
+ insertion_order: number;
1340
+ name?: string | undefined;
1341
+ extensions?: Record<string, unknown> | undefined;
1342
+ case_sensitive?: boolean | undefined;
1343
+ priority?: number | undefined;
1344
+ id?: number | undefined;
1345
+ comment?: string | undefined;
1346
+ selective?: boolean | undefined;
1347
+ secondary_keys?: string[] | undefined;
1348
+ constant?: boolean | undefined;
1349
+ position?: "before_char" | "after_char" | undefined;
1350
+ }[];
1351
+ name?: string | undefined;
1352
+ description?: string | undefined;
1353
+ scan_depth?: number | undefined;
1354
+ token_budget?: number | undefined;
1355
+ recursive_scanning?: boolean | undefined;
1356
+ extensions?: Record<string, unknown> | undefined;
1357
+ }, {
1358
+ entries: {
1359
+ keys: string[];
1360
+ content: string;
1361
+ enabled: boolean;
1362
+ insertion_order: number;
1363
+ name?: string | undefined;
1364
+ extensions?: Record<string, unknown> | undefined;
1365
+ case_sensitive?: boolean | undefined;
1366
+ priority?: number | undefined;
1367
+ id?: number | undefined;
1368
+ comment?: string | undefined;
1369
+ selective?: boolean | undefined;
1370
+ secondary_keys?: string[] | undefined;
1371
+ constant?: boolean | undefined;
1372
+ position?: "before_char" | "after_char" | undefined;
1373
+ }[];
1374
+ name?: string | undefined;
1375
+ description?: string | undefined;
1376
+ scan_depth?: number | undefined;
1377
+ token_budget?: number | undefined;
1378
+ recursive_scanning?: boolean | undefined;
1379
+ extensions?: Record<string, unknown> | undefined;
1380
+ }>;
1381
+ /**
1382
+ * Character Card v2 data structure schema
1383
+ */
1384
+ export declare const CCv2DataSchema: z.ZodObject<{
1385
+ name: z.ZodDefault<z.ZodString>;
1386
+ description: z.ZodDefault<z.ZodString>;
1387
+ personality: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1388
+ scenario: z.ZodDefault<z.ZodString>;
1389
+ first_mes: z.ZodDefault<z.ZodString>;
1390
+ mes_example: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1391
+ creator_notes: z.ZodOptional<z.ZodString>;
1392
+ system_prompt: z.ZodOptional<z.ZodString>;
1393
+ post_history_instructions: z.ZodOptional<z.ZodString>;
1394
+ alternate_greetings: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1395
+ character_book: z.ZodNullable<z.ZodOptional<z.ZodObject<{
1396
+ name: z.ZodOptional<z.ZodString>;
1397
+ description: z.ZodOptional<z.ZodString>;
1398
+ scan_depth: z.ZodOptional<z.ZodNumber>;
1399
+ token_budget: z.ZodOptional<z.ZodNumber>;
1400
+ recursive_scanning: z.ZodOptional<z.ZodBoolean>;
1401
+ extensions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1402
+ entries: z.ZodArray<z.ZodObject<{
1403
+ keys: z.ZodArray<z.ZodString, "many">;
1404
+ content: z.ZodString;
1405
+ enabled: z.ZodBoolean;
1406
+ insertion_order: z.ZodNumber;
1407
+ extensions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1408
+ case_sensitive: z.ZodOptional<z.ZodBoolean>;
1409
+ name: z.ZodOptional<z.ZodString>;
1410
+ priority: z.ZodOptional<z.ZodNumber>;
1411
+ id: z.ZodOptional<z.ZodNumber>;
1412
+ comment: z.ZodOptional<z.ZodString>;
1413
+ selective: z.ZodOptional<z.ZodBoolean>;
1414
+ secondary_keys: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1415
+ constant: z.ZodOptional<z.ZodBoolean>;
1416
+ position: z.ZodOptional<z.ZodEnum<[
1417
+ "before_char",
1418
+ "after_char"
1419
+ ]>>;
1420
+ }, "strip", z.ZodTypeAny, {
1421
+ keys: string[];
1422
+ content: string;
1423
+ enabled: boolean;
1424
+ insertion_order: number;
1425
+ name?: string | undefined;
1426
+ extensions?: Record<string, unknown> | undefined;
1427
+ case_sensitive?: boolean | undefined;
1428
+ priority?: number | undefined;
1429
+ id?: number | undefined;
1430
+ comment?: string | undefined;
1431
+ selective?: boolean | undefined;
1432
+ secondary_keys?: string[] | undefined;
1433
+ constant?: boolean | undefined;
1434
+ position?: "before_char" | "after_char" | undefined;
1435
+ }, {
1436
+ keys: string[];
1437
+ content: string;
1438
+ enabled: boolean;
1439
+ insertion_order: number;
1440
+ name?: string | undefined;
1441
+ extensions?: Record<string, unknown> | undefined;
1442
+ case_sensitive?: boolean | undefined;
1443
+ priority?: number | undefined;
1444
+ id?: number | undefined;
1445
+ comment?: string | undefined;
1446
+ selective?: boolean | undefined;
1447
+ secondary_keys?: string[] | undefined;
1448
+ constant?: boolean | undefined;
1449
+ position?: "before_char" | "after_char" | undefined;
1450
+ }>, "many">;
1451
+ }, "strip", z.ZodTypeAny, {
1452
+ entries: {
1453
+ keys: string[];
1454
+ content: string;
1455
+ enabled: boolean;
1456
+ insertion_order: number;
1457
+ name?: string | undefined;
1458
+ extensions?: Record<string, unknown> | undefined;
1459
+ case_sensitive?: boolean | undefined;
1460
+ priority?: number | undefined;
1461
+ id?: number | undefined;
1462
+ comment?: string | undefined;
1463
+ selective?: boolean | undefined;
1464
+ secondary_keys?: string[] | undefined;
1465
+ constant?: boolean | undefined;
1466
+ position?: "before_char" | "after_char" | undefined;
1467
+ }[];
1468
+ name?: string | undefined;
1469
+ description?: string | undefined;
1470
+ scan_depth?: number | undefined;
1471
+ token_budget?: number | undefined;
1472
+ recursive_scanning?: boolean | undefined;
1473
+ extensions?: Record<string, unknown> | undefined;
1474
+ }, {
1475
+ entries: {
1476
+ keys: string[];
1477
+ content: string;
1478
+ enabled: boolean;
1479
+ insertion_order: number;
1480
+ name?: string | undefined;
1481
+ extensions?: Record<string, unknown> | undefined;
1482
+ case_sensitive?: boolean | undefined;
1483
+ priority?: number | undefined;
1484
+ id?: number | undefined;
1485
+ comment?: string | undefined;
1486
+ selective?: boolean | undefined;
1487
+ secondary_keys?: string[] | undefined;
1488
+ constant?: boolean | undefined;
1489
+ position?: "before_char" | "after_char" | undefined;
1490
+ }[];
1491
+ name?: string | undefined;
1492
+ description?: string | undefined;
1493
+ scan_depth?: number | undefined;
1494
+ token_budget?: number | undefined;
1495
+ recursive_scanning?: boolean | undefined;
1496
+ extensions?: Record<string, unknown> | undefined;
1497
+ }>>>;
1498
+ tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1499
+ creator: z.ZodOptional<z.ZodString>;
1500
+ character_version: z.ZodOptional<z.ZodString>;
1501
+ extensions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1502
+ }, "strip", z.ZodTypeAny, {
1503
+ name: string;
1504
+ description: string;
1505
+ personality: string | null;
1506
+ scenario: string;
1507
+ first_mes: string;
1508
+ mes_example: string | null;
1509
+ extensions?: Record<string, unknown> | undefined;
1510
+ creator_notes?: string | undefined;
1511
+ system_prompt?: string | undefined;
1512
+ post_history_instructions?: string | undefined;
1513
+ alternate_greetings?: string[] | undefined;
1514
+ character_book?: {
1515
+ entries: {
1516
+ keys: string[];
1517
+ content: string;
1518
+ enabled: boolean;
1519
+ insertion_order: number;
1520
+ name?: string | undefined;
1521
+ extensions?: Record<string, unknown> | undefined;
1522
+ case_sensitive?: boolean | undefined;
1523
+ priority?: number | undefined;
1524
+ id?: number | undefined;
1525
+ comment?: string | undefined;
1526
+ selective?: boolean | undefined;
1527
+ secondary_keys?: string[] | undefined;
1528
+ constant?: boolean | undefined;
1529
+ position?: "before_char" | "after_char" | undefined;
1530
+ }[];
1531
+ name?: string | undefined;
1532
+ description?: string | undefined;
1533
+ scan_depth?: number | undefined;
1534
+ token_budget?: number | undefined;
1535
+ recursive_scanning?: boolean | undefined;
1536
+ extensions?: Record<string, unknown> | undefined;
1537
+ } | null | undefined;
1538
+ tags?: string[] | undefined;
1539
+ creator?: string | undefined;
1540
+ character_version?: string | undefined;
1541
+ }, {
1542
+ name?: string | undefined;
1543
+ description?: string | undefined;
1544
+ extensions?: Record<string, unknown> | undefined;
1545
+ personality?: string | null | undefined;
1546
+ scenario?: string | undefined;
1547
+ first_mes?: string | undefined;
1548
+ mes_example?: string | null | undefined;
1549
+ creator_notes?: string | undefined;
1550
+ system_prompt?: string | undefined;
1551
+ post_history_instructions?: string | undefined;
1552
+ alternate_greetings?: string[] | undefined;
1553
+ character_book?: {
1554
+ entries: {
1555
+ keys: string[];
1556
+ content: string;
1557
+ enabled: boolean;
1558
+ insertion_order: number;
1559
+ name?: string | undefined;
1560
+ extensions?: Record<string, unknown> | undefined;
1561
+ case_sensitive?: boolean | undefined;
1562
+ priority?: number | undefined;
1563
+ id?: number | undefined;
1564
+ comment?: string | undefined;
1565
+ selective?: boolean | undefined;
1566
+ secondary_keys?: string[] | undefined;
1567
+ constant?: boolean | undefined;
1568
+ position?: "before_char" | "after_char" | undefined;
1569
+ }[];
1570
+ name?: string | undefined;
1571
+ description?: string | undefined;
1572
+ scan_depth?: number | undefined;
1573
+ token_budget?: number | undefined;
1574
+ recursive_scanning?: boolean | undefined;
1575
+ extensions?: Record<string, unknown> | undefined;
1576
+ } | null | undefined;
1577
+ tags?: string[] | undefined;
1578
+ creator?: string | undefined;
1579
+ character_version?: string | undefined;
1580
+ }>;
1581
+ /**
1582
+ * Wrapped v2 card format schema (modern tools)
1583
+ */
1584
+ export declare const CCv2WrappedSchema: z.ZodObject<{
1585
+ spec: z.ZodLiteral<"chara_card_v2">;
1586
+ spec_version: z.ZodLiteral<"2.0">;
1587
+ data: z.ZodObject<{
1588
+ name: z.ZodDefault<z.ZodString>;
1589
+ description: z.ZodDefault<z.ZodString>;
1590
+ personality: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1591
+ scenario: z.ZodDefault<z.ZodString>;
1592
+ first_mes: z.ZodDefault<z.ZodString>;
1593
+ mes_example: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1594
+ creator_notes: z.ZodOptional<z.ZodString>;
1595
+ system_prompt: z.ZodOptional<z.ZodString>;
1596
+ post_history_instructions: z.ZodOptional<z.ZodString>;
1597
+ alternate_greetings: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1598
+ character_book: z.ZodNullable<z.ZodOptional<z.ZodObject<{
1599
+ name: z.ZodOptional<z.ZodString>;
1600
+ description: z.ZodOptional<z.ZodString>;
1601
+ scan_depth: z.ZodOptional<z.ZodNumber>;
1602
+ token_budget: z.ZodOptional<z.ZodNumber>;
1603
+ recursive_scanning: z.ZodOptional<z.ZodBoolean>;
1604
+ extensions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1605
+ entries: z.ZodArray<z.ZodObject<{
1606
+ keys: z.ZodArray<z.ZodString, "many">;
1607
+ content: z.ZodString;
1608
+ enabled: z.ZodBoolean;
1609
+ insertion_order: z.ZodNumber;
1610
+ extensions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1611
+ case_sensitive: z.ZodOptional<z.ZodBoolean>;
1612
+ name: z.ZodOptional<z.ZodString>;
1613
+ priority: z.ZodOptional<z.ZodNumber>;
1614
+ id: z.ZodOptional<z.ZodNumber>;
1615
+ comment: z.ZodOptional<z.ZodString>;
1616
+ selective: z.ZodOptional<z.ZodBoolean>;
1617
+ secondary_keys: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1618
+ constant: z.ZodOptional<z.ZodBoolean>;
1619
+ position: z.ZodOptional<z.ZodEnum<[
1620
+ "before_char",
1621
+ "after_char"
1622
+ ]>>;
1623
+ }, "strip", z.ZodTypeAny, {
1624
+ keys: string[];
1625
+ content: string;
1626
+ enabled: boolean;
1627
+ insertion_order: number;
1628
+ name?: string | undefined;
1629
+ extensions?: Record<string, unknown> | undefined;
1630
+ case_sensitive?: boolean | undefined;
1631
+ priority?: number | undefined;
1632
+ id?: number | undefined;
1633
+ comment?: string | undefined;
1634
+ selective?: boolean | undefined;
1635
+ secondary_keys?: string[] | undefined;
1636
+ constant?: boolean | undefined;
1637
+ position?: "before_char" | "after_char" | undefined;
1638
+ }, {
1639
+ keys: string[];
1640
+ content: string;
1641
+ enabled: boolean;
1642
+ insertion_order: number;
1643
+ name?: string | undefined;
1644
+ extensions?: Record<string, unknown> | undefined;
1645
+ case_sensitive?: boolean | undefined;
1646
+ priority?: number | undefined;
1647
+ id?: number | undefined;
1648
+ comment?: string | undefined;
1649
+ selective?: boolean | undefined;
1650
+ secondary_keys?: string[] | undefined;
1651
+ constant?: boolean | undefined;
1652
+ position?: "before_char" | "after_char" | undefined;
1653
+ }>, "many">;
1654
+ }, "strip", z.ZodTypeAny, {
1655
+ entries: {
1656
+ keys: string[];
1657
+ content: string;
1658
+ enabled: boolean;
1659
+ insertion_order: number;
1660
+ name?: string | undefined;
1661
+ extensions?: Record<string, unknown> | undefined;
1662
+ case_sensitive?: boolean | undefined;
1663
+ priority?: number | undefined;
1664
+ id?: number | undefined;
1665
+ comment?: string | undefined;
1666
+ selective?: boolean | undefined;
1667
+ secondary_keys?: string[] | undefined;
1668
+ constant?: boolean | undefined;
1669
+ position?: "before_char" | "after_char" | undefined;
1670
+ }[];
1671
+ name?: string | undefined;
1672
+ description?: string | undefined;
1673
+ scan_depth?: number | undefined;
1674
+ token_budget?: number | undefined;
1675
+ recursive_scanning?: boolean | undefined;
1676
+ extensions?: Record<string, unknown> | undefined;
1677
+ }, {
1678
+ entries: {
1679
+ keys: string[];
1680
+ content: string;
1681
+ enabled: boolean;
1682
+ insertion_order: number;
1683
+ name?: string | undefined;
1684
+ extensions?: Record<string, unknown> | undefined;
1685
+ case_sensitive?: boolean | undefined;
1686
+ priority?: number | undefined;
1687
+ id?: number | undefined;
1688
+ comment?: string | undefined;
1689
+ selective?: boolean | undefined;
1690
+ secondary_keys?: string[] | undefined;
1691
+ constant?: boolean | undefined;
1692
+ position?: "before_char" | "after_char" | undefined;
1693
+ }[];
1694
+ name?: string | undefined;
1695
+ description?: string | undefined;
1696
+ scan_depth?: number | undefined;
1697
+ token_budget?: number | undefined;
1698
+ recursive_scanning?: boolean | undefined;
1699
+ extensions?: Record<string, unknown> | undefined;
1700
+ }>>>;
1701
+ tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1702
+ creator: z.ZodOptional<z.ZodString>;
1703
+ character_version: z.ZodOptional<z.ZodString>;
1704
+ extensions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1705
+ }, "strip", z.ZodTypeAny, {
1706
+ name: string;
1707
+ description: string;
1708
+ personality: string | null;
1709
+ scenario: string;
1710
+ first_mes: string;
1711
+ mes_example: string | null;
1712
+ extensions?: Record<string, unknown> | undefined;
1713
+ creator_notes?: string | undefined;
1714
+ system_prompt?: string | undefined;
1715
+ post_history_instructions?: string | undefined;
1716
+ alternate_greetings?: string[] | undefined;
1717
+ character_book?: {
1718
+ entries: {
1719
+ keys: string[];
1720
+ content: string;
1721
+ enabled: boolean;
1722
+ insertion_order: number;
1723
+ name?: string | undefined;
1724
+ extensions?: Record<string, unknown> | undefined;
1725
+ case_sensitive?: boolean | undefined;
1726
+ priority?: number | undefined;
1727
+ id?: number | undefined;
1728
+ comment?: string | undefined;
1729
+ selective?: boolean | undefined;
1730
+ secondary_keys?: string[] | undefined;
1731
+ constant?: boolean | undefined;
1732
+ position?: "before_char" | "after_char" | undefined;
1733
+ }[];
1734
+ name?: string | undefined;
1735
+ description?: string | undefined;
1736
+ scan_depth?: number | undefined;
1737
+ token_budget?: number | undefined;
1738
+ recursive_scanning?: boolean | undefined;
1739
+ extensions?: Record<string, unknown> | undefined;
1740
+ } | null | undefined;
1741
+ tags?: string[] | undefined;
1742
+ creator?: string | undefined;
1743
+ character_version?: string | undefined;
1744
+ }, {
1745
+ name?: string | undefined;
1746
+ description?: string | undefined;
1747
+ extensions?: Record<string, unknown> | undefined;
1748
+ personality?: string | null | undefined;
1749
+ scenario?: string | undefined;
1750
+ first_mes?: string | undefined;
1751
+ mes_example?: string | null | undefined;
1752
+ creator_notes?: string | undefined;
1753
+ system_prompt?: string | undefined;
1754
+ post_history_instructions?: string | undefined;
1755
+ alternate_greetings?: string[] | undefined;
1756
+ character_book?: {
1757
+ entries: {
1758
+ keys: string[];
1759
+ content: string;
1760
+ enabled: boolean;
1761
+ insertion_order: number;
1762
+ name?: string | undefined;
1763
+ extensions?: Record<string, unknown> | undefined;
1764
+ case_sensitive?: boolean | undefined;
1765
+ priority?: number | undefined;
1766
+ id?: number | undefined;
1767
+ comment?: string | undefined;
1768
+ selective?: boolean | undefined;
1769
+ secondary_keys?: string[] | undefined;
1770
+ constant?: boolean | undefined;
1771
+ position?: "before_char" | "after_char" | undefined;
1772
+ }[];
1773
+ name?: string | undefined;
1774
+ description?: string | undefined;
1775
+ scan_depth?: number | undefined;
1776
+ token_budget?: number | undefined;
1777
+ recursive_scanning?: boolean | undefined;
1778
+ extensions?: Record<string, unknown> | undefined;
1779
+ } | null | undefined;
1780
+ tags?: string[] | undefined;
1781
+ creator?: string | undefined;
1782
+ character_version?: string | undefined;
1783
+ }>;
1784
+ }, "strip", z.ZodTypeAny, {
1785
+ data: {
1786
+ name: string;
1787
+ description: string;
1788
+ personality: string | null;
1789
+ scenario: string;
1790
+ first_mes: string;
1791
+ mes_example: string | null;
1792
+ extensions?: Record<string, unknown> | undefined;
1793
+ creator_notes?: string | undefined;
1794
+ system_prompt?: string | undefined;
1795
+ post_history_instructions?: string | undefined;
1796
+ alternate_greetings?: string[] | undefined;
1797
+ character_book?: {
1798
+ entries: {
1799
+ keys: string[];
1800
+ content: string;
1801
+ enabled: boolean;
1802
+ insertion_order: number;
1803
+ name?: string | undefined;
1804
+ extensions?: Record<string, unknown> | undefined;
1805
+ case_sensitive?: boolean | undefined;
1806
+ priority?: number | undefined;
1807
+ id?: number | undefined;
1808
+ comment?: string | undefined;
1809
+ selective?: boolean | undefined;
1810
+ secondary_keys?: string[] | undefined;
1811
+ constant?: boolean | undefined;
1812
+ position?: "before_char" | "after_char" | undefined;
1813
+ }[];
1814
+ name?: string | undefined;
1815
+ description?: string | undefined;
1816
+ scan_depth?: number | undefined;
1817
+ token_budget?: number | undefined;
1818
+ recursive_scanning?: boolean | undefined;
1819
+ extensions?: Record<string, unknown> | undefined;
1820
+ } | null | undefined;
1821
+ tags?: string[] | undefined;
1822
+ creator?: string | undefined;
1823
+ character_version?: string | undefined;
1824
+ };
1825
+ spec: "chara_card_v2";
1826
+ spec_version: "2.0";
1827
+ }, {
1828
+ data: {
1829
+ name?: string | undefined;
1830
+ description?: string | undefined;
1831
+ extensions?: Record<string, unknown> | undefined;
1832
+ personality?: string | null | undefined;
1833
+ scenario?: string | undefined;
1834
+ first_mes?: string | undefined;
1835
+ mes_example?: string | null | undefined;
1836
+ creator_notes?: string | undefined;
1837
+ system_prompt?: string | undefined;
1838
+ post_history_instructions?: string | undefined;
1839
+ alternate_greetings?: string[] | undefined;
1840
+ character_book?: {
1841
+ entries: {
1842
+ keys: string[];
1843
+ content: string;
1844
+ enabled: boolean;
1845
+ insertion_order: number;
1846
+ name?: string | undefined;
1847
+ extensions?: Record<string, unknown> | undefined;
1848
+ case_sensitive?: boolean | undefined;
1849
+ priority?: number | undefined;
1850
+ id?: number | undefined;
1851
+ comment?: string | undefined;
1852
+ selective?: boolean | undefined;
1853
+ secondary_keys?: string[] | undefined;
1854
+ constant?: boolean | undefined;
1855
+ position?: "before_char" | "after_char" | undefined;
1856
+ }[];
1857
+ name?: string | undefined;
1858
+ description?: string | undefined;
1859
+ scan_depth?: number | undefined;
1860
+ token_budget?: number | undefined;
1861
+ recursive_scanning?: boolean | undefined;
1862
+ extensions?: Record<string, unknown> | undefined;
1863
+ } | null | undefined;
1864
+ tags?: string[] | undefined;
1865
+ creator?: string | undefined;
1866
+ character_version?: string | undefined;
1867
+ };
1868
+ spec: "chara_card_v2";
1869
+ spec_version: "2.0";
1870
+ }>;
1871
+ /**
1872
+ * Lorebook entry for v2 cards
1873
+ */
1874
+ export type CCv2LorebookEntry = z.infer<typeof CCv2LorebookEntrySchema>;
1875
+ /**
1876
+ * Character book (lorebook) for v2 cards
1877
+ */
1878
+ export type CCv2CharacterBook = z.infer<typeof CCv2CharacterBookSchema>;
1879
+ /**
1880
+ * Character Card v2 data structure
1881
+ */
1882
+ export type CCv2Data = z.infer<typeof CCv2DataSchema>;
1883
+ /**
1884
+ * Wrapped v2 card format (modern tools)
1885
+ */
1886
+ export type CCv2Wrapped = z.infer<typeof CCv2WrappedSchema>;
1887
+ /**
1888
+ * Check if data is a wrapped v2 card
1889
+ */
1890
+ export declare function isWrappedV2(data: unknown): data is CCv2Wrapped;
1891
+ /**
1892
+ * Check if data looks like v2 card data (wrapped or unwrapped)
1893
+ */
1894
+ export declare function isV2CardData(data: unknown): data is CCv2Data | CCv2Wrapped;
1895
+ /**
1896
+ * Parse and validate a wrapped v2 card
1897
+ */
1898
+ export declare function parseWrappedV2(data: unknown): CCv2Wrapped;
1899
+ /**
1900
+ * Parse and validate v2 card data
1901
+ */
1902
+ export declare function parseV2Data(data: unknown): CCv2Data;
1903
+ /**
1904
+ * Check if data looks like a wrapped V2 card structurally (without strict validation).
1905
+ * This is more lenient than isWrappedV2 - it just checks structure, not full schema validity.
1906
+ */
1907
+ export declare function looksLikeWrappedV2(data: unknown): data is {
1908
+ spec: string;
1909
+ data: Record<string, unknown>;
1910
+ };
1911
+ /**
1912
+ * Get v2 card data from wrapped or unwrapped format.
1913
+ *
1914
+ * Uses structural check instead of strict Zod validation to handle
1915
+ * malformed cards that have the right structure but missing/invalid fields.
1916
+ * The caller (e.g., ccv2ToCCv3) handles defaulting missing fields.
1917
+ */
1918
+ export declare function getV2Data(card: CCv2Data | CCv2Wrapped): CCv2Data;
1919
+ /**
1920
+ * RisuAI Extension Types
1921
+ *
1922
+ * These extensions are preserved as opaque blobs.
1923
+ * We do NOT interpret or transform the script contents.
1924
+ */
1925
+ /**
1926
+ * Risu emotions mapping (v2 style)
1927
+ * Format: [name, uri][]
1928
+ */
1929
+ export type RisuEmotions = [
1930
+ string,
1931
+ string
1932
+ ][];
1933
+ /**
1934
+ * Risu additional assets (v3 style)
1935
+ * Format: [name, uri, type][]
1936
+ */
1937
+ export type RisuAdditionalAssets = [
1938
+ string,
1939
+ string,
1940
+ string
1941
+ ][];
1942
+ /**
1943
+ * Risu depth prompt configuration
1944
+ */
1945
+ export interface RisuDepthPrompt {
1946
+ depth: number;
1947
+ prompt: string;
1948
+ }
1949
+ /**
1950
+ * Risu extensions in card.extensions.risuai
1951
+ * Preserved as opaque - we don't interpret script contents
1952
+ */
1953
+ export interface RisuExtensions {
1954
+ emotions?: RisuEmotions;
1955
+ additionalAssets?: RisuAdditionalAssets;
1956
+ triggerscript?: unknown;
1957
+ customScripts?: unknown;
1958
+ vits?: Record<string, string>;
1959
+ depth_prompt?: RisuDepthPrompt;
1960
+ [key: string]: unknown;
1961
+ }
1962
+ /**
1963
+ * CharX x_meta entry (PNG chunk metadata preservation)
1964
+ */
1965
+ export interface CharxMetaEntry {
1966
+ type?: string;
1967
+ [key: string]: unknown;
1968
+ }
1969
+ /**
1970
+ * Check if card has Risu extensions
1971
+ */
1972
+ export declare function hasRisuExtensions(extensions?: Record<string, unknown>): boolean;
1973
+ /**
1974
+ * Check if card has Risu scripts (triggerscript or customScripts)
1975
+ */
1976
+ export declare function hasRisuScripts(extensions?: Record<string, unknown>): boolean;
1977
+ /**
1978
+ * Check if card has depth prompt
1979
+ * Checks both SillyTavern style (extensions.depth_prompt) and Risu style (extensions.risuai.depth_prompt)
1980
+ */
1981
+ export declare function hasDepthPrompt(extensions?: Record<string, unknown>): boolean;
1982
+ /**
1983
+ * Normalized Card Types
1984
+ *
1985
+ * Unified view of card data regardless of source format.
1986
+ * This is a computed/virtual representation, not stored.
1987
+ */
1988
+ /**
1989
+ * Normalized card representation
1990
+ * Provides unified access to card data from any format
1991
+ */
1992
+ export interface NormalizedCard {
1993
+ name: string;
1994
+ description: string;
1995
+ personality: string;
1996
+ scenario: string;
1997
+ firstMes: string;
1998
+ mesExample: string;
1999
+ systemPrompt?: string;
2000
+ postHistoryInstructions?: string;
2001
+ alternateGreetings: string[];
2002
+ groupOnlyGreetings: string[];
2003
+ tags: string[];
2004
+ creator?: string;
2005
+ creatorNotes?: string;
2006
+ characterVersion?: string;
2007
+ characterBook?: CCv3CharacterBook;
2008
+ extensions: Record<string, unknown>;
2009
+ }
2010
+ /**
2011
+ * Create empty normalized card with defaults
2012
+ */
2013
+ export declare function createEmptyNormalizedCard(): NormalizedCard;
2014
+ /**
2015
+ * Derived features extracted from card (not stored in card)
2016
+ */
2017
+ export interface DerivedFeatures {
2018
+ hasAlternateGreetings: boolean;
2019
+ alternateGreetingsCount: number;
2020
+ hasLorebook: boolean;
2021
+ lorebookEntriesCount: number;
2022
+ hasEmbeddedImages: boolean;
2023
+ embeddedImagesCount: number;
2024
+ hasGallery: boolean;
2025
+ hasRisuExtensions: boolean;
2026
+ hasRisuScripts: boolean;
2027
+ hasDepthPrompt: boolean;
2028
+ hasVoxtaAppearance: boolean;
2029
+ tokens: {
2030
+ description: number;
2031
+ personality: number;
2032
+ scenario: number;
2033
+ firstMes: number;
2034
+ mesExample: number;
2035
+ systemPrompt: number;
2036
+ total: number;
2037
+ };
2038
+ }
2039
+ /**
2040
+ * Create empty derived features
2041
+ */
2042
+ export declare function createEmptyFeatures(): DerivedFeatures;
2043
+ /**
2044
+ * Format Detection
2045
+ *
2046
+ * Detect card specification version from JSON data.
2047
+ */
2048
+ /**
2049
+ * Result from detailed spec detection
2050
+ */
2051
+ export interface SpecDetectionResult {
2052
+ /** Detected spec version */
2053
+ spec: Spec | null;
2054
+ /** Confidence level of detection */
2055
+ confidence: "high" | "medium" | "low";
2056
+ /** What fields/values indicated this spec */
2057
+ indicators: string[];
2058
+ /** Anomalies or inconsistencies detected */
2059
+ warnings: string[];
2060
+ }
2061
+ /**
2062
+ * Detect card spec version from parsed JSON
2063
+ * Returns 'v2', 'v3', or null if not recognized
2064
+ */
2065
+ export declare function detectSpec(data: unknown): Spec | null;
2066
+ /**
2067
+ * Detailed spec detection with confidence and reasoning.
2068
+ * Useful for debugging and logging.
2069
+ */
2070
+ export declare function detectSpecDetailed(data: unknown): SpecDetectionResult;
2071
+ /**
2072
+ * Check if card has a lorebook
2073
+ */
2074
+ export declare function hasLorebook(data: unknown): boolean;
2075
+ /**
2076
+ * Check if data looks like a valid card structure
2077
+ */
2078
+ export declare function looksLikeCard(data: unknown): boolean;
2079
+ /**
2080
+ * Card Normalizer
2081
+ *
2082
+ * Handles normalization of malformed card data from various sources.
2083
+ * Fixes common issues like wrong spec values, misplaced fields, missing required fields.
2084
+ */
2085
+ /**
2086
+ * CardNormalizer - handles normalization of malformed card data
2087
+ */
2088
+ export declare const CardNormalizer: {
2089
+ /**
2090
+ * Normalize card data to valid schema format.
2091
+ *
2092
+ * Handles:
2093
+ * - Fixing spec/spec_version values
2094
+ * - Moving misplaced fields to correct locations
2095
+ * - Adding missing required fields with defaults
2096
+ * - Handling hybrid formats (fields at root AND in data object)
2097
+ *
2098
+ * @param data - Raw card data (potentially malformed)
2099
+ * @param spec - Target spec version
2100
+ * @returns Normalized card data (does not mutate input)
2101
+ */
2102
+ normalize(data: unknown, spec: "v2" | "v3"): CCv2Wrapped | CCv3Data;
2103
+ /**
2104
+ * Normalize a character book (lorebook).
2105
+ *
2106
+ * Handles:
2107
+ * - Ensuring required fields exist
2108
+ * - Converting numeric position values to string enums
2109
+ * - Moving V3-only fields to extensions for V2 compatibility
2110
+ *
2111
+ * @param book - Raw character book data
2112
+ * @param spec - Target spec version
2113
+ * @returns Normalized character book
2114
+ */
2115
+ normalizeCharacterBook(book: Record<string, unknown>, spec: "v2" | "v3"): CCv2CharacterBook | CCv3CharacterBook;
2116
+ /**
2117
+ * Normalize a single lorebook entry.
2118
+ *
2119
+ * Handles:
2120
+ * - Converting numeric position to string enum
2121
+ * - Moving V3-only fields to extensions for V2
2122
+ * - Ensuring required fields exist
2123
+ *
2124
+ * @param entry - Raw entry data
2125
+ * @param spec - Target spec version
2126
+ * @returns Normalized entry
2127
+ */
2128
+ normalizeEntry(entry: Record<string, unknown>, spec: "v2" | "v3"): CCv2LorebookEntry | CCv3LorebookEntry;
2129
+ /**
2130
+ * Fix CharacterTavern timestamp format (milliseconds -> seconds).
2131
+ *
2132
+ * CCv3 spec requires timestamps in seconds (Unix epoch).
2133
+ * CharacterTavern exports timestamps in milliseconds.
2134
+ *
2135
+ * @param data - V3 card data
2136
+ * @returns Card data with fixed timestamps (does not mutate input)
2137
+ */
2138
+ fixTimestamps(data: CCv3Data): CCv3Data;
2139
+ /**
2140
+ * Internal: fix timestamps in data object
2141
+ */
2142
+ fixTimestampsInner(data: Record<string, unknown>): Record<string, unknown>;
2143
+ /**
2144
+ * Auto-detect spec and normalize.
2145
+ *
2146
+ * @param data - Raw card data
2147
+ * @returns Normalized card data, or null if not a valid card
2148
+ */
2149
+ autoNormalize(data: unknown): CCv2Wrapped | CCv3Data | null;
2150
+ };
2151
+ /**
2152
+ * Validation Utilities
2153
+ *
2154
+ * Helper functions for Zod validation with Foundry error integration.
2155
+ */
2156
+ /**
2157
+ * Convert Zod error to human-readable message
2158
+ */
2159
+ export declare function zodErrorToMessage(zodError: z.ZodError, context?: string): string;
2160
+ /**
2161
+ * Get the first error field from Zod error
2162
+ */
2163
+ export declare function getFirstErrorField(zodError: z.ZodError): string | undefined;
2164
+ /**
2165
+ * Safe parse with detailed error information
2166
+ */
2167
+ export declare function safeParse<T>(schema: z.ZodSchema<T>, data: unknown): {
2168
+ success: true;
2169
+ data: T;
2170
+ } | {
2171
+ success: false;
2172
+ error: string;
2173
+ field?: string;
2174
+ };
2175
+ export type CharacterBook = CCv3CharacterBook;
2176
+ export type LorebookEntry = CCv3LorebookEntry;
2177
+
2178
+ export {};