@oxy.so/contracts 4.24.0 → 5.0.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.
Files changed (34) hide show
  1. package/dist/cjs/client/index.js +15 -0
  2. package/dist/cjs/index.js +2 -35
  3. package/dist/cjs/inference/catalogue.js +2 -5
  4. package/dist/cjs/inference/request.js +5 -79
  5. package/dist/cjs/inference/version.js +1 -1
  6. package/dist/cjs/products/one.js +142 -0
  7. package/dist/esm/client/index.js +1 -0
  8. package/dist/esm/index.js +1 -5
  9. package/dist/esm/inference/catalogue.js +0 -3
  10. package/dist/esm/inference/request.js +4 -78
  11. package/dist/esm/inference/version.js +1 -1
  12. package/dist/esm/products/one.js +137 -0
  13. package/dist/types/client/index.d.ts +1 -0
  14. package/dist/types/index.d.ts +1 -10
  15. package/dist/types/inference/catalogue.d.ts +4 -194
  16. package/dist/types/inference/economics.d.ts +2 -2
  17. package/dist/types/inference/realtime.d.ts +88 -88
  18. package/dist/types/inference/request.d.ts +28 -5055
  19. package/dist/types/inference/routingPolicy.d.ts +16 -16
  20. package/dist/types/inference/streamEvents.d.ts +8 -8
  21. package/dist/types/inference/usage.d.ts +4 -4
  22. package/dist/types/inference/version.d.ts +1 -1
  23. package/dist/types/products/one.d.ts +250 -0
  24. package/dist/types/safety.d.ts +10 -10
  25. package/package.json +1 -1
  26. package/dist/cjs/inference/decisions.js +0 -305
  27. package/dist/cjs/inference/privateAutoExecution.js +0 -153
  28. package/dist/cjs/inference/scopedExecution.js +0 -87
  29. package/dist/esm/inference/decisions.js +0 -299
  30. package/dist/esm/inference/privateAutoExecution.js +0 -149
  31. package/dist/esm/inference/scopedExecution.js +0 -83
  32. package/dist/types/inference/decisions.d.ts +0 -1853
  33. package/dist/types/inference/privateAutoExecution.d.ts +0 -694
  34. package/dist/types/inference/scopedExecution.d.ts +0 -202
@@ -1,202 +0,0 @@
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
- environment: "development" | "staging" | "production";
20
- applicationId: string;
21
- credentialId: string;
22
- }, {
23
- accountId: string;
24
- environment: "development" | "staging" | "production";
25
- applicationId: string;
26
- credentialId: string;
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
- expiresAt: string;
49
- keyId: string;
50
- idempotencyKey: string;
51
- principal: {
52
- accountId: string;
53
- environment: "development" | "staging" | "production";
54
- applicationId: string;
55
- credentialId: string;
56
- };
57
- provider: string;
58
- priceVersionId: string;
59
- modelReference: string;
60
- permitId: string;
61
- fixtureSha256: string;
62
- policy: {
63
- routingPolicyId: string;
64
- policyVersion: number;
65
- };
66
- deploymentId: string;
67
- upstreamModelId: string;
68
- providerRateCardVersionId: string;
69
- providerSourceVersion: string;
70
- maxCostUsd: string & z.BRAND<"ExactDecimal">;
71
- }, {
72
- expiresAt: string;
73
- keyId: string;
74
- idempotencyKey: string;
75
- principal: {
76
- accountId: string;
77
- environment: "development" | "staging" | "production";
78
- applicationId: string;
79
- credentialId: string;
80
- };
81
- provider: string;
82
- priceVersionId: string;
83
- modelReference: string;
84
- permitId: string;
85
- fixtureSha256: string;
86
- policy: {
87
- routingPolicyId: string;
88
- policyVersion: number;
89
- };
90
- deploymentId: string;
91
- upstreamModelId: 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
- environment: "development" | "staging" | "production";
109
- applicationId: string;
110
- credentialId: string;
111
- }, {
112
- accountId: string;
113
- environment: "development" | "staging" | "production";
114
- applicationId: string;
115
- credentialId: string;
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
- expiresAt: string;
142
- requestId: string;
143
- keyId: string;
144
- idempotencyKey: string;
145
- principal: {
146
- accountId: string;
147
- environment: "development" | "staging" | "production";
148
- applicationId: string;
149
- credentialId: string;
150
- };
151
- provider: string;
152
- priceVersionId: string;
153
- modelReference: string;
154
- permitId: string;
155
- fixtureSha256: string;
156
- policy: {
157
- routingPolicyId: string;
158
- policyVersion: number;
159
- };
160
- deploymentId: string;
161
- upstreamModelId: string;
162
- providerRateCardVersionId: string;
163
- providerSourceVersion: string;
164
- maxCostUsd: string & z.BRAND<"ExactDecimal">;
165
- snapshotId: string;
166
- catalogueEvidenceHash: string;
167
- }, {
168
- expiresAt: string;
169
- requestId: string;
170
- keyId: string;
171
- idempotencyKey: string;
172
- principal: {
173
- accountId: string;
174
- environment: "development" | "staging" | "production";
175
- applicationId: string;
176
- credentialId: string;
177
- };
178
- provider: string;
179
- priceVersionId: string;
180
- modelReference: string;
181
- permitId: string;
182
- fixtureSha256: string;
183
- policy: {
184
- routingPolicyId: string;
185
- policyVersion: number;
186
- };
187
- deploymentId: string;
188
- upstreamModelId: string;
189
- providerRateCardVersionId: string;
190
- providerSourceVersion: string;
191
- maxCostUsd: 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;