@oxy.so/contracts 4.5.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 +28 -6
- package/dist/cjs/inference/catalogue.js +55 -1
- package/dist/cjs/inference/decisions.js +245 -0
- package/dist/cjs/inference/request.js +13 -0
- package/dist/cjs/inference/routingPolicy.js +45 -1
- 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 +4 -2
- package/dist/esm/inference/catalogue.js +54 -0
- package/dist/esm/inference/decisions.js +239 -0
- package/dist/esm/inference/request.js +13 -0
- package/dist/esm/inference/routingPolicy.js +44 -1
- 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 +7 -3
- package/dist/types/inference/catalogue.d.ts +75 -22
- 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/routingPolicy.d.ts +44 -10
- 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
package/dist/cjs/agency.js
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.normalizedAppEventSchema = exports.catalogRegistrationSchema = exports.appCapabilityCatalogSchema = exports.catalogEventSchema = exports.catalogToolSchema = exports.auditEventSchema = exports.auditResultSchema = exports.policyDecisionSchema = exports.capabilityTicketClaimsSchema = exports.automationDefinitionSchema = exports.automationDataFlowSchema = exports.automationActorSelectionSchema = exports.automationTriggerSchema = exports.delegationGrantSchema = exports.capabilityCoordinatorSchema = exports.executionAuthorizationRefSchema = exports.capabilityCatalogBindingSchema = exports.grantLimitSchema = exports.toolGrantOverrideSchema = exports.resourceRefSchema = exports.actorRefSchema = exports.capabilityPackageSchema = exports.CAPABILITY_PACKAGES = exports.autonomyLevelSchema = exports.AUTONOMY_LEVELS = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
|
+
const capabilityInvocation_1 = require("./capabilityInvocation");
|
|
5
6
|
const nonEmptyStringSchema = zod_1.z.string().trim().min(1);
|
|
6
7
|
const identifierSchema = zod_1.z.string().trim().min(1).max(255);
|
|
7
8
|
const limitKeySchema = zod_1.z.string().regex(/^[A-Za-z][A-Za-z0-9_]*(?:\.[A-Za-z][A-Za-z0-9_]*)*$/, 'limit keys must be dot-separated input property names').max(255);
|
|
@@ -349,6 +350,42 @@ exports.catalogToolSchema = zod_1.z.object({
|
|
|
349
350
|
path: ['invocation', 'method'],
|
|
350
351
|
});
|
|
351
352
|
}
|
|
353
|
+
// The invocation template is how a coordinator turns arguments into a
|
|
354
|
+
// request (`resolveCatalogInvocation`). A `{param}` the input schema does
|
|
355
|
+
// not declare as a REQUIRED property can never be filled, and a GET input
|
|
356
|
+
// that is not a scalar has no query-string form — both are refused here so
|
|
357
|
+
// the builder never has to guess.
|
|
358
|
+
const declared = typeof tool.inputSchema.properties === 'object'
|
|
359
|
+
&& tool.inputSchema.properties !== null
|
|
360
|
+
&& !Array.isArray(tool.inputSchema.properties)
|
|
361
|
+
? tool.inputSchema.properties
|
|
362
|
+
: {};
|
|
363
|
+
const required = Array.isArray(tool.inputSchema.required) ? tool.inputSchema.required : [];
|
|
364
|
+
const parameters = (0, capabilityInvocation_1.catalogInvocationPathParameters)(tool.invocation.path);
|
|
365
|
+
requireUnique(parameters, 'invocation.path parameters');
|
|
366
|
+
for (const parameter of parameters) {
|
|
367
|
+
if (!Object.prototype.hasOwnProperty.call(declared, parameter) || !required.includes(parameter)) {
|
|
368
|
+
context.addIssue({
|
|
369
|
+
code: zod_1.z.ZodIssueCode.custom,
|
|
370
|
+
message: `Path parameter {${parameter}} must be a required input property`,
|
|
371
|
+
path: ['invocation', 'path'],
|
|
372
|
+
});
|
|
373
|
+
}
|
|
374
|
+
}
|
|
375
|
+
if (tool.invocation.method === 'GET') {
|
|
376
|
+
for (const [key, property] of Object.entries(declared)) {
|
|
377
|
+
const type = typeof property === 'object' && property !== null
|
|
378
|
+
? property.type
|
|
379
|
+
: undefined;
|
|
380
|
+
if (type !== 'string' && type !== 'number' && type !== 'integer' && type !== 'boolean') {
|
|
381
|
+
context.addIssue({
|
|
382
|
+
code: zod_1.z.ZodIssueCode.custom,
|
|
383
|
+
message: `GET input ${key} must be a string, number, integer or boolean`,
|
|
384
|
+
path: ['inputSchema', 'properties', key],
|
|
385
|
+
});
|
|
386
|
+
}
|
|
387
|
+
}
|
|
388
|
+
}
|
|
352
389
|
});
|
|
353
390
|
exports.catalogEventSchema = zod_1.z.object({
|
|
354
391
|
type: identifierSchema,
|
|
@@ -416,6 +453,18 @@ exports.appCapabilityCatalogSchema = zod_1.z.object({
|
|
|
416
453
|
}
|
|
417
454
|
names.add(tool.name);
|
|
418
455
|
}
|
|
456
|
+
// Matching an incoming request back to its tool must have ONE answer that
|
|
457
|
+
// does not depend on the order tools are listed in — see
|
|
458
|
+
// `matchCatalogInvocation`. Two templates that one request could satisfy
|
|
459
|
+
// (`/messages/{id}` beside `/messages/unread`) make that impossible.
|
|
460
|
+
for (const [left, right] of (0, capabilityInvocation_1.findOverlappingCatalogInvocations)(catalog.tools)) {
|
|
461
|
+
context.addIssue({
|
|
462
|
+
code: zod_1.z.ZodIssueCode.custom,
|
|
463
|
+
message: `Tools ${left.name} and ${right.name} have overlapping invocations `
|
|
464
|
+
+ `(${left.invocation.method} ${left.invocation.path} / ${right.invocation.method} ${right.invocation.path})`,
|
|
465
|
+
path: ['tools'],
|
|
466
|
+
});
|
|
467
|
+
}
|
|
419
468
|
const eventTypes = new Set();
|
|
420
469
|
for (const [index, event] of catalog.events.entries()) {
|
|
421
470
|
if (eventTypes.has(event.type)) {
|
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* How a catalog tool call travels over HTTP, in both directions.
|
|
4
|
+
*
|
|
5
|
+
* A capability catalog names each tool's `invocation` as a method plus a path
|
|
6
|
+
* template (`/email/messages/{emailId}`). Two parties have to agree on what
|
|
7
|
+
* that means: the coordinator that BUILDS the request from the model's
|
|
8
|
+
* arguments (Alia), and the app that MATCHES an incoming request back to the
|
|
9
|
+
* one tool its ticket was signed for (the Inbox capability middleware). Each
|
|
10
|
+
* used to carry its own copy of the rules, and the matcher walked the tool list
|
|
11
|
+
* in array order, so a literal segment (`/messages/unread`) and a parameter
|
|
12
|
+
* (`/messages/{id}`) in the same position resolved to whichever tool happened to
|
|
13
|
+
* be declared first. Both halves live here now, next to the catalog schema that
|
|
14
|
+
* refuses a catalog whose templates could ever match the same request — so a
|
|
15
|
+
* match is unique by construction, not by ordering.
|
|
16
|
+
*/
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.catalogInvocationPathParameters = catalogInvocationPathParameters;
|
|
19
|
+
exports.catalogInvocationsOverlap = catalogInvocationsOverlap;
|
|
20
|
+
exports.catalogInvocationTemplatesEquivalent = catalogInvocationTemplatesEquivalent;
|
|
21
|
+
exports.findOverlappingCatalogInvocations = findOverlappingCatalogInvocations;
|
|
22
|
+
exports.matchCatalogInvocation = matchCatalogInvocation;
|
|
23
|
+
exports.resolveCatalogInvocation = resolveCatalogInvocation;
|
|
24
|
+
const PARAMETER_SEGMENT = /^\{([A-Za-z][A-Za-z0-9_]*)\}$/;
|
|
25
|
+
function pathSegments(path) {
|
|
26
|
+
return path.split('/').filter(Boolean);
|
|
27
|
+
}
|
|
28
|
+
/** The `{name}` placeholders of a path template, in order. */
|
|
29
|
+
function catalogInvocationPathParameters(path) {
|
|
30
|
+
return pathSegments(path).flatMap((segment) => {
|
|
31
|
+
const parameter = PARAMETER_SEGMENT.exec(segment)?.[1];
|
|
32
|
+
return parameter ? [parameter] : [];
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Whether one concrete request could match BOTH templates.
|
|
37
|
+
*
|
|
38
|
+
* Same method, same number of segments, and at every position either the same
|
|
39
|
+
* literal or a parameter on at least one side. `/messages/{id}` and
|
|
40
|
+
* `/messages/unread` overlap (the request `/messages/unread` fits both);
|
|
41
|
+
* `/messages/{id}` and `/messages/{id}/thread` do not.
|
|
42
|
+
*/
|
|
43
|
+
function catalogInvocationsOverlap(left, right) {
|
|
44
|
+
if (left.method.toUpperCase() !== right.method.toUpperCase())
|
|
45
|
+
return false;
|
|
46
|
+
const leftSegments = pathSegments(left.path);
|
|
47
|
+
const rightSegments = pathSegments(right.path);
|
|
48
|
+
if (leftSegments.length !== rightSegments.length)
|
|
49
|
+
return false;
|
|
50
|
+
return leftSegments.every((segment, index) => {
|
|
51
|
+
const other = rightSegments[index] ?? '';
|
|
52
|
+
return segment === other || PARAMETER_SEGMENT.test(segment) || PARAMETER_SEGMENT.test(other);
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Whether two templates name the same ADDRESS: same method, and at every
|
|
57
|
+
* position the same literal or a parameter on both sides — parameter names do
|
|
58
|
+
* not matter (`/messages/{id}` and `/messages/{emailId}` are one address;
|
|
59
|
+
* `/messages/{id}` and `/messages/bundled` are not, though they overlap).
|
|
60
|
+
* Used to say which documented REST operation shares its address with a tool.
|
|
61
|
+
*/
|
|
62
|
+
function catalogInvocationTemplatesEquivalent(left, right) {
|
|
63
|
+
if (left.method.toUpperCase() !== right.method.toUpperCase())
|
|
64
|
+
return false;
|
|
65
|
+
const leftSegments = pathSegments(left.path);
|
|
66
|
+
const rightSegments = pathSegments(right.path);
|
|
67
|
+
if (leftSegments.length !== rightSegments.length)
|
|
68
|
+
return false;
|
|
69
|
+
return leftSegments.every((segment, index) => {
|
|
70
|
+
const other = rightSegments[index] ?? '';
|
|
71
|
+
const leftIsParameter = PARAMETER_SEGMENT.test(segment);
|
|
72
|
+
return leftIsParameter ? PARAMETER_SEGMENT.test(other) : segment === other;
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
/** Every pair of tools whose invocations overlap — empty for a valid catalog. */
|
|
76
|
+
function findOverlappingCatalogInvocations(tools) {
|
|
77
|
+
const overlaps = [];
|
|
78
|
+
for (let left = 0; left < tools.length; left += 1) {
|
|
79
|
+
for (let right = left + 1; right < tools.length; right += 1) {
|
|
80
|
+
const a = tools[left];
|
|
81
|
+
const b = tools[right];
|
|
82
|
+
if (a && b && catalogInvocationsOverlap(a.invocation, b.invocation))
|
|
83
|
+
overlaps.push([a, b]);
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
return overlaps;
|
|
87
|
+
}
|
|
88
|
+
function matchTemplate(template, method, requestSegments) {
|
|
89
|
+
if (template.method.toUpperCase() !== method.toUpperCase())
|
|
90
|
+
return null;
|
|
91
|
+
const templateSegments = pathSegments(template.path);
|
|
92
|
+
if (templateSegments.length !== requestSegments.length)
|
|
93
|
+
return null;
|
|
94
|
+
const params = {};
|
|
95
|
+
for (const [index, templateSegment] of templateSegments.entries()) {
|
|
96
|
+
const requestSegment = requestSegments[index];
|
|
97
|
+
if (!requestSegment)
|
|
98
|
+
return null;
|
|
99
|
+
const parameter = PARAMETER_SEGMENT.exec(templateSegment)?.[1];
|
|
100
|
+
if (!parameter) {
|
|
101
|
+
if (templateSegment !== requestSegment)
|
|
102
|
+
return null;
|
|
103
|
+
continue;
|
|
104
|
+
}
|
|
105
|
+
try {
|
|
106
|
+
params[parameter] = decodeURIComponent(requestSegment);
|
|
107
|
+
}
|
|
108
|
+
catch {
|
|
109
|
+
return null;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
return params;
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* The ONE tool whose invocation matches `method` + `path` (the full app-local
|
|
116
|
+
* path, e.g. `/email/messages/abc`), or null.
|
|
117
|
+
*
|
|
118
|
+
* Every tool is tried, not the first hit, so the answer cannot depend on the
|
|
119
|
+
* order the catalog lists its tools in. A second hit means the catalog should
|
|
120
|
+
* never have validated — `appCapabilityCatalogSchema` refuses overlapping
|
|
121
|
+
* templates — so it throws rather than guessing which tool the ticket meant.
|
|
122
|
+
*/
|
|
123
|
+
function matchCatalogInvocation(tools, method, path) {
|
|
124
|
+
const requestSegments = pathSegments(path);
|
|
125
|
+
const matches = [];
|
|
126
|
+
for (const tool of tools) {
|
|
127
|
+
const params = matchTemplate(tool.invocation, method, requestSegments);
|
|
128
|
+
if (params)
|
|
129
|
+
matches.push({ tool, params });
|
|
130
|
+
}
|
|
131
|
+
if (matches.length > 1) {
|
|
132
|
+
throw new Error(`Ambiguous catalog invocation ${method} ${path}: ${matches.map(({ tool }) => tool.name).join(', ')}`);
|
|
133
|
+
}
|
|
134
|
+
return matches[0] ?? null;
|
|
135
|
+
}
|
|
136
|
+
/**
|
|
137
|
+
* Build the HTTP request for a tool call from the model's arguments.
|
|
138
|
+
*
|
|
139
|
+
* Path parameters are substituted (and removed from the remaining arguments);
|
|
140
|
+
* GET sends the rest as query parameters, everything else as a JSON body. A GET
|
|
141
|
+
* argument that is not a scalar is refused instead of being stringified into
|
|
142
|
+
* `[object Object]` — the catalog schema only lets GET tools declare scalar
|
|
143
|
+
* inputs, so reaching that branch means the arguments did not come from the
|
|
144
|
+
* tool's own schema. The resolved URL must stay on `internalBaseUrl`'s origin.
|
|
145
|
+
*/
|
|
146
|
+
function resolveCatalogInvocation(catalog, tool, args) {
|
|
147
|
+
const remaining = { ...args };
|
|
148
|
+
const path = tool.invocation.path.replace(/\{(\w+)\}/g, (_match, parameter) => {
|
|
149
|
+
const value = Object.prototype.hasOwnProperty.call(remaining, parameter) ? remaining[parameter] : undefined;
|
|
150
|
+
delete remaining[parameter];
|
|
151
|
+
if (value === undefined || value === null || value === '') {
|
|
152
|
+
throw new Error(`Missing required path parameter: ${parameter}`);
|
|
153
|
+
}
|
|
154
|
+
return encodeURIComponent(String(value));
|
|
155
|
+
});
|
|
156
|
+
const baseUrl = new URL(catalog.internalBaseUrl);
|
|
157
|
+
const url = new URL(path, `${baseUrl.origin}/`);
|
|
158
|
+
if (url.origin !== baseUrl.origin) {
|
|
159
|
+
throw new Error(`Catalog invocation for ${tool.name} escapes its registered app origin`);
|
|
160
|
+
}
|
|
161
|
+
const method = tool.invocation.method.toUpperCase();
|
|
162
|
+
if (method !== 'GET')
|
|
163
|
+
return { method, url, body: remaining };
|
|
164
|
+
for (const [key, value] of Object.entries(remaining)) {
|
|
165
|
+
if (value === undefined || value === null)
|
|
166
|
+
continue;
|
|
167
|
+
if (typeof value !== 'string' && typeof value !== 'number' && typeof value !== 'boolean') {
|
|
168
|
+
throw new Error(`GET argument ${key} of ${tool.name} must be a string, number or boolean`);
|
|
169
|
+
}
|
|
170
|
+
url.searchParams.set(key, String(value));
|
|
171
|
+
}
|
|
172
|
+
return { method, url };
|
|
173
|
+
}
|
package/dist/cjs/index.js
CHANGED
|
@@ -32,12 +32,12 @@ exports.deviceDirectorySyncSchema = exports.deviceActivateResponseSchema = expor
|
|
|
32
32
|
exports.updateListResponseSchema = exports.channelListResponseSchema = exports.channelSchema = exports.rollbackToEmbeddedEntrySchema = exports.createUpdateResponseSchema = exports.updateSchema = exports.createUpdateRequestSchema = exports.updateAssetRefSchema = exports.assetCompleteResponseSchema = exports.assetCompleteResultItemSchema = exports.assetCompleteRequestSchema = exports.assetInitResponseSchema = exports.assetUploadTicketSchema = exports.assetInitRequestSchema = exports.assetInitItemSchema = exports.rolloutPercentSchema = exports.runtimeVersionSchema = exports.channelNameSchema = exports.sha256HexSchema = exports.updateAssetStatusSchema = exports.updateStatusSchema = exports.updatePlatformSchema = exports.identityRootStatusSchema = exports.identityProofChallengeResponseSchema = exports.identityProofChallengeRequestSchema = exports.identityProofSchema = exports.buildIdentityProofMessage = exports.canonicalJson = exports.IDENTITY_ERROR_CODES = exports.IDENTITY_PROOF_ACTION_VALUES = exports.IDENTITY_PROOF_ACTIONS = exports.IDENTITY_PROOF_CHALLENGE_TTL_MS = exports.IDENTITY_PROOF_AUDIENCE = exports.IDENTITY_PROOF_DOMAIN = exports.IDENTITY_PROOF_VERSION = exports.backupStatusResponseSchema = exports.backupUploadRequestSchema = exports.encryptedBackupEnvelopeSchema = exports.backupLookupIdSchema = exports.rotateKeyCompleteResponseSchema = exports.rotateKeyCompleteRequestSchema = exports.rotateKeyChallengeResponseSchema = exports.loginResultSchema = exports.mcpOAuthConsentResponseSchema = exports.mcpOAuthClientInfoResponseSchema = exports.mcpOAuthConsentContextSchema = exports.mcpOAuthWriteActionSchema = exports.mcpOAuthClientApplicationSchema = exports.oauthAuthorizeCodeResponseSchema = exports.oauthConsentDecisionSchema = void 0;
|
|
33
33
|
exports.passwordSetRequestSchema = exports.reauthEmailStartRequestSchema = exports.REAUTH_ACTIONS = exports.emailReauthProofSchema = exports.reauthProofSchema = exports.isSecondFactorRequired = exports.signUpRequestSchema = exports.secondFactorRequiredSchema = exports.secondFactorSignInRequestSchema = exports.passwordSignInRequestSchema = exports.emailSignInPendingSchema = exports.emailSignInLinkResponseSchema = exports.emailSignInLinkRequestSchema = exports.emailSignInCollectRequestSchema = exports.EMAIL_SIGNIN_LONG_CODE_LENGTH = exports.EMAIL_SIGNIN_LONG_CODE_ALPHABET = exports.normalizeEmailSignInCode = exports.emailSignInCodeSchema = exports.emailSignInConfirmRequestSchema = exports.emailSignInStartResponseSchema = exports.emailSignInStartRequestSchema = exports.secondFactorCodeSchema = exports.newPasswordSchema = exports.passwordInputSchema = exports.signInIdentifierSchema = exports.SIGN_IN_ERROR_CODES = exports.TOTP_BACKUP_CODE_COUNT = exports.TOTP_PERIOD_SECONDS = exports.TOTP_DIGITS = exports.PASSWORD_MAX_LENGTH = exports.PASSWORD_MIN_LENGTH = exports.SIGNIN_SECOND_FACTOR_MAX_ATTEMPTS = exports.SIGNIN_SECOND_FACTOR_TTL_MS = exports.EMAIL_SIGNIN_LINK_TTL_MS = exports.emailVerificationConfirmResponseSchema = exports.emailVerificationConfirmRequestSchema = exports.emailVerificationStartResponseSchema = exports.emailVerificationStartRequestSchema = exports.emailTicketSchema = exports.emailAddressSchema = exports.EMAIL_VERIFICATION_ERROR_CODES = exports.EMAIL_TICKET_TTL_MS = exports.EMAIL_CODE_MAX_ATTEMPTS = exports.EMAIL_CODE_TTL_MS = exports.EMAIL_CODE_LENGTH = exports.EMAIL_VERIFICATION_PURPOSES = exports.updateRolloutPatchSchema = exports.promoteRequestSchema = exports.rollbackToEmbeddedRequestSchema = exports.rollbackRequestSchema = void 0;
|
|
34
34
|
exports.USAGE_SOURCES = exports.usageUnitSchema = exports.USAGE_UNITS = exports.moneySchema = exports.exactDecimalSchema = exports.INFERENCE_MONEY_SCALE = exports.currencyCodeSchema = exports.RESERVED_ALIA_PUBLISHER = exports.inferenceRegionSchema = exports.deploymentIdSchema = exports.inferenceProviderSlugSchema = exports.routingProfileSlugSchema = exports.routingProfileIdSchema = exports.modelReferenceSchema = exports.modelRevisionLabelSchema = exports.modelIdSchema = exports.modelSlugSchema = exports.publisherSlugSchema = exports.sha256DigestSchema = exports.inferenceHttpsUrlSchema = exports.inferenceDateSchema = exports.inferenceTimestampSchema = exports.inferenceEnvironmentSchema = exports.idempotencyKeySchema = exports.generationIdSchema = exports.requestIdSchema = exports.oxyCredentialIdSchema = exports.oxyApplicationIdSchema = exports.delegatedUserIdSchema = exports.oxyAccountIdSchema = exports.INFERENCE_CONTRACT_VERSION = exports.transparencyCheckpointListSchema = exports.transparencyInclusionProofSchema = exports.transparencyCheckpointSchema = exports.transparencyAnchorSchema = exports.transparencyCheckpointSignatureSchema = exports.identityLinkCompleteRequestSchema = exports.identityLinkProofRequestSchema = exports.identityLinkStateSchema = exports.identityLinkCreateResponseSchema = exports.parseIdentityLinkQrPayload = exports.buildIdentityLinkQrPayload = exports.identityLinkIdSchema = exports.IDENTITY_LINK_QR_PREFIX = exports.IDENTITY_LINK_STATUSES = exports.totpBackupCodesResponseSchema = exports.totpReauthRequestSchema = exports.totpConfirmRequestSchema = exports.totpEnrollResponseSchema = exports.signInMethodsSchema = void 0;
|
|
35
|
-
exports.
|
|
36
|
-
exports.
|
|
37
|
-
exports.
|
|
38
|
-
exports.
|
|
39
|
-
exports.
|
|
40
|
-
exports.inboxInferenceStreamEventSchema = exports.inboxThreadSummaryResponseSchema = exports.inboxSmartRepliesResponseSchema = exports.inboxNaturalSearchResponseSchema = exports.inboxInferenceTextResponseSchema = exports.inboxMessageInferenceParamsSchema = exports.inboxNaturalSearchRequestSchema = exports.inboxDailyBriefRequestSchema = exports.inboxComposeRequestSchema = exports.emailAgentContextSchema = exports.emailContextMessageSchema = exports.emailContextMailboxSchema = exports.emailContextAddressSchema = void 0;
|
|
35
|
+
exports.modelCatalogueEntrySchema = exports.catalogueServingProviderSummarySchema = exports.cataloguePublisherSummarySchema = exports.routingProfileSchema = exports.routingProfileCandidateSchema = exports.modelDeploymentSchema = exports.inferenceProviderSchema = exports.modelRevisionSchema = exports.catalogueModelSchema = exports.modelPublisherSchema = exports.modelSafetyMetadataSchema = exports.modelEvaluationResultSchema = exports.modelDeprecationSchema = exports.commercialPermissionSchema = exports.availabilityScopeSchema = exports.inferenceDataPolicySchema = exports.modelProvenanceSchema = exports.modelLicenseSchema = exports.modelCapabilitiesSchema = exports.modelRealtimeCapabilitiesSchema = exports.realtimeSessionTransportSchema = exports.realtimeSessionKindSchema = exports.inferenceApiFormatSchema = exports.modelPowerClassSchema = exports.powerLevelSchema = exports.reasoningEffortSchema = exports.inferenceModalitySchema = exports.priceSnapshotSchema = exports.priceVersionSchema = exports.priceVersionStatusSchema = exports.embeddingResponseSchema = exports.embeddingFailureSchema = exports.embeddingSuccessSchema = exports.embeddingUsageSchema = exports.embeddingVectorSchema = exports.inferenceErrorSchema = exports.providerErrorPassthroughSchema = exports.safeErrorTextSchema = exports.upstreamErrorCategorySchema = exports.inferenceErrorCodeSchema = exports.NON_RETRYABLE_INFERENCE_ERROR_CODES = exports.INFERENCE_ERROR_CODES = exports.inferenceAttributionSchema = exports.authenticatedPrincipalSchema = exports.billingPrincipalSchema = exports.inferenceScopeSchema = exports.INFERENCE_SCOPES = exports.unitPriceSchema = exports.usageQuantitySchema = exports.usageSourceSchema = void 0;
|
|
36
|
+
exports.MAX_REALTIME_AUDIO_FRAME_BASE64_LENGTH = exports.inferenceStreamEventSchema = exports.inferenceStreamDoneEventSchema = exports.inferenceFinishReasonSchema = exports.inferenceStreamErrorEventSchema = exports.inferenceStreamRouteSwitchEventSchema = exports.inferenceRouteSwitchReasonSchema = exports.inferenceRouteSwitchDetailSchema = exports.inferenceStreamUsageEventSchema = exports.inferenceStreamToolCallEventSchema = exports.inferenceStreamAudioEventSchema = exports.MAX_INFERENCE_AUDIO_BYTES = exports.inferenceAudioMediaTypeSchema = exports.inferenceStreamDeltaEventSchema = exports.inferenceStreamStartEventSchema = exports.inferenceAudioOutputParametersSchema = exports.inferenceSpeechParametersSchema = exports.inferenceRequestSchema = exports.clientRequestMetadataSchema = exports.responseFormatSchema = exports.toolChoiceSchema = exports.toolDefinitionSchema = exports.inferenceReasoningSchema = exports.samplingParametersSchema = exports.inferenceInputSchema = exports.inferenceMessageSchema = exports.inferenceMessageRoleSchema = exports.inferenceToolCallSchema = exports.inferenceContentPartSchema = exports.inferenceContentSourceSchema = exports.modelDocumentationSchema = exports.modelReleaseIngestionResultSchema = exports.modelReleaseIngestionRequestSchema = exports.modelLineDeclarationSchema = exports.modelGpaiDocumentationSchema = exports.modelDownstreamDocumentationSchema = exports.SYSTEMIC_RISK_COMPUTE_THRESHOLD_FLOPS = exports.trainingComputeFlopsSchema = exports.modelSystemicRiskTierSchema = exports.modelDistributionMethodSchema = exports.aliaModelReleaseManifestSchema = exports.aliaReleaseSignatureSchema = exports.aliaReleaseArtifactSchema = exports.authorizedRouteSchema = exports.effectiveSameModelDeployment = exports.routingPolicyReferenceSchema = exports.routingPolicySchema = exports.routingFallbackPolicySchema = exports.routingPolicyScopeSchema = exports.routingTargetSchema = void 0;
|
|
37
|
+
exports.realtimeTextDeltaEventSchema = exports.realtimeTranscriptDoneEventSchema = exports.realtimeTranscriptDeltaEventSchema = exports.realtimeTranscriptSourceSchema = exports.realtimeOutputAudioDoneEventSchema = exports.realtimeOutputAudioDeltaEventSchema = exports.realtimeResponseCreatedEventSchema = exports.realtimeInputAudioClearedEventSchema = exports.realtimeInputAudioCommittedEventSchema = exports.realtimeSpeechStoppedEventSchema = exports.realtimeSpeechStartedEventSchema = exports.realtimeItemTruncatedEventSchema = exports.realtimeItemDeletedEventSchema = exports.realtimeItemDoneEventSchema = exports.realtimeItemAddedEventSchema = exports.realtimeCommandAcceptedEventSchema = exports.realtimeSessionResumedEventSchema = exports.realtimeSessionUpdatedEventSchema = exports.realtimeSessionCreatedEventSchema = exports.realtimeClientCommandSchema = exports.realtimeSessionCloseCommandSchema = exports.realtimeSessionResumeCommandSchema = exports.realtimeResponseCancelCommandSchema = exports.realtimeResponseCreateCommandSchema = exports.realtimeInputAudioClearCommandSchema = exports.realtimeInputAudioCommitCommandSchema = exports.realtimeInputAudioAppendCommandSchema = exports.realtimeItemTruncateCommandSchema = exports.realtimeItemDeleteCommandSchema = exports.realtimeItemCreateCommandSchema = exports.realtimeSessionUpdateCommandSchema = exports.realtimeResponseParametersSchema = exports.realtimeConversationItemSchema = exports.realtimeContentPartSchema = exports.realtimeSessionRequestSchema = exports.realtimeClientMetadataSchema = exports.realtimeSessionLimitsSchema = exports.realtimeSessionConfigUpdateSchema = exports.realtimeSessionConfigSchema = exports.realtimeTranslationSchema = exports.realtimeInputTranscriptionSchema = exports.realtimeTurnDetectionSchema = exports.realtimeOutputModalitySchema = exports.realtimeAudioFormatSchema = exports.realtimeResponseIdSchema = exports.realtimeItemIdSchema = exports.realtimeCommandIdSchema = exports.MAX_REALTIME_RESUME_WINDOW_MS = exports.MAX_REALTIME_SESSION_AUDIO_BYTES = exports.MAX_REALTIME_SESSION_DURATION_MS = void 0;
|
|
38
|
+
exports.BILLING_INVOICE_STATUSES = exports.accountBillingStateSchema = exports.billingProfileSchema = exports.autoRechargeSchema = exports.billingProfileStatusSchema = exports.BILLING_PROFILE_STATUSES = exports.billingModeSchema = exports.BILLING_MODES = exports.providerConnectionSchema = exports.providerConnectionStatusSchema = exports.providerConnectionValidationSchema = exports.providerCredentialCustodyStateSchema = exports.providerCredentialValidationDeploymentSchema = exports.providerCredentialValidationOperationSchema = exports.kaanaCredentialValidationOutcomeSchema = exports.kaanaCredentialValidationFailureCodeSchema = exports.kaanaCredentialValidationOutcomeStateSchema = exports.kaanaCredentialValidationTaskSchema = exports.kaanaCredentialOutcomeSchema = exports.kaanaCredentialConflictOutcomeSchema = exports.kaanaCredentialAppliedOutcomeSchema = exports.kaanaCredentialOutcomeRequestSchema = exports.kaanaCredentialRevokeOutcomeRequestSchema = exports.kaanaCredentialRotateOutcomeRequestSchema = exports.kaanaCredentialCreateOutcomeRequestSchema = exports.kaanaCredentialMutationSchema = exports.kaanaCredentialRevokeMutationSchema = exports.kaanaCredentialRotateMutationSchema = exports.kaanaCredentialCreateMutationSchema = exports.kaanaCredentialIdentitySchema = exports.kaanaCredentialOperationActionSchema = exports.kaanaCredentialOperationIdSchema = exports.kaanaCredentialHandleSchema = exports.providerConnectionScopeSchema = exports.usageRefundSchema = exports.usageRefundReasonSchema = exports.usageRefundSubjectSchema = exports.usageReceiptSchema = exports.normalizedUsageReportSchema = exports.inferenceRequestOutcomeSchema = exports.usageReservationSchema = exports.usageReservationStatusSchema = exports.usageReservationRequestSchema = exports.realtimeServerEventSchema = exports.realtimeSessionClosedEventSchema = exports.realtimeSessionCloseReasonSchema = exports.realtimeErrorEventSchema = exports.realtimeResponseDoneEventSchema = exports.realtimeResponseStatusSchema = exports.realtimeToolCallEventSchema = void 0;
|
|
39
|
+
exports.catalogEventSchema = exports.catalogToolSchema = exports.auditEventSchema = exports.auditResultSchema = exports.policyDecisionSchema = exports.capabilityTicketClaimsSchema = exports.automationDefinitionSchema = exports.automationDataFlowSchema = exports.automationActorSelectionSchema = exports.automationTriggerSchema = exports.delegationGrantSchema = exports.capabilityCoordinatorSchema = exports.executionAuthorizationRefSchema = exports.capabilityCatalogBindingSchema = exports.grantLimitSchema = exports.toolGrantOverrideSchema = exports.resourceRefSchema = exports.actorRefSchema = exports.capabilityPackageSchema = exports.autonomyLevelSchema = exports.CAPABILITY_PACKAGES = exports.AUTONOMY_LEVELS = exports.productEntitlementSchema = exports.costCenterSpendSchema = exports.costCenterSchema = exports.costCenterStatusSchema = exports.COST_CENTER_STATUSES = exports.payAsYouGoEntitlementSchema = exports.productPlanSchema = exports.planAllowanceSchema = exports.LIVE_PRODUCT_PLAN_STATUSES = exports.productPlanStatusSchema = exports.PRODUCT_PLAN_STATUSES = exports.reconciliationReportSchema = exports.reconciliationRunSchema = exports.reconciliationDiscrepancySchema = exports.reconciliationRunStatusSchema = exports.RECONCILIATION_RUN_STATUSES = exports.reconciliationDiscrepancyKindSchema = exports.RECONCILIATION_DISCREPANCY_KINDS = exports.autoRechargeAttemptSchema = exports.autoRechargeStatusSchema = exports.AUTO_RECHARGE_STATUSES = exports.externalPaymentSchema = exports.externalPaymentKindSchema = exports.EXTERNAL_PAYMENT_KINDS = exports.externalPaymentProviderSchema = exports.EXTERNAL_PAYMENT_PROVIDERS = exports.billingInvoiceSchema = exports.billingInvoiceStatusSchema = void 0;
|
|
40
|
+
exports.decisionAnswersMatch = exports.decisionFitsGateway = exports.decisionInputBudget = exports.decisionFailureSchema = exports.decisionSuccessSchema = exports.decisionResultSchema = exports.decisionAnswerSchema = exports.decisionRequestSchema = exports.decisionInputSchema = exports.decisionQuestionSchema = exports.decisionEffortSchema = exports.inboxInferenceStreamEventSchema = exports.inboxThreadSummaryResponseSchema = exports.inboxSmartRepliesResponseSchema = exports.inboxNaturalSearchResponseSchema = exports.inboxInferenceTextResponseSchema = exports.inboxMessageInferenceParamsSchema = exports.inboxNaturalSearchRequestSchema = exports.inboxDailyBriefRequestSchema = exports.inboxComposeRequestSchema = exports.emailAgentContextSchema = exports.emailContextMessageSchema = exports.emailContextMailboxSchema = exports.emailContextAddressSchema = exports.resolveCatalogInvocation = exports.matchCatalogInvocation = exports.findOverlappingCatalogInvocations = exports.catalogInvocationTemplatesEquivalent = exports.catalogInvocationsOverlap = exports.catalogInvocationPathParameters = exports.normalizedAppEventSchema = exports.catalogRegistrationSchema = exports.appCapabilityCatalogSchema = void 0;
|
|
41
41
|
var accountGraph_1 = require("./accountGraph");
|
|
42
42
|
Object.defineProperty(exports, "ACCOUNT_KINDS", { enumerable: true, get: function () { return accountGraph_1.ACCOUNT_KINDS; } });
|
|
43
43
|
Object.defineProperty(exports, "accountKindSchema", { enumerable: true, get: function () { return accountGraph_1.accountKindSchema; } });
|
|
@@ -497,6 +497,8 @@ var catalogue_1 = require("./inference/catalogue");
|
|
|
497
497
|
// The six distinct catalogue objects + the customer-safe projection.
|
|
498
498
|
Object.defineProperty(exports, "inferenceModalitySchema", { enumerable: true, get: function () { return catalogue_1.inferenceModalitySchema; } });
|
|
499
499
|
Object.defineProperty(exports, "reasoningEffortSchema", { enumerable: true, get: function () { return catalogue_1.reasoningEffortSchema; } });
|
|
500
|
+
Object.defineProperty(exports, "powerLevelSchema", { enumerable: true, get: function () { return catalogue_1.powerLevelSchema; } });
|
|
501
|
+
Object.defineProperty(exports, "modelPowerClassSchema", { enumerable: true, get: function () { return catalogue_1.modelPowerClassSchema; } });
|
|
500
502
|
Object.defineProperty(exports, "inferenceApiFormatSchema", { enumerable: true, get: function () { return catalogue_1.inferenceApiFormatSchema; } });
|
|
501
503
|
Object.defineProperty(exports, "realtimeSessionKindSchema", { enumerable: true, get: function () { return catalogue_1.realtimeSessionKindSchema; } });
|
|
502
504
|
Object.defineProperty(exports, "realtimeSessionTransportSchema", { enumerable: true, get: function () { return catalogue_1.realtimeSessionTransportSchema; } });
|
|
@@ -528,6 +530,7 @@ Object.defineProperty(exports, "routingPolicyScopeSchema", { enumerable: true, g
|
|
|
528
530
|
Object.defineProperty(exports, "routingFallbackPolicySchema", { enumerable: true, get: function () { return routingPolicy_1.routingFallbackPolicySchema; } });
|
|
529
531
|
Object.defineProperty(exports, "routingPolicySchema", { enumerable: true, get: function () { return routingPolicy_1.routingPolicySchema; } });
|
|
530
532
|
Object.defineProperty(exports, "routingPolicyReferenceSchema", { enumerable: true, get: function () { return routingPolicy_1.routingPolicyReferenceSchema; } });
|
|
533
|
+
Object.defineProperty(exports, "effectiveSameModelDeployment", { enumerable: true, get: function () { return routingPolicy_1.effectiveSameModelDeployment; } });
|
|
531
534
|
// What the data plane actually receives: the routes the policy authorized.
|
|
532
535
|
Object.defineProperty(exports, "authorizedRouteSchema", { enumerable: true, get: function () { return routingPolicy_1.authorizedRouteSchema; } });
|
|
533
536
|
var aliaModelRelease_1 = require("./inference/aliaModelRelease");
|
|
@@ -750,6 +753,13 @@ Object.defineProperty(exports, "catalogEventSchema", { enumerable: true, get: fu
|
|
|
750
753
|
Object.defineProperty(exports, "appCapabilityCatalogSchema", { enumerable: true, get: function () { return agency_1.appCapabilityCatalogSchema; } });
|
|
751
754
|
Object.defineProperty(exports, "catalogRegistrationSchema", { enumerable: true, get: function () { return agency_1.catalogRegistrationSchema; } });
|
|
752
755
|
Object.defineProperty(exports, "normalizedAppEventSchema", { enumerable: true, get: function () { return agency_1.normalizedAppEventSchema; } });
|
|
756
|
+
var capabilityInvocation_1 = require("./capabilityInvocation");
|
|
757
|
+
Object.defineProperty(exports, "catalogInvocationPathParameters", { enumerable: true, get: function () { return capabilityInvocation_1.catalogInvocationPathParameters; } });
|
|
758
|
+
Object.defineProperty(exports, "catalogInvocationsOverlap", { enumerable: true, get: function () { return capabilityInvocation_1.catalogInvocationsOverlap; } });
|
|
759
|
+
Object.defineProperty(exports, "catalogInvocationTemplatesEquivalent", { enumerable: true, get: function () { return capabilityInvocation_1.catalogInvocationTemplatesEquivalent; } });
|
|
760
|
+
Object.defineProperty(exports, "findOverlappingCatalogInvocations", { enumerable: true, get: function () { return capabilityInvocation_1.findOverlappingCatalogInvocations; } });
|
|
761
|
+
Object.defineProperty(exports, "matchCatalogInvocation", { enumerable: true, get: function () { return capabilityInvocation_1.matchCatalogInvocation; } });
|
|
762
|
+
Object.defineProperty(exports, "resolveCatalogInvocation", { enumerable: true, get: function () { return capabilityInvocation_1.resolveCatalogInvocation; } });
|
|
753
763
|
var emailAgentContext_1 = require("./emailAgentContext");
|
|
754
764
|
Object.defineProperty(exports, "emailContextAddressSchema", { enumerable: true, get: function () { return emailAgentContext_1.emailContextAddressSchema; } });
|
|
755
765
|
Object.defineProperty(exports, "emailContextMailboxSchema", { enumerable: true, get: function () { return emailAgentContext_1.emailContextMailboxSchema; } });
|
|
@@ -771,3 +781,15 @@ __exportStar(require("./federationInstanceFetch"), exports);
|
|
|
771
781
|
__exportStar(require("./notifications"), exports);
|
|
772
782
|
__exportStar(require("./email/messages"), exports);
|
|
773
783
|
__exportStar(require("./stickers"), exports);
|
|
784
|
+
var decisions_1 = require("./inference/decisions");
|
|
785
|
+
Object.defineProperty(exports, "decisionEffortSchema", { enumerable: true, get: function () { return decisions_1.decisionEffortSchema; } });
|
|
786
|
+
Object.defineProperty(exports, "decisionQuestionSchema", { enumerable: true, get: function () { return decisions_1.decisionQuestionSchema; } });
|
|
787
|
+
Object.defineProperty(exports, "decisionInputSchema", { enumerable: true, get: function () { return decisions_1.decisionInputSchema; } });
|
|
788
|
+
Object.defineProperty(exports, "decisionRequestSchema", { enumerable: true, get: function () { return decisions_1.decisionRequestSchema; } });
|
|
789
|
+
Object.defineProperty(exports, "decisionAnswerSchema", { enumerable: true, get: function () { return decisions_1.decisionAnswerSchema; } });
|
|
790
|
+
Object.defineProperty(exports, "decisionResultSchema", { enumerable: true, get: function () { return decisions_1.decisionResultSchema; } });
|
|
791
|
+
Object.defineProperty(exports, "decisionSuccessSchema", { enumerable: true, get: function () { return decisions_1.decisionSuccessSchema; } });
|
|
792
|
+
Object.defineProperty(exports, "decisionFailureSchema", { enumerable: true, get: function () { return decisions_1.decisionFailureSchema; } });
|
|
793
|
+
Object.defineProperty(exports, "decisionInputBudget", { enumerable: true, get: function () { return decisions_1.decisionInputBudget; } });
|
|
794
|
+
Object.defineProperty(exports, "decisionFitsGateway", { enumerable: true, get: function () { return decisions_1.decisionFitsGateway; } });
|
|
795
|
+
Object.defineProperty(exports, "decisionAnswersMatch", { enumerable: true, get: function () { return decisions_1.decisionAnswersMatch; } });
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
* Decided in: docs/adr/0008-catalogue-concept-separation.md.
|
|
29
29
|
*/
|
|
30
30
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
31
|
-
exports.modelCatalogueEntrySchema = exports.catalogueServingProviderSummarySchema = exports.cataloguePublisherSummarySchema = exports.routingProfileSchema = exports.routingProfileCandidateSchema = exports.modelDeploymentSchema = exports.inferenceProviderSchema = exports.modelRevisionSchema = exports.catalogueModelSchema = exports.modelPublisherSchema = exports.modelSafetyMetadataSchema = exports.modelEvaluationResultSchema = exports.modelDeprecationSchema = exports.commercialPermissionSchema = exports.availabilityScopeSchema = exports.inferenceDataPolicySchema = exports.modelProvenanceSchema = exports.modelLicenseSchema = exports.modelCapabilitiesSchema = exports.modelRealtimeCapabilitiesSchema = exports.realtimeSessionTransportSchema = exports.realtimeSessionKindSchema = exports.inferenceApiFormatSchema = exports.reasoningEffortSchema = exports.inferenceModalitySchema = void 0;
|
|
31
|
+
exports.modelCatalogueEntrySchema = exports.catalogueServingProviderSummarySchema = exports.cataloguePublisherSummarySchema = exports.routingProfileSchema = exports.routingProfileCandidateSchema = exports.modelDeploymentSchema = exports.inferenceProviderSchema = exports.modelRevisionSchema = exports.catalogueModelSchema = exports.modelPublisherSchema = exports.modelSafetyMetadataSchema = exports.modelEvaluationResultSchema = exports.modelDeprecationSchema = exports.commercialPermissionSchema = exports.availabilityScopeSchema = exports.inferenceDataPolicySchema = exports.modelProvenanceSchema = exports.modelLicenseSchema = exports.modelCapabilitiesSchema = exports.modelRealtimeCapabilitiesSchema = exports.realtimeSessionTransportSchema = exports.realtimeSessionKindSchema = exports.inferenceApiFormatSchema = exports.modelPowerClassSchema = exports.powerLevelSchema = exports.reasoningEffortSchema = exports.inferenceModalitySchema = void 0;
|
|
32
32
|
const zod_1 = require("zod");
|
|
33
33
|
const identifiers_1 = require("./identifiers");
|
|
34
34
|
const priceVersion_1 = require("./priceVersion");
|
|
@@ -52,6 +52,39 @@ exports.inferenceModalitySchema = zod_1.z.enum([
|
|
|
52
52
|
* effort the resolved model does not advertise rather than dropping it.
|
|
53
53
|
*/
|
|
54
54
|
exports.reasoningEffortSchema = zod_1.z.enum(['low', 'medium', 'high']);
|
|
55
|
+
/**
|
|
56
|
+
* A POWER LEVEL: the public name of a product-preset routing profile that asks
|
|
57
|
+
* Oxy to choose a model by capability tier instead of naming one (contract set
|
|
58
|
+
* 3.4.0). Ordered cheapest first; `auto` asks Oxy to pick the cheapest level
|
|
59
|
+
* that suffices for the request.
|
|
60
|
+
*
|
|
61
|
+
* - `instant` — very cheap, fast small models; the least reasoning each model
|
|
62
|
+
* accepts (`low` on a reasoning model, nothing on one without effort control)
|
|
63
|
+
* - `medium` — mid-size models, low reasoning effort
|
|
64
|
+
* - `high` — strong models, medium reasoning effort
|
|
65
|
+
* - `xhigh` — strong models, high reasoning effort
|
|
66
|
+
* - `pro` — frontier models, high reasoning effort
|
|
67
|
+
* - `ultra` — the heaviest frontier models, maximum reasoning effort
|
|
68
|
+
*
|
|
69
|
+
* A power level is a routing profile, never a model: its slug has no `/`, and
|
|
70
|
+
* the response always reports the concrete model that ran.
|
|
71
|
+
*/
|
|
72
|
+
exports.powerLevelSchema = zod_1.z.enum([
|
|
73
|
+
'auto',
|
|
74
|
+
'instant',
|
|
75
|
+
'medium',
|
|
76
|
+
'high',
|
|
77
|
+
'xhigh',
|
|
78
|
+
'pro',
|
|
79
|
+
'ultra',
|
|
80
|
+
]);
|
|
81
|
+
/**
|
|
82
|
+
* The reviewed capability tier of one MODEL, which power levels choose from.
|
|
83
|
+
* `xhigh` and `auto` are not classes: `xhigh` runs `high`-class models at a
|
|
84
|
+
* higher effort, and `auto` chooses a level. Reviewed catalogue data with a
|
|
85
|
+
* cited public benchmark source — never inferred from a model's name.
|
|
86
|
+
*/
|
|
87
|
+
exports.modelPowerClassSchema = zod_1.z.enum(['instant', 'medium', 'high', 'pro', 'ultra']);
|
|
55
88
|
/**
|
|
56
89
|
* The public dialects a request can arrive in — `client.apiFormat` on the
|
|
57
90
|
* envelope, and the list a deployment declares it can execute.
|
|
@@ -64,6 +97,7 @@ exports.inferenceApiFormatSchema = zod_1.z.enum([
|
|
|
64
97
|
'responses',
|
|
65
98
|
'chat_completions',
|
|
66
99
|
'embeddings',
|
|
100
|
+
'decisions',
|
|
67
101
|
'images_generations',
|
|
68
102
|
'audio_transcriptions',
|
|
69
103
|
'audio_speech',
|
|
@@ -542,6 +576,20 @@ exports.routingProfileSchema = zod_1.z.object({
|
|
|
542
576
|
candidates: zod_1.z.array(exports.routingProfileCandidateSchema).min(1),
|
|
543
577
|
/** A product preset (Alia's "fast" toggle) rather than a customer's own profile. */
|
|
544
578
|
isProductPreset: zod_1.z.boolean(),
|
|
579
|
+
/**
|
|
580
|
+
* Present when this profile IS a power level (contract set 3.4.0). Its
|
|
581
|
+
* `candidates` are then the currently servable models of the level's class,
|
|
582
|
+
* and may change between reads; cross-model failover among them is
|
|
583
|
+
* authorized by the profile and reported with a `route_switch` event.
|
|
584
|
+
*/
|
|
585
|
+
powerLevel: exports.powerLevelSchema.optional(),
|
|
586
|
+
/**
|
|
587
|
+
* The reasoning effort a power level asks for when the request names none,
|
|
588
|
+
* clamped to the nearest effort the chosen model accepts (the lowest at or
|
|
589
|
+
* above it, else the highest). Absent: the level asks for no reasoning, sent
|
|
590
|
+
* as the least effort a reasoning model accepts.
|
|
591
|
+
*/
|
|
592
|
+
reasoningEffort: exports.reasoningEffortSchema.optional(),
|
|
545
593
|
});
|
|
546
594
|
/* -------------------------------------------------------------------------- */
|
|
547
595
|
/* Customer-safe catalogue projection */
|
|
@@ -610,4 +658,10 @@ exports.modelCatalogueEntrySchema = zod_1.z.object({
|
|
|
610
658
|
evaluations: zod_1.z.array(exports.modelEvaluationResultSchema).default([]),
|
|
611
659
|
safety: exports.modelSafetyMetadataSchema.optional(),
|
|
612
660
|
modelCardUrl: identifiers_1.inferenceHttpsUrlSchema.optional(),
|
|
661
|
+
/**
|
|
662
|
+
* The reviewed power class this model serves in, when one has been reviewed
|
|
663
|
+
* (contract set 3.4.0). Absent means the model is callable by name only and
|
|
664
|
+
* no power level chooses it.
|
|
665
|
+
*/
|
|
666
|
+
powerClass: exports.modelPowerClassSchema.optional(),
|
|
613
667
|
});
|