@oxyhq/contracts 0.28.0 → 0.30.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/identity.js +33 -1
- package/dist/cjs/index.js +20 -7
- package/dist/cjs/inference/aliaModelRelease.js +250 -0
- package/dist/cjs/inference/catalogue.js +1 -4
- package/dist/cjs/inference/errors.js +108 -9
- package/dist/cjs/inference/identifiers.js +23 -3
- package/dist/cjs/inference/request.js +188 -5
- package/dist/cjs/inference/routingPolicy.js +81 -2
- package/dist/cjs/inference/streamEvents.js +38 -1
- package/dist/cjs/inference/usage.js +32 -1
- package/dist/cjs/inference/version.js +24 -4
- package/dist/esm/.tsbuildinfo +1 -1
- package/dist/esm/identity.js +32 -0
- package/dist/esm/index.js +8 -3
- package/dist/esm/inference/aliaModelRelease.js +247 -0
- package/dist/esm/inference/catalogue.js +2 -5
- package/dist/esm/inference/errors.js +108 -9
- package/dist/esm/inference/identifiers.js +22 -2
- package/dist/esm/inference/request.js +189 -6
- package/dist/esm/inference/routingPolicy.js +81 -2
- package/dist/esm/inference/streamEvents.js +38 -1
- package/dist/esm/inference/usage.js +32 -1
- package/dist/esm/inference/version.js +24 -4
- package/dist/types/.tsbuildinfo +1 -1
- package/dist/types/identity.d.ts +59 -1
- package/dist/types/index.d.ts +7 -5
- package/dist/types/inference/accountBilling.d.ts +26 -26
- package/dist/types/inference/aliaModelRelease.d.ts +597 -0
- package/dist/types/inference/catalogue.d.ts +6 -6
- package/dist/types/inference/entitlement.d.ts +4 -4
- package/dist/types/inference/errors.d.ts +46 -10
- package/dist/types/inference/identifiers.d.ts +20 -2
- package/dist/types/inference/money.d.ts +4 -4
- package/dist/types/inference/priceVersion.d.ts +14 -14
- package/dist/types/inference/providerConnection.d.ts +4 -4
- package/dist/types/inference/request.d.ts +291 -5
- package/dist/types/inference/routingPolicy.d.ts +109 -13
- package/dist/types/inference/streamEvents.d.ts +84 -48
- package/dist/types/inference/usage.d.ts +103 -79
- package/dist/types/inference/version.d.ts +24 -4
- package/dist/types/keyRecovery.d.ts +4 -4
- package/package.json +1 -1
|
@@ -0,0 +1,597 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The signed Alia model release manifest — the ingestion contract for a
|
|
3
|
+
* first-party model release.
|
|
4
|
+
*
|
|
5
|
+
* The catalogue already STORES everything such a manifest carries: the model
|
|
6
|
+
* card, the licence block, the provenance and base model, the evaluation table,
|
|
7
|
+
* the safety metadata, and an artifact digest with a `sha256:<64 hex>` CHECK.
|
|
8
|
+
* What did not exist was the manifest itself — a single document Alia SIGNS,
|
|
9
|
+
* asserting all of it at once — and that is the gap this shape closes. Nothing
|
|
10
|
+
* here re-declares a catalogue field; the manifest COMPOSES the published shapes
|
|
11
|
+
* so a manifest and the catalogue row it produces cannot describe a release
|
|
12
|
+
* differently.
|
|
13
|
+
*
|
|
14
|
+
* ## The manifest tightens the revision it carries
|
|
15
|
+
*
|
|
16
|
+
* `modelRevisionSchema` makes `modelCardUrl`, `artifactDigest`, `evaluations`
|
|
17
|
+
* and `safety` optional, because a third-party route legitimately has none of
|
|
18
|
+
* them — Oxy did not train those weights and cannot publish a card for them. A
|
|
19
|
+
* FIRST-PARTY release has no such excuse: the documentation trail is the reason
|
|
20
|
+
* a release manifest exists at all, and a model Alia ships without one is not a
|
|
21
|
+
* release, it is a deployment. So the refinement below requires all four,
|
|
22
|
+
* without changing the catalogue shape that a third-party entry still parses
|
|
23
|
+
* through.
|
|
24
|
+
*
|
|
25
|
+
* ## `.strict()` at the top level, and here that is forced rather than chosen
|
|
26
|
+
*
|
|
27
|
+
* The shapes exchanged with the data plane tolerate an unknown field, because
|
|
28
|
+
* refusing a producer one minor version ahead is a worse failure than ignoring
|
|
29
|
+
* its addition (`version.ts`). A SIGNED document inverts that: the signature is
|
|
30
|
+
* over the canonical bytes of the manifest, so a field silently stripped at this
|
|
31
|
+
* parse is a field missing from the bytes Oxy re-canonicalizes, and verification
|
|
32
|
+
* fails. A tolerant parse would therefore report "the signature is invalid" for
|
|
33
|
+
* what is really "this build does not understand this manifest" — the wrong
|
|
34
|
+
* diagnosis of the right problem. Strict says the true thing, and the cost is
|
|
35
|
+
* bounded: ingestion is a release-time operation an operator retries once Oxy
|
|
36
|
+
* takes the newer contract, not a served request that becomes unsettleable.
|
|
37
|
+
*
|
|
38
|
+
* ## What is deliberately NOT here
|
|
39
|
+
*
|
|
40
|
+
* **No HTTP write path.** The catalogue's emptiness is currently a safety
|
|
41
|
+
* property — `scripts/seed-inference-catalogue.ts` refuses to invent a licence
|
|
42
|
+
* or a retention flag because "a plausible invented value in a catalogue is
|
|
43
|
+
* worse than an absent one" — and a staff write path into it with nothing to
|
|
44
|
+
* ingest is an unexercised hazard. The schema lands; the endpoint waits for a
|
|
45
|
+
* real manifest to ingest.
|
|
46
|
+
*
|
|
47
|
+
* **No `payloadDigest` field.** The signature is over the canonical
|
|
48
|
+
* serialization of this manifest with `signatures` removed, and a verifier
|
|
49
|
+
* recomputes it. Storing the digest beside the document it digests would be a
|
|
50
|
+
* second source of truth for one fact, and a verifier that compared the
|
|
51
|
+
* signature against the DECLARED digest rather than the recomputed one would
|
|
52
|
+
* verify nothing at all.
|
|
53
|
+
*
|
|
54
|
+
* **No verification RESULT.** Whether a signature checked out is Oxy's finding
|
|
55
|
+
* about the document, not a claim the document makes about itself; a `verified`
|
|
56
|
+
* field inside a signed manifest is the signer asserting its own signature.
|
|
57
|
+
*
|
|
58
|
+
* ## The open owner decision this shape does not take
|
|
59
|
+
*
|
|
60
|
+
* **What signs, and what verifies, is not decided.** Oxy holds no Alia signing
|
|
61
|
+
* key, and whether to resolve `keyId` through the existing attestation machinery
|
|
62
|
+
* (`services/oxyVerificationResolver.ts`, the civic attestation code) or to
|
|
63
|
+
* introduce a dedicated Alia release key is a real choice with different
|
|
64
|
+
* custody, rotation and revocation consequences. So `keyId` is an OPAQUE
|
|
65
|
+
* identifier and this file names no registry that resolves it: either answer
|
|
66
|
+
* fits, and neither is presupposed. Until it is answered a manifest can be
|
|
67
|
+
* parsed and cannot be verified, which is the second reason no endpoint ships.
|
|
68
|
+
*
|
|
69
|
+
* Decided in: docs/adr/0008-catalogue-concept-separation.md,
|
|
70
|
+
* docs/adr/0017-authorized-routes-in-the-envelope.md, issue #972 §12.
|
|
71
|
+
*/
|
|
72
|
+
import { z } from 'zod';
|
|
73
|
+
/**
|
|
74
|
+
* One artifact of a release, by path and digest.
|
|
75
|
+
*
|
|
76
|
+
* `sizeBytes` is required beside the digest so a verifier can refuse a stream
|
|
77
|
+
* that is the wrong length before reading it to the end, rather than only after.
|
|
78
|
+
*/
|
|
79
|
+
export declare const aliaReleaseArtifactSchema: z.ZodObject<{
|
|
80
|
+
/** Path within the release, e.g. `model-00001-of-00004.safetensors`. */
|
|
81
|
+
path: z.ZodString;
|
|
82
|
+
digest: z.ZodString;
|
|
83
|
+
sizeBytes: z.ZodNumber;
|
|
84
|
+
mediaType: z.ZodOptional<z.ZodString>;
|
|
85
|
+
}, "strict", z.ZodTypeAny, {
|
|
86
|
+
path: string;
|
|
87
|
+
digest: string;
|
|
88
|
+
sizeBytes: number;
|
|
89
|
+
mediaType?: string | undefined;
|
|
90
|
+
}, {
|
|
91
|
+
path: string;
|
|
92
|
+
digest: string;
|
|
93
|
+
sizeBytes: number;
|
|
94
|
+
mediaType?: string | undefined;
|
|
95
|
+
}>;
|
|
96
|
+
/**
|
|
97
|
+
* One detached signature over the manifest.
|
|
98
|
+
*
|
|
99
|
+
* `algorithm` is a CLOSED enum with one member, and both halves of that are
|
|
100
|
+
* deliberate. Closed, because a verifier that trusts a document's own algorithm
|
|
101
|
+
* name accepts whatever that document nominates, `none` included. One member,
|
|
102
|
+
* because Ed25519 is the scheme ADR 0012 already chose for asymmetric
|
|
103
|
+
* verification on this platform, and naming a scheme nothing here can check
|
|
104
|
+
* would be advertising a capability that does not exist. A second member lands
|
|
105
|
+
* when a verifier for it does — which is a closed enum gaining a member, and
|
|
106
|
+
* therefore a MINOR contract-set change the handshake surfaces (`version.ts`).
|
|
107
|
+
*
|
|
108
|
+
* `keyId` is opaque on purpose: see the header. It identifies the public key
|
|
109
|
+
* without saying what resolves it.
|
|
110
|
+
*
|
|
111
|
+
* The signature covers the canonical serialization (RFC 8785 JCS) of the
|
|
112
|
+
* manifest with `signatures` removed. The canonicalization is NAMED rather than
|
|
113
|
+
* left implicit because a digest over "the manifest" is not verifiable by two
|
|
114
|
+
* implementations that serialize JSON differently; naming it is a mechanical
|
|
115
|
+
* necessity and is independent of the open question of which key signs.
|
|
116
|
+
*/
|
|
117
|
+
export declare const aliaReleaseSignatureSchema: z.ZodObject<{
|
|
118
|
+
algorithm: z.ZodEnum<["ed25519"]>;
|
|
119
|
+
canonicalization: z.ZodEnum<["jcs"]>;
|
|
120
|
+
/** Opaque identifier of the public key. Resolving it is undecided. */
|
|
121
|
+
keyId: z.ZodString;
|
|
122
|
+
/**
|
|
123
|
+
* Unpadded base64url. Exactly 86 characters, which is a 64-byte Ed25519
|
|
124
|
+
* signature — the one algorithm above. A second algorithm moves this length
|
|
125
|
+
* into a refinement keyed on `algorithm`.
|
|
126
|
+
*/
|
|
127
|
+
signature: z.ZodString;
|
|
128
|
+
signedAt: z.ZodString;
|
|
129
|
+
}, "strict", z.ZodTypeAny, {
|
|
130
|
+
signature: string;
|
|
131
|
+
signedAt: string;
|
|
132
|
+
algorithm: "ed25519";
|
|
133
|
+
canonicalization: "jcs";
|
|
134
|
+
keyId: string;
|
|
135
|
+
}, {
|
|
136
|
+
signature: string;
|
|
137
|
+
signedAt: string;
|
|
138
|
+
algorithm: "ed25519";
|
|
139
|
+
canonicalization: "jcs";
|
|
140
|
+
keyId: string;
|
|
141
|
+
}>;
|
|
142
|
+
/**
|
|
143
|
+
* A signed release of an `alia/*` model revision.
|
|
144
|
+
*
|
|
145
|
+
* `signatures` is a LIST rather than one signature, because "what signs" is
|
|
146
|
+
* undecided: a single field would presuppose one signer, while a list lets an
|
|
147
|
+
* Alia release key and an existing attestation co-sign the same document without
|
|
148
|
+
* either being retrofitted later.
|
|
149
|
+
*/
|
|
150
|
+
export declare const aliaModelReleaseManifestSchema: z.ZodEffects<z.ZodObject<{
|
|
151
|
+
/** See `version.ts`: an ingestion payload is a whole message on the wire. */
|
|
152
|
+
schemaVersion: z.ZodLiteral<1>;
|
|
153
|
+
/** The release's own identity, so ingestion is idempotent on it. */
|
|
154
|
+
releaseId: z.ZodString;
|
|
155
|
+
issuedAt: z.ZodString;
|
|
156
|
+
/**
|
|
157
|
+
* The revision being released. Carries its OWN `schemaVersion`, like
|
|
158
|
+
* `billingProfileSchema` inside `accountBillingStateSchema`: the manifest's
|
|
159
|
+
* version governs the manifest and the revision's governs the revision,
|
|
160
|
+
* which is two versions of two things rather than two versions of one.
|
|
161
|
+
*/
|
|
162
|
+
revision: z.ZodEffects<z.ZodObject<{
|
|
163
|
+
schemaVersion: z.ZodLiteral<1>;
|
|
164
|
+
revisionId: z.ZodString;
|
|
165
|
+
modelId: z.ZodString;
|
|
166
|
+
revision: z.ZodString;
|
|
167
|
+
reference: z.ZodString;
|
|
168
|
+
releasedAt: z.ZodString;
|
|
169
|
+
retiredAt: z.ZodOptional<z.ZodString>;
|
|
170
|
+
artifactDigest: z.ZodOptional<z.ZodString>;
|
|
171
|
+
modelCardUrl: z.ZodOptional<z.ZodString>;
|
|
172
|
+
evaluations: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
173
|
+
suite: z.ZodString;
|
|
174
|
+
metric: z.ZodString;
|
|
175
|
+
score: z.ZodString;
|
|
176
|
+
evaluatedAt: z.ZodOptional<z.ZodString>;
|
|
177
|
+
reportUrl: z.ZodOptional<z.ZodString>;
|
|
178
|
+
}, "strict", z.ZodTypeAny, {
|
|
179
|
+
score: string;
|
|
180
|
+
suite: string;
|
|
181
|
+
metric: string;
|
|
182
|
+
evaluatedAt?: string | undefined;
|
|
183
|
+
reportUrl?: string | undefined;
|
|
184
|
+
}, {
|
|
185
|
+
score: string;
|
|
186
|
+
suite: string;
|
|
187
|
+
metric: string;
|
|
188
|
+
evaluatedAt?: string | undefined;
|
|
189
|
+
reportUrl?: string | undefined;
|
|
190
|
+
}>, "many">>;
|
|
191
|
+
safety: z.ZodOptional<z.ZodObject<{
|
|
192
|
+
safetyCardUrl: z.ZodOptional<z.ZodString>;
|
|
193
|
+
contentFilteringDefault: z.ZodEnum<["none", "provider_default", "strict"]>;
|
|
194
|
+
knownLimitations: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
195
|
+
provenanceMarking: z.ZodEnum<["none", "visible_watermark", "invisible_watermark", "c2pa"]>;
|
|
196
|
+
}, "strict", z.ZodTypeAny, {
|
|
197
|
+
contentFilteringDefault: "strict" | "none" | "provider_default";
|
|
198
|
+
knownLimitations: string[];
|
|
199
|
+
provenanceMarking: "none" | "visible_watermark" | "invisible_watermark" | "c2pa";
|
|
200
|
+
safetyCardUrl?: string | undefined;
|
|
201
|
+
}, {
|
|
202
|
+
contentFilteringDefault: "strict" | "none" | "provider_default";
|
|
203
|
+
provenanceMarking: "none" | "visible_watermark" | "invisible_watermark" | "c2pa";
|
|
204
|
+
safetyCardUrl?: string | undefined;
|
|
205
|
+
knownLimitations?: string[] | undefined;
|
|
206
|
+
}>>;
|
|
207
|
+
}, "strip", z.ZodTypeAny, {
|
|
208
|
+
revision: string;
|
|
209
|
+
schemaVersion: 1;
|
|
210
|
+
modelId: string;
|
|
211
|
+
revisionId: string;
|
|
212
|
+
reference: string;
|
|
213
|
+
releasedAt: string;
|
|
214
|
+
evaluations: {
|
|
215
|
+
score: string;
|
|
216
|
+
suite: string;
|
|
217
|
+
metric: string;
|
|
218
|
+
evaluatedAt?: string | undefined;
|
|
219
|
+
reportUrl?: string | undefined;
|
|
220
|
+
}[];
|
|
221
|
+
retiredAt?: string | undefined;
|
|
222
|
+
artifactDigest?: string | undefined;
|
|
223
|
+
modelCardUrl?: string | undefined;
|
|
224
|
+
safety?: {
|
|
225
|
+
contentFilteringDefault: "strict" | "none" | "provider_default";
|
|
226
|
+
knownLimitations: string[];
|
|
227
|
+
provenanceMarking: "none" | "visible_watermark" | "invisible_watermark" | "c2pa";
|
|
228
|
+
safetyCardUrl?: string | undefined;
|
|
229
|
+
} | undefined;
|
|
230
|
+
}, {
|
|
231
|
+
revision: string;
|
|
232
|
+
schemaVersion: 1;
|
|
233
|
+
modelId: string;
|
|
234
|
+
revisionId: string;
|
|
235
|
+
reference: string;
|
|
236
|
+
releasedAt: string;
|
|
237
|
+
retiredAt?: string | undefined;
|
|
238
|
+
artifactDigest?: string | undefined;
|
|
239
|
+
modelCardUrl?: string | undefined;
|
|
240
|
+
evaluations?: {
|
|
241
|
+
score: string;
|
|
242
|
+
suite: string;
|
|
243
|
+
metric: string;
|
|
244
|
+
evaluatedAt?: string | undefined;
|
|
245
|
+
reportUrl?: string | undefined;
|
|
246
|
+
}[] | undefined;
|
|
247
|
+
safety?: {
|
|
248
|
+
contentFilteringDefault: "strict" | "none" | "provider_default";
|
|
249
|
+
provenanceMarking: "none" | "visible_watermark" | "invisible_watermark" | "c2pa";
|
|
250
|
+
safetyCardUrl?: string | undefined;
|
|
251
|
+
knownLimitations?: string[] | undefined;
|
|
252
|
+
} | undefined;
|
|
253
|
+
}>, {
|
|
254
|
+
revision: string;
|
|
255
|
+
schemaVersion: 1;
|
|
256
|
+
modelId: string;
|
|
257
|
+
revisionId: string;
|
|
258
|
+
reference: string;
|
|
259
|
+
releasedAt: string;
|
|
260
|
+
evaluations: {
|
|
261
|
+
score: string;
|
|
262
|
+
suite: string;
|
|
263
|
+
metric: string;
|
|
264
|
+
evaluatedAt?: string | undefined;
|
|
265
|
+
reportUrl?: string | undefined;
|
|
266
|
+
}[];
|
|
267
|
+
retiredAt?: string | undefined;
|
|
268
|
+
artifactDigest?: string | undefined;
|
|
269
|
+
modelCardUrl?: string | undefined;
|
|
270
|
+
safety?: {
|
|
271
|
+
contentFilteringDefault: "strict" | "none" | "provider_default";
|
|
272
|
+
knownLimitations: string[];
|
|
273
|
+
provenanceMarking: "none" | "visible_watermark" | "invisible_watermark" | "c2pa";
|
|
274
|
+
safetyCardUrl?: string | undefined;
|
|
275
|
+
} | undefined;
|
|
276
|
+
}, {
|
|
277
|
+
revision: string;
|
|
278
|
+
schemaVersion: 1;
|
|
279
|
+
modelId: string;
|
|
280
|
+
revisionId: string;
|
|
281
|
+
reference: string;
|
|
282
|
+
releasedAt: string;
|
|
283
|
+
retiredAt?: string | undefined;
|
|
284
|
+
artifactDigest?: string | undefined;
|
|
285
|
+
modelCardUrl?: string | undefined;
|
|
286
|
+
evaluations?: {
|
|
287
|
+
score: string;
|
|
288
|
+
suite: string;
|
|
289
|
+
metric: string;
|
|
290
|
+
evaluatedAt?: string | undefined;
|
|
291
|
+
reportUrl?: string | undefined;
|
|
292
|
+
}[] | undefined;
|
|
293
|
+
safety?: {
|
|
294
|
+
contentFilteringDefault: "strict" | "none" | "provider_default";
|
|
295
|
+
provenanceMarking: "none" | "visible_watermark" | "invisible_watermark" | "c2pa";
|
|
296
|
+
safetyCardUrl?: string | undefined;
|
|
297
|
+
knownLimitations?: string[] | undefined;
|
|
298
|
+
} | undefined;
|
|
299
|
+
}>;
|
|
300
|
+
/** On the MODEL rather than the revision in the catalogue, so carried here. */
|
|
301
|
+
provenance: z.ZodObject<{
|
|
302
|
+
releaseKind: z.ZodEnum<["first_party_original", "first_party_derived", "open_weight", "third_party_hosted"]>;
|
|
303
|
+
baseModelId: z.ZodOptional<z.ZodString>;
|
|
304
|
+
trainingOrganization: z.ZodOptional<z.ZodString>;
|
|
305
|
+
}, "strict", z.ZodTypeAny, {
|
|
306
|
+
releaseKind: "first_party_original" | "first_party_derived" | "open_weight" | "third_party_hosted";
|
|
307
|
+
baseModelId?: string | undefined;
|
|
308
|
+
trainingOrganization?: string | undefined;
|
|
309
|
+
}, {
|
|
310
|
+
releaseKind: "first_party_original" | "first_party_derived" | "open_weight" | "third_party_hosted";
|
|
311
|
+
baseModelId?: string | undefined;
|
|
312
|
+
trainingOrganization?: string | undefined;
|
|
313
|
+
}>;
|
|
314
|
+
license: z.ZodObject<{
|
|
315
|
+
licenseId: z.ZodString;
|
|
316
|
+
displayName: z.ZodString;
|
|
317
|
+
url: z.ZodOptional<z.ZodString>;
|
|
318
|
+
commercialUseAllowed: z.ZodBoolean;
|
|
319
|
+
requiresAttribution: z.ZodBoolean;
|
|
320
|
+
acceptableUsePolicyUrl: z.ZodOptional<z.ZodString>;
|
|
321
|
+
}, "strict", z.ZodTypeAny, {
|
|
322
|
+
displayName: string;
|
|
323
|
+
licenseId: string;
|
|
324
|
+
commercialUseAllowed: boolean;
|
|
325
|
+
requiresAttribution: boolean;
|
|
326
|
+
url?: string | undefined;
|
|
327
|
+
acceptableUsePolicyUrl?: string | undefined;
|
|
328
|
+
}, {
|
|
329
|
+
displayName: string;
|
|
330
|
+
licenseId: string;
|
|
331
|
+
commercialUseAllowed: boolean;
|
|
332
|
+
requiresAttribution: boolean;
|
|
333
|
+
url?: string | undefined;
|
|
334
|
+
acceptableUsePolicyUrl?: string | undefined;
|
|
335
|
+
}>;
|
|
336
|
+
artifacts: z.ZodArray<z.ZodObject<{
|
|
337
|
+
/** Path within the release, e.g. `model-00001-of-00004.safetensors`. */
|
|
338
|
+
path: z.ZodString;
|
|
339
|
+
digest: z.ZodString;
|
|
340
|
+
sizeBytes: z.ZodNumber;
|
|
341
|
+
mediaType: z.ZodOptional<z.ZodString>;
|
|
342
|
+
}, "strict", z.ZodTypeAny, {
|
|
343
|
+
path: string;
|
|
344
|
+
digest: string;
|
|
345
|
+
sizeBytes: number;
|
|
346
|
+
mediaType?: string | undefined;
|
|
347
|
+
}, {
|
|
348
|
+
path: string;
|
|
349
|
+
digest: string;
|
|
350
|
+
sizeBytes: number;
|
|
351
|
+
mediaType?: string | undefined;
|
|
352
|
+
}>, "many">;
|
|
353
|
+
signatures: z.ZodArray<z.ZodObject<{
|
|
354
|
+
algorithm: z.ZodEnum<["ed25519"]>;
|
|
355
|
+
canonicalization: z.ZodEnum<["jcs"]>;
|
|
356
|
+
/** Opaque identifier of the public key. Resolving it is undecided. */
|
|
357
|
+
keyId: z.ZodString;
|
|
358
|
+
/**
|
|
359
|
+
* Unpadded base64url. Exactly 86 characters, which is a 64-byte Ed25519
|
|
360
|
+
* signature — the one algorithm above. A second algorithm moves this length
|
|
361
|
+
* into a refinement keyed on `algorithm`.
|
|
362
|
+
*/
|
|
363
|
+
signature: z.ZodString;
|
|
364
|
+
signedAt: z.ZodString;
|
|
365
|
+
}, "strict", z.ZodTypeAny, {
|
|
366
|
+
signature: string;
|
|
367
|
+
signedAt: string;
|
|
368
|
+
algorithm: "ed25519";
|
|
369
|
+
canonicalization: "jcs";
|
|
370
|
+
keyId: string;
|
|
371
|
+
}, {
|
|
372
|
+
signature: string;
|
|
373
|
+
signedAt: string;
|
|
374
|
+
algorithm: "ed25519";
|
|
375
|
+
canonicalization: "jcs";
|
|
376
|
+
keyId: string;
|
|
377
|
+
}>, "many">;
|
|
378
|
+
}, "strict", z.ZodTypeAny, {
|
|
379
|
+
revision: {
|
|
380
|
+
revision: string;
|
|
381
|
+
schemaVersion: 1;
|
|
382
|
+
modelId: string;
|
|
383
|
+
revisionId: string;
|
|
384
|
+
reference: string;
|
|
385
|
+
releasedAt: string;
|
|
386
|
+
evaluations: {
|
|
387
|
+
score: string;
|
|
388
|
+
suite: string;
|
|
389
|
+
metric: string;
|
|
390
|
+
evaluatedAt?: string | undefined;
|
|
391
|
+
reportUrl?: string | undefined;
|
|
392
|
+
}[];
|
|
393
|
+
retiredAt?: string | undefined;
|
|
394
|
+
artifactDigest?: string | undefined;
|
|
395
|
+
modelCardUrl?: string | undefined;
|
|
396
|
+
safety?: {
|
|
397
|
+
contentFilteringDefault: "strict" | "none" | "provider_default";
|
|
398
|
+
knownLimitations: string[];
|
|
399
|
+
provenanceMarking: "none" | "visible_watermark" | "invisible_watermark" | "c2pa";
|
|
400
|
+
safetyCardUrl?: string | undefined;
|
|
401
|
+
} | undefined;
|
|
402
|
+
};
|
|
403
|
+
issuedAt: string;
|
|
404
|
+
signatures: {
|
|
405
|
+
signature: string;
|
|
406
|
+
signedAt: string;
|
|
407
|
+
algorithm: "ed25519";
|
|
408
|
+
canonicalization: "jcs";
|
|
409
|
+
keyId: string;
|
|
410
|
+
}[];
|
|
411
|
+
schemaVersion: 1;
|
|
412
|
+
license: {
|
|
413
|
+
displayName: string;
|
|
414
|
+
licenseId: string;
|
|
415
|
+
commercialUseAllowed: boolean;
|
|
416
|
+
requiresAttribution: boolean;
|
|
417
|
+
url?: string | undefined;
|
|
418
|
+
acceptableUsePolicyUrl?: string | undefined;
|
|
419
|
+
};
|
|
420
|
+
provenance: {
|
|
421
|
+
releaseKind: "first_party_original" | "first_party_derived" | "open_weight" | "third_party_hosted";
|
|
422
|
+
baseModelId?: string | undefined;
|
|
423
|
+
trainingOrganization?: string | undefined;
|
|
424
|
+
};
|
|
425
|
+
releaseId: string;
|
|
426
|
+
artifacts: {
|
|
427
|
+
path: string;
|
|
428
|
+
digest: string;
|
|
429
|
+
sizeBytes: number;
|
|
430
|
+
mediaType?: string | undefined;
|
|
431
|
+
}[];
|
|
432
|
+
}, {
|
|
433
|
+
revision: {
|
|
434
|
+
revision: string;
|
|
435
|
+
schemaVersion: 1;
|
|
436
|
+
modelId: string;
|
|
437
|
+
revisionId: string;
|
|
438
|
+
reference: string;
|
|
439
|
+
releasedAt: string;
|
|
440
|
+
retiredAt?: string | undefined;
|
|
441
|
+
artifactDigest?: string | undefined;
|
|
442
|
+
modelCardUrl?: string | undefined;
|
|
443
|
+
evaluations?: {
|
|
444
|
+
score: string;
|
|
445
|
+
suite: string;
|
|
446
|
+
metric: string;
|
|
447
|
+
evaluatedAt?: string | undefined;
|
|
448
|
+
reportUrl?: string | undefined;
|
|
449
|
+
}[] | undefined;
|
|
450
|
+
safety?: {
|
|
451
|
+
contentFilteringDefault: "strict" | "none" | "provider_default";
|
|
452
|
+
provenanceMarking: "none" | "visible_watermark" | "invisible_watermark" | "c2pa";
|
|
453
|
+
safetyCardUrl?: string | undefined;
|
|
454
|
+
knownLimitations?: string[] | undefined;
|
|
455
|
+
} | undefined;
|
|
456
|
+
};
|
|
457
|
+
issuedAt: string;
|
|
458
|
+
signatures: {
|
|
459
|
+
signature: string;
|
|
460
|
+
signedAt: string;
|
|
461
|
+
algorithm: "ed25519";
|
|
462
|
+
canonicalization: "jcs";
|
|
463
|
+
keyId: string;
|
|
464
|
+
}[];
|
|
465
|
+
schemaVersion: 1;
|
|
466
|
+
license: {
|
|
467
|
+
displayName: string;
|
|
468
|
+
licenseId: string;
|
|
469
|
+
commercialUseAllowed: boolean;
|
|
470
|
+
requiresAttribution: boolean;
|
|
471
|
+
url?: string | undefined;
|
|
472
|
+
acceptableUsePolicyUrl?: string | undefined;
|
|
473
|
+
};
|
|
474
|
+
provenance: {
|
|
475
|
+
releaseKind: "first_party_original" | "first_party_derived" | "open_weight" | "third_party_hosted";
|
|
476
|
+
baseModelId?: string | undefined;
|
|
477
|
+
trainingOrganization?: string | undefined;
|
|
478
|
+
};
|
|
479
|
+
releaseId: string;
|
|
480
|
+
artifacts: {
|
|
481
|
+
path: string;
|
|
482
|
+
digest: string;
|
|
483
|
+
sizeBytes: number;
|
|
484
|
+
mediaType?: string | undefined;
|
|
485
|
+
}[];
|
|
486
|
+
}>, {
|
|
487
|
+
revision: {
|
|
488
|
+
revision: string;
|
|
489
|
+
schemaVersion: 1;
|
|
490
|
+
modelId: string;
|
|
491
|
+
revisionId: string;
|
|
492
|
+
reference: string;
|
|
493
|
+
releasedAt: string;
|
|
494
|
+
evaluations: {
|
|
495
|
+
score: string;
|
|
496
|
+
suite: string;
|
|
497
|
+
metric: string;
|
|
498
|
+
evaluatedAt?: string | undefined;
|
|
499
|
+
reportUrl?: string | undefined;
|
|
500
|
+
}[];
|
|
501
|
+
retiredAt?: string | undefined;
|
|
502
|
+
artifactDigest?: string | undefined;
|
|
503
|
+
modelCardUrl?: string | undefined;
|
|
504
|
+
safety?: {
|
|
505
|
+
contentFilteringDefault: "strict" | "none" | "provider_default";
|
|
506
|
+
knownLimitations: string[];
|
|
507
|
+
provenanceMarking: "none" | "visible_watermark" | "invisible_watermark" | "c2pa";
|
|
508
|
+
safetyCardUrl?: string | undefined;
|
|
509
|
+
} | undefined;
|
|
510
|
+
};
|
|
511
|
+
issuedAt: string;
|
|
512
|
+
signatures: {
|
|
513
|
+
signature: string;
|
|
514
|
+
signedAt: string;
|
|
515
|
+
algorithm: "ed25519";
|
|
516
|
+
canonicalization: "jcs";
|
|
517
|
+
keyId: string;
|
|
518
|
+
}[];
|
|
519
|
+
schemaVersion: 1;
|
|
520
|
+
license: {
|
|
521
|
+
displayName: string;
|
|
522
|
+
licenseId: string;
|
|
523
|
+
commercialUseAllowed: boolean;
|
|
524
|
+
requiresAttribution: boolean;
|
|
525
|
+
url?: string | undefined;
|
|
526
|
+
acceptableUsePolicyUrl?: string | undefined;
|
|
527
|
+
};
|
|
528
|
+
provenance: {
|
|
529
|
+
releaseKind: "first_party_original" | "first_party_derived" | "open_weight" | "third_party_hosted";
|
|
530
|
+
baseModelId?: string | undefined;
|
|
531
|
+
trainingOrganization?: string | undefined;
|
|
532
|
+
};
|
|
533
|
+
releaseId: string;
|
|
534
|
+
artifacts: {
|
|
535
|
+
path: string;
|
|
536
|
+
digest: string;
|
|
537
|
+
sizeBytes: number;
|
|
538
|
+
mediaType?: string | undefined;
|
|
539
|
+
}[];
|
|
540
|
+
}, {
|
|
541
|
+
revision: {
|
|
542
|
+
revision: string;
|
|
543
|
+
schemaVersion: 1;
|
|
544
|
+
modelId: string;
|
|
545
|
+
revisionId: string;
|
|
546
|
+
reference: string;
|
|
547
|
+
releasedAt: string;
|
|
548
|
+
retiredAt?: string | undefined;
|
|
549
|
+
artifactDigest?: string | undefined;
|
|
550
|
+
modelCardUrl?: string | undefined;
|
|
551
|
+
evaluations?: {
|
|
552
|
+
score: string;
|
|
553
|
+
suite: string;
|
|
554
|
+
metric: string;
|
|
555
|
+
evaluatedAt?: string | undefined;
|
|
556
|
+
reportUrl?: string | undefined;
|
|
557
|
+
}[] | undefined;
|
|
558
|
+
safety?: {
|
|
559
|
+
contentFilteringDefault: "strict" | "none" | "provider_default";
|
|
560
|
+
provenanceMarking: "none" | "visible_watermark" | "invisible_watermark" | "c2pa";
|
|
561
|
+
safetyCardUrl?: string | undefined;
|
|
562
|
+
knownLimitations?: string[] | undefined;
|
|
563
|
+
} | undefined;
|
|
564
|
+
};
|
|
565
|
+
issuedAt: string;
|
|
566
|
+
signatures: {
|
|
567
|
+
signature: string;
|
|
568
|
+
signedAt: string;
|
|
569
|
+
algorithm: "ed25519";
|
|
570
|
+
canonicalization: "jcs";
|
|
571
|
+
keyId: string;
|
|
572
|
+
}[];
|
|
573
|
+
schemaVersion: 1;
|
|
574
|
+
license: {
|
|
575
|
+
displayName: string;
|
|
576
|
+
licenseId: string;
|
|
577
|
+
commercialUseAllowed: boolean;
|
|
578
|
+
requiresAttribution: boolean;
|
|
579
|
+
url?: string | undefined;
|
|
580
|
+
acceptableUsePolicyUrl?: string | undefined;
|
|
581
|
+
};
|
|
582
|
+
provenance: {
|
|
583
|
+
releaseKind: "first_party_original" | "first_party_derived" | "open_weight" | "third_party_hosted";
|
|
584
|
+
baseModelId?: string | undefined;
|
|
585
|
+
trainingOrganization?: string | undefined;
|
|
586
|
+
};
|
|
587
|
+
releaseId: string;
|
|
588
|
+
artifacts: {
|
|
589
|
+
path: string;
|
|
590
|
+
digest: string;
|
|
591
|
+
sizeBytes: number;
|
|
592
|
+
mediaType?: string | undefined;
|
|
593
|
+
}[];
|
|
594
|
+
}>;
|
|
595
|
+
export type AliaReleaseArtifact = z.infer<typeof aliaReleaseArtifactSchema>;
|
|
596
|
+
export type AliaReleaseSignature = z.infer<typeof aliaReleaseSignatureSchema>;
|
|
597
|
+
export type AliaModelReleaseManifest = z.infer<typeof aliaModelReleaseManifestSchema>;
|
|
@@ -1306,13 +1306,13 @@ export declare const modelCatalogueEntrySchema: z.ZodObject<{
|
|
|
1306
1306
|
per: z.ZodNumber;
|
|
1307
1307
|
currency: z.ZodString;
|
|
1308
1308
|
}, "strict", z.ZodTypeAny, {
|
|
1309
|
-
amount: string & z.BRAND<"ExactDecimal">;
|
|
1310
1309
|
currency: string;
|
|
1310
|
+
amount: string & z.BRAND<"ExactDecimal">;
|
|
1311
1311
|
unit: "input_tokens" | "cached_input_tokens" | "output_tokens" | "reasoning_tokens" | "requests" | "images" | "audio_input_milliseconds" | "audio_output_milliseconds" | "video_milliseconds" | "characters" | "embeddings";
|
|
1312
1312
|
per: number;
|
|
1313
1313
|
}, {
|
|
1314
|
-
amount: string;
|
|
1315
1314
|
currency: string;
|
|
1315
|
+
amount: string;
|
|
1316
1316
|
unit: "input_tokens" | "cached_input_tokens" | "output_tokens" | "reasoning_tokens" | "requests" | "images" | "audio_input_milliseconds" | "audio_output_milliseconds" | "video_milliseconds" | "characters" | "embeddings";
|
|
1317
1317
|
per: number;
|
|
1318
1318
|
}>, "many">;
|
|
@@ -1320,8 +1320,8 @@ export declare const modelCatalogueEntrySchema: z.ZodObject<{
|
|
|
1320
1320
|
currency: string;
|
|
1321
1321
|
priceVersionId: string;
|
|
1322
1322
|
unitPrices: {
|
|
1323
|
-
amount: string & z.BRAND<"ExactDecimal">;
|
|
1324
1323
|
currency: string;
|
|
1324
|
+
amount: string & z.BRAND<"ExactDecimal">;
|
|
1325
1325
|
unit: "input_tokens" | "cached_input_tokens" | "output_tokens" | "reasoning_tokens" | "requests" | "images" | "audio_input_milliseconds" | "audio_output_milliseconds" | "video_milliseconds" | "characters" | "embeddings";
|
|
1326
1326
|
per: number;
|
|
1327
1327
|
}[];
|
|
@@ -1329,8 +1329,8 @@ export declare const modelCatalogueEntrySchema: z.ZodObject<{
|
|
|
1329
1329
|
currency: string;
|
|
1330
1330
|
priceVersionId: string;
|
|
1331
1331
|
unitPrices: {
|
|
1332
|
-
amount: string;
|
|
1333
1332
|
currency: string;
|
|
1333
|
+
amount: string;
|
|
1334
1334
|
unit: "input_tokens" | "cached_input_tokens" | "output_tokens" | "reasoning_tokens" | "requests" | "images" | "audio_input_milliseconds" | "audio_output_milliseconds" | "video_milliseconds" | "characters" | "embeddings";
|
|
1335
1335
|
per: number;
|
|
1336
1336
|
}[];
|
|
@@ -1489,8 +1489,8 @@ export declare const modelCatalogueEntrySchema: z.ZodObject<{
|
|
|
1489
1489
|
currency: string;
|
|
1490
1490
|
priceVersionId: string;
|
|
1491
1491
|
unitPrices: {
|
|
1492
|
-
amount: string & z.BRAND<"ExactDecimal">;
|
|
1493
1492
|
currency: string;
|
|
1493
|
+
amount: string & z.BRAND<"ExactDecimal">;
|
|
1494
1494
|
unit: "input_tokens" | "cached_input_tokens" | "output_tokens" | "reasoning_tokens" | "requests" | "images" | "audio_input_milliseconds" | "audio_output_milliseconds" | "video_milliseconds" | "characters" | "embeddings";
|
|
1495
1495
|
per: number;
|
|
1496
1496
|
}[];
|
|
@@ -1583,8 +1583,8 @@ export declare const modelCatalogueEntrySchema: z.ZodObject<{
|
|
|
1583
1583
|
currency: string;
|
|
1584
1584
|
priceVersionId: string;
|
|
1585
1585
|
unitPrices: {
|
|
1586
|
-
amount: string;
|
|
1587
1586
|
currency: string;
|
|
1587
|
+
amount: string;
|
|
1588
1588
|
unit: "input_tokens" | "cached_input_tokens" | "output_tokens" | "reasoning_tokens" | "requests" | "images" | "audio_input_milliseconds" | "audio_output_milliseconds" | "video_milliseconds" | "characters" | "embeddings";
|
|
1589
1589
|
per: number;
|
|
1590
1590
|
}[];
|
|
@@ -255,10 +255,10 @@ export declare const costCenterSpendSchema: z.ZodObject<{
|
|
|
255
255
|
billedAmount: z.ZodBranded<z.ZodString, "ExactDecimal">;
|
|
256
256
|
requestCount: z.ZodNumber;
|
|
257
257
|
}, "strict", z.ZodTypeAny, {
|
|
258
|
-
|
|
258
|
+
billedAmount: string & z.BRAND<"ExactDecimal">;
|
|
259
259
|
currency: string;
|
|
260
|
+
periodEnd: string;
|
|
260
261
|
schemaVersion: 1;
|
|
261
|
-
billedAmount: string & z.BRAND<"ExactDecimal">;
|
|
262
262
|
periodStart: string;
|
|
263
263
|
costCenter: {
|
|
264
264
|
status: "active" | "retired";
|
|
@@ -271,10 +271,10 @@ export declare const costCenterSpendSchema: z.ZodObject<{
|
|
|
271
271
|
};
|
|
272
272
|
requestCount: number;
|
|
273
273
|
}, {
|
|
274
|
-
|
|
274
|
+
billedAmount: string;
|
|
275
275
|
currency: string;
|
|
276
|
+
periodEnd: string;
|
|
276
277
|
schemaVersion: 1;
|
|
277
|
-
billedAmount: string;
|
|
278
278
|
periodStart: string;
|
|
279
279
|
costCenter: {
|
|
280
280
|
status: "active" | "retired";
|