@oxy.so/contracts 4.6.0 → 4.7.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/dist/cjs/.tsbuildinfo +1 -1
- package/dist/cjs/agency.js +49 -0
- package/dist/cjs/capabilityInvocation.js +173 -0
- package/dist/cjs/index.js +20 -1
- package/dist/cjs/inference/catalogue.js +6 -2
- package/dist/cjs/inference/decisions.js +245 -0
- package/dist/cjs/inference/request.js +13 -0
- package/dist/cjs/inference/version.js +1 -1
- package/dist/esm/.tsbuildinfo +1 -1
- package/dist/esm/agency.js +49 -0
- package/dist/esm/capabilityInvocation.js +165 -0
- package/dist/esm/index.js +2 -0
- package/dist/esm/inference/catalogue.js +6 -2
- package/dist/esm/inference/decisions.js +239 -0
- package/dist/esm/inference/request.js +13 -0
- package/dist/esm/inference/version.js +1 -1
- package/dist/types/.tsbuildinfo +1 -1
- package/dist/types/agency.d.ts +6 -6
- package/dist/types/capabilityInvocation.d.ts +80 -0
- package/dist/types/index.d.ts +4 -0
- package/dist/types/inference/catalogue.d.ts +27 -24
- package/dist/types/inference/decisions.d.ts +1833 -0
- package/dist/types/inference/modelDocumentation.d.ts +16 -16
- package/dist/types/inference/realtime.d.ts +72 -72
- package/dist/types/inference/request.d.ts +520 -26
- package/dist/types/inference/streamEvents.d.ts +8 -8
- package/dist/types/inference/usage.d.ts +4 -4
- package/dist/types/inference/version.d.ts +1 -1
- package/package.json +1 -1
|
@@ -46,8 +46,8 @@ export declare const inferenceStreamStartEventSchema: z.ZodObject<{
|
|
|
46
46
|
requestId: string;
|
|
47
47
|
resolvedModelReference: string;
|
|
48
48
|
servingProvider: string;
|
|
49
|
-
sequence: number;
|
|
50
49
|
startedAt: string;
|
|
50
|
+
sequence: number;
|
|
51
51
|
generationId?: string | undefined;
|
|
52
52
|
}, {
|
|
53
53
|
type: "start";
|
|
@@ -55,8 +55,8 @@ export declare const inferenceStreamStartEventSchema: z.ZodObject<{
|
|
|
55
55
|
requestId: string;
|
|
56
56
|
resolvedModelReference: string;
|
|
57
57
|
servingProvider: string;
|
|
58
|
-
sequence: number;
|
|
59
58
|
startedAt: string;
|
|
59
|
+
sequence: number;
|
|
60
60
|
generationId?: string | undefined;
|
|
61
61
|
}>;
|
|
62
62
|
/**
|
|
@@ -225,23 +225,23 @@ export declare const inferenceStreamUsageEventSchema: z.ZodObject<{
|
|
|
225
225
|
schemaVersion: 2;
|
|
226
226
|
requestId: string;
|
|
227
227
|
deploymentId: string;
|
|
228
|
-
sequence: number;
|
|
229
228
|
units: {
|
|
230
229
|
unit: "input_tokens" | "cached_input_tokens" | "output_tokens" | "reasoning_tokens" | "requests" | "images" | "audio_input_milliseconds" | "audio_output_milliseconds" | "video_milliseconds" | "characters" | "embeddings" | "audio_input_tokens" | "cached_audio_input_tokens" | "audio_output_tokens" | "session_milliseconds";
|
|
231
230
|
quantity: number;
|
|
232
231
|
}[];
|
|
233
232
|
usageSource: "provider_reported" | "oxy_measured" | "estimated";
|
|
233
|
+
sequence: number;
|
|
234
234
|
}, {
|
|
235
235
|
type: "usage";
|
|
236
236
|
schemaVersion: 2;
|
|
237
237
|
requestId: string;
|
|
238
238
|
deploymentId: string;
|
|
239
|
-
sequence: number;
|
|
240
239
|
units: {
|
|
241
240
|
unit: "input_tokens" | "cached_input_tokens" | "output_tokens" | "reasoning_tokens" | "requests" | "images" | "audio_input_milliseconds" | "audio_output_milliseconds" | "video_milliseconds" | "characters" | "embeddings" | "audio_input_tokens" | "cached_audio_input_tokens" | "audio_output_tokens" | "session_milliseconds";
|
|
242
241
|
quantity: number;
|
|
243
242
|
}[];
|
|
244
243
|
usageSource: "provider_reported" | "oxy_measured" | "estimated";
|
|
244
|
+
sequence: number;
|
|
245
245
|
}>;
|
|
246
246
|
/**
|
|
247
247
|
* What kind of re-route happened.
|
|
@@ -609,8 +609,8 @@ export declare const inferenceStreamEventSchema: z.ZodDiscriminatedUnion<"type",
|
|
|
609
609
|
requestId: string;
|
|
610
610
|
resolvedModelReference: string;
|
|
611
611
|
servingProvider: string;
|
|
612
|
-
sequence: number;
|
|
613
612
|
startedAt: string;
|
|
613
|
+
sequence: number;
|
|
614
614
|
generationId?: string | undefined;
|
|
615
615
|
}, {
|
|
616
616
|
type: "start";
|
|
@@ -618,8 +618,8 @@ export declare const inferenceStreamEventSchema: z.ZodDiscriminatedUnion<"type",
|
|
|
618
618
|
requestId: string;
|
|
619
619
|
resolvedModelReference: string;
|
|
620
620
|
servingProvider: string;
|
|
621
|
-
sequence: number;
|
|
622
621
|
startedAt: string;
|
|
622
|
+
sequence: number;
|
|
623
623
|
generationId?: string | undefined;
|
|
624
624
|
}>, z.ZodObject<{
|
|
625
625
|
/** See `version.ts`: each stream event is a whole message on the wire. */
|
|
@@ -730,23 +730,23 @@ export declare const inferenceStreamEventSchema: z.ZodDiscriminatedUnion<"type",
|
|
|
730
730
|
schemaVersion: 2;
|
|
731
731
|
requestId: string;
|
|
732
732
|
deploymentId: string;
|
|
733
|
-
sequence: number;
|
|
734
733
|
units: {
|
|
735
734
|
unit: "input_tokens" | "cached_input_tokens" | "output_tokens" | "reasoning_tokens" | "requests" | "images" | "audio_input_milliseconds" | "audio_output_milliseconds" | "video_milliseconds" | "characters" | "embeddings" | "audio_input_tokens" | "cached_audio_input_tokens" | "audio_output_tokens" | "session_milliseconds";
|
|
736
735
|
quantity: number;
|
|
737
736
|
}[];
|
|
738
737
|
usageSource: "provider_reported" | "oxy_measured" | "estimated";
|
|
738
|
+
sequence: number;
|
|
739
739
|
}, {
|
|
740
740
|
type: "usage";
|
|
741
741
|
schemaVersion: 2;
|
|
742
742
|
requestId: string;
|
|
743
743
|
deploymentId: string;
|
|
744
|
-
sequence: number;
|
|
745
744
|
units: {
|
|
746
745
|
unit: "input_tokens" | "cached_input_tokens" | "output_tokens" | "reasoning_tokens" | "requests" | "images" | "audio_input_milliseconds" | "audio_output_milliseconds" | "video_milliseconds" | "characters" | "embeddings" | "audio_input_tokens" | "cached_audio_input_tokens" | "audio_output_tokens" | "session_milliseconds";
|
|
747
746
|
quantity: number;
|
|
748
747
|
}[];
|
|
749
748
|
usageSource: "provider_reported" | "oxy_measured" | "estimated";
|
|
749
|
+
sequence: number;
|
|
750
750
|
}>, z.ZodObject<{
|
|
751
751
|
/** See `version.ts`: each stream event is a whole message on the wire. */
|
|
752
752
|
schemaVersion: z.ZodLiteral<1>;
|
|
@@ -509,13 +509,13 @@ export declare const normalizedUsageReportSchema: z.ZodEffects<z.ZodObject<{
|
|
|
509
509
|
};
|
|
510
510
|
deploymentId: string;
|
|
511
511
|
completedAt: string;
|
|
512
|
-
startedAt: string;
|
|
513
512
|
units: {
|
|
514
513
|
unit: "input_tokens" | "cached_input_tokens" | "output_tokens" | "reasoning_tokens" | "requests" | "images" | "audio_input_milliseconds" | "audio_output_milliseconds" | "video_milliseconds" | "characters" | "embeddings" | "audio_input_tokens" | "cached_audio_input_tokens" | "audio_output_tokens" | "session_milliseconds";
|
|
515
514
|
quantity: number;
|
|
516
515
|
}[];
|
|
517
516
|
usageSource: "provider_reported" | "oxy_measured" | "estimated";
|
|
518
517
|
routeSwitches: number;
|
|
518
|
+
startedAt: string;
|
|
519
519
|
generationId?: string | undefined;
|
|
520
520
|
timeToFirstTokenMs?: number | undefined;
|
|
521
521
|
}, {
|
|
@@ -540,13 +540,13 @@ export declare const normalizedUsageReportSchema: z.ZodEffects<z.ZodObject<{
|
|
|
540
540
|
};
|
|
541
541
|
deploymentId: string;
|
|
542
542
|
completedAt: string;
|
|
543
|
-
startedAt: string;
|
|
544
543
|
units: {
|
|
545
544
|
unit: "input_tokens" | "cached_input_tokens" | "output_tokens" | "reasoning_tokens" | "requests" | "images" | "audio_input_milliseconds" | "audio_output_milliseconds" | "video_milliseconds" | "characters" | "embeddings" | "audio_input_tokens" | "cached_audio_input_tokens" | "audio_output_tokens" | "session_milliseconds";
|
|
546
545
|
quantity: number;
|
|
547
546
|
}[];
|
|
548
547
|
usageSource: "provider_reported" | "oxy_measured" | "estimated";
|
|
549
548
|
routeSwitches: number;
|
|
549
|
+
startedAt: string;
|
|
550
550
|
generationId?: string | undefined;
|
|
551
551
|
timeToFirstTokenMs?: number | undefined;
|
|
552
552
|
}>, {
|
|
@@ -571,13 +571,13 @@ export declare const normalizedUsageReportSchema: z.ZodEffects<z.ZodObject<{
|
|
|
571
571
|
};
|
|
572
572
|
deploymentId: string;
|
|
573
573
|
completedAt: string;
|
|
574
|
-
startedAt: string;
|
|
575
574
|
units: {
|
|
576
575
|
unit: "input_tokens" | "cached_input_tokens" | "output_tokens" | "reasoning_tokens" | "requests" | "images" | "audio_input_milliseconds" | "audio_output_milliseconds" | "video_milliseconds" | "characters" | "embeddings" | "audio_input_tokens" | "cached_audio_input_tokens" | "audio_output_tokens" | "session_milliseconds";
|
|
577
576
|
quantity: number;
|
|
578
577
|
}[];
|
|
579
578
|
usageSource: "provider_reported" | "oxy_measured" | "estimated";
|
|
580
579
|
routeSwitches: number;
|
|
580
|
+
startedAt: string;
|
|
581
581
|
generationId?: string | undefined;
|
|
582
582
|
timeToFirstTokenMs?: number | undefined;
|
|
583
583
|
}, {
|
|
@@ -602,13 +602,13 @@ export declare const normalizedUsageReportSchema: z.ZodEffects<z.ZodObject<{
|
|
|
602
602
|
};
|
|
603
603
|
deploymentId: string;
|
|
604
604
|
completedAt: string;
|
|
605
|
-
startedAt: string;
|
|
606
605
|
units: {
|
|
607
606
|
unit: "input_tokens" | "cached_input_tokens" | "output_tokens" | "reasoning_tokens" | "requests" | "images" | "audio_input_milliseconds" | "audio_output_milliseconds" | "video_milliseconds" | "characters" | "embeddings" | "audio_input_tokens" | "cached_audio_input_tokens" | "audio_output_tokens" | "session_milliseconds";
|
|
608
607
|
quantity: number;
|
|
609
608
|
}[];
|
|
610
609
|
usageSource: "provider_reported" | "oxy_measured" | "estimated";
|
|
611
610
|
routeSwitches: number;
|
|
611
|
+
startedAt: string;
|
|
612
612
|
generationId?: string | undefined;
|
|
613
613
|
timeToFirstTokenMs?: number | undefined;
|
|
614
614
|
}>;
|
|
@@ -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.5.0";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oxy.so/contracts",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.7.0",
|
|
4
4
|
"description": "OxyHQ API contracts — single source of truth for request/response Zod schemas and inferred types, shared by the backend and the client SDKs",
|
|
5
5
|
"main": "dist/cjs/index.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|