@oxy.so/contracts 1.2.0 → 1.4.0
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/LICENSE +675 -201
- package/NOTICE +7 -2
- package/dist/cjs/.tsbuildinfo +1 -1
- package/dist/cjs/identity.js +3 -2
- package/dist/cjs/identityMove.js +111 -40
- package/dist/cjs/identityProof.js +164 -0
- package/dist/cjs/identityRecovery.js +51 -0
- package/dist/cjs/index.js +52 -21
- package/dist/cjs/inference/catalogue.js +23 -1
- package/dist/cjs/inference/identifiers.js +3 -1
- package/dist/cjs/inference/providerConnection.js +1 -1
- package/dist/cjs/inference/request.js +27 -1
- package/dist/cjs/inference/streamEvents.js +24 -2
- package/dist/cjs/inference/version.js +1 -1
- package/dist/cjs/username.js +70 -2
- package/dist/cjs/webIdentityCarrier.js +112 -53
- package/dist/cjs/webauthn.js +14 -0
- package/dist/esm/.tsbuildinfo +1 -1
- package/dist/esm/identity.js +3 -2
- package/dist/esm/identityMove.js +105 -39
- package/dist/esm/identityProof.js +159 -0
- package/dist/esm/identityRecovery.js +48 -0
- package/dist/esm/index.js +12 -9
- package/dist/esm/inference/catalogue.js +22 -0
- package/dist/esm/inference/identifiers.js +2 -0
- package/dist/esm/inference/providerConnection.js +2 -2
- package/dist/esm/inference/request.js +27 -1
- package/dist/esm/inference/streamEvents.js +24 -2
- package/dist/esm/inference/version.js +1 -1
- package/dist/esm/username.js +69 -1
- package/dist/esm/webIdentityCarrier.js +111 -52
- package/dist/esm/webauthn.js +14 -0
- package/dist/types/.tsbuildinfo +1 -1
- package/dist/types/accountGraph.d.ts +7 -7
- package/dist/types/agency.d.ts +24 -24
- package/dist/types/browserHub.d.ts +16 -16
- package/dist/types/deviceDirectory.d.ts +28 -28
- package/dist/types/externalIdentity.d.ts +7 -7
- package/dist/types/identity.d.ts +3 -2
- package/dist/types/identityMove.d.ts +119 -43
- package/dist/types/identityProof.d.ts +156 -0
- package/dist/types/identityRecovery.d.ts +246 -0
- package/dist/types/index.d.ts +15 -13
- package/dist/types/inference/catalogue.d.ts +51 -0
- package/dist/types/inference/identifiers.d.ts +2 -0
- package/dist/types/inference/modelDocumentation.d.ts +12 -0
- package/dist/types/inference/providerConnection.d.ts +40 -40
- package/dist/types/inference/request.d.ts +119 -36
- package/dist/types/inference/streamEvents.d.ts +57 -1
- package/dist/types/inference/version.d.ts +1 -1
- package/dist/types/keyRotation.d.ts +2 -2
- package/dist/types/oauth.d.ts +30 -30
- package/dist/types/sessionStatus.d.ts +6 -6
- package/dist/types/transparency.d.ts +10 -10
- package/dist/types/userResponse.d.ts +18 -18
- package/dist/types/username.d.ts +25 -2
- package/dist/types/webIdentityCarrier.d.ts +767 -159
- package/dist/types/webauthn.d.ts +208 -0
- package/package.json +2 -2
- package/dist/cjs/devicePairing.js +0 -138
- package/dist/esm/devicePairing.js +0 -135
- package/dist/types/devicePairing.d.ts +0 -130
|
@@ -490,7 +490,7 @@ export declare const inferenceMessageSchema: z.ZodEffects<z.ZodObject<{
|
|
|
490
490
|
type: "refusal";
|
|
491
491
|
text: string;
|
|
492
492
|
})[];
|
|
493
|
-
role: "
|
|
493
|
+
role: "system" | "tool" | "user" | "developer" | "assistant";
|
|
494
494
|
name?: string | undefined;
|
|
495
495
|
toolCallId?: string | undefined;
|
|
496
496
|
toolCalls?: {
|
|
@@ -538,7 +538,7 @@ export declare const inferenceMessageSchema: z.ZodEffects<z.ZodObject<{
|
|
|
538
538
|
type: "refusal";
|
|
539
539
|
text: string;
|
|
540
540
|
})[];
|
|
541
|
-
role: "
|
|
541
|
+
role: "system" | "tool" | "user" | "developer" | "assistant";
|
|
542
542
|
name?: string | undefined;
|
|
543
543
|
toolCallId?: string | undefined;
|
|
544
544
|
toolCalls?: {
|
|
@@ -586,7 +586,7 @@ export declare const inferenceMessageSchema: z.ZodEffects<z.ZodObject<{
|
|
|
586
586
|
type: "refusal";
|
|
587
587
|
text: string;
|
|
588
588
|
})[];
|
|
589
|
-
role: "
|
|
589
|
+
role: "system" | "tool" | "user" | "developer" | "assistant";
|
|
590
590
|
name?: string | undefined;
|
|
591
591
|
toolCallId?: string | undefined;
|
|
592
592
|
toolCalls?: {
|
|
@@ -634,7 +634,7 @@ export declare const inferenceMessageSchema: z.ZodEffects<z.ZodObject<{
|
|
|
634
634
|
type: "refusal";
|
|
635
635
|
text: string;
|
|
636
636
|
})[];
|
|
637
|
-
role: "
|
|
637
|
+
role: "system" | "tool" | "user" | "developer" | "assistant";
|
|
638
638
|
name?: string | undefined;
|
|
639
639
|
toolCallId?: string | undefined;
|
|
640
640
|
toolCalls?: {
|
|
@@ -871,7 +871,7 @@ export declare const inferenceInputSchema: z.ZodDiscriminatedUnion<"format", [z.
|
|
|
871
871
|
type: "refusal";
|
|
872
872
|
text: string;
|
|
873
873
|
})[];
|
|
874
|
-
role: "
|
|
874
|
+
role: "system" | "tool" | "user" | "developer" | "assistant";
|
|
875
875
|
name?: string | undefined;
|
|
876
876
|
toolCallId?: string | undefined;
|
|
877
877
|
toolCalls?: {
|
|
@@ -919,7 +919,7 @@ export declare const inferenceInputSchema: z.ZodDiscriminatedUnion<"format", [z.
|
|
|
919
919
|
type: "refusal";
|
|
920
920
|
text: string;
|
|
921
921
|
})[];
|
|
922
|
-
role: "
|
|
922
|
+
role: "system" | "tool" | "user" | "developer" | "assistant";
|
|
923
923
|
name?: string | undefined;
|
|
924
924
|
toolCallId?: string | undefined;
|
|
925
925
|
toolCalls?: {
|
|
@@ -967,7 +967,7 @@ export declare const inferenceInputSchema: z.ZodDiscriminatedUnion<"format", [z.
|
|
|
967
967
|
type: "refusal";
|
|
968
968
|
text: string;
|
|
969
969
|
})[];
|
|
970
|
-
role: "
|
|
970
|
+
role: "system" | "tool" | "user" | "developer" | "assistant";
|
|
971
971
|
name?: string | undefined;
|
|
972
972
|
toolCallId?: string | undefined;
|
|
973
973
|
toolCalls?: {
|
|
@@ -1015,7 +1015,7 @@ export declare const inferenceInputSchema: z.ZodDiscriminatedUnion<"format", [z.
|
|
|
1015
1015
|
type: "refusal";
|
|
1016
1016
|
text: string;
|
|
1017
1017
|
})[];
|
|
1018
|
-
role: "
|
|
1018
|
+
role: "system" | "tool" | "user" | "developer" | "assistant";
|
|
1019
1019
|
name?: string | undefined;
|
|
1020
1020
|
toolCallId?: string | undefined;
|
|
1021
1021
|
toolCalls?: {
|
|
@@ -1066,7 +1066,7 @@ export declare const inferenceInputSchema: z.ZodDiscriminatedUnion<"format", [z.
|
|
|
1066
1066
|
type: "refusal";
|
|
1067
1067
|
text: string;
|
|
1068
1068
|
})[];
|
|
1069
|
-
role: "
|
|
1069
|
+
role: "system" | "tool" | "user" | "developer" | "assistant";
|
|
1070
1070
|
name?: string | undefined;
|
|
1071
1071
|
toolCallId?: string | undefined;
|
|
1072
1072
|
toolCalls?: {
|
|
@@ -1117,7 +1117,7 @@ export declare const inferenceInputSchema: z.ZodDiscriminatedUnion<"format", [z.
|
|
|
1117
1117
|
type: "refusal";
|
|
1118
1118
|
text: string;
|
|
1119
1119
|
})[];
|
|
1120
|
-
role: "
|
|
1120
|
+
role: "system" | "tool" | "user" | "developer" | "assistant";
|
|
1121
1121
|
name?: string | undefined;
|
|
1122
1122
|
toolCallId?: string | undefined;
|
|
1123
1123
|
toolCalls?: {
|
|
@@ -1237,6 +1237,20 @@ export declare const responseFormatSchema: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
1237
1237
|
name: string;
|
|
1238
1238
|
strict: boolean;
|
|
1239
1239
|
}>]>;
|
|
1240
|
+
/**
|
|
1241
|
+
* The caller's reasoning control. Strict, like every leaf: a provider-specific
|
|
1242
|
+
* knob (`budget_tokens`, `summary`) is refused rather than silently dropped.
|
|
1243
|
+
*
|
|
1244
|
+
* Oxy forwards it only after checking the resolved model advertises the effort
|
|
1245
|
+
* in its catalogue `reasoningEfforts`; Kaana translates it per provider.
|
|
1246
|
+
*/
|
|
1247
|
+
export declare const inferenceReasoningSchema: z.ZodObject<{
|
|
1248
|
+
effort: z.ZodEnum<["low", "medium", "high"]>;
|
|
1249
|
+
}, "strict", z.ZodTypeAny, {
|
|
1250
|
+
effort: "low" | "medium" | "high";
|
|
1251
|
+
}, {
|
|
1252
|
+
effort: "low" | "medium" | "high";
|
|
1253
|
+
}>;
|
|
1240
1254
|
/**
|
|
1241
1255
|
* What the edge records about the CALL, as opposed to its content.
|
|
1242
1256
|
*
|
|
@@ -1272,6 +1286,21 @@ export declare const clientRequestMetadataSchema: z.ZodObject<{
|
|
|
1272
1286
|
clientRequestId?: string | undefined;
|
|
1273
1287
|
labels?: Record<string, string> | undefined;
|
|
1274
1288
|
}>;
|
|
1289
|
+
/** Parameters for text-to-speech, preserved in the signed request. */
|
|
1290
|
+
export declare const inferenceSpeechParametersSchema: z.ZodObject<{
|
|
1291
|
+
voice: z.ZodString;
|
|
1292
|
+
responseFormat: z.ZodEnum<["mp3", "opus", "aac", "flac", "wav", "pcm"]>;
|
|
1293
|
+
speed: z.ZodOptional<z.ZodNumber>;
|
|
1294
|
+
}, "strict", z.ZodTypeAny, {
|
|
1295
|
+
voice: string;
|
|
1296
|
+
responseFormat: "mp3" | "opus" | "aac" | "flac" | "wav" | "pcm";
|
|
1297
|
+
speed?: number | undefined;
|
|
1298
|
+
}, {
|
|
1299
|
+
voice: string;
|
|
1300
|
+
responseFormat: "mp3" | "opus" | "aac" | "flac" | "wav" | "pcm";
|
|
1301
|
+
speed?: number | undefined;
|
|
1302
|
+
}>;
|
|
1303
|
+
export type InferenceSpeechParameters = z.infer<typeof inferenceSpeechParametersSchema>;
|
|
1275
1304
|
/**
|
|
1276
1305
|
* The canonical internal request Oxy forwards to the data plane.
|
|
1277
1306
|
*
|
|
@@ -1583,7 +1612,7 @@ export declare const inferenceRequestSchema: z.ZodEffects<z.ZodObject<{
|
|
|
1583
1612
|
type: "refusal";
|
|
1584
1613
|
text: string;
|
|
1585
1614
|
})[];
|
|
1586
|
-
role: "
|
|
1615
|
+
role: "system" | "tool" | "user" | "developer" | "assistant";
|
|
1587
1616
|
name?: string | undefined;
|
|
1588
1617
|
toolCallId?: string | undefined;
|
|
1589
1618
|
toolCalls?: {
|
|
@@ -1631,7 +1660,7 @@ export declare const inferenceRequestSchema: z.ZodEffects<z.ZodObject<{
|
|
|
1631
1660
|
type: "refusal";
|
|
1632
1661
|
text: string;
|
|
1633
1662
|
})[];
|
|
1634
|
-
role: "
|
|
1663
|
+
role: "system" | "tool" | "user" | "developer" | "assistant";
|
|
1635
1664
|
name?: string | undefined;
|
|
1636
1665
|
toolCallId?: string | undefined;
|
|
1637
1666
|
toolCalls?: {
|
|
@@ -1679,7 +1708,7 @@ export declare const inferenceRequestSchema: z.ZodEffects<z.ZodObject<{
|
|
|
1679
1708
|
type: "refusal";
|
|
1680
1709
|
text: string;
|
|
1681
1710
|
})[];
|
|
1682
|
-
role: "
|
|
1711
|
+
role: "system" | "tool" | "user" | "developer" | "assistant";
|
|
1683
1712
|
name?: string | undefined;
|
|
1684
1713
|
toolCallId?: string | undefined;
|
|
1685
1714
|
toolCalls?: {
|
|
@@ -1727,7 +1756,7 @@ export declare const inferenceRequestSchema: z.ZodEffects<z.ZodObject<{
|
|
|
1727
1756
|
type: "refusal";
|
|
1728
1757
|
text: string;
|
|
1729
1758
|
})[];
|
|
1730
|
-
role: "
|
|
1759
|
+
role: "system" | "tool" | "user" | "developer" | "assistant";
|
|
1731
1760
|
name?: string | undefined;
|
|
1732
1761
|
toolCallId?: string | undefined;
|
|
1733
1762
|
toolCalls?: {
|
|
@@ -1778,7 +1807,7 @@ export declare const inferenceRequestSchema: z.ZodEffects<z.ZodObject<{
|
|
|
1778
1807
|
type: "refusal";
|
|
1779
1808
|
text: string;
|
|
1780
1809
|
})[];
|
|
1781
|
-
role: "
|
|
1810
|
+
role: "system" | "tool" | "user" | "developer" | "assistant";
|
|
1782
1811
|
name?: string | undefined;
|
|
1783
1812
|
toolCallId?: string | undefined;
|
|
1784
1813
|
toolCalls?: {
|
|
@@ -1829,7 +1858,7 @@ export declare const inferenceRequestSchema: z.ZodEffects<z.ZodObject<{
|
|
|
1829
1858
|
type: "refusal";
|
|
1830
1859
|
text: string;
|
|
1831
1860
|
})[];
|
|
1832
|
-
role: "
|
|
1861
|
+
role: "system" | "tool" | "user" | "developer" | "assistant";
|
|
1833
1862
|
name?: string | undefined;
|
|
1834
1863
|
toolCallId?: string | undefined;
|
|
1835
1864
|
toolCalls?: {
|
|
@@ -1885,6 +1914,27 @@ export declare const inferenceRequestSchema: z.ZodEffects<z.ZodObject<{
|
|
|
1885
1914
|
presencePenalty?: number | undefined;
|
|
1886
1915
|
stopSequences?: string[] | undefined;
|
|
1887
1916
|
}>;
|
|
1917
|
+
/** Absent means the route's own default reasoning behaviour. */
|
|
1918
|
+
reasoning: z.ZodOptional<z.ZodObject<{
|
|
1919
|
+
effort: z.ZodEnum<["low", "medium", "high"]>;
|
|
1920
|
+
}, "strict", z.ZodTypeAny, {
|
|
1921
|
+
effort: "low" | "medium" | "high";
|
|
1922
|
+
}, {
|
|
1923
|
+
effort: "low" | "medium" | "high";
|
|
1924
|
+
}>>;
|
|
1925
|
+
speech: z.ZodOptional<z.ZodObject<{
|
|
1926
|
+
voice: z.ZodString;
|
|
1927
|
+
responseFormat: z.ZodEnum<["mp3", "opus", "aac", "flac", "wav", "pcm"]>;
|
|
1928
|
+
speed: z.ZodOptional<z.ZodNumber>;
|
|
1929
|
+
}, "strict", z.ZodTypeAny, {
|
|
1930
|
+
voice: string;
|
|
1931
|
+
responseFormat: "mp3" | "opus" | "aac" | "flac" | "wav" | "pcm";
|
|
1932
|
+
speed?: number | undefined;
|
|
1933
|
+
}, {
|
|
1934
|
+
voice: string;
|
|
1935
|
+
responseFormat: "mp3" | "opus" | "aac" | "flac" | "wav" | "pcm";
|
|
1936
|
+
speed?: number | undefined;
|
|
1937
|
+
}>>;
|
|
1888
1938
|
tools: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
1889
1939
|
type: z.ZodLiteral<"function">;
|
|
1890
1940
|
name: z.ZodString;
|
|
@@ -2249,7 +2299,7 @@ export declare const inferenceRequestSchema: z.ZodEffects<z.ZodObject<{
|
|
|
2249
2299
|
type: "refusal";
|
|
2250
2300
|
text: string;
|
|
2251
2301
|
})[];
|
|
2252
|
-
role: "
|
|
2302
|
+
role: "system" | "tool" | "user" | "developer" | "assistant";
|
|
2253
2303
|
name?: string | undefined;
|
|
2254
2304
|
toolCallId?: string | undefined;
|
|
2255
2305
|
toolCalls?: {
|
|
@@ -2280,11 +2330,10 @@ export declare const inferenceRequestSchema: z.ZodEffects<z.ZodObject<{
|
|
|
2280
2330
|
policyVersion: number;
|
|
2281
2331
|
};
|
|
2282
2332
|
idempotencyKey?: string | undefined;
|
|
2283
|
-
|
|
2284
|
-
|
|
2285
|
-
type: "function";
|
|
2286
|
-
name: string;
|
|
2333
|
+
reasoning?: {
|
|
2334
|
+
effort: "low" | "medium" | "high";
|
|
2287
2335
|
} | undefined;
|
|
2336
|
+
maxOutputTokens?: number | undefined;
|
|
2288
2337
|
responseFormat?: {
|
|
2289
2338
|
type: "text";
|
|
2290
2339
|
} | {
|
|
@@ -2295,6 +2344,15 @@ export declare const inferenceRequestSchema: z.ZodEffects<z.ZodObject<{
|
|
|
2295
2344
|
name: string;
|
|
2296
2345
|
strict: boolean;
|
|
2297
2346
|
} | undefined;
|
|
2347
|
+
speech?: {
|
|
2348
|
+
voice: string;
|
|
2349
|
+
responseFormat: "mp3" | "opus" | "aac" | "flac" | "wav" | "pcm";
|
|
2350
|
+
speed?: number | undefined;
|
|
2351
|
+
} | undefined;
|
|
2352
|
+
toolChoice?: "none" | "required" | "auto" | {
|
|
2353
|
+
type: "function";
|
|
2354
|
+
name: string;
|
|
2355
|
+
} | undefined;
|
|
2298
2356
|
authorizedRoutes?: ({
|
|
2299
2357
|
provider: string;
|
|
2300
2358
|
modelReference: string;
|
|
@@ -2396,7 +2454,7 @@ export declare const inferenceRequestSchema: z.ZodEffects<z.ZodObject<{
|
|
|
2396
2454
|
type: "refusal";
|
|
2397
2455
|
text: string;
|
|
2398
2456
|
})[];
|
|
2399
|
-
role: "
|
|
2457
|
+
role: "system" | "tool" | "user" | "developer" | "assistant";
|
|
2400
2458
|
name?: string | undefined;
|
|
2401
2459
|
toolCallId?: string | undefined;
|
|
2402
2460
|
toolCalls?: {
|
|
@@ -2434,11 +2492,10 @@ export declare const inferenceRequestSchema: z.ZodEffects<z.ZodObject<{
|
|
|
2434
2492
|
strict?: boolean | undefined;
|
|
2435
2493
|
}[] | undefined;
|
|
2436
2494
|
idempotencyKey?: string | undefined;
|
|
2437
|
-
|
|
2438
|
-
|
|
2439
|
-
type: "function";
|
|
2440
|
-
name: string;
|
|
2495
|
+
reasoning?: {
|
|
2496
|
+
effort: "low" | "medium" | "high";
|
|
2441
2497
|
} | undefined;
|
|
2498
|
+
maxOutputTokens?: number | undefined;
|
|
2442
2499
|
responseFormat?: {
|
|
2443
2500
|
type: "text";
|
|
2444
2501
|
} | {
|
|
@@ -2449,6 +2506,15 @@ export declare const inferenceRequestSchema: z.ZodEffects<z.ZodObject<{
|
|
|
2449
2506
|
name: string;
|
|
2450
2507
|
strict: boolean;
|
|
2451
2508
|
} | undefined;
|
|
2509
|
+
speech?: {
|
|
2510
|
+
voice: string;
|
|
2511
|
+
responseFormat: "mp3" | "opus" | "aac" | "flac" | "wav" | "pcm";
|
|
2512
|
+
speed?: number | undefined;
|
|
2513
|
+
} | undefined;
|
|
2514
|
+
toolChoice?: "none" | "required" | "auto" | {
|
|
2515
|
+
type: "function";
|
|
2516
|
+
name: string;
|
|
2517
|
+
} | undefined;
|
|
2452
2518
|
authorizedRoutes?: ({
|
|
2453
2519
|
provider: string;
|
|
2454
2520
|
modelReference: string;
|
|
@@ -2557,7 +2623,7 @@ export declare const inferenceRequestSchema: z.ZodEffects<z.ZodObject<{
|
|
|
2557
2623
|
type: "refusal";
|
|
2558
2624
|
text: string;
|
|
2559
2625
|
})[];
|
|
2560
|
-
role: "
|
|
2626
|
+
role: "system" | "tool" | "user" | "developer" | "assistant";
|
|
2561
2627
|
name?: string | undefined;
|
|
2562
2628
|
toolCallId?: string | undefined;
|
|
2563
2629
|
toolCalls?: {
|
|
@@ -2588,11 +2654,10 @@ export declare const inferenceRequestSchema: z.ZodEffects<z.ZodObject<{
|
|
|
2588
2654
|
policyVersion: number;
|
|
2589
2655
|
};
|
|
2590
2656
|
idempotencyKey?: string | undefined;
|
|
2591
|
-
|
|
2592
|
-
|
|
2593
|
-
type: "function";
|
|
2594
|
-
name: string;
|
|
2657
|
+
reasoning?: {
|
|
2658
|
+
effort: "low" | "medium" | "high";
|
|
2595
2659
|
} | undefined;
|
|
2660
|
+
maxOutputTokens?: number | undefined;
|
|
2596
2661
|
responseFormat?: {
|
|
2597
2662
|
type: "text";
|
|
2598
2663
|
} | {
|
|
@@ -2603,6 +2668,15 @@ export declare const inferenceRequestSchema: z.ZodEffects<z.ZodObject<{
|
|
|
2603
2668
|
name: string;
|
|
2604
2669
|
strict: boolean;
|
|
2605
2670
|
} | undefined;
|
|
2671
|
+
speech?: {
|
|
2672
|
+
voice: string;
|
|
2673
|
+
responseFormat: "mp3" | "opus" | "aac" | "flac" | "wav" | "pcm";
|
|
2674
|
+
speed?: number | undefined;
|
|
2675
|
+
} | undefined;
|
|
2676
|
+
toolChoice?: "none" | "required" | "auto" | {
|
|
2677
|
+
type: "function";
|
|
2678
|
+
name: string;
|
|
2679
|
+
} | undefined;
|
|
2606
2680
|
authorizedRoutes?: ({
|
|
2607
2681
|
provider: string;
|
|
2608
2682
|
modelReference: string;
|
|
@@ -2704,7 +2778,7 @@ export declare const inferenceRequestSchema: z.ZodEffects<z.ZodObject<{
|
|
|
2704
2778
|
type: "refusal";
|
|
2705
2779
|
text: string;
|
|
2706
2780
|
})[];
|
|
2707
|
-
role: "
|
|
2781
|
+
role: "system" | "tool" | "user" | "developer" | "assistant";
|
|
2708
2782
|
name?: string | undefined;
|
|
2709
2783
|
toolCallId?: string | undefined;
|
|
2710
2784
|
toolCalls?: {
|
|
@@ -2742,11 +2816,10 @@ export declare const inferenceRequestSchema: z.ZodEffects<z.ZodObject<{
|
|
|
2742
2816
|
strict?: boolean | undefined;
|
|
2743
2817
|
}[] | undefined;
|
|
2744
2818
|
idempotencyKey?: string | undefined;
|
|
2745
|
-
|
|
2746
|
-
|
|
2747
|
-
type: "function";
|
|
2748
|
-
name: string;
|
|
2819
|
+
reasoning?: {
|
|
2820
|
+
effort: "low" | "medium" | "high";
|
|
2749
2821
|
} | undefined;
|
|
2822
|
+
maxOutputTokens?: number | undefined;
|
|
2750
2823
|
responseFormat?: {
|
|
2751
2824
|
type: "text";
|
|
2752
2825
|
} | {
|
|
@@ -2757,6 +2830,15 @@ export declare const inferenceRequestSchema: z.ZodEffects<z.ZodObject<{
|
|
|
2757
2830
|
name: string;
|
|
2758
2831
|
strict: boolean;
|
|
2759
2832
|
} | undefined;
|
|
2833
|
+
speech?: {
|
|
2834
|
+
voice: string;
|
|
2835
|
+
responseFormat: "mp3" | "opus" | "aac" | "flac" | "wav" | "pcm";
|
|
2836
|
+
speed?: number | undefined;
|
|
2837
|
+
} | undefined;
|
|
2838
|
+
toolChoice?: "none" | "required" | "auto" | {
|
|
2839
|
+
type: "function";
|
|
2840
|
+
name: string;
|
|
2841
|
+
} | undefined;
|
|
2760
2842
|
authorizedRoutes?: ({
|
|
2761
2843
|
provider: string;
|
|
2762
2844
|
modelReference: string;
|
|
@@ -2793,6 +2875,7 @@ export type InferenceMessageRole = z.infer<typeof inferenceMessageRoleSchema>;
|
|
|
2793
2875
|
export type InferenceMessage = z.infer<typeof inferenceMessageSchema>;
|
|
2794
2876
|
export type InferenceInput = z.infer<typeof inferenceInputSchema>;
|
|
2795
2877
|
export type SamplingParameters = z.infer<typeof samplingParametersSchema>;
|
|
2878
|
+
export type InferenceReasoning = z.infer<typeof inferenceReasoningSchema>;
|
|
2796
2879
|
export type ToolDefinition = z.infer<typeof toolDefinitionSchema>;
|
|
2797
2880
|
export type ToolChoice = z.infer<typeof toolChoiceSchema>;
|
|
2798
2881
|
export type ResponseFormat = z.infer<typeof responseFormatSchema>;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Normalized stream events — what the data plane emits and the Oxy edge
|
|
3
3
|
* forwards as SSE.
|
|
4
4
|
*
|
|
5
|
-
* One discriminated union,
|
|
5
|
+
* One discriminated union, eight shapes, all carrying `requestId` and a
|
|
6
6
|
* monotonic `sequence`. `requestId` is on EVERY event rather than only the
|
|
7
7
|
* first because a proxy that re-frames or a client that reconnects would
|
|
8
8
|
* otherwise be holding events it cannot attribute; `sequence` is what makes a
|
|
@@ -93,6 +93,37 @@ export declare const inferenceStreamDeltaEventSchema: z.ZodObject<{
|
|
|
93
93
|
sequence: number;
|
|
94
94
|
outputIndex: number;
|
|
95
95
|
}>;
|
|
96
|
+
/** The encodings an audio output may carry. */
|
|
97
|
+
export declare const inferenceAudioMediaTypeSchema: z.ZodEnum<["audio/mpeg", "audio/wav", "audio/ogg", "audio/aac", "audio/flac", "audio/pcm"]>;
|
|
98
|
+
export type InferenceAudioMediaType = z.infer<typeof inferenceAudioMediaTypeSchema>;
|
|
99
|
+
/** The most bytes one folded audio output may hold, at the edge and in the SDK. */
|
|
100
|
+
export declare const MAX_INFERENCE_AUDIO_BYTES: number;
|
|
101
|
+
/** A bounded, independently base64-encoded chunk of one audio output. */
|
|
102
|
+
export declare const inferenceStreamAudioEventSchema: z.ZodObject<{
|
|
103
|
+
schemaVersion: z.ZodLiteral<1>;
|
|
104
|
+
type: z.ZodLiteral<"audio">;
|
|
105
|
+
requestId: z.ZodString;
|
|
106
|
+
sequence: z.ZodNumber;
|
|
107
|
+
outputIndex: z.ZodNumber;
|
|
108
|
+
mediaType: z.ZodEnum<["audio/mpeg", "audio/wav", "audio/ogg", "audio/aac", "audio/flac", "audio/pcm"]>;
|
|
109
|
+
data: z.ZodString;
|
|
110
|
+
}, "strip", z.ZodTypeAny, {
|
|
111
|
+
type: "audio";
|
|
112
|
+
schemaVersion: 1;
|
|
113
|
+
data: string;
|
|
114
|
+
requestId: string;
|
|
115
|
+
mediaType: "audio/mpeg" | "audio/wav" | "audio/ogg" | "audio/aac" | "audio/flac" | "audio/pcm";
|
|
116
|
+
sequence: number;
|
|
117
|
+
outputIndex: number;
|
|
118
|
+
}, {
|
|
119
|
+
type: "audio";
|
|
120
|
+
schemaVersion: 1;
|
|
121
|
+
data: string;
|
|
122
|
+
requestId: string;
|
|
123
|
+
mediaType: "audio/mpeg" | "audio/wav" | "audio/ogg" | "audio/aac" | "audio/flac" | "audio/pcm";
|
|
124
|
+
sequence: number;
|
|
125
|
+
outputIndex: number;
|
|
126
|
+
}>;
|
|
96
127
|
/**
|
|
97
128
|
* A tool call being streamed.
|
|
98
129
|
*
|
|
@@ -610,6 +641,30 @@ export declare const inferenceStreamEventSchema: z.ZodDiscriminatedUnion<"type",
|
|
|
610
641
|
text: string;
|
|
611
642
|
sequence: number;
|
|
612
643
|
outputIndex: number;
|
|
644
|
+
}>, z.ZodObject<{
|
|
645
|
+
schemaVersion: z.ZodLiteral<1>;
|
|
646
|
+
type: z.ZodLiteral<"audio">;
|
|
647
|
+
requestId: z.ZodString;
|
|
648
|
+
sequence: z.ZodNumber;
|
|
649
|
+
outputIndex: z.ZodNumber;
|
|
650
|
+
mediaType: z.ZodEnum<["audio/mpeg", "audio/wav", "audio/ogg", "audio/aac", "audio/flac", "audio/pcm"]>;
|
|
651
|
+
data: z.ZodString;
|
|
652
|
+
}, "strip", z.ZodTypeAny, {
|
|
653
|
+
type: "audio";
|
|
654
|
+
schemaVersion: 1;
|
|
655
|
+
data: string;
|
|
656
|
+
requestId: string;
|
|
657
|
+
mediaType: "audio/mpeg" | "audio/wav" | "audio/ogg" | "audio/aac" | "audio/flac" | "audio/pcm";
|
|
658
|
+
sequence: number;
|
|
659
|
+
outputIndex: number;
|
|
660
|
+
}, {
|
|
661
|
+
type: "audio";
|
|
662
|
+
schemaVersion: 1;
|
|
663
|
+
data: string;
|
|
664
|
+
requestId: string;
|
|
665
|
+
mediaType: "audio/mpeg" | "audio/wav" | "audio/ogg" | "audio/aac" | "audio/flac" | "audio/pcm";
|
|
666
|
+
sequence: number;
|
|
667
|
+
outputIndex: number;
|
|
613
668
|
}>, z.ZodObject<{
|
|
614
669
|
/** See `version.ts`: each stream event is a whole message on the wire. */
|
|
615
670
|
schemaVersion: z.ZodLiteral<1>;
|
|
@@ -939,6 +994,7 @@ export declare const inferenceStreamEventSchema: z.ZodDiscriminatedUnion<"type",
|
|
|
939
994
|
}>]>;
|
|
940
995
|
export type InferenceStreamStartEvent = z.infer<typeof inferenceStreamStartEventSchema>;
|
|
941
996
|
export type InferenceStreamDeltaEvent = z.infer<typeof inferenceStreamDeltaEventSchema>;
|
|
997
|
+
export type InferenceStreamAudioEvent = z.infer<typeof inferenceStreamAudioEventSchema>;
|
|
942
998
|
export type InferenceStreamToolCallEvent = z.infer<typeof inferenceStreamToolCallEventSchema>;
|
|
943
999
|
export type InferenceStreamUsageEvent = z.infer<typeof inferenceStreamUsageEventSchema>;
|
|
944
1000
|
export type InferenceRouteSwitchDetail = z.infer<typeof inferenceRouteSwitchDetailSchema>;
|
|
@@ -99,4 +99,4 @@
|
|
|
99
99
|
* change to, say, the catalogue reject every in-flight inference request; the
|
|
100
100
|
* per-shape `schemaVersion` is what a message is validated against.
|
|
101
101
|
*/
|
|
102
|
-
export declare const INFERENCE_CONTRACT_VERSION = "3.
|
|
102
|
+
export declare const INFERENCE_CONTRACT_VERSION = "3.1.0";
|
|
@@ -72,17 +72,17 @@ export declare const rotateKeyCompleteRequestSchema: z.ZodObject<{
|
|
|
72
72
|
signOutEverywhere: z.ZodOptional<z.ZodBoolean>;
|
|
73
73
|
}, "strip", z.ZodTypeAny, {
|
|
74
74
|
signature: string;
|
|
75
|
-
timestamp: number;
|
|
76
75
|
challenge: string;
|
|
77
76
|
newPublicKey: string;
|
|
78
77
|
newKeyProof: string;
|
|
78
|
+
timestamp: number;
|
|
79
79
|
signOutEverywhere?: boolean | undefined;
|
|
80
80
|
}, {
|
|
81
81
|
signature: string;
|
|
82
|
-
timestamp: number;
|
|
83
82
|
challenge: string;
|
|
84
83
|
newPublicKey: string;
|
|
85
84
|
newKeyProof: string;
|
|
85
|
+
timestamp: number;
|
|
86
86
|
signOutEverywhere?: boolean | undefined;
|
|
87
87
|
}>;
|
|
88
88
|
export type RotateKeyCompleteRequest = z.infer<typeof rotateKeyCompleteRequestSchema>;
|