@qvac/sdk 0.8.0 → 0.8.1
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/NOTICE +337 -0
- package/README.md +2 -2
- package/dist/client/api/cancel.d.ts +9 -0
- package/dist/client/api/cancel.js +9 -0
- package/dist/client/api/heartbeat.d.ts +30 -0
- package/dist/client/api/heartbeat.js +38 -0
- package/dist/client/api/index.d.ts +1 -1
- package/dist/client/api/index.js +1 -1
- package/dist/examples/embed-p2p.d.ts +2 -0
- package/dist/examples/llamacpp-p2p.d.ts +2 -0
- package/dist/examples/seed-p2p.d.ts +2 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/models/registry/models.d.ts +64 -64
- package/dist/models/registry/models.js +108 -108
- package/dist/schemas/cancel.d.ts +12 -0
- package/dist/schemas/cancel.js +2 -0
- package/dist/schemas/common.d.ts +39 -2
- package/dist/schemas/common.js +4 -3
- package/dist/schemas/delegate.d.ts +8 -0
- package/dist/schemas/delegate.js +5 -2
- package/dist/schemas/heartbeat.d.ts +17 -0
- package/dist/schemas/heartbeat.js +10 -0
- package/dist/schemas/index.d.ts +1 -1
- package/dist/schemas/index.js +1 -1
- package/dist/schemas/load-model.d.ts +113 -0
- package/dist/server/bare/delegate-rpc-client.js +42 -11
- package/dist/server/bare/plugins/nmtcpp-translation/plugin.js +1 -4
- package/dist/server/bare/registry/model-registry.d.ts +2 -0
- package/dist/server/bare/registry/model-registry.js +2 -1
- package/dist/server/rpc/delegate-transport.js +65 -44
- package/dist/server/rpc/delegate-utils.d.ts +2 -0
- package/dist/server/rpc/delegate-utils.js +5 -0
- package/dist/server/rpc/handler-registry.js +26 -3
- package/dist/server/rpc/handler-utils.js +43 -1
- package/dist/server/rpc/handlers/cancel-delegated.d.ts +4 -0
- package/dist/server/rpc/handlers/cancel-delegated.js +71 -0
- package/dist/server/rpc/handlers/completion-stream-delegated.js +2 -2
- package/dist/server/rpc/handlers/heartbeat-delegated.d.ts +4 -0
- package/dist/server/rpc/handlers/heartbeat-delegated.js +32 -0
- package/dist/server/rpc/handlers/heartbeat.d.ts +3 -0
- package/dist/server/rpc/handlers/heartbeat.js +3 -0
- package/dist/server/rpc/handlers/index.d.ts +2 -2
- package/dist/server/rpc/handlers/index.js +2 -2
- package/dist/server/rpc/handlers/load-model/registry.js +25 -41
- package/dist/server/rpc/handlers/load-model-delegated.js +6 -4
- package/dist/server/rpc/handlers/unload-model-delegated.js +3 -3
- package/package.json +10 -3
- package/dist/client/api/ping.d.ts +0 -11
- package/dist/client/api/ping.js +0 -19
- package/dist/examples/embed-hyperdrive.d.ts +0 -2
- package/dist/examples/llamacpp-hyperdrive.d.ts +0 -2
- package/dist/examples/seed-hyperdrive.d.ts +0 -2
- package/dist/schemas/ping.d.ts +0 -11
- package/dist/schemas/ping.js +0 -8
- package/dist/server/rpc/handlers/ping.d.ts +0 -3
- package/dist/server/rpc/handlers/ping.js +0 -3
- /package/dist/examples/{embed-hyperdrive.js → embed-p2p.js} +0 -0
- /package/dist/examples/{llamacpp-hyperdrive.js → llamacpp-p2p.js} +0 -0
- /package/dist/examples/{seed-hyperdrive.js → seed-p2p.js} +0 -0
package/dist/schemas/cancel.d.ts
CHANGED
|
@@ -9,6 +9,12 @@ declare const cancelParamsSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
9
9
|
operation: z.ZodLiteral<"downloadAsset">;
|
|
10
10
|
downloadKey: z.ZodString;
|
|
11
11
|
clearCache: z.ZodOptional<z.ZodBoolean>;
|
|
12
|
+
delegate: z.ZodOptional<z.ZodObject<{
|
|
13
|
+
topic: z.ZodString;
|
|
14
|
+
providerPublicKey: z.ZodString;
|
|
15
|
+
timeout: z.ZodOptional<z.ZodNumber>;
|
|
16
|
+
healthCheckTimeout: z.ZodOptional<z.ZodNumber>;
|
|
17
|
+
}, z.core.$strip>>;
|
|
12
18
|
}, z.core.$strip>, z.ZodObject<{
|
|
13
19
|
operation: z.ZodLiteral<"rag">;
|
|
14
20
|
workspace: z.ZodOptional<z.ZodString>;
|
|
@@ -22,6 +28,12 @@ export declare const cancelRequestSchema: z.ZodIntersection<z.ZodObject<{
|
|
|
22
28
|
operation: z.ZodLiteral<"downloadAsset">;
|
|
23
29
|
downloadKey: z.ZodString;
|
|
24
30
|
clearCache: z.ZodOptional<z.ZodBoolean>;
|
|
31
|
+
delegate: z.ZodOptional<z.ZodObject<{
|
|
32
|
+
topic: z.ZodString;
|
|
33
|
+
providerPublicKey: z.ZodString;
|
|
34
|
+
timeout: z.ZodOptional<z.ZodNumber>;
|
|
35
|
+
healthCheckTimeout: z.ZodOptional<z.ZodNumber>;
|
|
36
|
+
}, z.core.$strip>>;
|
|
25
37
|
}, z.core.$strip>, z.ZodObject<{
|
|
26
38
|
operation: z.ZodLiteral<"rag">;
|
|
27
39
|
workspace: z.ZodOptional<z.ZodString>;
|
package/dist/schemas/cancel.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
+
import { delegateBaseSchema } from "./delegate.js";
|
|
2
3
|
const cancelBaseSchema = z.object({
|
|
3
4
|
type: z.literal("cancel"),
|
|
4
5
|
});
|
|
@@ -12,6 +13,7 @@ const cancelDownloadParamsSchema = z.object({
|
|
|
12
13
|
operation: z.literal("downloadAsset"),
|
|
13
14
|
downloadKey: z.string(),
|
|
14
15
|
clearCache: z.boolean().optional(),
|
|
16
|
+
delegate: delegateBaseSchema.optional(),
|
|
15
17
|
});
|
|
16
18
|
const cancelRagParamsSchema = z.object({
|
|
17
19
|
operation: z.literal("rag"),
|
package/dist/schemas/common.d.ts
CHANGED
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
export declare const requestSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
3
|
-
type: z.ZodLiteral<"
|
|
3
|
+
type: z.ZodLiteral<"heartbeat">;
|
|
4
|
+
delegate: z.ZodOptional<z.ZodObject<{
|
|
5
|
+
topic: z.ZodString;
|
|
6
|
+
providerPublicKey: z.ZodString;
|
|
7
|
+
timeout: z.ZodOptional<z.ZodNumber>;
|
|
8
|
+
healthCheckTimeout: z.ZodOptional<z.ZodNumber>;
|
|
9
|
+
}, z.core.$strip>>;
|
|
4
10
|
}, z.core.$strip>, z.ZodUnion<readonly [z.ZodPipe<z.ZodUnion<readonly [z.ZodObject<{
|
|
5
11
|
type: z.ZodLiteral<"loadModel">;
|
|
6
12
|
modelSrc: z.ZodString;
|
|
@@ -11,6 +17,7 @@ export declare const requestSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
11
17
|
topic: z.ZodString;
|
|
12
18
|
providerPublicKey: z.ZodString;
|
|
13
19
|
timeout: z.ZodOptional<z.ZodNumber>;
|
|
20
|
+
healthCheckTimeout: z.ZodOptional<z.ZodNumber>;
|
|
14
21
|
fallbackToLocal: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
15
22
|
forceNewConnection: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
16
23
|
}, z.core.$strip>>;
|
|
@@ -73,6 +80,7 @@ export declare const requestSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
73
80
|
topic: z.ZodString;
|
|
74
81
|
providerPublicKey: z.ZodString;
|
|
75
82
|
timeout: z.ZodOptional<z.ZodNumber>;
|
|
83
|
+
healthCheckTimeout: z.ZodOptional<z.ZodNumber>;
|
|
76
84
|
fallbackToLocal: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
77
85
|
forceNewConnection: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
78
86
|
}, z.core.$strip>>;
|
|
@@ -176,6 +184,7 @@ export declare const requestSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
176
184
|
topic: z.ZodString;
|
|
177
185
|
providerPublicKey: z.ZodString;
|
|
178
186
|
timeout: z.ZodOptional<z.ZodNumber>;
|
|
187
|
+
healthCheckTimeout: z.ZodOptional<z.ZodNumber>;
|
|
179
188
|
fallbackToLocal: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
180
189
|
forceNewConnection: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
181
190
|
}, z.core.$strip>>;
|
|
@@ -455,6 +464,7 @@ export declare const requestSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
455
464
|
topic: z.ZodString;
|
|
456
465
|
providerPublicKey: z.ZodString;
|
|
457
466
|
timeout: z.ZodOptional<z.ZodNumber>;
|
|
467
|
+
healthCheckTimeout: z.ZodOptional<z.ZodNumber>;
|
|
458
468
|
fallbackToLocal: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
459
469
|
forceNewConnection: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
460
470
|
}, z.core.$strip>>;
|
|
@@ -499,6 +509,7 @@ export declare const requestSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
499
509
|
topic: z.ZodString;
|
|
500
510
|
providerPublicKey: z.ZodString;
|
|
501
511
|
timeout: z.ZodOptional<z.ZodNumber>;
|
|
512
|
+
healthCheckTimeout: z.ZodOptional<z.ZodNumber>;
|
|
502
513
|
fallbackToLocal: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
503
514
|
forceNewConnection: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
504
515
|
}, z.core.$strip>>;
|
|
@@ -1068,6 +1079,7 @@ export declare const requestSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
1068
1079
|
topic: z.ZodString;
|
|
1069
1080
|
providerPublicKey: z.ZodString;
|
|
1070
1081
|
timeout: z.ZodOptional<z.ZodNumber>;
|
|
1082
|
+
healthCheckTimeout: z.ZodOptional<z.ZodNumber>;
|
|
1071
1083
|
fallbackToLocal: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
1072
1084
|
forceNewConnection: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
1073
1085
|
}, z.core.$strip>>;
|
|
@@ -1409,6 +1421,7 @@ export declare const requestSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
1409
1421
|
topic: z.ZodString;
|
|
1410
1422
|
providerPublicKey: z.ZodString;
|
|
1411
1423
|
timeout: z.ZodOptional<z.ZodNumber>;
|
|
1424
|
+
healthCheckTimeout: z.ZodOptional<z.ZodNumber>;
|
|
1412
1425
|
fallbackToLocal: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
1413
1426
|
forceNewConnection: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
1414
1427
|
}, z.core.$strip>>;
|
|
@@ -1470,6 +1483,7 @@ export declare const requestSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
1470
1483
|
topic: z.ZodString;
|
|
1471
1484
|
providerPublicKey: z.ZodString;
|
|
1472
1485
|
timeout: z.ZodOptional<z.ZodNumber>;
|
|
1486
|
+
healthCheckTimeout: z.ZodOptional<z.ZodNumber>;
|
|
1473
1487
|
fallbackToLocal: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
1474
1488
|
forceNewConnection: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
1475
1489
|
}, z.core.$strip>>;
|
|
@@ -1521,6 +1535,7 @@ export declare const requestSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
1521
1535
|
fallbackToLocal: boolean;
|
|
1522
1536
|
forceNewConnection: boolean;
|
|
1523
1537
|
timeout?: number | undefined;
|
|
1538
|
+
healthCheckTimeout?: number | undefined;
|
|
1524
1539
|
} | undefined;
|
|
1525
1540
|
} | {
|
|
1526
1541
|
seed: boolean;
|
|
@@ -1603,6 +1618,7 @@ export declare const requestSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
1603
1618
|
fallbackToLocal: boolean;
|
|
1604
1619
|
forceNewConnection: boolean;
|
|
1605
1620
|
timeout?: number | undefined;
|
|
1621
|
+
healthCheckTimeout?: number | undefined;
|
|
1606
1622
|
} | undefined;
|
|
1607
1623
|
} | {
|
|
1608
1624
|
seed: boolean;
|
|
@@ -1743,6 +1759,7 @@ export declare const requestSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
1743
1759
|
fallbackToLocal: boolean;
|
|
1744
1760
|
forceNewConnection: boolean;
|
|
1745
1761
|
timeout?: number | undefined;
|
|
1762
|
+
healthCheckTimeout?: number | undefined;
|
|
1746
1763
|
} | undefined;
|
|
1747
1764
|
} | {
|
|
1748
1765
|
seed: boolean;
|
|
@@ -1768,6 +1785,7 @@ export declare const requestSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
1768
1785
|
fallbackToLocal: boolean;
|
|
1769
1786
|
forceNewConnection: boolean;
|
|
1770
1787
|
timeout?: number | undefined;
|
|
1788
|
+
healthCheckTimeout?: number | undefined;
|
|
1771
1789
|
} | undefined;
|
|
1772
1790
|
} | {
|
|
1773
1791
|
seed: boolean;
|
|
@@ -1900,6 +1918,7 @@ export declare const requestSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
1900
1918
|
fallbackToLocal: boolean;
|
|
1901
1919
|
forceNewConnection: boolean;
|
|
1902
1920
|
timeout?: number | undefined;
|
|
1921
|
+
healthCheckTimeout?: number | undefined;
|
|
1903
1922
|
} | undefined;
|
|
1904
1923
|
} | {
|
|
1905
1924
|
seed: boolean;
|
|
@@ -2066,6 +2085,7 @@ export declare const requestSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
2066
2085
|
fallbackToLocal: boolean;
|
|
2067
2086
|
forceNewConnection: boolean;
|
|
2068
2087
|
timeout?: number | undefined;
|
|
2088
|
+
healthCheckTimeout?: number | undefined;
|
|
2069
2089
|
} | undefined;
|
|
2070
2090
|
} | {
|
|
2071
2091
|
seed: boolean;
|
|
@@ -2106,6 +2126,7 @@ export declare const requestSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
2106
2126
|
fallbackToLocal: boolean;
|
|
2107
2127
|
forceNewConnection: boolean;
|
|
2108
2128
|
timeout?: number | undefined;
|
|
2129
|
+
healthCheckTimeout?: number | undefined;
|
|
2109
2130
|
} | undefined;
|
|
2110
2131
|
} | {
|
|
2111
2132
|
seed: boolean;
|
|
@@ -2120,6 +2141,7 @@ export declare const requestSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
2120
2141
|
fallbackToLocal: boolean;
|
|
2121
2142
|
forceNewConnection: boolean;
|
|
2122
2143
|
timeout?: number | undefined;
|
|
2144
|
+
healthCheckTimeout?: number | undefined;
|
|
2123
2145
|
} | undefined;
|
|
2124
2146
|
modelConfig?: Record<string, unknown> | undefined;
|
|
2125
2147
|
}, {
|
|
@@ -2168,6 +2190,7 @@ export declare const requestSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
2168
2190
|
fallbackToLocal: boolean;
|
|
2169
2191
|
forceNewConnection: boolean;
|
|
2170
2192
|
timeout?: number | undefined;
|
|
2193
|
+
healthCheckTimeout?: number | undefined;
|
|
2171
2194
|
} | undefined;
|
|
2172
2195
|
} | {
|
|
2173
2196
|
type: "loadModel";
|
|
@@ -2250,6 +2273,7 @@ export declare const requestSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
2250
2273
|
fallbackToLocal: boolean;
|
|
2251
2274
|
forceNewConnection: boolean;
|
|
2252
2275
|
timeout?: number | undefined;
|
|
2276
|
+
healthCheckTimeout?: number | undefined;
|
|
2253
2277
|
} | undefined;
|
|
2254
2278
|
} | {
|
|
2255
2279
|
type: "loadModel";
|
|
@@ -2390,6 +2414,7 @@ export declare const requestSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
2390
2414
|
fallbackToLocal: boolean;
|
|
2391
2415
|
forceNewConnection: boolean;
|
|
2392
2416
|
timeout?: number | undefined;
|
|
2417
|
+
healthCheckTimeout?: number | undefined;
|
|
2393
2418
|
} | undefined;
|
|
2394
2419
|
} | {
|
|
2395
2420
|
type: "loadModel";
|
|
@@ -2415,6 +2440,7 @@ export declare const requestSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
2415
2440
|
fallbackToLocal: boolean;
|
|
2416
2441
|
forceNewConnection: boolean;
|
|
2417
2442
|
timeout?: number | undefined;
|
|
2443
|
+
healthCheckTimeout?: number | undefined;
|
|
2418
2444
|
} | undefined;
|
|
2419
2445
|
} | {
|
|
2420
2446
|
type: "loadModel";
|
|
@@ -2547,6 +2573,7 @@ export declare const requestSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
2547
2573
|
fallbackToLocal: boolean;
|
|
2548
2574
|
forceNewConnection: boolean;
|
|
2549
2575
|
timeout?: number | undefined;
|
|
2576
|
+
healthCheckTimeout?: number | undefined;
|
|
2550
2577
|
} | undefined;
|
|
2551
2578
|
} | {
|
|
2552
2579
|
type: "loadModel";
|
|
@@ -2713,6 +2740,7 @@ export declare const requestSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
2713
2740
|
fallbackToLocal: boolean;
|
|
2714
2741
|
forceNewConnection: boolean;
|
|
2715
2742
|
timeout?: number | undefined;
|
|
2743
|
+
healthCheckTimeout?: number | undefined;
|
|
2716
2744
|
} | undefined;
|
|
2717
2745
|
} | {
|
|
2718
2746
|
type: "loadModel";
|
|
@@ -2753,6 +2781,7 @@ export declare const requestSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
2753
2781
|
fallbackToLocal: boolean;
|
|
2754
2782
|
forceNewConnection: boolean;
|
|
2755
2783
|
timeout?: number | undefined;
|
|
2784
|
+
healthCheckTimeout?: number | undefined;
|
|
2756
2785
|
} | undefined;
|
|
2757
2786
|
} | {
|
|
2758
2787
|
type: "loadModel";
|
|
@@ -2767,6 +2796,7 @@ export declare const requestSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
2767
2796
|
fallbackToLocal: boolean;
|
|
2768
2797
|
forceNewConnection: boolean;
|
|
2769
2798
|
timeout?: number | undefined;
|
|
2799
|
+
healthCheckTimeout?: number | undefined;
|
|
2770
2800
|
} | undefined;
|
|
2771
2801
|
modelConfig?: Record<string, unknown> | undefined;
|
|
2772
2802
|
}>>, z.ZodUnion<readonly [z.ZodObject<{
|
|
@@ -2985,6 +3015,12 @@ export declare const requestSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
2985
3015
|
operation: z.ZodLiteral<"downloadAsset">;
|
|
2986
3016
|
downloadKey: z.ZodString;
|
|
2987
3017
|
clearCache: z.ZodOptional<z.ZodBoolean>;
|
|
3018
|
+
delegate: z.ZodOptional<z.ZodObject<{
|
|
3019
|
+
topic: z.ZodString;
|
|
3020
|
+
providerPublicKey: z.ZodString;
|
|
3021
|
+
timeout: z.ZodOptional<z.ZodNumber>;
|
|
3022
|
+
healthCheckTimeout: z.ZodOptional<z.ZodNumber>;
|
|
3023
|
+
}, z.core.$strip>>;
|
|
2988
3024
|
}, z.core.$strip>, z.ZodObject<{
|
|
2989
3025
|
operation: z.ZodLiteral<"rag">;
|
|
2990
3026
|
workspace: z.ZodOptional<z.ZodString>;
|
|
@@ -3150,7 +3186,7 @@ export declare const requestSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
3150
3186
|
registrySource: z.ZodString;
|
|
3151
3187
|
}, z.core.$strip>]>;
|
|
3152
3188
|
export declare const responseSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
3153
|
-
type: z.ZodLiteral<"
|
|
3189
|
+
type: z.ZodLiteral<"heartbeat">;
|
|
3154
3190
|
number: z.ZodNumber;
|
|
3155
3191
|
}, z.core.$strip>, z.ZodObject<{
|
|
3156
3192
|
type: z.ZodLiteral<"loadModel">;
|
|
@@ -3565,6 +3601,7 @@ export declare const responseSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
3565
3601
|
}, z.core.$strip>], "type">;
|
|
3566
3602
|
export declare const rpcOptionsSchema: z.ZodObject<{
|
|
3567
3603
|
timeout: z.ZodOptional<z.ZodNumber>;
|
|
3604
|
+
healthCheckTimeout: z.ZodOptional<z.ZodNumber>;
|
|
3568
3605
|
forceNewConnection: z.ZodOptional<z.ZodBoolean>;
|
|
3569
3606
|
profiling: z.ZodOptional<z.ZodObject<{
|
|
3570
3607
|
enabled: z.ZodOptional<z.ZodBoolean>;
|
package/dist/schemas/common.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import { perCallProfilingSchema } from "./profiling.js";
|
|
3
|
-
import {
|
|
3
|
+
import { heartbeatRequestSchema, heartbeatResponseSchema } from "./heartbeat.js";
|
|
4
4
|
import { completionStreamRequestSchema, completionStreamResponseSchema, } from "./completion-stream.js";
|
|
5
5
|
import { loadModelRequestSchema, loadModelResponseSchema, modelProgressUpdateSchema, } from "./load-model.js";
|
|
6
6
|
import { downloadAssetRequestSchema, downloadAssetResponseSchema, } from "./download-asset.js";
|
|
@@ -21,7 +21,7 @@ import { ocrStreamRequestSchema, ocrStreamResponseSchema } from "./ocr.js";
|
|
|
21
21
|
import { pluginInvokeRequestSchema, pluginInvokeResponseSchema, pluginInvokeStreamRequestSchema, pluginInvokeStreamResponseSchema, } from "./plugin.js";
|
|
22
22
|
import { modelRegistryListRequestSchema, modelRegistryListResponseSchema, modelRegistrySearchRequestSchema, modelRegistrySearchResponseSchema, modelRegistryGetModelRequestSchema, modelRegistryGetModelResponseSchema, } from "./registry.js";
|
|
23
23
|
export const requestSchema = z.union([
|
|
24
|
-
|
|
24
|
+
heartbeatRequestSchema,
|
|
25
25
|
loadModelRequestSchema,
|
|
26
26
|
downloadAssetRequestSchema,
|
|
27
27
|
completionStreamRequestSchema,
|
|
@@ -45,7 +45,7 @@ export const requestSchema = z.union([
|
|
|
45
45
|
modelRegistryGetModelRequestSchema,
|
|
46
46
|
]);
|
|
47
47
|
export const responseSchema = z.discriminatedUnion("type", [
|
|
48
|
-
|
|
48
|
+
heartbeatResponseSchema,
|
|
49
49
|
loadModelResponseSchema,
|
|
50
50
|
downloadAssetResponseSchema,
|
|
51
51
|
completionStreamResponseSchema,
|
|
@@ -73,6 +73,7 @@ export const responseSchema = z.discriminatedUnion("type", [
|
|
|
73
73
|
]);
|
|
74
74
|
export const rpcOptionsSchema = z.object({
|
|
75
75
|
timeout: z.number().min(100).optional(),
|
|
76
|
+
healthCheckTimeout: z.number().min(100).optional(),
|
|
76
77
|
forceNewConnection: z.boolean().optional(),
|
|
77
78
|
profiling: perCallProfilingSchema.optional(),
|
|
78
79
|
});
|
|
@@ -1,10 +1,18 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
+
export declare const delegateBaseSchema: z.ZodObject<{
|
|
3
|
+
topic: z.ZodString;
|
|
4
|
+
providerPublicKey: z.ZodString;
|
|
5
|
+
timeout: z.ZodOptional<z.ZodNumber>;
|
|
6
|
+
healthCheckTimeout: z.ZodOptional<z.ZodNumber>;
|
|
7
|
+
}, z.core.$strip>;
|
|
2
8
|
export declare const delegateSchema: z.ZodOptional<z.ZodObject<{
|
|
3
9
|
topic: z.ZodString;
|
|
4
10
|
providerPublicKey: z.ZodString;
|
|
5
11
|
timeout: z.ZodOptional<z.ZodNumber>;
|
|
12
|
+
healthCheckTimeout: z.ZodOptional<z.ZodNumber>;
|
|
6
13
|
fallbackToLocal: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
7
14
|
forceNewConnection: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
8
15
|
}, z.core.$strip>>;
|
|
16
|
+
export type DelegateBase = z.infer<typeof delegateBaseSchema>;
|
|
9
17
|
export type Delegate = z.infer<typeof delegateSchema>;
|
|
10
18
|
//# sourceMappingURL=delegate.d.ts.map
|
package/dist/schemas/delegate.js
CHANGED
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
export const
|
|
3
|
-
.object({
|
|
2
|
+
export const delegateBaseSchema = z.object({
|
|
4
3
|
topic: z.string(),
|
|
5
4
|
providerPublicKey: z.string(),
|
|
6
5
|
timeout: z.number().min(100).optional(),
|
|
6
|
+
healthCheckTimeout: z.number().min(100).optional(),
|
|
7
|
+
});
|
|
8
|
+
export const delegateSchema = delegateBaseSchema
|
|
9
|
+
.extend({
|
|
7
10
|
fallbackToLocal: z.boolean().optional().default(false),
|
|
8
11
|
forceNewConnection: z.boolean().optional().default(false),
|
|
9
12
|
})
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const heartbeatRequestSchema: z.ZodObject<{
|
|
3
|
+
type: z.ZodLiteral<"heartbeat">;
|
|
4
|
+
delegate: z.ZodOptional<z.ZodObject<{
|
|
5
|
+
topic: z.ZodString;
|
|
6
|
+
providerPublicKey: z.ZodString;
|
|
7
|
+
timeout: z.ZodOptional<z.ZodNumber>;
|
|
8
|
+
healthCheckTimeout: z.ZodOptional<z.ZodNumber>;
|
|
9
|
+
}, z.core.$strip>>;
|
|
10
|
+
}, z.core.$strip>;
|
|
11
|
+
export declare const heartbeatResponseSchema: z.ZodObject<{
|
|
12
|
+
type: z.ZodLiteral<"heartbeat">;
|
|
13
|
+
number: z.ZodNumber;
|
|
14
|
+
}, z.core.$strip>;
|
|
15
|
+
export type HeartbeatRequest = z.infer<typeof heartbeatRequestSchema>;
|
|
16
|
+
export type HeartbeatResponse = z.infer<typeof heartbeatResponseSchema>;
|
|
17
|
+
//# sourceMappingURL=heartbeat.d.ts.map
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { delegateBaseSchema } from "./delegate.js";
|
|
3
|
+
export const heartbeatRequestSchema = z.object({
|
|
4
|
+
type: z.literal("heartbeat"),
|
|
5
|
+
delegate: delegateBaseSchema.optional(),
|
|
6
|
+
});
|
|
7
|
+
export const heartbeatResponseSchema = z.object({
|
|
8
|
+
type: z.literal("heartbeat"),
|
|
9
|
+
number: z.number(),
|
|
10
|
+
});
|
package/dist/schemas/index.d.ts
CHANGED
|
@@ -12,7 +12,7 @@ export * from "./logging-stream";
|
|
|
12
12
|
export * from "./provide";
|
|
13
13
|
export * from "./stop-provide";
|
|
14
14
|
export * from "./unload-model";
|
|
15
|
-
export * from "./
|
|
15
|
+
export * from "./heartbeat";
|
|
16
16
|
export * from "./common";
|
|
17
17
|
export * from "./transcription";
|
|
18
18
|
export * from "./translate";
|
package/dist/schemas/index.js
CHANGED
|
@@ -13,7 +13,7 @@ export * from "./logging-stream.js";
|
|
|
13
13
|
export * from "./provide.js";
|
|
14
14
|
export * from "./stop-provide.js";
|
|
15
15
|
export * from "./unload-model.js";
|
|
16
|
-
export * from "./
|
|
16
|
+
export * from "./heartbeat.js";
|
|
17
17
|
export * from "./common.js";
|
|
18
18
|
export * from "./transcription.js";
|
|
19
19
|
export * from "./translate.js";
|