@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.
- package/dist/types/v0/Character/Assets.d.ts +21 -0
- package/dist/types/v0/Character/Assets.d.ts.map +1 -0
- package/dist/types/v0/Character/Character.d.ts +161 -0
- package/dist/types/v0/Character/Character.d.ts.map +1 -0
- package/dist/types/v0/Character/Chat.d.ts +37 -0
- package/dist/types/v0/Character/Chat.d.ts.map +1 -0
- package/dist/types/v0/Character/Lorebook.d.ts +101 -0
- package/dist/types/v0/Character/Lorebook.d.ts.map +1 -0
- package/dist/types/v0/Character/Message.d.ts +40 -0
- package/dist/types/v0/Character/Message.d.ts.map +1 -0
- package/dist/types/v0/Character/Meta.d.ts +9 -0
- package/dist/types/v0/Character/Meta.d.ts.map +1 -0
- package/dist/types/v0/Character/index.d.ts +12 -0
- package/dist/types/v0/Character/index.d.ts.map +1 -0
- package/dist/types/v0/Executables/Executable.d.ts +73 -0
- package/dist/types/v0/Executables/Executable.d.ts.map +1 -0
- package/dist/types/v0/Executables/ReplaceHook.d.ts +93 -0
- package/dist/types/v0/Executables/ReplaceHook.d.ts.map +1 -0
- package/dist/types/v0/Executables/index.d.ts +3 -0
- package/dist/types/v0/Executables/index.d.ts.map +1 -0
- package/dist/types/v0/index.d.ts +4 -0
- package/dist/types/v0/index.d.ts.map +1 -0
- package/dist/types/v0/utils.d.ts +38 -0
- package/dist/types/v0/utils.d.ts.map +1 -0
- package/dist/v0/Character/Assets.d.ts +19 -3
- package/dist/v0/Character/Assets.js +2 -2
- package/dist/v0/Character/Assets.js.map +1 -1
- package/dist/v0/Character/Character.d.ts +153 -3
- package/dist/v0/Character/Chat.d.ts +32 -2
- package/dist/v0/Character/Lorebook.d.ts +70 -4
- package/dist/v0/Character/Message.d.ts +35 -3
- package/dist/v0/Character/Meta.d.ts +15 -2
- package/dist/v0/Character/Meta.js +1 -1
- package/dist/v0/Character/Meta.js.map +1 -1
- package/dist/v0/Executables/Executable.d.ts +70 -2
- package/dist/v0/Executables/ReplaceHook.d.ts +93 -4
- package/dist/v0/utils.d.ts +21 -4
- 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
|
|
4
|
+
import { z, type ZodType } from "zod";
|
|
5
5
|
|
|
6
6
|
export type ReplaceHookEntity = {
|
|
7
7
|
/** The input pattern. May contain additional javascript expression if `isInputPatternScripted` is true. */
|
|
@@ -29,7 +29,24 @@ export type ReplaceHookEntity = {
|
|
|
29
29
|
output: string;
|
|
30
30
|
};
|
|
31
31
|
|
|
32
|
-
export declare const ReplaceHookEntitySchema:
|
|
32
|
+
export declare const ReplaceHookEntitySchema: z.ZodObject<{
|
|
33
|
+
input: z.ZodString;
|
|
34
|
+
meta: z.ZodIntersection<z.ZodDiscriminatedUnion<readonly [z.ZodObject<{
|
|
35
|
+
type: z.ZodLiteral<"regex">;
|
|
36
|
+
flag: z.ZodString;
|
|
37
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
38
|
+
type: z.ZodLiteral<"string">;
|
|
39
|
+
caseSensitive: z.ZodDefault<z.ZodBoolean>;
|
|
40
|
+
}, z.core.$strip>], "type">, z.ZodPrefault<z.ZodObject<{
|
|
41
|
+
isInputPatternScripted: z.ZodDefault<z.ZodBoolean>;
|
|
42
|
+
isOutputScripted: z.ZodDefault<z.ZodBoolean>;
|
|
43
|
+
priority: z.ZodDefault<z.ZodNumber>;
|
|
44
|
+
}, z.core.$strip>>>;
|
|
45
|
+
output: z.ZodString;
|
|
46
|
+
}, z.core.$strip>;
|
|
47
|
+
/**
|
|
48
|
+
* Replace hooks. It's technically RegExp for request, display, and response.
|
|
49
|
+
*/;
|
|
33
50
|
|
|
34
51
|
/**
|
|
35
52
|
* The meta data for the replace hook.
|
|
@@ -56,7 +73,17 @@ export type ReplaceHookMeta = ({
|
|
|
56
73
|
/**
|
|
57
74
|
* The meta data for the replace hook.
|
|
58
75
|
*/
|
|
59
|
-
export declare const ReplaceHookMetaSchema:
|
|
76
|
+
export declare const ReplaceHookMetaSchema: z.ZodIntersection<z.ZodDiscriminatedUnion<readonly [z.ZodObject<{
|
|
77
|
+
type: z.ZodLiteral<"regex">;
|
|
78
|
+
flag: z.ZodString;
|
|
79
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
80
|
+
type: z.ZodLiteral<"string">;
|
|
81
|
+
caseSensitive: z.ZodDefault<z.ZodBoolean>;
|
|
82
|
+
}, z.core.$strip>], "type">, z.ZodPrefault<z.ZodObject<{
|
|
83
|
+
isInputPatternScripted: z.ZodDefault<z.ZodBoolean>;
|
|
84
|
+
isOutputScripted: z.ZodDefault<z.ZodBoolean>;
|
|
85
|
+
priority: z.ZodDefault<z.ZodNumber>;
|
|
86
|
+
}, z.core.$strip>>>;
|
|
60
87
|
|
|
61
88
|
/**
|
|
62
89
|
* Replace hooks. RegExp for request, display, and response.
|
|
@@ -167,4 +194,66 @@ export type ReplaceHook = {
|
|
|
167
194
|
/**
|
|
168
195
|
* Replace hooks. RegExp for request, display, and response.
|
|
169
196
|
*/
|
|
170
|
-
export declare const ReplaceHookSchema:
|
|
197
|
+
export declare const ReplaceHookSchema: z.ZodPrefault<z.ZodObject<{
|
|
198
|
+
display: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
199
|
+
input: z.ZodString;
|
|
200
|
+
meta: z.ZodIntersection<z.ZodDiscriminatedUnion<readonly [z.ZodObject<{
|
|
201
|
+
type: z.ZodLiteral<"regex">;
|
|
202
|
+
flag: z.ZodString;
|
|
203
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
204
|
+
type: z.ZodLiteral<"string">;
|
|
205
|
+
caseSensitive: z.ZodDefault<z.ZodBoolean>;
|
|
206
|
+
}, z.core.$strip>], "type">, z.ZodPrefault<z.ZodObject<{
|
|
207
|
+
isInputPatternScripted: z.ZodDefault<z.ZodBoolean>;
|
|
208
|
+
isOutputScripted: z.ZodDefault<z.ZodBoolean>;
|
|
209
|
+
priority: z.ZodDefault<z.ZodNumber>;
|
|
210
|
+
}, z.core.$strip>>>;
|
|
211
|
+
output: z.ZodString;
|
|
212
|
+
}, z.core.$strip>>>;
|
|
213
|
+
input: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
214
|
+
input: z.ZodString;
|
|
215
|
+
meta: z.ZodIntersection<z.ZodDiscriminatedUnion<readonly [z.ZodObject<{
|
|
216
|
+
type: z.ZodLiteral<"regex">;
|
|
217
|
+
flag: z.ZodString;
|
|
218
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
219
|
+
type: z.ZodLiteral<"string">;
|
|
220
|
+
caseSensitive: z.ZodDefault<z.ZodBoolean>;
|
|
221
|
+
}, z.core.$strip>], "type">, z.ZodPrefault<z.ZodObject<{
|
|
222
|
+
isInputPatternScripted: z.ZodDefault<z.ZodBoolean>;
|
|
223
|
+
isOutputScripted: z.ZodDefault<z.ZodBoolean>;
|
|
224
|
+
priority: z.ZodDefault<z.ZodNumber>;
|
|
225
|
+
}, z.core.$strip>>>;
|
|
226
|
+
output: z.ZodString;
|
|
227
|
+
}, z.core.$strip>>>;
|
|
228
|
+
output: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
229
|
+
input: z.ZodString;
|
|
230
|
+
meta: z.ZodIntersection<z.ZodDiscriminatedUnion<readonly [z.ZodObject<{
|
|
231
|
+
type: z.ZodLiteral<"regex">;
|
|
232
|
+
flag: z.ZodString;
|
|
233
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
234
|
+
type: z.ZodLiteral<"string">;
|
|
235
|
+
caseSensitive: z.ZodDefault<z.ZodBoolean>;
|
|
236
|
+
}, z.core.$strip>], "type">, z.ZodPrefault<z.ZodObject<{
|
|
237
|
+
isInputPatternScripted: z.ZodDefault<z.ZodBoolean>;
|
|
238
|
+
isOutputScripted: z.ZodDefault<z.ZodBoolean>;
|
|
239
|
+
priority: z.ZodDefault<z.ZodNumber>;
|
|
240
|
+
}, z.core.$strip>>>;
|
|
241
|
+
output: z.ZodString;
|
|
242
|
+
}, z.core.$strip>>>;
|
|
243
|
+
request: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
244
|
+
input: z.ZodString;
|
|
245
|
+
meta: z.ZodIntersection<z.ZodDiscriminatedUnion<readonly [z.ZodObject<{
|
|
246
|
+
type: z.ZodLiteral<"regex">;
|
|
247
|
+
flag: z.ZodString;
|
|
248
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
249
|
+
type: z.ZodLiteral<"string">;
|
|
250
|
+
caseSensitive: z.ZodDefault<z.ZodBoolean>;
|
|
251
|
+
}, z.core.$strip>], "type">, z.ZodPrefault<z.ZodObject<{
|
|
252
|
+
isInputPatternScripted: z.ZodDefault<z.ZodBoolean>;
|
|
253
|
+
isOutputScripted: z.ZodDefault<z.ZodBoolean>;
|
|
254
|
+
priority: z.ZodDefault<z.ZodNumber>;
|
|
255
|
+
}, z.core.$strip>>>;
|
|
256
|
+
output: z.ZodString;
|
|
257
|
+
}, z.core.$strip>>>;
|
|
258
|
+
}, z.core.$strip>>;
|
|
259
|
+
//# sourceMappingURL=ReplaceHook.d.ts.map;
|
package/dist/v0/utils.d.ts
CHANGED
|
@@ -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
|
|
4
|
+
import { z, type ZodType } from "zod";
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* Represents a file, either as a URL or as binary data (Uint8Array).
|
|
@@ -13,7 +13,16 @@ export type FileType = string | Uint8Array;
|
|
|
13
13
|
* Represents a file, either as a URL or as binary data (Uint8Array).
|
|
14
14
|
* @type {string | Uint8Array}
|
|
15
15
|
*/
|
|
16
|
-
export declare const FileSchema:
|
|
16
|
+
export declare const FileSchema: z.ZodUnion<readonly [z.ZodURL, z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>]>;
|
|
17
|
+
/**
|
|
18
|
+
* Custom validator to ensure all objects in the array have unique values for a specific key.
|
|
19
|
+
* @param key The key to check for uniqueness. It should be a string key of the object.
|
|
20
|
+
* @returns A predicate function for `z.refine`.
|
|
21
|
+
* @example
|
|
22
|
+
* ```ts
|
|
23
|
+
* const schema = z.array(z.object({ name: z.string() })).refine(unique("name"), { message: "Not unique" });
|
|
24
|
+
* ```
|
|
25
|
+
*/;
|
|
17
26
|
|
|
18
27
|
/**
|
|
19
28
|
* URL of an image. `local:` for browser storage (OpFS), otherwise a fetchable URL. While it can be `data:` URL for base64 encoded images, it's not recommended.
|
|
@@ -23,7 +32,11 @@ export type ImageURL = string;
|
|
|
23
32
|
/**
|
|
24
33
|
* URL of an image. `local:` for browser storage (OpFS), otherwise a fetchable URL. While it can be `data:` URL for base64 encoded images, it's not recommended.
|
|
25
34
|
*/
|
|
26
|
-
export declare const ImageURLSchema:
|
|
35
|
+
export declare const ImageURLSchema: z.ZodURL;
|
|
36
|
+
/**
|
|
37
|
+
* Binary data represented as Uint8Array.
|
|
38
|
+
* Useful for local file assets.
|
|
39
|
+
*/;
|
|
27
40
|
|
|
28
41
|
/**
|
|
29
42
|
* The binary data of the file. Used for local assets.
|
|
@@ -33,4 +46,8 @@ export type Uint8ArrayType = Uint8Array;
|
|
|
33
46
|
/**
|
|
34
47
|
* The binary data of the file. Used for local assets.
|
|
35
48
|
*/
|
|
36
|
-
export declare const Uint8ArraySchema:
|
|
49
|
+
export declare const Uint8ArraySchema: z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>;
|
|
50
|
+
/**
|
|
51
|
+
* Represents a file, either as a URL or as binary data (Uint8Array).
|
|
52
|
+
* Used for file assets.
|
|
53
|
+
*/;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arisutalk/character-spec",
|
|
3
3
|
"description": "Character specification, schema & migration for ArisuTalk",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.13",
|
|
5
5
|
"contributors": [
|
|
6
6
|
{
|
|
7
7
|
"name": "concertypin",
|
|
@@ -36,7 +36,6 @@
|
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
38
|
"@biomejs/biome": "^2.3.5",
|
|
39
|
-
"lint-staged": "^16.2.6",
|
|
40
39
|
"simple-git-hooks": "^2.13.1",
|
|
41
40
|
"tinyglobby": "^0.2.15",
|
|
42
41
|
"tsx": "^4.19.2",
|
|
@@ -59,4 +58,4 @@
|
|
|
59
58
|
}
|
|
60
59
|
},
|
|
61
60
|
"packageManager": "pnpm@10.16.1+sha512.0e155aa2629db8672b49e8475da6226aa4bdea85fdcdfdc15350874946d4f3c91faaf64cbdc4a5d1ab8002f473d5c3fcedcd197989cf0390f9badd3c04678706"
|
|
62
|
-
}
|
|
61
|
+
}
|