@oxy.so/contracts 4.7.0 → 4.8.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/index.js +9 -1
- package/dist/cjs/inference/catalogue.js +5 -2
- package/dist/cjs/inference/request.js +33 -1
- package/dist/cjs/inference/scopedExecution.js +87 -0
- package/dist/esm/.tsbuildinfo +1 -1
- package/dist/esm/index.js +2 -0
- package/dist/esm/inference/catalogue.js +3 -0
- package/dist/esm/inference/request.js +32 -0
- package/dist/esm/inference/scopedExecution.js +83 -0
- package/dist/types/.tsbuildinfo +1 -1
- package/dist/types/index.d.ts +4 -0
- package/dist/types/inference/aliaModelRelease.d.ts +86 -86
- package/dist/types/inference/catalogue.d.ts +326 -136
- package/dist/types/inference/modelDocumentation.d.ts +234 -234
- package/dist/types/inference/realtime.d.ts +798 -798
- package/dist/types/inference/request.d.ts +2697 -424
- package/dist/types/inference/routingPolicy.d.ts +16 -16
- package/dist/types/inference/scopedExecution.d.ts +202 -0
- package/package.json +1 -1
|
@@ -263,10 +263,10 @@ export declare const routingPolicySchema: z.ZodEffects<z.ZodObject<{
|
|
|
263
263
|
accountId: string & z.BRAND<"OxyAccountId">;
|
|
264
264
|
applicationId: string;
|
|
265
265
|
};
|
|
266
|
-
dedicatedCapacity: "disabled" | "prefer" | "require";
|
|
267
|
-
optimiseFor: "price" | "latency" | "throughput" | "balanced";
|
|
268
266
|
routingPolicyId: string;
|
|
269
267
|
policyVersion: number;
|
|
268
|
+
dedicatedCapacity: "disabled" | "prefer" | "require";
|
|
269
|
+
optimiseFor: "price" | "latency" | "throughput" | "balanced";
|
|
270
270
|
providerAllowlist: string[];
|
|
271
271
|
providerDenylist: string[];
|
|
272
272
|
allowedRegions: string[];
|
|
@@ -311,10 +311,10 @@ export declare const routingPolicySchema: z.ZodEffects<z.ZodObject<{
|
|
|
311
311
|
accountId: string;
|
|
312
312
|
applicationId: string;
|
|
313
313
|
};
|
|
314
|
-
dedicatedCapacity: "disabled" | "prefer" | "require";
|
|
315
|
-
optimiseFor: "price" | "latency" | "throughput" | "balanced";
|
|
316
314
|
routingPolicyId: string;
|
|
317
315
|
policyVersion: number;
|
|
316
|
+
dedicatedCapacity: "disabled" | "prefer" | "require";
|
|
317
|
+
optimiseFor: "price" | "latency" | "throughput" | "balanced";
|
|
318
318
|
requireZeroDataRetention: boolean;
|
|
319
319
|
prohibitTrainingOnCustomerData: boolean;
|
|
320
320
|
oxyHostedOnly: boolean;
|
|
@@ -359,10 +359,10 @@ export declare const routingPolicySchema: z.ZodEffects<z.ZodObject<{
|
|
|
359
359
|
accountId: string & z.BRAND<"OxyAccountId">;
|
|
360
360
|
applicationId: string;
|
|
361
361
|
};
|
|
362
|
-
dedicatedCapacity: "disabled" | "prefer" | "require";
|
|
363
|
-
optimiseFor: "price" | "latency" | "throughput" | "balanced";
|
|
364
362
|
routingPolicyId: string;
|
|
365
363
|
policyVersion: number;
|
|
364
|
+
dedicatedCapacity: "disabled" | "prefer" | "require";
|
|
365
|
+
optimiseFor: "price" | "latency" | "throughput" | "balanced";
|
|
366
366
|
providerAllowlist: string[];
|
|
367
367
|
providerDenylist: string[];
|
|
368
368
|
allowedRegions: string[];
|
|
@@ -407,10 +407,10 @@ export declare const routingPolicySchema: z.ZodEffects<z.ZodObject<{
|
|
|
407
407
|
accountId: string;
|
|
408
408
|
applicationId: string;
|
|
409
409
|
};
|
|
410
|
-
dedicatedCapacity: "disabled" | "prefer" | "require";
|
|
411
|
-
optimiseFor: "price" | "latency" | "throughput" | "balanced";
|
|
412
410
|
routingPolicyId: string;
|
|
413
411
|
policyVersion: number;
|
|
412
|
+
dedicatedCapacity: "disabled" | "prefer" | "require";
|
|
413
|
+
optimiseFor: "price" | "latency" | "throughput" | "balanced";
|
|
414
414
|
requireZeroDataRetention: boolean;
|
|
415
415
|
prohibitTrainingOnCustomerData: boolean;
|
|
416
416
|
oxyHostedOnly: boolean;
|
|
@@ -509,8 +509,8 @@ export declare const authorizedRouteSchema: z.ZodEffects<z.ZodDiscriminatedUnion
|
|
|
509
509
|
}, "strict", z.ZodTypeAny, {
|
|
510
510
|
provider: string;
|
|
511
511
|
modelReference: string;
|
|
512
|
-
regions: string[];
|
|
513
512
|
deploymentId: string;
|
|
513
|
+
regions: string[];
|
|
514
514
|
substitution: "same_model";
|
|
515
515
|
customerProviderCredential?: {
|
|
516
516
|
environment: "development" | "staging" | "production";
|
|
@@ -522,8 +522,8 @@ export declare const authorizedRouteSchema: z.ZodEffects<z.ZodDiscriminatedUnion
|
|
|
522
522
|
}, {
|
|
523
523
|
provider: string;
|
|
524
524
|
modelReference: string;
|
|
525
|
-
regions: string[];
|
|
526
525
|
deploymentId: string;
|
|
526
|
+
regions: string[];
|
|
527
527
|
substitution: "same_model";
|
|
528
528
|
customerProviderCredential?: {
|
|
529
529
|
environment: "development" | "staging" | "production";
|
|
@@ -562,8 +562,8 @@ export declare const authorizedRouteSchema: z.ZodEffects<z.ZodDiscriminatedUnion
|
|
|
562
562
|
}, "strict", z.ZodTypeAny, {
|
|
563
563
|
provider: string;
|
|
564
564
|
modelReference: string;
|
|
565
|
-
regions: string[];
|
|
566
565
|
deploymentId: string;
|
|
566
|
+
regions: string[];
|
|
567
567
|
substitution: "cross_model";
|
|
568
568
|
authorizedByPolicy: true;
|
|
569
569
|
customerProviderCredential?: {
|
|
@@ -576,8 +576,8 @@ export declare const authorizedRouteSchema: z.ZodEffects<z.ZodDiscriminatedUnion
|
|
|
576
576
|
}, {
|
|
577
577
|
provider: string;
|
|
578
578
|
modelReference: string;
|
|
579
|
-
regions: string[];
|
|
580
579
|
deploymentId: string;
|
|
580
|
+
regions: string[];
|
|
581
581
|
substitution: "cross_model";
|
|
582
582
|
authorizedByPolicy: true;
|
|
583
583
|
customerProviderCredential?: {
|
|
@@ -590,8 +590,8 @@ export declare const authorizedRouteSchema: z.ZodEffects<z.ZodDiscriminatedUnion
|
|
|
590
590
|
}>]>, {
|
|
591
591
|
provider: string;
|
|
592
592
|
modelReference: string;
|
|
593
|
-
regions: string[];
|
|
594
593
|
deploymentId: string;
|
|
594
|
+
regions: string[];
|
|
595
595
|
substitution: "same_model";
|
|
596
596
|
customerProviderCredential?: {
|
|
597
597
|
environment: "development" | "staging" | "production";
|
|
@@ -603,8 +603,8 @@ export declare const authorizedRouteSchema: z.ZodEffects<z.ZodDiscriminatedUnion
|
|
|
603
603
|
} | {
|
|
604
604
|
provider: string;
|
|
605
605
|
modelReference: string;
|
|
606
|
-
regions: string[];
|
|
607
606
|
deploymentId: string;
|
|
607
|
+
regions: string[];
|
|
608
608
|
substitution: "cross_model";
|
|
609
609
|
authorizedByPolicy: true;
|
|
610
610
|
customerProviderCredential?: {
|
|
@@ -617,8 +617,8 @@ export declare const authorizedRouteSchema: z.ZodEffects<z.ZodDiscriminatedUnion
|
|
|
617
617
|
}, {
|
|
618
618
|
provider: string;
|
|
619
619
|
modelReference: string;
|
|
620
|
-
regions: string[];
|
|
621
620
|
deploymentId: string;
|
|
621
|
+
regions: string[];
|
|
622
622
|
substitution: "same_model";
|
|
623
623
|
customerProviderCredential?: {
|
|
624
624
|
environment: "development" | "staging" | "production";
|
|
@@ -630,8 +630,8 @@ export declare const authorizedRouteSchema: z.ZodEffects<z.ZodDiscriminatedUnion
|
|
|
630
630
|
} | {
|
|
631
631
|
provider: string;
|
|
632
632
|
modelReference: string;
|
|
633
|
-
regions: string[];
|
|
634
633
|
deploymentId: string;
|
|
634
|
+
regions: string[];
|
|
635
635
|
substitution: "cross_model";
|
|
636
636
|
authorizedByPolicy: true;
|
|
637
637
|
customerProviderCredential?: {
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
/** Explicit extension negotiation; never replaces the legacy 3.5 handshake. */
|
|
3
|
+
export declare const SCOPED_EXECUTION_CONTRACT_VERSION: "3.6.0";
|
|
4
|
+
/** Scoped only; normal envelope v2 and metadata 3.5 remain unchanged. */
|
|
5
|
+
export declare const SCOPED_REQUEST_ENVELOPE_VERSION: 3;
|
|
6
|
+
/** Restriction only: none of these identities grants catalogue eligibility. */
|
|
7
|
+
export declare const scopedExecutionAudienceSchema: z.ZodObject<{
|
|
8
|
+
permitId: z.ZodString;
|
|
9
|
+
idempotencyKey: z.ZodString;
|
|
10
|
+
fixtureSha256: z.ZodString;
|
|
11
|
+
expiresAt: z.ZodString;
|
|
12
|
+
principal: z.ZodObject<{
|
|
13
|
+
accountId: z.ZodString;
|
|
14
|
+
applicationId: z.ZodString;
|
|
15
|
+
credentialId: z.ZodString;
|
|
16
|
+
environment: z.ZodEnum<["development", "staging", "production"]>;
|
|
17
|
+
}, "strict", z.ZodTypeAny, {
|
|
18
|
+
accountId: string;
|
|
19
|
+
applicationId: string;
|
|
20
|
+
credentialId: string;
|
|
21
|
+
environment: "development" | "staging" | "production";
|
|
22
|
+
}, {
|
|
23
|
+
accountId: string;
|
|
24
|
+
applicationId: string;
|
|
25
|
+
credentialId: string;
|
|
26
|
+
environment: "development" | "staging" | "production";
|
|
27
|
+
}>;
|
|
28
|
+
policy: z.ZodObject<{
|
|
29
|
+
routingPolicyId: z.ZodString;
|
|
30
|
+
policyVersion: z.ZodNumber;
|
|
31
|
+
}, "strict", z.ZodTypeAny, {
|
|
32
|
+
routingPolicyId: string;
|
|
33
|
+
policyVersion: number;
|
|
34
|
+
}, {
|
|
35
|
+
routingPolicyId: string;
|
|
36
|
+
policyVersion: number;
|
|
37
|
+
}>;
|
|
38
|
+
deploymentId: z.ZodString;
|
|
39
|
+
provider: z.ZodString;
|
|
40
|
+
keyId: z.ZodString;
|
|
41
|
+
modelReference: z.ZodEffects<z.ZodString, string, string>;
|
|
42
|
+
upstreamModelId: z.ZodString;
|
|
43
|
+
priceVersionId: z.ZodString;
|
|
44
|
+
providerRateCardVersionId: z.ZodString;
|
|
45
|
+
providerSourceVersion: z.ZodString;
|
|
46
|
+
maxCostUsd: z.ZodEffects<z.ZodBranded<z.ZodString, "ExactDecimal">, string & z.BRAND<"ExactDecimal">, string>;
|
|
47
|
+
}, "strict", z.ZodTypeAny, {
|
|
48
|
+
permitId: string;
|
|
49
|
+
idempotencyKey: string;
|
|
50
|
+
fixtureSha256: string;
|
|
51
|
+
expiresAt: string;
|
|
52
|
+
principal: {
|
|
53
|
+
accountId: string;
|
|
54
|
+
applicationId: string;
|
|
55
|
+
credentialId: string;
|
|
56
|
+
environment: "development" | "staging" | "production";
|
|
57
|
+
};
|
|
58
|
+
policy: {
|
|
59
|
+
routingPolicyId: string;
|
|
60
|
+
policyVersion: number;
|
|
61
|
+
};
|
|
62
|
+
deploymentId: string;
|
|
63
|
+
provider: string;
|
|
64
|
+
keyId: string;
|
|
65
|
+
modelReference: string;
|
|
66
|
+
upstreamModelId: string;
|
|
67
|
+
priceVersionId: string;
|
|
68
|
+
providerRateCardVersionId: string;
|
|
69
|
+
providerSourceVersion: string;
|
|
70
|
+
maxCostUsd: string & z.BRAND<"ExactDecimal">;
|
|
71
|
+
}, {
|
|
72
|
+
permitId: string;
|
|
73
|
+
idempotencyKey: string;
|
|
74
|
+
fixtureSha256: string;
|
|
75
|
+
expiresAt: string;
|
|
76
|
+
principal: {
|
|
77
|
+
accountId: string;
|
|
78
|
+
applicationId: string;
|
|
79
|
+
credentialId: string;
|
|
80
|
+
environment: "development" | "staging" | "production";
|
|
81
|
+
};
|
|
82
|
+
policy: {
|
|
83
|
+
routingPolicyId: string;
|
|
84
|
+
policyVersion: number;
|
|
85
|
+
};
|
|
86
|
+
deploymentId: string;
|
|
87
|
+
provider: string;
|
|
88
|
+
keyId: string;
|
|
89
|
+
modelReference: string;
|
|
90
|
+
upstreamModelId: string;
|
|
91
|
+
priceVersionId: string;
|
|
92
|
+
providerRateCardVersionId: string;
|
|
93
|
+
providerSourceVersion: string;
|
|
94
|
+
maxCostUsd: string;
|
|
95
|
+
}>;
|
|
96
|
+
export declare const scopedExecutionSchema: z.ZodObject<{
|
|
97
|
+
permitId: z.ZodString;
|
|
98
|
+
idempotencyKey: z.ZodString;
|
|
99
|
+
fixtureSha256: z.ZodString;
|
|
100
|
+
expiresAt: z.ZodString;
|
|
101
|
+
principal: z.ZodObject<{
|
|
102
|
+
accountId: z.ZodString;
|
|
103
|
+
applicationId: z.ZodString;
|
|
104
|
+
credentialId: z.ZodString;
|
|
105
|
+
environment: z.ZodEnum<["development", "staging", "production"]>;
|
|
106
|
+
}, "strict", z.ZodTypeAny, {
|
|
107
|
+
accountId: string;
|
|
108
|
+
applicationId: string;
|
|
109
|
+
credentialId: string;
|
|
110
|
+
environment: "development" | "staging" | "production";
|
|
111
|
+
}, {
|
|
112
|
+
accountId: string;
|
|
113
|
+
applicationId: string;
|
|
114
|
+
credentialId: string;
|
|
115
|
+
environment: "development" | "staging" | "production";
|
|
116
|
+
}>;
|
|
117
|
+
policy: z.ZodObject<{
|
|
118
|
+
routingPolicyId: z.ZodString;
|
|
119
|
+
policyVersion: z.ZodNumber;
|
|
120
|
+
}, "strict", z.ZodTypeAny, {
|
|
121
|
+
routingPolicyId: string;
|
|
122
|
+
policyVersion: number;
|
|
123
|
+
}, {
|
|
124
|
+
routingPolicyId: string;
|
|
125
|
+
policyVersion: number;
|
|
126
|
+
}>;
|
|
127
|
+
deploymentId: z.ZodString;
|
|
128
|
+
provider: z.ZodString;
|
|
129
|
+
keyId: z.ZodString;
|
|
130
|
+
modelReference: z.ZodEffects<z.ZodString, string, string>;
|
|
131
|
+
upstreamModelId: z.ZodString;
|
|
132
|
+
priceVersionId: z.ZodString;
|
|
133
|
+
providerRateCardVersionId: z.ZodString;
|
|
134
|
+
providerSourceVersion: z.ZodString;
|
|
135
|
+
maxCostUsd: z.ZodEffects<z.ZodBranded<z.ZodString, "ExactDecimal">, string & z.BRAND<"ExactDecimal">, string>;
|
|
136
|
+
} & {
|
|
137
|
+
requestId: z.ZodString;
|
|
138
|
+
snapshotId: z.ZodString;
|
|
139
|
+
catalogueEvidenceHash: z.ZodString;
|
|
140
|
+
}, "strict", z.ZodTypeAny, {
|
|
141
|
+
permitId: string;
|
|
142
|
+
idempotencyKey: string;
|
|
143
|
+
fixtureSha256: string;
|
|
144
|
+
expiresAt: string;
|
|
145
|
+
principal: {
|
|
146
|
+
accountId: string;
|
|
147
|
+
applicationId: string;
|
|
148
|
+
credentialId: string;
|
|
149
|
+
environment: "development" | "staging" | "production";
|
|
150
|
+
};
|
|
151
|
+
policy: {
|
|
152
|
+
routingPolicyId: string;
|
|
153
|
+
policyVersion: number;
|
|
154
|
+
};
|
|
155
|
+
deploymentId: string;
|
|
156
|
+
provider: string;
|
|
157
|
+
keyId: string;
|
|
158
|
+
modelReference: string;
|
|
159
|
+
upstreamModelId: string;
|
|
160
|
+
priceVersionId: string;
|
|
161
|
+
providerRateCardVersionId: string;
|
|
162
|
+
providerSourceVersion: string;
|
|
163
|
+
maxCostUsd: string & z.BRAND<"ExactDecimal">;
|
|
164
|
+
requestId: string;
|
|
165
|
+
snapshotId: string;
|
|
166
|
+
catalogueEvidenceHash: string;
|
|
167
|
+
}, {
|
|
168
|
+
permitId: string;
|
|
169
|
+
idempotencyKey: string;
|
|
170
|
+
fixtureSha256: string;
|
|
171
|
+
expiresAt: string;
|
|
172
|
+
principal: {
|
|
173
|
+
accountId: string;
|
|
174
|
+
applicationId: string;
|
|
175
|
+
credentialId: string;
|
|
176
|
+
environment: "development" | "staging" | "production";
|
|
177
|
+
};
|
|
178
|
+
policy: {
|
|
179
|
+
routingPolicyId: string;
|
|
180
|
+
policyVersion: number;
|
|
181
|
+
};
|
|
182
|
+
deploymentId: string;
|
|
183
|
+
provider: string;
|
|
184
|
+
keyId: string;
|
|
185
|
+
modelReference: string;
|
|
186
|
+
upstreamModelId: string;
|
|
187
|
+
priceVersionId: string;
|
|
188
|
+
providerRateCardVersionId: string;
|
|
189
|
+
providerSourceVersion: string;
|
|
190
|
+
maxCostUsd: string;
|
|
191
|
+
requestId: string;
|
|
192
|
+
snapshotId: string;
|
|
193
|
+
catalogueEvidenceHash: string;
|
|
194
|
+
}>;
|
|
195
|
+
export type ScopedExecutionAudience = z.infer<typeof scopedExecutionAudienceSchema>;
|
|
196
|
+
export type ScopedExecution = z.infer<typeof scopedExecutionSchema>;
|
|
197
|
+
/**
|
|
198
|
+
* Canonical JSON wire bytes: recursive UTF-16 key order, JSON string/number
|
|
199
|
+
* encoding, arrays in order, no whitespace. Hash the whole signed input, not a
|
|
200
|
+
* reparsed/defaulted decision. Reject non-JSON values rather than dropping them.
|
|
201
|
+
*/
|
|
202
|
+
export declare function canonicalScopedExecutionJson(value: unknown): string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oxy.so/contracts",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.8.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",
|