@arisutalk/character-spec 0.0.11 → 0.0.13

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 (38) hide show
  1. package/dist/types/v0/Character/Assets.d.ts +21 -0
  2. package/dist/types/v0/Character/Assets.d.ts.map +1 -0
  3. package/dist/types/v0/Character/Character.d.ts +161 -0
  4. package/dist/types/v0/Character/Character.d.ts.map +1 -0
  5. package/dist/types/v0/Character/Chat.d.ts +37 -0
  6. package/dist/types/v0/Character/Chat.d.ts.map +1 -0
  7. package/dist/types/v0/Character/Lorebook.d.ts +101 -0
  8. package/dist/types/v0/Character/Lorebook.d.ts.map +1 -0
  9. package/dist/types/v0/Character/Message.d.ts +40 -0
  10. package/dist/types/v0/Character/Message.d.ts.map +1 -0
  11. package/dist/types/v0/Character/Meta.d.ts +9 -0
  12. package/dist/types/v0/Character/Meta.d.ts.map +1 -0
  13. package/dist/types/v0/Character/index.d.ts +12 -0
  14. package/dist/types/v0/Character/index.d.ts.map +1 -0
  15. package/dist/types/v0/Executables/Executable.d.ts +73 -0
  16. package/dist/types/v0/Executables/Executable.d.ts.map +1 -0
  17. package/dist/types/v0/Executables/ReplaceHook.d.ts +93 -0
  18. package/dist/types/v0/Executables/ReplaceHook.d.ts.map +1 -0
  19. package/dist/types/v0/Executables/index.d.ts +3 -0
  20. package/dist/types/v0/Executables/index.d.ts.map +1 -0
  21. package/dist/types/v0/index.d.ts +4 -0
  22. package/dist/types/v0/index.d.ts.map +1 -0
  23. package/dist/types/v0/utils.d.ts +38 -0
  24. package/dist/types/v0/utils.d.ts.map +1 -0
  25. package/dist/v0/Character/Assets.d.ts +19 -3
  26. package/dist/v0/Character/Assets.js +2 -2
  27. package/dist/v0/Character/Assets.js.map +1 -1
  28. package/dist/v0/Character/Character.d.ts +153 -3
  29. package/dist/v0/Character/Chat.d.ts +32 -2
  30. package/dist/v0/Character/Lorebook.d.ts +70 -4
  31. package/dist/v0/Character/Message.d.ts +35 -3
  32. package/dist/v0/Character/Meta.d.ts +15 -2
  33. package/dist/v0/Character/Meta.js +1 -1
  34. package/dist/v0/Character/Meta.js.map +1 -1
  35. package/dist/v0/Executables/Executable.d.ts +70 -2
  36. package/dist/v0/Executables/ReplaceHook.d.ts +93 -4
  37. package/dist/v0/utils.d.ts +21 -4
  38. package/package.json +2 -3
@@ -1,7 +1,7 @@
1
1
  // Auto-generated TypeScript declarations from Zod schemas. DO NOT EDIT.
2
2
  // Regenerate with: pnpm generate-types
3
3
 
4
- import type { ZodType } from "zod";
4
+ import { z, type ZodType } from "zod";
5
5
 
6
6
  /**
7
7
  * An asset entity. Represents single asset, via either URL or binary data.
@@ -18,7 +18,14 @@ export type AssetEntity = {
18
18
  /**
19
19
  * An asset entity. Represents single asset, via either URL or binary data.
20
20
  */
21
- export declare const AssetEntitySchema: ZodType<AssetEntity>;
21
+ export declare const AssetEntitySchema: z.ZodObject<{
22
+ mimeType: z.ZodString;
23
+ name: z.ZodString;
24
+ data: z.ZodUnion<readonly [z.ZodURL, z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>]>;
25
+ }, z.core.$strip>;
26
+ /**
27
+ * @see {@link AssetsSetting}
28
+ */;
22
29
 
23
30
  /**
24
31
  * Settings for character assets.
@@ -38,4 +45,13 @@ export type AssetsSetting = {
38
45
  /**
39
46
  * Settings for character assets.
40
47
  */
41
- export declare const AssetsSettingSchema: ZodType<AssetsSetting>;
48
+ export declare const AssetsSettingSchema: z.ZodPrefault<z.ZodObject<{
49
+ assets: z.ZodDefault<z.ZodArray<z.ZodObject<{
50
+ mimeType: z.ZodString;
51
+ name: z.ZodString;
52
+ data: z.ZodUnion<readonly [z.ZodURL, z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>]>;
53
+ }, z.core.$strip>>>;
54
+ }, z.core.$strip>>;
55
+ /**
56
+ * This is the settings for character assets.
57
+ */;
@@ -13,8 +13,8 @@ const a = e.object({
13
13
  }).meta({
14
14
  description: "An asset entity. Represents single asset, via either URL or binary data."
15
15
  }), r = e.object({
16
- assets: e.array(a).refine(s("name"), { message: "Not unique key: name" }).meta({ description: "The assets of the character." })
17
- }).meta({ description: "Settings for character assets." });
16
+ assets: e.array(a).default([]).refine(s("name"), { message: "Not unique key: name" }).meta({ description: "The assets of the character." })
17
+ }).prefault({}).meta({ description: "Settings for character assets." });
18
18
  export {
19
19
  a as AssetEntitySchema,
20
20
  r as AssetsSettingSchema
@@ -1 +1 @@
1
- {"version":3,"file":"Assets.js","sources":["../../../src/types/v0/Character/Assets.ts"],"sourcesContent":["import { z } from \"zod\";\nimport { FileSchema, unique } from \"@/types/v0/utils\";\n\nexport const AssetEntitySchema = z\n .object({\n mimeType: z.string().meta({\n description:\n \"MIME type of the asset. Usually `image/*` or `video/*`.\",\n }),\n name: z.string().meta({\n description:\n \"The name of the asset. Used as the file name. Should be unique.\",\n }),\n data: FileSchema.meta({\n description: \"The data of the asset.\",\n }),\n })\n .meta({\n description:\n \"An asset entity. Represents single asset, via either URL or binary data.\",\n });\n\n/**\n * @see {@link AssetsSetting}\n */\nexport const AssetsSettingSchema = z\n .object({\n assets: z\n .array(AssetEntitySchema)\n .refine(unique(\"name\"), { message: \"Not unique key: name\" })\n .meta({ description: \"The assets of the character.\" }),\n })\n .meta({ description: \"Settings for character assets.\" });\n\n/**\n * This is the settings for character assets.\n */\nexport type AssetsSetting = z.infer<typeof AssetsSettingSchema>;\n"],"names":["AssetEntitySchema","z","FileSchema","AssetsSettingSchema","unique"],"mappings":";;AAGO,MAAMA,IAAoBC,EAC5B,OAAO;AAAA,EACJ,UAAUA,EAAE,OAAA,EAAS,KAAK;AAAA,IACtB,aACI;AAAA,EAAA,CACP;AAAA,EACD,MAAMA,EAAE,OAAA,EAAS,KAAK;AAAA,IAClB,aACI;AAAA,EAAA,CACP;AAAA,EACD,MAAMC,EAAW,KAAK;AAAA,IAClB,aAAa;AAAA,EAAA,CAChB;AACL,CAAC,EACA,KAAK;AAAA,EACF,aACI;AACR,CAAC,GAKQC,IAAsBF,EAC9B,OAAO;AAAA,EACJ,QAAQA,EACH,MAAMD,CAAiB,EACvB,OAAOI,EAAO,MAAM,GAAG,EAAE,SAAS,wBAAwB,EAC1D,KAAK,EAAE,aAAa,gCAAgC;AAC7D,CAAC,EACA,KAAK,EAAE,aAAa,kCAAkC;"}
1
+ {"version":3,"file":"Assets.js","sources":["../../../src/types/v0/Character/Assets.ts"],"sourcesContent":["import { z } from \"zod\";\nimport { FileSchema, unique } from \"@/types/v0/utils\";\n\nexport const AssetEntitySchema = z\n .object({\n mimeType: z.string().meta({\n description:\n \"MIME type of the asset. Usually `image/*` or `video/*`.\",\n }),\n name: z.string().meta({\n description:\n \"The name of the asset. Used as the file name. Should be unique.\",\n }),\n data: FileSchema.meta({\n description: \"The data of the asset.\",\n }),\n })\n .meta({\n description:\n \"An asset entity. Represents single asset, via either URL or binary data.\",\n });\n\n/**\n * @see {@link AssetsSetting}\n */\nexport const AssetsSettingSchema = z\n .object({\n assets: z\n .array(AssetEntitySchema)\n .default([])\n .refine(unique(\"name\"), { message: \"Not unique key: name\" })\n .meta({ description: \"The assets of the character.\" }),\n })\n .prefault({})\n .meta({ description: \"Settings for character assets.\" });\n\n/**\n * This is the settings for character assets.\n */\nexport type AssetsSetting = z.infer<typeof AssetsSettingSchema>;\n"],"names":["AssetEntitySchema","z","FileSchema","AssetsSettingSchema","unique"],"mappings":";;AAGO,MAAMA,IAAoBC,EAC5B,OAAO;AAAA,EACJ,UAAUA,EAAE,OAAA,EAAS,KAAK;AAAA,IACtB,aACI;AAAA,EAAA,CACP;AAAA,EACD,MAAMA,EAAE,OAAA,EAAS,KAAK;AAAA,IAClB,aACI;AAAA,EAAA,CACP;AAAA,EACD,MAAMC,EAAW,KAAK;AAAA,IAClB,aAAa;AAAA,EAAA,CAChB;AACL,CAAC,EACA,KAAK;AAAA,EACF,aACI;AACR,CAAC,GAKQC,IAAsBF,EAC9B,OAAO;AAAA,EACJ,QAAQA,EACH,MAAMD,CAAiB,EACvB,QAAQ,CAAA,CAAE,EACV,OAAOI,EAAO,MAAM,GAAG,EAAE,SAAS,uBAAA,CAAwB,EAC1D,KAAK,EAAE,aAAa,+BAAA,CAAgC;AAC7D,CAAC,EACA,SAAS,CAAA,CAAE,EACX,KAAK,EAAE,aAAa,iCAAA,CAAkC;"}
@@ -1,7 +1,7 @@
1
1
  // Auto-generated TypeScript declarations from Zod schemas. DO NOT EDIT.
2
2
  // Regenerate with: pnpm generate-types
3
3
 
4
- import type { ZodType } from "zod";
4
+ import { z, type ZodType } from "zod";
5
5
 
6
6
  /**
7
7
  * The prompt data for a character. Used to generate the character's persona. All parameters are for AI prompt and scriptable.
@@ -56,7 +56,36 @@ export type CharacterPromptData = {
56
56
  /**
57
57
  * The prompt data for a character. Used to generate the character's persona. All parameters are for AI prompt and scriptable.
58
58
  */
59
- export declare const CharacterPromptDataSchema: ZodType<CharacterPromptData>;
59
+ export declare const CharacterPromptDataSchema: z.ZodObject<{
60
+ description: z.ZodString;
61
+ authorsNote: z.ZodOptional<z.ZodString>;
62
+ lorebook: z.ZodPrefault<z.ZodObject<{
63
+ config: z.ZodPrefault<z.ZodObject<{
64
+ tokenLimit: z.ZodOptional<z.ZodInt>;
65
+ }, z.core.$strip>>;
66
+ data: z.ZodDefault<z.ZodArray<z.ZodObject<{
67
+ id: z.ZodString;
68
+ name: z.ZodString;
69
+ condition: z.ZodDefault<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
70
+ type: z.ZodLiteral<"regex_match">;
71
+ regexPattern: z.ZodString;
72
+ regexFlags: z.ZodOptional<z.ZodString>;
73
+ }, z.core.$strip>, z.ZodObject<{
74
+ type: z.ZodLiteral<"plain_text_match">;
75
+ text: z.ZodString;
76
+ }, z.core.$strip>, z.ZodObject<{
77
+ type: z.ZodLiteral<"always">;
78
+ }, z.core.$strip>], "type">>>;
79
+ multipleConditionResolveStrategy: z.ZodOptional<z.ZodEnum<{
80
+ any: "any";
81
+ all: "all";
82
+ }>>;
83
+ content: z.ZodString;
84
+ priority: z.ZodOptional<z.ZodNumber>;
85
+ enabled: z.ZodOptional<z.ZodBoolean>;
86
+ }, z.core.$strip>>>;
87
+ }, z.core.$strip>>;
88
+ }, z.core.$strip>;
60
89
 
61
90
  /**
62
91
  * Represents a specific AI character personality.
@@ -262,4 +291,125 @@ export type Character = {
262
291
  /**
263
292
  * Represents a specific AI character personality.
264
293
  */
265
- export declare const CharacterSchema: ZodType<Character>;
294
+ export declare const CharacterSchema: z.ZodObject<{
295
+ specVersion: z.ZodLiteral<0>;
296
+ id: z.ZodString;
297
+ name: z.ZodString;
298
+ description: z.ZodString;
299
+ avatarUrl: z.ZodOptional<z.ZodString>;
300
+ prompt: z.ZodObject<{
301
+ description: z.ZodString;
302
+ authorsNote: z.ZodOptional<z.ZodString>;
303
+ lorebook: z.ZodPrefault<z.ZodObject<{
304
+ config: z.ZodPrefault<z.ZodObject<{
305
+ tokenLimit: z.ZodOptional<z.ZodInt>;
306
+ }, z.core.$strip>>;
307
+ data: z.ZodDefault<z.ZodArray<z.ZodObject<{
308
+ id: z.ZodString;
309
+ name: z.ZodString;
310
+ condition: z.ZodDefault<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
311
+ type: z.ZodLiteral<"regex_match">;
312
+ regexPattern: z.ZodString;
313
+ regexFlags: z.ZodOptional<z.ZodString>;
314
+ }, z.core.$strip>, z.ZodObject<{
315
+ type: z.ZodLiteral<"plain_text_match">;
316
+ text: z.ZodString;
317
+ }, z.core.$strip>, z.ZodObject<{
318
+ type: z.ZodLiteral<"always">;
319
+ }, z.core.$strip>], "type">>>;
320
+ multipleConditionResolveStrategy: z.ZodOptional<z.ZodEnum<{
321
+ any: "any";
322
+ all: "all";
323
+ }>>;
324
+ content: z.ZodString;
325
+ priority: z.ZodOptional<z.ZodNumber>;
326
+ enabled: z.ZodOptional<z.ZodBoolean>;
327
+ }, z.core.$strip>>>;
328
+ }, z.core.$strip>>;
329
+ }, z.core.$strip>;
330
+ executables: z.ZodPrefault<z.ZodObject<{
331
+ runtimeSetting: z.ZodPrefault<z.ZodObject<{
332
+ mem: z.ZodOptional<z.ZodInt>;
333
+ timeout: z.ZodDefault<z.ZodInt>;
334
+ }, z.core.$strip>>;
335
+ replaceHooks: z.ZodPrefault<z.ZodObject<{
336
+ display: z.ZodDefault<z.ZodArray<z.ZodObject<{
337
+ input: z.ZodString;
338
+ meta: z.ZodIntersection<z.ZodDiscriminatedUnion<readonly [z.ZodObject<{
339
+ type: z.ZodLiteral<"regex">;
340
+ flag: z.ZodString;
341
+ }, z.core.$strip>, z.ZodObject<{
342
+ type: z.ZodLiteral<"string">;
343
+ caseSensitive: z.ZodDefault<z.ZodBoolean>;
344
+ }, z.core.$strip>], "type">, z.ZodPrefault<z.ZodObject<{
345
+ isInputPatternScripted: z.ZodDefault<z.ZodBoolean>;
346
+ isOutputScripted: z.ZodDefault<z.ZodBoolean>;
347
+ priority: z.ZodDefault<z.ZodNumber>;
348
+ }, z.core.$strip>>>;
349
+ output: z.ZodString;
350
+ }, z.core.$strip>>>;
351
+ input: z.ZodDefault<z.ZodArray<z.ZodObject<{
352
+ input: z.ZodString;
353
+ meta: z.ZodIntersection<z.ZodDiscriminatedUnion<readonly [z.ZodObject<{
354
+ type: z.ZodLiteral<"regex">;
355
+ flag: z.ZodString;
356
+ }, z.core.$strip>, z.ZodObject<{
357
+ type: z.ZodLiteral<"string">;
358
+ caseSensitive: z.ZodDefault<z.ZodBoolean>;
359
+ }, z.core.$strip>], "type">, z.ZodPrefault<z.ZodObject<{
360
+ isInputPatternScripted: z.ZodDefault<z.ZodBoolean>;
361
+ isOutputScripted: z.ZodDefault<z.ZodBoolean>;
362
+ priority: z.ZodDefault<z.ZodNumber>;
363
+ }, z.core.$strip>>>;
364
+ output: z.ZodString;
365
+ }, z.core.$strip>>>;
366
+ output: z.ZodDefault<z.ZodArray<z.ZodObject<{
367
+ input: z.ZodString;
368
+ meta: z.ZodIntersection<z.ZodDiscriminatedUnion<readonly [z.ZodObject<{
369
+ type: z.ZodLiteral<"regex">;
370
+ flag: z.ZodString;
371
+ }, z.core.$strip>, z.ZodObject<{
372
+ type: z.ZodLiteral<"string">;
373
+ caseSensitive: z.ZodDefault<z.ZodBoolean>;
374
+ }, z.core.$strip>], "type">, z.ZodPrefault<z.ZodObject<{
375
+ isInputPatternScripted: z.ZodDefault<z.ZodBoolean>;
376
+ isOutputScripted: z.ZodDefault<z.ZodBoolean>;
377
+ priority: z.ZodDefault<z.ZodNumber>;
378
+ }, z.core.$strip>>>;
379
+ output: z.ZodString;
380
+ }, z.core.$strip>>>;
381
+ request: z.ZodDefault<z.ZodArray<z.ZodObject<{
382
+ input: z.ZodString;
383
+ meta: z.ZodIntersection<z.ZodDiscriminatedUnion<readonly [z.ZodObject<{
384
+ type: z.ZodLiteral<"regex">;
385
+ flag: z.ZodString;
386
+ }, z.core.$strip>, z.ZodObject<{
387
+ type: z.ZodLiteral<"string">;
388
+ caseSensitive: z.ZodDefault<z.ZodBoolean>;
389
+ }, z.core.$strip>], "type">, z.ZodPrefault<z.ZodObject<{
390
+ isInputPatternScripted: z.ZodDefault<z.ZodBoolean>;
391
+ isOutputScripted: z.ZodDefault<z.ZodBoolean>;
392
+ priority: z.ZodDefault<z.ZodNumber>;
393
+ }, z.core.$strip>>>;
394
+ output: z.ZodString;
395
+ }, z.core.$strip>>>;
396
+ }, z.core.$strip>>;
397
+ }, z.core.$strip>>;
398
+ metadata: z.ZodPrefault<z.ZodObject<{
399
+ author: z.ZodOptional<z.ZodString>;
400
+ license: z.ZodDefault<z.ZodString>;
401
+ version: z.ZodOptional<z.ZodString>;
402
+ distributedOn: z.ZodOptional<z.ZodString>;
403
+ additionalInfo: z.ZodOptional<z.ZodString>;
404
+ }, z.core.$strip>>;
405
+ assets: z.ZodPrefault<z.ZodObject<{
406
+ assets: z.ZodDefault<z.ZodArray<z.ZodObject<{
407
+ mimeType: z.ZodString;
408
+ name: z.ZodString;
409
+ data: z.ZodUnion<readonly [z.ZodURL, z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>]>;
410
+ }, z.core.$strip>>>;
411
+ }, z.core.$strip>>;
412
+ }, z.core.$strip>;
413
+ /**
414
+ * Represents a specific AI character personality.
415
+ */;
@@ -1,7 +1,7 @@
1
1
  // Auto-generated TypeScript declarations from Zod schemas. DO NOT EDIT.
2
2
  // Regenerate with: pnpm generate-types
3
3
 
4
- import type { ZodType } from "zod";
4
+ import { z, type ZodType } from "zod";
5
5
 
6
6
  /**
7
7
  * Represents a chat session with a character.
@@ -54,4 +54,34 @@ export type Chat = {
54
54
  /**
55
55
  * Represents a chat session with a character.
56
56
  */
57
- export declare const ChatSchema: ZodType<Chat>;
57
+ export declare const ChatSchema: z.ZodObject<{
58
+ id: z.ZodString;
59
+ characterId: z.ZodString;
60
+ title: z.ZodDefault<z.ZodString>;
61
+ createdAt: z.ZodDefault<z.ZodNumber>;
62
+ updatedAt: z.ZodDefault<z.ZodNumber>;
63
+ lorebook: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodObject<{
64
+ id: z.ZodString;
65
+ name: z.ZodString;
66
+ condition: z.ZodDefault<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
67
+ type: z.ZodLiteral<"regex_match">;
68
+ regexPattern: z.ZodString;
69
+ regexFlags: z.ZodOptional<z.ZodString>;
70
+ }, z.core.$strip>, z.ZodObject<{
71
+ type: z.ZodLiteral<"plain_text_match">;
72
+ text: z.ZodString;
73
+ }, z.core.$strip>, z.ZodObject<{
74
+ type: z.ZodLiteral<"always">;
75
+ }, z.core.$strip>], "type">>>;
76
+ multipleConditionResolveStrategy: z.ZodOptional<z.ZodEnum<{
77
+ any: "any";
78
+ all: "all";
79
+ }>>;
80
+ content: z.ZodString;
81
+ priority: z.ZodOptional<z.ZodNumber>;
82
+ enabled: z.ZodOptional<z.ZodBoolean>;
83
+ }, z.core.$strip>>>>;
84
+ }, z.core.$strip>;
85
+ /**
86
+ * Represents a chat session with a character.
87
+ */;
@@ -1,7 +1,7 @@
1
1
  // Auto-generated TypeScript declarations from Zod schemas. DO NOT EDIT.
2
2
  // Regenerate with: pnpm generate-types
3
3
 
4
- import type { ZodType } from "zod";
4
+ import { z, type ZodType } from "zod";
5
5
 
6
6
  export type LorebookCondition = {
7
7
  /** This condition matches the regex pattern. */
@@ -20,7 +20,20 @@ export type LorebookCondition = {
20
20
  type: "always";
21
21
  };
22
22
 
23
- export declare const LorebookConditionSchema: ZodType<LorebookCondition>;
23
+ export declare const LorebookConditionSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
24
+ type: z.ZodLiteral<"regex_match">;
25
+ regexPattern: z.ZodString;
26
+ regexFlags: z.ZodOptional<z.ZodString>;
27
+ }, z.core.$strip>, z.ZodObject<{
28
+ type: z.ZodLiteral<"plain_text_match">;
29
+ text: z.ZodString;
30
+ }, z.core.$strip>, z.ZodObject<{
31
+ type: z.ZodLiteral<"always">;
32
+ }, z.core.$strip>], "type">;
33
+ /**
34
+ * The condition for the lorebook to be activated.
35
+ * @see {@link LorebookConditionSchema}
36
+ */;
24
37
 
25
38
  export type LorebookData = {
26
39
  /** The configuration for the lorebook. Not scriptable. */
@@ -62,7 +75,36 @@ export type LorebookData = {
62
75
  }[];
63
76
  };
64
77
 
65
- export declare const LorebookDataSchema: ZodType<LorebookData>;
78
+ export declare const LorebookDataSchema: z.ZodPrefault<z.ZodObject<{
79
+ config: z.ZodPrefault<z.ZodObject<{
80
+ tokenLimit: z.ZodOptional<z.ZodInt>;
81
+ }, z.core.$strip>>;
82
+ data: z.ZodDefault<z.ZodArray<z.ZodObject<{
83
+ id: z.ZodString;
84
+ name: z.ZodString;
85
+ condition: z.ZodDefault<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
86
+ type: z.ZodLiteral<"regex_match">;
87
+ regexPattern: z.ZodString;
88
+ regexFlags: z.ZodOptional<z.ZodString>;
89
+ }, z.core.$strip>, z.ZodObject<{
90
+ type: z.ZodLiteral<"plain_text_match">;
91
+ text: z.ZodString;
92
+ }, z.core.$strip>, z.ZodObject<{
93
+ type: z.ZodLiteral<"always">;
94
+ }, z.core.$strip>], "type">>>;
95
+ multipleConditionResolveStrategy: z.ZodOptional<z.ZodEnum<{
96
+ any: "any";
97
+ all: "all";
98
+ }>>;
99
+ content: z.ZodString;
100
+ priority: z.ZodOptional<z.ZodNumber>;
101
+ enabled: z.ZodOptional<z.ZodBoolean>;
102
+ }, z.core.$strip>>>;
103
+ }, z.core.$strip>>;
104
+ /**
105
+ * Object containing all data for the lorebook.
106
+ * It's meant to be stored in the database and many other places.
107
+ */;
66
108
 
67
109
  /**
68
110
  * A lorebook entry. Small part of prompts activated by session's text matching.
@@ -102,4 +144,28 @@ export type LorebookEntry = {
102
144
  /**
103
145
  * A lorebook entry. Small part of prompts activated by session's text matching.
104
146
  */
105
- export declare const LorebookEntrySchema: ZodType<LorebookEntry>;
147
+ export declare const LorebookEntrySchema: z.ZodObject<{
148
+ id: z.ZodString;
149
+ name: z.ZodString;
150
+ condition: z.ZodDefault<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
151
+ type: z.ZodLiteral<"regex_match">;
152
+ regexPattern: z.ZodString;
153
+ regexFlags: z.ZodOptional<z.ZodString>;
154
+ }, z.core.$strip>, z.ZodObject<{
155
+ type: z.ZodLiteral<"plain_text_match">;
156
+ text: z.ZodString;
157
+ }, z.core.$strip>, z.ZodObject<{
158
+ type: z.ZodLiteral<"always">;
159
+ }, z.core.$strip>], "type">>>;
160
+ multipleConditionResolveStrategy: z.ZodOptional<z.ZodEnum<{
161
+ any: "any";
162
+ all: "all";
163
+ }>>;
164
+ content: z.ZodString;
165
+ priority: z.ZodOptional<z.ZodNumber>;
166
+ enabled: z.ZodOptional<z.ZodBoolean>;
167
+ }, z.core.$strip>;
168
+ /**
169
+ * A lorebook is a collection of lorebooks.
170
+ * Lorebook is a small part of prompts which is activated by session's text matching.
171
+ */;
@@ -1,7 +1,7 @@
1
1
  // Auto-generated TypeScript declarations from Zod schemas. DO NOT EDIT.
2
2
  // Regenerate with: pnpm generate-types
3
3
 
4
- import type { ZodType } from "zod";
4
+ import { z, type ZodType } from "zod";
5
5
 
6
6
  /**
7
7
  * Represents a single message in a chat history.
@@ -42,7 +42,32 @@ export type Message = {
42
42
  /**
43
43
  * Represents a single message in a chat history.
44
44
  */
45
- export declare const MessageSchema: ZodType<Message>;
45
+ export declare const MessageSchema: z.ZodObject<{
46
+ id: z.ZodString;
47
+ chatId: z.ZodString;
48
+ role: z.ZodEnum<{
49
+ user: "user";
50
+ assistant: "assistant";
51
+ system: "system";
52
+ }>;
53
+ content: z.ZodDiscriminatedUnion<[z.ZodObject<{
54
+ type: z.ZodLiteral<"text">;
55
+ data: z.ZodString;
56
+ }, z.core.$strip>, z.ZodObject<{
57
+ type: z.ZodLiteral<"file">;
58
+ data: z.ZodUnion<readonly [z.ZodURL, z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>]>;
59
+ mimeType: z.ZodString;
60
+ }, z.core.$strip>], "type">;
61
+ timestamp: z.ZodOptional<z.ZodNumber>;
62
+ inlays: z.ZodDefault<z.ZodArray<z.ZodObject<{
63
+ mimeType: z.ZodString;
64
+ name: z.ZodString;
65
+ data: z.ZodUnion<readonly [z.ZodURL, z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>]>;
66
+ }, z.core.$strip>>>;
67
+ }, z.core.$strip>;
68
+ /**
69
+ * Represents a single message in a chat history.
70
+ */;
46
71
 
47
72
  /**
48
73
  * Represents the role of the message sender.
@@ -52,4 +77,11 @@ export type Role = "user" | "assistant" | "system";
52
77
  /**
53
78
  * Represents the role of the message sender.
54
79
  */
55
- export declare const RoleSchema: ZodType<Role>;
80
+ export declare const RoleSchema: z.ZodEnum<{
81
+ user: "user";
82
+ assistant: "assistant";
83
+ system: "system";
84
+ }>;
85
+ /**
86
+ * @see {@link Message}
87
+ */;
@@ -1,8 +1,11 @@
1
1
  // Auto-generated TypeScript declarations from Zod schemas. DO NOT EDIT.
2
2
  // Regenerate with: pnpm generate-types
3
3
 
4
- import type { ZodType } from "zod";
4
+ import { z, type ZodType } from "zod";
5
5
 
6
+ /**
7
+ * Meta information about the character.
8
+ */
6
9
  export type Meta = {
7
10
  /** The author of the character. Optional. */
8
11
  author?: string | undefined;
@@ -16,4 +19,14 @@ export type Meta = {
16
19
  additionalInfo?: string | undefined;
17
20
  };
18
21
 
19
- export declare const MetaSchema: ZodType<Meta>;
22
+ /**
23
+ * Meta information about the character.
24
+ */
25
+ export declare const MetaSchema: z.ZodPrefault<z.ZodObject<{
26
+ author: z.ZodOptional<z.ZodString>;
27
+ license: z.ZodDefault<z.ZodString>;
28
+ version: z.ZodOptional<z.ZodString>;
29
+ distributedOn: z.ZodOptional<z.ZodString>;
30
+ additionalInfo: z.ZodOptional<z.ZodString>;
31
+ }, z.core.$strip>>;
32
+ //# sourceMappingURL=Meta.d.ts.map;
@@ -15,7 +15,7 @@ const t = e.object({
15
15
  additionalInfo: e.string().optional().meta({
16
16
  description: "Additional information about the character, which can't be represented by other fields. Optional."
17
17
  })
18
- });
18
+ }).prefault({}).meta({ description: "Meta information about the character." });
19
19
  export {
20
20
  t as MetaSchema
21
21
  };
@@ -1 +1 @@
1
- {"version":3,"file":"Meta.js","sources":["../../../src/types/v0/Character/Meta.ts"],"sourcesContent":["import * as z from \"zod\";\n\nexport const MetaSchema = z.object({\n author: z.string().optional().meta({\n description: \"The author of the character. Optional.\",\n }),\n\n license: z\n .string()\n .default(\"ARR\")\n .meta({\n description:\n \"The license of the character. Optional. \" +\n \"Using SPDX license identifier or URL is recommended. \" +\n \"Default: ARR, which means the character is all rights reserved by the author.\",\n }),\n version: z.string().optional().meta({\n description: \"The version of the character. Optional.\",\n }),\n\n distributedOn: z\n .string()\n .optional()\n .meta({\n description:\n \"The distributed page of the character.\" +\n \"URL is recommended. Optional.\",\n }),\n additionalInfo: z\n .string()\n .optional()\n .meta({\n description:\n \"Additional information about the character, \" +\n \"which can't be represented by other fields. Optional.\",\n }),\n});\n"],"names":["MetaSchema","z"],"mappings":";AAEO,MAAMA,IAAaC,EAAE,OAAO;AAAA,EAC/B,QAAQA,EAAE,OAAA,EAAS,SAAA,EAAW,KAAK;AAAA,IAC/B,aAAa;AAAA,EAAA,CAChB;AAAA,EAED,SAASA,EACJ,OAAA,EACA,QAAQ,KAAK,EACb,KAAK;AAAA,IACF,aACI;AAAA,EAAA,CAGP;AAAA,EACL,SAASA,EAAE,OAAA,EAAS,SAAA,EAAW,KAAK;AAAA,IAChC,aAAa;AAAA,EAAA,CAChB;AAAA,EAED,eAAeA,EACV,OAAA,EACA,SAAA,EACA,KAAK;AAAA,IACF,aACI;AAAA,EAAA,CAEP;AAAA,EACL,gBAAgBA,EACX,OAAA,EACA,SAAA,EACA,KAAK;AAAA,IACF,aACI;AAAA,EAAA,CAEP;AACT,CAAC;"}
1
+ {"version":3,"file":"Meta.js","sources":["../../../src/types/v0/Character/Meta.ts"],"sourcesContent":["import * as z from \"zod\";\n\nexport const MetaSchema = z\n .object({\n author: z.string().optional().meta({\n description: \"The author of the character. Optional.\",\n }),\n\n license: z\n .string()\n .default(\"ARR\")\n .meta({\n description:\n \"The license of the character. Optional. \" +\n \"Using SPDX license identifier or URL is recommended. \" +\n \"Default: ARR, which means the character is all rights reserved by the author.\",\n }),\n version: z.string().optional().meta({\n description: \"The version of the character. Optional.\",\n }),\n\n distributedOn: z\n .string()\n .optional()\n .meta({\n description:\n \"The distributed page of the character.\" +\n \"URL is recommended. Optional.\",\n }),\n additionalInfo: z\n .string()\n .optional()\n .meta({\n description:\n \"Additional information about the character, \" +\n \"which can't be represented by other fields. Optional.\",\n }),\n })\n .prefault({})\n .meta({ description: \"Meta information about the character.\" });\n"],"names":["MetaSchema","z"],"mappings":";AAEO,MAAMA,IAAaC,EACrB,OAAO;AAAA,EACJ,QAAQA,EAAE,OAAA,EAAS,SAAA,EAAW,KAAK;AAAA,IAC/B,aAAa;AAAA,EAAA,CAChB;AAAA,EAED,SAASA,EACJ,OAAA,EACA,QAAQ,KAAK,EACb,KAAK;AAAA,IACF,aACI;AAAA,EAAA,CAGP;AAAA,EACL,SAASA,EAAE,OAAA,EAAS,SAAA,EAAW,KAAK;AAAA,IAChC,aAAa;AAAA,EAAA,CAChB;AAAA,EAED,eAAeA,EACV,OAAA,EACA,SAAA,EACA,KAAK;AAAA,IACF,aACI;AAAA,EAAA,CAEP;AAAA,EACL,gBAAgBA,EACX,OAAA,EACA,SAAA,EACA,KAAK;AAAA,IACF,aACI;AAAA,EAAA,CAEP;AACT,CAAC,EACA,SAAS,CAAA,CAAE,EACX,KAAK,EAAE,aAAa,wCAAA,CAAyC;"}
@@ -1,7 +1,7 @@
1
1
  // Auto-generated TypeScript declarations from Zod schemas. DO NOT EDIT.
2
2
  // Regenerate with: pnpm generate-types
3
3
 
4
- import type { ZodType } from "zod";
4
+ import { z, type ZodType } from "zod";
5
5
 
6
6
  /**
7
7
  * Script settings for character. Includes hooks and script settings.
@@ -122,4 +122,72 @@ export type ScriptSetting = {
122
122
  /**
123
123
  * Script settings for character. Includes hooks and script settings.
124
124
  */
125
- export declare const ScriptSettingSchema: ZodType<ScriptSetting>;
125
+ export declare const ScriptSettingSchema: z.ZodPrefault<z.ZodObject<{
126
+ runtimeSetting: z.ZodPrefault<z.ZodObject<{
127
+ mem: z.ZodOptional<z.ZodInt>;
128
+ timeout: z.ZodDefault<z.ZodInt>;
129
+ }, z.core.$strip>>;
130
+ replaceHooks: z.ZodPrefault<z.ZodObject<{
131
+ display: z.ZodDefault<z.ZodArray<z.ZodObject<{
132
+ input: z.ZodString;
133
+ meta: z.ZodIntersection<z.ZodDiscriminatedUnion<readonly [z.ZodObject<{
134
+ type: z.ZodLiteral<"regex">;
135
+ flag: z.ZodString;
136
+ }, z.core.$strip>, z.ZodObject<{
137
+ type: z.ZodLiteral<"string">;
138
+ caseSensitive: z.ZodDefault<z.ZodBoolean>;
139
+ }, z.core.$strip>], "type">, z.ZodPrefault<z.ZodObject<{
140
+ isInputPatternScripted: z.ZodDefault<z.ZodBoolean>;
141
+ isOutputScripted: z.ZodDefault<z.ZodBoolean>;
142
+ priority: z.ZodDefault<z.ZodNumber>;
143
+ }, z.core.$strip>>>;
144
+ output: z.ZodString;
145
+ }, z.core.$strip>>>;
146
+ input: z.ZodDefault<z.ZodArray<z.ZodObject<{
147
+ input: z.ZodString;
148
+ meta: z.ZodIntersection<z.ZodDiscriminatedUnion<readonly [z.ZodObject<{
149
+ type: z.ZodLiteral<"regex">;
150
+ flag: z.ZodString;
151
+ }, z.core.$strip>, z.ZodObject<{
152
+ type: z.ZodLiteral<"string">;
153
+ caseSensitive: z.ZodDefault<z.ZodBoolean>;
154
+ }, z.core.$strip>], "type">, z.ZodPrefault<z.ZodObject<{
155
+ isInputPatternScripted: z.ZodDefault<z.ZodBoolean>;
156
+ isOutputScripted: z.ZodDefault<z.ZodBoolean>;
157
+ priority: z.ZodDefault<z.ZodNumber>;
158
+ }, z.core.$strip>>>;
159
+ output: z.ZodString;
160
+ }, z.core.$strip>>>;
161
+ output: z.ZodDefault<z.ZodArray<z.ZodObject<{
162
+ input: z.ZodString;
163
+ meta: z.ZodIntersection<z.ZodDiscriminatedUnion<readonly [z.ZodObject<{
164
+ type: z.ZodLiteral<"regex">;
165
+ flag: z.ZodString;
166
+ }, z.core.$strip>, z.ZodObject<{
167
+ type: z.ZodLiteral<"string">;
168
+ caseSensitive: z.ZodDefault<z.ZodBoolean>;
169
+ }, z.core.$strip>], "type">, z.ZodPrefault<z.ZodObject<{
170
+ isInputPatternScripted: z.ZodDefault<z.ZodBoolean>;
171
+ isOutputScripted: z.ZodDefault<z.ZodBoolean>;
172
+ priority: z.ZodDefault<z.ZodNumber>;
173
+ }, z.core.$strip>>>;
174
+ output: z.ZodString;
175
+ }, z.core.$strip>>>;
176
+ request: z.ZodDefault<z.ZodArray<z.ZodObject<{
177
+ input: z.ZodString;
178
+ meta: z.ZodIntersection<z.ZodDiscriminatedUnion<readonly [z.ZodObject<{
179
+ type: z.ZodLiteral<"regex">;
180
+ flag: z.ZodString;
181
+ }, z.core.$strip>, z.ZodObject<{
182
+ type: z.ZodLiteral<"string">;
183
+ caseSensitive: z.ZodDefault<z.ZodBoolean>;
184
+ }, z.core.$strip>], "type">, z.ZodPrefault<z.ZodObject<{
185
+ isInputPatternScripted: z.ZodDefault<z.ZodBoolean>;
186
+ isOutputScripted: z.ZodDefault<z.ZodBoolean>;
187
+ priority: z.ZodDefault<z.ZodNumber>;
188
+ }, z.core.$strip>>>;
189
+ output: z.ZodString;
190
+ }, z.core.$strip>>>;
191
+ }, z.core.$strip>>;
192
+ }, z.core.$strip>>;
193
+ //# sourceMappingURL=Executable.d.ts.map;