@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
@@ -0,0 +1,1349 @@
1
+ import { z } from 'zod';
2
+
3
+ /**
4
+ * Binary Data Utilities
5
+ *
6
+ * Universal binary data operations using Uint8Array.
7
+ * Works in both Node.js and browser environments.
8
+ */
9
+ /**
10
+ * Universal binary data type (works in both environments)
11
+ */
12
+ export type BinaryData = Uint8Array;
13
+ declare const CCv3CharacterBookSchema: z.ZodObject<{
14
+ name: z.ZodOptional<z.ZodString>;
15
+ description: z.ZodOptional<z.ZodString>;
16
+ scan_depth: z.ZodOptional<z.ZodNumber>;
17
+ token_budget: z.ZodOptional<z.ZodNumber>;
18
+ recursive_scanning: z.ZodOptional<z.ZodBoolean>;
19
+ extensions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
20
+ entries: z.ZodArray<z.ZodObject<{
21
+ keys: z.ZodArray<z.ZodString, "many">;
22
+ content: z.ZodString;
23
+ enabled: z.ZodBoolean;
24
+ insertion_order: z.ZodNumber;
25
+ case_sensitive: z.ZodOptional<z.ZodBoolean>;
26
+ name: z.ZodOptional<z.ZodString>;
27
+ priority: z.ZodOptional<z.ZodNumber>;
28
+ id: z.ZodOptional<z.ZodNumber>;
29
+ comment: z.ZodOptional<z.ZodString>;
30
+ selective: z.ZodOptional<z.ZodBoolean>;
31
+ secondary_keys: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
32
+ constant: z.ZodOptional<z.ZodBoolean>;
33
+ position: z.ZodOptional<z.ZodEnum<[
34
+ "before_char",
35
+ "after_char"
36
+ ]>>;
37
+ extensions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
38
+ automation_id: z.ZodOptional<z.ZodString>;
39
+ role: z.ZodOptional<z.ZodEnum<[
40
+ "system",
41
+ "user",
42
+ "assistant"
43
+ ]>>;
44
+ group: z.ZodOptional<z.ZodString>;
45
+ scan_frequency: z.ZodOptional<z.ZodNumber>;
46
+ probability: z.ZodOptional<z.ZodNumber>;
47
+ use_regex: z.ZodOptional<z.ZodBoolean>;
48
+ depth: z.ZodOptional<z.ZodNumber>;
49
+ selective_logic: z.ZodOptional<z.ZodEnum<[
50
+ "AND",
51
+ "NOT"
52
+ ]>>;
53
+ }, "strip", z.ZodTypeAny, {
54
+ keys: string[];
55
+ content: string;
56
+ enabled: boolean;
57
+ insertion_order: number;
58
+ name?: string | undefined;
59
+ extensions?: Record<string, unknown> | undefined;
60
+ case_sensitive?: boolean | undefined;
61
+ priority?: number | undefined;
62
+ id?: number | undefined;
63
+ comment?: string | undefined;
64
+ selective?: boolean | undefined;
65
+ secondary_keys?: string[] | undefined;
66
+ constant?: boolean | undefined;
67
+ position?: "before_char" | "after_char" | undefined;
68
+ automation_id?: string | undefined;
69
+ role?: "system" | "user" | "assistant" | undefined;
70
+ group?: string | undefined;
71
+ scan_frequency?: number | undefined;
72
+ probability?: number | undefined;
73
+ use_regex?: boolean | undefined;
74
+ depth?: number | undefined;
75
+ selective_logic?: "AND" | "NOT" | undefined;
76
+ }, {
77
+ keys: string[];
78
+ content: string;
79
+ enabled: boolean;
80
+ insertion_order: number;
81
+ name?: string | undefined;
82
+ extensions?: Record<string, unknown> | undefined;
83
+ case_sensitive?: boolean | undefined;
84
+ priority?: number | undefined;
85
+ id?: number | undefined;
86
+ comment?: string | undefined;
87
+ selective?: boolean | undefined;
88
+ secondary_keys?: string[] | undefined;
89
+ constant?: boolean | undefined;
90
+ position?: "before_char" | "after_char" | undefined;
91
+ automation_id?: string | undefined;
92
+ role?: "system" | "user" | "assistant" | undefined;
93
+ group?: string | undefined;
94
+ scan_frequency?: number | undefined;
95
+ probability?: number | undefined;
96
+ use_regex?: boolean | undefined;
97
+ depth?: number | undefined;
98
+ selective_logic?: "AND" | "NOT" | undefined;
99
+ }>, "many">;
100
+ }, "strip", z.ZodTypeAny, {
101
+ entries: {
102
+ keys: string[];
103
+ content: string;
104
+ enabled: boolean;
105
+ insertion_order: number;
106
+ name?: string | undefined;
107
+ extensions?: Record<string, unknown> | undefined;
108
+ case_sensitive?: boolean | undefined;
109
+ priority?: number | undefined;
110
+ id?: number | undefined;
111
+ comment?: string | undefined;
112
+ selective?: boolean | undefined;
113
+ secondary_keys?: string[] | undefined;
114
+ constant?: boolean | undefined;
115
+ position?: "before_char" | "after_char" | undefined;
116
+ automation_id?: string | undefined;
117
+ role?: "system" | "user" | "assistant" | undefined;
118
+ group?: string | undefined;
119
+ scan_frequency?: number | undefined;
120
+ probability?: number | undefined;
121
+ use_regex?: boolean | undefined;
122
+ depth?: number | undefined;
123
+ selective_logic?: "AND" | "NOT" | undefined;
124
+ }[];
125
+ name?: string | undefined;
126
+ description?: string | undefined;
127
+ scan_depth?: number | undefined;
128
+ token_budget?: number | undefined;
129
+ recursive_scanning?: boolean | undefined;
130
+ extensions?: Record<string, unknown> | undefined;
131
+ }, {
132
+ entries: {
133
+ keys: string[];
134
+ content: string;
135
+ enabled: boolean;
136
+ insertion_order: number;
137
+ name?: string | undefined;
138
+ extensions?: Record<string, unknown> | undefined;
139
+ case_sensitive?: boolean | undefined;
140
+ priority?: number | undefined;
141
+ id?: number | undefined;
142
+ comment?: string | undefined;
143
+ selective?: boolean | undefined;
144
+ secondary_keys?: string[] | undefined;
145
+ constant?: boolean | undefined;
146
+ position?: "before_char" | "after_char" | undefined;
147
+ automation_id?: string | undefined;
148
+ role?: "system" | "user" | "assistant" | undefined;
149
+ group?: string | undefined;
150
+ scan_frequency?: number | undefined;
151
+ probability?: number | undefined;
152
+ use_regex?: boolean | undefined;
153
+ depth?: number | undefined;
154
+ selective_logic?: "AND" | "NOT" | undefined;
155
+ }[];
156
+ name?: string | undefined;
157
+ description?: string | undefined;
158
+ scan_depth?: number | undefined;
159
+ token_budget?: number | undefined;
160
+ recursive_scanning?: boolean | undefined;
161
+ extensions?: Record<string, unknown> | undefined;
162
+ }>;
163
+ declare const CCv3DataSchema: z.ZodObject<{
164
+ spec: z.ZodLiteral<"chara_card_v3">;
165
+ spec_version: z.ZodLiteral<"3.0">;
166
+ data: z.ZodObject<{
167
+ name: z.ZodDefault<z.ZodString>;
168
+ description: z.ZodDefault<z.ZodString>;
169
+ personality: z.ZodDefault<z.ZodNullable<z.ZodString>>;
170
+ scenario: z.ZodDefault<z.ZodString>;
171
+ first_mes: z.ZodDefault<z.ZodString>;
172
+ mes_example: z.ZodDefault<z.ZodNullable<z.ZodString>>;
173
+ creator: z.ZodDefault<z.ZodString>;
174
+ character_version: z.ZodDefault<z.ZodString>;
175
+ tags: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
176
+ group_only_greetings: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
177
+ creator_notes: z.ZodOptional<z.ZodString>;
178
+ system_prompt: z.ZodOptional<z.ZodString>;
179
+ post_history_instructions: z.ZodOptional<z.ZodString>;
180
+ alternate_greetings: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
181
+ character_book: z.ZodNullable<z.ZodOptional<z.ZodObject<{
182
+ name: z.ZodOptional<z.ZodString>;
183
+ description: z.ZodOptional<z.ZodString>;
184
+ scan_depth: z.ZodOptional<z.ZodNumber>;
185
+ token_budget: z.ZodOptional<z.ZodNumber>;
186
+ recursive_scanning: z.ZodOptional<z.ZodBoolean>;
187
+ extensions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
188
+ entries: z.ZodArray<z.ZodObject<{
189
+ keys: z.ZodArray<z.ZodString, "many">;
190
+ content: z.ZodString;
191
+ enabled: z.ZodBoolean;
192
+ insertion_order: z.ZodNumber;
193
+ case_sensitive: z.ZodOptional<z.ZodBoolean>;
194
+ name: z.ZodOptional<z.ZodString>;
195
+ priority: z.ZodOptional<z.ZodNumber>;
196
+ id: z.ZodOptional<z.ZodNumber>;
197
+ comment: z.ZodOptional<z.ZodString>;
198
+ selective: z.ZodOptional<z.ZodBoolean>;
199
+ secondary_keys: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
200
+ constant: z.ZodOptional<z.ZodBoolean>;
201
+ position: z.ZodOptional<z.ZodEnum<[
202
+ "before_char",
203
+ "after_char"
204
+ ]>>;
205
+ extensions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
206
+ automation_id: z.ZodOptional<z.ZodString>;
207
+ role: z.ZodOptional<z.ZodEnum<[
208
+ "system",
209
+ "user",
210
+ "assistant"
211
+ ]>>;
212
+ group: z.ZodOptional<z.ZodString>;
213
+ scan_frequency: z.ZodOptional<z.ZodNumber>;
214
+ probability: z.ZodOptional<z.ZodNumber>;
215
+ use_regex: z.ZodOptional<z.ZodBoolean>;
216
+ depth: z.ZodOptional<z.ZodNumber>;
217
+ selective_logic: z.ZodOptional<z.ZodEnum<[
218
+ "AND",
219
+ "NOT"
220
+ ]>>;
221
+ }, "strip", z.ZodTypeAny, {
222
+ keys: string[];
223
+ content: string;
224
+ enabled: boolean;
225
+ insertion_order: number;
226
+ name?: string | undefined;
227
+ extensions?: Record<string, unknown> | undefined;
228
+ case_sensitive?: boolean | undefined;
229
+ priority?: number | undefined;
230
+ id?: number | undefined;
231
+ comment?: string | undefined;
232
+ selective?: boolean | undefined;
233
+ secondary_keys?: string[] | undefined;
234
+ constant?: boolean | undefined;
235
+ position?: "before_char" | "after_char" | undefined;
236
+ automation_id?: string | undefined;
237
+ role?: "system" | "user" | "assistant" | undefined;
238
+ group?: string | undefined;
239
+ scan_frequency?: number | undefined;
240
+ probability?: number | undefined;
241
+ use_regex?: boolean | undefined;
242
+ depth?: number | undefined;
243
+ selective_logic?: "AND" | "NOT" | undefined;
244
+ }, {
245
+ keys: string[];
246
+ content: string;
247
+ enabled: boolean;
248
+ insertion_order: number;
249
+ name?: string | undefined;
250
+ extensions?: Record<string, unknown> | undefined;
251
+ case_sensitive?: boolean | undefined;
252
+ priority?: number | undefined;
253
+ id?: number | undefined;
254
+ comment?: string | undefined;
255
+ selective?: boolean | undefined;
256
+ secondary_keys?: string[] | undefined;
257
+ constant?: boolean | undefined;
258
+ position?: "before_char" | "after_char" | undefined;
259
+ automation_id?: string | undefined;
260
+ role?: "system" | "user" | "assistant" | undefined;
261
+ group?: string | undefined;
262
+ scan_frequency?: number | undefined;
263
+ probability?: number | undefined;
264
+ use_regex?: boolean | undefined;
265
+ depth?: number | undefined;
266
+ selective_logic?: "AND" | "NOT" | undefined;
267
+ }>, "many">;
268
+ }, "strip", z.ZodTypeAny, {
269
+ entries: {
270
+ keys: string[];
271
+ content: string;
272
+ enabled: boolean;
273
+ insertion_order: number;
274
+ name?: string | undefined;
275
+ extensions?: Record<string, unknown> | undefined;
276
+ case_sensitive?: boolean | undefined;
277
+ priority?: number | undefined;
278
+ id?: number | undefined;
279
+ comment?: string | undefined;
280
+ selective?: boolean | undefined;
281
+ secondary_keys?: string[] | undefined;
282
+ constant?: boolean | undefined;
283
+ position?: "before_char" | "after_char" | undefined;
284
+ automation_id?: string | undefined;
285
+ role?: "system" | "user" | "assistant" | undefined;
286
+ group?: string | undefined;
287
+ scan_frequency?: number | undefined;
288
+ probability?: number | undefined;
289
+ use_regex?: boolean | undefined;
290
+ depth?: number | undefined;
291
+ selective_logic?: "AND" | "NOT" | undefined;
292
+ }[];
293
+ name?: string | undefined;
294
+ description?: string | undefined;
295
+ scan_depth?: number | undefined;
296
+ token_budget?: number | undefined;
297
+ recursive_scanning?: boolean | undefined;
298
+ extensions?: Record<string, unknown> | undefined;
299
+ }, {
300
+ entries: {
301
+ keys: string[];
302
+ content: string;
303
+ enabled: boolean;
304
+ insertion_order: number;
305
+ name?: string | undefined;
306
+ extensions?: Record<string, unknown> | undefined;
307
+ case_sensitive?: boolean | undefined;
308
+ priority?: number | undefined;
309
+ id?: number | undefined;
310
+ comment?: string | undefined;
311
+ selective?: boolean | undefined;
312
+ secondary_keys?: string[] | undefined;
313
+ constant?: boolean | undefined;
314
+ position?: "before_char" | "after_char" | undefined;
315
+ automation_id?: string | undefined;
316
+ role?: "system" | "user" | "assistant" | undefined;
317
+ group?: string | undefined;
318
+ scan_frequency?: number | undefined;
319
+ probability?: number | undefined;
320
+ use_regex?: boolean | undefined;
321
+ depth?: number | undefined;
322
+ selective_logic?: "AND" | "NOT" | undefined;
323
+ }[];
324
+ name?: string | undefined;
325
+ description?: string | undefined;
326
+ scan_depth?: number | undefined;
327
+ token_budget?: number | undefined;
328
+ recursive_scanning?: boolean | undefined;
329
+ extensions?: Record<string, unknown> | undefined;
330
+ }>>>;
331
+ extensions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
332
+ assets: z.ZodOptional<z.ZodArray<z.ZodObject<{
333
+ type: z.ZodEnum<[
334
+ "icon",
335
+ "background",
336
+ "emotion",
337
+ "user_icon",
338
+ "sound",
339
+ "video",
340
+ "custom",
341
+ "x-risu-asset"
342
+ ]>;
343
+ uri: z.ZodString;
344
+ name: z.ZodString;
345
+ ext: z.ZodString;
346
+ }, "strip", z.ZodTypeAny, {
347
+ name: string;
348
+ type: "custom" | "icon" | "background" | "emotion" | "user_icon" | "sound" | "video" | "x-risu-asset";
349
+ uri: string;
350
+ ext: string;
351
+ }, {
352
+ name: string;
353
+ type: "custom" | "icon" | "background" | "emotion" | "user_icon" | "sound" | "video" | "x-risu-asset";
354
+ uri: string;
355
+ ext: string;
356
+ }>, "many">>;
357
+ nickname: z.ZodOptional<z.ZodString>;
358
+ creator_notes_multilingual: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
359
+ source: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
360
+ creation_date: z.ZodOptional<z.ZodNumber>;
361
+ modification_date: z.ZodOptional<z.ZodNumber>;
362
+ }, "strip", z.ZodTypeAny, {
363
+ name: string;
364
+ description: string;
365
+ personality: string | null;
366
+ scenario: string;
367
+ first_mes: string;
368
+ mes_example: string | null;
369
+ tags: string[];
370
+ creator: string;
371
+ character_version: string;
372
+ group_only_greetings: string[];
373
+ extensions?: Record<string, unknown> | undefined;
374
+ creator_notes?: string | undefined;
375
+ system_prompt?: string | undefined;
376
+ post_history_instructions?: string | undefined;
377
+ alternate_greetings?: string[] | undefined;
378
+ character_book?: {
379
+ entries: {
380
+ keys: string[];
381
+ content: string;
382
+ enabled: boolean;
383
+ insertion_order: number;
384
+ name?: string | undefined;
385
+ extensions?: Record<string, unknown> | undefined;
386
+ case_sensitive?: boolean | undefined;
387
+ priority?: number | undefined;
388
+ id?: number | undefined;
389
+ comment?: string | undefined;
390
+ selective?: boolean | undefined;
391
+ secondary_keys?: string[] | undefined;
392
+ constant?: boolean | undefined;
393
+ position?: "before_char" | "after_char" | undefined;
394
+ automation_id?: string | undefined;
395
+ role?: "system" | "user" | "assistant" | undefined;
396
+ group?: string | undefined;
397
+ scan_frequency?: number | undefined;
398
+ probability?: number | undefined;
399
+ use_regex?: boolean | undefined;
400
+ depth?: number | undefined;
401
+ selective_logic?: "AND" | "NOT" | undefined;
402
+ }[];
403
+ name?: string | undefined;
404
+ description?: string | undefined;
405
+ scan_depth?: number | undefined;
406
+ token_budget?: number | undefined;
407
+ recursive_scanning?: boolean | undefined;
408
+ extensions?: Record<string, unknown> | undefined;
409
+ } | null | undefined;
410
+ assets?: {
411
+ name: string;
412
+ type: "custom" | "icon" | "background" | "emotion" | "user_icon" | "sound" | "video" | "x-risu-asset";
413
+ uri: string;
414
+ ext: string;
415
+ }[] | undefined;
416
+ nickname?: string | undefined;
417
+ creator_notes_multilingual?: Record<string, string> | undefined;
418
+ source?: string[] | undefined;
419
+ creation_date?: number | undefined;
420
+ modification_date?: number | undefined;
421
+ }, {
422
+ name?: string | undefined;
423
+ description?: string | undefined;
424
+ extensions?: Record<string, unknown> | undefined;
425
+ personality?: string | null | undefined;
426
+ scenario?: string | undefined;
427
+ first_mes?: string | undefined;
428
+ mes_example?: string | null | undefined;
429
+ creator_notes?: string | undefined;
430
+ system_prompt?: string | undefined;
431
+ post_history_instructions?: string | undefined;
432
+ alternate_greetings?: string[] | undefined;
433
+ character_book?: {
434
+ entries: {
435
+ keys: string[];
436
+ content: string;
437
+ enabled: boolean;
438
+ insertion_order: number;
439
+ name?: string | undefined;
440
+ extensions?: Record<string, unknown> | undefined;
441
+ case_sensitive?: boolean | undefined;
442
+ priority?: number | undefined;
443
+ id?: number | undefined;
444
+ comment?: string | undefined;
445
+ selective?: boolean | undefined;
446
+ secondary_keys?: string[] | undefined;
447
+ constant?: boolean | undefined;
448
+ position?: "before_char" | "after_char" | undefined;
449
+ automation_id?: string | undefined;
450
+ role?: "system" | "user" | "assistant" | undefined;
451
+ group?: string | undefined;
452
+ scan_frequency?: number | undefined;
453
+ probability?: number | undefined;
454
+ use_regex?: boolean | undefined;
455
+ depth?: number | undefined;
456
+ selective_logic?: "AND" | "NOT" | undefined;
457
+ }[];
458
+ name?: string | undefined;
459
+ description?: string | undefined;
460
+ scan_depth?: number | undefined;
461
+ token_budget?: number | undefined;
462
+ recursive_scanning?: boolean | undefined;
463
+ extensions?: Record<string, unknown> | undefined;
464
+ } | null | undefined;
465
+ tags?: string[] | undefined;
466
+ creator?: string | undefined;
467
+ character_version?: string | undefined;
468
+ group_only_greetings?: string[] | undefined;
469
+ assets?: {
470
+ name: string;
471
+ type: "custom" | "icon" | "background" | "emotion" | "user_icon" | "sound" | "video" | "x-risu-asset";
472
+ uri: string;
473
+ ext: string;
474
+ }[] | undefined;
475
+ nickname?: string | undefined;
476
+ creator_notes_multilingual?: Record<string, string> | undefined;
477
+ source?: string[] | undefined;
478
+ creation_date?: number | undefined;
479
+ modification_date?: number | undefined;
480
+ }>;
481
+ }, "strip", z.ZodTypeAny, {
482
+ data: {
483
+ name: string;
484
+ description: string;
485
+ personality: string | null;
486
+ scenario: string;
487
+ first_mes: string;
488
+ mes_example: string | null;
489
+ tags: string[];
490
+ creator: string;
491
+ character_version: string;
492
+ group_only_greetings: string[];
493
+ extensions?: Record<string, unknown> | undefined;
494
+ creator_notes?: string | undefined;
495
+ system_prompt?: string | undefined;
496
+ post_history_instructions?: string | undefined;
497
+ alternate_greetings?: string[] | undefined;
498
+ character_book?: {
499
+ entries: {
500
+ keys: string[];
501
+ content: string;
502
+ enabled: boolean;
503
+ insertion_order: number;
504
+ name?: string | undefined;
505
+ extensions?: Record<string, unknown> | undefined;
506
+ case_sensitive?: boolean | undefined;
507
+ priority?: number | undefined;
508
+ id?: number | undefined;
509
+ comment?: string | undefined;
510
+ selective?: boolean | undefined;
511
+ secondary_keys?: string[] | undefined;
512
+ constant?: boolean | undefined;
513
+ position?: "before_char" | "after_char" | undefined;
514
+ automation_id?: string | undefined;
515
+ role?: "system" | "user" | "assistant" | undefined;
516
+ group?: string | undefined;
517
+ scan_frequency?: number | undefined;
518
+ probability?: number | undefined;
519
+ use_regex?: boolean | undefined;
520
+ depth?: number | undefined;
521
+ selective_logic?: "AND" | "NOT" | undefined;
522
+ }[];
523
+ name?: string | undefined;
524
+ description?: string | undefined;
525
+ scan_depth?: number | undefined;
526
+ token_budget?: number | undefined;
527
+ recursive_scanning?: boolean | undefined;
528
+ extensions?: Record<string, unknown> | undefined;
529
+ } | null | undefined;
530
+ assets?: {
531
+ name: string;
532
+ type: "custom" | "icon" | "background" | "emotion" | "user_icon" | "sound" | "video" | "x-risu-asset";
533
+ uri: string;
534
+ ext: string;
535
+ }[] | undefined;
536
+ nickname?: string | undefined;
537
+ creator_notes_multilingual?: Record<string, string> | undefined;
538
+ source?: string[] | undefined;
539
+ creation_date?: number | undefined;
540
+ modification_date?: number | undefined;
541
+ };
542
+ spec: "chara_card_v3";
543
+ spec_version: "3.0";
544
+ }, {
545
+ data: {
546
+ name?: string | undefined;
547
+ description?: string | undefined;
548
+ extensions?: Record<string, unknown> | undefined;
549
+ personality?: string | null | undefined;
550
+ scenario?: string | undefined;
551
+ first_mes?: string | undefined;
552
+ mes_example?: string | null | undefined;
553
+ creator_notes?: string | undefined;
554
+ system_prompt?: string | undefined;
555
+ post_history_instructions?: string | undefined;
556
+ alternate_greetings?: string[] | undefined;
557
+ character_book?: {
558
+ entries: {
559
+ keys: string[];
560
+ content: string;
561
+ enabled: boolean;
562
+ insertion_order: number;
563
+ name?: string | undefined;
564
+ extensions?: Record<string, unknown> | undefined;
565
+ case_sensitive?: boolean | undefined;
566
+ priority?: number | undefined;
567
+ id?: number | undefined;
568
+ comment?: string | undefined;
569
+ selective?: boolean | undefined;
570
+ secondary_keys?: string[] | undefined;
571
+ constant?: boolean | undefined;
572
+ position?: "before_char" | "after_char" | undefined;
573
+ automation_id?: string | undefined;
574
+ role?: "system" | "user" | "assistant" | undefined;
575
+ group?: string | undefined;
576
+ scan_frequency?: number | undefined;
577
+ probability?: number | undefined;
578
+ use_regex?: boolean | undefined;
579
+ depth?: number | undefined;
580
+ selective_logic?: "AND" | "NOT" | undefined;
581
+ }[];
582
+ name?: string | undefined;
583
+ description?: string | undefined;
584
+ scan_depth?: number | undefined;
585
+ token_budget?: number | undefined;
586
+ recursive_scanning?: boolean | undefined;
587
+ extensions?: Record<string, unknown> | undefined;
588
+ } | null | undefined;
589
+ tags?: string[] | undefined;
590
+ creator?: string | undefined;
591
+ character_version?: string | undefined;
592
+ group_only_greetings?: string[] | undefined;
593
+ assets?: {
594
+ name: string;
595
+ type: "custom" | "icon" | "background" | "emotion" | "user_icon" | "sound" | "video" | "x-risu-asset";
596
+ uri: string;
597
+ ext: string;
598
+ }[] | undefined;
599
+ nickname?: string | undefined;
600
+ creator_notes_multilingual?: Record<string, string> | undefined;
601
+ source?: string[] | undefined;
602
+ creation_date?: number | undefined;
603
+ modification_date?: number | undefined;
604
+ };
605
+ spec: "chara_card_v3";
606
+ spec_version: "3.0";
607
+ }>;
608
+ /**
609
+ * Character book (lorebook) for v3 cards
610
+ */
611
+ export type CCv3CharacterBook = z.infer<typeof CCv3CharacterBookSchema>;
612
+ /**
613
+ * Character Card v3 full structure
614
+ */
615
+ export type CCv3Data = z.infer<typeof CCv3DataSchema>;
616
+ /**
617
+ * Normalized Card Types
618
+ *
619
+ * Unified view of card data regardless of source format.
620
+ * This is a computed/virtual representation, not stored.
621
+ */
622
+ /**
623
+ * Normalized card representation
624
+ * Provides unified access to card data from any format
625
+ */
626
+ export interface NormalizedCard {
627
+ name: string;
628
+ description: string;
629
+ personality: string;
630
+ scenario: string;
631
+ firstMes: string;
632
+ mesExample: string;
633
+ systemPrompt?: string;
634
+ postHistoryInstructions?: string;
635
+ alternateGreetings: string[];
636
+ groupOnlyGreetings: string[];
637
+ tags: string[];
638
+ creator?: string;
639
+ creatorNotes?: string;
640
+ characterVersion?: string;
641
+ characterBook?: CCv3CharacterBook;
642
+ extensions: Record<string, unknown>;
643
+ }
644
+ /**
645
+ * Voxta Types
646
+ *
647
+ * Type definitions for Voxta package format.
648
+ */
649
+ /**
650
+ * Valid compression levels
651
+ */
652
+ export type CompressionLevel = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9;
653
+ /**
654
+ * Voxta resource kind enumeration
655
+ * Used in EntryResource, ThumbnailResource, and Collection references
656
+ */
657
+ export declare enum VoxtaResourceKind {
658
+ Character = 1,
659
+ Book = 2,
660
+ Scenario = 3
661
+ }
662
+ /**
663
+ * Voxta resource reference
664
+ */
665
+ export interface VoxtaResourceRef {
666
+ Kind: VoxtaResourceKind | number;
667
+ Id: string;
668
+ }
669
+ /**
670
+ * Voxta package metadata
671
+ */
672
+ export interface VoxtaPackage {
673
+ $type: "package";
674
+ Id: string;
675
+ Name: string;
676
+ Version: string;
677
+ Description?: string;
678
+ Creator?: string;
679
+ ExplicitContent?: boolean;
680
+ EntryResource?: VoxtaResourceRef;
681
+ ThumbnailResource?: VoxtaResourceRef;
682
+ DateCreated?: string;
683
+ DateModified?: string;
684
+ }
685
+ /**
686
+ * Voxta TTS configuration
687
+ */
688
+ export interface VoxtaTtsConfig {
689
+ Voice: {
690
+ parameters: {
691
+ VoiceBackend?: string;
692
+ VoiceId?: string;
693
+ Gender?: string;
694
+ Filename?: string;
695
+ FinetuneVoice?: string;
696
+ [key: string]: unknown;
697
+ };
698
+ label: string;
699
+ };
700
+ Service: {
701
+ ServiceName: string;
702
+ ServiceId: string;
703
+ };
704
+ }
705
+ /**
706
+ * Voxta script
707
+ */
708
+ export interface VoxtaScript {
709
+ Name: string;
710
+ Content: string;
711
+ }
712
+ /**
713
+ * Voxta character
714
+ */
715
+ export interface VoxtaCharacter {
716
+ $type: "character";
717
+ Id: string;
718
+ Name: string;
719
+ Label?: string;
720
+ Version?: string;
721
+ PackageId?: string;
722
+ Description?: string;
723
+ Personality?: string;
724
+ Profile?: string;
725
+ Scenario?: string;
726
+ FirstMessage?: string;
727
+ AlternativeFirstMessages?: string[];
728
+ MessageExamples?: string;
729
+ SystemPrompt?: string;
730
+ PostHistoryInstructions?: string;
731
+ Context?: string;
732
+ Instructions?: string;
733
+ UserNameOverride?: string;
734
+ UserDescriptionOverride?: string;
735
+ Creator?: string;
736
+ CreatorNotes?: string;
737
+ Tags?: string[];
738
+ ExplicitContent?: boolean;
739
+ Culture?: string;
740
+ ImportedFrom?: string;
741
+ MemoryBooks?: string[];
742
+ DefaultScenarios?: string[];
743
+ TextToSpeech?: VoxtaTtsConfig[];
744
+ ChatStyle?: number;
745
+ EnableThinkingSpeech?: boolean;
746
+ NotifyUserAwayReturn?: boolean;
747
+ TimeAware?: boolean;
748
+ UseMemory?: boolean;
749
+ MaxTokens?: number;
750
+ MaxSentences?: number;
751
+ SystemPromptOverrideType?: number;
752
+ ClimaxSensitivity?: number;
753
+ PleasureDecay?: number;
754
+ Scripts?: VoxtaScript[];
755
+ Augmentations?: unknown[];
756
+ Thumbnail?: {
757
+ RandomizedETag?: string;
758
+ ContentType?: string;
759
+ };
760
+ DateCreated?: string;
761
+ DateModified?: string;
762
+ }
763
+ /**
764
+ * Voxta book item
765
+ */
766
+ export interface VoxtaBookItem {
767
+ Id: string;
768
+ Keywords: string[];
769
+ Text: string;
770
+ Weight?: number;
771
+ Deleted?: boolean;
772
+ CreatedAt?: string;
773
+ LastUpdated?: string;
774
+ DeletedAt?: string;
775
+ }
776
+ /**
777
+ * Voxta book (lorebook)
778
+ */
779
+ export interface VoxtaBook {
780
+ $type: "book";
781
+ Id: string;
782
+ Name: string;
783
+ Version?: string;
784
+ PackageId?: string;
785
+ Description?: string;
786
+ ExplicitContent?: boolean;
787
+ Creator?: string;
788
+ Items: VoxtaBookItem[];
789
+ DateCreated?: string;
790
+ DateModified?: string;
791
+ }
792
+ /**
793
+ * Voxta collection item (reference to a resource)
794
+ */
795
+ export interface VoxtaCollectionItem {
796
+ Resource: VoxtaResourceRef;
797
+ }
798
+ /**
799
+ * Voxta collection folder (organizational grouping)
800
+ */
801
+ export interface VoxtaCollectionFolder {
802
+ Name: string;
803
+ Description?: string;
804
+ /** Kind of resources in this folder (1=Character, 2=Book, 3=Scenario) */
805
+ Kind: VoxtaResourceKind | number;
806
+ Items: VoxtaCollectionItem[];
807
+ /** Nested folders (if any) */
808
+ Folders?: VoxtaCollectionFolder[];
809
+ }
810
+ /**
811
+ * Voxta collection root structure
812
+ */
813
+ export interface VoxtaCollectionRoot {
814
+ Folders: VoxtaCollectionFolder[];
815
+ }
816
+ /**
817
+ * Voxta collection - organizes resources into themed groups
818
+ */
819
+ export interface VoxtaCollection {
820
+ $type: "collection";
821
+ Id: string;
822
+ Name: string;
823
+ Version?: string;
824
+ PackageId?: string;
825
+ ExplicitContent?: boolean;
826
+ Root: VoxtaCollectionRoot;
827
+ Thumbnail?: {
828
+ RandomizedETag?: string;
829
+ ContentType?: string;
830
+ };
831
+ DateCreated?: string;
832
+ DateModified?: string;
833
+ }
834
+ /**
835
+ * Voxta scenario action
836
+ */
837
+ export interface VoxtaAction {
838
+ Name: string;
839
+ Layer?: string;
840
+ Arguments?: unknown[];
841
+ FinalLayer?: boolean;
842
+ Timing?: number;
843
+ Description?: string;
844
+ Disabled?: boolean;
845
+ Once?: boolean;
846
+ FlagsFilter?: string;
847
+ EvaluateNextEvent?: boolean;
848
+ Effect?: {
849
+ SetFlags?: string[];
850
+ Script?: string;
851
+ Event?: string;
852
+ Story?: string;
853
+ Secret?: string;
854
+ Instructions?: string;
855
+ MaxSentences?: number;
856
+ MaxTokens?: number;
857
+ [key: string]: unknown;
858
+ };
859
+ }
860
+ /**
861
+ * Voxta scenario event (similar to action but for event triggers)
862
+ */
863
+ export interface VoxtaEvent {
864
+ Id?: string;
865
+ Name: string;
866
+ Layer?: string;
867
+ Timing?: number;
868
+ Description?: string;
869
+ Arguments?: unknown[];
870
+ Disabled?: boolean;
871
+ FinalLayer?: boolean;
872
+ Once?: boolean;
873
+ FlagsFilter?: string;
874
+ EvaluateNextEvent?: boolean;
875
+ Effect?: {
876
+ SetFlags?: string[];
877
+ Script?: string;
878
+ Event?: string;
879
+ Story?: string;
880
+ Secret?: string;
881
+ Instructions?: string;
882
+ MaxSentences?: number;
883
+ MaxTokens?: number;
884
+ [key: string]: unknown;
885
+ };
886
+ }
887
+ /**
888
+ * Voxta scenario context (conditional context blocks)
889
+ */
890
+ export interface VoxtaContext {
891
+ Name: string;
892
+ Text: string;
893
+ FlagsFilter?: string;
894
+ Disabled?: boolean;
895
+ }
896
+ /**
897
+ * Voxta scenario role - maps characters to scenario slots
898
+ */
899
+ export interface VoxtaRole {
900
+ Name: string;
901
+ Description?: string;
902
+ DefaultCharacterId: string;
903
+ EnabledOnStart?: boolean;
904
+ }
905
+ /**
906
+ * Voxta impersonation (user persona override)
907
+ */
908
+ export interface VoxtaImpersonation {
909
+ Name: string;
910
+ Description?: string;
911
+ }
912
+ /**
913
+ * Voxta scenario
914
+ */
915
+ export interface VoxtaScenario {
916
+ $type: "scenario";
917
+ Id: string;
918
+ Name: string;
919
+ Version?: string;
920
+ ParentId?: string;
921
+ PackageId?: string;
922
+ Client?: string;
923
+ Creator?: string;
924
+ Description?: string;
925
+ Template?: string;
926
+ Messages?: string;
927
+ SystemPrompt?: string;
928
+ SystemPromptOverrideType?: number;
929
+ Roles?: VoxtaRole[];
930
+ NarratorCharacterId?: string;
931
+ Impersonation?: VoxtaImpersonation;
932
+ SharedScripts?: VoxtaScript[];
933
+ Actions?: VoxtaAction[];
934
+ Events?: VoxtaEvent[];
935
+ Contexts?: VoxtaContext[];
936
+ ExplicitContent?: boolean;
937
+ ChatFlow?: number;
938
+ ChatStyle?: number;
939
+ MemoryBooks?: string[];
940
+ Thumbnail?: {
941
+ ETag?: number;
942
+ RandomizedETag?: string;
943
+ ContentType?: string;
944
+ };
945
+ DateCreated?: string;
946
+ DateModified?: string;
947
+ UserId?: string;
948
+ AppControlled?: boolean;
949
+ Locked?: boolean;
950
+ }
951
+ /**
952
+ * Extracted Voxta asset
953
+ */
954
+ export interface ExtractedVoxtaAsset {
955
+ path: string;
956
+ buffer: BinaryData;
957
+ characterId?: string;
958
+ }
959
+ /**
960
+ * Extracted Voxta character with assets
961
+ */
962
+ export interface ExtractedVoxtaCharacter {
963
+ id: string;
964
+ data: VoxtaCharacter;
965
+ thumbnail?: BinaryData;
966
+ assets: ExtractedVoxtaAsset[];
967
+ }
968
+ /**
969
+ * Extracted Voxta scenario
970
+ */
971
+ export interface ExtractedVoxtaScenario {
972
+ id: string;
973
+ data: VoxtaScenario;
974
+ thumbnail?: BinaryData;
975
+ }
976
+ /**
977
+ * Extracted Voxta book
978
+ */
979
+ export interface ExtractedVoxtaBook {
980
+ id: string;
981
+ data: VoxtaBook;
982
+ }
983
+ /**
984
+ * Extracted Voxta collection with assets
985
+ */
986
+ export interface ExtractedVoxtaCollection {
987
+ id: string;
988
+ data: VoxtaCollection;
989
+ thumbnail?: BinaryData;
990
+ }
991
+ /**
992
+ * Voxta export type
993
+ * - 'package': Has package.json with full metadata
994
+ * - 'scenario': Has Scenarios/ folder but no package.json (scenario export)
995
+ * - 'character': Only has Characters/ folder (single/multi character export)
996
+ * - 'collection': Has Collections/ folder (bundled content with organization)
997
+ */
998
+ export type VoxtaExportType = "package" | "scenario" | "character" | "collection";
999
+ /**
1000
+ * Complete extracted Voxta data
1001
+ */
1002
+ export interface VoxtaData {
1003
+ package?: VoxtaPackage;
1004
+ characters: ExtractedVoxtaCharacter[];
1005
+ scenarios: ExtractedVoxtaScenario[];
1006
+ books: ExtractedVoxtaBook[];
1007
+ collections: ExtractedVoxtaCollection[];
1008
+ /**
1009
+ * Type of export detected:
1010
+ * - 'package': Has package.json
1011
+ * - 'scenario': Has Scenarios/ but no package.json
1012
+ * - 'character': Only Characters/ (no package.json or Scenarios/)
1013
+ * - 'collection': Has Collections/ folder
1014
+ */
1015
+ exportType: VoxtaExportType;
1016
+ }
1017
+ /**
1018
+ * Options for Voxta extraction
1019
+ */
1020
+ export interface VoxtaReadOptions {
1021
+ maxFileSize?: number;
1022
+ maxAssetSize?: number;
1023
+ maxTotalSize?: number;
1024
+ }
1025
+ /**
1026
+ * Asset to include in Voxta export
1027
+ */
1028
+ export interface VoxtaWriteAsset {
1029
+ type: string;
1030
+ name: string;
1031
+ ext: string;
1032
+ data: BinaryData;
1033
+ tags?: string[];
1034
+ isMain?: boolean;
1035
+ }
1036
+ /**
1037
+ * Options for building Voxta package
1038
+ */
1039
+ export interface VoxtaWriteOptions {
1040
+ compressionLevel?: CompressionLevel;
1041
+ includePackageJson?: boolean;
1042
+ characterId?: string;
1043
+ packageId?: string;
1044
+ /** Scenario to include - uses scenario.Id as the key */
1045
+ scenario?: VoxtaScenario;
1046
+ /** Scenario thumbnail */
1047
+ scenarioThumbnail?: BinaryData;
1048
+ }
1049
+ /**
1050
+ * Result of building a Voxta package
1051
+ */
1052
+ export interface VoxtaBuildResult {
1053
+ buffer: BinaryData;
1054
+ assetCount: number;
1055
+ totalSize: number;
1056
+ characterId: string;
1057
+ /** Scenario ID if a scenario was included */
1058
+ scenarioId?: string;
1059
+ }
1060
+ /**
1061
+ * Voxta extension data stored in CCv3 extensions
1062
+ */
1063
+ export interface VoxtaExtensionData {
1064
+ id: string;
1065
+ version?: string;
1066
+ packageId?: string;
1067
+ label?: string;
1068
+ textToSpeech?: VoxtaTtsConfig[];
1069
+ appearance?: string;
1070
+ context?: string;
1071
+ instructions?: string;
1072
+ userNameOverride?: string;
1073
+ userDescriptionOverride?: string;
1074
+ culture?: string;
1075
+ importedFrom?: string;
1076
+ chatSettings?: {
1077
+ chatStyle?: number;
1078
+ enableThinkingSpeech?: boolean;
1079
+ notifyUserAwayReturn?: boolean;
1080
+ timeAware?: boolean;
1081
+ useMemory?: boolean;
1082
+ maxTokens?: number;
1083
+ maxSentences?: number;
1084
+ systemPromptOverrideType?: number;
1085
+ };
1086
+ simulationSettings?: {
1087
+ climaxSensitivity?: number;
1088
+ pleasureDecay?: number;
1089
+ };
1090
+ scripts?: VoxtaScript[];
1091
+ augmentations?: unknown[];
1092
+ scenario?: {
1093
+ actions?: VoxtaAction[];
1094
+ sharedScripts?: VoxtaScript[];
1095
+ };
1096
+ original?: Partial<VoxtaCharacter>;
1097
+ }
1098
+ /**
1099
+ * Loss report for Voxta export
1100
+ */
1101
+ export interface VoxtaLossReport {
1102
+ lostFields: string[];
1103
+ lostAssets: string[];
1104
+ warnings: string[];
1105
+ reason: string;
1106
+ }
1107
+ /**
1108
+ * Voxta Reader
1109
+ *
1110
+ * Extracts and parses .voxpkg files.
1111
+ */
1112
+ /**
1113
+ * Check if data is a Voxta package
1114
+ */
1115
+ export declare function isVoxta(data: BinaryData): boolean;
1116
+ /**
1117
+ * Extract and parse a Voxta package
1118
+ */
1119
+ export declare function readVoxta(data: BinaryData, options?: VoxtaReadOptions): VoxtaData;
1120
+ /**
1121
+ * Async version of readVoxta
1122
+ */
1123
+ export declare function readVoxtaAsync(data: BinaryData, options?: VoxtaReadOptions): Promise<VoxtaData>;
1124
+ /**
1125
+ * Voxta Writer
1126
+ *
1127
+ * Creates .voxpkg files from CCv3 card data.
1128
+ */
1129
+ /**
1130
+ * Build a Voxta package from CCv3 card data
1131
+ */
1132
+ export declare function writeVoxta(card: CCv3Data, assets: VoxtaWriteAsset[], options?: VoxtaWriteOptions): VoxtaBuildResult;
1133
+ /**
1134
+ * Async version of writeVoxta
1135
+ */
1136
+ export declare function writeVoxtaAsync(card: CCv3Data, assets: VoxtaWriteAsset[], options?: VoxtaWriteOptions): Promise<VoxtaBuildResult>;
1137
+ /**
1138
+ * Voxta <-> CCv3 Mapping
1139
+ *
1140
+ * Conversion utilities between Voxta format and CCv3 format.
1141
+ */
1142
+ /**
1143
+ * Convert a Voxta character to CCv3 format
1144
+ */
1145
+ export declare function voxtaToCCv3(character: VoxtaCharacter, books?: VoxtaBook[]): CCv3Data;
1146
+ /**
1147
+ * Convert CCv3 card to Voxta character format
1148
+ */
1149
+ export declare function ccv3ToVoxta(card: CCv3Data): VoxtaCharacter;
1150
+ /**
1151
+ * Convert CCv3 lorebook to Voxta book format
1152
+ */
1153
+ export declare function ccv3LorebookToVoxtaBook(card: CCv3Data): VoxtaBook | null;
1154
+ /**
1155
+ * Macro Conversion
1156
+ *
1157
+ * Converts between Voxta-style macros (with spaces) and standard macros.
1158
+ *
1159
+ * Voxta uses: {{ user }}, {{ char }}
1160
+ * Standard uses: {{user}}, {{char}}
1161
+ */
1162
+ /**
1163
+ * Convert Voxta-style macros to standard format (no spaces)
1164
+ */
1165
+ export declare function voxtaToStandard(text: string): string;
1166
+ /**
1167
+ * Convert standard macros to Voxta-style format (with spaces)
1168
+ */
1169
+ export declare function standardToVoxta(text: string): string;
1170
+ /**
1171
+ * Editable CCv3 fields (subset that can be changed in editors)
1172
+ */
1173
+ export type CCv3Edits = Partial<CCv3Data["data"]>;
1174
+ /**
1175
+ * Merge partial CCv3 edits into an existing Voxta character.
1176
+ *
1177
+ * This function applies only the fields present in `edits` to the original
1178
+ * character, preserving Voxta-specific fields like Scripts, TTS, and
1179
+ * Augmentations that CCv3 cannot represent.
1180
+ *
1181
+ * @param original - The original extracted Voxta character
1182
+ * @param edits - Partial CCv3 data fields to apply
1183
+ * @returns Updated VoxtaCharacter with edits merged
1184
+ */
1185
+ export declare function mergeCharacterEdits(original: ExtractedVoxtaCharacter | VoxtaCharacter, edits: CCv3Edits): VoxtaCharacter;
1186
+ /**
1187
+ * Merge partial CCv3 lorebook edits into an existing Voxta book.
1188
+ *
1189
+ * @param original - The original extracted Voxta book
1190
+ * @param edits - CCv3 character_book to merge
1191
+ * @returns Updated VoxtaBook with edits merged
1192
+ */
1193
+ export declare function mergeBookEdits(original: ExtractedVoxtaBook | VoxtaBook, edits: CCv3CharacterBook): VoxtaBook;
1194
+ /**
1195
+ * Delta changes to apply to a Voxta package
1196
+ */
1197
+ export interface VoxtaDeltas {
1198
+ /** Updated characters by ID */
1199
+ characters?: Map<string, VoxtaCharacter>;
1200
+ /** Updated books by ID */
1201
+ books?: Map<string, VoxtaBook>;
1202
+ /** Updated package metadata (optional) */
1203
+ package?: Partial<VoxtaPackage>;
1204
+ }
1205
+ /**
1206
+ * Options for applying deltas
1207
+ */
1208
+ export interface ApplyDeltaOptions {
1209
+ compressionLevel?: CompressionLevel;
1210
+ }
1211
+ /**
1212
+ * Apply delta changes to an existing Voxta package.
1213
+ *
1214
+ * This performs a minimal update - only files that have changed are rewritten.
1215
+ * All other files (assets, scenarios, unchanged characters/books) are preserved
1216
+ * exactly as they were in the original package.
1217
+ *
1218
+ * @param originalBuffer - The original .voxpkg file buffer
1219
+ * @param deltas - Changes to apply
1220
+ * @param options - Compression options
1221
+ * @returns New package buffer with changes applied
1222
+ */
1223
+ export declare function applyVoxtaDeltas(originalBuffer: BinaryData, deltas: VoxtaDeltas, options?: ApplyDeltaOptions): Uint8Array;
1224
+ /**
1225
+ * Async version of applyVoxtaDeltas
1226
+ */
1227
+ export declare function applyVoxtaDeltasAsync(originalBuffer: BinaryData, deltas: VoxtaDeltas, options?: ApplyDeltaOptions): Promise<Uint8Array>;
1228
+ /**
1229
+ * Character info in package manifest
1230
+ */
1231
+ export interface ManifestCharacter {
1232
+ id: string;
1233
+ name: string;
1234
+ }
1235
+ /**
1236
+ * Book info in package manifest
1237
+ */
1238
+ export interface ManifestBook {
1239
+ id: string;
1240
+ name: string;
1241
+ /** Character IDs that reference this book */
1242
+ usedBy: string[];
1243
+ }
1244
+ /**
1245
+ * Scenario info in package manifest
1246
+ */
1247
+ export interface ManifestScenario {
1248
+ id: string;
1249
+ name: string;
1250
+ }
1251
+ /**
1252
+ * Package manifest for UI display
1253
+ */
1254
+ export interface PackageManifest {
1255
+ packageId?: string;
1256
+ packageName?: string;
1257
+ characters: ManifestCharacter[];
1258
+ books: ManifestBook[];
1259
+ scenarios: ManifestScenario[];
1260
+ }
1261
+ /**
1262
+ * Get a manifest summary of a Voxta package for UI display.
1263
+ *
1264
+ * This provides a quick overview of package contents with relationship
1265
+ * information (which characters use which books).
1266
+ *
1267
+ * @param data - Extracted Voxta data from readVoxta()
1268
+ * @returns Package manifest for UI display
1269
+ */
1270
+ export declare function getPackageManifest(data: VoxtaData): PackageManifest;
1271
+ /**
1272
+ * Options for extracting a character package
1273
+ */
1274
+ export interface ExtractCharacterOptions {
1275
+ compressionLevel?: CompressionLevel;
1276
+ /** Include books referenced by the character */
1277
+ includeBooks?: boolean;
1278
+ /** New package name (defaults to character name) */
1279
+ packageName?: string;
1280
+ }
1281
+ /**
1282
+ * Extract a single character from a multi-character package.
1283
+ *
1284
+ * Creates a new standalone .voxpkg containing just the specified character,
1285
+ * their assets, and optionally their referenced books.
1286
+ *
1287
+ * NOTE: Scenarios are NOT extracted since they may contain scripts that
1288
+ * reference other characters in the package.
1289
+ *
1290
+ * @param originalBuffer - The original .voxpkg file buffer
1291
+ * @param characterId - ID of the character to extract
1292
+ * @param options - Extraction options
1293
+ * @returns New package buffer with just the specified character
1294
+ */
1295
+ export declare function extractCharacterPackage(originalBuffer: BinaryData, characterId: string, options?: ExtractCharacterOptions): Uint8Array;
1296
+ /**
1297
+ * Options for adding a character to a package
1298
+ */
1299
+ export interface AddCharacterOptions {
1300
+ compressionLevel?: CompressionLevel;
1301
+ /** Books to include with the character */
1302
+ books?: VoxtaBook[];
1303
+ /** Assets to include (path relative to character dir -> data) */
1304
+ assets?: Map<string, BinaryData>;
1305
+ /** Thumbnail image */
1306
+ thumbnail?: BinaryData;
1307
+ }
1308
+ /**
1309
+ * Add a character to an existing Voxta package.
1310
+ *
1311
+ * @param originalBuffer - The original .voxpkg file buffer
1312
+ * @param character - The character to add
1313
+ * @param options - Options including books and assets
1314
+ * @returns New package buffer with the character added
1315
+ */
1316
+ export declare function addCharacterToPackage(originalBuffer: BinaryData, character: VoxtaCharacter, options?: AddCharacterOptions): Uint8Array;
1317
+ /**
1318
+ * Voxta Loss Reporting
1319
+ *
1320
+ * Documents what data is lost when exporting to Voxta format.
1321
+ */
1322
+ /**
1323
+ * Check what would be lost when exporting a card to Voxta format
1324
+ */
1325
+ export declare function checkVoxtaLoss(card: NormalizedCard): VoxtaLossReport;
1326
+ /**
1327
+ * Check if export would be lossless
1328
+ */
1329
+ export declare function isVoxtaExportLossless(card: NormalizedCard): boolean;
1330
+ /**
1331
+ * Format loss report as human-readable string
1332
+ */
1333
+ export declare function formatVoxtaLossReport(report: VoxtaLossReport): string;
1334
+ /**
1335
+ * Voxta Asset Enricher
1336
+ *
1337
+ * Analyzes Voxta asset paths to extract semantic tags and types.
1338
+ * e.g. "Avatars/Default/happy_idle_01.webp" -> tags: [emotion:happy, state:idle, variant:01]
1339
+ */
1340
+ export interface EnrichedAssetMetadata {
1341
+ type: "icon" | "sound" | "custom";
1342
+ tags: string[];
1343
+ }
1344
+ /**
1345
+ * Extract metadata from a Voxta asset path/filename
1346
+ */
1347
+ export declare function enrichVoxtaAsset(asset: ExtractedVoxtaAsset): EnrichedAssetMetadata;
1348
+
1349
+ export {};