@character-foundry/character-foundry 0.1.3 → 0.1.6

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 +1859 -0
  3. package/dist/app-framework.cjs.map +1 -0
  4. package/dist/app-framework.d.cts +896 -0
  5. package/dist/app-framework.d.ts +896 -2
  6. package/dist/app-framework.js +1835 -1
  7. package/dist/app-framework.js.map +1 -1
  8. package/dist/charx.cjs +979 -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 +955 -1
  13. package/dist/charx.js.map +1 -1
  14. package/dist/core.cjs +755 -0
  15. package/dist/core.cjs.map +1 -0
  16. package/dist/core.d.cts +404 -0
  17. package/dist/core.d.ts +404 -2
  18. package/dist/core.js +731 -1
  19. package/dist/core.js.map +1 -1
  20. package/dist/exporter.cjs +7619 -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 +7602 -1
  25. package/dist/exporter.js.map +1 -1
  26. package/dist/federation.cjs +3916 -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 +3892 -1
  31. package/dist/federation.js.map +1 -1
  32. package/dist/index.cjs +9213 -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 +9196 -26
  37. package/dist/index.js.map +1 -1
  38. package/dist/loader.cjs +8951 -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 +8934 -1
  43. package/dist/loader.js.map +1 -1
  44. package/dist/lorebook.cjs +866 -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 +842 -1
  49. package/dist/lorebook.js.map +1 -1
  50. package/dist/media.cjs +6661 -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 +6644 -1
  55. package/dist/media.js.map +1 -1
  56. package/dist/normalizer.cjs +503 -0
  57. package/dist/normalizer.cjs.map +1 -0
  58. package/dist/normalizer.d.cts +1217 -0
  59. package/dist/normalizer.d.ts +1217 -2
  60. package/dist/normalizer.js +479 -1
  61. package/dist/normalizer.js.map +1 -1
  62. package/dist/png.cjs +797 -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 +773 -1
  67. package/dist/png.js.map +1 -1
  68. package/dist/schemas.cjs +879 -0
  69. package/dist/schemas.cjs.map +1 -0
  70. package/dist/schemas.d.cts +2208 -0
  71. package/dist/schemas.d.ts +2208 -2
  72. package/dist/schemas.js +855 -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 +7907 -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 +7890 -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
@@ -0,0 +1,1217 @@
1
+ import { z } from 'zod';
2
+
3
+ declare const CCv3CharacterBookSchema: z.ZodObject<{
4
+ name: z.ZodOptional<z.ZodString>;
5
+ description: z.ZodOptional<z.ZodString>;
6
+ scan_depth: z.ZodOptional<z.ZodNumber>;
7
+ token_budget: z.ZodOptional<z.ZodNumber>;
8
+ recursive_scanning: z.ZodOptional<z.ZodBoolean>;
9
+ extensions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
10
+ entries: z.ZodArray<z.ZodObject<{
11
+ keys: z.ZodArray<z.ZodString, "many">;
12
+ content: z.ZodString;
13
+ enabled: z.ZodBoolean;
14
+ insertion_order: z.ZodNumber;
15
+ case_sensitive: z.ZodOptional<z.ZodBoolean>;
16
+ name: z.ZodOptional<z.ZodString>;
17
+ priority: z.ZodOptional<z.ZodNumber>;
18
+ id: z.ZodOptional<z.ZodNumber>;
19
+ comment: z.ZodOptional<z.ZodString>;
20
+ selective: z.ZodOptional<z.ZodBoolean>;
21
+ secondary_keys: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
22
+ constant: z.ZodOptional<z.ZodBoolean>;
23
+ position: z.ZodOptional<z.ZodEnum<[
24
+ "before_char",
25
+ "after_char"
26
+ ]>>;
27
+ extensions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
28
+ automation_id: z.ZodOptional<z.ZodString>;
29
+ role: z.ZodOptional<z.ZodEnum<[
30
+ "system",
31
+ "user",
32
+ "assistant"
33
+ ]>>;
34
+ group: z.ZodOptional<z.ZodString>;
35
+ scan_frequency: z.ZodOptional<z.ZodNumber>;
36
+ probability: z.ZodOptional<z.ZodNumber>;
37
+ use_regex: z.ZodOptional<z.ZodBoolean>;
38
+ depth: z.ZodOptional<z.ZodNumber>;
39
+ selective_logic: z.ZodOptional<z.ZodEnum<[
40
+ "AND",
41
+ "NOT"
42
+ ]>>;
43
+ }, "strip", z.ZodTypeAny, {
44
+ keys: string[];
45
+ content: string;
46
+ enabled: boolean;
47
+ insertion_order: number;
48
+ name?: string | undefined;
49
+ extensions?: Record<string, unknown> | undefined;
50
+ case_sensitive?: boolean | undefined;
51
+ priority?: number | undefined;
52
+ id?: number | undefined;
53
+ comment?: string | undefined;
54
+ selective?: boolean | undefined;
55
+ secondary_keys?: string[] | undefined;
56
+ constant?: boolean | undefined;
57
+ position?: "before_char" | "after_char" | undefined;
58
+ automation_id?: string | undefined;
59
+ role?: "system" | "user" | "assistant" | undefined;
60
+ group?: string | undefined;
61
+ scan_frequency?: number | undefined;
62
+ probability?: number | undefined;
63
+ use_regex?: boolean | undefined;
64
+ depth?: number | undefined;
65
+ selective_logic?: "AND" | "NOT" | undefined;
66
+ }, {
67
+ keys: string[];
68
+ content: string;
69
+ enabled: boolean;
70
+ insertion_order: number;
71
+ name?: string | undefined;
72
+ extensions?: Record<string, unknown> | undefined;
73
+ case_sensitive?: boolean | undefined;
74
+ priority?: number | undefined;
75
+ id?: number | undefined;
76
+ comment?: string | undefined;
77
+ selective?: boolean | undefined;
78
+ secondary_keys?: string[] | undefined;
79
+ constant?: boolean | undefined;
80
+ position?: "before_char" | "after_char" | undefined;
81
+ automation_id?: string | undefined;
82
+ role?: "system" | "user" | "assistant" | undefined;
83
+ group?: string | undefined;
84
+ scan_frequency?: number | undefined;
85
+ probability?: number | undefined;
86
+ use_regex?: boolean | undefined;
87
+ depth?: number | undefined;
88
+ selective_logic?: "AND" | "NOT" | undefined;
89
+ }>, "many">;
90
+ }, "strip", z.ZodTypeAny, {
91
+ entries: {
92
+ keys: string[];
93
+ content: string;
94
+ enabled: boolean;
95
+ insertion_order: number;
96
+ name?: string | undefined;
97
+ extensions?: Record<string, unknown> | undefined;
98
+ case_sensitive?: boolean | undefined;
99
+ priority?: number | undefined;
100
+ id?: number | undefined;
101
+ comment?: string | undefined;
102
+ selective?: boolean | undefined;
103
+ secondary_keys?: string[] | undefined;
104
+ constant?: boolean | undefined;
105
+ position?: "before_char" | "after_char" | undefined;
106
+ automation_id?: string | undefined;
107
+ role?: "system" | "user" | "assistant" | undefined;
108
+ group?: string | undefined;
109
+ scan_frequency?: number | undefined;
110
+ probability?: number | undefined;
111
+ use_regex?: boolean | undefined;
112
+ depth?: number | undefined;
113
+ selective_logic?: "AND" | "NOT" | undefined;
114
+ }[];
115
+ name?: string | undefined;
116
+ description?: string | undefined;
117
+ scan_depth?: number | undefined;
118
+ token_budget?: number | undefined;
119
+ recursive_scanning?: boolean | undefined;
120
+ extensions?: Record<string, unknown> | undefined;
121
+ }, {
122
+ entries: {
123
+ keys: string[];
124
+ content: string;
125
+ enabled: boolean;
126
+ insertion_order: number;
127
+ name?: string | undefined;
128
+ extensions?: Record<string, unknown> | undefined;
129
+ case_sensitive?: boolean | undefined;
130
+ priority?: number | undefined;
131
+ id?: number | undefined;
132
+ comment?: string | undefined;
133
+ selective?: boolean | undefined;
134
+ secondary_keys?: string[] | undefined;
135
+ constant?: boolean | undefined;
136
+ position?: "before_char" | "after_char" | undefined;
137
+ automation_id?: string | undefined;
138
+ role?: "system" | "user" | "assistant" | undefined;
139
+ group?: string | undefined;
140
+ scan_frequency?: number | undefined;
141
+ probability?: number | undefined;
142
+ use_regex?: boolean | undefined;
143
+ depth?: number | undefined;
144
+ selective_logic?: "AND" | "NOT" | undefined;
145
+ }[];
146
+ name?: string | undefined;
147
+ description?: string | undefined;
148
+ scan_depth?: number | undefined;
149
+ token_budget?: number | undefined;
150
+ recursive_scanning?: boolean | undefined;
151
+ extensions?: Record<string, unknown> | undefined;
152
+ }>;
153
+ declare const CCv3DataSchema: z.ZodObject<{
154
+ spec: z.ZodLiteral<"chara_card_v3">;
155
+ spec_version: z.ZodLiteral<"3.0">;
156
+ data: z.ZodObject<{
157
+ name: z.ZodDefault<z.ZodString>;
158
+ description: z.ZodDefault<z.ZodString>;
159
+ personality: z.ZodDefault<z.ZodNullable<z.ZodString>>;
160
+ scenario: z.ZodDefault<z.ZodString>;
161
+ first_mes: z.ZodDefault<z.ZodString>;
162
+ mes_example: z.ZodDefault<z.ZodNullable<z.ZodString>>;
163
+ creator: z.ZodDefault<z.ZodString>;
164
+ character_version: z.ZodDefault<z.ZodString>;
165
+ tags: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
166
+ group_only_greetings: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
167
+ creator_notes: z.ZodOptional<z.ZodString>;
168
+ system_prompt: z.ZodOptional<z.ZodString>;
169
+ post_history_instructions: z.ZodOptional<z.ZodString>;
170
+ alternate_greetings: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
171
+ character_book: z.ZodNullable<z.ZodOptional<z.ZodObject<{
172
+ name: z.ZodOptional<z.ZodString>;
173
+ description: z.ZodOptional<z.ZodString>;
174
+ scan_depth: z.ZodOptional<z.ZodNumber>;
175
+ token_budget: z.ZodOptional<z.ZodNumber>;
176
+ recursive_scanning: z.ZodOptional<z.ZodBoolean>;
177
+ extensions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
178
+ entries: z.ZodArray<z.ZodObject<{
179
+ keys: z.ZodArray<z.ZodString, "many">;
180
+ content: z.ZodString;
181
+ enabled: z.ZodBoolean;
182
+ insertion_order: z.ZodNumber;
183
+ case_sensitive: z.ZodOptional<z.ZodBoolean>;
184
+ name: z.ZodOptional<z.ZodString>;
185
+ priority: z.ZodOptional<z.ZodNumber>;
186
+ id: z.ZodOptional<z.ZodNumber>;
187
+ comment: z.ZodOptional<z.ZodString>;
188
+ selective: z.ZodOptional<z.ZodBoolean>;
189
+ secondary_keys: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
190
+ constant: z.ZodOptional<z.ZodBoolean>;
191
+ position: z.ZodOptional<z.ZodEnum<[
192
+ "before_char",
193
+ "after_char"
194
+ ]>>;
195
+ extensions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
196
+ automation_id: z.ZodOptional<z.ZodString>;
197
+ role: z.ZodOptional<z.ZodEnum<[
198
+ "system",
199
+ "user",
200
+ "assistant"
201
+ ]>>;
202
+ group: z.ZodOptional<z.ZodString>;
203
+ scan_frequency: z.ZodOptional<z.ZodNumber>;
204
+ probability: z.ZodOptional<z.ZodNumber>;
205
+ use_regex: z.ZodOptional<z.ZodBoolean>;
206
+ depth: z.ZodOptional<z.ZodNumber>;
207
+ selective_logic: z.ZodOptional<z.ZodEnum<[
208
+ "AND",
209
+ "NOT"
210
+ ]>>;
211
+ }, "strip", z.ZodTypeAny, {
212
+ keys: string[];
213
+ content: string;
214
+ enabled: boolean;
215
+ insertion_order: number;
216
+ name?: string | undefined;
217
+ extensions?: Record<string, unknown> | undefined;
218
+ case_sensitive?: boolean | undefined;
219
+ priority?: number | undefined;
220
+ id?: number | undefined;
221
+ comment?: string | undefined;
222
+ selective?: boolean | undefined;
223
+ secondary_keys?: string[] | undefined;
224
+ constant?: boolean | undefined;
225
+ position?: "before_char" | "after_char" | undefined;
226
+ automation_id?: string | undefined;
227
+ role?: "system" | "user" | "assistant" | undefined;
228
+ group?: string | undefined;
229
+ scan_frequency?: number | undefined;
230
+ probability?: number | undefined;
231
+ use_regex?: boolean | undefined;
232
+ depth?: number | undefined;
233
+ selective_logic?: "AND" | "NOT" | undefined;
234
+ }, {
235
+ keys: string[];
236
+ content: string;
237
+ enabled: boolean;
238
+ insertion_order: number;
239
+ name?: string | undefined;
240
+ extensions?: Record<string, unknown> | undefined;
241
+ case_sensitive?: boolean | undefined;
242
+ priority?: number | undefined;
243
+ id?: number | undefined;
244
+ comment?: string | undefined;
245
+ selective?: boolean | undefined;
246
+ secondary_keys?: string[] | undefined;
247
+ constant?: boolean | undefined;
248
+ position?: "before_char" | "after_char" | undefined;
249
+ automation_id?: string | undefined;
250
+ role?: "system" | "user" | "assistant" | undefined;
251
+ group?: string | undefined;
252
+ scan_frequency?: number | undefined;
253
+ probability?: number | undefined;
254
+ use_regex?: boolean | undefined;
255
+ depth?: number | undefined;
256
+ selective_logic?: "AND" | "NOT" | undefined;
257
+ }>, "many">;
258
+ }, "strip", z.ZodTypeAny, {
259
+ entries: {
260
+ keys: string[];
261
+ content: string;
262
+ enabled: boolean;
263
+ insertion_order: number;
264
+ name?: string | undefined;
265
+ extensions?: Record<string, unknown> | undefined;
266
+ case_sensitive?: boolean | undefined;
267
+ priority?: number | undefined;
268
+ id?: number | undefined;
269
+ comment?: string | undefined;
270
+ selective?: boolean | undefined;
271
+ secondary_keys?: string[] | undefined;
272
+ constant?: boolean | undefined;
273
+ position?: "before_char" | "after_char" | undefined;
274
+ automation_id?: string | undefined;
275
+ role?: "system" | "user" | "assistant" | undefined;
276
+ group?: string | undefined;
277
+ scan_frequency?: number | undefined;
278
+ probability?: number | undefined;
279
+ use_regex?: boolean | undefined;
280
+ depth?: number | undefined;
281
+ selective_logic?: "AND" | "NOT" | undefined;
282
+ }[];
283
+ name?: string | undefined;
284
+ description?: string | undefined;
285
+ scan_depth?: number | undefined;
286
+ token_budget?: number | undefined;
287
+ recursive_scanning?: boolean | undefined;
288
+ extensions?: Record<string, unknown> | undefined;
289
+ }, {
290
+ entries: {
291
+ keys: string[];
292
+ content: string;
293
+ enabled: boolean;
294
+ insertion_order: number;
295
+ name?: string | undefined;
296
+ extensions?: Record<string, unknown> | undefined;
297
+ case_sensitive?: boolean | undefined;
298
+ priority?: number | undefined;
299
+ id?: number | undefined;
300
+ comment?: string | undefined;
301
+ selective?: boolean | undefined;
302
+ secondary_keys?: string[] | undefined;
303
+ constant?: boolean | undefined;
304
+ position?: "before_char" | "after_char" | undefined;
305
+ automation_id?: string | undefined;
306
+ role?: "system" | "user" | "assistant" | undefined;
307
+ group?: string | undefined;
308
+ scan_frequency?: number | undefined;
309
+ probability?: number | undefined;
310
+ use_regex?: boolean | undefined;
311
+ depth?: number | undefined;
312
+ selective_logic?: "AND" | "NOT" | undefined;
313
+ }[];
314
+ name?: string | undefined;
315
+ description?: string | undefined;
316
+ scan_depth?: number | undefined;
317
+ token_budget?: number | undefined;
318
+ recursive_scanning?: boolean | undefined;
319
+ extensions?: Record<string, unknown> | undefined;
320
+ }>>>;
321
+ extensions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
322
+ assets: z.ZodOptional<z.ZodArray<z.ZodObject<{
323
+ type: z.ZodEnum<[
324
+ "icon",
325
+ "background",
326
+ "emotion",
327
+ "user_icon",
328
+ "sound",
329
+ "video",
330
+ "custom",
331
+ "x-risu-asset"
332
+ ]>;
333
+ uri: z.ZodString;
334
+ name: z.ZodString;
335
+ ext: z.ZodString;
336
+ }, "strip", z.ZodTypeAny, {
337
+ name: string;
338
+ type: "custom" | "icon" | "background" | "emotion" | "user_icon" | "sound" | "video" | "x-risu-asset";
339
+ uri: string;
340
+ ext: string;
341
+ }, {
342
+ name: string;
343
+ type: "custom" | "icon" | "background" | "emotion" | "user_icon" | "sound" | "video" | "x-risu-asset";
344
+ uri: string;
345
+ ext: string;
346
+ }>, "many">>;
347
+ nickname: z.ZodOptional<z.ZodString>;
348
+ creator_notes_multilingual: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
349
+ source: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
350
+ creation_date: z.ZodOptional<z.ZodNumber>;
351
+ modification_date: z.ZodOptional<z.ZodNumber>;
352
+ }, "strip", z.ZodTypeAny, {
353
+ name: string;
354
+ description: string;
355
+ personality: string | null;
356
+ scenario: string;
357
+ first_mes: string;
358
+ mes_example: string | null;
359
+ tags: string[];
360
+ creator: string;
361
+ character_version: string;
362
+ group_only_greetings: string[];
363
+ extensions?: Record<string, unknown> | undefined;
364
+ creator_notes?: string | undefined;
365
+ system_prompt?: string | undefined;
366
+ post_history_instructions?: string | undefined;
367
+ alternate_greetings?: string[] | undefined;
368
+ character_book?: {
369
+ entries: {
370
+ keys: string[];
371
+ content: string;
372
+ enabled: boolean;
373
+ insertion_order: number;
374
+ name?: string | undefined;
375
+ extensions?: Record<string, unknown> | undefined;
376
+ case_sensitive?: boolean | undefined;
377
+ priority?: number | undefined;
378
+ id?: number | undefined;
379
+ comment?: string | undefined;
380
+ selective?: boolean | undefined;
381
+ secondary_keys?: string[] | undefined;
382
+ constant?: boolean | undefined;
383
+ position?: "before_char" | "after_char" | undefined;
384
+ automation_id?: string | undefined;
385
+ role?: "system" | "user" | "assistant" | undefined;
386
+ group?: string | undefined;
387
+ scan_frequency?: number | undefined;
388
+ probability?: number | undefined;
389
+ use_regex?: boolean | undefined;
390
+ depth?: number | undefined;
391
+ selective_logic?: "AND" | "NOT" | undefined;
392
+ }[];
393
+ name?: string | undefined;
394
+ description?: string | undefined;
395
+ scan_depth?: number | undefined;
396
+ token_budget?: number | undefined;
397
+ recursive_scanning?: boolean | undefined;
398
+ extensions?: Record<string, unknown> | undefined;
399
+ } | null | undefined;
400
+ assets?: {
401
+ name: string;
402
+ type: "custom" | "icon" | "background" | "emotion" | "user_icon" | "sound" | "video" | "x-risu-asset";
403
+ uri: string;
404
+ ext: string;
405
+ }[] | undefined;
406
+ nickname?: string | undefined;
407
+ creator_notes_multilingual?: Record<string, string> | undefined;
408
+ source?: string[] | undefined;
409
+ creation_date?: number | undefined;
410
+ modification_date?: number | undefined;
411
+ }, {
412
+ name?: string | undefined;
413
+ description?: string | undefined;
414
+ extensions?: Record<string, unknown> | undefined;
415
+ personality?: string | null | undefined;
416
+ scenario?: string | undefined;
417
+ first_mes?: string | undefined;
418
+ mes_example?: string | null | undefined;
419
+ creator_notes?: string | undefined;
420
+ system_prompt?: string | undefined;
421
+ post_history_instructions?: string | undefined;
422
+ alternate_greetings?: string[] | undefined;
423
+ character_book?: {
424
+ entries: {
425
+ keys: string[];
426
+ content: string;
427
+ enabled: boolean;
428
+ insertion_order: number;
429
+ name?: string | undefined;
430
+ extensions?: Record<string, unknown> | undefined;
431
+ case_sensitive?: boolean | undefined;
432
+ priority?: number | undefined;
433
+ id?: number | undefined;
434
+ comment?: string | undefined;
435
+ selective?: boolean | undefined;
436
+ secondary_keys?: string[] | undefined;
437
+ constant?: boolean | undefined;
438
+ position?: "before_char" | "after_char" | undefined;
439
+ automation_id?: string | undefined;
440
+ role?: "system" | "user" | "assistant" | undefined;
441
+ group?: string | undefined;
442
+ scan_frequency?: number | undefined;
443
+ probability?: number | undefined;
444
+ use_regex?: boolean | undefined;
445
+ depth?: number | undefined;
446
+ selective_logic?: "AND" | "NOT" | undefined;
447
+ }[];
448
+ name?: string | undefined;
449
+ description?: string | undefined;
450
+ scan_depth?: number | undefined;
451
+ token_budget?: number | undefined;
452
+ recursive_scanning?: boolean | undefined;
453
+ extensions?: Record<string, unknown> | undefined;
454
+ } | null | undefined;
455
+ tags?: string[] | undefined;
456
+ creator?: string | undefined;
457
+ character_version?: string | undefined;
458
+ group_only_greetings?: string[] | undefined;
459
+ assets?: {
460
+ name: string;
461
+ type: "custom" | "icon" | "background" | "emotion" | "user_icon" | "sound" | "video" | "x-risu-asset";
462
+ uri: string;
463
+ ext: string;
464
+ }[] | undefined;
465
+ nickname?: string | undefined;
466
+ creator_notes_multilingual?: Record<string, string> | undefined;
467
+ source?: string[] | undefined;
468
+ creation_date?: number | undefined;
469
+ modification_date?: number | undefined;
470
+ }>;
471
+ }, "strip", z.ZodTypeAny, {
472
+ data: {
473
+ name: string;
474
+ description: string;
475
+ personality: string | null;
476
+ scenario: string;
477
+ first_mes: string;
478
+ mes_example: string | null;
479
+ tags: string[];
480
+ creator: string;
481
+ character_version: string;
482
+ group_only_greetings: string[];
483
+ extensions?: Record<string, unknown> | undefined;
484
+ creator_notes?: string | undefined;
485
+ system_prompt?: string | undefined;
486
+ post_history_instructions?: string | undefined;
487
+ alternate_greetings?: string[] | undefined;
488
+ character_book?: {
489
+ entries: {
490
+ keys: string[];
491
+ content: string;
492
+ enabled: boolean;
493
+ insertion_order: number;
494
+ name?: string | undefined;
495
+ extensions?: Record<string, unknown> | undefined;
496
+ case_sensitive?: boolean | undefined;
497
+ priority?: number | undefined;
498
+ id?: number | undefined;
499
+ comment?: string | undefined;
500
+ selective?: boolean | undefined;
501
+ secondary_keys?: string[] | undefined;
502
+ constant?: boolean | undefined;
503
+ position?: "before_char" | "after_char" | undefined;
504
+ automation_id?: string | undefined;
505
+ role?: "system" | "user" | "assistant" | undefined;
506
+ group?: string | undefined;
507
+ scan_frequency?: number | undefined;
508
+ probability?: number | undefined;
509
+ use_regex?: boolean | undefined;
510
+ depth?: number | undefined;
511
+ selective_logic?: "AND" | "NOT" | undefined;
512
+ }[];
513
+ name?: string | undefined;
514
+ description?: string | undefined;
515
+ scan_depth?: number | undefined;
516
+ token_budget?: number | undefined;
517
+ recursive_scanning?: boolean | undefined;
518
+ extensions?: Record<string, unknown> | undefined;
519
+ } | null | undefined;
520
+ assets?: {
521
+ name: string;
522
+ type: "custom" | "icon" | "background" | "emotion" | "user_icon" | "sound" | "video" | "x-risu-asset";
523
+ uri: string;
524
+ ext: string;
525
+ }[] | undefined;
526
+ nickname?: string | undefined;
527
+ creator_notes_multilingual?: Record<string, string> | undefined;
528
+ source?: string[] | undefined;
529
+ creation_date?: number | undefined;
530
+ modification_date?: number | undefined;
531
+ };
532
+ spec: "chara_card_v3";
533
+ spec_version: "3.0";
534
+ }, {
535
+ data: {
536
+ name?: string | undefined;
537
+ description?: string | undefined;
538
+ extensions?: Record<string, unknown> | undefined;
539
+ personality?: string | null | undefined;
540
+ scenario?: string | undefined;
541
+ first_mes?: string | undefined;
542
+ mes_example?: string | null | undefined;
543
+ creator_notes?: string | undefined;
544
+ system_prompt?: string | undefined;
545
+ post_history_instructions?: string | undefined;
546
+ alternate_greetings?: string[] | undefined;
547
+ character_book?: {
548
+ entries: {
549
+ keys: string[];
550
+ content: string;
551
+ enabled: boolean;
552
+ insertion_order: number;
553
+ name?: string | undefined;
554
+ extensions?: Record<string, unknown> | undefined;
555
+ case_sensitive?: boolean | undefined;
556
+ priority?: number | undefined;
557
+ id?: number | undefined;
558
+ comment?: string | undefined;
559
+ selective?: boolean | undefined;
560
+ secondary_keys?: string[] | undefined;
561
+ constant?: boolean | undefined;
562
+ position?: "before_char" | "after_char" | undefined;
563
+ automation_id?: string | undefined;
564
+ role?: "system" | "user" | "assistant" | undefined;
565
+ group?: string | undefined;
566
+ scan_frequency?: number | undefined;
567
+ probability?: number | undefined;
568
+ use_regex?: boolean | undefined;
569
+ depth?: number | undefined;
570
+ selective_logic?: "AND" | "NOT" | undefined;
571
+ }[];
572
+ name?: string | undefined;
573
+ description?: string | undefined;
574
+ scan_depth?: number | undefined;
575
+ token_budget?: number | undefined;
576
+ recursive_scanning?: boolean | undefined;
577
+ extensions?: Record<string, unknown> | undefined;
578
+ } | null | undefined;
579
+ tags?: string[] | undefined;
580
+ creator?: string | undefined;
581
+ character_version?: string | undefined;
582
+ group_only_greetings?: string[] | undefined;
583
+ assets?: {
584
+ name: string;
585
+ type: "custom" | "icon" | "background" | "emotion" | "user_icon" | "sound" | "video" | "x-risu-asset";
586
+ uri: string;
587
+ ext: string;
588
+ }[] | undefined;
589
+ nickname?: string | undefined;
590
+ creator_notes_multilingual?: Record<string, string> | undefined;
591
+ source?: string[] | undefined;
592
+ creation_date?: number | undefined;
593
+ modification_date?: number | undefined;
594
+ };
595
+ spec: "chara_card_v3";
596
+ spec_version: "3.0";
597
+ }>;
598
+ /**
599
+ * Character book (lorebook) for v3 cards
600
+ */
601
+ export type CCv3CharacterBook = z.infer<typeof CCv3CharacterBookSchema>;
602
+ /**
603
+ * Character Card v3 full structure
604
+ */
605
+ export type CCv3Data = z.infer<typeof CCv3DataSchema>;
606
+ declare const CCv2DataSchema: z.ZodObject<{
607
+ name: z.ZodDefault<z.ZodString>;
608
+ description: z.ZodDefault<z.ZodString>;
609
+ personality: z.ZodDefault<z.ZodNullable<z.ZodString>>;
610
+ scenario: z.ZodDefault<z.ZodString>;
611
+ first_mes: z.ZodDefault<z.ZodString>;
612
+ mes_example: z.ZodDefault<z.ZodNullable<z.ZodString>>;
613
+ creator_notes: z.ZodOptional<z.ZodString>;
614
+ system_prompt: z.ZodOptional<z.ZodString>;
615
+ post_history_instructions: z.ZodOptional<z.ZodString>;
616
+ alternate_greetings: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
617
+ character_book: z.ZodNullable<z.ZodOptional<z.ZodObject<{
618
+ name: z.ZodOptional<z.ZodString>;
619
+ description: z.ZodOptional<z.ZodString>;
620
+ scan_depth: z.ZodOptional<z.ZodNumber>;
621
+ token_budget: z.ZodOptional<z.ZodNumber>;
622
+ recursive_scanning: z.ZodOptional<z.ZodBoolean>;
623
+ extensions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
624
+ entries: z.ZodArray<z.ZodObject<{
625
+ keys: z.ZodArray<z.ZodString, "many">;
626
+ content: z.ZodString;
627
+ enabled: z.ZodBoolean;
628
+ insertion_order: z.ZodNumber;
629
+ extensions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
630
+ case_sensitive: z.ZodOptional<z.ZodBoolean>;
631
+ name: z.ZodOptional<z.ZodString>;
632
+ priority: z.ZodOptional<z.ZodNumber>;
633
+ id: z.ZodOptional<z.ZodNumber>;
634
+ comment: z.ZodOptional<z.ZodString>;
635
+ selective: z.ZodOptional<z.ZodBoolean>;
636
+ secondary_keys: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
637
+ constant: z.ZodOptional<z.ZodBoolean>;
638
+ position: z.ZodOptional<z.ZodEnum<[
639
+ "before_char",
640
+ "after_char"
641
+ ]>>;
642
+ }, "strip", z.ZodTypeAny, {
643
+ keys: string[];
644
+ content: string;
645
+ enabled: boolean;
646
+ insertion_order: number;
647
+ name?: string | undefined;
648
+ extensions?: Record<string, unknown> | undefined;
649
+ case_sensitive?: boolean | undefined;
650
+ priority?: number | undefined;
651
+ id?: number | undefined;
652
+ comment?: string | undefined;
653
+ selective?: boolean | undefined;
654
+ secondary_keys?: string[] | undefined;
655
+ constant?: boolean | undefined;
656
+ position?: "before_char" | "after_char" | undefined;
657
+ }, {
658
+ keys: string[];
659
+ content: string;
660
+ enabled: boolean;
661
+ insertion_order: number;
662
+ name?: string | undefined;
663
+ extensions?: Record<string, unknown> | undefined;
664
+ case_sensitive?: boolean | undefined;
665
+ priority?: number | undefined;
666
+ id?: number | undefined;
667
+ comment?: string | undefined;
668
+ selective?: boolean | undefined;
669
+ secondary_keys?: string[] | undefined;
670
+ constant?: boolean | undefined;
671
+ position?: "before_char" | "after_char" | undefined;
672
+ }>, "many">;
673
+ }, "strip", z.ZodTypeAny, {
674
+ entries: {
675
+ keys: string[];
676
+ content: string;
677
+ enabled: boolean;
678
+ insertion_order: number;
679
+ name?: string | undefined;
680
+ extensions?: Record<string, unknown> | undefined;
681
+ case_sensitive?: boolean | undefined;
682
+ priority?: number | undefined;
683
+ id?: number | undefined;
684
+ comment?: string | undefined;
685
+ selective?: boolean | undefined;
686
+ secondary_keys?: string[] | undefined;
687
+ constant?: boolean | undefined;
688
+ position?: "before_char" | "after_char" | undefined;
689
+ }[];
690
+ name?: string | undefined;
691
+ description?: string | undefined;
692
+ scan_depth?: number | undefined;
693
+ token_budget?: number | undefined;
694
+ recursive_scanning?: boolean | undefined;
695
+ extensions?: Record<string, unknown> | undefined;
696
+ }, {
697
+ entries: {
698
+ keys: string[];
699
+ content: string;
700
+ enabled: boolean;
701
+ insertion_order: number;
702
+ name?: string | undefined;
703
+ extensions?: Record<string, unknown> | undefined;
704
+ case_sensitive?: boolean | undefined;
705
+ priority?: number | undefined;
706
+ id?: number | undefined;
707
+ comment?: string | undefined;
708
+ selective?: boolean | undefined;
709
+ secondary_keys?: string[] | undefined;
710
+ constant?: boolean | undefined;
711
+ position?: "before_char" | "after_char" | undefined;
712
+ }[];
713
+ name?: string | undefined;
714
+ description?: string | undefined;
715
+ scan_depth?: number | undefined;
716
+ token_budget?: number | undefined;
717
+ recursive_scanning?: boolean | undefined;
718
+ extensions?: Record<string, unknown> | undefined;
719
+ }>>>;
720
+ tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
721
+ creator: z.ZodOptional<z.ZodString>;
722
+ character_version: z.ZodOptional<z.ZodString>;
723
+ extensions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
724
+ }, "strip", z.ZodTypeAny, {
725
+ name: string;
726
+ description: string;
727
+ personality: string | null;
728
+ scenario: string;
729
+ first_mes: string;
730
+ mes_example: string | null;
731
+ extensions?: Record<string, unknown> | undefined;
732
+ creator_notes?: string | undefined;
733
+ system_prompt?: string | undefined;
734
+ post_history_instructions?: string | undefined;
735
+ alternate_greetings?: string[] | undefined;
736
+ character_book?: {
737
+ entries: {
738
+ keys: string[];
739
+ content: string;
740
+ enabled: boolean;
741
+ insertion_order: number;
742
+ name?: string | undefined;
743
+ extensions?: Record<string, unknown> | undefined;
744
+ case_sensitive?: boolean | undefined;
745
+ priority?: number | undefined;
746
+ id?: number | undefined;
747
+ comment?: string | undefined;
748
+ selective?: boolean | undefined;
749
+ secondary_keys?: string[] | undefined;
750
+ constant?: boolean | undefined;
751
+ position?: "before_char" | "after_char" | undefined;
752
+ }[];
753
+ name?: string | undefined;
754
+ description?: string | undefined;
755
+ scan_depth?: number | undefined;
756
+ token_budget?: number | undefined;
757
+ recursive_scanning?: boolean | undefined;
758
+ extensions?: Record<string, unknown> | undefined;
759
+ } | null | undefined;
760
+ tags?: string[] | undefined;
761
+ creator?: string | undefined;
762
+ character_version?: string | undefined;
763
+ }, {
764
+ name?: string | undefined;
765
+ description?: string | undefined;
766
+ extensions?: Record<string, unknown> | undefined;
767
+ personality?: string | null | undefined;
768
+ scenario?: string | undefined;
769
+ first_mes?: string | undefined;
770
+ mes_example?: string | null | undefined;
771
+ creator_notes?: string | undefined;
772
+ system_prompt?: string | undefined;
773
+ post_history_instructions?: string | undefined;
774
+ alternate_greetings?: string[] | undefined;
775
+ character_book?: {
776
+ entries: {
777
+ keys: string[];
778
+ content: string;
779
+ enabled: boolean;
780
+ insertion_order: number;
781
+ name?: string | undefined;
782
+ extensions?: Record<string, unknown> | undefined;
783
+ case_sensitive?: boolean | undefined;
784
+ priority?: number | undefined;
785
+ id?: number | undefined;
786
+ comment?: string | undefined;
787
+ selective?: boolean | undefined;
788
+ secondary_keys?: string[] | undefined;
789
+ constant?: boolean | undefined;
790
+ position?: "before_char" | "after_char" | undefined;
791
+ }[];
792
+ name?: string | undefined;
793
+ description?: string | undefined;
794
+ scan_depth?: number | undefined;
795
+ token_budget?: number | undefined;
796
+ recursive_scanning?: boolean | undefined;
797
+ extensions?: Record<string, unknown> | undefined;
798
+ } | null | undefined;
799
+ tags?: string[] | undefined;
800
+ creator?: string | undefined;
801
+ character_version?: string | undefined;
802
+ }>;
803
+ declare const CCv2WrappedSchema: z.ZodObject<{
804
+ spec: z.ZodLiteral<"chara_card_v2">;
805
+ spec_version: z.ZodLiteral<"2.0">;
806
+ data: z.ZodObject<{
807
+ name: z.ZodDefault<z.ZodString>;
808
+ description: z.ZodDefault<z.ZodString>;
809
+ personality: z.ZodDefault<z.ZodNullable<z.ZodString>>;
810
+ scenario: z.ZodDefault<z.ZodString>;
811
+ first_mes: z.ZodDefault<z.ZodString>;
812
+ mes_example: z.ZodDefault<z.ZodNullable<z.ZodString>>;
813
+ creator_notes: z.ZodOptional<z.ZodString>;
814
+ system_prompt: z.ZodOptional<z.ZodString>;
815
+ post_history_instructions: z.ZodOptional<z.ZodString>;
816
+ alternate_greetings: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
817
+ character_book: z.ZodNullable<z.ZodOptional<z.ZodObject<{
818
+ name: z.ZodOptional<z.ZodString>;
819
+ description: z.ZodOptional<z.ZodString>;
820
+ scan_depth: z.ZodOptional<z.ZodNumber>;
821
+ token_budget: z.ZodOptional<z.ZodNumber>;
822
+ recursive_scanning: z.ZodOptional<z.ZodBoolean>;
823
+ extensions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
824
+ entries: z.ZodArray<z.ZodObject<{
825
+ keys: z.ZodArray<z.ZodString, "many">;
826
+ content: z.ZodString;
827
+ enabled: z.ZodBoolean;
828
+ insertion_order: z.ZodNumber;
829
+ extensions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
830
+ case_sensitive: z.ZodOptional<z.ZodBoolean>;
831
+ name: z.ZodOptional<z.ZodString>;
832
+ priority: z.ZodOptional<z.ZodNumber>;
833
+ id: z.ZodOptional<z.ZodNumber>;
834
+ comment: z.ZodOptional<z.ZodString>;
835
+ selective: z.ZodOptional<z.ZodBoolean>;
836
+ secondary_keys: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
837
+ constant: z.ZodOptional<z.ZodBoolean>;
838
+ position: z.ZodOptional<z.ZodEnum<[
839
+ "before_char",
840
+ "after_char"
841
+ ]>>;
842
+ }, "strip", z.ZodTypeAny, {
843
+ keys: string[];
844
+ content: string;
845
+ enabled: boolean;
846
+ insertion_order: number;
847
+ name?: string | undefined;
848
+ extensions?: Record<string, unknown> | undefined;
849
+ case_sensitive?: boolean | undefined;
850
+ priority?: number | undefined;
851
+ id?: number | undefined;
852
+ comment?: string | undefined;
853
+ selective?: boolean | undefined;
854
+ secondary_keys?: string[] | undefined;
855
+ constant?: boolean | undefined;
856
+ position?: "before_char" | "after_char" | undefined;
857
+ }, {
858
+ keys: string[];
859
+ content: string;
860
+ enabled: boolean;
861
+ insertion_order: number;
862
+ name?: string | undefined;
863
+ extensions?: Record<string, unknown> | undefined;
864
+ case_sensitive?: boolean | undefined;
865
+ priority?: number | undefined;
866
+ id?: number | undefined;
867
+ comment?: string | undefined;
868
+ selective?: boolean | undefined;
869
+ secondary_keys?: string[] | undefined;
870
+ constant?: boolean | undefined;
871
+ position?: "before_char" | "after_char" | undefined;
872
+ }>, "many">;
873
+ }, "strip", z.ZodTypeAny, {
874
+ entries: {
875
+ keys: string[];
876
+ content: string;
877
+ enabled: boolean;
878
+ insertion_order: number;
879
+ name?: string | undefined;
880
+ extensions?: Record<string, unknown> | undefined;
881
+ case_sensitive?: boolean | undefined;
882
+ priority?: number | undefined;
883
+ id?: number | undefined;
884
+ comment?: string | undefined;
885
+ selective?: boolean | undefined;
886
+ secondary_keys?: string[] | undefined;
887
+ constant?: boolean | undefined;
888
+ position?: "before_char" | "after_char" | undefined;
889
+ }[];
890
+ name?: string | undefined;
891
+ description?: string | undefined;
892
+ scan_depth?: number | undefined;
893
+ token_budget?: number | undefined;
894
+ recursive_scanning?: boolean | undefined;
895
+ extensions?: Record<string, unknown> | undefined;
896
+ }, {
897
+ entries: {
898
+ keys: string[];
899
+ content: string;
900
+ enabled: boolean;
901
+ insertion_order: number;
902
+ name?: string | undefined;
903
+ extensions?: Record<string, unknown> | undefined;
904
+ case_sensitive?: boolean | undefined;
905
+ priority?: number | undefined;
906
+ id?: number | undefined;
907
+ comment?: string | undefined;
908
+ selective?: boolean | undefined;
909
+ secondary_keys?: string[] | undefined;
910
+ constant?: boolean | undefined;
911
+ position?: "before_char" | "after_char" | undefined;
912
+ }[];
913
+ name?: string | undefined;
914
+ description?: string | undefined;
915
+ scan_depth?: number | undefined;
916
+ token_budget?: number | undefined;
917
+ recursive_scanning?: boolean | undefined;
918
+ extensions?: Record<string, unknown> | undefined;
919
+ }>>>;
920
+ tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
921
+ creator: z.ZodOptional<z.ZodString>;
922
+ character_version: z.ZodOptional<z.ZodString>;
923
+ extensions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
924
+ }, "strip", z.ZodTypeAny, {
925
+ name: string;
926
+ description: string;
927
+ personality: string | null;
928
+ scenario: string;
929
+ first_mes: string;
930
+ mes_example: string | null;
931
+ extensions?: Record<string, unknown> | undefined;
932
+ creator_notes?: string | undefined;
933
+ system_prompt?: string | undefined;
934
+ post_history_instructions?: string | undefined;
935
+ alternate_greetings?: string[] | undefined;
936
+ character_book?: {
937
+ entries: {
938
+ keys: string[];
939
+ content: string;
940
+ enabled: boolean;
941
+ insertion_order: number;
942
+ name?: string | undefined;
943
+ extensions?: Record<string, unknown> | undefined;
944
+ case_sensitive?: boolean | undefined;
945
+ priority?: number | undefined;
946
+ id?: number | undefined;
947
+ comment?: string | undefined;
948
+ selective?: boolean | undefined;
949
+ secondary_keys?: string[] | undefined;
950
+ constant?: boolean | undefined;
951
+ position?: "before_char" | "after_char" | undefined;
952
+ }[];
953
+ name?: string | undefined;
954
+ description?: string | undefined;
955
+ scan_depth?: number | undefined;
956
+ token_budget?: number | undefined;
957
+ recursive_scanning?: boolean | undefined;
958
+ extensions?: Record<string, unknown> | undefined;
959
+ } | null | undefined;
960
+ tags?: string[] | undefined;
961
+ creator?: string | undefined;
962
+ character_version?: string | undefined;
963
+ }, {
964
+ name?: string | undefined;
965
+ description?: string | undefined;
966
+ extensions?: Record<string, unknown> | undefined;
967
+ personality?: string | null | undefined;
968
+ scenario?: string | undefined;
969
+ first_mes?: string | undefined;
970
+ mes_example?: string | null | undefined;
971
+ creator_notes?: string | undefined;
972
+ system_prompt?: string | undefined;
973
+ post_history_instructions?: string | undefined;
974
+ alternate_greetings?: string[] | undefined;
975
+ character_book?: {
976
+ entries: {
977
+ keys: string[];
978
+ content: string;
979
+ enabled: boolean;
980
+ insertion_order: number;
981
+ name?: string | undefined;
982
+ extensions?: Record<string, unknown> | undefined;
983
+ case_sensitive?: boolean | undefined;
984
+ priority?: number | undefined;
985
+ id?: number | undefined;
986
+ comment?: string | undefined;
987
+ selective?: boolean | undefined;
988
+ secondary_keys?: string[] | undefined;
989
+ constant?: boolean | undefined;
990
+ position?: "before_char" | "after_char" | undefined;
991
+ }[];
992
+ name?: string | undefined;
993
+ description?: string | undefined;
994
+ scan_depth?: number | undefined;
995
+ token_budget?: number | undefined;
996
+ recursive_scanning?: boolean | undefined;
997
+ extensions?: Record<string, unknown> | undefined;
998
+ } | null | undefined;
999
+ tags?: string[] | undefined;
1000
+ creator?: string | undefined;
1001
+ character_version?: string | undefined;
1002
+ }>;
1003
+ }, "strip", z.ZodTypeAny, {
1004
+ data: {
1005
+ name: string;
1006
+ description: string;
1007
+ personality: string | null;
1008
+ scenario: string;
1009
+ first_mes: string;
1010
+ mes_example: string | null;
1011
+ extensions?: Record<string, unknown> | undefined;
1012
+ creator_notes?: string | undefined;
1013
+ system_prompt?: string | undefined;
1014
+ post_history_instructions?: string | undefined;
1015
+ alternate_greetings?: string[] | undefined;
1016
+ character_book?: {
1017
+ entries: {
1018
+ keys: string[];
1019
+ content: string;
1020
+ enabled: boolean;
1021
+ insertion_order: number;
1022
+ name?: string | undefined;
1023
+ extensions?: Record<string, unknown> | undefined;
1024
+ case_sensitive?: boolean | undefined;
1025
+ priority?: number | undefined;
1026
+ id?: number | undefined;
1027
+ comment?: string | undefined;
1028
+ selective?: boolean | undefined;
1029
+ secondary_keys?: string[] | undefined;
1030
+ constant?: boolean | undefined;
1031
+ position?: "before_char" | "after_char" | undefined;
1032
+ }[];
1033
+ name?: string | undefined;
1034
+ description?: string | undefined;
1035
+ scan_depth?: number | undefined;
1036
+ token_budget?: number | undefined;
1037
+ recursive_scanning?: boolean | undefined;
1038
+ extensions?: Record<string, unknown> | undefined;
1039
+ } | null | undefined;
1040
+ tags?: string[] | undefined;
1041
+ creator?: string | undefined;
1042
+ character_version?: string | undefined;
1043
+ };
1044
+ spec: "chara_card_v2";
1045
+ spec_version: "2.0";
1046
+ }, {
1047
+ data: {
1048
+ name?: string | undefined;
1049
+ description?: string | undefined;
1050
+ extensions?: Record<string, unknown> | undefined;
1051
+ personality?: string | null | undefined;
1052
+ scenario?: string | undefined;
1053
+ first_mes?: string | undefined;
1054
+ mes_example?: string | null | undefined;
1055
+ creator_notes?: string | undefined;
1056
+ system_prompt?: string | undefined;
1057
+ post_history_instructions?: string | undefined;
1058
+ alternate_greetings?: string[] | undefined;
1059
+ character_book?: {
1060
+ entries: {
1061
+ keys: string[];
1062
+ content: string;
1063
+ enabled: boolean;
1064
+ insertion_order: number;
1065
+ name?: string | undefined;
1066
+ extensions?: Record<string, unknown> | undefined;
1067
+ case_sensitive?: boolean | undefined;
1068
+ priority?: number | undefined;
1069
+ id?: number | undefined;
1070
+ comment?: string | undefined;
1071
+ selective?: boolean | undefined;
1072
+ secondary_keys?: string[] | undefined;
1073
+ constant?: boolean | undefined;
1074
+ position?: "before_char" | "after_char" | undefined;
1075
+ }[];
1076
+ name?: string | undefined;
1077
+ description?: string | undefined;
1078
+ scan_depth?: number | undefined;
1079
+ token_budget?: number | undefined;
1080
+ recursive_scanning?: boolean | undefined;
1081
+ extensions?: Record<string, unknown> | undefined;
1082
+ } | null | undefined;
1083
+ tags?: string[] | undefined;
1084
+ creator?: string | undefined;
1085
+ character_version?: string | undefined;
1086
+ };
1087
+ spec: "chara_card_v2";
1088
+ spec_version: "2.0";
1089
+ }>;
1090
+ /**
1091
+ * Character Card v2 data structure
1092
+ */
1093
+ export type CCv2Data = z.infer<typeof CCv2DataSchema>;
1094
+ /**
1095
+ * Wrapped v2 card format (modern tools)
1096
+ */
1097
+ export type CCv2Wrapped = z.infer<typeof CCv2WrappedSchema>;
1098
+ /**
1099
+ * Normalized Card Types
1100
+ *
1101
+ * Unified view of card data regardless of source format.
1102
+ * This is a computed/virtual representation, not stored.
1103
+ */
1104
+ /**
1105
+ * Normalized card representation
1106
+ * Provides unified access to card data from any format
1107
+ */
1108
+ export interface NormalizedCard {
1109
+ name: string;
1110
+ description: string;
1111
+ personality: string;
1112
+ scenario: string;
1113
+ firstMes: string;
1114
+ mesExample: string;
1115
+ systemPrompt?: string;
1116
+ postHistoryInstructions?: string;
1117
+ alternateGreetings: string[];
1118
+ groupOnlyGreetings: string[];
1119
+ tags: string[];
1120
+ creator?: string;
1121
+ creatorNotes?: string;
1122
+ characterVersion?: string;
1123
+ characterBook?: CCv3CharacterBook;
1124
+ extensions: Record<string, unknown>;
1125
+ }
1126
+ /**
1127
+ * CCv2 to CCv3 Converter
1128
+ *
1129
+ * Converts CCv2 card data to CCv3 format.
1130
+ * Handles malformed cards gracefully by defaulting missing fields.
1131
+ */
1132
+ /**
1133
+ * Convert CCv2 card to CCv3 format.
1134
+ *
1135
+ * Philosophy: Be lenient on input - never completely drop data due to missing fields.
1136
+ * Defaults are applied for any missing required fields to ensure valid output.
1137
+ * Pure 1:1 field mapping - no extraction, no magic.
1138
+ *
1139
+ * @param input - CCv2 card data (wrapped or unwrapped, potentially malformed)
1140
+ * @returns CCv3 card data with all required fields populated
1141
+ */
1142
+ export declare function ccv2ToCCv3(input: CCv2Data | CCv2Wrapped): CCv3Data;
1143
+ /**
1144
+ * CCv3 to CCv2 Converter
1145
+ *
1146
+ * Converts CCv3 card data to CCv2 format.
1147
+ * Note: Some v3 features will be lost (group_only_greetings, etc.)
1148
+ */
1149
+ /**
1150
+ * Fields lost when converting v3 to v2
1151
+ */
1152
+ export declare const V3_TO_V2_LOST_FIELDS: string[];
1153
+ /**
1154
+ * Convert CCv3 card to CCv2 unwrapped format
1155
+ *
1156
+ * @param card - CCv3 card data
1157
+ * @returns CCv2 unwrapped card data
1158
+ */
1159
+ export declare function ccv3ToCCv2Data(card: CCv3Data): CCv2Data;
1160
+ /**
1161
+ * Convert CCv3 card to CCv2 wrapped format
1162
+ *
1163
+ * @param card - CCv3 card data
1164
+ * @returns CCv2 wrapped card data
1165
+ */
1166
+ export declare function ccv3ToCCv2Wrapped(card: CCv3Data): CCv2Wrapped;
1167
+ /**
1168
+ * Check what would be lost converting v3 to v2
1169
+ */
1170
+ export declare function checkV3ToV2Loss(card: CCv3Data): string[];
1171
+ /**
1172
+ * To NormalizedCard Converter
1173
+ *
1174
+ * Converts any card format to NormalizedCard.
1175
+ */
1176
+ /**
1177
+ * Normalize CCv2 data to NormalizedCard
1178
+ */
1179
+ export declare function normalizeV2(input: CCv2Data | CCv2Wrapped): NormalizedCard;
1180
+ /**
1181
+ * Normalize CCv3 data to NormalizedCard
1182
+ */
1183
+ export declare function normalizeV3(card: CCv3Data): NormalizedCard;
1184
+ /**
1185
+ * Normalize any card format to NormalizedCard
1186
+ *
1187
+ * @param input - Card data in any supported format
1188
+ * @returns NormalizedCard
1189
+ */
1190
+ export declare function normalize(input: CCv2Data | CCv2Wrapped | CCv3Data): NormalizedCard;
1191
+ /**
1192
+ * From NormalizedCard Converter
1193
+ *
1194
+ * Converts NormalizedCard to other formats.
1195
+ */
1196
+ /**
1197
+ * Convert NormalizedCard to CCv3
1198
+ */
1199
+ export declare function denormalizeToV3(card: NormalizedCard): CCv3Data;
1200
+ /**
1201
+ * Convert NormalizedCard to CCv2 unwrapped
1202
+ *
1203
+ * Note: group_only_greetings will be lost
1204
+ */
1205
+ export declare function denormalizeToV2Data(card: NormalizedCard): CCv2Data;
1206
+ /**
1207
+ * Convert NormalizedCard to CCv2 wrapped
1208
+ *
1209
+ * Note: group_only_greetings will be lost
1210
+ */
1211
+ export declare function denormalizeToV2Wrapped(card: NormalizedCard): CCv2Wrapped;
1212
+ /**
1213
+ * Check what would be lost converting NormalizedCard to v2
1214
+ */
1215
+ export declare function checkNormalizedToV2Loss(card: NormalizedCard): string[];
1216
+
1217
+ export {};