peerbench 0.0.10 → 0.0.12
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/README.md +71 -58
- package/dist/benchmarks/examples/echo-basic/runner.d.ts +11 -254
- package/dist/benchmarks/examples/echo-basic/schema-sets/echo.v1.d.ts +25 -25
- package/dist/benchmarks/examples/exact-match-scorer/runner.d.ts +38 -386
- package/dist/benchmarks/examples/exact-match-scorer/schema-sets/exact-match.v1.d.ts +25 -25
- package/dist/benchmarks/examples/text-transform/runner.d.ts +32 -480
- package/dist/benchmarks/examples/text-transform/schema-sets/echo.v1.d.ts +25 -25
- package/dist/benchmarks/examples/text-transform/schema-sets/reverse.v1.d.ts +25 -25
- package/dist/benchmarks/index.js +180 -248
- package/dist/benchmarks/index.js.map +1 -1
- package/dist/benchmarks/peerbench/index.d.ts +2 -1
- package/dist/benchmarks/peerbench/mcq-runner.d.ts +78 -0
- package/dist/benchmarks/peerbench/qa-runner.d.ts +77 -0
- package/dist/benchmarks/peerbench/schema-sets/mcq.v1.d.ts +25 -25
- package/dist/benchmarks/peerbench/schema-sets/multi-turn.v1.d.ts +25 -25
- package/dist/benchmarks/peerbench/schema-sets/qa.v1.d.ts +25 -25
- package/dist/chunk-6WDCU5BP.js +9 -0
- package/dist/chunk-6WDCU5BP.js.map +1 -0
- package/dist/{chunk-YY33MNMV.js → chunk-7KMGLEYP.js} +2 -2
- package/dist/{chunk-TRNCF2BG.js → chunk-HBGC6BDW.js} +1 -1
- package/dist/chunk-HBGC6BDW.js.map +1 -0
- package/dist/{chunk-HMQYGCKI.js → chunk-ZJWSK4VO.js} +1 -1
- package/dist/chunk-ZJWSK4VO.js.map +1 -0
- package/dist/dev.d.ts +22 -0
- package/dist/helpers/define-runner.d.ts +2 -45
- package/dist/index.js +2 -2
- package/dist/providers/ai-sdk.d.ts +24 -0
- package/dist/providers/callables/callable.d.ts +4 -0
- package/dist/providers/callables/llm.d.ts +41 -0
- package/dist/providers/example/echo.d.ts +12 -11
- package/dist/providers/example/restapi.d.ts +11 -18
- package/dist/providers/index.d.ts +4 -2
- package/dist/providers/index.js +380 -9
- package/dist/providers/index.js.map +1 -1
- package/dist/providers/mastra.d.ts +16 -21
- package/dist/providers/openai.d.ts +25 -10
- package/dist/providers/openrouter.d.ts +6 -8
- package/dist/schemas/extensions/index.js +1 -1
- package/dist/schemas/extensions/response/llm.d.ts +17 -0
- package/dist/schemas/index.js +2 -2
- package/dist/schemas/llm/index.js +36 -7
- package/dist/schemas/llm/index.js.map +1 -1
- package/dist/schemas/llm/simple-system-prompt.d.ts +3 -3
- package/dist/schemas/llm/system-prompt.d.ts +7 -7
- package/dist/schemas/response.d.ts +7 -7
- package/dist/schemas/schema-definer.d.ts +5 -5
- package/dist/schemas/score.d.ts +7 -7
- package/dist/schemas/test-case.d.ts +7 -7
- package/dist/scorers/abstract.d.ts +1 -1
- package/dist/scorers/index.js +377 -7
- package/dist/scorers/index.js.map +1 -1
- package/dist/scorers/llm-judge.d.ts +6 -6
- package/dist/types/index.d.ts +0 -5
- package/dist/types/runner.d.ts +13 -17
- package/package.json +8 -7
- package/dist/benchmarks/peerbench/runner.d.ts +0 -754
- package/dist/chunk-3JHDJEY3.js +0 -374
- package/dist/chunk-3JHDJEY3.js.map +0 -1
- package/dist/chunk-HMQYGCKI.js.map +0 -1
- package/dist/chunk-Q6GSOHOP.js +0 -44
- package/dist/chunk-Q6GSOHOP.js.map +0 -1
- package/dist/chunk-RTEAK4II.js +0 -37
- package/dist/chunk-RTEAK4II.js.map +0 -1
- package/dist/chunk-SMLNDQFX.js +0 -244
- package/dist/chunk-SMLNDQFX.js.map +0 -1
- package/dist/chunk-TRNCF2BG.js.map +0 -1
- package/dist/providers/abstract/llm.d.ts +0 -20
- /package/dist/{chunk-YY33MNMV.js.map → chunk-7KMGLEYP.js.map} +0 -0
- /package/dist/providers/{abstract/provider.d.ts → abstract.d.ts} +0 -0
|
@@ -1,12 +1,41 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
import
|
|
2
|
+
buildSchemaDefiner
|
|
3
|
+
} from "../../chunk-OQE6TQXZ.js";
|
|
4
|
+
import {
|
|
5
|
+
CATEGORIES,
|
|
6
|
+
PEERBENCH_NAMESPACE
|
|
7
|
+
} from "../../chunk-UHHHSYVE.js";
|
|
8
|
+
import {
|
|
9
|
+
IdSchema
|
|
10
|
+
} from "../../chunk-NUEOE3K5.js";
|
|
9
11
|
import "../../chunk-PZ5AY32C.js";
|
|
12
|
+
|
|
13
|
+
// src/schemas/llm/system-prompt.ts
|
|
14
|
+
import { z } from "zod";
|
|
15
|
+
var BaseSystemPromptSchemaV1 = z.object({
|
|
16
|
+
id: IdSchema,
|
|
17
|
+
namespace: z.string(),
|
|
18
|
+
kind: z.string(),
|
|
19
|
+
schemaVersion: z.number(),
|
|
20
|
+
version: z.number(),
|
|
21
|
+
metadata: z.record(z.string(), z.unknown()).optional()
|
|
22
|
+
});
|
|
23
|
+
var defineSystemPromptSchema = buildSchemaDefiner(
|
|
24
|
+
BaseSystemPromptSchemaV1,
|
|
25
|
+
"sys-prompt"
|
|
26
|
+
);
|
|
27
|
+
|
|
28
|
+
// src/schemas/llm/simple-system-prompt.ts
|
|
29
|
+
import { z as z2 } from "zod";
|
|
30
|
+
var SimpleSystemPromptSchemaV1 = defineSystemPromptSchema({
|
|
31
|
+
baseSchema: BaseSystemPromptSchemaV1,
|
|
32
|
+
namespace: PEERBENCH_NAMESPACE,
|
|
33
|
+
kind: `${CATEGORIES.LLM}/simple`,
|
|
34
|
+
schemaVersion: 1,
|
|
35
|
+
fields: {
|
|
36
|
+
content: z2.string()
|
|
37
|
+
}
|
|
38
|
+
});
|
|
10
39
|
export {
|
|
11
40
|
BaseSystemPromptSchemaV1,
|
|
12
41
|
SimpleSystemPromptSchemaV1,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../../src/schemas/llm/system-prompt.ts","../../../src/schemas/llm/simple-system-prompt.ts"],"sourcesContent":["import { IdSchema } from \"../id\";\nimport { z } from \"zod\";\nimport { buildSchemaDefiner } from \"../schema-definer\";\n\nexport const BaseSystemPromptSchemaV1 = z.object({\n id: IdSchema,\n namespace: z.string(),\n kind: z.string(),\n schemaVersion: z.number(),\n version: z.number(),\n metadata: z.record(z.string(), z.unknown()).optional(),\n});\nexport type BaseSystemPromptV1 = z.infer<typeof BaseSystemPromptSchemaV1>;\n\nexport const defineSystemPromptSchema = buildSchemaDefiner(\n BaseSystemPromptSchemaV1,\n \"sys-prompt\"\n);\n","import { z } from \"zod\";\nimport { defineSystemPromptSchema } from \"./system-prompt\";\nimport { BaseSystemPromptSchemaV1 } from \"./system-prompt\";\nimport { CATEGORIES, PEERBENCH_NAMESPACE } from \"@/constants\";\n\nexport const SimpleSystemPromptSchemaV1 = defineSystemPromptSchema({\n baseSchema: BaseSystemPromptSchemaV1,\n namespace: PEERBENCH_NAMESPACE,\n kind: `${CATEGORIES.LLM}/simple`,\n schemaVersion: 1,\n fields: {\n content: z.string(),\n },\n});\nexport type SimpleSystemPromptV1 = z.infer<typeof SimpleSystemPromptSchemaV1>;\n"],"mappings":";;;;;;;;;;;;;AACA,SAAS,SAAS;AAGX,IAAM,2BAA2B,EAAE,OAAO;AAAA,EAC/C,IAAI;AAAA,EACJ,WAAW,EAAE,OAAO;AAAA,EACpB,MAAM,EAAE,OAAO;AAAA,EACf,eAAe,EAAE,OAAO;AAAA,EACxB,SAAS,EAAE,OAAO;AAAA,EAClB,UAAU,EAAE,OAAO,EAAE,OAAO,GAAG,EAAE,QAAQ,CAAC,EAAE,SAAS;AACvD,CAAC;AAGM,IAAM,2BAA2B;AAAA,EACtC;AAAA,EACA;AACF;;;ACjBA,SAAS,KAAAA,UAAS;AAKX,IAAM,6BAA6B,yBAAyB;AAAA,EACjE,YAAY;AAAA,EACZ,WAAW;AAAA,EACX,MAAM,GAAG,WAAW,GAAG;AAAA,EACvB,eAAe;AAAA,EACf,QAAQ;AAAA,IACN,SAASC,GAAE,OAAO;AAAA,EACpB;AACF,CAAC;","names":["z","z"]}
|
|
@@ -6,7 +6,7 @@ export declare const SimpleSystemPromptSchemaV1: z.ZodObject<Omit<{
|
|
|
6
6
|
schemaVersion: z.ZodNumber;
|
|
7
7
|
version: z.ZodNumber;
|
|
8
8
|
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
9
|
-
}, "kind" | "
|
|
9
|
+
}, "kind" | "schemaVersion" | "namespace"> & {
|
|
10
10
|
content: z.ZodString;
|
|
11
11
|
} & {
|
|
12
12
|
namespace: z.ZodLiteral<"peerbench.ai">;
|
|
@@ -21,7 +21,7 @@ export declare const SimpleSystemPromptSchemaV1: z.ZodObject<Omit<{
|
|
|
21
21
|
kind: `${string}/simple.sys-prompt`;
|
|
22
22
|
schemaVersion: 1;
|
|
23
23
|
metadata?: Record<string, unknown> | undefined;
|
|
24
|
-
}, "kind" | "
|
|
24
|
+
}, "kind" | "schemaVersion" | "namespace">) => {
|
|
25
25
|
id: string;
|
|
26
26
|
version: number;
|
|
27
27
|
content: string;
|
|
@@ -38,7 +38,7 @@ export declare const SimpleSystemPromptSchemaV1: z.ZodObject<Omit<{
|
|
|
38
38
|
kind: `${string}/simple.sys-prompt`;
|
|
39
39
|
schemaVersion: 1;
|
|
40
40
|
metadata?: Record<string, unknown> | undefined;
|
|
41
|
-
}, "
|
|
41
|
+
}, "id" | "kind" | "schemaVersion" | "namespace">, generator: import("../../index.js").IdGenerator): Promise<{
|
|
42
42
|
id: string;
|
|
43
43
|
version: number;
|
|
44
44
|
content: string;
|
|
@@ -25,33 +25,33 @@ export declare const defineSystemPromptSchema: <TBaseSchema extends import("../.
|
|
|
25
25
|
fields?: TFields | undefined;
|
|
26
26
|
}) => (TBaseSchema extends z.ZodObject<infer U extends Readonly<{
|
|
27
27
|
[k: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
28
|
-
}>, z.core.$strip> ? z.ZodObject<Omit<U, "kind" | "
|
|
28
|
+
}>, z.core.$strip> ? z.ZodObject<Omit<U, "kind" | "schemaVersion" | "namespace"> & TFields & {
|
|
29
29
|
namespace: TNamespace extends undefined ? U["namespace"] : z.ZodLiteral<TNamespace>;
|
|
30
30
|
kind: TKind extends undefined ? U["kind"] : z.ZodLiteral<`${TKind}.sys-prompt`>;
|
|
31
31
|
schemaVersion: TSchemaVersion extends undefined ? U["schemaVersion"] : z.ZodLiteral<TSchemaVersion>;
|
|
32
32
|
}, z.core.$strip> : never) & {
|
|
33
33
|
new: (input: Omit<z.core.output<TBaseSchema extends z.ZodObject<infer U extends Readonly<{
|
|
34
34
|
[k: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
35
|
-
}>, z.core.$strip> ? z.ZodObject<Omit<U, "kind" | "
|
|
35
|
+
}>, z.core.$strip> ? z.ZodObject<Omit<U, "kind" | "schemaVersion" | "namespace"> & TFields & {
|
|
36
36
|
namespace: TNamespace extends undefined ? U["namespace"] : z.ZodLiteral<TNamespace>;
|
|
37
37
|
kind: TKind extends undefined ? U["kind"] : z.ZodLiteral<`${TKind}.sys-prompt`>;
|
|
38
38
|
schemaVersion: TSchemaVersion extends undefined ? U["schemaVersion"] : z.ZodLiteral<TSchemaVersion>;
|
|
39
|
-
}, z.core.$strip> : never>, "kind" | "
|
|
39
|
+
}, z.core.$strip> : never>, "kind" | "schemaVersion" | "namespace">) => z.core.output<TBaseSchema extends z.ZodObject<infer U extends Readonly<{
|
|
40
40
|
[k: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
41
|
-
}>, z.core.$strip> ? z.ZodObject<Omit<U, "kind" | "
|
|
41
|
+
}>, z.core.$strip> ? z.ZodObject<Omit<U, "kind" | "schemaVersion" | "namespace"> & TFields & {
|
|
42
42
|
namespace: TNamespace extends undefined ? U["namespace"] : z.ZodLiteral<TNamespace>;
|
|
43
43
|
kind: TKind extends undefined ? U["kind"] : z.ZodLiteral<`${TKind}.sys-prompt`>;
|
|
44
44
|
schemaVersion: TSchemaVersion extends undefined ? U["schemaVersion"] : z.ZodLiteral<TSchemaVersion>;
|
|
45
45
|
}, z.core.$strip> : never>;
|
|
46
46
|
newWithId(input: Omit<z.core.output<TBaseSchema extends z.ZodObject<infer U extends Readonly<{
|
|
47
47
|
[k: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
48
|
-
}>, z.core.$strip> ? z.ZodObject<Omit<U, "kind" | "
|
|
48
|
+
}>, z.core.$strip> ? z.ZodObject<Omit<U, "kind" | "schemaVersion" | "namespace"> & TFields & {
|
|
49
49
|
namespace: TNamespace extends undefined ? U["namespace"] : z.ZodLiteral<TNamespace>;
|
|
50
50
|
kind: TKind extends undefined ? U["kind"] : z.ZodLiteral<`${TKind}.sys-prompt`>;
|
|
51
51
|
schemaVersion: TSchemaVersion extends undefined ? U["schemaVersion"] : z.ZodLiteral<TSchemaVersion>;
|
|
52
|
-
}, z.core.$strip> : never>, "
|
|
52
|
+
}, z.core.$strip> : never>, "id" | "kind" | "schemaVersion" | "namespace">, generator: import("../../index.js").IdGenerator): Promise<z.core.output<TBaseSchema extends z.ZodObject<infer U extends Readonly<{
|
|
53
53
|
[k: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
54
|
-
}>, z.core.$strip> ? z.ZodObject<Omit<U, "kind" | "
|
|
54
|
+
}>, z.core.$strip> ? z.ZodObject<Omit<U, "kind" | "schemaVersion" | "namespace"> & TFields & {
|
|
55
55
|
namespace: TNamespace extends undefined ? U["namespace"] : z.ZodLiteral<TNamespace>;
|
|
56
56
|
kind: TKind extends undefined ? U["kind"] : z.ZodLiteral<`${TKind}.sys-prompt`>;
|
|
57
57
|
schemaVersion: TSchemaVersion extends undefined ? U["schemaVersion"] : z.ZodLiteral<TSchemaVersion>;
|
|
@@ -29,33 +29,33 @@ export declare const defineResponseSchema: <TBaseSchema extends import("../index
|
|
|
29
29
|
fields?: TFields | undefined;
|
|
30
30
|
}) => (TBaseSchema extends z.ZodObject<infer U extends Readonly<{
|
|
31
31
|
[k: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
32
|
-
}>, z.core.$strip> ? z.ZodObject<Omit<U, "kind" | "
|
|
32
|
+
}>, z.core.$strip> ? z.ZodObject<Omit<U, "kind" | "schemaVersion" | "namespace"> & TFields & {
|
|
33
33
|
namespace: TNamespace extends undefined ? U["namespace"] : z.ZodLiteral<TNamespace>;
|
|
34
34
|
kind: TKind extends undefined ? U["kind"] : z.ZodLiteral<`${TKind}.rs`>;
|
|
35
35
|
schemaVersion: TSchemaVersion extends undefined ? U["schemaVersion"] : z.ZodLiteral<TSchemaVersion>;
|
|
36
36
|
}, z.core.$strip> : never) & {
|
|
37
37
|
new: (input: Omit<z.core.output<TBaseSchema extends z.ZodObject<infer U extends Readonly<{
|
|
38
38
|
[k: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
39
|
-
}>, z.core.$strip> ? z.ZodObject<Omit<U, "kind" | "
|
|
39
|
+
}>, z.core.$strip> ? z.ZodObject<Omit<U, "kind" | "schemaVersion" | "namespace"> & TFields & {
|
|
40
40
|
namespace: TNamespace extends undefined ? U["namespace"] : z.ZodLiteral<TNamespace>;
|
|
41
41
|
kind: TKind extends undefined ? U["kind"] : z.ZodLiteral<`${TKind}.rs`>;
|
|
42
42
|
schemaVersion: TSchemaVersion extends undefined ? U["schemaVersion"] : z.ZodLiteral<TSchemaVersion>;
|
|
43
|
-
}, z.core.$strip> : never>, "kind" | "
|
|
43
|
+
}, z.core.$strip> : never>, "kind" | "schemaVersion" | "namespace">) => z.core.output<TBaseSchema extends z.ZodObject<infer U extends Readonly<{
|
|
44
44
|
[k: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
45
|
-
}>, z.core.$strip> ? z.ZodObject<Omit<U, "kind" | "
|
|
45
|
+
}>, z.core.$strip> ? z.ZodObject<Omit<U, "kind" | "schemaVersion" | "namespace"> & TFields & {
|
|
46
46
|
namespace: TNamespace extends undefined ? U["namespace"] : z.ZodLiteral<TNamespace>;
|
|
47
47
|
kind: TKind extends undefined ? U["kind"] : z.ZodLiteral<`${TKind}.rs`>;
|
|
48
48
|
schemaVersion: TSchemaVersion extends undefined ? U["schemaVersion"] : z.ZodLiteral<TSchemaVersion>;
|
|
49
49
|
}, z.core.$strip> : never>;
|
|
50
50
|
newWithId(input: Omit<z.core.output<TBaseSchema extends z.ZodObject<infer U extends Readonly<{
|
|
51
51
|
[k: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
52
|
-
}>, z.core.$strip> ? z.ZodObject<Omit<U, "kind" | "
|
|
52
|
+
}>, z.core.$strip> ? z.ZodObject<Omit<U, "kind" | "schemaVersion" | "namespace"> & TFields & {
|
|
53
53
|
namespace: TNamespace extends undefined ? U["namespace"] : z.ZodLiteral<TNamespace>;
|
|
54
54
|
kind: TKind extends undefined ? U["kind"] : z.ZodLiteral<`${TKind}.rs`>;
|
|
55
55
|
schemaVersion: TSchemaVersion extends undefined ? U["schemaVersion"] : z.ZodLiteral<TSchemaVersion>;
|
|
56
|
-
}, z.core.$strip> : never>, "
|
|
56
|
+
}, z.core.$strip> : never>, "id" | "kind" | "schemaVersion" | "namespace">, generator: import("../index.js").IdGenerator): Promise<z.core.output<TBaseSchema extends z.ZodObject<infer U extends Readonly<{
|
|
57
57
|
[k: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
58
|
-
}>, z.core.$strip> ? z.ZodObject<Omit<U, "kind" | "
|
|
58
|
+
}>, z.core.$strip> ? z.ZodObject<Omit<U, "kind" | "schemaVersion" | "namespace"> & TFields & {
|
|
59
59
|
namespace: TNamespace extends undefined ? U["namespace"] : z.ZodLiteral<TNamespace>;
|
|
60
60
|
kind: TKind extends undefined ? U["kind"] : z.ZodLiteral<`${TKind}.rs`>;
|
|
61
61
|
schemaVersion: TSchemaVersion extends undefined ? U["schemaVersion"] : z.ZodLiteral<TSchemaVersion>;
|
|
@@ -13,33 +13,33 @@ export declare function buildSchemaDefiner<TBaseShape extends {
|
|
|
13
13
|
fields?: TFields;
|
|
14
14
|
}) => (TBaseSchema extends z.ZodObject<infer U extends Readonly<{
|
|
15
15
|
[k: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
16
|
-
}>, z.core.$strip> ? z.ZodObject<Omit<U, "kind" | "
|
|
16
|
+
}>, z.core.$strip> ? z.ZodObject<Omit<U, "kind" | "schemaVersion" | "namespace"> & TFields & {
|
|
17
17
|
namespace: TNamespace extends undefined ? U["namespace"] : z.ZodLiteral<TNamespace>;
|
|
18
18
|
kind: TKind extends undefined ? U["kind"] : z.ZodLiteral<`${TKind}.${TKindSuffix}`>;
|
|
19
19
|
schemaVersion: TSchemaVersion extends undefined ? U["schemaVersion"] : z.ZodLiteral<TSchemaVersion>;
|
|
20
20
|
}, z.core.$strip> : never) & {
|
|
21
21
|
new: (input: Omit<z.infer<TBaseSchema extends z.ZodObject<infer U extends Readonly<{
|
|
22
22
|
[k: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
23
|
-
}>, z.core.$strip> ? z.ZodObject<Omit<U, "kind" | "
|
|
23
|
+
}>, z.core.$strip> ? z.ZodObject<Omit<U, "kind" | "schemaVersion" | "namespace"> & TFields & {
|
|
24
24
|
namespace: TNamespace extends undefined ? U["namespace"] : z.ZodLiteral<TNamespace>;
|
|
25
25
|
kind: TKind extends undefined ? U["kind"] : z.ZodLiteral<`${TKind}.${TKindSuffix}`>;
|
|
26
26
|
schemaVersion: TSchemaVersion extends undefined ? U["schemaVersion"] : z.ZodLiteral<TSchemaVersion>;
|
|
27
27
|
}, z.core.$strip> : never>, "kind" | "schemaVersion" | "namespace">) => z.infer<TBaseSchema extends z.ZodObject<infer U extends Readonly<{
|
|
28
28
|
[k: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
29
|
-
}>, z.core.$strip> ? z.ZodObject<Omit<U, "kind" | "
|
|
29
|
+
}>, z.core.$strip> ? z.ZodObject<Omit<U, "kind" | "schemaVersion" | "namespace"> & TFields & {
|
|
30
30
|
namespace: TNamespace extends undefined ? U["namespace"] : z.ZodLiteral<TNamespace>;
|
|
31
31
|
kind: TKind extends undefined ? U["kind"] : z.ZodLiteral<`${TKind}.${TKindSuffix}`>;
|
|
32
32
|
schemaVersion: TSchemaVersion extends undefined ? U["schemaVersion"] : z.ZodLiteral<TSchemaVersion>;
|
|
33
33
|
}, z.core.$strip> : never>;
|
|
34
34
|
newWithId(input: Omit<z.infer<TBaseSchema extends z.ZodObject<infer U extends Readonly<{
|
|
35
35
|
[k: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
36
|
-
}>, z.core.$strip> ? z.ZodObject<Omit<U, "kind" | "
|
|
36
|
+
}>, z.core.$strip> ? z.ZodObject<Omit<U, "kind" | "schemaVersion" | "namespace"> & TFields & {
|
|
37
37
|
namespace: TNamespace extends undefined ? U["namespace"] : z.ZodLiteral<TNamespace>;
|
|
38
38
|
kind: TKind extends undefined ? U["kind"] : z.ZodLiteral<`${TKind}.${TKindSuffix}`>;
|
|
39
39
|
schemaVersion: TSchemaVersion extends undefined ? U["schemaVersion"] : z.ZodLiteral<TSchemaVersion>;
|
|
40
40
|
}, z.core.$strip> : never>, "id" | "kind" | "schemaVersion" | "namespace">, generator: IdGenerator): Promise<z.infer<TBaseSchema extends z.ZodObject<infer U extends Readonly<{
|
|
41
41
|
[k: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
42
|
-
}>, z.core.$strip> ? z.ZodObject<Omit<U, "kind" | "
|
|
42
|
+
}>, z.core.$strip> ? z.ZodObject<Omit<U, "kind" | "schemaVersion" | "namespace"> & TFields & {
|
|
43
43
|
namespace: TNamespace extends undefined ? U["namespace"] : z.ZodLiteral<TNamespace>;
|
|
44
44
|
kind: TKind extends undefined ? U["kind"] : z.ZodLiteral<`${TKind}.${TKindSuffix}`>;
|
|
45
45
|
schemaVersion: TSchemaVersion extends undefined ? U["schemaVersion"] : z.ZodLiteral<TSchemaVersion>;
|
package/dist/schemas/score.d.ts
CHANGED
|
@@ -39,33 +39,33 @@ export declare const defineScoreSchema: <TBaseSchema extends import("../index.js
|
|
|
39
39
|
fields?: TFields | undefined;
|
|
40
40
|
}) => (TBaseSchema extends z.ZodObject<infer U extends Readonly<{
|
|
41
41
|
[k: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
42
|
-
}>, z.core.$strip> ? z.ZodObject<Omit<U, "kind" | "
|
|
42
|
+
}>, z.core.$strip> ? z.ZodObject<Omit<U, "kind" | "schemaVersion" | "namespace"> & TFields & {
|
|
43
43
|
namespace: TNamespace extends undefined ? U["namespace"] : z.ZodLiteral<TNamespace>;
|
|
44
44
|
kind: TKind extends undefined ? U["kind"] : z.ZodLiteral<`${TKind}.sc`>;
|
|
45
45
|
schemaVersion: TSchemaVersion extends undefined ? U["schemaVersion"] : z.ZodLiteral<TSchemaVersion>;
|
|
46
46
|
}, z.core.$strip> : never) & {
|
|
47
47
|
new: (input: Omit<z.core.output<TBaseSchema extends z.ZodObject<infer U extends Readonly<{
|
|
48
48
|
[k: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
49
|
-
}>, z.core.$strip> ? z.ZodObject<Omit<U, "kind" | "
|
|
49
|
+
}>, z.core.$strip> ? z.ZodObject<Omit<U, "kind" | "schemaVersion" | "namespace"> & TFields & {
|
|
50
50
|
namespace: TNamespace extends undefined ? U["namespace"] : z.ZodLiteral<TNamespace>;
|
|
51
51
|
kind: TKind extends undefined ? U["kind"] : z.ZodLiteral<`${TKind}.sc`>;
|
|
52
52
|
schemaVersion: TSchemaVersion extends undefined ? U["schemaVersion"] : z.ZodLiteral<TSchemaVersion>;
|
|
53
|
-
}, z.core.$strip> : never>, "kind" | "
|
|
53
|
+
}, z.core.$strip> : never>, "kind" | "schemaVersion" | "namespace">) => z.core.output<TBaseSchema extends z.ZodObject<infer U extends Readonly<{
|
|
54
54
|
[k: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
55
|
-
}>, z.core.$strip> ? z.ZodObject<Omit<U, "kind" | "
|
|
55
|
+
}>, z.core.$strip> ? z.ZodObject<Omit<U, "kind" | "schemaVersion" | "namespace"> & TFields & {
|
|
56
56
|
namespace: TNamespace extends undefined ? U["namespace"] : z.ZodLiteral<TNamespace>;
|
|
57
57
|
kind: TKind extends undefined ? U["kind"] : z.ZodLiteral<`${TKind}.sc`>;
|
|
58
58
|
schemaVersion: TSchemaVersion extends undefined ? U["schemaVersion"] : z.ZodLiteral<TSchemaVersion>;
|
|
59
59
|
}, z.core.$strip> : never>;
|
|
60
60
|
newWithId(input: Omit<z.core.output<TBaseSchema extends z.ZodObject<infer U extends Readonly<{
|
|
61
61
|
[k: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
62
|
-
}>, z.core.$strip> ? z.ZodObject<Omit<U, "kind" | "
|
|
62
|
+
}>, z.core.$strip> ? z.ZodObject<Omit<U, "kind" | "schemaVersion" | "namespace"> & TFields & {
|
|
63
63
|
namespace: TNamespace extends undefined ? U["namespace"] : z.ZodLiteral<TNamespace>;
|
|
64
64
|
kind: TKind extends undefined ? U["kind"] : z.ZodLiteral<`${TKind}.sc`>;
|
|
65
65
|
schemaVersion: TSchemaVersion extends undefined ? U["schemaVersion"] : z.ZodLiteral<TSchemaVersion>;
|
|
66
|
-
}, z.core.$strip> : never>, "
|
|
66
|
+
}, z.core.$strip> : never>, "id" | "kind" | "schemaVersion" | "namespace">, generator: import("../types").IdGenerator): Promise<z.core.output<TBaseSchema extends z.ZodObject<infer U extends Readonly<{
|
|
67
67
|
[k: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
68
|
-
}>, z.core.$strip> ? z.ZodObject<Omit<U, "kind" | "
|
|
68
|
+
}>, z.core.$strip> ? z.ZodObject<Omit<U, "kind" | "schemaVersion" | "namespace"> & TFields & {
|
|
69
69
|
namespace: TNamespace extends undefined ? U["namespace"] : z.ZodLiteral<TNamespace>;
|
|
70
70
|
kind: TKind extends undefined ? U["kind"] : z.ZodLiteral<`${TKind}.sc`>;
|
|
71
71
|
schemaVersion: TSchemaVersion extends undefined ? U["schemaVersion"] : z.ZodLiteral<TSchemaVersion>;
|
|
@@ -23,33 +23,33 @@ export declare const defineTestCaseSchema: <TBaseSchema extends import("../index
|
|
|
23
23
|
fields?: TFields | undefined;
|
|
24
24
|
}) => (TBaseSchema extends z.ZodObject<infer U extends Readonly<{
|
|
25
25
|
[k: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
26
|
-
}>, z.core.$strip> ? z.ZodObject<Omit<U, "kind" | "
|
|
26
|
+
}>, z.core.$strip> ? z.ZodObject<Omit<U, "kind" | "schemaVersion" | "namespace"> & TFields & {
|
|
27
27
|
namespace: TNamespace extends undefined ? U["namespace"] : z.ZodLiteral<TNamespace>;
|
|
28
28
|
kind: TKind extends undefined ? U["kind"] : z.ZodLiteral<`${TKind}.tc`>;
|
|
29
29
|
schemaVersion: TSchemaVersion extends undefined ? U["schemaVersion"] : z.ZodLiteral<TSchemaVersion>;
|
|
30
30
|
}, z.core.$strip> : never) & {
|
|
31
31
|
new: (input: Omit<z.core.output<TBaseSchema extends z.ZodObject<infer U extends Readonly<{
|
|
32
32
|
[k: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
33
|
-
}>, z.core.$strip> ? z.ZodObject<Omit<U, "kind" | "
|
|
33
|
+
}>, z.core.$strip> ? z.ZodObject<Omit<U, "kind" | "schemaVersion" | "namespace"> & TFields & {
|
|
34
34
|
namespace: TNamespace extends undefined ? U["namespace"] : z.ZodLiteral<TNamespace>;
|
|
35
35
|
kind: TKind extends undefined ? U["kind"] : z.ZodLiteral<`${TKind}.tc`>;
|
|
36
36
|
schemaVersion: TSchemaVersion extends undefined ? U["schemaVersion"] : z.ZodLiteral<TSchemaVersion>;
|
|
37
|
-
}, z.core.$strip> : never>, "kind" | "
|
|
37
|
+
}, z.core.$strip> : never>, "kind" | "schemaVersion" | "namespace">) => z.core.output<TBaseSchema extends z.ZodObject<infer U extends Readonly<{
|
|
38
38
|
[k: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
39
|
-
}>, z.core.$strip> ? z.ZodObject<Omit<U, "kind" | "
|
|
39
|
+
}>, z.core.$strip> ? z.ZodObject<Omit<U, "kind" | "schemaVersion" | "namespace"> & TFields & {
|
|
40
40
|
namespace: TNamespace extends undefined ? U["namespace"] : z.ZodLiteral<TNamespace>;
|
|
41
41
|
kind: TKind extends undefined ? U["kind"] : z.ZodLiteral<`${TKind}.tc`>;
|
|
42
42
|
schemaVersion: TSchemaVersion extends undefined ? U["schemaVersion"] : z.ZodLiteral<TSchemaVersion>;
|
|
43
43
|
}, z.core.$strip> : never>;
|
|
44
44
|
newWithId(input: Omit<z.core.output<TBaseSchema extends z.ZodObject<infer U extends Readonly<{
|
|
45
45
|
[k: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
46
|
-
}>, z.core.$strip> ? z.ZodObject<Omit<U, "kind" | "
|
|
46
|
+
}>, z.core.$strip> ? z.ZodObject<Omit<U, "kind" | "schemaVersion" | "namespace"> & TFields & {
|
|
47
47
|
namespace: TNamespace extends undefined ? U["namespace"] : z.ZodLiteral<TNamespace>;
|
|
48
48
|
kind: TKind extends undefined ? U["kind"] : z.ZodLiteral<`${TKind}.tc`>;
|
|
49
49
|
schemaVersion: TSchemaVersion extends undefined ? U["schemaVersion"] : z.ZodLiteral<TSchemaVersion>;
|
|
50
|
-
}, z.core.$strip> : never>, "
|
|
50
|
+
}, z.core.$strip> : never>, "id" | "kind" | "schemaVersion" | "namespace">, generator: import("../index.js").IdGenerator): Promise<z.core.output<TBaseSchema extends z.ZodObject<infer U extends Readonly<{
|
|
51
51
|
[k: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
52
|
-
}>, z.core.$strip> ? z.ZodObject<Omit<U, "kind" | "
|
|
52
|
+
}>, z.core.$strip> ? z.ZodObject<Omit<U, "kind" | "schemaVersion" | "namespace"> & TFields & {
|
|
53
53
|
namespace: TNamespace extends undefined ? U["namespace"] : z.ZodLiteral<TNamespace>;
|
|
54
54
|
kind: TKind extends undefined ? U["kind"] : z.ZodLiteral<`${TKind}.tc`>;
|
|
55
55
|
schemaVersion: TSchemaVersion extends undefined ? U["schemaVersion"] : z.ZodLiteral<TSchemaVersion>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export declare abstract class AbstractScorer {
|
|
2
2
|
readonly kind: string;
|
|
3
3
|
constructor();
|
|
4
|
-
abstract score(params: any): Promise<BaseScorerResult
|
|
4
|
+
abstract score(params: any): Promise<BaseScorerResult>;
|
|
5
5
|
static withKind<TKind extends string, TThis extends abstract new (...args: any[]) => AbstractScorer>(this: TThis, kind: TKind): (new () => InstanceType<TThis> & {
|
|
6
6
|
readonly kind: TKind;
|
|
7
7
|
}) & {
|