@oxy.so/contracts 4.2.0 → 4.4.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/.tsbuildinfo +1 -1
  2. package/dist/cjs/index.js +72 -4
  3. package/dist/cjs/inference/catalogue.js +105 -2
  4. package/dist/cjs/inference/money.js +23 -0
  5. package/dist/cjs/inference/realtime.js +826 -0
  6. package/dist/cjs/inference/request.js +34 -11
  7. package/dist/cjs/inference/streamEvents.js +7 -1
  8. package/dist/cjs/inference/version.js +1 -1
  9. package/dist/cjs/stickers.js +151 -0
  10. package/dist/esm/.tsbuildinfo +1 -1
  11. package/dist/esm/index.js +6 -2
  12. package/dist/esm/inference/catalogue.js +104 -1
  13. package/dist/esm/inference/money.js +23 -0
  14. package/dist/esm/inference/realtime.js +822 -0
  15. package/dist/esm/inference/request.js +34 -11
  16. package/dist/esm/inference/streamEvents.js +7 -1
  17. package/dist/esm/inference/version.js +1 -1
  18. package/dist/esm/stickers.js +148 -0
  19. package/dist/types/.tsbuildinfo +1 -1
  20. package/dist/types/index.d.ts +7 -4
  21. package/dist/types/inference/catalogue.d.ts +299 -10
  22. package/dist/types/inference/entitlement.d.ts +6 -6
  23. package/dist/types/inference/inbox.d.ts +2 -2
  24. package/dist/types/inference/modelDocumentation.d.ts +146 -2
  25. package/dist/types/inference/money.d.ts +28 -8
  26. package/dist/types/inference/priceVersion.d.ts +12 -12
  27. package/dist/types/inference/realtime.d.ts +8012 -0
  28. package/dist/types/inference/request.d.ts +51 -0
  29. package/dist/types/inference/routingPolicy.d.ts +7 -7
  30. package/dist/types/inference/streamEvents.d.ts +28 -16
  31. package/dist/types/inference/usage.d.ts +28 -28
  32. package/dist/types/inference/version.d.ts +1 -1
  33. package/dist/types/stickers.d.ts +1049 -0
  34. package/package.json +1 -1
package/dist/cjs/index.js CHANGED
@@ -32,10 +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.authorizedRouteSchema = exports.routingPolicyReferenceSchema = exports.routingPolicySchema = exports.routingFallbackPolicySchema = exports.routingPolicyScopeSchema = exports.routingTargetSchema = 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.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.usageRefundSchema = exports.usageRefundReasonSchema = exports.usageRefundSubjectSchema = exports.usageReceiptSchema = exports.normalizedUsageReportSchema = exports.inferenceRequestOutcomeSchema = exports.usageReservationSchema = exports.usageReservationStatusSchema = exports.usageReservationRequestSchema = 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.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 = void 0;
37
- 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 = 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 = void 0;
38
- 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.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.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 = void 0;
35
+ exports.routingPolicyScopeSchema = exports.routingTargetSchema = 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 = 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_RESUME_WINDOW_MS = exports.MAX_REALTIME_SESSION_AUDIO_BYTES = exports.MAX_REALTIME_SESSION_DURATION_MS = 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.routingPolicyReferenceSchema = exports.routingPolicySchema = exports.routingFallbackPolicySchema = void 0;
37
+ exports.realtimeResponseDoneEventSchema = exports.realtimeResponseStatusSchema = exports.realtimeToolCallEventSchema = 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 = void 0;
38
+ exports.EXTERNAL_PAYMENT_PROVIDERS = exports.billingInvoiceSchema = exports.billingInvoiceStatusSchema = 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 = void 0;
39
+ 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.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 = void 0;
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;
39
41
  var accountGraph_1 = require("./accountGraph");
40
42
  Object.defineProperty(exports, "ACCOUNT_KINDS", { enumerable: true, get: function () { return accountGraph_1.ACCOUNT_KINDS; } });
41
43
  Object.defineProperty(exports, "accountKindSchema", { enumerable: true, get: function () { return accountGraph_1.accountKindSchema; } });
@@ -495,6 +497,10 @@ var catalogue_1 = require("./inference/catalogue");
495
497
  // The six distinct catalogue objects + the customer-safe projection.
496
498
  Object.defineProperty(exports, "inferenceModalitySchema", { enumerable: true, get: function () { return catalogue_1.inferenceModalitySchema; } });
497
499
  Object.defineProperty(exports, "reasoningEffortSchema", { enumerable: true, get: function () { return catalogue_1.reasoningEffortSchema; } });
500
+ Object.defineProperty(exports, "inferenceApiFormatSchema", { enumerable: true, get: function () { return catalogue_1.inferenceApiFormatSchema; } });
501
+ Object.defineProperty(exports, "realtimeSessionKindSchema", { enumerable: true, get: function () { return catalogue_1.realtimeSessionKindSchema; } });
502
+ Object.defineProperty(exports, "realtimeSessionTransportSchema", { enumerable: true, get: function () { return catalogue_1.realtimeSessionTransportSchema; } });
503
+ Object.defineProperty(exports, "modelRealtimeCapabilitiesSchema", { enumerable: true, get: function () { return catalogue_1.modelRealtimeCapabilitiesSchema; } });
498
504
  Object.defineProperty(exports, "modelCapabilitiesSchema", { enumerable: true, get: function () { return catalogue_1.modelCapabilitiesSchema; } });
499
505
  Object.defineProperty(exports, "modelLicenseSchema", { enumerable: true, get: function () { return catalogue_1.modelLicenseSchema; } });
500
506
  Object.defineProperty(exports, "modelProvenanceSchema", { enumerable: true, get: function () { return catalogue_1.modelProvenanceSchema; } });
@@ -559,6 +565,7 @@ Object.defineProperty(exports, "responseFormatSchema", { enumerable: true, get:
559
565
  Object.defineProperty(exports, "clientRequestMetadataSchema", { enumerable: true, get: function () { return request_1.clientRequestMetadataSchema; } });
560
566
  Object.defineProperty(exports, "inferenceRequestSchema", { enumerable: true, get: function () { return request_1.inferenceRequestSchema; } });
561
567
  Object.defineProperty(exports, "inferenceSpeechParametersSchema", { enumerable: true, get: function () { return request_1.inferenceSpeechParametersSchema; } });
568
+ Object.defineProperty(exports, "inferenceAudioOutputParametersSchema", { enumerable: true, get: function () { return request_1.inferenceAudioOutputParametersSchema; } });
562
569
  var streamEvents_1 = require("./inference/streamEvents");
563
570
  // Normalized SSE events.
564
571
  Object.defineProperty(exports, "inferenceStreamStartEventSchema", { enumerable: true, get: function () { return streamEvents_1.inferenceStreamStartEventSchema; } });
@@ -575,6 +582,66 @@ Object.defineProperty(exports, "inferenceStreamErrorEventSchema", { enumerable:
575
582
  Object.defineProperty(exports, "inferenceFinishReasonSchema", { enumerable: true, get: function () { return streamEvents_1.inferenceFinishReasonSchema; } });
576
583
  Object.defineProperty(exports, "inferenceStreamDoneEventSchema", { enumerable: true, get: function () { return streamEvents_1.inferenceStreamDoneEventSchema; } });
577
584
  Object.defineProperty(exports, "inferenceStreamEventSchema", { enumerable: true, get: function () { return streamEvents_1.inferenceStreamEventSchema; } });
585
+ var realtime_1 = require("./inference/realtime");
586
+ // Realtime sessions: the signed session request, client commands, server events.
587
+ Object.defineProperty(exports, "MAX_REALTIME_AUDIO_FRAME_BASE64_LENGTH", { enumerable: true, get: function () { return realtime_1.MAX_REALTIME_AUDIO_FRAME_BASE64_LENGTH; } });
588
+ Object.defineProperty(exports, "MAX_REALTIME_SESSION_DURATION_MS", { enumerable: true, get: function () { return realtime_1.MAX_REALTIME_SESSION_DURATION_MS; } });
589
+ Object.defineProperty(exports, "MAX_REALTIME_SESSION_AUDIO_BYTES", { enumerable: true, get: function () { return realtime_1.MAX_REALTIME_SESSION_AUDIO_BYTES; } });
590
+ Object.defineProperty(exports, "MAX_REALTIME_RESUME_WINDOW_MS", { enumerable: true, get: function () { return realtime_1.MAX_REALTIME_RESUME_WINDOW_MS; } });
591
+ Object.defineProperty(exports, "realtimeCommandIdSchema", { enumerable: true, get: function () { return realtime_1.realtimeCommandIdSchema; } });
592
+ Object.defineProperty(exports, "realtimeItemIdSchema", { enumerable: true, get: function () { return realtime_1.realtimeItemIdSchema; } });
593
+ Object.defineProperty(exports, "realtimeResponseIdSchema", { enumerable: true, get: function () { return realtime_1.realtimeResponseIdSchema; } });
594
+ Object.defineProperty(exports, "realtimeAudioFormatSchema", { enumerable: true, get: function () { return realtime_1.realtimeAudioFormatSchema; } });
595
+ Object.defineProperty(exports, "realtimeOutputModalitySchema", { enumerable: true, get: function () { return realtime_1.realtimeOutputModalitySchema; } });
596
+ Object.defineProperty(exports, "realtimeTurnDetectionSchema", { enumerable: true, get: function () { return realtime_1.realtimeTurnDetectionSchema; } });
597
+ Object.defineProperty(exports, "realtimeInputTranscriptionSchema", { enumerable: true, get: function () { return realtime_1.realtimeInputTranscriptionSchema; } });
598
+ Object.defineProperty(exports, "realtimeTranslationSchema", { enumerable: true, get: function () { return realtime_1.realtimeTranslationSchema; } });
599
+ Object.defineProperty(exports, "realtimeSessionConfigSchema", { enumerable: true, get: function () { return realtime_1.realtimeSessionConfigSchema; } });
600
+ Object.defineProperty(exports, "realtimeSessionConfigUpdateSchema", { enumerable: true, get: function () { return realtime_1.realtimeSessionConfigUpdateSchema; } });
601
+ Object.defineProperty(exports, "realtimeSessionLimitsSchema", { enumerable: true, get: function () { return realtime_1.realtimeSessionLimitsSchema; } });
602
+ Object.defineProperty(exports, "realtimeClientMetadataSchema", { enumerable: true, get: function () { return realtime_1.realtimeClientMetadataSchema; } });
603
+ Object.defineProperty(exports, "realtimeSessionRequestSchema", { enumerable: true, get: function () { return realtime_1.realtimeSessionRequestSchema; } });
604
+ Object.defineProperty(exports, "realtimeContentPartSchema", { enumerable: true, get: function () { return realtime_1.realtimeContentPartSchema; } });
605
+ Object.defineProperty(exports, "realtimeConversationItemSchema", { enumerable: true, get: function () { return realtime_1.realtimeConversationItemSchema; } });
606
+ Object.defineProperty(exports, "realtimeResponseParametersSchema", { enumerable: true, get: function () { return realtime_1.realtimeResponseParametersSchema; } });
607
+ Object.defineProperty(exports, "realtimeSessionUpdateCommandSchema", { enumerable: true, get: function () { return realtime_1.realtimeSessionUpdateCommandSchema; } });
608
+ Object.defineProperty(exports, "realtimeItemCreateCommandSchema", { enumerable: true, get: function () { return realtime_1.realtimeItemCreateCommandSchema; } });
609
+ Object.defineProperty(exports, "realtimeItemDeleteCommandSchema", { enumerable: true, get: function () { return realtime_1.realtimeItemDeleteCommandSchema; } });
610
+ Object.defineProperty(exports, "realtimeItemTruncateCommandSchema", { enumerable: true, get: function () { return realtime_1.realtimeItemTruncateCommandSchema; } });
611
+ Object.defineProperty(exports, "realtimeInputAudioAppendCommandSchema", { enumerable: true, get: function () { return realtime_1.realtimeInputAudioAppendCommandSchema; } });
612
+ Object.defineProperty(exports, "realtimeInputAudioCommitCommandSchema", { enumerable: true, get: function () { return realtime_1.realtimeInputAudioCommitCommandSchema; } });
613
+ Object.defineProperty(exports, "realtimeInputAudioClearCommandSchema", { enumerable: true, get: function () { return realtime_1.realtimeInputAudioClearCommandSchema; } });
614
+ Object.defineProperty(exports, "realtimeResponseCreateCommandSchema", { enumerable: true, get: function () { return realtime_1.realtimeResponseCreateCommandSchema; } });
615
+ Object.defineProperty(exports, "realtimeResponseCancelCommandSchema", { enumerable: true, get: function () { return realtime_1.realtimeResponseCancelCommandSchema; } });
616
+ Object.defineProperty(exports, "realtimeSessionResumeCommandSchema", { enumerable: true, get: function () { return realtime_1.realtimeSessionResumeCommandSchema; } });
617
+ Object.defineProperty(exports, "realtimeSessionCloseCommandSchema", { enumerable: true, get: function () { return realtime_1.realtimeSessionCloseCommandSchema; } });
618
+ Object.defineProperty(exports, "realtimeClientCommandSchema", { enumerable: true, get: function () { return realtime_1.realtimeClientCommandSchema; } });
619
+ Object.defineProperty(exports, "realtimeSessionCreatedEventSchema", { enumerable: true, get: function () { return realtime_1.realtimeSessionCreatedEventSchema; } });
620
+ Object.defineProperty(exports, "realtimeSessionUpdatedEventSchema", { enumerable: true, get: function () { return realtime_1.realtimeSessionUpdatedEventSchema; } });
621
+ Object.defineProperty(exports, "realtimeSessionResumedEventSchema", { enumerable: true, get: function () { return realtime_1.realtimeSessionResumedEventSchema; } });
622
+ Object.defineProperty(exports, "realtimeCommandAcceptedEventSchema", { enumerable: true, get: function () { return realtime_1.realtimeCommandAcceptedEventSchema; } });
623
+ Object.defineProperty(exports, "realtimeItemAddedEventSchema", { enumerable: true, get: function () { return realtime_1.realtimeItemAddedEventSchema; } });
624
+ Object.defineProperty(exports, "realtimeItemDoneEventSchema", { enumerable: true, get: function () { return realtime_1.realtimeItemDoneEventSchema; } });
625
+ Object.defineProperty(exports, "realtimeItemDeletedEventSchema", { enumerable: true, get: function () { return realtime_1.realtimeItemDeletedEventSchema; } });
626
+ Object.defineProperty(exports, "realtimeItemTruncatedEventSchema", { enumerable: true, get: function () { return realtime_1.realtimeItemTruncatedEventSchema; } });
627
+ Object.defineProperty(exports, "realtimeSpeechStartedEventSchema", { enumerable: true, get: function () { return realtime_1.realtimeSpeechStartedEventSchema; } });
628
+ Object.defineProperty(exports, "realtimeSpeechStoppedEventSchema", { enumerable: true, get: function () { return realtime_1.realtimeSpeechStoppedEventSchema; } });
629
+ Object.defineProperty(exports, "realtimeInputAudioCommittedEventSchema", { enumerable: true, get: function () { return realtime_1.realtimeInputAudioCommittedEventSchema; } });
630
+ Object.defineProperty(exports, "realtimeInputAudioClearedEventSchema", { enumerable: true, get: function () { return realtime_1.realtimeInputAudioClearedEventSchema; } });
631
+ Object.defineProperty(exports, "realtimeResponseCreatedEventSchema", { enumerable: true, get: function () { return realtime_1.realtimeResponseCreatedEventSchema; } });
632
+ Object.defineProperty(exports, "realtimeOutputAudioDeltaEventSchema", { enumerable: true, get: function () { return realtime_1.realtimeOutputAudioDeltaEventSchema; } });
633
+ Object.defineProperty(exports, "realtimeOutputAudioDoneEventSchema", { enumerable: true, get: function () { return realtime_1.realtimeOutputAudioDoneEventSchema; } });
634
+ Object.defineProperty(exports, "realtimeTranscriptSourceSchema", { enumerable: true, get: function () { return realtime_1.realtimeTranscriptSourceSchema; } });
635
+ Object.defineProperty(exports, "realtimeTranscriptDeltaEventSchema", { enumerable: true, get: function () { return realtime_1.realtimeTranscriptDeltaEventSchema; } });
636
+ Object.defineProperty(exports, "realtimeTranscriptDoneEventSchema", { enumerable: true, get: function () { return realtime_1.realtimeTranscriptDoneEventSchema; } });
637
+ Object.defineProperty(exports, "realtimeTextDeltaEventSchema", { enumerable: true, get: function () { return realtime_1.realtimeTextDeltaEventSchema; } });
638
+ Object.defineProperty(exports, "realtimeToolCallEventSchema", { enumerable: true, get: function () { return realtime_1.realtimeToolCallEventSchema; } });
639
+ Object.defineProperty(exports, "realtimeResponseStatusSchema", { enumerable: true, get: function () { return realtime_1.realtimeResponseStatusSchema; } });
640
+ Object.defineProperty(exports, "realtimeResponseDoneEventSchema", { enumerable: true, get: function () { return realtime_1.realtimeResponseDoneEventSchema; } });
641
+ Object.defineProperty(exports, "realtimeErrorEventSchema", { enumerable: true, get: function () { return realtime_1.realtimeErrorEventSchema; } });
642
+ Object.defineProperty(exports, "realtimeSessionCloseReasonSchema", { enumerable: true, get: function () { return realtime_1.realtimeSessionCloseReasonSchema; } });
643
+ Object.defineProperty(exports, "realtimeSessionClosedEventSchema", { enumerable: true, get: function () { return realtime_1.realtimeSessionClosedEventSchema; } });
644
+ Object.defineProperty(exports, "realtimeServerEventSchema", { enumerable: true, get: function () { return realtime_1.realtimeServerEventSchema; } });
578
645
  var usage_1 = require("./inference/usage");
579
646
  // Reserve → settle → refund.
580
647
  Object.defineProperty(exports, "usageReservationRequestSchema", { enumerable: true, get: function () { return usage_1.usageReservationRequestSchema; } });
@@ -703,3 +770,4 @@ __exportStar(require("./linkedAccounts"), exports);
703
770
  __exportStar(require("./federationInstanceFetch"), exports);
704
771
  __exportStar(require("./notifications"), exports);
705
772
  __exportStar(require("./email/messages"), exports);
773
+ __exportStar(require("./stickers"), exports);
@@ -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.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.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,57 @@ 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
+ * The public dialects a request can arrive in — `client.apiFormat` on the
57
+ * envelope, and the list a deployment declares it can execute.
58
+ *
59
+ * Named (contract set 3.2.0) rather than inline on the client metadata so the
60
+ * two uses cannot drift: a capability naming a dialect the envelope cannot
61
+ * carry, or the reverse, would authorize a request no route can serve.
62
+ */
63
+ exports.inferenceApiFormatSchema = zod_1.z.enum([
64
+ 'responses',
65
+ 'chat_completions',
66
+ 'embeddings',
67
+ 'images_generations',
68
+ 'audio_transcriptions',
69
+ 'audio_speech',
70
+ 'rerank',
71
+ 'batches',
72
+ ]);
73
+ /**
74
+ * What a realtime session is FOR. The three are different upstream products
75
+ * with different event families and different metering, not options of one:
76
+ *
77
+ * - `conversation` — a speech-to-speech (or text) model holding a dialogue,
78
+ * with responses, tool calls and interruption.
79
+ * - `transcription` — live speech-to-text; the model never responds, it only
80
+ * transcribes committed input audio.
81
+ * - `translation` — live speech-to-speech translation into one target language.
82
+ */
83
+ exports.realtimeSessionKindSchema = zod_1.z.enum([
84
+ 'conversation',
85
+ 'transcription',
86
+ 'translation',
87
+ ]);
88
+ /**
89
+ * How a realtime session is carried. One member today: a WebSocket, whose every
90
+ * frame is one JSON message (see `realtime.ts`). WebRTC and SIP are separate
91
+ * transports with separate media handling, and are added as members only when a
92
+ * deployment can actually execute them.
93
+ */
94
+ exports.realtimeSessionTransportSchema = zod_1.z.enum(['websocket']);
95
+ /**
96
+ * What a deployment can execute as a realtime session. Present only on a model
97
+ * that holds sessions; absent means it holds none, which is the state of every
98
+ * catalogue written before contract set 3.2.0.
99
+ */
100
+ exports.modelRealtimeCapabilitiesSchema = zod_1.z
101
+ .object({
102
+ transports: zod_1.z.array(exports.realtimeSessionTransportSchema).min(1),
103
+ sessionKinds: zod_1.z.array(exports.realtimeSessionKindSchema).min(1),
104
+ })
105
+ .strict();
55
106
  /**
56
107
  * What a model can do, in the terms a caller has to decide against before
57
108
  * sending a request: can it call tools, does it accept images, will it honour a
@@ -77,8 +128,60 @@ exports.modelCapabilitiesSchema = zod_1.z
77
128
  promptCaching: zod_1.z.boolean(),
78
129
  maxContextTokens: zod_1.z.number().int().positive().safe(),
79
130
  maxOutputTokens: zod_1.z.number().int().positive().safe(),
131
+ /**
132
+ * The request dialects a route to this model can EXECUTE. Modalities say
133
+ * what a model consumes and produces; they do not say which request shape a
134
+ * route can carry, and catalogue presence is not that evidence either — a
135
+ * speech-to-speech model is `audio` in and out and still cannot answer a
136
+ * `/v1/audio/transcriptions` upload. Oxy authorizes a request only when its
137
+ * `client.apiFormat` is listed here.
138
+ *
139
+ * Added in contract set 3.2.0. ABSENT means undeclared — a catalogue from an
140
+ * older producer — never "every format": a consumer then applies the rules it
141
+ * applied before this field existed, and authorizes no format that needs a
142
+ * declaration (audio output on `chat_completions`, a realtime session).
143
+ */
144
+ apiFormats: zod_1.z.array(exports.inferenceApiFormatSchema).min(1).optional(),
145
+ /** Realtime sessions this model holds; absent means none. Contract set 3.2.0. */
146
+ realtime: exports.modelRealtimeCapabilitiesSchema.optional(),
80
147
  })
81
- .strict();
148
+ .strict()
149
+ .superRefine((capabilities, ctx) => {
150
+ const formats = capabilities.apiFormats;
151
+ if (formats !== undefined && new Set(formats).size !== formats.length) {
152
+ ctx.addIssue({
153
+ code: zod_1.z.ZodIssueCode.custom,
154
+ path: ['apiFormats'],
155
+ message: 'each API format is declared at most once',
156
+ });
157
+ }
158
+ const realtime = capabilities.realtime;
159
+ if (realtime === undefined)
160
+ return;
161
+ if (new Set(realtime.sessionKinds).size !== realtime.sessionKinds.length) {
162
+ ctx.addIssue({
163
+ code: zod_1.z.ZodIssueCode.custom,
164
+ path: ['realtime', 'sessionKinds'],
165
+ message: 'each session kind is declared at most once',
166
+ });
167
+ }
168
+ if (new Set(realtime.transports).size !== realtime.transports.length) {
169
+ ctx.addIssue({
170
+ code: zod_1.z.ZodIssueCode.custom,
171
+ path: ['realtime', 'transports'],
172
+ message: 'each transport is declared at most once',
173
+ });
174
+ }
175
+ // A realtime session consumes audio: a model that declares sessions and no
176
+ // audio input is a declaration no session could honour.
177
+ if (!capabilities.inputModalities.includes('audio')) {
178
+ ctx.addIssue({
179
+ code: zod_1.z.ZodIssueCode.custom,
180
+ path: ['realtime'],
181
+ message: 'a model that holds realtime sessions consumes audio',
182
+ });
183
+ }
184
+ });
82
185
  /**
83
186
  * License terms, including the two questions that decide whether Oxy may serve
84
187
  * a model to third parties at all: is commercial use permitted, and must the
@@ -115,6 +115,26 @@ exports.moneySchema = zod_1.z
115
115
  * output_tokens = completion_tokens - completion_tokens_details.reasoning_tokens
116
116
  * ```
117
117
  *
118
+ * **Audio tokens are siblings too** (added in contract set 3.2.0). A model that
119
+ * consumes or produces audio AS TOKENS — OpenAI's audio chat and Realtime
120
+ * models — reports them inside the same totals, and they are priced several
121
+ * times higher than text tokens, so folding them into `input_tokens` would
122
+ * under-charge by exactly the audio. They are subtracted out the same way:
123
+ *
124
+ * ```text
125
+ * cached_audio_input_tokens = prompt_tokens_details.cached_tokens_details.audio_tokens
126
+ * audio_input_tokens = prompt_tokens_details.audio_tokens - cached_audio_input_tokens
127
+ * input_tokens = prompt_tokens - (text AND audio cached) - audio_input_tokens
128
+ * audio_output_tokens = completion_tokens_details.audio_tokens
129
+ * output_tokens = completion_tokens - reasoning_tokens - audio_output_tokens
130
+ * ```
131
+ *
132
+ * `audio_input_milliseconds` and `audio_output_milliseconds` remain the units
133
+ * for audio metered by DURATION (file transcription, speech synthesis). A
134
+ * report carries one reading of a given audio, never both: the same audio
135
+ * reported as tokens and as milliseconds is the double charge this rule exists
136
+ * to prevent.
137
+ *
118
138
  * No refinement in this package can enforce it, and saying so is part of the
119
139
  * rule: a nested report and a disjoint one are the same four non-negative
120
140
  * integers, so no predicate over a single report can tell them apart. The two
@@ -148,6 +168,9 @@ exports.USAGE_UNITS = [
148
168
  'video_milliseconds',
149
169
  'characters',
150
170
  'embeddings',
171
+ 'audio_input_tokens',
172
+ 'cached_audio_input_tokens',
173
+ 'audio_output_tokens',
151
174
  ];
152
175
  exports.usageUnitSchema = zod_1.z.enum(exports.USAGE_UNITS);
153
176
  /**