@chainfuse/types 4.2.6 → 4.2.8
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/ai-tools/index.d.ts +2 -2
- package/dist/ai-tools/workers-ai/catalog.d.ts +12 -12
- package/dist/ai-tools/workers-ai/catalog.js +13 -13
- package/dist/index.d.ts +8 -0
- package/dist/zod-4/index.d.ts +2 -2
- package/dist/zod-4/index.js +3 -5
- package/dist/zod-mini/index.d.ts +2 -2
- package/dist/zod-mini/index.js +3 -3
- package/package.json +3 -3
package/dist/ai-tools/index.d.ts
CHANGED
|
@@ -89,7 +89,6 @@ export declare const ZodLanguageModelValues: zm.ZodMiniEnum<{
|
|
|
89
89
|
"workersai:@hf/nexusflow/starling-lm-7b-beta": "workersai:@hf/nexusflow/starling-lm-7b-beta";
|
|
90
90
|
"workersai:@cf/meta/llama-3-8b-instruct": "workersai:@cf/meta/llama-3-8b-instruct";
|
|
91
91
|
"workersai:@cf/meta/llama-3.2-3b-instruct": "workersai:@cf/meta/llama-3.2-3b-instruct";
|
|
92
|
-
"workersai:@hf/thebloke/llamaguard-7b-awq": "workersai:@hf/thebloke/llamaguard-7b-awq";
|
|
93
92
|
"workersai:@hf/thebloke/neural-chat-7b-v3-1-awq": "workersai:@hf/thebloke/neural-chat-7b-v3-1-awq";
|
|
94
93
|
"workersai:@cf/meta/llama-guard-3-8b": "workersai:@cf/meta/llama-guard-3-8b";
|
|
95
94
|
"workersai:@cf/meta/llama-2-7b-chat-fp16": "workersai:@cf/meta/llama-2-7b-chat-fp16";
|
|
@@ -174,7 +173,6 @@ export declare const ZodLanguageModelValues4: z4.ZodEnum<{
|
|
|
174
173
|
"workersai:@hf/nexusflow/starling-lm-7b-beta": "workersai:@hf/nexusflow/starling-lm-7b-beta";
|
|
175
174
|
"workersai:@cf/meta/llama-3-8b-instruct": "workersai:@cf/meta/llama-3-8b-instruct";
|
|
176
175
|
"workersai:@cf/meta/llama-3.2-3b-instruct": "workersai:@cf/meta/llama-3.2-3b-instruct";
|
|
177
|
-
"workersai:@hf/thebloke/llamaguard-7b-awq": "workersai:@hf/thebloke/llamaguard-7b-awq";
|
|
178
176
|
"workersai:@hf/thebloke/neural-chat-7b-v3-1-awq": "workersai:@hf/thebloke/neural-chat-7b-v3-1-awq";
|
|
179
177
|
"workersai:@cf/meta/llama-guard-3-8b": "workersai:@cf/meta/llama-guard-3-8b";
|
|
180
178
|
"workersai:@cf/meta/llama-2-7b-chat-fp16": "workersai:@cf/meta/llama-2-7b-chat-fp16";
|
|
@@ -260,6 +258,7 @@ export declare const ZodImageModelValues: zm.ZodMiniEnum<{
|
|
|
260
258
|
"workersai:@cf/lykon/dreamshaper-8-lcm": "workersai:@cf/lykon/dreamshaper-8-lcm";
|
|
261
259
|
"workersai:@cf/leonardo/phoenix-1.0": "workersai:@cf/leonardo/phoenix-1.0";
|
|
262
260
|
"workersai:@cf/stabilityai/stable-diffusion-xl-base-1.0": "workersai:@cf/stabilityai/stable-diffusion-xl-base-1.0";
|
|
261
|
+
"workersai:@cf/black-forest-labs/flux-2-klein-4b": "workersai:@cf/black-forest-labs/flux-2-klein-4b";
|
|
263
262
|
"workersai:@cf/black-forest-labs/flux-2-dev": "workersai:@cf/black-forest-labs/flux-2-dev";
|
|
264
263
|
"workersai:@cf/runwayml/stable-diffusion-v1-5-img2img": "workersai:@cf/runwayml/stable-diffusion-v1-5-img2img";
|
|
265
264
|
"workersai:@cf/leonardo/lucid-origin": "workersai:@cf/leonardo/lucid-origin";
|
|
@@ -275,6 +274,7 @@ export declare const ZodImageModelValues4: z4.ZodEnum<{
|
|
|
275
274
|
"workersai:@cf/lykon/dreamshaper-8-lcm": "workersai:@cf/lykon/dreamshaper-8-lcm";
|
|
276
275
|
"workersai:@cf/leonardo/phoenix-1.0": "workersai:@cf/leonardo/phoenix-1.0";
|
|
277
276
|
"workersai:@cf/stabilityai/stable-diffusion-xl-base-1.0": "workersai:@cf/stabilityai/stable-diffusion-xl-base-1.0";
|
|
277
|
+
"workersai:@cf/black-forest-labs/flux-2-klein-4b": "workersai:@cf/black-forest-labs/flux-2-klein-4b";
|
|
278
278
|
"workersai:@cf/black-forest-labs/flux-2-dev": "workersai:@cf/black-forest-labs/flux-2-dev";
|
|
279
279
|
"workersai:@cf/runwayml/stable-diffusion-v1-5-img2img": "workersai:@cf/runwayml/stable-diffusion-v1-5-img2img";
|
|
280
280
|
"workersai:@cf/leonardo/lucid-origin": "workersai:@cf/leonardo/lucid-origin";
|
|
@@ -125,18 +125,6 @@ export declare const workersAiCatalog: {
|
|
|
125
125
|
readonly context_window: 128000;
|
|
126
126
|
readonly terms: "https://github.com/meta-llama/llama-models/blob/main/models/llama3_2/LICENSE";
|
|
127
127
|
};
|
|
128
|
-
}, {
|
|
129
|
-
readonly id: "d9b7a55c-cefa-4208-8ab3-11497a2b046c";
|
|
130
|
-
readonly source: 2;
|
|
131
|
-
readonly name: "@hf/thebloke/llamaguard-7b-awq";
|
|
132
|
-
readonly description: "Llama Guard is a model for classifying the safety of LLM prompts and responses, using a taxonomy of safety risks.\n";
|
|
133
|
-
readonly created_at: "2024-02-06 18:13:59.060";
|
|
134
|
-
readonly tags: readonly ["moderation", "safety", "content-filtering", "guardrails"];
|
|
135
|
-
readonly properties: {
|
|
136
|
-
readonly beta: true;
|
|
137
|
-
readonly context_window: 4096;
|
|
138
|
-
readonly planned_deprecation_date: "2025-10-01";
|
|
139
|
-
};
|
|
140
128
|
}, {
|
|
141
129
|
readonly id: "d2ba5c6b-bbb7-49d6-b466-900654870cd6";
|
|
142
130
|
readonly source: 2;
|
|
@@ -919,6 +907,7 @@ export declare const workersAiCatalog: {
|
|
|
919
907
|
readonly tags: readonly [];
|
|
920
908
|
readonly properties: {
|
|
921
909
|
readonly async_queue: true;
|
|
910
|
+
readonly context_window: 153600;
|
|
922
911
|
readonly price: readonly [{
|
|
923
912
|
readonly unit: "per M input tokens";
|
|
924
913
|
readonly price: 0.067;
|
|
@@ -1274,6 +1263,17 @@ export declare const workersAiCatalog: {
|
|
|
1274
1263
|
readonly info: "https://stability.ai/stable-diffusion";
|
|
1275
1264
|
readonly terms: "https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/blob/main/LICENSE.md";
|
|
1276
1265
|
};
|
|
1266
|
+
}, {
|
|
1267
|
+
readonly id: "5cdffa8e-1b1e-48e8-85f1-ab9b943cdd32";
|
|
1268
|
+
readonly source: 1;
|
|
1269
|
+
readonly name: "@cf/black-forest-labs/flux-2-klein-4b";
|
|
1270
|
+
readonly description: "FLUX.2 [klein] is an ultra-fast, distilled image model. It unifies image generation and editing in a single model, delivering state-of-the-art quality enabling interactive workflows, real-time previews, and latency-critical applications.";
|
|
1271
|
+
readonly created_at: "2026-01-14 12:54:55.024";
|
|
1272
|
+
readonly tags: readonly [];
|
|
1273
|
+
readonly properties: {
|
|
1274
|
+
readonly partner: true;
|
|
1275
|
+
readonly terms: "https://bfl.ai/legal/terms-of-service";
|
|
1276
|
+
};
|
|
1277
1277
|
}, {
|
|
1278
1278
|
readonly id: "3ae8936e-593e-4fb2-85ee-95dd8a057588";
|
|
1279
1279
|
readonly source: 1;
|
|
@@ -145,19 +145,6 @@ export const workersAiCatalog = {
|
|
|
145
145
|
terms: 'https://github.com/meta-llama/llama-models/blob/main/models/llama3_2/LICENSE',
|
|
146
146
|
},
|
|
147
147
|
},
|
|
148
|
-
{
|
|
149
|
-
id: 'd9b7a55c-cefa-4208-8ab3-11497a2b046c',
|
|
150
|
-
source: 2,
|
|
151
|
-
name: '@hf/thebloke/llamaguard-7b-awq',
|
|
152
|
-
description: 'Llama Guard is a model for classifying the safety of LLM prompts and responses, using a taxonomy of safety risks.\n',
|
|
153
|
-
created_at: '2024-02-06 18:13:59.060',
|
|
154
|
-
tags: ['moderation', 'safety', 'content-filtering', 'guardrails'],
|
|
155
|
-
properties: {
|
|
156
|
-
beta: true,
|
|
157
|
-
context_window: 4096,
|
|
158
|
-
planned_deprecation_date: '2025-10-01',
|
|
159
|
-
},
|
|
160
|
-
},
|
|
161
148
|
{
|
|
162
149
|
id: 'd2ba5c6b-bbb7-49d6-b466-900654870cd6',
|
|
163
150
|
source: 2,
|
|
@@ -1054,6 +1041,7 @@ export const workersAiCatalog = {
|
|
|
1054
1041
|
tags: [],
|
|
1055
1042
|
properties: {
|
|
1056
1043
|
async_queue: true,
|
|
1044
|
+
context_window: 153600,
|
|
1057
1045
|
price: [
|
|
1058
1046
|
{
|
|
1059
1047
|
unit: 'per M input tokens',
|
|
@@ -1473,6 +1461,18 @@ export const workersAiCatalog = {
|
|
|
1473
1461
|
terms: 'https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/blob/main/LICENSE.md',
|
|
1474
1462
|
},
|
|
1475
1463
|
},
|
|
1464
|
+
{
|
|
1465
|
+
id: '5cdffa8e-1b1e-48e8-85f1-ab9b943cdd32',
|
|
1466
|
+
source: 1,
|
|
1467
|
+
name: '@cf/black-forest-labs/flux-2-klein-4b',
|
|
1468
|
+
description: 'FLUX.2 [klein] is an ultra-fast, distilled image model. It unifies image generation and editing in a single model, delivering state-of-the-art quality enabling interactive workflows, real-time previews, and latency-critical applications.',
|
|
1469
|
+
created_at: '2026-01-14 12:54:55.024',
|
|
1470
|
+
tags: [],
|
|
1471
|
+
properties: {
|
|
1472
|
+
partner: true,
|
|
1473
|
+
terms: 'https://bfl.ai/legal/terms-of-service',
|
|
1474
|
+
},
|
|
1475
|
+
},
|
|
1476
1476
|
{
|
|
1477
1477
|
id: '3ae8936e-593e-4fb2-85ee-95dd8a057588',
|
|
1478
1478
|
source: 1,
|
package/dist/index.d.ts
CHANGED
|
@@ -38,6 +38,14 @@ export type UnionKeys<T> = T extends any ? keyof T : never;
|
|
|
38
38
|
export type BlockKeys<T, K extends readonly string[]> = {
|
|
39
39
|
[P in keyof T as P extends K[number] ? never : P]: T[P];
|
|
40
40
|
};
|
|
41
|
+
/**
|
|
42
|
+
* Narrows an environment bindings object to keys whose values match the given type
|
|
43
|
+
* @typeParam E - The environment bindings object
|
|
44
|
+
* @typeParam T - The value type to filter on
|
|
45
|
+
*/
|
|
46
|
+
export type Bindings<E extends object, T extends E[keyof E]> = {
|
|
47
|
+
[K in keyof E as E[K] extends T ? K : never]: E[K];
|
|
48
|
+
};
|
|
41
49
|
/**
|
|
42
50
|
* For when you have a type to conform `URLSearchParams` to, but all values are strings (as per search params spec)
|
|
43
51
|
*/
|
package/dist/zod-4/index.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ export type JSON = z4.infer<z4.ZodJSONSchema>;
|
|
|
3
3
|
export declare const WorkflowId: z4.ZodString;
|
|
4
4
|
export declare const DoId: z4.ZodCustomStringFormat<"hex">;
|
|
5
5
|
export declare const ZodCoordinate: z4.ZodString;
|
|
6
|
-
export declare const ZodBlob: z4.ZodUnion<readonly [z4.
|
|
6
|
+
export declare const ZodBlob: z4.ZodUnion<readonly [z4.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>, z4.ZodPipe<z4.ZodCustom<ArrayBuffer, ArrayBuffer>, z4.ZodTransform<Uint8Array<ArrayBuffer>, ArrayBuffer>>, z4.ZodPipe<z4.ZodTuple<[z4.ZodInt], z4.ZodInt>, z4.ZodTransform<Uint8Array<ArrayBuffer>, [number, ...number[]]>>]>;
|
|
7
7
|
export declare const ZodBlobExport: z4.ZodPipe<z4.ZodTuple<[z4.ZodInt], z4.ZodInt>, z4.ZodTransform<Uint8Array<ArrayBuffer>, [number, ...number[]]>>;
|
|
8
8
|
export declare const PrefixedUuidRaw: z4.ZodString;
|
|
9
9
|
export declare const PrefixedUuid7Raw: z4.ZodString;
|
|
@@ -26,4 +26,4 @@ export declare const Zod4FakeUuidExport: z4.ZodObject<{
|
|
|
26
26
|
base64: z4.ZodBase64;
|
|
27
27
|
base64url: z4.ZodBase64URL;
|
|
28
28
|
}, z4.z.core.$strip>;
|
|
29
|
-
export declare const ZodSuruId: z4.ZodUnion<readonly [z4.ZodCustomStringFormat<"hex">, z4.ZodBase64, z4.ZodBase64URL]>;
|
|
29
|
+
export declare const ZodSuruId: z4.ZodUnion<readonly [z4.ZodCustomStringFormat<"hex">, z4.ZodUnion<readonly [z4.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>, z4.ZodPipe<z4.ZodCustom<ArrayBuffer, ArrayBuffer>, z4.ZodTransform<Uint8Array<ArrayBuffer>, ArrayBuffer>>, z4.ZodPipe<z4.ZodTuple<[z4.ZodInt], z4.ZodInt>, z4.ZodTransform<Uint8Array<ArrayBuffer>, [number, ...number[]]>>]>, z4.ZodBase64, z4.ZodBase64URL]>;
|
package/dist/zod-4/index.js
CHANGED
|
@@ -16,12 +16,9 @@ export const ZodCoordinate = z4
|
|
|
16
16
|
.regex(new RegExp(/^-?\d+\.\d+$/i));
|
|
17
17
|
export const ZodBlob = z4.union([
|
|
18
18
|
// Uint8Array
|
|
19
|
-
z4.instanceof(Uint8Array)
|
|
19
|
+
z4.instanceof(Uint8Array),
|
|
20
20
|
// ArrayBuffer
|
|
21
|
-
z4
|
|
22
|
-
.instanceof(ArrayBuffer)
|
|
23
|
-
.transform((ab) => ab)
|
|
24
|
-
.transform((abl) => new Uint8Array(abl)),
|
|
21
|
+
z4.instanceof(ArrayBuffer).transform((abl) => new Uint8Array(abl)),
|
|
25
22
|
// D0Blob
|
|
26
23
|
z4.tuple([z4.int().min(0).max(255)], z4.int().min(0).max(255)).transform((arr) => new Uint8Array(arr)),
|
|
27
24
|
]);
|
|
@@ -95,6 +92,7 @@ export const Zod4FakeUuidExport = z4.object({
|
|
|
95
92
|
export const ZodSuruId = z4.union([
|
|
96
93
|
//
|
|
97
94
|
z4.hex().trim().toLowerCase().length(96),
|
|
95
|
+
ZodBlob.refine((blob) => blob.byteLength === 384 / 8),
|
|
98
96
|
z4.base64().trim().max(64),
|
|
99
97
|
z4.base64url().trim().max(64),
|
|
100
98
|
]);
|
package/dist/zod-mini/index.d.ts
CHANGED
|
@@ -10,7 +10,7 @@ export type JSON = zm.infer<zm.ZodMiniJSONSchema>;
|
|
|
10
10
|
export declare const WorkflowId: zm.ZodMiniString<string>;
|
|
11
11
|
export declare const DoId: zm.ZodMiniCustomStringFormat<"hex">;
|
|
12
12
|
export declare const ZodCoordinate: zm.ZodMiniString<string>;
|
|
13
|
-
export declare const ZodBlob: zm.ZodMiniUnion<readonly [zm.
|
|
13
|
+
export declare const ZodBlob: zm.ZodMiniUnion<readonly [zm.ZodMiniCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>, zm.ZodMiniPipe<zm.ZodMiniCustom<ArrayBuffer, ArrayBuffer>, zm.ZodMiniTransform<Uint8Array<ArrayBuffer>, ArrayBuffer>>, zm.ZodMiniPipe<zm.ZodMiniTuple<readonly [zm.ZodMiniNumberFormat], zm.ZodMiniNumberFormat>, zm.ZodMiniTransform<Uint8Array<ArrayBuffer>, [number, ...number[]]>>]>;
|
|
14
14
|
export declare const ZodBlobExport: zm.ZodMiniTuple<readonly [zm.ZodMiniNumberFormat], zm.ZodMiniNumberFormat>;
|
|
15
15
|
export declare const prefixedUuidRegex: RegExp;
|
|
16
16
|
export declare const hexUuidRegex: RegExp;
|
|
@@ -38,4 +38,4 @@ export declare const Zod4FakeUuidExport: zm.ZodMiniObject<{
|
|
|
38
38
|
base64: zm.ZodMiniBase64;
|
|
39
39
|
base64url: zm.ZodMiniBase64URL;
|
|
40
40
|
}, zm.z.core.$strip>;
|
|
41
|
-
export declare const ZodSuruId: zm.ZodMiniUnion<readonly [zm.ZodMiniCustomStringFormat<"hex">, zm.ZodMiniUnion<readonly [zm.
|
|
41
|
+
export declare const ZodSuruId: zm.ZodMiniUnion<readonly [zm.ZodMiniCustomStringFormat<"hex">, zm.ZodMiniUnion<readonly [zm.ZodMiniCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>, zm.ZodMiniPipe<zm.ZodMiniCustom<ArrayBuffer, ArrayBuffer>, zm.ZodMiniTransform<Uint8Array<ArrayBuffer>, ArrayBuffer>>, zm.ZodMiniPipe<zm.ZodMiniTuple<readonly [zm.ZodMiniNumberFormat], zm.ZodMiniNumberFormat>, zm.ZodMiniTransform<Uint8Array<ArrayBuffer>, [number, ...number[]]>>]>, zm.ZodMiniBase64, zm.ZodMiniBase64URL]>;
|
package/dist/zod-mini/index.js
CHANGED
|
@@ -8,9 +8,9 @@ export const DoId = zm.hex().check(zm.trim(), zm.length(64), zm.toLowerCase());
|
|
|
8
8
|
export const ZodCoordinate = zm.string().check(zm.trim(), zm.minLength(3), zm.regex(new RegExp(/^-?\d+\.\d+$/i)));
|
|
9
9
|
export const ZodBlob = zm.union([
|
|
10
10
|
// Uint8Array
|
|
11
|
-
zm.
|
|
11
|
+
zm.instanceof(Uint8Array),
|
|
12
12
|
// ArrayBuffer
|
|
13
|
-
zm.pipe(zm.
|
|
13
|
+
zm.pipe(zm.instanceof(ArrayBuffer), zm.transform((abl) => new Uint8Array(abl))),
|
|
14
14
|
// D0Blob
|
|
15
15
|
zm.pipe(zm.tuple([zm.int().check(zm.minimum(0), zm.maximum(255))], zm.int().check(zm.minimum(0), zm.maximum(255))), zm.transform((arr) => new Uint8Array(arr))),
|
|
16
16
|
]);
|
|
@@ -89,7 +89,7 @@ export const Zod4FakeUuidExport = zm.object({
|
|
|
89
89
|
export const ZodSuruId = zm.union([
|
|
90
90
|
//
|
|
91
91
|
zm.hex().check(zm.trim(), zm.toLowerCase(), zm.length(96)),
|
|
92
|
-
ZodBlob,
|
|
92
|
+
ZodBlob.check(zm.refine((blob) => blob.byteLength === 384 / 8)),
|
|
93
93
|
zm.base64().check(zm.trim(), zm.maxLength(64)),
|
|
94
94
|
zm.base64url().check(zm.trim(), zm.maxLength(64)),
|
|
95
95
|
]);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@chainfuse/types",
|
|
3
|
-
"version": "4.2.
|
|
3
|
+
"version": "4.2.8",
|
|
4
4
|
"description": "",
|
|
5
5
|
"author": "ChainFuse",
|
|
6
6
|
"homepage": "https://github.com/ChainFuse/packages/tree/main/packages/types#readme",
|
|
@@ -98,8 +98,8 @@
|
|
|
98
98
|
"zod": "^4.3.5"
|
|
99
99
|
},
|
|
100
100
|
"devDependencies": {
|
|
101
|
-
"@cloudflare/workers-types": "^4.
|
|
101
|
+
"@cloudflare/workers-types": "^4.20260120.0",
|
|
102
102
|
"@types/validator": "^13.15.10"
|
|
103
103
|
},
|
|
104
|
-
"gitHead": "
|
|
104
|
+
"gitHead": "7465800b60661c071d9ca65c41368bb474e6c94c"
|
|
105
105
|
}
|