@arisutalk/character-spec 0.0.12 → 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 +4 -4
- package/dist/types/v0/Character/Assets.d.ts.map +1 -1
- package/dist/types/v0/Character/Character.d.ts +6 -6
- package/dist/types/v0/Character/Meta.d.ts +2 -2
- package/dist/types/v0/Character/Meta.d.ts.map +1 -1
- package/dist/v0/Character/Assets.d.ts +4 -4
- package/dist/v0/Character/Assets.js +2 -2
- package/dist/v0/Character/Assets.js.map +1 -1
- package/dist/v0/Character/Character.d.ts +6 -6
- package/dist/v0/Character/Meta.d.ts +8 -2
- package/dist/v0/Character/Meta.js +1 -1
- package/dist/v0/Character/Meta.js.map +1 -1
- package/package.json +2 -3
|
@@ -7,13 +7,13 @@ export declare const AssetEntitySchema: z.ZodObject<{
|
|
|
7
7
|
/**
|
|
8
8
|
* @see {@link AssetsSetting}
|
|
9
9
|
*/
|
|
10
|
-
export declare const AssetsSettingSchema: z.ZodObject<{
|
|
11
|
-
assets: z.ZodArray<z.ZodObject<{
|
|
10
|
+
export declare const AssetsSettingSchema: z.ZodPrefault<z.ZodObject<{
|
|
11
|
+
assets: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
12
12
|
mimeType: z.ZodString;
|
|
13
13
|
name: z.ZodString;
|
|
14
14
|
data: z.ZodUnion<readonly [z.ZodURL, z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>]>;
|
|
15
|
-
}, z.core.$strip
|
|
16
|
-
}, z.core.$strip
|
|
15
|
+
}, z.core.$strip>>>;
|
|
16
|
+
}, z.core.$strip>>;
|
|
17
17
|
/**
|
|
18
18
|
* This is the settings for character assets.
|
|
19
19
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Assets.d.ts","sourceRoot":"","sources":["../../../../src/types/v0/Character/Assets.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,iBAAiB;;;;iBAiBxB,CAAC;AAEP;;GAEG;AACH,eAAO,MAAM,mBAAmB;;;;;;
|
|
1
|
+
{"version":3,"file":"Assets.d.ts","sourceRoot":"","sources":["../../../../src/types/v0/Character/Assets.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,iBAAiB;;;;iBAiBxB,CAAC;AAEP;;GAEG;AACH,eAAO,MAAM,mBAAmB;;;;;;kBAS4B,CAAC;AAE7D;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC"}
|
|
@@ -139,20 +139,20 @@ export declare const CharacterSchema: z.ZodObject<{
|
|
|
139
139
|
}, z.core.$strip>>>;
|
|
140
140
|
}, z.core.$strip>>;
|
|
141
141
|
}, z.core.$strip>>;
|
|
142
|
-
metadata: z.ZodObject<{
|
|
142
|
+
metadata: z.ZodPrefault<z.ZodObject<{
|
|
143
143
|
author: z.ZodOptional<z.ZodString>;
|
|
144
144
|
license: z.ZodDefault<z.ZodString>;
|
|
145
145
|
version: z.ZodOptional<z.ZodString>;
|
|
146
146
|
distributedOn: z.ZodOptional<z.ZodString>;
|
|
147
147
|
additionalInfo: z.ZodOptional<z.ZodString>;
|
|
148
|
-
}, z.core.$strip
|
|
149
|
-
assets: z.ZodObject<{
|
|
150
|
-
assets: z.ZodArray<z.ZodObject<{
|
|
148
|
+
}, z.core.$strip>>;
|
|
149
|
+
assets: z.ZodPrefault<z.ZodObject<{
|
|
150
|
+
assets: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
151
151
|
mimeType: z.ZodString;
|
|
152
152
|
name: z.ZodString;
|
|
153
153
|
data: z.ZodUnion<readonly [z.ZodURL, z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>]>;
|
|
154
|
-
}, z.core.$strip
|
|
155
|
-
}, z.core.$strip
|
|
154
|
+
}, z.core.$strip>>>;
|
|
155
|
+
}, z.core.$strip>>;
|
|
156
156
|
}, z.core.$strip>;
|
|
157
157
|
/**
|
|
158
158
|
* Represents a specific AI character personality.
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import * as z from "zod";
|
|
2
|
-
export declare const MetaSchema: z.ZodObject<{
|
|
2
|
+
export declare const MetaSchema: z.ZodPrefault<z.ZodObject<{
|
|
3
3
|
author: z.ZodOptional<z.ZodString>;
|
|
4
4
|
license: z.ZodDefault<z.ZodString>;
|
|
5
5
|
version: z.ZodOptional<z.ZodString>;
|
|
6
6
|
distributedOn: z.ZodOptional<z.ZodString>;
|
|
7
7
|
additionalInfo: z.ZodOptional<z.ZodString>;
|
|
8
|
-
}, z.core.$strip
|
|
8
|
+
}, z.core.$strip>>;
|
|
9
9
|
//# sourceMappingURL=Meta.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Meta.d.ts","sourceRoot":"","sources":["../../../../src/types/v0/Character/Meta.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAEzB,eAAO,MAAM,UAAU;;;;;;
|
|
1
|
+
{"version":3,"file":"Meta.d.ts","sourceRoot":"","sources":["../../../../src/types/v0/Character/Meta.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAEzB,eAAO,MAAM,UAAU;;;;;;kBAqC4C,CAAC"}
|
|
@@ -45,13 +45,13 @@ export type AssetsSetting = {
|
|
|
45
45
|
/**
|
|
46
46
|
* Settings for character assets.
|
|
47
47
|
*/
|
|
48
|
-
export declare const AssetsSettingSchema: z.ZodObject<{
|
|
49
|
-
assets: z.ZodArray<z.ZodObject<{
|
|
48
|
+
export declare const AssetsSettingSchema: z.ZodPrefault<z.ZodObject<{
|
|
49
|
+
assets: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
50
50
|
mimeType: z.ZodString;
|
|
51
51
|
name: z.ZodString;
|
|
52
52
|
data: z.ZodUnion<readonly [z.ZodURL, z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>]>;
|
|
53
|
-
}, z.core.$strip
|
|
54
|
-
}, z.core.$strip
|
|
53
|
+
}, z.core.$strip>>>;
|
|
54
|
+
}, z.core.$strip>>;
|
|
55
55
|
/**
|
|
56
56
|
* This is the settings for character assets.
|
|
57
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,
|
|
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;"}
|
|
@@ -395,20 +395,20 @@ export declare const CharacterSchema: z.ZodObject<{
|
|
|
395
395
|
}, z.core.$strip>>>;
|
|
396
396
|
}, z.core.$strip>>;
|
|
397
397
|
}, z.core.$strip>>;
|
|
398
|
-
metadata: z.ZodObject<{
|
|
398
|
+
metadata: z.ZodPrefault<z.ZodObject<{
|
|
399
399
|
author: z.ZodOptional<z.ZodString>;
|
|
400
400
|
license: z.ZodDefault<z.ZodString>;
|
|
401
401
|
version: z.ZodOptional<z.ZodString>;
|
|
402
402
|
distributedOn: z.ZodOptional<z.ZodString>;
|
|
403
403
|
additionalInfo: z.ZodOptional<z.ZodString>;
|
|
404
|
-
}, z.core.$strip
|
|
405
|
-
assets: z.ZodObject<{
|
|
406
|
-
assets: z.ZodArray<z.ZodObject<{
|
|
404
|
+
}, z.core.$strip>>;
|
|
405
|
+
assets: z.ZodPrefault<z.ZodObject<{
|
|
406
|
+
assets: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
407
407
|
mimeType: z.ZodString;
|
|
408
408
|
name: z.ZodString;
|
|
409
409
|
data: z.ZodUnion<readonly [z.ZodURL, z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>]>;
|
|
410
|
-
}, z.core.$strip
|
|
411
|
-
}, z.core.$strip
|
|
410
|
+
}, z.core.$strip>>>;
|
|
411
|
+
}, z.core.$strip>>;
|
|
412
412
|
}, z.core.$strip>;
|
|
413
413
|
/**
|
|
414
414
|
* Represents a specific AI character personality.
|
|
@@ -3,6 +3,9 @@
|
|
|
3
3
|
|
|
4
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,11 +19,14 @@ export type Meta = {
|
|
|
16
19
|
additionalInfo?: string | undefined;
|
|
17
20
|
};
|
|
18
21
|
|
|
19
|
-
|
|
22
|
+
/**
|
|
23
|
+
* Meta information about the character.
|
|
24
|
+
*/
|
|
25
|
+
export declare const MetaSchema: z.ZodPrefault<z.ZodObject<{
|
|
20
26
|
author: z.ZodOptional<z.ZodString>;
|
|
21
27
|
license: z.ZodDefault<z.ZodString>;
|
|
22
28
|
version: z.ZodOptional<z.ZodString>;
|
|
23
29
|
distributedOn: z.ZodOptional<z.ZodString>;
|
|
24
30
|
additionalInfo: z.ZodOptional<z.ZodString>;
|
|
25
|
-
}, z.core.$strip
|
|
31
|
+
}, z.core.$strip>>;
|
|
26
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
|
|
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;"}
|
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
|
+
}
|