@ouraihub/aether-contracts 0.0.0-stage → 0.1.1
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/LICENSE +789 -0
- package/package.json +32 -3
- package/src/generated/Ack.ts +10 -0
- package/src/generated/Approval.ts +6 -0
- package/src/generated/ContextRef.ts +14 -0
- package/src/generated/ContextSource.ts +6 -0
- package/src/generated/ContextUsage.ts +27 -0
- package/src/generated/Conversation.ts +16 -0
- package/src/generated/ConversationSummary.ts +30 -0
- package/src/generated/Cost.ts +15 -0
- package/src/generated/Currency.ts +6 -0
- package/src/generated/Details.ts +6 -0
- package/src/generated/EndStatus.ts +6 -0
- package/src/generated/Endpoint.ts +54 -0
- package/src/generated/EndpointKey.ts +34 -0
- package/src/generated/EndpointKeySave.ts +30 -0
- package/src/generated/EndpointSave.ts +45 -0
- package/src/generated/ImagePart.ts +14 -0
- package/src/generated/ImageRef.ts +14 -0
- package/src/generated/IngestBatch.ts +15 -0
- package/src/generated/IngestEntry.ts +19 -0
- package/src/generated/IngestLevel.ts +6 -0
- package/src/generated/IngestReceipt.ts +14 -0
- package/src/generated/IssuedToken.ts +34 -0
- package/src/generated/KeyStrategy.ts +6 -0
- package/src/generated/KitError.ts +21 -0
- package/src/generated/KitErrorCode.ts +6 -0
- package/src/generated/LogEntry.ts +26 -0
- package/src/generated/LogLevel.ts +6 -0
- package/src/generated/LogStatus.ts +15 -0
- package/src/generated/ManualSave.ts +30 -0
- package/src/generated/McpTransport.ts +22 -0
- package/src/generated/Model.ts +58 -0
- package/src/generated/ModelFilter.ts +15 -0
- package/src/generated/ModelOption.ts +44 -0
- package/src/generated/ModelPricing.ts +16 -0
- package/src/generated/ModelRef.ts +14 -0
- package/src/generated/ModelSave.ts +60 -0
- package/src/generated/ModelType.ts +6 -0
- package/src/generated/PermissionMode.ts +7 -0
- package/src/generated/Preview.ts +50 -0
- package/src/generated/PreviewAction.ts +6 -0
- package/src/generated/PreviewCurrent.ts +14 -0
- package/src/generated/PricingTier.ts +26 -0
- package/src/generated/ProbeError.ts +23 -0
- package/src/generated/ProbeErrorKind.ts +6 -0
- package/src/generated/ProbeResult.ts +26 -0
- package/src/generated/ProbeTarget.ts +27 -0
- package/src/generated/ProbedModel.ts +62 -0
- package/src/generated/Protocol.ts +6 -0
- package/src/generated/Provider.ts +31 -0
- package/src/generated/ProviderSave.ts +32 -0
- package/src/generated/ReasoningConfig.ts +20 -0
- package/src/generated/ReasoningDialect.ts +6 -0
- package/src/generated/ReasoningEffort.ts +6 -0
- package/src/generated/RunAccepted.ts +18 -0
- package/src/generated/RunEvent.ts +121 -0
- package/src/generated/RunRequest.ts +84 -0
- package/src/generated/RunSnapshot.ts +36 -0
- package/src/generated/RunStatus.ts +6 -0
- package/src/generated/ScopeState.ts +22 -0
- package/src/generated/SearchHit.ts +18 -0
- package/src/generated/ServerDto.ts +44 -0
- package/src/generated/ServerSave.ts +40 -0
- package/src/generated/ServerSecret.ts +19 -0
- package/src/generated/SkillDto.ts +64 -0
- package/src/generated/SkillFileKind.ts +6 -0
- package/src/generated/SkillFileMeta.ts +19 -0
- package/src/generated/SkillMeta.ts +47 -0
- package/src/generated/SkillOrigin.ts +6 -0
- package/src/generated/SkillRef.ts +14 -0
- package/src/generated/Source.ts +15 -0
- package/src/generated/Status.ts +22 -0
- package/src/generated/TokenRecord.ts +30 -0
- package/src/generated/TokenUsage.ts +26 -0
- package/src/generated/ToolDto.ts +23 -0
- package/src/generated/ToolEffect.ts +6 -0
- package/src/generated/ToolOutcome.ts +6 -0
- package/src/generated/ToolSourceKind.ts +6 -0
- package/src/generated/Turn.ts +84 -0
- package/src/generated/TurnStatus.ts +6 -0
- package/src/generated/TypeSource.ts +6 -0
- package/src/index.ts +82 -0
- package/src/search.ts +50 -0
- package/src/validation.ts +368 -0
- package/src/validators.d.ts +177 -0
- package/src/validators.js +18 -0
- package/README.md +0 -3
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
const runtime0 = function ucs2length(str) {
|
|
2
|
+
const len = str.length;
|
|
3
|
+
let length = 0;
|
|
4
|
+
let pos = 0;
|
|
5
|
+
let value;
|
|
6
|
+
while (pos < len) {
|
|
7
|
+
length++;
|
|
8
|
+
value = str.charCodeAt(pos++);
|
|
9
|
+
if (value >= 0xd800 && value <= 0xdbff && pos < len) {
|
|
10
|
+
// high surrogate, and there is a next character
|
|
11
|
+
value = str.charCodeAt(pos);
|
|
12
|
+
if ((value & 0xfc00) === 0xdc00)
|
|
13
|
+
pos++; // low surrogate
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
return length;
|
|
17
|
+
};
|
|
18
|
+
"use strict";export const validateAck = validate10;const schema11 = {"$id":"aether:validator:Ack","$ref":"https://aether.local/contracts/v1/run.schema.json#/definitions/Ack"};const schema13 = {"type":"object","additionalProperties":false,"required":["ok"],"properties":{"ok":{"const":true}}};function validate10(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="aether:validator:Ack" */;let vErrors = null;let errors = 0;if(data && typeof data == "object" && !Array.isArray(data)){if(data.ok === undefined){const err0 = {instancePath,schemaPath:"https://aether.local/contracts/v1/run.schema.json#/definitions/Ack/required",keyword:"required",params:{missingProperty: "ok"},message:"must have required property '"+"ok"+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}for(const key0 in data){if(!(key0 === "ok")){const err1 = {instancePath,schemaPath:"https://aether.local/contracts/v1/run.schema.json#/definitions/Ack/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}}if(data.ok !== undefined){if(true !== data.ok){const err2 = {instancePath:instancePath+"/ok",schemaPath:"https://aether.local/contracts/v1/run.schema.json#/definitions/Ack/properties/ok/const",keyword:"const",params:{allowedValue: true},message:"must be equal to constant"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}}}else {const err3 = {instancePath,schemaPath:"https://aether.local/contracts/v1/run.schema.json#/definitions/Ack/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}validate10.errors = vErrors;return errors === 0;}export const validateApproval = validate12;const schema14 = {"$id":"aether:validator:Approval","$ref":"https://aether.local/contracts/v1/common.schema.json#/definitions/Approval"};const schema16 = {"enum":["auto","ask","deny"]};function validate12(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="aether:validator:Approval" */;let vErrors = null;let errors = 0;if(!(((data === "auto") || (data === "ask")) || (data === "deny"))){const err0 = {instancePath,schemaPath:"https://aether.local/contracts/v1/common.schema.json#/definitions/Approval/enum",keyword:"enum",params:{allowedValues: schema16.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}validate12.errors = vErrors;return errors === 0;}export const validateContextRef = validate14;const schema17 = {"$id":"aether:validator:ContextRef","$ref":"https://aether.local/contracts/v1/common.schema.json#/definitions/ContextRef"};const schema18 = {"type":"object","additionalProperties":false,"required":["kind","id"],"properties":{"kind":{"type":"string"},"id":{"type":"string"}}};function validate14(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="aether:validator:ContextRef" */;let vErrors = null;let errors = 0;if(data && typeof data == "object" && !Array.isArray(data)){if(data.kind === undefined){const err0 = {instancePath,schemaPath:"https://aether.local/contracts/v1/common.schema.json#/definitions/ContextRef/required",keyword:"required",params:{missingProperty: "kind"},message:"must have required property '"+"kind"+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}if(data.id === undefined){const err1 = {instancePath,schemaPath:"https://aether.local/contracts/v1/common.schema.json#/definitions/ContextRef/required",keyword:"required",params:{missingProperty: "id"},message:"must have required property '"+"id"+"'"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}for(const key0 in data){if(!((key0 === "kind") || (key0 === "id"))){const err2 = {instancePath,schemaPath:"https://aether.local/contracts/v1/common.schema.json#/definitions/ContextRef/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}}if(data.kind !== undefined){if(typeof data.kind !== "string"){const err3 = {instancePath:instancePath+"/kind",schemaPath:"https://aether.local/contracts/v1/common.schema.json#/definitions/ContextRef/properties/kind/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}}if(data.id !== undefined){if(typeof data.id !== "string"){const err4 = {instancePath:instancePath+"/id",schemaPath:"https://aether.local/contracts/v1/common.schema.json#/definitions/ContextRef/properties/id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}}}else {const err5 = {instancePath,schemaPath:"https://aether.local/contracts/v1/common.schema.json#/definitions/ContextRef/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}validate14.errors = vErrors;return errors === 0;}export const validateContextSource = validate15;const schema19 = {"$id":"aether:validator:ContextSource","$ref":"https://aether.local/contracts/v1/common.schema.json#/definitions/ContextSource"};const schema20 = {"enum":["reported","estimated","unknown"]};function validate15(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="aether:validator:ContextSource" */;let vErrors = null;let errors = 0;if(!(((data === "reported") || (data === "estimated")) || (data === "unknown"))){const err0 = {instancePath,schemaPath:"https://aether.local/contracts/v1/common.schema.json#/definitions/ContextSource/enum",keyword:"enum",params:{allowedValues: schema20.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}validate15.errors = vErrors;return errors === 0;}export const validateContextUsage = validate16;const schema21 = {"$id":"aether:validator:ContextUsage","$ref":"https://aether.local/contracts/v1/common.schema.json#/definitions/ContextUsage"};const schema22 = {"type":"object","additionalProperties":false,"required":["tokens","contextWindow","source","endpointId","modelId"],"properties":{"tokens":{"$ref":"#/definitions/TokenCount"},"contextWindow":{"$ref":"#/definitions/TokenCount"},"source":{"$ref":"#/definitions/ContextSource"},"endpointId":{"type":["string","null"]},"modelId":{"type":["string","null"]}}};const schema23 = {"anyOf":[{"$ref":"#/definitions/U32"},{"type":"null"}]};const schema24 = {"type":"integer","minimum":0,"maximum":4294967295};function validate18(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;const _errs0 = errors;let valid0 = false;const _errs1 = errors;if(!(((typeof data == "number") && (!(data % 1) && !isNaN(data))) && (isFinite(data)))){const err0 = {instancePath,schemaPath:"#/definitions/U32/type",keyword:"type",params:{type: "integer"},message:"must be integer"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}if((typeof data == "number") && (isFinite(data))){if(data > 4294967295 || isNaN(data)){const err1 = {instancePath,schemaPath:"#/definitions/U32/maximum",keyword:"maximum",params:{comparison: "<=", limit: 4294967295},message:"must be <= 4294967295"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}if(data < 0 || isNaN(data)){const err2 = {instancePath,schemaPath:"#/definitions/U32/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}}var _valid0 = _errs1 === errors;valid0 = valid0 || _valid0;if(!valid0){const _errs4 = errors;if(data !== null){const err3 = {instancePath,schemaPath:"#/anyOf/1/type",keyword:"type",params:{type: "null"},message:"must be null"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}var _valid0 = _errs4 === errors;valid0 = valid0 || _valid0;}if(!valid0){const err4 = {instancePath,schemaPath:"#/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}else {errors = _errs0;if(vErrors !== null){if(_errs0){vErrors.length = _errs0;}else {vErrors = null;}}}validate18.errors = vErrors;return errors === 0;}function validate17(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;if(data && typeof data == "object" && !Array.isArray(data)){if(data.tokens === undefined){const err0 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "tokens"},message:"must have required property '"+"tokens"+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}if(data.contextWindow === undefined){const err1 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "contextWindow"},message:"must have required property '"+"contextWindow"+"'"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}if(data.source === undefined){const err2 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "source"},message:"must have required property '"+"source"+"'"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}if(data.endpointId === undefined){const err3 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "endpointId"},message:"must have required property '"+"endpointId"+"'"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}if(data.modelId === undefined){const err4 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "modelId"},message:"must have required property '"+"modelId"+"'"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}for(const key0 in data){if(!(((((key0 === "tokens") || (key0 === "contextWindow")) || (key0 === "source")) || (key0 === "endpointId")) || (key0 === "modelId"))){const err5 = {instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}}if(data.tokens !== undefined){if(!(validate18(data.tokens, {instancePath:instancePath+"/tokens",parentData:data,parentDataProperty:"tokens",rootData}))){vErrors = vErrors === null ? validate18.errors : vErrors.concat(validate18.errors);errors = vErrors.length;}}if(data.contextWindow !== undefined){if(!(validate18(data.contextWindow, {instancePath:instancePath+"/contextWindow",parentData:data,parentDataProperty:"contextWindow",rootData}))){vErrors = vErrors === null ? validate18.errors : vErrors.concat(validate18.errors);errors = vErrors.length;}}if(data.source !== undefined){let data2 = data.source;if(!(((data2 === "reported") || (data2 === "estimated")) || (data2 === "unknown"))){const err6 = {instancePath:instancePath+"/source",schemaPath:"#/definitions/ContextSource/enum",keyword:"enum",params:{allowedValues: schema20.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}}if(data.endpointId !== undefined){let data3 = data.endpointId;if((typeof data3 !== "string") && (data3 !== null)){const err7 = {instancePath:instancePath+"/endpointId",schemaPath:"#/properties/endpointId/type",keyword:"type",params:{type: schema22.properties.endpointId.type},message:"must be string,null"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}}if(data.modelId !== undefined){let data4 = data.modelId;if((typeof data4 !== "string") && (data4 !== null)){const err8 = {instancePath:instancePath+"/modelId",schemaPath:"#/properties/modelId/type",keyword:"type",params:{type: schema22.properties.modelId.type},message:"must be string,null"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}}}else {const err9 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}validate17.errors = vErrors;return errors === 0;}function validate16(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="aether:validator:ContextUsage" */;let vErrors = null;let errors = 0;if(!(validate17(data, {instancePath,parentData,parentDataProperty,rootData}))){vErrors = vErrors === null ? validate17.errors : vErrors.concat(validate17.errors);errors = vErrors.length;}validate16.errors = vErrors;return errors === 0;}export const validateConversation = validate22;const schema26 = {"$id":"aether:validator:Conversation","$ref":"https://aether.local/contracts/v1/conversation.schema.json#/definitions/Conversation"};const schema28 = {"type":"object","additionalProperties":false,"required":["summary","turns"],"properties":{"summary":{"$ref":"#/definitions/ConversationSummary"},"turns":{"type":"array","items":{"$ref":"#/definitions/Turn"}}}};const schema29 = {"type":"object","additionalProperties":false,"required":["id","title","scope","selectedTurnId","createdAt","updatedAt"],"properties":{"id":{"$ref":"common.schema.json#/definitions/Id"},"title":{"type":"string","maxLength":200},"scope":{"type":["string","null"],"maxLength":200},"selectedTurnId":{"$ref":"common.schema.json#/definitions/NullableId"},"createdAt":{"$ref":"common.schema.json#/definitions/Timestamp"},"updatedAt":{"$ref":"common.schema.json#/definitions/Timestamp"}}};const schema30 = {"type":"string","minLength":1,"maxLength":128};const schema33 = {"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991};const func2 = runtime0;const schema31 = {"anyOf":[{"$ref":"#/definitions/Id"},{"type":"null"}]};function validate26(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;const _errs0 = errors;let valid0 = false;const _errs1 = errors;if(typeof data === "string"){if(func2(data) > 128){const err0 = {instancePath,schemaPath:"#/definitions/Id/maxLength",keyword:"maxLength",params:{limit: 128},message:"must NOT have more than 128 characters"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}if(func2(data) < 1){const err1 = {instancePath,schemaPath:"#/definitions/Id/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}}else {const err2 = {instancePath,schemaPath:"#/definitions/Id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}var _valid0 = _errs1 === errors;valid0 = valid0 || _valid0;if(!valid0){const _errs4 = errors;if(data !== null){const err3 = {instancePath,schemaPath:"#/anyOf/1/type",keyword:"type",params:{type: "null"},message:"must be null"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}var _valid0 = _errs4 === errors;valid0 = valid0 || _valid0;}if(!valid0){const err4 = {instancePath,schemaPath:"#/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}else {errors = _errs0;if(vErrors !== null){if(_errs0){vErrors.length = _errs0;}else {vErrors = null;}}}validate26.errors = vErrors;return errors === 0;}function validate25(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;if(data && typeof data == "object" && !Array.isArray(data)){if(data.id === undefined){const err0 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "id"},message:"must have required property '"+"id"+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}if(data.title === undefined){const err1 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "title"},message:"must have required property '"+"title"+"'"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}if(data.scope === undefined){const err2 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "scope"},message:"must have required property '"+"scope"+"'"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}if(data.selectedTurnId === undefined){const err3 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "selectedTurnId"},message:"must have required property '"+"selectedTurnId"+"'"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}if(data.createdAt === undefined){const err4 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "createdAt"},message:"must have required property '"+"createdAt"+"'"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}if(data.updatedAt === undefined){const err5 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "updatedAt"},message:"must have required property '"+"updatedAt"+"'"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}for(const key0 in data){if(!((((((key0 === "id") || (key0 === "title")) || (key0 === "scope")) || (key0 === "selectedTurnId")) || (key0 === "createdAt")) || (key0 === "updatedAt"))){const err6 = {instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}}if(data.id !== undefined){let data0 = data.id;if(typeof data0 === "string"){if(func2(data0) > 128){const err7 = {instancePath:instancePath+"/id",schemaPath:"common.schema.json#/definitions/Id/maxLength",keyword:"maxLength",params:{limit: 128},message:"must NOT have more than 128 characters"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}if(func2(data0) < 1){const err8 = {instancePath:instancePath+"/id",schemaPath:"common.schema.json#/definitions/Id/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}}else {const err9 = {instancePath:instancePath+"/id",schemaPath:"common.schema.json#/definitions/Id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}}if(data.title !== undefined){let data1 = data.title;if(typeof data1 === "string"){if(func2(data1) > 200){const err10 = {instancePath:instancePath+"/title",schemaPath:"#/properties/title/maxLength",keyword:"maxLength",params:{limit: 200},message:"must NOT have more than 200 characters"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}}else {const err11 = {instancePath:instancePath+"/title",schemaPath:"#/properties/title/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}}if(data.scope !== undefined){let data2 = data.scope;if((typeof data2 !== "string") && (data2 !== null)){const err12 = {instancePath:instancePath+"/scope",schemaPath:"#/properties/scope/type",keyword:"type",params:{type: schema29.properties.scope.type},message:"must be string,null"};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}if(typeof data2 === "string"){if(func2(data2) > 200){const err13 = {instancePath:instancePath+"/scope",schemaPath:"#/properties/scope/maxLength",keyword:"maxLength",params:{limit: 200},message:"must NOT have more than 200 characters"};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}}}if(data.selectedTurnId !== undefined){if(!(validate26(data.selectedTurnId, {instancePath:instancePath+"/selectedTurnId",parentData:data,parentDataProperty:"selectedTurnId",rootData}))){vErrors = vErrors === null ? validate26.errors : vErrors.concat(validate26.errors);errors = vErrors.length;}}if(data.createdAt !== undefined){let data4 = data.createdAt;if(!(((typeof data4 == "number") && (!(data4 % 1) && !isNaN(data4))) && (isFinite(data4)))){const err14 = {instancePath:instancePath+"/createdAt",schemaPath:"common.schema.json#/definitions/Timestamp/type",keyword:"type",params:{type: "integer"},message:"must be integer"};if(vErrors === null){vErrors = [err14];}else {vErrors.push(err14);}errors++;}if((typeof data4 == "number") && (isFinite(data4))){if(data4 > 9007199254740991 || isNaN(data4)){const err15 = {instancePath:instancePath+"/createdAt",schemaPath:"common.schema.json#/definitions/Timestamp/maximum",keyword:"maximum",params:{comparison: "<=", limit: 9007199254740991},message:"must be <= 9007199254740991"};if(vErrors === null){vErrors = [err15];}else {vErrors.push(err15);}errors++;}if(data4 < -9007199254740991 || isNaN(data4)){const err16 = {instancePath:instancePath+"/createdAt",schemaPath:"common.schema.json#/definitions/Timestamp/minimum",keyword:"minimum",params:{comparison: ">=", limit: -9007199254740991},message:"must be >= -9007199254740991"};if(vErrors === null){vErrors = [err16];}else {vErrors.push(err16);}errors++;}}}if(data.updatedAt !== undefined){let data5 = data.updatedAt;if(!(((typeof data5 == "number") && (!(data5 % 1) && !isNaN(data5))) && (isFinite(data5)))){const err17 = {instancePath:instancePath+"/updatedAt",schemaPath:"common.schema.json#/definitions/Timestamp/type",keyword:"type",params:{type: "integer"},message:"must be integer"};if(vErrors === null){vErrors = [err17];}else {vErrors.push(err17);}errors++;}if((typeof data5 == "number") && (isFinite(data5))){if(data5 > 9007199254740991 || isNaN(data5)){const err18 = {instancePath:instancePath+"/updatedAt",schemaPath:"common.schema.json#/definitions/Timestamp/maximum",keyword:"maximum",params:{comparison: "<=", limit: 9007199254740991},message:"must be <= 9007199254740991"};if(vErrors === null){vErrors = [err18];}else {vErrors.push(err18);}errors++;}if(data5 < -9007199254740991 || isNaN(data5)){const err19 = {instancePath:instancePath+"/updatedAt",schemaPath:"common.schema.json#/definitions/Timestamp/minimum",keyword:"minimum",params:{comparison: ">=", limit: -9007199254740991},message:"must be >= -9007199254740991"};if(vErrors === null){vErrors = [err19];}else {vErrors.push(err19);}errors++;}}}}else {const err20 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err20];}else {vErrors.push(err20);}errors++;}validate25.errors = vErrors;return errors === 0;}const schema35 = {"type":"object","additionalProperties":false,"required":["id","parentId","questionId","supersedesId","kind","status","input","text","modelId","endpointId","errorCode","reasoningText","images","generated"],"properties":{"id":{"$ref":"common.schema.json#/definitions/Id"},"parentId":{"$ref":"common.schema.json#/definitions/NullableId"},"questionId":{"$ref":"common.schema.json#/definitions/Id"},"supersedesId":{"$ref":"common.schema.json#/definitions/NullableId"},"kind":{"enum":["reply","translation"]},"status":{"$ref":"#/definitions/TurnStatus"},"input":{"type":"string","maxLength":100000},"text":{"type":"string"},"modelId":{"type":["string","null"]},"endpointId":{"type":["string","null"]},"errorCode":{"type":["string","null"]},"usage":{"anyOf":[{"$ref":"common.schema.json#/definitions/TokenUsage"},{"type":"null"}]},"contextUsage":{"anyOf":[{"$ref":"common.schema.json#/definitions/ContextUsage"},{"type":"null"}]},"reasoningEffort":{"anyOf":[{"$ref":"common.schema.json#/definitions/ReasoningEffort"},{"type":"null"}]},"cost":{"anyOf":[{"$ref":"common.schema.json#/definitions/Cost"},{"type":"null"}]},"reasoningText":{"type":["string","null"]},"images":{"type":"array","items":{"$ref":"common.schema.json#/definitions/ImageRef"}},"generated":{"type":"array","items":{"$ref":"common.schema.json#/definitions/ImageRef"}}}};const schema38 = {"enum":["running","completed","failed","cancelled"]};const schema42 = {"enum":["default","none","auto","minimal","low","medium","high","xhigh","max"]};const func8 = Object.prototype.hasOwnProperty;const schema39 = {"type":"object","additionalProperties":false,"required":["inputTokens","outputTokens","cacheReadTokens","cacheWriteTokens","reasoningTokens"],"properties":{"inputTokens":{"$ref":"#/definitions/TokenCount"},"outputTokens":{"$ref":"#/definitions/TokenCount"},"cacheReadTokens":{"$ref":"#/definitions/TokenCount"},"cacheWriteTokens":{"$ref":"#/definitions/TokenCount"},"reasoningTokens":{"$ref":"#/definitions/TokenCount"}}};function validate32(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;if(data && typeof data == "object" && !Array.isArray(data)){if(data.inputTokens === undefined){const err0 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "inputTokens"},message:"must have required property '"+"inputTokens"+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}if(data.outputTokens === undefined){const err1 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "outputTokens"},message:"must have required property '"+"outputTokens"+"'"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}if(data.cacheReadTokens === undefined){const err2 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "cacheReadTokens"},message:"must have required property '"+"cacheReadTokens"+"'"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}if(data.cacheWriteTokens === undefined){const err3 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "cacheWriteTokens"},message:"must have required property '"+"cacheWriteTokens"+"'"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}if(data.reasoningTokens === undefined){const err4 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "reasoningTokens"},message:"must have required property '"+"reasoningTokens"+"'"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}for(const key0 in data){if(!(((((key0 === "inputTokens") || (key0 === "outputTokens")) || (key0 === "cacheReadTokens")) || (key0 === "cacheWriteTokens")) || (key0 === "reasoningTokens"))){const err5 = {instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}}if(data.inputTokens !== undefined){if(!(validate18(data.inputTokens, {instancePath:instancePath+"/inputTokens",parentData:data,parentDataProperty:"inputTokens",rootData}))){vErrors = vErrors === null ? validate18.errors : vErrors.concat(validate18.errors);errors = vErrors.length;}}if(data.outputTokens !== undefined){if(!(validate18(data.outputTokens, {instancePath:instancePath+"/outputTokens",parentData:data,parentDataProperty:"outputTokens",rootData}))){vErrors = vErrors === null ? validate18.errors : vErrors.concat(validate18.errors);errors = vErrors.length;}}if(data.cacheReadTokens !== undefined){if(!(validate18(data.cacheReadTokens, {instancePath:instancePath+"/cacheReadTokens",parentData:data,parentDataProperty:"cacheReadTokens",rootData}))){vErrors = vErrors === null ? validate18.errors : vErrors.concat(validate18.errors);errors = vErrors.length;}}if(data.cacheWriteTokens !== undefined){if(!(validate18(data.cacheWriteTokens, {instancePath:instancePath+"/cacheWriteTokens",parentData:data,parentDataProperty:"cacheWriteTokens",rootData}))){vErrors = vErrors === null ? validate18.errors : vErrors.concat(validate18.errors);errors = vErrors.length;}}if(data.reasoningTokens !== undefined){if(!(validate18(data.reasoningTokens, {instancePath:instancePath+"/reasoningTokens",parentData:data,parentDataProperty:"reasoningTokens",rootData}))){vErrors = vErrors === null ? validate18.errors : vErrors.concat(validate18.errors);errors = vErrors.length;}}}else {const err6 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}validate32.errors = vErrors;return errors === 0;}function validate39(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;if(data && typeof data == "object" && !Array.isArray(data)){if(data.tokens === undefined){const err0 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "tokens"},message:"must have required property '"+"tokens"+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}if(data.contextWindow === undefined){const err1 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "contextWindow"},message:"must have required property '"+"contextWindow"+"'"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}if(data.source === undefined){const err2 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "source"},message:"must have required property '"+"source"+"'"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}if(data.endpointId === undefined){const err3 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "endpointId"},message:"must have required property '"+"endpointId"+"'"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}if(data.modelId === undefined){const err4 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "modelId"},message:"must have required property '"+"modelId"+"'"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}for(const key0 in data){if(!(((((key0 === "tokens") || (key0 === "contextWindow")) || (key0 === "source")) || (key0 === "endpointId")) || (key0 === "modelId"))){const err5 = {instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}}if(data.tokens !== undefined){if(!(validate18(data.tokens, {instancePath:instancePath+"/tokens",parentData:data,parentDataProperty:"tokens",rootData}))){vErrors = vErrors === null ? validate18.errors : vErrors.concat(validate18.errors);errors = vErrors.length;}}if(data.contextWindow !== undefined){if(!(validate18(data.contextWindow, {instancePath:instancePath+"/contextWindow",parentData:data,parentDataProperty:"contextWindow",rootData}))){vErrors = vErrors === null ? validate18.errors : vErrors.concat(validate18.errors);errors = vErrors.length;}}if(data.source !== undefined){let data2 = data.source;if(!(((data2 === "reported") || (data2 === "estimated")) || (data2 === "unknown"))){const err6 = {instancePath:instancePath+"/source",schemaPath:"#/definitions/ContextSource/enum",keyword:"enum",params:{allowedValues: schema20.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}}if(data.endpointId !== undefined){let data3 = data.endpointId;if((typeof data3 !== "string") && (data3 !== null)){const err7 = {instancePath:instancePath+"/endpointId",schemaPath:"#/properties/endpointId/type",keyword:"type",params:{type: schema22.properties.endpointId.type},message:"must be string,null"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}}if(data.modelId !== undefined){let data4 = data.modelId;if((typeof data4 !== "string") && (data4 !== null)){const err8 = {instancePath:instancePath+"/modelId",schemaPath:"#/properties/modelId/type",keyword:"type",params:{type: schema22.properties.modelId.type},message:"must be string,null"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}}}else {const err9 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}validate39.errors = vErrors;return errors === 0;}const schema43 = {"type":"object","additionalProperties":false,"required":["amount","currency"],"properties":{"amount":{"type":"number","minimum":0},"currency":{"$ref":"#/definitions/Currency"}}};const schema44 = {"enum":["USD","CNY"]};function validate43(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;if(data && typeof data == "object" && !Array.isArray(data)){if(data.amount === undefined){const err0 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "amount"},message:"must have required property '"+"amount"+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}if(data.currency === undefined){const err1 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "currency"},message:"must have required property '"+"currency"+"'"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}for(const key0 in data){if(!((key0 === "amount") || (key0 === "currency"))){const err2 = {instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}}if(data.amount !== undefined){let data0 = data.amount;if((typeof data0 == "number") && (isFinite(data0))){if(data0 < 0 || isNaN(data0)){const err3 = {instancePath:instancePath+"/amount",schemaPath:"#/properties/amount/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}}else {const err4 = {instancePath:instancePath+"/amount",schemaPath:"#/properties/amount/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}}if(data.currency !== undefined){let data1 = data.currency;if(!((data1 === "USD") || (data1 === "CNY"))){const err5 = {instancePath:instancePath+"/currency",schemaPath:"#/definitions/Currency/enum",keyword:"enum",params:{allowedValues: schema44.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}}}else {const err6 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}validate43.errors = vErrors;return errors === 0;}const schema45 = {"type":"object","additionalProperties":false,"required":["mime","url"],"properties":{"mime":{"$ref":"#/definitions/ImageMime"},"url":{"type":["string","null"]}}};const schema46 = {"enum":["image/png","image/jpeg","image/webp","image/gif"]};function validate45(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;if(data && typeof data == "object" && !Array.isArray(data)){if(data.mime === undefined){const err0 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "mime"},message:"must have required property '"+"mime"+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}if(data.url === undefined){const err1 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "url"},message:"must have required property '"+"url"+"'"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}for(const key0 in data){if(!((key0 === "mime") || (key0 === "url"))){const err2 = {instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}}if(data.mime !== undefined){let data0 = data.mime;if(!((((data0 === "image/png") || (data0 === "image/jpeg")) || (data0 === "image/webp")) || (data0 === "image/gif"))){const err3 = {instancePath:instancePath+"/mime",schemaPath:"#/definitions/ImageMime/enum",keyword:"enum",params:{allowedValues: schema46.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}}if(data.url !== undefined){let data1 = data.url;if((typeof data1 !== "string") && (data1 !== null)){const err4 = {instancePath:instancePath+"/url",schemaPath:"#/properties/url/type",keyword:"type",params:{type: schema45.properties.url.type},message:"must be string,null"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}}}else {const err5 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}validate45.errors = vErrors;return errors === 0;}function validate29(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;if(data && typeof data == "object" && !Array.isArray(data)){if(data.id === undefined){const err0 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "id"},message:"must have required property '"+"id"+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}if(data.parentId === undefined){const err1 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "parentId"},message:"must have required property '"+"parentId"+"'"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}if(data.questionId === undefined){const err2 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "questionId"},message:"must have required property '"+"questionId"+"'"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}if(data.supersedesId === undefined){const err3 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "supersedesId"},message:"must have required property '"+"supersedesId"+"'"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}if(data.kind === undefined){const err4 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "kind"},message:"must have required property '"+"kind"+"'"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}if(data.status === undefined){const err5 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "status"},message:"must have required property '"+"status"+"'"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}if(data.input === undefined){const err6 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "input"},message:"must have required property '"+"input"+"'"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}if(data.text === undefined){const err7 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "text"},message:"must have required property '"+"text"+"'"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}if(data.modelId === undefined){const err8 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "modelId"},message:"must have required property '"+"modelId"+"'"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}if(data.endpointId === undefined){const err9 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "endpointId"},message:"must have required property '"+"endpointId"+"'"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}if(data.errorCode === undefined){const err10 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "errorCode"},message:"must have required property '"+"errorCode"+"'"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}if(data.reasoningText === undefined){const err11 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "reasoningText"},message:"must have required property '"+"reasoningText"+"'"};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}if(data.images === undefined){const err12 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "images"},message:"must have required property '"+"images"+"'"};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}if(data.generated === undefined){const err13 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "generated"},message:"must have required property '"+"generated"+"'"};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}for(const key0 in data){if(!(func8.call(schema35.properties, key0))){const err14 = {instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err14];}else {vErrors.push(err14);}errors++;}}if(data.id !== undefined){let data0 = data.id;if(typeof data0 === "string"){if(func2(data0) > 128){const err15 = {instancePath:instancePath+"/id",schemaPath:"common.schema.json#/definitions/Id/maxLength",keyword:"maxLength",params:{limit: 128},message:"must NOT have more than 128 characters"};if(vErrors === null){vErrors = [err15];}else {vErrors.push(err15);}errors++;}if(func2(data0) < 1){const err16 = {instancePath:instancePath+"/id",schemaPath:"common.schema.json#/definitions/Id/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};if(vErrors === null){vErrors = [err16];}else {vErrors.push(err16);}errors++;}}else {const err17 = {instancePath:instancePath+"/id",schemaPath:"common.schema.json#/definitions/Id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err17];}else {vErrors.push(err17);}errors++;}}if(data.parentId !== undefined){if(!(validate26(data.parentId, {instancePath:instancePath+"/parentId",parentData:data,parentDataProperty:"parentId",rootData}))){vErrors = vErrors === null ? validate26.errors : vErrors.concat(validate26.errors);errors = vErrors.length;}}if(data.questionId !== undefined){let data2 = data.questionId;if(typeof data2 === "string"){if(func2(data2) > 128){const err18 = {instancePath:instancePath+"/questionId",schemaPath:"common.schema.json#/definitions/Id/maxLength",keyword:"maxLength",params:{limit: 128},message:"must NOT have more than 128 characters"};if(vErrors === null){vErrors = [err18];}else {vErrors.push(err18);}errors++;}if(func2(data2) < 1){const err19 = {instancePath:instancePath+"/questionId",schemaPath:"common.schema.json#/definitions/Id/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};if(vErrors === null){vErrors = [err19];}else {vErrors.push(err19);}errors++;}}else {const err20 = {instancePath:instancePath+"/questionId",schemaPath:"common.schema.json#/definitions/Id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err20];}else {vErrors.push(err20);}errors++;}}if(data.supersedesId !== undefined){if(!(validate26(data.supersedesId, {instancePath:instancePath+"/supersedesId",parentData:data,parentDataProperty:"supersedesId",rootData}))){vErrors = vErrors === null ? validate26.errors : vErrors.concat(validate26.errors);errors = vErrors.length;}}if(data.kind !== undefined){let data4 = data.kind;if(!((data4 === "reply") || (data4 === "translation"))){const err21 = {instancePath:instancePath+"/kind",schemaPath:"#/properties/kind/enum",keyword:"enum",params:{allowedValues: schema35.properties.kind.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err21];}else {vErrors.push(err21);}errors++;}}if(data.status !== undefined){let data5 = data.status;if(!((((data5 === "running") || (data5 === "completed")) || (data5 === "failed")) || (data5 === "cancelled"))){const err22 = {instancePath:instancePath+"/status",schemaPath:"#/definitions/TurnStatus/enum",keyword:"enum",params:{allowedValues: schema38.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err22];}else {vErrors.push(err22);}errors++;}}if(data.input !== undefined){let data6 = data.input;if(typeof data6 === "string"){if(func2(data6) > 100000){const err23 = {instancePath:instancePath+"/input",schemaPath:"#/properties/input/maxLength",keyword:"maxLength",params:{limit: 100000},message:"must NOT have more than 100000 characters"};if(vErrors === null){vErrors = [err23];}else {vErrors.push(err23);}errors++;}}else {const err24 = {instancePath:instancePath+"/input",schemaPath:"#/properties/input/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err24];}else {vErrors.push(err24);}errors++;}}if(data.text !== undefined){if(typeof data.text !== "string"){const err25 = {instancePath:instancePath+"/text",schemaPath:"#/properties/text/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err25];}else {vErrors.push(err25);}errors++;}}if(data.modelId !== undefined){let data8 = data.modelId;if((typeof data8 !== "string") && (data8 !== null)){const err26 = {instancePath:instancePath+"/modelId",schemaPath:"#/properties/modelId/type",keyword:"type",params:{type: schema35.properties.modelId.type},message:"must be string,null"};if(vErrors === null){vErrors = [err26];}else {vErrors.push(err26);}errors++;}}if(data.endpointId !== undefined){let data9 = data.endpointId;if((typeof data9 !== "string") && (data9 !== null)){const err27 = {instancePath:instancePath+"/endpointId",schemaPath:"#/properties/endpointId/type",keyword:"type",params:{type: schema35.properties.endpointId.type},message:"must be string,null"};if(vErrors === null){vErrors = [err27];}else {vErrors.push(err27);}errors++;}}if(data.errorCode !== undefined){let data10 = data.errorCode;if((typeof data10 !== "string") && (data10 !== null)){const err28 = {instancePath:instancePath+"/errorCode",schemaPath:"#/properties/errorCode/type",keyword:"type",params:{type: schema35.properties.errorCode.type},message:"must be string,null"};if(vErrors === null){vErrors = [err28];}else {vErrors.push(err28);}errors++;}}if(data.usage !== undefined){let data11 = data.usage;const _errs24 = errors;let valid4 = false;const _errs25 = errors;if(!(validate32(data11, {instancePath:instancePath+"/usage",parentData:data,parentDataProperty:"usage",rootData}))){vErrors = vErrors === null ? validate32.errors : vErrors.concat(validate32.errors);errors = vErrors.length;}var _valid0 = _errs25 === errors;valid4 = valid4 || _valid0;if(!valid4){const _errs26 = errors;if(data11 !== null){const err29 = {instancePath:instancePath+"/usage",schemaPath:"#/properties/usage/anyOf/1/type",keyword:"type",params:{type: "null"},message:"must be null"};if(vErrors === null){vErrors = [err29];}else {vErrors.push(err29);}errors++;}var _valid0 = _errs26 === errors;valid4 = valid4 || _valid0;}if(!valid4){const err30 = {instancePath:instancePath+"/usage",schemaPath:"#/properties/usage/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err30];}else {vErrors.push(err30);}errors++;}else {errors = _errs24;if(vErrors !== null){if(_errs24){vErrors.length = _errs24;}else {vErrors = null;}}}}if(data.contextUsage !== undefined){let data12 = data.contextUsage;const _errs29 = errors;let valid5 = false;const _errs30 = errors;if(!(validate39(data12, {instancePath:instancePath+"/contextUsage",parentData:data,parentDataProperty:"contextUsage",rootData}))){vErrors = vErrors === null ? validate39.errors : vErrors.concat(validate39.errors);errors = vErrors.length;}var _valid1 = _errs30 === errors;valid5 = valid5 || _valid1;if(!valid5){const _errs31 = errors;if(data12 !== null){const err31 = {instancePath:instancePath+"/contextUsage",schemaPath:"#/properties/contextUsage/anyOf/1/type",keyword:"type",params:{type: "null"},message:"must be null"};if(vErrors === null){vErrors = [err31];}else {vErrors.push(err31);}errors++;}var _valid1 = _errs31 === errors;valid5 = valid5 || _valid1;}if(!valid5){const err32 = {instancePath:instancePath+"/contextUsage",schemaPath:"#/properties/contextUsage/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err32];}else {vErrors.push(err32);}errors++;}else {errors = _errs29;if(vErrors !== null){if(_errs29){vErrors.length = _errs29;}else {vErrors = null;}}}}if(data.reasoningEffort !== undefined){let data13 = data.reasoningEffort;const _errs34 = errors;let valid6 = false;const _errs35 = errors;if(!(((((((((data13 === "default") || (data13 === "none")) || (data13 === "auto")) || (data13 === "minimal")) || (data13 === "low")) || (data13 === "medium")) || (data13 === "high")) || (data13 === "xhigh")) || (data13 === "max"))){const err33 = {instancePath:instancePath+"/reasoningEffort",schemaPath:"common.schema.json#/definitions/ReasoningEffort/enum",keyword:"enum",params:{allowedValues: schema42.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err33];}else {vErrors.push(err33);}errors++;}var _valid2 = _errs35 === errors;valid6 = valid6 || _valid2;if(!valid6){const _errs37 = errors;if(data13 !== null){const err34 = {instancePath:instancePath+"/reasoningEffort",schemaPath:"#/properties/reasoningEffort/anyOf/1/type",keyword:"type",params:{type: "null"},message:"must be null"};if(vErrors === null){vErrors = [err34];}else {vErrors.push(err34);}errors++;}var _valid2 = _errs37 === errors;valid6 = valid6 || _valid2;}if(!valid6){const err35 = {instancePath:instancePath+"/reasoningEffort",schemaPath:"#/properties/reasoningEffort/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err35];}else {vErrors.push(err35);}errors++;}else {errors = _errs34;if(vErrors !== null){if(_errs34){vErrors.length = _errs34;}else {vErrors = null;}}}}if(data.cost !== undefined){let data14 = data.cost;const _errs40 = errors;let valid8 = false;const _errs41 = errors;if(!(validate43(data14, {instancePath:instancePath+"/cost",parentData:data,parentDataProperty:"cost",rootData}))){vErrors = vErrors === null ? validate43.errors : vErrors.concat(validate43.errors);errors = vErrors.length;}var _valid3 = _errs41 === errors;valid8 = valid8 || _valid3;if(!valid8){const _errs42 = errors;if(data14 !== null){const err36 = {instancePath:instancePath+"/cost",schemaPath:"#/properties/cost/anyOf/1/type",keyword:"type",params:{type: "null"},message:"must be null"};if(vErrors === null){vErrors = [err36];}else {vErrors.push(err36);}errors++;}var _valid3 = _errs42 === errors;valid8 = valid8 || _valid3;}if(!valid8){const err37 = {instancePath:instancePath+"/cost",schemaPath:"#/properties/cost/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err37];}else {vErrors.push(err37);}errors++;}else {errors = _errs40;if(vErrors !== null){if(_errs40){vErrors.length = _errs40;}else {vErrors = null;}}}}if(data.reasoningText !== undefined){let data15 = data.reasoningText;if((typeof data15 !== "string") && (data15 !== null)){const err38 = {instancePath:instancePath+"/reasoningText",schemaPath:"#/properties/reasoningText/type",keyword:"type",params:{type: schema35.properties.reasoningText.type},message:"must be string,null"};if(vErrors === null){vErrors = [err38];}else {vErrors.push(err38);}errors++;}}if(data.images !== undefined){let data16 = data.images;if(Array.isArray(data16)){const len0 = data16.length;for(let i0=0; i0<len0; i0++){if(!(validate45(data16[i0], {instancePath:instancePath+"/images/" + i0,parentData:data16,parentDataProperty:i0,rootData}))){vErrors = vErrors === null ? validate45.errors : vErrors.concat(validate45.errors);errors = vErrors.length;}}}else {const err39 = {instancePath:instancePath+"/images",schemaPath:"#/properties/images/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err39];}else {vErrors.push(err39);}errors++;}}if(data.generated !== undefined){let data18 = data.generated;if(Array.isArray(data18)){const len1 = data18.length;for(let i1=0; i1<len1; i1++){if(!(validate45(data18[i1], {instancePath:instancePath+"/generated/" + i1,parentData:data18,parentDataProperty:i1,rootData}))){vErrors = vErrors === null ? validate45.errors : vErrors.concat(validate45.errors);errors = vErrors.length;}}}else {const err40 = {instancePath:instancePath+"/generated",schemaPath:"#/properties/generated/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err40];}else {vErrors.push(err40);}errors++;}}}else {const err41 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err41];}else {vErrors.push(err41);}errors++;}validate29.errors = vErrors;return errors === 0;}function validate50(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;if(data && typeof data == "object" && !Array.isArray(data)){if(data.summary === undefined){const err0 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "summary"},message:"must have required property '"+"summary"+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}if(data.turns === undefined){const err1 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "turns"},message:"must have required property '"+"turns"+"'"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}for(const key0 in data){if(!((key0 === "summary") || (key0 === "turns"))){const err2 = {instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}}if(data.summary !== undefined){if(!(validate25(data.summary, {instancePath:instancePath+"/summary",parentData:data,parentDataProperty:"summary",rootData}))){vErrors = vErrors === null ? validate25.errors : vErrors.concat(validate25.errors);errors = vErrors.length;}}if(data.turns !== undefined){let data1 = data.turns;if(Array.isArray(data1)){const len0 = data1.length;for(let i0=0; i0<len0; i0++){if(!(validate29(data1[i0], {instancePath:instancePath+"/turns/" + i0,parentData:data1,parentDataProperty:i0,rootData}))){vErrors = vErrors === null ? validate29.errors : vErrors.concat(validate29.errors);errors = vErrors.length;}}}else {const err3 = {instancePath:instancePath+"/turns",schemaPath:"#/properties/turns/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}}}else {const err4 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}validate50.errors = vErrors;return errors === 0;}function validate22(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="aether:validator:Conversation" */;let vErrors = null;let errors = 0;if(!(validate50(data, {instancePath,parentData,parentDataProperty,rootData}))){vErrors = vErrors === null ? validate50.errors : vErrors.concat(validate50.errors);errors = vErrors.length;}validate22.errors = vErrors;return errors === 0;}export const validateConversationSummary = validate54;const schema48 = {"$id":"aether:validator:ConversationSummary","$ref":"https://aether.local/contracts/v1/conversation.schema.json#/definitions/ConversationSummary"};function validate55(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;if(data && typeof data == "object" && !Array.isArray(data)){if(data.id === undefined){const err0 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "id"},message:"must have required property '"+"id"+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}if(data.title === undefined){const err1 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "title"},message:"must have required property '"+"title"+"'"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}if(data.scope === undefined){const err2 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "scope"},message:"must have required property '"+"scope"+"'"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}if(data.selectedTurnId === undefined){const err3 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "selectedTurnId"},message:"must have required property '"+"selectedTurnId"+"'"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}if(data.createdAt === undefined){const err4 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "createdAt"},message:"must have required property '"+"createdAt"+"'"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}if(data.updatedAt === undefined){const err5 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "updatedAt"},message:"must have required property '"+"updatedAt"+"'"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}for(const key0 in data){if(!((((((key0 === "id") || (key0 === "title")) || (key0 === "scope")) || (key0 === "selectedTurnId")) || (key0 === "createdAt")) || (key0 === "updatedAt"))){const err6 = {instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}}if(data.id !== undefined){let data0 = data.id;if(typeof data0 === "string"){if(func2(data0) > 128){const err7 = {instancePath:instancePath+"/id",schemaPath:"common.schema.json#/definitions/Id/maxLength",keyword:"maxLength",params:{limit: 128},message:"must NOT have more than 128 characters"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}if(func2(data0) < 1){const err8 = {instancePath:instancePath+"/id",schemaPath:"common.schema.json#/definitions/Id/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}}else {const err9 = {instancePath:instancePath+"/id",schemaPath:"common.schema.json#/definitions/Id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}}if(data.title !== undefined){let data1 = data.title;if(typeof data1 === "string"){if(func2(data1) > 200){const err10 = {instancePath:instancePath+"/title",schemaPath:"#/properties/title/maxLength",keyword:"maxLength",params:{limit: 200},message:"must NOT have more than 200 characters"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}}else {const err11 = {instancePath:instancePath+"/title",schemaPath:"#/properties/title/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}}if(data.scope !== undefined){let data2 = data.scope;if((typeof data2 !== "string") && (data2 !== null)){const err12 = {instancePath:instancePath+"/scope",schemaPath:"#/properties/scope/type",keyword:"type",params:{type: schema29.properties.scope.type},message:"must be string,null"};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}if(typeof data2 === "string"){if(func2(data2) > 200){const err13 = {instancePath:instancePath+"/scope",schemaPath:"#/properties/scope/maxLength",keyword:"maxLength",params:{limit: 200},message:"must NOT have more than 200 characters"};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}}}if(data.selectedTurnId !== undefined){if(!(validate26(data.selectedTurnId, {instancePath:instancePath+"/selectedTurnId",parentData:data,parentDataProperty:"selectedTurnId",rootData}))){vErrors = vErrors === null ? validate26.errors : vErrors.concat(validate26.errors);errors = vErrors.length;}}if(data.createdAt !== undefined){let data4 = data.createdAt;if(!(((typeof data4 == "number") && (!(data4 % 1) && !isNaN(data4))) && (isFinite(data4)))){const err14 = {instancePath:instancePath+"/createdAt",schemaPath:"common.schema.json#/definitions/Timestamp/type",keyword:"type",params:{type: "integer"},message:"must be integer"};if(vErrors === null){vErrors = [err14];}else {vErrors.push(err14);}errors++;}if((typeof data4 == "number") && (isFinite(data4))){if(data4 > 9007199254740991 || isNaN(data4)){const err15 = {instancePath:instancePath+"/createdAt",schemaPath:"common.schema.json#/definitions/Timestamp/maximum",keyword:"maximum",params:{comparison: "<=", limit: 9007199254740991},message:"must be <= 9007199254740991"};if(vErrors === null){vErrors = [err15];}else {vErrors.push(err15);}errors++;}if(data4 < -9007199254740991 || isNaN(data4)){const err16 = {instancePath:instancePath+"/createdAt",schemaPath:"common.schema.json#/definitions/Timestamp/minimum",keyword:"minimum",params:{comparison: ">=", limit: -9007199254740991},message:"must be >= -9007199254740991"};if(vErrors === null){vErrors = [err16];}else {vErrors.push(err16);}errors++;}}}if(data.updatedAt !== undefined){let data5 = data.updatedAt;if(!(((typeof data5 == "number") && (!(data5 % 1) && !isNaN(data5))) && (isFinite(data5)))){const err17 = {instancePath:instancePath+"/updatedAt",schemaPath:"common.schema.json#/definitions/Timestamp/type",keyword:"type",params:{type: "integer"},message:"must be integer"};if(vErrors === null){vErrors = [err17];}else {vErrors.push(err17);}errors++;}if((typeof data5 == "number") && (isFinite(data5))){if(data5 > 9007199254740991 || isNaN(data5)){const err18 = {instancePath:instancePath+"/updatedAt",schemaPath:"common.schema.json#/definitions/Timestamp/maximum",keyword:"maximum",params:{comparison: "<=", limit: 9007199254740991},message:"must be <= 9007199254740991"};if(vErrors === null){vErrors = [err18];}else {vErrors.push(err18);}errors++;}if(data5 < -9007199254740991 || isNaN(data5)){const err19 = {instancePath:instancePath+"/updatedAt",schemaPath:"common.schema.json#/definitions/Timestamp/minimum",keyword:"minimum",params:{comparison: ">=", limit: -9007199254740991},message:"must be >= -9007199254740991"};if(vErrors === null){vErrors = [err19];}else {vErrors.push(err19);}errors++;}}}}else {const err20 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err20];}else {vErrors.push(err20);}errors++;}validate55.errors = vErrors;return errors === 0;}function validate54(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="aether:validator:ConversationSummary" */;let vErrors = null;let errors = 0;if(!(validate55(data, {instancePath,parentData,parentDataProperty,rootData}))){vErrors = vErrors === null ? validate55.errors : vErrors.concat(validate55.errors);errors = vErrors.length;}validate54.errors = vErrors;return errors === 0;}export const validateCost = validate58;const schema53 = {"$id":"aether:validator:Cost","$ref":"https://aether.local/contracts/v1/common.schema.json#/definitions/Cost"};function validate59(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;if(data && typeof data == "object" && !Array.isArray(data)){if(data.amount === undefined){const err0 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "amount"},message:"must have required property '"+"amount"+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}if(data.currency === undefined){const err1 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "currency"},message:"must have required property '"+"currency"+"'"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}for(const key0 in data){if(!((key0 === "amount") || (key0 === "currency"))){const err2 = {instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}}if(data.amount !== undefined){let data0 = data.amount;if((typeof data0 == "number") && (isFinite(data0))){if(data0 < 0 || isNaN(data0)){const err3 = {instancePath:instancePath+"/amount",schemaPath:"#/properties/amount/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}}else {const err4 = {instancePath:instancePath+"/amount",schemaPath:"#/properties/amount/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}}if(data.currency !== undefined){let data1 = data.currency;if(!((data1 === "USD") || (data1 === "CNY"))){const err5 = {instancePath:instancePath+"/currency",schemaPath:"#/definitions/Currency/enum",keyword:"enum",params:{allowedValues: schema44.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}}}else {const err6 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}validate59.errors = vErrors;return errors === 0;}function validate58(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="aether:validator:Cost" */;let vErrors = null;let errors = 0;if(!(validate59(data, {instancePath,parentData,parentDataProperty,rootData}))){vErrors = vErrors === null ? validate59.errors : vErrors.concat(validate59.errors);errors = vErrors.length;}validate58.errors = vErrors;return errors === 0;}export const validateCurrency = validate61;const schema56 = {"$id":"aether:validator:Currency","$ref":"https://aether.local/contracts/v1/common.schema.json#/definitions/Currency"};function validate61(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="aether:validator:Currency" */;let vErrors = null;let errors = 0;if(!((data === "USD") || (data === "CNY"))){const err0 = {instancePath,schemaPath:"https://aether.local/contracts/v1/common.schema.json#/definitions/Currency/enum",keyword:"enum",params:{allowedValues: schema44.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}validate61.errors = vErrors;return errors === 0;}export const validateDetails = validate62;const schema58 = {"$id":"aether:validator:Details","$ref":"https://aether.local/contracts/v1/error.schema.json#/definitions/Details"};const schema62 = {"type":"object","additionalProperties":false,"properties":{"field":{"type":"string"},"reason":{"type":"string"},"status":{"type":"integer","minimum":0,"maximum":65535},"limit":{"type":"integer","minimum":0,"maximum":9007199254740991},"entity":{"type":"string"},"port":{"type":"integer","minimum":0,"maximum":65535},"errorId":{"type":"string"}}};function validate62(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="aether:validator:Details" */;let vErrors = null;let errors = 0;if(data && typeof data == "object" && !Array.isArray(data)){for(const key0 in data){if(!(((((((key0 === "field") || (key0 === "reason")) || (key0 === "status")) || (key0 === "limit")) || (key0 === "entity")) || (key0 === "port")) || (key0 === "errorId"))){const err0 = {instancePath,schemaPath:"https://aether.local/contracts/v1/error.schema.json#/definitions/Details/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}}if(data.field !== undefined){if(typeof data.field !== "string"){const err1 = {instancePath:instancePath+"/field",schemaPath:"https://aether.local/contracts/v1/error.schema.json#/definitions/Details/properties/field/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}}if(data.reason !== undefined){if(typeof data.reason !== "string"){const err2 = {instancePath:instancePath+"/reason",schemaPath:"https://aether.local/contracts/v1/error.schema.json#/definitions/Details/properties/reason/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}}if(data.status !== undefined){let data2 = data.status;if(!(((typeof data2 == "number") && (!(data2 % 1) && !isNaN(data2))) && (isFinite(data2)))){const err3 = {instancePath:instancePath+"/status",schemaPath:"https://aether.local/contracts/v1/error.schema.json#/definitions/Details/properties/status/type",keyword:"type",params:{type: "integer"},message:"must be integer"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}if((typeof data2 == "number") && (isFinite(data2))){if(data2 > 65535 || isNaN(data2)){const err4 = {instancePath:instancePath+"/status",schemaPath:"https://aether.local/contracts/v1/error.schema.json#/definitions/Details/properties/status/maximum",keyword:"maximum",params:{comparison: "<=", limit: 65535},message:"must be <= 65535"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}if(data2 < 0 || isNaN(data2)){const err5 = {instancePath:instancePath+"/status",schemaPath:"https://aether.local/contracts/v1/error.schema.json#/definitions/Details/properties/status/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}}}if(data.limit !== undefined){let data3 = data.limit;if(!(((typeof data3 == "number") && (!(data3 % 1) && !isNaN(data3))) && (isFinite(data3)))){const err6 = {instancePath:instancePath+"/limit",schemaPath:"https://aether.local/contracts/v1/error.schema.json#/definitions/Details/properties/limit/type",keyword:"type",params:{type: "integer"},message:"must be integer"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}if((typeof data3 == "number") && (isFinite(data3))){if(data3 > 9007199254740991 || isNaN(data3)){const err7 = {instancePath:instancePath+"/limit",schemaPath:"https://aether.local/contracts/v1/error.schema.json#/definitions/Details/properties/limit/maximum",keyword:"maximum",params:{comparison: "<=", limit: 9007199254740991},message:"must be <= 9007199254740991"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}if(data3 < 0 || isNaN(data3)){const err8 = {instancePath:instancePath+"/limit",schemaPath:"https://aether.local/contracts/v1/error.schema.json#/definitions/Details/properties/limit/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}}}if(data.entity !== undefined){if(typeof data.entity !== "string"){const err9 = {instancePath:instancePath+"/entity",schemaPath:"https://aether.local/contracts/v1/error.schema.json#/definitions/Details/properties/entity/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}}if(data.port !== undefined){let data5 = data.port;if(!(((typeof data5 == "number") && (!(data5 % 1) && !isNaN(data5))) && (isFinite(data5)))){const err10 = {instancePath:instancePath+"/port",schemaPath:"https://aether.local/contracts/v1/error.schema.json#/definitions/Details/properties/port/type",keyword:"type",params:{type: "integer"},message:"must be integer"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}if((typeof data5 == "number") && (isFinite(data5))){if(data5 > 65535 || isNaN(data5)){const err11 = {instancePath:instancePath+"/port",schemaPath:"https://aether.local/contracts/v1/error.schema.json#/definitions/Details/properties/port/maximum",keyword:"maximum",params:{comparison: "<=", limit: 65535},message:"must be <= 65535"};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}if(data5 < 0 || isNaN(data5)){const err12 = {instancePath:instancePath+"/port",schemaPath:"https://aether.local/contracts/v1/error.schema.json#/definitions/Details/properties/port/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}}}if(data.errorId !== undefined){if(typeof data.errorId !== "string"){const err13 = {instancePath:instancePath+"/errorId",schemaPath:"https://aether.local/contracts/v1/error.schema.json#/definitions/Details/properties/errorId/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}}}else {const err14 = {instancePath,schemaPath:"https://aether.local/contracts/v1/error.schema.json#/definitions/Details/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err14];}else {vErrors.push(err14);}errors++;}validate62.errors = vErrors;return errors === 0;}export const validateEndStatus = validate66;const schema64 = {"$id":"aether:validator:EndStatus","$ref":"https://aether.local/contracts/v1/run.schema.json#/definitions/EndStatus"};const schema65 = {"enum":["completed","failed","cancelled"]};function validate66(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="aether:validator:EndStatus" */;let vErrors = null;let errors = 0;if(!(((data === "completed") || (data === "failed")) || (data === "cancelled"))){const err0 = {instancePath,schemaPath:"https://aether.local/contracts/v1/run.schema.json#/definitions/EndStatus/enum",keyword:"enum",params:{allowedValues: schema65.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}validate66.errors = vErrors;return errors === 0;}export const validateEndpoint = validate67;const schema66 = {"$id":"aether:validator:Endpoint","$ref":"aether:bindings#/definitions/Endpoint"};const schema68 = {"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"baseUrl":{"type":"string"},"protocol":{"$ref":"aether:bindings#/definitions/Protocol"},"keys":{"type":"array","items":{"$ref":"aether:bindings#/definitions/EndpointKey"}},"keyStrategy":{"$ref":"aether:bindings#/definitions/KeyStrategy"},"probeUrl":{"type":"string"},"models":{"type":"array","items":{"$ref":"aether:bindings#/definitions/Model"}},"imageBaseUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"imageEditBaseUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"headers":{"type":"object","additionalProperties":{"type":"string"}}},"required":["id","slug","baseUrl","protocol","keys","keyStrategy","probeUrl","models","imageBaseUrl","imageEditBaseUrl","headers"],"additionalProperties":false};const schema69 = {"anyOf":[{"const":"anthropic-messages"},{"const":"openai-chat"},{"const":"openai-responses"}]};const schema70 = {"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"enabled":{"type":"boolean"},"masked":{"anyOf":[{"type":"string"},{"type":"null"}]},"readable":{"type":"boolean"},"exhaustedUntil":{"anyOf":[{"type":"number"},{"type":"null"}]},"exhaustedReason":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","label","enabled","masked","readable","exhaustedUntil","exhaustedReason"],"additionalProperties":false};const schema71 = {"anyOf":[{"const":"round_robin"},{"const":"fill_first"}]};const schema72 = {"type":"object","properties":{"id":{"type":"string"},"modelType":{"$ref":"aether:bindings#/definitions/ModelType"},"typeSource":{"$ref":"aether:bindings#/definitions/TypeSource"},"contextWindow":{"anyOf":[{"type":"number"},{"type":"null"}]},"maxOutput":{"anyOf":[{"type":"number"},{"type":"null"}]},"canVision":{"type":"boolean"},"supportsTools":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"reasoning":{"anyOf":[{"$ref":"aether:bindings#/definitions/ReasoningConfig"},{"type":"null"}]},"nativeWebSearch":{"type":"boolean"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"groupName":{"anyOf":[{"type":"string"},{"type":"null"}]},"pricing":{"anyOf":[{"$ref":"aether:bindings#/definitions/ModelPricing"},{"type":"null"}]}},"required":["id","modelType","typeSource","contextWindow","maxOutput","canVision","supportsTools","reasoning","nativeWebSearch","name","groupName","pricing"],"additionalProperties":false};const schema73 = {"anyOf":[{"const":"chat"},{"const":"image"},{"const":"video"},{"const":"tts"},{"const":"stt"},{"const":"embedding"},{"const":"rerank"},{"const":"unknown"}]};const schema74 = {"anyOf":[{"const":"inferred"},{"const":"user"}]};const schema75 = {"type":"object","properties":{"dialect":{"$ref":"aether:bindings#/definitions/ReasoningDialect"},"efforts":{"type":"array","items":{"$ref":"aether:bindings#/definitions/ReasoningEffort"}},"budgetTokens":{"type":"number"}},"required":["dialect","efforts"],"additionalProperties":false};const schema76 = {"anyOf":[{"const":"openai"},{"const":"anthropic-budget"},{"const":"anthropic-adaptive"},{"const":"thinking-type"},{"const":"qwen"}]};const schema77 = {"anyOf":[{"const":"default"},{"const":"none"},{"const":"auto"},{"const":"minimal"},{"const":"low"},{"const":"medium"},{"const":"high"},{"const":"xhigh"},{"const":"max"}]};function validate71(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;if(data && typeof data == "object" && !Array.isArray(data)){if(data.dialect === undefined){const err0 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "dialect"},message:"must have required property '"+"dialect"+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}if(data.efforts === undefined){const err1 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "efforts"},message:"must have required property '"+"efforts"+"'"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}for(const key0 in data){if(!(((key0 === "dialect") || (key0 === "efforts")) || (key0 === "budgetTokens"))){const err2 = {instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}}if(data.dialect !== undefined){let data0 = data.dialect;const _errs4 = errors;let valid2 = false;const _errs5 = errors;if("openai" !== data0){const err3 = {instancePath:instancePath+"/dialect",schemaPath:"aether:bindings#/definitions/ReasoningDialect/anyOf/0/const",keyword:"const",params:{allowedValue: "openai"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}var _valid0 = _errs5 === errors;valid2 = valid2 || _valid0;if(!valid2){const _errs6 = errors;if("anthropic-budget" !== data0){const err4 = {instancePath:instancePath+"/dialect",schemaPath:"aether:bindings#/definitions/ReasoningDialect/anyOf/1/const",keyword:"const",params:{allowedValue: "anthropic-budget"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}var _valid0 = _errs6 === errors;valid2 = valid2 || _valid0;if(!valid2){const _errs7 = errors;if("anthropic-adaptive" !== data0){const err5 = {instancePath:instancePath+"/dialect",schemaPath:"aether:bindings#/definitions/ReasoningDialect/anyOf/2/const",keyword:"const",params:{allowedValue: "anthropic-adaptive"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}var _valid0 = _errs7 === errors;valid2 = valid2 || _valid0;if(!valid2){const _errs8 = errors;if("thinking-type" !== data0){const err6 = {instancePath:instancePath+"/dialect",schemaPath:"aether:bindings#/definitions/ReasoningDialect/anyOf/3/const",keyword:"const",params:{allowedValue: "thinking-type"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}var _valid0 = _errs8 === errors;valid2 = valid2 || _valid0;if(!valid2){const _errs9 = errors;if("qwen" !== data0){const err7 = {instancePath:instancePath+"/dialect",schemaPath:"aether:bindings#/definitions/ReasoningDialect/anyOf/4/const",keyword:"const",params:{allowedValue: "qwen"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}var _valid0 = _errs9 === errors;valid2 = valid2 || _valid0;}}}}if(!valid2){const err8 = {instancePath:instancePath+"/dialect",schemaPath:"aether:bindings#/definitions/ReasoningDialect/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}else {errors = _errs4;if(vErrors !== null){if(_errs4){vErrors.length = _errs4;}else {vErrors = null;}}}}if(data.efforts !== undefined){let data1 = data.efforts;if(Array.isArray(data1)){const len0 = data1.length;for(let i0=0; i0<len0; i0++){let data2 = data1[i0];const _errs14 = errors;let valid6 = false;const _errs15 = errors;if("default" !== data2){const err9 = {instancePath:instancePath+"/efforts/" + i0,schemaPath:"aether:bindings#/definitions/ReasoningEffort/anyOf/0/const",keyword:"const",params:{allowedValue: "default"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}var _valid1 = _errs15 === errors;valid6 = valid6 || _valid1;if(!valid6){const _errs16 = errors;if("none" !== data2){const err10 = {instancePath:instancePath+"/efforts/" + i0,schemaPath:"aether:bindings#/definitions/ReasoningEffort/anyOf/1/const",keyword:"const",params:{allowedValue: "none"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}var _valid1 = _errs16 === errors;valid6 = valid6 || _valid1;if(!valid6){const _errs17 = errors;if("auto" !== data2){const err11 = {instancePath:instancePath+"/efforts/" + i0,schemaPath:"aether:bindings#/definitions/ReasoningEffort/anyOf/2/const",keyword:"const",params:{allowedValue: "auto"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}var _valid1 = _errs17 === errors;valid6 = valid6 || _valid1;if(!valid6){const _errs18 = errors;if("minimal" !== data2){const err12 = {instancePath:instancePath+"/efforts/" + i0,schemaPath:"aether:bindings#/definitions/ReasoningEffort/anyOf/3/const",keyword:"const",params:{allowedValue: "minimal"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}var _valid1 = _errs18 === errors;valid6 = valid6 || _valid1;if(!valid6){const _errs19 = errors;if("low" !== data2){const err13 = {instancePath:instancePath+"/efforts/" + i0,schemaPath:"aether:bindings#/definitions/ReasoningEffort/anyOf/4/const",keyword:"const",params:{allowedValue: "low"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}var _valid1 = _errs19 === errors;valid6 = valid6 || _valid1;if(!valid6){const _errs20 = errors;if("medium" !== data2){const err14 = {instancePath:instancePath+"/efforts/" + i0,schemaPath:"aether:bindings#/definitions/ReasoningEffort/anyOf/5/const",keyword:"const",params:{allowedValue: "medium"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err14];}else {vErrors.push(err14);}errors++;}var _valid1 = _errs20 === errors;valid6 = valid6 || _valid1;if(!valid6){const _errs21 = errors;if("high" !== data2){const err15 = {instancePath:instancePath+"/efforts/" + i0,schemaPath:"aether:bindings#/definitions/ReasoningEffort/anyOf/6/const",keyword:"const",params:{allowedValue: "high"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err15];}else {vErrors.push(err15);}errors++;}var _valid1 = _errs21 === errors;valid6 = valid6 || _valid1;if(!valid6){const _errs22 = errors;if("xhigh" !== data2){const err16 = {instancePath:instancePath+"/efforts/" + i0,schemaPath:"aether:bindings#/definitions/ReasoningEffort/anyOf/7/const",keyword:"const",params:{allowedValue: "xhigh"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err16];}else {vErrors.push(err16);}errors++;}var _valid1 = _errs22 === errors;valid6 = valid6 || _valid1;if(!valid6){const _errs23 = errors;if("max" !== data2){const err17 = {instancePath:instancePath+"/efforts/" + i0,schemaPath:"aether:bindings#/definitions/ReasoningEffort/anyOf/8/const",keyword:"const",params:{allowedValue: "max"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err17];}else {vErrors.push(err17);}errors++;}var _valid1 = _errs23 === errors;valid6 = valid6 || _valid1;}}}}}}}}if(!valid6){const err18 = {instancePath:instancePath+"/efforts/" + i0,schemaPath:"aether:bindings#/definitions/ReasoningEffort/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err18];}else {vErrors.push(err18);}errors++;}else {errors = _errs14;if(vErrors !== null){if(_errs14){vErrors.length = _errs14;}else {vErrors = null;}}}}}else {const err19 = {instancePath:instancePath+"/efforts",schemaPath:"#/properties/efforts/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err19];}else {vErrors.push(err19);}errors++;}}if(data.budgetTokens !== undefined){let data3 = data.budgetTokens;if(!((typeof data3 == "number") && (isFinite(data3)))){const err20 = {instancePath:instancePath+"/budgetTokens",schemaPath:"#/properties/budgetTokens/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err20];}else {vErrors.push(err20);}errors++;}}}else {const err21 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err21];}else {vErrors.push(err21);}errors++;}validate71.errors = vErrors;return errors === 0;}const schema78 = {"type":"object","properties":{"currency":{"$ref":"aether:bindings#/definitions/Currency"},"tiers":{"type":"array","items":{"$ref":"aether:bindings#/definitions/PricingTier"}}},"required":["currency","tiers"],"additionalProperties":false};const schema79 = {"anyOf":[{"const":"USD"},{"const":"CNY"}]};const schema80 = {"type":"object","properties":{"minInputTokens":{"type":"number"},"input":{"type":"number"},"output":{"type":"number"},"cacheRead":{"anyOf":[{"type":"number"},{"type":"null"}]},"cacheWrite":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["minInputTokens","input","output","cacheRead","cacheWrite"],"additionalProperties":false};function validate73(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;if(data && typeof data == "object" && !Array.isArray(data)){if(data.currency === undefined){const err0 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "currency"},message:"must have required property '"+"currency"+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}if(data.tiers === undefined){const err1 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "tiers"},message:"must have required property '"+"tiers"+"'"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}for(const key0 in data){if(!((key0 === "currency") || (key0 === "tiers"))){const err2 = {instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}}if(data.currency !== undefined){let data0 = data.currency;const _errs4 = errors;let valid2 = false;const _errs5 = errors;if("USD" !== data0){const err3 = {instancePath:instancePath+"/currency",schemaPath:"aether:bindings#/definitions/Currency/anyOf/0/const",keyword:"const",params:{allowedValue: "USD"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}var _valid0 = _errs5 === errors;valid2 = valid2 || _valid0;if(!valid2){const _errs6 = errors;if("CNY" !== data0){const err4 = {instancePath:instancePath+"/currency",schemaPath:"aether:bindings#/definitions/Currency/anyOf/1/const",keyword:"const",params:{allowedValue: "CNY"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}var _valid0 = _errs6 === errors;valid2 = valid2 || _valid0;}if(!valid2){const err5 = {instancePath:instancePath+"/currency",schemaPath:"aether:bindings#/definitions/Currency/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}else {errors = _errs4;if(vErrors !== null){if(_errs4){vErrors.length = _errs4;}else {vErrors = null;}}}}if(data.tiers !== undefined){let data1 = data.tiers;if(Array.isArray(data1)){const len0 = data1.length;for(let i0=0; i0<len0; i0++){let data2 = data1[i0];if(data2 && typeof data2 == "object" && !Array.isArray(data2)){if(data2.minInputTokens === undefined){const err6 = {instancePath:instancePath+"/tiers/" + i0,schemaPath:"aether:bindings#/definitions/PricingTier/required",keyword:"required",params:{missingProperty: "minInputTokens"},message:"must have required property '"+"minInputTokens"+"'"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}if(data2.input === undefined){const err7 = {instancePath:instancePath+"/tiers/" + i0,schemaPath:"aether:bindings#/definitions/PricingTier/required",keyword:"required",params:{missingProperty: "input"},message:"must have required property '"+"input"+"'"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}if(data2.output === undefined){const err8 = {instancePath:instancePath+"/tiers/" + i0,schemaPath:"aether:bindings#/definitions/PricingTier/required",keyword:"required",params:{missingProperty: "output"},message:"must have required property '"+"output"+"'"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}if(data2.cacheRead === undefined){const err9 = {instancePath:instancePath+"/tiers/" + i0,schemaPath:"aether:bindings#/definitions/PricingTier/required",keyword:"required",params:{missingProperty: "cacheRead"},message:"must have required property '"+"cacheRead"+"'"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}if(data2.cacheWrite === undefined){const err10 = {instancePath:instancePath+"/tiers/" + i0,schemaPath:"aether:bindings#/definitions/PricingTier/required",keyword:"required",params:{missingProperty: "cacheWrite"},message:"must have required property '"+"cacheWrite"+"'"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}for(const key1 in data2){if(!(((((key1 === "minInputTokens") || (key1 === "input")) || (key1 === "output")) || (key1 === "cacheRead")) || (key1 === "cacheWrite"))){const err11 = {instancePath:instancePath+"/tiers/" + i0,schemaPath:"aether:bindings#/definitions/PricingTier/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key1},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}}if(data2.minInputTokens !== undefined){let data3 = data2.minInputTokens;if(!((typeof data3 == "number") && (isFinite(data3)))){const err12 = {instancePath:instancePath+"/tiers/" + i0+"/minInputTokens",schemaPath:"aether:bindings#/definitions/PricingTier/properties/minInputTokens/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}}if(data2.input !== undefined){let data4 = data2.input;if(!((typeof data4 == "number") && (isFinite(data4)))){const err13 = {instancePath:instancePath+"/tiers/" + i0+"/input",schemaPath:"aether:bindings#/definitions/PricingTier/properties/input/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}}if(data2.output !== undefined){let data5 = data2.output;if(!((typeof data5 == "number") && (isFinite(data5)))){const err14 = {instancePath:instancePath+"/tiers/" + i0+"/output",schemaPath:"aether:bindings#/definitions/PricingTier/properties/output/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err14];}else {vErrors.push(err14);}errors++;}}if(data2.cacheRead !== undefined){let data6 = data2.cacheRead;const _errs20 = errors;let valid7 = false;const _errs21 = errors;if(!((typeof data6 == "number") && (isFinite(data6)))){const err15 = {instancePath:instancePath+"/tiers/" + i0+"/cacheRead",schemaPath:"aether:bindings#/definitions/PricingTier/properties/cacheRead/anyOf/0/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err15];}else {vErrors.push(err15);}errors++;}var _valid1 = _errs21 === errors;valid7 = valid7 || _valid1;if(!valid7){const _errs23 = errors;if(data6 !== null){const err16 = {instancePath:instancePath+"/tiers/" + i0+"/cacheRead",schemaPath:"aether:bindings#/definitions/PricingTier/properties/cacheRead/anyOf/1/type",keyword:"type",params:{type: "null"},message:"must be null"};if(vErrors === null){vErrors = [err16];}else {vErrors.push(err16);}errors++;}var _valid1 = _errs23 === errors;valid7 = valid7 || _valid1;}if(!valid7){const err17 = {instancePath:instancePath+"/tiers/" + i0+"/cacheRead",schemaPath:"aether:bindings#/definitions/PricingTier/properties/cacheRead/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err17];}else {vErrors.push(err17);}errors++;}else {errors = _errs20;if(vErrors !== null){if(_errs20){vErrors.length = _errs20;}else {vErrors = null;}}}}if(data2.cacheWrite !== undefined){let data7 = data2.cacheWrite;const _errs26 = errors;let valid8 = false;const _errs27 = errors;if(!((typeof data7 == "number") && (isFinite(data7)))){const err18 = {instancePath:instancePath+"/tiers/" + i0+"/cacheWrite",schemaPath:"aether:bindings#/definitions/PricingTier/properties/cacheWrite/anyOf/0/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err18];}else {vErrors.push(err18);}errors++;}var _valid2 = _errs27 === errors;valid8 = valid8 || _valid2;if(!valid8){const _errs29 = errors;if(data7 !== null){const err19 = {instancePath:instancePath+"/tiers/" + i0+"/cacheWrite",schemaPath:"aether:bindings#/definitions/PricingTier/properties/cacheWrite/anyOf/1/type",keyword:"type",params:{type: "null"},message:"must be null"};if(vErrors === null){vErrors = [err19];}else {vErrors.push(err19);}errors++;}var _valid2 = _errs29 === errors;valid8 = valid8 || _valid2;}if(!valid8){const err20 = {instancePath:instancePath+"/tiers/" + i0+"/cacheWrite",schemaPath:"aether:bindings#/definitions/PricingTier/properties/cacheWrite/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err20];}else {vErrors.push(err20);}errors++;}else {errors = _errs26;if(vErrors !== null){if(_errs26){vErrors.length = _errs26;}else {vErrors = null;}}}}}else {const err21 = {instancePath:instancePath+"/tiers/" + i0,schemaPath:"aether:bindings#/definitions/PricingTier/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err21];}else {vErrors.push(err21);}errors++;}}}else {const err22 = {instancePath:instancePath+"/tiers",schemaPath:"#/properties/tiers/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err22];}else {vErrors.push(err22);}errors++;}}}else {const err23 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err23];}else {vErrors.push(err23);}errors++;}validate73.errors = vErrors;return errors === 0;}function validate70(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;if(data && typeof data == "object" && !Array.isArray(data)){if(data.id === undefined){const err0 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "id"},message:"must have required property '"+"id"+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}if(data.modelType === undefined){const err1 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "modelType"},message:"must have required property '"+"modelType"+"'"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}if(data.typeSource === undefined){const err2 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "typeSource"},message:"must have required property '"+"typeSource"+"'"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}if(data.contextWindow === undefined){const err3 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "contextWindow"},message:"must have required property '"+"contextWindow"+"'"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}if(data.maxOutput === undefined){const err4 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "maxOutput"},message:"must have required property '"+"maxOutput"+"'"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}if(data.canVision === undefined){const err5 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "canVision"},message:"must have required property '"+"canVision"+"'"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}if(data.supportsTools === undefined){const err6 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "supportsTools"},message:"must have required property '"+"supportsTools"+"'"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}if(data.reasoning === undefined){const err7 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "reasoning"},message:"must have required property '"+"reasoning"+"'"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}if(data.nativeWebSearch === undefined){const err8 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "nativeWebSearch"},message:"must have required property '"+"nativeWebSearch"+"'"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}if(data.name === undefined){const err9 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "name"},message:"must have required property '"+"name"+"'"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}if(data.groupName === undefined){const err10 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "groupName"},message:"must have required property '"+"groupName"+"'"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}if(data.pricing === undefined){const err11 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "pricing"},message:"must have required property '"+"pricing"+"'"};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}for(const key0 in data){if(!(func8.call(schema72.properties, key0))){const err12 = {instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}}if(data.id !== undefined){if(typeof data.id !== "string"){const err13 = {instancePath:instancePath+"/id",schemaPath:"#/properties/id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}}if(data.modelType !== undefined){let data1 = data.modelType;const _errs6 = errors;let valid2 = false;const _errs7 = errors;if("chat" !== data1){const err14 = {instancePath:instancePath+"/modelType",schemaPath:"aether:bindings#/definitions/ModelType/anyOf/0/const",keyword:"const",params:{allowedValue: "chat"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err14];}else {vErrors.push(err14);}errors++;}var _valid0 = _errs7 === errors;valid2 = valid2 || _valid0;if(!valid2){const _errs8 = errors;if("image" !== data1){const err15 = {instancePath:instancePath+"/modelType",schemaPath:"aether:bindings#/definitions/ModelType/anyOf/1/const",keyword:"const",params:{allowedValue: "image"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err15];}else {vErrors.push(err15);}errors++;}var _valid0 = _errs8 === errors;valid2 = valid2 || _valid0;if(!valid2){const _errs9 = errors;if("video" !== data1){const err16 = {instancePath:instancePath+"/modelType",schemaPath:"aether:bindings#/definitions/ModelType/anyOf/2/const",keyword:"const",params:{allowedValue: "video"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err16];}else {vErrors.push(err16);}errors++;}var _valid0 = _errs9 === errors;valid2 = valid2 || _valid0;if(!valid2){const _errs10 = errors;if("tts" !== data1){const err17 = {instancePath:instancePath+"/modelType",schemaPath:"aether:bindings#/definitions/ModelType/anyOf/3/const",keyword:"const",params:{allowedValue: "tts"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err17];}else {vErrors.push(err17);}errors++;}var _valid0 = _errs10 === errors;valid2 = valid2 || _valid0;if(!valid2){const _errs11 = errors;if("stt" !== data1){const err18 = {instancePath:instancePath+"/modelType",schemaPath:"aether:bindings#/definitions/ModelType/anyOf/4/const",keyword:"const",params:{allowedValue: "stt"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err18];}else {vErrors.push(err18);}errors++;}var _valid0 = _errs11 === errors;valid2 = valid2 || _valid0;if(!valid2){const _errs12 = errors;if("embedding" !== data1){const err19 = {instancePath:instancePath+"/modelType",schemaPath:"aether:bindings#/definitions/ModelType/anyOf/5/const",keyword:"const",params:{allowedValue: "embedding"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err19];}else {vErrors.push(err19);}errors++;}var _valid0 = _errs12 === errors;valid2 = valid2 || _valid0;if(!valid2){const _errs13 = errors;if("rerank" !== data1){const err20 = {instancePath:instancePath+"/modelType",schemaPath:"aether:bindings#/definitions/ModelType/anyOf/6/const",keyword:"const",params:{allowedValue: "rerank"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err20];}else {vErrors.push(err20);}errors++;}var _valid0 = _errs13 === errors;valid2 = valid2 || _valid0;if(!valid2){const _errs14 = errors;if("unknown" !== data1){const err21 = {instancePath:instancePath+"/modelType",schemaPath:"aether:bindings#/definitions/ModelType/anyOf/7/const",keyword:"const",params:{allowedValue: "unknown"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err21];}else {vErrors.push(err21);}errors++;}var _valid0 = _errs14 === errors;valid2 = valid2 || _valid0;}}}}}}}if(!valid2){const err22 = {instancePath:instancePath+"/modelType",schemaPath:"aether:bindings#/definitions/ModelType/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err22];}else {vErrors.push(err22);}errors++;}else {errors = _errs6;if(vErrors !== null){if(_errs6){vErrors.length = _errs6;}else {vErrors = null;}}}}if(data.typeSource !== undefined){let data2 = data.typeSource;const _errs17 = errors;let valid4 = false;const _errs18 = errors;if("inferred" !== data2){const err23 = {instancePath:instancePath+"/typeSource",schemaPath:"aether:bindings#/definitions/TypeSource/anyOf/0/const",keyword:"const",params:{allowedValue: "inferred"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err23];}else {vErrors.push(err23);}errors++;}var _valid1 = _errs18 === errors;valid4 = valid4 || _valid1;if(!valid4){const _errs19 = errors;if("user" !== data2){const err24 = {instancePath:instancePath+"/typeSource",schemaPath:"aether:bindings#/definitions/TypeSource/anyOf/1/const",keyword:"const",params:{allowedValue: "user"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err24];}else {vErrors.push(err24);}errors++;}var _valid1 = _errs19 === errors;valid4 = valid4 || _valid1;}if(!valid4){const err25 = {instancePath:instancePath+"/typeSource",schemaPath:"aether:bindings#/definitions/TypeSource/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err25];}else {vErrors.push(err25);}errors++;}else {errors = _errs17;if(vErrors !== null){if(_errs17){vErrors.length = _errs17;}else {vErrors = null;}}}}if(data.contextWindow !== undefined){let data3 = data.contextWindow;const _errs21 = errors;let valid5 = false;const _errs22 = errors;if(!((typeof data3 == "number") && (isFinite(data3)))){const err26 = {instancePath:instancePath+"/contextWindow",schemaPath:"#/properties/contextWindow/anyOf/0/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err26];}else {vErrors.push(err26);}errors++;}var _valid2 = _errs22 === errors;valid5 = valid5 || _valid2;if(!valid5){const _errs24 = errors;if(data3 !== null){const err27 = {instancePath:instancePath+"/contextWindow",schemaPath:"#/properties/contextWindow/anyOf/1/type",keyword:"type",params:{type: "null"},message:"must be null"};if(vErrors === null){vErrors = [err27];}else {vErrors.push(err27);}errors++;}var _valid2 = _errs24 === errors;valid5 = valid5 || _valid2;}if(!valid5){const err28 = {instancePath:instancePath+"/contextWindow",schemaPath:"#/properties/contextWindow/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err28];}else {vErrors.push(err28);}errors++;}else {errors = _errs21;if(vErrors !== null){if(_errs21){vErrors.length = _errs21;}else {vErrors = null;}}}}if(data.maxOutput !== undefined){let data4 = data.maxOutput;const _errs27 = errors;let valid6 = false;const _errs28 = errors;if(!((typeof data4 == "number") && (isFinite(data4)))){const err29 = {instancePath:instancePath+"/maxOutput",schemaPath:"#/properties/maxOutput/anyOf/0/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err29];}else {vErrors.push(err29);}errors++;}var _valid3 = _errs28 === errors;valid6 = valid6 || _valid3;if(!valid6){const _errs30 = errors;if(data4 !== null){const err30 = {instancePath:instancePath+"/maxOutput",schemaPath:"#/properties/maxOutput/anyOf/1/type",keyword:"type",params:{type: "null"},message:"must be null"};if(vErrors === null){vErrors = [err30];}else {vErrors.push(err30);}errors++;}var _valid3 = _errs30 === errors;valid6 = valid6 || _valid3;}if(!valid6){const err31 = {instancePath:instancePath+"/maxOutput",schemaPath:"#/properties/maxOutput/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err31];}else {vErrors.push(err31);}errors++;}else {errors = _errs27;if(vErrors !== null){if(_errs27){vErrors.length = _errs27;}else {vErrors = null;}}}}if(data.canVision !== undefined){if(typeof data.canVision !== "boolean"){const err32 = {instancePath:instancePath+"/canVision",schemaPath:"#/properties/canVision/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"};if(vErrors === null){vErrors = [err32];}else {vErrors.push(err32);}errors++;}}if(data.supportsTools !== undefined){let data6 = data.supportsTools;const _errs35 = errors;let valid7 = false;const _errs36 = errors;if(typeof data6 !== "boolean"){const err33 = {instancePath:instancePath+"/supportsTools",schemaPath:"#/properties/supportsTools/anyOf/0/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"};if(vErrors === null){vErrors = [err33];}else {vErrors.push(err33);}errors++;}var _valid4 = _errs36 === errors;valid7 = valid7 || _valid4;if(!valid7){const _errs38 = errors;if(data6 !== null){const err34 = {instancePath:instancePath+"/supportsTools",schemaPath:"#/properties/supportsTools/anyOf/1/type",keyword:"type",params:{type: "null"},message:"must be null"};if(vErrors === null){vErrors = [err34];}else {vErrors.push(err34);}errors++;}var _valid4 = _errs38 === errors;valid7 = valid7 || _valid4;}if(!valid7){const err35 = {instancePath:instancePath+"/supportsTools",schemaPath:"#/properties/supportsTools/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err35];}else {vErrors.push(err35);}errors++;}else {errors = _errs35;if(vErrors !== null){if(_errs35){vErrors.length = _errs35;}else {vErrors = null;}}}}if(data.reasoning !== undefined){let data7 = data.reasoning;const _errs41 = errors;let valid8 = false;const _errs42 = errors;if(!(validate71(data7, {instancePath:instancePath+"/reasoning",parentData:data,parentDataProperty:"reasoning",rootData}))){vErrors = vErrors === null ? validate71.errors : vErrors.concat(validate71.errors);errors = vErrors.length;}var _valid5 = _errs42 === errors;valid8 = valid8 || _valid5;if(!valid8){const _errs43 = errors;if(data7 !== null){const err36 = {instancePath:instancePath+"/reasoning",schemaPath:"#/properties/reasoning/anyOf/1/type",keyword:"type",params:{type: "null"},message:"must be null"};if(vErrors === null){vErrors = [err36];}else {vErrors.push(err36);}errors++;}var _valid5 = _errs43 === errors;valid8 = valid8 || _valid5;}if(!valid8){const err37 = {instancePath:instancePath+"/reasoning",schemaPath:"#/properties/reasoning/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err37];}else {vErrors.push(err37);}errors++;}else {errors = _errs41;if(vErrors !== null){if(_errs41){vErrors.length = _errs41;}else {vErrors = null;}}}}if(data.nativeWebSearch !== undefined){if(typeof data.nativeWebSearch !== "boolean"){const err38 = {instancePath:instancePath+"/nativeWebSearch",schemaPath:"#/properties/nativeWebSearch/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"};if(vErrors === null){vErrors = [err38];}else {vErrors.push(err38);}errors++;}}if(data.name !== undefined){let data9 = data.name;const _errs48 = errors;let valid9 = false;const _errs49 = errors;if(typeof data9 !== "string"){const err39 = {instancePath:instancePath+"/name",schemaPath:"#/properties/name/anyOf/0/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err39];}else {vErrors.push(err39);}errors++;}var _valid6 = _errs49 === errors;valid9 = valid9 || _valid6;if(!valid9){const _errs51 = errors;if(data9 !== null){const err40 = {instancePath:instancePath+"/name",schemaPath:"#/properties/name/anyOf/1/type",keyword:"type",params:{type: "null"},message:"must be null"};if(vErrors === null){vErrors = [err40];}else {vErrors.push(err40);}errors++;}var _valid6 = _errs51 === errors;valid9 = valid9 || _valid6;}if(!valid9){const err41 = {instancePath:instancePath+"/name",schemaPath:"#/properties/name/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err41];}else {vErrors.push(err41);}errors++;}else {errors = _errs48;if(vErrors !== null){if(_errs48){vErrors.length = _errs48;}else {vErrors = null;}}}}if(data.groupName !== undefined){let data10 = data.groupName;const _errs54 = errors;let valid10 = false;const _errs55 = errors;if(typeof data10 !== "string"){const err42 = {instancePath:instancePath+"/groupName",schemaPath:"#/properties/groupName/anyOf/0/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err42];}else {vErrors.push(err42);}errors++;}var _valid7 = _errs55 === errors;valid10 = valid10 || _valid7;if(!valid10){const _errs57 = errors;if(data10 !== null){const err43 = {instancePath:instancePath+"/groupName",schemaPath:"#/properties/groupName/anyOf/1/type",keyword:"type",params:{type: "null"},message:"must be null"};if(vErrors === null){vErrors = [err43];}else {vErrors.push(err43);}errors++;}var _valid7 = _errs57 === errors;valid10 = valid10 || _valid7;}if(!valid10){const err44 = {instancePath:instancePath+"/groupName",schemaPath:"#/properties/groupName/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err44];}else {vErrors.push(err44);}errors++;}else {errors = _errs54;if(vErrors !== null){if(_errs54){vErrors.length = _errs54;}else {vErrors = null;}}}}if(data.pricing !== undefined){let data11 = data.pricing;const _errs60 = errors;let valid11 = false;const _errs61 = errors;if(!(validate73(data11, {instancePath:instancePath+"/pricing",parentData:data,parentDataProperty:"pricing",rootData}))){vErrors = vErrors === null ? validate73.errors : vErrors.concat(validate73.errors);errors = vErrors.length;}var _valid8 = _errs61 === errors;valid11 = valid11 || _valid8;if(!valid11){const _errs62 = errors;if(data11 !== null){const err45 = {instancePath:instancePath+"/pricing",schemaPath:"#/properties/pricing/anyOf/1/type",keyword:"type",params:{type: "null"},message:"must be null"};if(vErrors === null){vErrors = [err45];}else {vErrors.push(err45);}errors++;}var _valid8 = _errs62 === errors;valid11 = valid11 || _valid8;}if(!valid11){const err46 = {instancePath:instancePath+"/pricing",schemaPath:"#/properties/pricing/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err46];}else {vErrors.push(err46);}errors++;}else {errors = _errs60;if(vErrors !== null){if(_errs60){vErrors.length = _errs60;}else {vErrors = null;}}}}}else {const err47 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err47];}else {vErrors.push(err47);}errors++;}validate70.errors = vErrors;return errors === 0;}function validate69(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;if(data && typeof data == "object" && !Array.isArray(data)){if(data.id === undefined){const err0 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "id"},message:"must have required property '"+"id"+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}if(data.slug === undefined){const err1 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "slug"},message:"must have required property '"+"slug"+"'"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}if(data.baseUrl === undefined){const err2 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "baseUrl"},message:"must have required property '"+"baseUrl"+"'"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}if(data.protocol === undefined){const err3 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "protocol"},message:"must have required property '"+"protocol"+"'"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}if(data.keys === undefined){const err4 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "keys"},message:"must have required property '"+"keys"+"'"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}if(data.keyStrategy === undefined){const err5 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "keyStrategy"},message:"must have required property '"+"keyStrategy"+"'"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}if(data.probeUrl === undefined){const err6 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "probeUrl"},message:"must have required property '"+"probeUrl"+"'"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}if(data.models === undefined){const err7 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "models"},message:"must have required property '"+"models"+"'"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}if(data.imageBaseUrl === undefined){const err8 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "imageBaseUrl"},message:"must have required property '"+"imageBaseUrl"+"'"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}if(data.imageEditBaseUrl === undefined){const err9 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "imageEditBaseUrl"},message:"must have required property '"+"imageEditBaseUrl"+"'"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}if(data.headers === undefined){const err10 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "headers"},message:"must have required property '"+"headers"+"'"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}for(const key0 in data){if(!(func8.call(schema68.properties, key0))){const err11 = {instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}}if(data.id !== undefined){if(typeof data.id !== "string"){const err12 = {instancePath:instancePath+"/id",schemaPath:"#/properties/id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}}if(data.slug !== undefined){if(typeof data.slug !== "string"){const err13 = {instancePath:instancePath+"/slug",schemaPath:"#/properties/slug/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}}if(data.baseUrl !== undefined){if(typeof data.baseUrl !== "string"){const err14 = {instancePath:instancePath+"/baseUrl",schemaPath:"#/properties/baseUrl/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err14];}else {vErrors.push(err14);}errors++;}}if(data.protocol !== undefined){let data3 = data.protocol;const _errs10 = errors;let valid2 = false;const _errs11 = errors;if("anthropic-messages" !== data3){const err15 = {instancePath:instancePath+"/protocol",schemaPath:"aether:bindings#/definitions/Protocol/anyOf/0/const",keyword:"const",params:{allowedValue: "anthropic-messages"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err15];}else {vErrors.push(err15);}errors++;}var _valid0 = _errs11 === errors;valid2 = valid2 || _valid0;if(!valid2){const _errs12 = errors;if("openai-chat" !== data3){const err16 = {instancePath:instancePath+"/protocol",schemaPath:"aether:bindings#/definitions/Protocol/anyOf/1/const",keyword:"const",params:{allowedValue: "openai-chat"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err16];}else {vErrors.push(err16);}errors++;}var _valid0 = _errs12 === errors;valid2 = valid2 || _valid0;if(!valid2){const _errs13 = errors;if("openai-responses" !== data3){const err17 = {instancePath:instancePath+"/protocol",schemaPath:"aether:bindings#/definitions/Protocol/anyOf/2/const",keyword:"const",params:{allowedValue: "openai-responses"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err17];}else {vErrors.push(err17);}errors++;}var _valid0 = _errs13 === errors;valid2 = valid2 || _valid0;}}if(!valid2){const err18 = {instancePath:instancePath+"/protocol",schemaPath:"aether:bindings#/definitions/Protocol/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err18];}else {vErrors.push(err18);}errors++;}else {errors = _errs10;if(vErrors !== null){if(_errs10){vErrors.length = _errs10;}else {vErrors = null;}}}}if(data.keys !== undefined){let data4 = data.keys;if(Array.isArray(data4)){const len0 = data4.length;for(let i0=0; i0<len0; i0++){let data5 = data4[i0];if(data5 && typeof data5 == "object" && !Array.isArray(data5)){if(data5.id === undefined){const err19 = {instancePath:instancePath+"/keys/" + i0,schemaPath:"aether:bindings#/definitions/EndpointKey/required",keyword:"required",params:{missingProperty: "id"},message:"must have required property '"+"id"+"'"};if(vErrors === null){vErrors = [err19];}else {vErrors.push(err19);}errors++;}if(data5.label === undefined){const err20 = {instancePath:instancePath+"/keys/" + i0,schemaPath:"aether:bindings#/definitions/EndpointKey/required",keyword:"required",params:{missingProperty: "label"},message:"must have required property '"+"label"+"'"};if(vErrors === null){vErrors = [err20];}else {vErrors.push(err20);}errors++;}if(data5.enabled === undefined){const err21 = {instancePath:instancePath+"/keys/" + i0,schemaPath:"aether:bindings#/definitions/EndpointKey/required",keyword:"required",params:{missingProperty: "enabled"},message:"must have required property '"+"enabled"+"'"};if(vErrors === null){vErrors = [err21];}else {vErrors.push(err21);}errors++;}if(data5.masked === undefined){const err22 = {instancePath:instancePath+"/keys/" + i0,schemaPath:"aether:bindings#/definitions/EndpointKey/required",keyword:"required",params:{missingProperty: "masked"},message:"must have required property '"+"masked"+"'"};if(vErrors === null){vErrors = [err22];}else {vErrors.push(err22);}errors++;}if(data5.readable === undefined){const err23 = {instancePath:instancePath+"/keys/" + i0,schemaPath:"aether:bindings#/definitions/EndpointKey/required",keyword:"required",params:{missingProperty: "readable"},message:"must have required property '"+"readable"+"'"};if(vErrors === null){vErrors = [err23];}else {vErrors.push(err23);}errors++;}if(data5.exhaustedUntil === undefined){const err24 = {instancePath:instancePath+"/keys/" + i0,schemaPath:"aether:bindings#/definitions/EndpointKey/required",keyword:"required",params:{missingProperty: "exhaustedUntil"},message:"must have required property '"+"exhaustedUntil"+"'"};if(vErrors === null){vErrors = [err24];}else {vErrors.push(err24);}errors++;}if(data5.exhaustedReason === undefined){const err25 = {instancePath:instancePath+"/keys/" + i0,schemaPath:"aether:bindings#/definitions/EndpointKey/required",keyword:"required",params:{missingProperty: "exhaustedReason"},message:"must have required property '"+"exhaustedReason"+"'"};if(vErrors === null){vErrors = [err25];}else {vErrors.push(err25);}errors++;}for(const key1 in data5){if(!(((((((key1 === "id") || (key1 === "label")) || (key1 === "enabled")) || (key1 === "masked")) || (key1 === "readable")) || (key1 === "exhaustedUntil")) || (key1 === "exhaustedReason"))){const err26 = {instancePath:instancePath+"/keys/" + i0,schemaPath:"aether:bindings#/definitions/EndpointKey/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key1},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err26];}else {vErrors.push(err26);}errors++;}}if(data5.id !== undefined){if(typeof data5.id !== "string"){const err27 = {instancePath:instancePath+"/keys/" + i0+"/id",schemaPath:"aether:bindings#/definitions/EndpointKey/properties/id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err27];}else {vErrors.push(err27);}errors++;}}if(data5.label !== undefined){if(typeof data5.label !== "string"){const err28 = {instancePath:instancePath+"/keys/" + i0+"/label",schemaPath:"aether:bindings#/definitions/EndpointKey/properties/label/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err28];}else {vErrors.push(err28);}errors++;}}if(data5.enabled !== undefined){if(typeof data5.enabled !== "boolean"){const err29 = {instancePath:instancePath+"/keys/" + i0+"/enabled",schemaPath:"aether:bindings#/definitions/EndpointKey/properties/enabled/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"};if(vErrors === null){vErrors = [err29];}else {vErrors.push(err29);}errors++;}}if(data5.masked !== undefined){let data9 = data5.masked;const _errs27 = errors;let valid7 = false;const _errs28 = errors;if(typeof data9 !== "string"){const err30 = {instancePath:instancePath+"/keys/" + i0+"/masked",schemaPath:"aether:bindings#/definitions/EndpointKey/properties/masked/anyOf/0/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err30];}else {vErrors.push(err30);}errors++;}var _valid1 = _errs28 === errors;valid7 = valid7 || _valid1;if(!valid7){const _errs30 = errors;if(data9 !== null){const err31 = {instancePath:instancePath+"/keys/" + i0+"/masked",schemaPath:"aether:bindings#/definitions/EndpointKey/properties/masked/anyOf/1/type",keyword:"type",params:{type: "null"},message:"must be null"};if(vErrors === null){vErrors = [err31];}else {vErrors.push(err31);}errors++;}var _valid1 = _errs30 === errors;valid7 = valid7 || _valid1;}if(!valid7){const err32 = {instancePath:instancePath+"/keys/" + i0+"/masked",schemaPath:"aether:bindings#/definitions/EndpointKey/properties/masked/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err32];}else {vErrors.push(err32);}errors++;}else {errors = _errs27;if(vErrors !== null){if(_errs27){vErrors.length = _errs27;}else {vErrors = null;}}}}if(data5.readable !== undefined){if(typeof data5.readable !== "boolean"){const err33 = {instancePath:instancePath+"/keys/" + i0+"/readable",schemaPath:"aether:bindings#/definitions/EndpointKey/properties/readable/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"};if(vErrors === null){vErrors = [err33];}else {vErrors.push(err33);}errors++;}}if(data5.exhaustedUntil !== undefined){let data11 = data5.exhaustedUntil;const _errs35 = errors;let valid8 = false;const _errs36 = errors;if(!((typeof data11 == "number") && (isFinite(data11)))){const err34 = {instancePath:instancePath+"/keys/" + i0+"/exhaustedUntil",schemaPath:"aether:bindings#/definitions/EndpointKey/properties/exhaustedUntil/anyOf/0/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err34];}else {vErrors.push(err34);}errors++;}var _valid2 = _errs36 === errors;valid8 = valid8 || _valid2;if(!valid8){const _errs38 = errors;if(data11 !== null){const err35 = {instancePath:instancePath+"/keys/" + i0+"/exhaustedUntil",schemaPath:"aether:bindings#/definitions/EndpointKey/properties/exhaustedUntil/anyOf/1/type",keyword:"type",params:{type: "null"},message:"must be null"};if(vErrors === null){vErrors = [err35];}else {vErrors.push(err35);}errors++;}var _valid2 = _errs38 === errors;valid8 = valid8 || _valid2;}if(!valid8){const err36 = {instancePath:instancePath+"/keys/" + i0+"/exhaustedUntil",schemaPath:"aether:bindings#/definitions/EndpointKey/properties/exhaustedUntil/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err36];}else {vErrors.push(err36);}errors++;}else {errors = _errs35;if(vErrors !== null){if(_errs35){vErrors.length = _errs35;}else {vErrors = null;}}}}if(data5.exhaustedReason !== undefined){let data12 = data5.exhaustedReason;const _errs41 = errors;let valid9 = false;const _errs42 = errors;if(typeof data12 !== "string"){const err37 = {instancePath:instancePath+"/keys/" + i0+"/exhaustedReason",schemaPath:"aether:bindings#/definitions/EndpointKey/properties/exhaustedReason/anyOf/0/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err37];}else {vErrors.push(err37);}errors++;}var _valid3 = _errs42 === errors;valid9 = valid9 || _valid3;if(!valid9){const _errs44 = errors;if(data12 !== null){const err38 = {instancePath:instancePath+"/keys/" + i0+"/exhaustedReason",schemaPath:"aether:bindings#/definitions/EndpointKey/properties/exhaustedReason/anyOf/1/type",keyword:"type",params:{type: "null"},message:"must be null"};if(vErrors === null){vErrors = [err38];}else {vErrors.push(err38);}errors++;}var _valid3 = _errs44 === errors;valid9 = valid9 || _valid3;}if(!valid9){const err39 = {instancePath:instancePath+"/keys/" + i0+"/exhaustedReason",schemaPath:"aether:bindings#/definitions/EndpointKey/properties/exhaustedReason/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err39];}else {vErrors.push(err39);}errors++;}else {errors = _errs41;if(vErrors !== null){if(_errs41){vErrors.length = _errs41;}else {vErrors = null;}}}}}else {const err40 = {instancePath:instancePath+"/keys/" + i0,schemaPath:"aether:bindings#/definitions/EndpointKey/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err40];}else {vErrors.push(err40);}errors++;}}}else {const err41 = {instancePath:instancePath+"/keys",schemaPath:"#/properties/keys/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err41];}else {vErrors.push(err41);}errors++;}}if(data.keyStrategy !== undefined){let data13 = data.keyStrategy;const _errs48 = errors;let valid11 = false;const _errs49 = errors;if("round_robin" !== data13){const err42 = {instancePath:instancePath+"/keyStrategy",schemaPath:"aether:bindings#/definitions/KeyStrategy/anyOf/0/const",keyword:"const",params:{allowedValue: "round_robin"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err42];}else {vErrors.push(err42);}errors++;}var _valid4 = _errs49 === errors;valid11 = valid11 || _valid4;if(!valid11){const _errs50 = errors;if("fill_first" !== data13){const err43 = {instancePath:instancePath+"/keyStrategy",schemaPath:"aether:bindings#/definitions/KeyStrategy/anyOf/1/const",keyword:"const",params:{allowedValue: "fill_first"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err43];}else {vErrors.push(err43);}errors++;}var _valid4 = _errs50 === errors;valid11 = valid11 || _valid4;}if(!valid11){const err44 = {instancePath:instancePath+"/keyStrategy",schemaPath:"aether:bindings#/definitions/KeyStrategy/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err44];}else {vErrors.push(err44);}errors++;}else {errors = _errs48;if(vErrors !== null){if(_errs48){vErrors.length = _errs48;}else {vErrors = null;}}}}if(data.probeUrl !== undefined){if(typeof data.probeUrl !== "string"){const err45 = {instancePath:instancePath+"/probeUrl",schemaPath:"#/properties/probeUrl/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err45];}else {vErrors.push(err45);}errors++;}}if(data.models !== undefined){let data15 = data.models;if(Array.isArray(data15)){const len1 = data15.length;for(let i1=0; i1<len1; i1++){if(!(validate70(data15[i1], {instancePath:instancePath+"/models/" + i1,parentData:data15,parentDataProperty:i1,rootData}))){vErrors = vErrors === null ? validate70.errors : vErrors.concat(validate70.errors);errors = vErrors.length;}}}else {const err46 = {instancePath:instancePath+"/models",schemaPath:"#/properties/models/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err46];}else {vErrors.push(err46);}errors++;}}if(data.imageBaseUrl !== undefined){let data17 = data.imageBaseUrl;const _errs57 = errors;let valid14 = false;const _errs58 = errors;if(typeof data17 !== "string"){const err47 = {instancePath:instancePath+"/imageBaseUrl",schemaPath:"#/properties/imageBaseUrl/anyOf/0/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err47];}else {vErrors.push(err47);}errors++;}var _valid5 = _errs58 === errors;valid14 = valid14 || _valid5;if(!valid14){const _errs60 = errors;if(data17 !== null){const err48 = {instancePath:instancePath+"/imageBaseUrl",schemaPath:"#/properties/imageBaseUrl/anyOf/1/type",keyword:"type",params:{type: "null"},message:"must be null"};if(vErrors === null){vErrors = [err48];}else {vErrors.push(err48);}errors++;}var _valid5 = _errs60 === errors;valid14 = valid14 || _valid5;}if(!valid14){const err49 = {instancePath:instancePath+"/imageBaseUrl",schemaPath:"#/properties/imageBaseUrl/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err49];}else {vErrors.push(err49);}errors++;}else {errors = _errs57;if(vErrors !== null){if(_errs57){vErrors.length = _errs57;}else {vErrors = null;}}}}if(data.imageEditBaseUrl !== undefined){let data18 = data.imageEditBaseUrl;const _errs63 = errors;let valid15 = false;const _errs64 = errors;if(typeof data18 !== "string"){const err50 = {instancePath:instancePath+"/imageEditBaseUrl",schemaPath:"#/properties/imageEditBaseUrl/anyOf/0/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err50];}else {vErrors.push(err50);}errors++;}var _valid6 = _errs64 === errors;valid15 = valid15 || _valid6;if(!valid15){const _errs66 = errors;if(data18 !== null){const err51 = {instancePath:instancePath+"/imageEditBaseUrl",schemaPath:"#/properties/imageEditBaseUrl/anyOf/1/type",keyword:"type",params:{type: "null"},message:"must be null"};if(vErrors === null){vErrors = [err51];}else {vErrors.push(err51);}errors++;}var _valid6 = _errs66 === errors;valid15 = valid15 || _valid6;}if(!valid15){const err52 = {instancePath:instancePath+"/imageEditBaseUrl",schemaPath:"#/properties/imageEditBaseUrl/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err52];}else {vErrors.push(err52);}errors++;}else {errors = _errs63;if(vErrors !== null){if(_errs63){vErrors.length = _errs63;}else {vErrors = null;}}}}if(data.headers !== undefined){let data19 = data.headers;if(data19 && typeof data19 == "object" && !Array.isArray(data19)){for(const key2 in data19){if(typeof data19[key2] !== "string"){const err53 = {instancePath:instancePath+"/headers/" + key2.replace(/~/g, "~0").replace(/\//g, "~1"),schemaPath:"#/properties/headers/additionalProperties/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err53];}else {vErrors.push(err53);}errors++;}}}else {const err54 = {instancePath:instancePath+"/headers",schemaPath:"#/properties/headers/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err54];}else {vErrors.push(err54);}errors++;}}}else {const err55 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err55];}else {vErrors.push(err55);}errors++;}validate69.errors = vErrors;return errors === 0;}function validate67(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="aether:validator:Endpoint" */;let vErrors = null;let errors = 0;if(!(validate69(data, {instancePath,parentData,parentDataProperty,rootData}))){vErrors = vErrors === null ? validate69.errors : vErrors.concat(validate69.errors);errors = vErrors.length;}validate67.errors = vErrors;return errors === 0;}export const validateEndpointKey = validate77;const schema81 = {"$id":"aether:validator:EndpointKey","$ref":"aether:bindings#/definitions/EndpointKey"};function validate77(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="aether:validator:EndpointKey" */;let vErrors = null;let errors = 0;if(data && typeof data == "object" && !Array.isArray(data)){if(data.id === undefined){const err0 = {instancePath,schemaPath:"aether:bindings#/definitions/EndpointKey/required",keyword:"required",params:{missingProperty: "id"},message:"must have required property '"+"id"+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}if(data.label === undefined){const err1 = {instancePath,schemaPath:"aether:bindings#/definitions/EndpointKey/required",keyword:"required",params:{missingProperty: "label"},message:"must have required property '"+"label"+"'"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}if(data.enabled === undefined){const err2 = {instancePath,schemaPath:"aether:bindings#/definitions/EndpointKey/required",keyword:"required",params:{missingProperty: "enabled"},message:"must have required property '"+"enabled"+"'"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}if(data.masked === undefined){const err3 = {instancePath,schemaPath:"aether:bindings#/definitions/EndpointKey/required",keyword:"required",params:{missingProperty: "masked"},message:"must have required property '"+"masked"+"'"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}if(data.readable === undefined){const err4 = {instancePath,schemaPath:"aether:bindings#/definitions/EndpointKey/required",keyword:"required",params:{missingProperty: "readable"},message:"must have required property '"+"readable"+"'"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}if(data.exhaustedUntil === undefined){const err5 = {instancePath,schemaPath:"aether:bindings#/definitions/EndpointKey/required",keyword:"required",params:{missingProperty: "exhaustedUntil"},message:"must have required property '"+"exhaustedUntil"+"'"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}if(data.exhaustedReason === undefined){const err6 = {instancePath,schemaPath:"aether:bindings#/definitions/EndpointKey/required",keyword:"required",params:{missingProperty: "exhaustedReason"},message:"must have required property '"+"exhaustedReason"+"'"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}for(const key0 in data){if(!(((((((key0 === "id") || (key0 === "label")) || (key0 === "enabled")) || (key0 === "masked")) || (key0 === "readable")) || (key0 === "exhaustedUntil")) || (key0 === "exhaustedReason"))){const err7 = {instancePath,schemaPath:"aether:bindings#/definitions/EndpointKey/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}}if(data.id !== undefined){if(typeof data.id !== "string"){const err8 = {instancePath:instancePath+"/id",schemaPath:"aether:bindings#/definitions/EndpointKey/properties/id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}}if(data.label !== undefined){if(typeof data.label !== "string"){const err9 = {instancePath:instancePath+"/label",schemaPath:"aether:bindings#/definitions/EndpointKey/properties/label/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}}if(data.enabled !== undefined){if(typeof data.enabled !== "boolean"){const err10 = {instancePath:instancePath+"/enabled",schemaPath:"aether:bindings#/definitions/EndpointKey/properties/enabled/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}}if(data.masked !== undefined){let data3 = data.masked;const _errs10 = errors;let valid2 = false;const _errs11 = errors;if(typeof data3 !== "string"){const err11 = {instancePath:instancePath+"/masked",schemaPath:"aether:bindings#/definitions/EndpointKey/properties/masked/anyOf/0/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}var _valid0 = _errs11 === errors;valid2 = valid2 || _valid0;if(!valid2){const _errs13 = errors;if(data3 !== null){const err12 = {instancePath:instancePath+"/masked",schemaPath:"aether:bindings#/definitions/EndpointKey/properties/masked/anyOf/1/type",keyword:"type",params:{type: "null"},message:"must be null"};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}var _valid0 = _errs13 === errors;valid2 = valid2 || _valid0;}if(!valid2){const err13 = {instancePath:instancePath+"/masked",schemaPath:"aether:bindings#/definitions/EndpointKey/properties/masked/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}else {errors = _errs10;if(vErrors !== null){if(_errs10){vErrors.length = _errs10;}else {vErrors = null;}}}}if(data.readable !== undefined){if(typeof data.readable !== "boolean"){const err14 = {instancePath:instancePath+"/readable",schemaPath:"aether:bindings#/definitions/EndpointKey/properties/readable/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"};if(vErrors === null){vErrors = [err14];}else {vErrors.push(err14);}errors++;}}if(data.exhaustedUntil !== undefined){let data5 = data.exhaustedUntil;const _errs18 = errors;let valid3 = false;const _errs19 = errors;if(!((typeof data5 == "number") && (isFinite(data5)))){const err15 = {instancePath:instancePath+"/exhaustedUntil",schemaPath:"aether:bindings#/definitions/EndpointKey/properties/exhaustedUntil/anyOf/0/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err15];}else {vErrors.push(err15);}errors++;}var _valid1 = _errs19 === errors;valid3 = valid3 || _valid1;if(!valid3){const _errs21 = errors;if(data5 !== null){const err16 = {instancePath:instancePath+"/exhaustedUntil",schemaPath:"aether:bindings#/definitions/EndpointKey/properties/exhaustedUntil/anyOf/1/type",keyword:"type",params:{type: "null"},message:"must be null"};if(vErrors === null){vErrors = [err16];}else {vErrors.push(err16);}errors++;}var _valid1 = _errs21 === errors;valid3 = valid3 || _valid1;}if(!valid3){const err17 = {instancePath:instancePath+"/exhaustedUntil",schemaPath:"aether:bindings#/definitions/EndpointKey/properties/exhaustedUntil/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err17];}else {vErrors.push(err17);}errors++;}else {errors = _errs18;if(vErrors !== null){if(_errs18){vErrors.length = _errs18;}else {vErrors = null;}}}}if(data.exhaustedReason !== undefined){let data6 = data.exhaustedReason;const _errs24 = errors;let valid4 = false;const _errs25 = errors;if(typeof data6 !== "string"){const err18 = {instancePath:instancePath+"/exhaustedReason",schemaPath:"aether:bindings#/definitions/EndpointKey/properties/exhaustedReason/anyOf/0/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err18];}else {vErrors.push(err18);}errors++;}var _valid2 = _errs25 === errors;valid4 = valid4 || _valid2;if(!valid4){const _errs27 = errors;if(data6 !== null){const err19 = {instancePath:instancePath+"/exhaustedReason",schemaPath:"aether:bindings#/definitions/EndpointKey/properties/exhaustedReason/anyOf/1/type",keyword:"type",params:{type: "null"},message:"must be null"};if(vErrors === null){vErrors = [err19];}else {vErrors.push(err19);}errors++;}var _valid2 = _errs27 === errors;valid4 = valid4 || _valid2;}if(!valid4){const err20 = {instancePath:instancePath+"/exhaustedReason",schemaPath:"aether:bindings#/definitions/EndpointKey/properties/exhaustedReason/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err20];}else {vErrors.push(err20);}errors++;}else {errors = _errs24;if(vErrors !== null){if(_errs24){vErrors.length = _errs24;}else {vErrors = null;}}}}}else {const err21 = {instancePath,schemaPath:"aether:bindings#/definitions/EndpointKey/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err21];}else {vErrors.push(err21);}errors++;}validate77.errors = vErrors;return errors === 0;}export const validateEndpointKeySave = validate78;const schema83 = {"$id":"aether:validator:EndpointKeySave","$ref":"aether:bindings#/definitions/EndpointKeySave"};const schema84 = {"type":"object","properties":{"endpointId":{"type":"string"},"id":{"type":"string"},"key":{"type":"string"},"label":{"type":"string"},"enabled":{"type":"boolean"},"restore":{"type":"boolean"}},"required":["endpointId"],"additionalProperties":false};function validate78(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="aether:validator:EndpointKeySave" */;let vErrors = null;let errors = 0;if(data && typeof data == "object" && !Array.isArray(data)){if(data.endpointId === undefined){const err0 = {instancePath,schemaPath:"aether:bindings#/definitions/EndpointKeySave/required",keyword:"required",params:{missingProperty: "endpointId"},message:"must have required property '"+"endpointId"+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}for(const key0 in data){if(!((((((key0 === "endpointId") || (key0 === "id")) || (key0 === "key")) || (key0 === "label")) || (key0 === "enabled")) || (key0 === "restore"))){const err1 = {instancePath,schemaPath:"aether:bindings#/definitions/EndpointKeySave/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}}if(data.endpointId !== undefined){if(typeof data.endpointId !== "string"){const err2 = {instancePath:instancePath+"/endpointId",schemaPath:"aether:bindings#/definitions/EndpointKeySave/properties/endpointId/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}}if(data.id !== undefined){if(typeof data.id !== "string"){const err3 = {instancePath:instancePath+"/id",schemaPath:"aether:bindings#/definitions/EndpointKeySave/properties/id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}}if(data.key !== undefined){if(typeof data.key !== "string"){const err4 = {instancePath:instancePath+"/key",schemaPath:"aether:bindings#/definitions/EndpointKeySave/properties/key/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}}if(data.label !== undefined){if(typeof data.label !== "string"){const err5 = {instancePath:instancePath+"/label",schemaPath:"aether:bindings#/definitions/EndpointKeySave/properties/label/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}}if(data.enabled !== undefined){if(typeof data.enabled !== "boolean"){const err6 = {instancePath:instancePath+"/enabled",schemaPath:"aether:bindings#/definitions/EndpointKeySave/properties/enabled/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}}if(data.restore !== undefined){if(typeof data.restore !== "boolean"){const err7 = {instancePath:instancePath+"/restore",schemaPath:"aether:bindings#/definitions/EndpointKeySave/properties/restore/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}}}else {const err8 = {instancePath,schemaPath:"aether:bindings#/definitions/EndpointKeySave/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}validate78.errors = vErrors;return errors === 0;}export const validateEndpointSave = validate79;const schema85 = {"$id":"aether:validator:EndpointSave","$ref":"aether:bindings#/definitions/EndpointSave"};const schema86 = {"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"baseUrl":{"type":"string"},"protocol":{"$ref":"aether:bindings#/definitions/Protocol"},"keyStrategy":{"$ref":"aether:bindings#/definitions/KeyStrategy"},"models":{"type":"array","items":{"$ref":"aether:bindings#/definitions/ModelSave"}},"imageBaseUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"imageEditBaseUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"headers":{"type":"object","additionalProperties":{"type":"string"}}},"required":["slug","baseUrl","protocol","models"],"additionalProperties":false};const schema89 = {"type":"object","properties":{"id":{"type":"string"},"modelType":{"$ref":"aether:bindings#/definitions/ModelType"},"typeSource":{"$ref":"aether:bindings#/definitions/TypeSource"},"contextWindow":{"anyOf":[{"type":"number"},{"type":"null"}]},"maxOutput":{"anyOf":[{"type":"number"},{"type":"null"}]},"canVision":{"type":"boolean"},"supportsTools":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"reasoning":{"anyOf":[{"$ref":"aether:bindings#/definitions/ReasoningConfig"},{"type":"null"}]},"nativeWebSearch":{"type":"boolean"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"groupName":{"anyOf":[{"type":"string"},{"type":"null"}]},"pricing":{"anyOf":[{"$ref":"aether:bindings#/definitions/ModelPricing"},{"type":"null"}]}},"required":["id","modelType","typeSource","contextWindow","maxOutput","canVision","supportsTools","nativeWebSearch","name","groupName","pricing"],"additionalProperties":false};function validate81(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;if(data && typeof data == "object" && !Array.isArray(data)){if(data.id === undefined){const err0 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "id"},message:"must have required property '"+"id"+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}if(data.modelType === undefined){const err1 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "modelType"},message:"must have required property '"+"modelType"+"'"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}if(data.typeSource === undefined){const err2 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "typeSource"},message:"must have required property '"+"typeSource"+"'"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}if(data.contextWindow === undefined){const err3 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "contextWindow"},message:"must have required property '"+"contextWindow"+"'"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}if(data.maxOutput === undefined){const err4 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "maxOutput"},message:"must have required property '"+"maxOutput"+"'"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}if(data.canVision === undefined){const err5 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "canVision"},message:"must have required property '"+"canVision"+"'"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}if(data.supportsTools === undefined){const err6 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "supportsTools"},message:"must have required property '"+"supportsTools"+"'"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}if(data.nativeWebSearch === undefined){const err7 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "nativeWebSearch"},message:"must have required property '"+"nativeWebSearch"+"'"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}if(data.name === undefined){const err8 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "name"},message:"must have required property '"+"name"+"'"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}if(data.groupName === undefined){const err9 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "groupName"},message:"must have required property '"+"groupName"+"'"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}if(data.pricing === undefined){const err10 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "pricing"},message:"must have required property '"+"pricing"+"'"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}for(const key0 in data){if(!(func8.call(schema89.properties, key0))){const err11 = {instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}}if(data.id !== undefined){if(typeof data.id !== "string"){const err12 = {instancePath:instancePath+"/id",schemaPath:"#/properties/id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}}if(data.modelType !== undefined){let data1 = data.modelType;const _errs6 = errors;let valid2 = false;const _errs7 = errors;if("chat" !== data1){const err13 = {instancePath:instancePath+"/modelType",schemaPath:"aether:bindings#/definitions/ModelType/anyOf/0/const",keyword:"const",params:{allowedValue: "chat"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}var _valid0 = _errs7 === errors;valid2 = valid2 || _valid0;if(!valid2){const _errs8 = errors;if("image" !== data1){const err14 = {instancePath:instancePath+"/modelType",schemaPath:"aether:bindings#/definitions/ModelType/anyOf/1/const",keyword:"const",params:{allowedValue: "image"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err14];}else {vErrors.push(err14);}errors++;}var _valid0 = _errs8 === errors;valid2 = valid2 || _valid0;if(!valid2){const _errs9 = errors;if("video" !== data1){const err15 = {instancePath:instancePath+"/modelType",schemaPath:"aether:bindings#/definitions/ModelType/anyOf/2/const",keyword:"const",params:{allowedValue: "video"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err15];}else {vErrors.push(err15);}errors++;}var _valid0 = _errs9 === errors;valid2 = valid2 || _valid0;if(!valid2){const _errs10 = errors;if("tts" !== data1){const err16 = {instancePath:instancePath+"/modelType",schemaPath:"aether:bindings#/definitions/ModelType/anyOf/3/const",keyword:"const",params:{allowedValue: "tts"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err16];}else {vErrors.push(err16);}errors++;}var _valid0 = _errs10 === errors;valid2 = valid2 || _valid0;if(!valid2){const _errs11 = errors;if("stt" !== data1){const err17 = {instancePath:instancePath+"/modelType",schemaPath:"aether:bindings#/definitions/ModelType/anyOf/4/const",keyword:"const",params:{allowedValue: "stt"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err17];}else {vErrors.push(err17);}errors++;}var _valid0 = _errs11 === errors;valid2 = valid2 || _valid0;if(!valid2){const _errs12 = errors;if("embedding" !== data1){const err18 = {instancePath:instancePath+"/modelType",schemaPath:"aether:bindings#/definitions/ModelType/anyOf/5/const",keyword:"const",params:{allowedValue: "embedding"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err18];}else {vErrors.push(err18);}errors++;}var _valid0 = _errs12 === errors;valid2 = valid2 || _valid0;if(!valid2){const _errs13 = errors;if("rerank" !== data1){const err19 = {instancePath:instancePath+"/modelType",schemaPath:"aether:bindings#/definitions/ModelType/anyOf/6/const",keyword:"const",params:{allowedValue: "rerank"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err19];}else {vErrors.push(err19);}errors++;}var _valid0 = _errs13 === errors;valid2 = valid2 || _valid0;if(!valid2){const _errs14 = errors;if("unknown" !== data1){const err20 = {instancePath:instancePath+"/modelType",schemaPath:"aether:bindings#/definitions/ModelType/anyOf/7/const",keyword:"const",params:{allowedValue: "unknown"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err20];}else {vErrors.push(err20);}errors++;}var _valid0 = _errs14 === errors;valid2 = valid2 || _valid0;}}}}}}}if(!valid2){const err21 = {instancePath:instancePath+"/modelType",schemaPath:"aether:bindings#/definitions/ModelType/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err21];}else {vErrors.push(err21);}errors++;}else {errors = _errs6;if(vErrors !== null){if(_errs6){vErrors.length = _errs6;}else {vErrors = null;}}}}if(data.typeSource !== undefined){let data2 = data.typeSource;const _errs17 = errors;let valid4 = false;const _errs18 = errors;if("inferred" !== data2){const err22 = {instancePath:instancePath+"/typeSource",schemaPath:"aether:bindings#/definitions/TypeSource/anyOf/0/const",keyword:"const",params:{allowedValue: "inferred"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err22];}else {vErrors.push(err22);}errors++;}var _valid1 = _errs18 === errors;valid4 = valid4 || _valid1;if(!valid4){const _errs19 = errors;if("user" !== data2){const err23 = {instancePath:instancePath+"/typeSource",schemaPath:"aether:bindings#/definitions/TypeSource/anyOf/1/const",keyword:"const",params:{allowedValue: "user"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err23];}else {vErrors.push(err23);}errors++;}var _valid1 = _errs19 === errors;valid4 = valid4 || _valid1;}if(!valid4){const err24 = {instancePath:instancePath+"/typeSource",schemaPath:"aether:bindings#/definitions/TypeSource/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err24];}else {vErrors.push(err24);}errors++;}else {errors = _errs17;if(vErrors !== null){if(_errs17){vErrors.length = _errs17;}else {vErrors = null;}}}}if(data.contextWindow !== undefined){let data3 = data.contextWindow;const _errs21 = errors;let valid5 = false;const _errs22 = errors;if(!((typeof data3 == "number") && (isFinite(data3)))){const err25 = {instancePath:instancePath+"/contextWindow",schemaPath:"#/properties/contextWindow/anyOf/0/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err25];}else {vErrors.push(err25);}errors++;}var _valid2 = _errs22 === errors;valid5 = valid5 || _valid2;if(!valid5){const _errs24 = errors;if(data3 !== null){const err26 = {instancePath:instancePath+"/contextWindow",schemaPath:"#/properties/contextWindow/anyOf/1/type",keyword:"type",params:{type: "null"},message:"must be null"};if(vErrors === null){vErrors = [err26];}else {vErrors.push(err26);}errors++;}var _valid2 = _errs24 === errors;valid5 = valid5 || _valid2;}if(!valid5){const err27 = {instancePath:instancePath+"/contextWindow",schemaPath:"#/properties/contextWindow/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err27];}else {vErrors.push(err27);}errors++;}else {errors = _errs21;if(vErrors !== null){if(_errs21){vErrors.length = _errs21;}else {vErrors = null;}}}}if(data.maxOutput !== undefined){let data4 = data.maxOutput;const _errs27 = errors;let valid6 = false;const _errs28 = errors;if(!((typeof data4 == "number") && (isFinite(data4)))){const err28 = {instancePath:instancePath+"/maxOutput",schemaPath:"#/properties/maxOutput/anyOf/0/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err28];}else {vErrors.push(err28);}errors++;}var _valid3 = _errs28 === errors;valid6 = valid6 || _valid3;if(!valid6){const _errs30 = errors;if(data4 !== null){const err29 = {instancePath:instancePath+"/maxOutput",schemaPath:"#/properties/maxOutput/anyOf/1/type",keyword:"type",params:{type: "null"},message:"must be null"};if(vErrors === null){vErrors = [err29];}else {vErrors.push(err29);}errors++;}var _valid3 = _errs30 === errors;valid6 = valid6 || _valid3;}if(!valid6){const err30 = {instancePath:instancePath+"/maxOutput",schemaPath:"#/properties/maxOutput/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err30];}else {vErrors.push(err30);}errors++;}else {errors = _errs27;if(vErrors !== null){if(_errs27){vErrors.length = _errs27;}else {vErrors = null;}}}}if(data.canVision !== undefined){if(typeof data.canVision !== "boolean"){const err31 = {instancePath:instancePath+"/canVision",schemaPath:"#/properties/canVision/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"};if(vErrors === null){vErrors = [err31];}else {vErrors.push(err31);}errors++;}}if(data.supportsTools !== undefined){let data6 = data.supportsTools;const _errs35 = errors;let valid7 = false;const _errs36 = errors;if(typeof data6 !== "boolean"){const err32 = {instancePath:instancePath+"/supportsTools",schemaPath:"#/properties/supportsTools/anyOf/0/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"};if(vErrors === null){vErrors = [err32];}else {vErrors.push(err32);}errors++;}var _valid4 = _errs36 === errors;valid7 = valid7 || _valid4;if(!valid7){const _errs38 = errors;if(data6 !== null){const err33 = {instancePath:instancePath+"/supportsTools",schemaPath:"#/properties/supportsTools/anyOf/1/type",keyword:"type",params:{type: "null"},message:"must be null"};if(vErrors === null){vErrors = [err33];}else {vErrors.push(err33);}errors++;}var _valid4 = _errs38 === errors;valid7 = valid7 || _valid4;}if(!valid7){const err34 = {instancePath:instancePath+"/supportsTools",schemaPath:"#/properties/supportsTools/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err34];}else {vErrors.push(err34);}errors++;}else {errors = _errs35;if(vErrors !== null){if(_errs35){vErrors.length = _errs35;}else {vErrors = null;}}}}if(data.reasoning !== undefined){let data7 = data.reasoning;const _errs41 = errors;let valid8 = false;const _errs42 = errors;if(!(validate71(data7, {instancePath:instancePath+"/reasoning",parentData:data,parentDataProperty:"reasoning",rootData}))){vErrors = vErrors === null ? validate71.errors : vErrors.concat(validate71.errors);errors = vErrors.length;}var _valid5 = _errs42 === errors;valid8 = valid8 || _valid5;if(!valid8){const _errs43 = errors;if(data7 !== null){const err35 = {instancePath:instancePath+"/reasoning",schemaPath:"#/properties/reasoning/anyOf/1/type",keyword:"type",params:{type: "null"},message:"must be null"};if(vErrors === null){vErrors = [err35];}else {vErrors.push(err35);}errors++;}var _valid5 = _errs43 === errors;valid8 = valid8 || _valid5;}if(!valid8){const err36 = {instancePath:instancePath+"/reasoning",schemaPath:"#/properties/reasoning/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err36];}else {vErrors.push(err36);}errors++;}else {errors = _errs41;if(vErrors !== null){if(_errs41){vErrors.length = _errs41;}else {vErrors = null;}}}}if(data.nativeWebSearch !== undefined){if(typeof data.nativeWebSearch !== "boolean"){const err37 = {instancePath:instancePath+"/nativeWebSearch",schemaPath:"#/properties/nativeWebSearch/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"};if(vErrors === null){vErrors = [err37];}else {vErrors.push(err37);}errors++;}}if(data.name !== undefined){let data9 = data.name;const _errs48 = errors;let valid9 = false;const _errs49 = errors;if(typeof data9 !== "string"){const err38 = {instancePath:instancePath+"/name",schemaPath:"#/properties/name/anyOf/0/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err38];}else {vErrors.push(err38);}errors++;}var _valid6 = _errs49 === errors;valid9 = valid9 || _valid6;if(!valid9){const _errs51 = errors;if(data9 !== null){const err39 = {instancePath:instancePath+"/name",schemaPath:"#/properties/name/anyOf/1/type",keyword:"type",params:{type: "null"},message:"must be null"};if(vErrors === null){vErrors = [err39];}else {vErrors.push(err39);}errors++;}var _valid6 = _errs51 === errors;valid9 = valid9 || _valid6;}if(!valid9){const err40 = {instancePath:instancePath+"/name",schemaPath:"#/properties/name/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err40];}else {vErrors.push(err40);}errors++;}else {errors = _errs48;if(vErrors !== null){if(_errs48){vErrors.length = _errs48;}else {vErrors = null;}}}}if(data.groupName !== undefined){let data10 = data.groupName;const _errs54 = errors;let valid10 = false;const _errs55 = errors;if(typeof data10 !== "string"){const err41 = {instancePath:instancePath+"/groupName",schemaPath:"#/properties/groupName/anyOf/0/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err41];}else {vErrors.push(err41);}errors++;}var _valid7 = _errs55 === errors;valid10 = valid10 || _valid7;if(!valid10){const _errs57 = errors;if(data10 !== null){const err42 = {instancePath:instancePath+"/groupName",schemaPath:"#/properties/groupName/anyOf/1/type",keyword:"type",params:{type: "null"},message:"must be null"};if(vErrors === null){vErrors = [err42];}else {vErrors.push(err42);}errors++;}var _valid7 = _errs57 === errors;valid10 = valid10 || _valid7;}if(!valid10){const err43 = {instancePath:instancePath+"/groupName",schemaPath:"#/properties/groupName/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err43];}else {vErrors.push(err43);}errors++;}else {errors = _errs54;if(vErrors !== null){if(_errs54){vErrors.length = _errs54;}else {vErrors = null;}}}}if(data.pricing !== undefined){let data11 = data.pricing;const _errs60 = errors;let valid11 = false;const _errs61 = errors;if(!(validate73(data11, {instancePath:instancePath+"/pricing",parentData:data,parentDataProperty:"pricing",rootData}))){vErrors = vErrors === null ? validate73.errors : vErrors.concat(validate73.errors);errors = vErrors.length;}var _valid8 = _errs61 === errors;valid11 = valid11 || _valid8;if(!valid11){const _errs62 = errors;if(data11 !== null){const err44 = {instancePath:instancePath+"/pricing",schemaPath:"#/properties/pricing/anyOf/1/type",keyword:"type",params:{type: "null"},message:"must be null"};if(vErrors === null){vErrors = [err44];}else {vErrors.push(err44);}errors++;}var _valid8 = _errs62 === errors;valid11 = valid11 || _valid8;}if(!valid11){const err45 = {instancePath:instancePath+"/pricing",schemaPath:"#/properties/pricing/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err45];}else {vErrors.push(err45);}errors++;}else {errors = _errs60;if(vErrors !== null){if(_errs60){vErrors.length = _errs60;}else {vErrors = null;}}}}}else {const err46 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err46];}else {vErrors.push(err46);}errors++;}validate81.errors = vErrors;return errors === 0;}function validate80(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;if(data && typeof data == "object" && !Array.isArray(data)){if(data.slug === undefined){const err0 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "slug"},message:"must have required property '"+"slug"+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}if(data.baseUrl === undefined){const err1 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "baseUrl"},message:"must have required property '"+"baseUrl"+"'"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}if(data.protocol === undefined){const err2 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "protocol"},message:"must have required property '"+"protocol"+"'"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}if(data.models === undefined){const err3 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "models"},message:"must have required property '"+"models"+"'"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}for(const key0 in data){if(!(func8.call(schema86.properties, key0))){const err4 = {instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}}if(data.id !== undefined){if(typeof data.id !== "string"){const err5 = {instancePath:instancePath+"/id",schemaPath:"#/properties/id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}}if(data.slug !== undefined){if(typeof data.slug !== "string"){const err6 = {instancePath:instancePath+"/slug",schemaPath:"#/properties/slug/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}}if(data.baseUrl !== undefined){if(typeof data.baseUrl !== "string"){const err7 = {instancePath:instancePath+"/baseUrl",schemaPath:"#/properties/baseUrl/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}}if(data.protocol !== undefined){let data3 = data.protocol;const _errs10 = errors;let valid2 = false;const _errs11 = errors;if("anthropic-messages" !== data3){const err8 = {instancePath:instancePath+"/protocol",schemaPath:"aether:bindings#/definitions/Protocol/anyOf/0/const",keyword:"const",params:{allowedValue: "anthropic-messages"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}var _valid0 = _errs11 === errors;valid2 = valid2 || _valid0;if(!valid2){const _errs12 = errors;if("openai-chat" !== data3){const err9 = {instancePath:instancePath+"/protocol",schemaPath:"aether:bindings#/definitions/Protocol/anyOf/1/const",keyword:"const",params:{allowedValue: "openai-chat"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}var _valid0 = _errs12 === errors;valid2 = valid2 || _valid0;if(!valid2){const _errs13 = errors;if("openai-responses" !== data3){const err10 = {instancePath:instancePath+"/protocol",schemaPath:"aether:bindings#/definitions/Protocol/anyOf/2/const",keyword:"const",params:{allowedValue: "openai-responses"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}var _valid0 = _errs13 === errors;valid2 = valid2 || _valid0;}}if(!valid2){const err11 = {instancePath:instancePath+"/protocol",schemaPath:"aether:bindings#/definitions/Protocol/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}else {errors = _errs10;if(vErrors !== null){if(_errs10){vErrors.length = _errs10;}else {vErrors = null;}}}}if(data.keyStrategy !== undefined){let data4 = data.keyStrategy;const _errs16 = errors;let valid4 = false;const _errs17 = errors;if("round_robin" !== data4){const err12 = {instancePath:instancePath+"/keyStrategy",schemaPath:"aether:bindings#/definitions/KeyStrategy/anyOf/0/const",keyword:"const",params:{allowedValue: "round_robin"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}var _valid1 = _errs17 === errors;valid4 = valid4 || _valid1;if(!valid4){const _errs18 = errors;if("fill_first" !== data4){const err13 = {instancePath:instancePath+"/keyStrategy",schemaPath:"aether:bindings#/definitions/KeyStrategy/anyOf/1/const",keyword:"const",params:{allowedValue: "fill_first"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}var _valid1 = _errs18 === errors;valid4 = valid4 || _valid1;}if(!valid4){const err14 = {instancePath:instancePath+"/keyStrategy",schemaPath:"aether:bindings#/definitions/KeyStrategy/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err14];}else {vErrors.push(err14);}errors++;}else {errors = _errs16;if(vErrors !== null){if(_errs16){vErrors.length = _errs16;}else {vErrors = null;}}}}if(data.models !== undefined){let data5 = data.models;if(Array.isArray(data5)){const len0 = data5.length;for(let i0=0; i0<len0; i0++){if(!(validate81(data5[i0], {instancePath:instancePath+"/models/" + i0,parentData:data5,parentDataProperty:i0,rootData}))){vErrors = vErrors === null ? validate81.errors : vErrors.concat(validate81.errors);errors = vErrors.length;}}}else {const err15 = {instancePath:instancePath+"/models",schemaPath:"#/properties/models/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err15];}else {vErrors.push(err15);}errors++;}}if(data.imageBaseUrl !== undefined){let data7 = data.imageBaseUrl;const _errs23 = errors;let valid7 = false;const _errs24 = errors;if(typeof data7 !== "string"){const err16 = {instancePath:instancePath+"/imageBaseUrl",schemaPath:"#/properties/imageBaseUrl/anyOf/0/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err16];}else {vErrors.push(err16);}errors++;}var _valid2 = _errs24 === errors;valid7 = valid7 || _valid2;if(!valid7){const _errs26 = errors;if(data7 !== null){const err17 = {instancePath:instancePath+"/imageBaseUrl",schemaPath:"#/properties/imageBaseUrl/anyOf/1/type",keyword:"type",params:{type: "null"},message:"must be null"};if(vErrors === null){vErrors = [err17];}else {vErrors.push(err17);}errors++;}var _valid2 = _errs26 === errors;valid7 = valid7 || _valid2;}if(!valid7){const err18 = {instancePath:instancePath+"/imageBaseUrl",schemaPath:"#/properties/imageBaseUrl/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err18];}else {vErrors.push(err18);}errors++;}else {errors = _errs23;if(vErrors !== null){if(_errs23){vErrors.length = _errs23;}else {vErrors = null;}}}}if(data.imageEditBaseUrl !== undefined){let data8 = data.imageEditBaseUrl;const _errs29 = errors;let valid8 = false;const _errs30 = errors;if(typeof data8 !== "string"){const err19 = {instancePath:instancePath+"/imageEditBaseUrl",schemaPath:"#/properties/imageEditBaseUrl/anyOf/0/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err19];}else {vErrors.push(err19);}errors++;}var _valid3 = _errs30 === errors;valid8 = valid8 || _valid3;if(!valid8){const _errs32 = errors;if(data8 !== null){const err20 = {instancePath:instancePath+"/imageEditBaseUrl",schemaPath:"#/properties/imageEditBaseUrl/anyOf/1/type",keyword:"type",params:{type: "null"},message:"must be null"};if(vErrors === null){vErrors = [err20];}else {vErrors.push(err20);}errors++;}var _valid3 = _errs32 === errors;valid8 = valid8 || _valid3;}if(!valid8){const err21 = {instancePath:instancePath+"/imageEditBaseUrl",schemaPath:"#/properties/imageEditBaseUrl/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err21];}else {vErrors.push(err21);}errors++;}else {errors = _errs29;if(vErrors !== null){if(_errs29){vErrors.length = _errs29;}else {vErrors = null;}}}}if(data.headers !== undefined){let data9 = data.headers;if(data9 && typeof data9 == "object" && !Array.isArray(data9)){for(const key1 in data9){if(typeof data9[key1] !== "string"){const err22 = {instancePath:instancePath+"/headers/" + key1.replace(/~/g, "~0").replace(/\//g, "~1"),schemaPath:"#/properties/headers/additionalProperties/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err22];}else {vErrors.push(err22);}errors++;}}}else {const err23 = {instancePath:instancePath+"/headers",schemaPath:"#/properties/headers/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err23];}else {vErrors.push(err23);}errors++;}}}else {const err24 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err24];}else {vErrors.push(err24);}errors++;}validate80.errors = vErrors;return errors === 0;}function validate79(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="aether:validator:EndpointSave" */;let vErrors = null;let errors = 0;if(!(validate80(data, {instancePath,parentData,parentDataProperty,rootData}))){vErrors = vErrors === null ? validate80.errors : vErrors.concat(validate80.errors);errors = vErrors.length;}validate79.errors = vErrors;return errors === 0;}export const validateImagePart = validate86;const schema92 = {"$id":"aether:validator:ImagePart","$ref":"https://aether.local/contracts/v1/common.schema.json#/definitions/ImagePart"};const schema93 = {"type":"object","additionalProperties":false,"required":["mime","data"],"properties":{"mime":{"$ref":"#/definitions/ImageMime"},"data":{"type":"string","maxLength":5592408,"$comment":"Atomic lookahead/backreference chunks prevent V8 from retaining a backtracking frame for each of up to 5592408 bytes. Both repeated groups are bounded by the encoded maxLength (1365 large chunks and 1023 small chunks). Padding still enforces canonical zero trailing bits.","pattern":"^(?:(?=([A-Za-z0-9+/]{4096}))\\1)*(?:(?=([A-Za-z0-9+/]{4}))\\2){0,1023}(?:[A-Za-z0-9+/][AQgw]==|[A-Za-z0-9+/]{2}[AEIMQUYcgkosw048]=)?$(?![\\s\\S])","allOf":[{"if":{"minLength":5592408},"then":{"pattern":"==$"}}]}}};const pattern0 = new RegExp("==$", "u");const pattern1 = new RegExp("^(?:(?=([A-Za-z0-9+/]{4096}))\\1)*(?:(?=([A-Za-z0-9+/]{4}))\\2){0,1023}(?:[A-Za-z0-9+/][AQgw]==|[A-Za-z0-9+/]{2}[AEIMQUYcgkosw048]=)?$(?![\\s\\S])", "u");function validate87(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;if(data && typeof data == "object" && !Array.isArray(data)){if(data.mime === undefined){const err0 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "mime"},message:"must have required property '"+"mime"+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}if(data.data === undefined){const err1 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "data"},message:"must have required property '"+"data"+"'"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}for(const key0 in data){if(!((key0 === "mime") || (key0 === "data"))){const err2 = {instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}}if(data.mime !== undefined){let data0 = data.mime;if(!((((data0 === "image/png") || (data0 === "image/jpeg")) || (data0 === "image/webp")) || (data0 === "image/gif"))){const err3 = {instancePath:instancePath+"/mime",schemaPath:"#/definitions/ImageMime/enum",keyword:"enum",params:{allowedValues: schema46.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}}if(data.data !== undefined){let data1 = data.data;const _errs8 = errors;let valid3 = true;const _errs9 = errors;if(typeof data1 === "string"){if(func2(data1) < 5592408){const err4 = {};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}}var _valid0 = _errs9 === errors;errors = _errs8;if(vErrors !== null){if(_errs8){vErrors.length = _errs8;}else {vErrors = null;}}if(_valid0){const _errs10 = errors;if(typeof data1 === "string"){if(!pattern0.test(data1)){const err5 = {instancePath:instancePath+"/data",schemaPath:"#/properties/data/allOf/0/then/pattern",keyword:"pattern",params:{pattern: "==$"},message:"must match pattern \""+"==$"+"\""};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}}var _valid0 = _errs10 === errors;valid3 = _valid0;}if(!valid3){const err6 = {instancePath:instancePath+"/data",schemaPath:"#/properties/data/allOf/0/if",keyword:"if",params:{failingKeyword: "then"},message:"must match \"then\" schema"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}if(typeof data1 === "string"){if(func2(data1) > 5592408){const err7 = {instancePath:instancePath+"/data",schemaPath:"#/properties/data/maxLength",keyword:"maxLength",params:{limit: 5592408},message:"must NOT have more than 5592408 characters"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}if(!pattern1.test(data1)){const err8 = {instancePath:instancePath+"/data",schemaPath:"#/properties/data/pattern",keyword:"pattern",params:{pattern: "^(?:(?=([A-Za-z0-9+/]{4096}))\\1)*(?:(?=([A-Za-z0-9+/]{4}))\\2){0,1023}(?:[A-Za-z0-9+/][AQgw]==|[A-Za-z0-9+/]{2}[AEIMQUYcgkosw048]=)?$(?![\\s\\S])"},message:"must match pattern \""+"^(?:(?=([A-Za-z0-9+/]{4096}))\\1)*(?:(?=([A-Za-z0-9+/]{4}))\\2){0,1023}(?:[A-Za-z0-9+/][AQgw]==|[A-Za-z0-9+/]{2}[AEIMQUYcgkosw048]=)?$(?![\\s\\S])"+"\""};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}}else {const err9 = {instancePath:instancePath+"/data",schemaPath:"#/properties/data/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}}}else {const err10 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}validate87.errors = vErrors;return errors === 0;}function validate86(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="aether:validator:ImagePart" */;let vErrors = null;let errors = 0;if(!(validate87(data, {instancePath,parentData,parentDataProperty,rootData}))){vErrors = vErrors === null ? validate87.errors : vErrors.concat(validate87.errors);errors = vErrors.length;}validate86.errors = vErrors;return errors === 0;}export const validateImageRef = validate89;const schema95 = {"$id":"aether:validator:ImageRef","$ref":"https://aether.local/contracts/v1/common.schema.json#/definitions/ImageRef"};function validate90(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;if(data && typeof data == "object" && !Array.isArray(data)){if(data.mime === undefined){const err0 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "mime"},message:"must have required property '"+"mime"+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}if(data.url === undefined){const err1 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "url"},message:"must have required property '"+"url"+"'"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}for(const key0 in data){if(!((key0 === "mime") || (key0 === "url"))){const err2 = {instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}}if(data.mime !== undefined){let data0 = data.mime;if(!((((data0 === "image/png") || (data0 === "image/jpeg")) || (data0 === "image/webp")) || (data0 === "image/gif"))){const err3 = {instancePath:instancePath+"/mime",schemaPath:"#/definitions/ImageMime/enum",keyword:"enum",params:{allowedValues: schema46.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}}if(data.url !== undefined){let data1 = data.url;if((typeof data1 !== "string") && (data1 !== null)){const err4 = {instancePath:instancePath+"/url",schemaPath:"#/properties/url/type",keyword:"type",params:{type: schema45.properties.url.type},message:"must be string,null"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}}}else {const err5 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}validate90.errors = vErrors;return errors === 0;}function validate89(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="aether:validator:ImageRef" */;let vErrors = null;let errors = 0;if(!(validate90(data, {instancePath,parentData,parentDataProperty,rootData}))){vErrors = vErrors === null ? validate90.errors : vErrors.concat(validate90.errors);errors = vErrors.length;}validate89.errors = vErrors;return errors === 0;}export const validateIngestBatch = validate92;const schema98 = {"$id":"aether:validator:IngestBatch","$ref":"aether:bindings#/definitions/IngestBatch"};const schema99 = {"type":"object","properties":{"entries":{"type":"array","items":{"$ref":"aether:bindings#/definitions/IngestEntry"}},"droppedCount":{"type":"number"}},"required":["entries","droppedCount"],"additionalProperties":false};const schema100 = {"type":"object","properties":{"level":{"$ref":"aether:bindings#/definitions/IngestLevel"},"event":{"type":"string"},"fields":{"type":"object","additionalProperties":{}}},"required":["level","event"],"additionalProperties":false};const schema101 = {"anyOf":[{"const":"debug"},{"const":"info"},{"const":"warn"},{"const":"error"}]};function validate94(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;if(data && typeof data == "object" && !Array.isArray(data)){if(data.level === undefined){const err0 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "level"},message:"must have required property '"+"level"+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}if(data.event === undefined){const err1 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "event"},message:"must have required property '"+"event"+"'"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}for(const key0 in data){if(!(((key0 === "level") || (key0 === "event")) || (key0 === "fields"))){const err2 = {instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}}if(data.level !== undefined){let data0 = data.level;const _errs4 = errors;let valid2 = false;const _errs5 = errors;if("debug" !== data0){const err3 = {instancePath:instancePath+"/level",schemaPath:"aether:bindings#/definitions/IngestLevel/anyOf/0/const",keyword:"const",params:{allowedValue: "debug"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}var _valid0 = _errs5 === errors;valid2 = valid2 || _valid0;if(!valid2){const _errs6 = errors;if("info" !== data0){const err4 = {instancePath:instancePath+"/level",schemaPath:"aether:bindings#/definitions/IngestLevel/anyOf/1/const",keyword:"const",params:{allowedValue: "info"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}var _valid0 = _errs6 === errors;valid2 = valid2 || _valid0;if(!valid2){const _errs7 = errors;if("warn" !== data0){const err5 = {instancePath:instancePath+"/level",schemaPath:"aether:bindings#/definitions/IngestLevel/anyOf/2/const",keyword:"const",params:{allowedValue: "warn"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}var _valid0 = _errs7 === errors;valid2 = valid2 || _valid0;if(!valid2){const _errs8 = errors;if("error" !== data0){const err6 = {instancePath:instancePath+"/level",schemaPath:"aether:bindings#/definitions/IngestLevel/anyOf/3/const",keyword:"const",params:{allowedValue: "error"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}var _valid0 = _errs8 === errors;valid2 = valid2 || _valid0;}}}if(!valid2){const err7 = {instancePath:instancePath+"/level",schemaPath:"aether:bindings#/definitions/IngestLevel/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}else {errors = _errs4;if(vErrors !== null){if(_errs4){vErrors.length = _errs4;}else {vErrors = null;}}}}if(data.event !== undefined){if(typeof data.event !== "string"){const err8 = {instancePath:instancePath+"/event",schemaPath:"#/properties/event/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}}if(data.fields !== undefined){let data2 = data.fields;if(data2 && typeof data2 == "object" && !Array.isArray(data2)){}else {const err9 = {instancePath:instancePath+"/fields",schemaPath:"#/properties/fields/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}}}else {const err10 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}validate94.errors = vErrors;return errors === 0;}function validate93(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;if(data && typeof data == "object" && !Array.isArray(data)){if(data.entries === undefined){const err0 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "entries"},message:"must have required property '"+"entries"+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}if(data.droppedCount === undefined){const err1 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "droppedCount"},message:"must have required property '"+"droppedCount"+"'"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}for(const key0 in data){if(!((key0 === "entries") || (key0 === "droppedCount"))){const err2 = {instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}}if(data.entries !== undefined){let data0 = data.entries;if(Array.isArray(data0)){const len0 = data0.length;for(let i0=0; i0<len0; i0++){if(!(validate94(data0[i0], {instancePath:instancePath+"/entries/" + i0,parentData:data0,parentDataProperty:i0,rootData}))){vErrors = vErrors === null ? validate94.errors : vErrors.concat(validate94.errors);errors = vErrors.length;}}}else {const err3 = {instancePath:instancePath+"/entries",schemaPath:"#/properties/entries/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}}if(data.droppedCount !== undefined){let data2 = data.droppedCount;if(!((typeof data2 == "number") && (isFinite(data2)))){const err4 = {instancePath:instancePath+"/droppedCount",schemaPath:"#/properties/droppedCount/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}}}else {const err5 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}validate93.errors = vErrors;return errors === 0;}function validate92(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="aether:validator:IngestBatch" */;let vErrors = null;let errors = 0;if(!(validate93(data, {instancePath,parentData,parentDataProperty,rootData}))){vErrors = vErrors === null ? validate93.errors : vErrors.concat(validate93.errors);errors = vErrors.length;}validate92.errors = vErrors;return errors === 0;}export const validateIngestEntry = validate97;const schema102 = {"$id":"aether:validator:IngestEntry","$ref":"aether:bindings#/definitions/IngestEntry"};function validate98(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;if(data && typeof data == "object" && !Array.isArray(data)){if(data.level === undefined){const err0 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "level"},message:"must have required property '"+"level"+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}if(data.event === undefined){const err1 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "event"},message:"must have required property '"+"event"+"'"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}for(const key0 in data){if(!(((key0 === "level") || (key0 === "event")) || (key0 === "fields"))){const err2 = {instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}}if(data.level !== undefined){let data0 = data.level;const _errs4 = errors;let valid2 = false;const _errs5 = errors;if("debug" !== data0){const err3 = {instancePath:instancePath+"/level",schemaPath:"aether:bindings#/definitions/IngestLevel/anyOf/0/const",keyword:"const",params:{allowedValue: "debug"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}var _valid0 = _errs5 === errors;valid2 = valid2 || _valid0;if(!valid2){const _errs6 = errors;if("info" !== data0){const err4 = {instancePath:instancePath+"/level",schemaPath:"aether:bindings#/definitions/IngestLevel/anyOf/1/const",keyword:"const",params:{allowedValue: "info"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}var _valid0 = _errs6 === errors;valid2 = valid2 || _valid0;if(!valid2){const _errs7 = errors;if("warn" !== data0){const err5 = {instancePath:instancePath+"/level",schemaPath:"aether:bindings#/definitions/IngestLevel/anyOf/2/const",keyword:"const",params:{allowedValue: "warn"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}var _valid0 = _errs7 === errors;valid2 = valid2 || _valid0;if(!valid2){const _errs8 = errors;if("error" !== data0){const err6 = {instancePath:instancePath+"/level",schemaPath:"aether:bindings#/definitions/IngestLevel/anyOf/3/const",keyword:"const",params:{allowedValue: "error"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}var _valid0 = _errs8 === errors;valid2 = valid2 || _valid0;}}}if(!valid2){const err7 = {instancePath:instancePath+"/level",schemaPath:"aether:bindings#/definitions/IngestLevel/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}else {errors = _errs4;if(vErrors !== null){if(_errs4){vErrors.length = _errs4;}else {vErrors = null;}}}}if(data.event !== undefined){if(typeof data.event !== "string"){const err8 = {instancePath:instancePath+"/event",schemaPath:"#/properties/event/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}}if(data.fields !== undefined){let data2 = data.fields;if(data2 && typeof data2 == "object" && !Array.isArray(data2)){}else {const err9 = {instancePath:instancePath+"/fields",schemaPath:"#/properties/fields/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}}}else {const err10 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}validate98.errors = vErrors;return errors === 0;}function validate97(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="aether:validator:IngestEntry" */;let vErrors = null;let errors = 0;if(!(validate98(data, {instancePath,parentData,parentDataProperty,rootData}))){vErrors = vErrors === null ? validate98.errors : vErrors.concat(validate98.errors);errors = vErrors.length;}validate97.errors = vErrors;return errors === 0;}export const validateIngestLevel = validate100;const schema105 = {"$id":"aether:validator:IngestLevel","$ref":"aether:bindings#/definitions/IngestLevel"};function validate100(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="aether:validator:IngestLevel" */;let vErrors = null;let errors = 0;const _errs1 = errors;let valid1 = false;const _errs2 = errors;if("debug" !== data){const err0 = {instancePath,schemaPath:"aether:bindings#/definitions/IngestLevel/anyOf/0/const",keyword:"const",params:{allowedValue: "debug"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}var _valid0 = _errs2 === errors;valid1 = valid1 || _valid0;if(!valid1){const _errs3 = errors;if("info" !== data){const err1 = {instancePath,schemaPath:"aether:bindings#/definitions/IngestLevel/anyOf/1/const",keyword:"const",params:{allowedValue: "info"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}var _valid0 = _errs3 === errors;valid1 = valid1 || _valid0;if(!valid1){const _errs4 = errors;if("warn" !== data){const err2 = {instancePath,schemaPath:"aether:bindings#/definitions/IngestLevel/anyOf/2/const",keyword:"const",params:{allowedValue: "warn"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}var _valid0 = _errs4 === errors;valid1 = valid1 || _valid0;if(!valid1){const _errs5 = errors;if("error" !== data){const err3 = {instancePath,schemaPath:"aether:bindings#/definitions/IngestLevel/anyOf/3/const",keyword:"const",params:{allowedValue: "error"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}var _valid0 = _errs5 === errors;valid1 = valid1 || _valid0;}}}if(!valid1){const err4 = {instancePath,schemaPath:"aether:bindings#/definitions/IngestLevel/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}else {errors = _errs1;if(vErrors !== null){if(_errs1){vErrors.length = _errs1;}else {vErrors = null;}}}validate100.errors = vErrors;return errors === 0;}export const validateIngestReceipt = validate101;const schema107 = {"$id":"aether:validator:IngestReceipt","$ref":"aether:bindings#/definitions/IngestReceipt"};const schema108 = {"type":"object","properties":{"accepted":{"type":"number"},"rejected":{"type":"number"}},"required":["accepted","rejected"],"additionalProperties":false};function validate101(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="aether:validator:IngestReceipt" */;let vErrors = null;let errors = 0;if(data && typeof data == "object" && !Array.isArray(data)){if(data.accepted === undefined){const err0 = {instancePath,schemaPath:"aether:bindings#/definitions/IngestReceipt/required",keyword:"required",params:{missingProperty: "accepted"},message:"must have required property '"+"accepted"+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}if(data.rejected === undefined){const err1 = {instancePath,schemaPath:"aether:bindings#/definitions/IngestReceipt/required",keyword:"required",params:{missingProperty: "rejected"},message:"must have required property '"+"rejected"+"'"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}for(const key0 in data){if(!((key0 === "accepted") || (key0 === "rejected"))){const err2 = {instancePath,schemaPath:"aether:bindings#/definitions/IngestReceipt/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}}if(data.accepted !== undefined){let data0 = data.accepted;if(!((typeof data0 == "number") && (isFinite(data0)))){const err3 = {instancePath:instancePath+"/accepted",schemaPath:"aether:bindings#/definitions/IngestReceipt/properties/accepted/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}}if(data.rejected !== undefined){let data1 = data.rejected;if(!((typeof data1 == "number") && (isFinite(data1)))){const err4 = {instancePath:instancePath+"/rejected",schemaPath:"aether:bindings#/definitions/IngestReceipt/properties/rejected/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}}}else {const err5 = {instancePath,schemaPath:"aether:bindings#/definitions/IngestReceipt/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}validate101.errors = vErrors;return errors === 0;}export const validateIssuedToken = validate102;const schema109 = {"$id":"aether:validator:IssuedToken","$ref":"aether:bindings#/definitions/IssuedToken"};const schema110 = {"type":"object","properties":{"token":{"type":"string"},"id":{"type":"string"},"name":{"type":"string"},"scopes":{"type":"array","items":{"type":"string"}},"createdAt":{"type":"number"},"lastUsedAt":{"anyOf":[{"type":"number"},{"type":"null"}]},"revokedAt":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["token","id","name","scopes","createdAt","lastUsedAt","revokedAt"],"additionalProperties":false};function validate102(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="aether:validator:IssuedToken" */;let vErrors = null;let errors = 0;if(data && typeof data == "object" && !Array.isArray(data)){if(data.token === undefined){const err0 = {instancePath,schemaPath:"aether:bindings#/definitions/IssuedToken/required",keyword:"required",params:{missingProperty: "token"},message:"must have required property '"+"token"+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}if(data.id === undefined){const err1 = {instancePath,schemaPath:"aether:bindings#/definitions/IssuedToken/required",keyword:"required",params:{missingProperty: "id"},message:"must have required property '"+"id"+"'"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}if(data.name === undefined){const err2 = {instancePath,schemaPath:"aether:bindings#/definitions/IssuedToken/required",keyword:"required",params:{missingProperty: "name"},message:"must have required property '"+"name"+"'"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}if(data.scopes === undefined){const err3 = {instancePath,schemaPath:"aether:bindings#/definitions/IssuedToken/required",keyword:"required",params:{missingProperty: "scopes"},message:"must have required property '"+"scopes"+"'"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}if(data.createdAt === undefined){const err4 = {instancePath,schemaPath:"aether:bindings#/definitions/IssuedToken/required",keyword:"required",params:{missingProperty: "createdAt"},message:"must have required property '"+"createdAt"+"'"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}if(data.lastUsedAt === undefined){const err5 = {instancePath,schemaPath:"aether:bindings#/definitions/IssuedToken/required",keyword:"required",params:{missingProperty: "lastUsedAt"},message:"must have required property '"+"lastUsedAt"+"'"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}if(data.revokedAt === undefined){const err6 = {instancePath,schemaPath:"aether:bindings#/definitions/IssuedToken/required",keyword:"required",params:{missingProperty: "revokedAt"},message:"must have required property '"+"revokedAt"+"'"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}for(const key0 in data){if(!(((((((key0 === "token") || (key0 === "id")) || (key0 === "name")) || (key0 === "scopes")) || (key0 === "createdAt")) || (key0 === "lastUsedAt")) || (key0 === "revokedAt"))){const err7 = {instancePath,schemaPath:"aether:bindings#/definitions/IssuedToken/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}}if(data.token !== undefined){if(typeof data.token !== "string"){const err8 = {instancePath:instancePath+"/token",schemaPath:"aether:bindings#/definitions/IssuedToken/properties/token/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}}if(data.id !== undefined){if(typeof data.id !== "string"){const err9 = {instancePath:instancePath+"/id",schemaPath:"aether:bindings#/definitions/IssuedToken/properties/id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}}if(data.name !== undefined){if(typeof data.name !== "string"){const err10 = {instancePath:instancePath+"/name",schemaPath:"aether:bindings#/definitions/IssuedToken/properties/name/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}}if(data.scopes !== undefined){let data3 = data.scopes;if(Array.isArray(data3)){const len0 = data3.length;for(let i0=0; i0<len0; i0++){if(typeof data3[i0] !== "string"){const err11 = {instancePath:instancePath+"/scopes/" + i0,schemaPath:"aether:bindings#/definitions/IssuedToken/properties/scopes/items/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}}}else {const err12 = {instancePath:instancePath+"/scopes",schemaPath:"aether:bindings#/definitions/IssuedToken/properties/scopes/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}}if(data.createdAt !== undefined){let data5 = data.createdAt;if(!((typeof data5 == "number") && (isFinite(data5)))){const err13 = {instancePath:instancePath+"/createdAt",schemaPath:"aether:bindings#/definitions/IssuedToken/properties/createdAt/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}}if(data.lastUsedAt !== undefined){let data6 = data.lastUsedAt;const _errs16 = errors;let valid4 = false;const _errs17 = errors;if(!((typeof data6 == "number") && (isFinite(data6)))){const err14 = {instancePath:instancePath+"/lastUsedAt",schemaPath:"aether:bindings#/definitions/IssuedToken/properties/lastUsedAt/anyOf/0/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err14];}else {vErrors.push(err14);}errors++;}var _valid0 = _errs17 === errors;valid4 = valid4 || _valid0;if(!valid4){const _errs19 = errors;if(data6 !== null){const err15 = {instancePath:instancePath+"/lastUsedAt",schemaPath:"aether:bindings#/definitions/IssuedToken/properties/lastUsedAt/anyOf/1/type",keyword:"type",params:{type: "null"},message:"must be null"};if(vErrors === null){vErrors = [err15];}else {vErrors.push(err15);}errors++;}var _valid0 = _errs19 === errors;valid4 = valid4 || _valid0;}if(!valid4){const err16 = {instancePath:instancePath+"/lastUsedAt",schemaPath:"aether:bindings#/definitions/IssuedToken/properties/lastUsedAt/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err16];}else {vErrors.push(err16);}errors++;}else {errors = _errs16;if(vErrors !== null){if(_errs16){vErrors.length = _errs16;}else {vErrors = null;}}}}if(data.revokedAt !== undefined){let data7 = data.revokedAt;const _errs22 = errors;let valid5 = false;const _errs23 = errors;if(!((typeof data7 == "number") && (isFinite(data7)))){const err17 = {instancePath:instancePath+"/revokedAt",schemaPath:"aether:bindings#/definitions/IssuedToken/properties/revokedAt/anyOf/0/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err17];}else {vErrors.push(err17);}errors++;}var _valid1 = _errs23 === errors;valid5 = valid5 || _valid1;if(!valid5){const _errs25 = errors;if(data7 !== null){const err18 = {instancePath:instancePath+"/revokedAt",schemaPath:"aether:bindings#/definitions/IssuedToken/properties/revokedAt/anyOf/1/type",keyword:"type",params:{type: "null"},message:"must be null"};if(vErrors === null){vErrors = [err18];}else {vErrors.push(err18);}errors++;}var _valid1 = _errs25 === errors;valid5 = valid5 || _valid1;}if(!valid5){const err19 = {instancePath:instancePath+"/revokedAt",schemaPath:"aether:bindings#/definitions/IssuedToken/properties/revokedAt/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err19];}else {vErrors.push(err19);}errors++;}else {errors = _errs22;if(vErrors !== null){if(_errs22){vErrors.length = _errs22;}else {vErrors = null;}}}}}else {const err20 = {instancePath,schemaPath:"aether:bindings#/definitions/IssuedToken/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err20];}else {vErrors.push(err20);}errors++;}validate102.errors = vErrors;return errors === 0;}export const validateKeyStrategy = validate103;const schema111 = {"$id":"aether:validator:KeyStrategy","$ref":"aether:bindings#/definitions/KeyStrategy"};function validate103(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="aether:validator:KeyStrategy" */;let vErrors = null;let errors = 0;const _errs1 = errors;let valid1 = false;const _errs2 = errors;if("round_robin" !== data){const err0 = {instancePath,schemaPath:"aether:bindings#/definitions/KeyStrategy/anyOf/0/const",keyword:"const",params:{allowedValue: "round_robin"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}var _valid0 = _errs2 === errors;valid1 = valid1 || _valid0;if(!valid1){const _errs3 = errors;if("fill_first" !== data){const err1 = {instancePath,schemaPath:"aether:bindings#/definitions/KeyStrategy/anyOf/1/const",keyword:"const",params:{allowedValue: "fill_first"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}var _valid0 = _errs3 === errors;valid1 = valid1 || _valid0;}if(!valid1){const err2 = {instancePath,schemaPath:"aether:bindings#/definitions/KeyStrategy/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}else {errors = _errs1;if(vErrors !== null){if(_errs1){vErrors.length = _errs1;}else {vErrors = null;}}}validate103.errors = vErrors;return errors === 0;}export const validateKitError = validate104;const schema113 = {"$id":"aether:validator:KitError","$ref":"https://aether.local/contracts/v1/error.schema.json#/definitions/KitError"};const schema60 = {"type":"object","additionalProperties":false,"required":["code","message"],"properties":{"code":{"$ref":"#/definitions/KitErrorCode"},"message":{"type":"string"},"details":{"$ref":"#/definitions/Details"}}};const schema61 = {"enum":["bad_request","not_found","conflict","unsupported","cancelled","unauthorized","forbidden","rate_limited","upstream","timeout","network","needs_config","budget_exceeded","incompatible_db","internal"]};function validate105(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;if(data && typeof data == "object" && !Array.isArray(data)){if(data.code === undefined){const err0 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "code"},message:"must have required property '"+"code"+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}if(data.message === undefined){const err1 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "message"},message:"must have required property '"+"message"+"'"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}for(const key0 in data){if(!(((key0 === "code") || (key0 === "message")) || (key0 === "details"))){const err2 = {instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}}if(data.code !== undefined){let data0 = data.code;if(!(((((((((((((((data0 === "bad_request") || (data0 === "not_found")) || (data0 === "conflict")) || (data0 === "unsupported")) || (data0 === "cancelled")) || (data0 === "unauthorized")) || (data0 === "forbidden")) || (data0 === "rate_limited")) || (data0 === "upstream")) || (data0 === "timeout")) || (data0 === "network")) || (data0 === "needs_config")) || (data0 === "budget_exceeded")) || (data0 === "incompatible_db")) || (data0 === "internal"))){const err3 = {instancePath:instancePath+"/code",schemaPath:"#/definitions/KitErrorCode/enum",keyword:"enum",params:{allowedValues: schema61.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}}if(data.message !== undefined){if(typeof data.message !== "string"){const err4 = {instancePath:instancePath+"/message",schemaPath:"#/properties/message/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}}if(data.details !== undefined){let data2 = data.details;if(data2 && typeof data2 == "object" && !Array.isArray(data2)){for(const key1 in data2){if(!(((((((key1 === "field") || (key1 === "reason")) || (key1 === "status")) || (key1 === "limit")) || (key1 === "entity")) || (key1 === "port")) || (key1 === "errorId"))){const err5 = {instancePath:instancePath+"/details",schemaPath:"#/definitions/Details/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key1},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}}if(data2.field !== undefined){if(typeof data2.field !== "string"){const err6 = {instancePath:instancePath+"/details/field",schemaPath:"#/definitions/Details/properties/field/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}}if(data2.reason !== undefined){if(typeof data2.reason !== "string"){const err7 = {instancePath:instancePath+"/details/reason",schemaPath:"#/definitions/Details/properties/reason/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}}if(data2.status !== undefined){let data5 = data2.status;if(!(((typeof data5 == "number") && (!(data5 % 1) && !isNaN(data5))) && (isFinite(data5)))){const err8 = {instancePath:instancePath+"/details/status",schemaPath:"#/definitions/Details/properties/status/type",keyword:"type",params:{type: "integer"},message:"must be integer"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}if((typeof data5 == "number") && (isFinite(data5))){if(data5 > 65535 || isNaN(data5)){const err9 = {instancePath:instancePath+"/details/status",schemaPath:"#/definitions/Details/properties/status/maximum",keyword:"maximum",params:{comparison: "<=", limit: 65535},message:"must be <= 65535"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}if(data5 < 0 || isNaN(data5)){const err10 = {instancePath:instancePath+"/details/status",schemaPath:"#/definitions/Details/properties/status/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}}}if(data2.limit !== undefined){let data6 = data2.limit;if(!(((typeof data6 == "number") && (!(data6 % 1) && !isNaN(data6))) && (isFinite(data6)))){const err11 = {instancePath:instancePath+"/details/limit",schemaPath:"#/definitions/Details/properties/limit/type",keyword:"type",params:{type: "integer"},message:"must be integer"};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}if((typeof data6 == "number") && (isFinite(data6))){if(data6 > 9007199254740991 || isNaN(data6)){const err12 = {instancePath:instancePath+"/details/limit",schemaPath:"#/definitions/Details/properties/limit/maximum",keyword:"maximum",params:{comparison: "<=", limit: 9007199254740991},message:"must be <= 9007199254740991"};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}if(data6 < 0 || isNaN(data6)){const err13 = {instancePath:instancePath+"/details/limit",schemaPath:"#/definitions/Details/properties/limit/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}}}if(data2.entity !== undefined){if(typeof data2.entity !== "string"){const err14 = {instancePath:instancePath+"/details/entity",schemaPath:"#/definitions/Details/properties/entity/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err14];}else {vErrors.push(err14);}errors++;}}if(data2.port !== undefined){let data8 = data2.port;if(!(((typeof data8 == "number") && (!(data8 % 1) && !isNaN(data8))) && (isFinite(data8)))){const err15 = {instancePath:instancePath+"/details/port",schemaPath:"#/definitions/Details/properties/port/type",keyword:"type",params:{type: "integer"},message:"must be integer"};if(vErrors === null){vErrors = [err15];}else {vErrors.push(err15);}errors++;}if((typeof data8 == "number") && (isFinite(data8))){if(data8 > 65535 || isNaN(data8)){const err16 = {instancePath:instancePath+"/details/port",schemaPath:"#/definitions/Details/properties/port/maximum",keyword:"maximum",params:{comparison: "<=", limit: 65535},message:"must be <= 65535"};if(vErrors === null){vErrors = [err16];}else {vErrors.push(err16);}errors++;}if(data8 < 0 || isNaN(data8)){const err17 = {instancePath:instancePath+"/details/port",schemaPath:"#/definitions/Details/properties/port/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err17];}else {vErrors.push(err17);}errors++;}}}if(data2.errorId !== undefined){if(typeof data2.errorId !== "string"){const err18 = {instancePath:instancePath+"/details/errorId",schemaPath:"#/definitions/Details/properties/errorId/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err18];}else {vErrors.push(err18);}errors++;}}}else {const err19 = {instancePath:instancePath+"/details",schemaPath:"#/definitions/Details/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err19];}else {vErrors.push(err19);}errors++;}}}else {const err20 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err20];}else {vErrors.push(err20);}errors++;}validate105.errors = vErrors;return errors === 0;}function validate104(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="aether:validator:KitError" */;let vErrors = null;let errors = 0;if(!(validate105(data, {instancePath,parentData,parentDataProperty,rootData}))){vErrors = vErrors === null ? validate105.errors : vErrors.concat(validate105.errors);errors = vErrors.length;}validate104.errors = vErrors;return errors === 0;}export const validateKitErrorCode = validate107;const schema117 = {"$id":"aether:validator:KitErrorCode","$ref":"https://aether.local/contracts/v1/error.schema.json#/definitions/KitErrorCode"};function validate107(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="aether:validator:KitErrorCode" */;let vErrors = null;let errors = 0;if(!(((((((((((((((data === "bad_request") || (data === "not_found")) || (data === "conflict")) || (data === "unsupported")) || (data === "cancelled")) || (data === "unauthorized")) || (data === "forbidden")) || (data === "rate_limited")) || (data === "upstream")) || (data === "timeout")) || (data === "network")) || (data === "needs_config")) || (data === "budget_exceeded")) || (data === "incompatible_db")) || (data === "internal"))){const err0 = {instancePath,schemaPath:"https://aether.local/contracts/v1/error.schema.json#/definitions/KitErrorCode/enum",keyword:"enum",params:{allowedValues: schema61.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}validate107.errors = vErrors;return errors === 0;}export const validateLogEntry = validate108;const schema119 = {"$id":"aether:validator:LogEntry","$ref":"aether:bindings#/definitions/LogEntry"};const schema120 = {"type":"object","properties":{"seq":{"type":"number"},"time":{"type":"string"},"level":{"anyOf":[{"const":"ERROR"},{"const":"WARN"},{"const":"INFO"},{"const":"DEBUG"},{"const":"TRACE"}]},"target":{"type":"string"},"message":{"type":"string"}},"required":["seq","time","level","target","message"],"additionalProperties":false};function validate108(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="aether:validator:LogEntry" */;let vErrors = null;let errors = 0;if(data && typeof data == "object" && !Array.isArray(data)){if(data.seq === undefined){const err0 = {instancePath,schemaPath:"aether:bindings#/definitions/LogEntry/required",keyword:"required",params:{missingProperty: "seq"},message:"must have required property '"+"seq"+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}if(data.time === undefined){const err1 = {instancePath,schemaPath:"aether:bindings#/definitions/LogEntry/required",keyword:"required",params:{missingProperty: "time"},message:"must have required property '"+"time"+"'"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}if(data.level === undefined){const err2 = {instancePath,schemaPath:"aether:bindings#/definitions/LogEntry/required",keyword:"required",params:{missingProperty: "level"},message:"must have required property '"+"level"+"'"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}if(data.target === undefined){const err3 = {instancePath,schemaPath:"aether:bindings#/definitions/LogEntry/required",keyword:"required",params:{missingProperty: "target"},message:"must have required property '"+"target"+"'"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}if(data.message === undefined){const err4 = {instancePath,schemaPath:"aether:bindings#/definitions/LogEntry/required",keyword:"required",params:{missingProperty: "message"},message:"must have required property '"+"message"+"'"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}for(const key0 in data){if(!(((((key0 === "seq") || (key0 === "time")) || (key0 === "level")) || (key0 === "target")) || (key0 === "message"))){const err5 = {instancePath,schemaPath:"aether:bindings#/definitions/LogEntry/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}}if(data.seq !== undefined){let data0 = data.seq;if(!((typeof data0 == "number") && (isFinite(data0)))){const err6 = {instancePath:instancePath+"/seq",schemaPath:"aether:bindings#/definitions/LogEntry/properties/seq/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}}if(data.time !== undefined){if(typeof data.time !== "string"){const err7 = {instancePath:instancePath+"/time",schemaPath:"aether:bindings#/definitions/LogEntry/properties/time/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}}if(data.level !== undefined){let data2 = data.level;const _errs8 = errors;let valid2 = false;const _errs9 = errors;if("ERROR" !== data2){const err8 = {instancePath:instancePath+"/level",schemaPath:"aether:bindings#/definitions/LogEntry/properties/level/anyOf/0/const",keyword:"const",params:{allowedValue: "ERROR"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}var _valid0 = _errs9 === errors;valid2 = valid2 || _valid0;if(!valid2){const _errs10 = errors;if("WARN" !== data2){const err9 = {instancePath:instancePath+"/level",schemaPath:"aether:bindings#/definitions/LogEntry/properties/level/anyOf/1/const",keyword:"const",params:{allowedValue: "WARN"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}var _valid0 = _errs10 === errors;valid2 = valid2 || _valid0;if(!valid2){const _errs11 = errors;if("INFO" !== data2){const err10 = {instancePath:instancePath+"/level",schemaPath:"aether:bindings#/definitions/LogEntry/properties/level/anyOf/2/const",keyword:"const",params:{allowedValue: "INFO"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}var _valid0 = _errs11 === errors;valid2 = valid2 || _valid0;if(!valid2){const _errs12 = errors;if("DEBUG" !== data2){const err11 = {instancePath:instancePath+"/level",schemaPath:"aether:bindings#/definitions/LogEntry/properties/level/anyOf/3/const",keyword:"const",params:{allowedValue: "DEBUG"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}var _valid0 = _errs12 === errors;valid2 = valid2 || _valid0;if(!valid2){const _errs13 = errors;if("TRACE" !== data2){const err12 = {instancePath:instancePath+"/level",schemaPath:"aether:bindings#/definitions/LogEntry/properties/level/anyOf/4/const",keyword:"const",params:{allowedValue: "TRACE"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}var _valid0 = _errs13 === errors;valid2 = valid2 || _valid0;}}}}if(!valid2){const err13 = {instancePath:instancePath+"/level",schemaPath:"aether:bindings#/definitions/LogEntry/properties/level/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}else {errors = _errs8;if(vErrors !== null){if(_errs8){vErrors.length = _errs8;}else {vErrors = null;}}}}if(data.target !== undefined){if(typeof data.target !== "string"){const err14 = {instancePath:instancePath+"/target",schemaPath:"aether:bindings#/definitions/LogEntry/properties/target/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err14];}else {vErrors.push(err14);}errors++;}}if(data.message !== undefined){if(typeof data.message !== "string"){const err15 = {instancePath:instancePath+"/message",schemaPath:"aether:bindings#/definitions/LogEntry/properties/message/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err15];}else {vErrors.push(err15);}errors++;}}}else {const err16 = {instancePath,schemaPath:"aether:bindings#/definitions/LogEntry/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err16];}else {vErrors.push(err16);}errors++;}validate108.errors = vErrors;return errors === 0;}export const validateLogLevel = validate109;const schema121 = {"$id":"aether:validator:LogLevel","$ref":"aether:bindings#/definitions/LogLevel"};const schema122 = {"anyOf":[{"const":"ERROR"},{"const":"WARN"},{"const":"INFO"},{"const":"DEBUG"},{"const":"TRACE"}]};function validate109(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="aether:validator:LogLevel" */;let vErrors = null;let errors = 0;const _errs1 = errors;let valid1 = false;const _errs2 = errors;if("ERROR" !== data){const err0 = {instancePath,schemaPath:"aether:bindings#/definitions/LogLevel/anyOf/0/const",keyword:"const",params:{allowedValue: "ERROR"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}var _valid0 = _errs2 === errors;valid1 = valid1 || _valid0;if(!valid1){const _errs3 = errors;if("WARN" !== data){const err1 = {instancePath,schemaPath:"aether:bindings#/definitions/LogLevel/anyOf/1/const",keyword:"const",params:{allowedValue: "WARN"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}var _valid0 = _errs3 === errors;valid1 = valid1 || _valid0;if(!valid1){const _errs4 = errors;if("INFO" !== data){const err2 = {instancePath,schemaPath:"aether:bindings#/definitions/LogLevel/anyOf/2/const",keyword:"const",params:{allowedValue: "INFO"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}var _valid0 = _errs4 === errors;valid1 = valid1 || _valid0;if(!valid1){const _errs5 = errors;if("DEBUG" !== data){const err3 = {instancePath,schemaPath:"aether:bindings#/definitions/LogLevel/anyOf/3/const",keyword:"const",params:{allowedValue: "DEBUG"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}var _valid0 = _errs5 === errors;valid1 = valid1 || _valid0;if(!valid1){const _errs6 = errors;if("TRACE" !== data){const err4 = {instancePath,schemaPath:"aether:bindings#/definitions/LogLevel/anyOf/4/const",keyword:"const",params:{allowedValue: "TRACE"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}var _valid0 = _errs6 === errors;valid1 = valid1 || _valid0;}}}}if(!valid1){const err5 = {instancePath,schemaPath:"aether:bindings#/definitions/LogLevel/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}else {errors = _errs1;if(vErrors !== null){if(_errs1){vErrors.length = _errs1;}else {vErrors = null;}}}validate109.errors = vErrors;return errors === 0;}export const validateLogStatus = validate110;const schema123 = {"$id":"aether:validator:LogStatus","$ref":"aether:bindings#/definitions/LogStatus"};const schema124 = {"type":"object","properties":{"level":{"$ref":"aether:bindings#/definitions/LogLevel"},"available":{"type":"boolean"}},"required":["level","available"],"additionalProperties":false};function validate111(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;if(data && typeof data == "object" && !Array.isArray(data)){if(data.level === undefined){const err0 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "level"},message:"must have required property '"+"level"+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}if(data.available === undefined){const err1 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "available"},message:"must have required property '"+"available"+"'"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}for(const key0 in data){if(!((key0 === "level") || (key0 === "available"))){const err2 = {instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}}if(data.level !== undefined){let data0 = data.level;const _errs4 = errors;let valid2 = false;const _errs5 = errors;if("ERROR" !== data0){const err3 = {instancePath:instancePath+"/level",schemaPath:"aether:bindings#/definitions/LogLevel/anyOf/0/const",keyword:"const",params:{allowedValue: "ERROR"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}var _valid0 = _errs5 === errors;valid2 = valid2 || _valid0;if(!valid2){const _errs6 = errors;if("WARN" !== data0){const err4 = {instancePath:instancePath+"/level",schemaPath:"aether:bindings#/definitions/LogLevel/anyOf/1/const",keyword:"const",params:{allowedValue: "WARN"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}var _valid0 = _errs6 === errors;valid2 = valid2 || _valid0;if(!valid2){const _errs7 = errors;if("INFO" !== data0){const err5 = {instancePath:instancePath+"/level",schemaPath:"aether:bindings#/definitions/LogLevel/anyOf/2/const",keyword:"const",params:{allowedValue: "INFO"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}var _valid0 = _errs7 === errors;valid2 = valid2 || _valid0;if(!valid2){const _errs8 = errors;if("DEBUG" !== data0){const err6 = {instancePath:instancePath+"/level",schemaPath:"aether:bindings#/definitions/LogLevel/anyOf/3/const",keyword:"const",params:{allowedValue: "DEBUG"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}var _valid0 = _errs8 === errors;valid2 = valid2 || _valid0;if(!valid2){const _errs9 = errors;if("TRACE" !== data0){const err7 = {instancePath:instancePath+"/level",schemaPath:"aether:bindings#/definitions/LogLevel/anyOf/4/const",keyword:"const",params:{allowedValue: "TRACE"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}var _valid0 = _errs9 === errors;valid2 = valid2 || _valid0;}}}}if(!valid2){const err8 = {instancePath:instancePath+"/level",schemaPath:"aether:bindings#/definitions/LogLevel/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}else {errors = _errs4;if(vErrors !== null){if(_errs4){vErrors.length = _errs4;}else {vErrors = null;}}}}if(data.available !== undefined){if(typeof data.available !== "boolean"){const err9 = {instancePath:instancePath+"/available",schemaPath:"#/properties/available/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}}}else {const err10 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}validate111.errors = vErrors;return errors === 0;}function validate110(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="aether:validator:LogStatus" */;let vErrors = null;let errors = 0;if(!(validate111(data, {instancePath,parentData,parentDataProperty,rootData}))){vErrors = vErrors === null ? validate111.errors : vErrors.concat(validate111.errors);errors = vErrors.length;}validate110.errors = vErrors;return errors === 0;}export const validateManualSave = validate113;const schema126 = {"$id":"aether:validator:ManualSave","$ref":"aether:bindings#/definitions/ManualSave"};const schema127 = {"type":"object","properties":{"id":{"type":"string"},"expectedRevision":{"type":"number"},"name":{"type":"string"},"description":{"type":"string"},"version":{"anyOf":[{"type":"string"},{"type":"null"}]},"body":{"type":"string"}},"required":["name","description","body"],"additionalProperties":false};function validate113(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="aether:validator:ManualSave" */;let vErrors = null;let errors = 0;if(data && typeof data == "object" && !Array.isArray(data)){if(data.name === undefined){const err0 = {instancePath,schemaPath:"aether:bindings#/definitions/ManualSave/required",keyword:"required",params:{missingProperty: "name"},message:"must have required property '"+"name"+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}if(data.description === undefined){const err1 = {instancePath,schemaPath:"aether:bindings#/definitions/ManualSave/required",keyword:"required",params:{missingProperty: "description"},message:"must have required property '"+"description"+"'"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}if(data.body === undefined){const err2 = {instancePath,schemaPath:"aether:bindings#/definitions/ManualSave/required",keyword:"required",params:{missingProperty: "body"},message:"must have required property '"+"body"+"'"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}for(const key0 in data){if(!((((((key0 === "id") || (key0 === "expectedRevision")) || (key0 === "name")) || (key0 === "description")) || (key0 === "version")) || (key0 === "body"))){const err3 = {instancePath,schemaPath:"aether:bindings#/definitions/ManualSave/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}}if(data.id !== undefined){if(typeof data.id !== "string"){const err4 = {instancePath:instancePath+"/id",schemaPath:"aether:bindings#/definitions/ManualSave/properties/id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}}if(data.expectedRevision !== undefined){let data1 = data.expectedRevision;if(!((typeof data1 == "number") && (isFinite(data1)))){const err5 = {instancePath:instancePath+"/expectedRevision",schemaPath:"aether:bindings#/definitions/ManualSave/properties/expectedRevision/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}}if(data.name !== undefined){if(typeof data.name !== "string"){const err6 = {instancePath:instancePath+"/name",schemaPath:"aether:bindings#/definitions/ManualSave/properties/name/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}}if(data.description !== undefined){if(typeof data.description !== "string"){const err7 = {instancePath:instancePath+"/description",schemaPath:"aether:bindings#/definitions/ManualSave/properties/description/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}}if(data.version !== undefined){let data4 = data.version;const _errs12 = errors;let valid2 = false;const _errs13 = errors;if(typeof data4 !== "string"){const err8 = {instancePath:instancePath+"/version",schemaPath:"aether:bindings#/definitions/ManualSave/properties/version/anyOf/0/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}var _valid0 = _errs13 === errors;valid2 = valid2 || _valid0;if(!valid2){const _errs15 = errors;if(data4 !== null){const err9 = {instancePath:instancePath+"/version",schemaPath:"aether:bindings#/definitions/ManualSave/properties/version/anyOf/1/type",keyword:"type",params:{type: "null"},message:"must be null"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}var _valid0 = _errs15 === errors;valid2 = valid2 || _valid0;}if(!valid2){const err10 = {instancePath:instancePath+"/version",schemaPath:"aether:bindings#/definitions/ManualSave/properties/version/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}else {errors = _errs12;if(vErrors !== null){if(_errs12){vErrors.length = _errs12;}else {vErrors = null;}}}}if(data.body !== undefined){if(typeof data.body !== "string"){const err11 = {instancePath:instancePath+"/body",schemaPath:"aether:bindings#/definitions/ManualSave/properties/body/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}}}else {const err12 = {instancePath,schemaPath:"aether:bindings#/definitions/ManualSave/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}validate113.errors = vErrors;return errors === 0;}export const validateMcpTransport = validate114;const schema128 = {"$id":"aether:validator:McpTransport","$ref":"aether:bindings#/definitions/McpTransport"};const schema129 = {"anyOf":[{"type":"object","properties":{"kind":{"const":"http"},"url":{"type":"string"}},"required":["kind","url"],"additionalProperties":false},{"type":"object","properties":{"kind":{"const":"stdio"},"command":{"type":"string"},"args":{"type":"array","items":{"type":"string"}},"cwd":{"type":"string"}},"required":["kind","command","args"],"additionalProperties":false}]};function validate114(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="aether:validator:McpTransport" */;let vErrors = null;let errors = 0;const _errs1 = errors;let valid1 = false;const _errs2 = errors;if(data && typeof data == "object" && !Array.isArray(data)){if(data.kind === undefined){const err0 = {instancePath,schemaPath:"aether:bindings#/definitions/McpTransport/anyOf/0/required",keyword:"required",params:{missingProperty: "kind"},message:"must have required property '"+"kind"+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}if(data.url === undefined){const err1 = {instancePath,schemaPath:"aether:bindings#/definitions/McpTransport/anyOf/0/required",keyword:"required",params:{missingProperty: "url"},message:"must have required property '"+"url"+"'"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}for(const key0 in data){if(!((key0 === "kind") || (key0 === "url"))){const err2 = {instancePath,schemaPath:"aether:bindings#/definitions/McpTransport/anyOf/0/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}}if(data.kind !== undefined){if("http" !== data.kind){const err3 = {instancePath:instancePath+"/kind",schemaPath:"aether:bindings#/definitions/McpTransport/anyOf/0/properties/kind/const",keyword:"const",params:{allowedValue: "http"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}}if(data.url !== undefined){if(typeof data.url !== "string"){const err4 = {instancePath:instancePath+"/url",schemaPath:"aether:bindings#/definitions/McpTransport/anyOf/0/properties/url/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}}}else {const err5 = {instancePath,schemaPath:"aether:bindings#/definitions/McpTransport/anyOf/0/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}var _valid0 = _errs2 === errors;valid1 = valid1 || _valid0;if(!valid1){const _errs8 = errors;if(data && typeof data == "object" && !Array.isArray(data)){if(data.kind === undefined){const err6 = {instancePath,schemaPath:"aether:bindings#/definitions/McpTransport/anyOf/1/required",keyword:"required",params:{missingProperty: "kind"},message:"must have required property '"+"kind"+"'"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}if(data.command === undefined){const err7 = {instancePath,schemaPath:"aether:bindings#/definitions/McpTransport/anyOf/1/required",keyword:"required",params:{missingProperty: "command"},message:"must have required property '"+"command"+"'"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}if(data.args === undefined){const err8 = {instancePath,schemaPath:"aether:bindings#/definitions/McpTransport/anyOf/1/required",keyword:"required",params:{missingProperty: "args"},message:"must have required property '"+"args"+"'"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}for(const key1 in data){if(!((((key1 === "kind") || (key1 === "command")) || (key1 === "args")) || (key1 === "cwd"))){const err9 = {instancePath,schemaPath:"aether:bindings#/definitions/McpTransport/anyOf/1/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key1},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}}if(data.kind !== undefined){if("stdio" !== data.kind){const err10 = {instancePath:instancePath+"/kind",schemaPath:"aether:bindings#/definitions/McpTransport/anyOf/1/properties/kind/const",keyword:"const",params:{allowedValue: "stdio"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}}if(data.command !== undefined){if(typeof data.command !== "string"){const err11 = {instancePath:instancePath+"/command",schemaPath:"aether:bindings#/definitions/McpTransport/anyOf/1/properties/command/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}}if(data.args !== undefined){let data4 = data.args;if(Array.isArray(data4)){const len0 = data4.length;for(let i0=0; i0<len0; i0++){if(typeof data4[i0] !== "string"){const err12 = {instancePath:instancePath+"/args/" + i0,schemaPath:"aether:bindings#/definitions/McpTransport/anyOf/1/properties/args/items/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}}}else {const err13 = {instancePath:instancePath+"/args",schemaPath:"aether:bindings#/definitions/McpTransport/anyOf/1/properties/args/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}}if(data.cwd !== undefined){if(typeof data.cwd !== "string"){const err14 = {instancePath:instancePath+"/cwd",schemaPath:"aether:bindings#/definitions/McpTransport/anyOf/1/properties/cwd/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err14];}else {vErrors.push(err14);}errors++;}}}else {const err15 = {instancePath,schemaPath:"aether:bindings#/definitions/McpTransport/anyOf/1/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err15];}else {vErrors.push(err15);}errors++;}var _valid0 = _errs8 === errors;valid1 = valid1 || _valid0;}if(!valid1){const err16 = {instancePath,schemaPath:"aether:bindings#/definitions/McpTransport/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err16];}else {vErrors.push(err16);}errors++;}else {errors = _errs1;if(vErrors !== null){if(_errs1){vErrors.length = _errs1;}else {vErrors = null;}}}validate114.errors = vErrors;return errors === 0;}export const validateModel = validate115;const schema130 = {"$id":"aether:validator:Model","$ref":"aether:bindings#/definitions/Model"};function validate116(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;if(data && typeof data == "object" && !Array.isArray(data)){if(data.id === undefined){const err0 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "id"},message:"must have required property '"+"id"+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}if(data.modelType === undefined){const err1 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "modelType"},message:"must have required property '"+"modelType"+"'"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}if(data.typeSource === undefined){const err2 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "typeSource"},message:"must have required property '"+"typeSource"+"'"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}if(data.contextWindow === undefined){const err3 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "contextWindow"},message:"must have required property '"+"contextWindow"+"'"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}if(data.maxOutput === undefined){const err4 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "maxOutput"},message:"must have required property '"+"maxOutput"+"'"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}if(data.canVision === undefined){const err5 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "canVision"},message:"must have required property '"+"canVision"+"'"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}if(data.supportsTools === undefined){const err6 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "supportsTools"},message:"must have required property '"+"supportsTools"+"'"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}if(data.reasoning === undefined){const err7 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "reasoning"},message:"must have required property '"+"reasoning"+"'"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}if(data.nativeWebSearch === undefined){const err8 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "nativeWebSearch"},message:"must have required property '"+"nativeWebSearch"+"'"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}if(data.name === undefined){const err9 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "name"},message:"must have required property '"+"name"+"'"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}if(data.groupName === undefined){const err10 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "groupName"},message:"must have required property '"+"groupName"+"'"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}if(data.pricing === undefined){const err11 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "pricing"},message:"must have required property '"+"pricing"+"'"};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}for(const key0 in data){if(!(func8.call(schema72.properties, key0))){const err12 = {instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}}if(data.id !== undefined){if(typeof data.id !== "string"){const err13 = {instancePath:instancePath+"/id",schemaPath:"#/properties/id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}}if(data.modelType !== undefined){let data1 = data.modelType;const _errs6 = errors;let valid2 = false;const _errs7 = errors;if("chat" !== data1){const err14 = {instancePath:instancePath+"/modelType",schemaPath:"aether:bindings#/definitions/ModelType/anyOf/0/const",keyword:"const",params:{allowedValue: "chat"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err14];}else {vErrors.push(err14);}errors++;}var _valid0 = _errs7 === errors;valid2 = valid2 || _valid0;if(!valid2){const _errs8 = errors;if("image" !== data1){const err15 = {instancePath:instancePath+"/modelType",schemaPath:"aether:bindings#/definitions/ModelType/anyOf/1/const",keyword:"const",params:{allowedValue: "image"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err15];}else {vErrors.push(err15);}errors++;}var _valid0 = _errs8 === errors;valid2 = valid2 || _valid0;if(!valid2){const _errs9 = errors;if("video" !== data1){const err16 = {instancePath:instancePath+"/modelType",schemaPath:"aether:bindings#/definitions/ModelType/anyOf/2/const",keyword:"const",params:{allowedValue: "video"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err16];}else {vErrors.push(err16);}errors++;}var _valid0 = _errs9 === errors;valid2 = valid2 || _valid0;if(!valid2){const _errs10 = errors;if("tts" !== data1){const err17 = {instancePath:instancePath+"/modelType",schemaPath:"aether:bindings#/definitions/ModelType/anyOf/3/const",keyword:"const",params:{allowedValue: "tts"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err17];}else {vErrors.push(err17);}errors++;}var _valid0 = _errs10 === errors;valid2 = valid2 || _valid0;if(!valid2){const _errs11 = errors;if("stt" !== data1){const err18 = {instancePath:instancePath+"/modelType",schemaPath:"aether:bindings#/definitions/ModelType/anyOf/4/const",keyword:"const",params:{allowedValue: "stt"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err18];}else {vErrors.push(err18);}errors++;}var _valid0 = _errs11 === errors;valid2 = valid2 || _valid0;if(!valid2){const _errs12 = errors;if("embedding" !== data1){const err19 = {instancePath:instancePath+"/modelType",schemaPath:"aether:bindings#/definitions/ModelType/anyOf/5/const",keyword:"const",params:{allowedValue: "embedding"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err19];}else {vErrors.push(err19);}errors++;}var _valid0 = _errs12 === errors;valid2 = valid2 || _valid0;if(!valid2){const _errs13 = errors;if("rerank" !== data1){const err20 = {instancePath:instancePath+"/modelType",schemaPath:"aether:bindings#/definitions/ModelType/anyOf/6/const",keyword:"const",params:{allowedValue: "rerank"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err20];}else {vErrors.push(err20);}errors++;}var _valid0 = _errs13 === errors;valid2 = valid2 || _valid0;if(!valid2){const _errs14 = errors;if("unknown" !== data1){const err21 = {instancePath:instancePath+"/modelType",schemaPath:"aether:bindings#/definitions/ModelType/anyOf/7/const",keyword:"const",params:{allowedValue: "unknown"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err21];}else {vErrors.push(err21);}errors++;}var _valid0 = _errs14 === errors;valid2 = valid2 || _valid0;}}}}}}}if(!valid2){const err22 = {instancePath:instancePath+"/modelType",schemaPath:"aether:bindings#/definitions/ModelType/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err22];}else {vErrors.push(err22);}errors++;}else {errors = _errs6;if(vErrors !== null){if(_errs6){vErrors.length = _errs6;}else {vErrors = null;}}}}if(data.typeSource !== undefined){let data2 = data.typeSource;const _errs17 = errors;let valid4 = false;const _errs18 = errors;if("inferred" !== data2){const err23 = {instancePath:instancePath+"/typeSource",schemaPath:"aether:bindings#/definitions/TypeSource/anyOf/0/const",keyword:"const",params:{allowedValue: "inferred"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err23];}else {vErrors.push(err23);}errors++;}var _valid1 = _errs18 === errors;valid4 = valid4 || _valid1;if(!valid4){const _errs19 = errors;if("user" !== data2){const err24 = {instancePath:instancePath+"/typeSource",schemaPath:"aether:bindings#/definitions/TypeSource/anyOf/1/const",keyword:"const",params:{allowedValue: "user"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err24];}else {vErrors.push(err24);}errors++;}var _valid1 = _errs19 === errors;valid4 = valid4 || _valid1;}if(!valid4){const err25 = {instancePath:instancePath+"/typeSource",schemaPath:"aether:bindings#/definitions/TypeSource/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err25];}else {vErrors.push(err25);}errors++;}else {errors = _errs17;if(vErrors !== null){if(_errs17){vErrors.length = _errs17;}else {vErrors = null;}}}}if(data.contextWindow !== undefined){let data3 = data.contextWindow;const _errs21 = errors;let valid5 = false;const _errs22 = errors;if(!((typeof data3 == "number") && (isFinite(data3)))){const err26 = {instancePath:instancePath+"/contextWindow",schemaPath:"#/properties/contextWindow/anyOf/0/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err26];}else {vErrors.push(err26);}errors++;}var _valid2 = _errs22 === errors;valid5 = valid5 || _valid2;if(!valid5){const _errs24 = errors;if(data3 !== null){const err27 = {instancePath:instancePath+"/contextWindow",schemaPath:"#/properties/contextWindow/anyOf/1/type",keyword:"type",params:{type: "null"},message:"must be null"};if(vErrors === null){vErrors = [err27];}else {vErrors.push(err27);}errors++;}var _valid2 = _errs24 === errors;valid5 = valid5 || _valid2;}if(!valid5){const err28 = {instancePath:instancePath+"/contextWindow",schemaPath:"#/properties/contextWindow/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err28];}else {vErrors.push(err28);}errors++;}else {errors = _errs21;if(vErrors !== null){if(_errs21){vErrors.length = _errs21;}else {vErrors = null;}}}}if(data.maxOutput !== undefined){let data4 = data.maxOutput;const _errs27 = errors;let valid6 = false;const _errs28 = errors;if(!((typeof data4 == "number") && (isFinite(data4)))){const err29 = {instancePath:instancePath+"/maxOutput",schemaPath:"#/properties/maxOutput/anyOf/0/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err29];}else {vErrors.push(err29);}errors++;}var _valid3 = _errs28 === errors;valid6 = valid6 || _valid3;if(!valid6){const _errs30 = errors;if(data4 !== null){const err30 = {instancePath:instancePath+"/maxOutput",schemaPath:"#/properties/maxOutput/anyOf/1/type",keyword:"type",params:{type: "null"},message:"must be null"};if(vErrors === null){vErrors = [err30];}else {vErrors.push(err30);}errors++;}var _valid3 = _errs30 === errors;valid6 = valid6 || _valid3;}if(!valid6){const err31 = {instancePath:instancePath+"/maxOutput",schemaPath:"#/properties/maxOutput/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err31];}else {vErrors.push(err31);}errors++;}else {errors = _errs27;if(vErrors !== null){if(_errs27){vErrors.length = _errs27;}else {vErrors = null;}}}}if(data.canVision !== undefined){if(typeof data.canVision !== "boolean"){const err32 = {instancePath:instancePath+"/canVision",schemaPath:"#/properties/canVision/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"};if(vErrors === null){vErrors = [err32];}else {vErrors.push(err32);}errors++;}}if(data.supportsTools !== undefined){let data6 = data.supportsTools;const _errs35 = errors;let valid7 = false;const _errs36 = errors;if(typeof data6 !== "boolean"){const err33 = {instancePath:instancePath+"/supportsTools",schemaPath:"#/properties/supportsTools/anyOf/0/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"};if(vErrors === null){vErrors = [err33];}else {vErrors.push(err33);}errors++;}var _valid4 = _errs36 === errors;valid7 = valid7 || _valid4;if(!valid7){const _errs38 = errors;if(data6 !== null){const err34 = {instancePath:instancePath+"/supportsTools",schemaPath:"#/properties/supportsTools/anyOf/1/type",keyword:"type",params:{type: "null"},message:"must be null"};if(vErrors === null){vErrors = [err34];}else {vErrors.push(err34);}errors++;}var _valid4 = _errs38 === errors;valid7 = valid7 || _valid4;}if(!valid7){const err35 = {instancePath:instancePath+"/supportsTools",schemaPath:"#/properties/supportsTools/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err35];}else {vErrors.push(err35);}errors++;}else {errors = _errs35;if(vErrors !== null){if(_errs35){vErrors.length = _errs35;}else {vErrors = null;}}}}if(data.reasoning !== undefined){let data7 = data.reasoning;const _errs41 = errors;let valid8 = false;const _errs42 = errors;if(!(validate71(data7, {instancePath:instancePath+"/reasoning",parentData:data,parentDataProperty:"reasoning",rootData}))){vErrors = vErrors === null ? validate71.errors : vErrors.concat(validate71.errors);errors = vErrors.length;}var _valid5 = _errs42 === errors;valid8 = valid8 || _valid5;if(!valid8){const _errs43 = errors;if(data7 !== null){const err36 = {instancePath:instancePath+"/reasoning",schemaPath:"#/properties/reasoning/anyOf/1/type",keyword:"type",params:{type: "null"},message:"must be null"};if(vErrors === null){vErrors = [err36];}else {vErrors.push(err36);}errors++;}var _valid5 = _errs43 === errors;valid8 = valid8 || _valid5;}if(!valid8){const err37 = {instancePath:instancePath+"/reasoning",schemaPath:"#/properties/reasoning/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err37];}else {vErrors.push(err37);}errors++;}else {errors = _errs41;if(vErrors !== null){if(_errs41){vErrors.length = _errs41;}else {vErrors = null;}}}}if(data.nativeWebSearch !== undefined){if(typeof data.nativeWebSearch !== "boolean"){const err38 = {instancePath:instancePath+"/nativeWebSearch",schemaPath:"#/properties/nativeWebSearch/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"};if(vErrors === null){vErrors = [err38];}else {vErrors.push(err38);}errors++;}}if(data.name !== undefined){let data9 = data.name;const _errs48 = errors;let valid9 = false;const _errs49 = errors;if(typeof data9 !== "string"){const err39 = {instancePath:instancePath+"/name",schemaPath:"#/properties/name/anyOf/0/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err39];}else {vErrors.push(err39);}errors++;}var _valid6 = _errs49 === errors;valid9 = valid9 || _valid6;if(!valid9){const _errs51 = errors;if(data9 !== null){const err40 = {instancePath:instancePath+"/name",schemaPath:"#/properties/name/anyOf/1/type",keyword:"type",params:{type: "null"},message:"must be null"};if(vErrors === null){vErrors = [err40];}else {vErrors.push(err40);}errors++;}var _valid6 = _errs51 === errors;valid9 = valid9 || _valid6;}if(!valid9){const err41 = {instancePath:instancePath+"/name",schemaPath:"#/properties/name/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err41];}else {vErrors.push(err41);}errors++;}else {errors = _errs48;if(vErrors !== null){if(_errs48){vErrors.length = _errs48;}else {vErrors = null;}}}}if(data.groupName !== undefined){let data10 = data.groupName;const _errs54 = errors;let valid10 = false;const _errs55 = errors;if(typeof data10 !== "string"){const err42 = {instancePath:instancePath+"/groupName",schemaPath:"#/properties/groupName/anyOf/0/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err42];}else {vErrors.push(err42);}errors++;}var _valid7 = _errs55 === errors;valid10 = valid10 || _valid7;if(!valid10){const _errs57 = errors;if(data10 !== null){const err43 = {instancePath:instancePath+"/groupName",schemaPath:"#/properties/groupName/anyOf/1/type",keyword:"type",params:{type: "null"},message:"must be null"};if(vErrors === null){vErrors = [err43];}else {vErrors.push(err43);}errors++;}var _valid7 = _errs57 === errors;valid10 = valid10 || _valid7;}if(!valid10){const err44 = {instancePath:instancePath+"/groupName",schemaPath:"#/properties/groupName/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err44];}else {vErrors.push(err44);}errors++;}else {errors = _errs54;if(vErrors !== null){if(_errs54){vErrors.length = _errs54;}else {vErrors = null;}}}}if(data.pricing !== undefined){let data11 = data.pricing;const _errs60 = errors;let valid11 = false;const _errs61 = errors;if(!(validate73(data11, {instancePath:instancePath+"/pricing",parentData:data,parentDataProperty:"pricing",rootData}))){vErrors = vErrors === null ? validate73.errors : vErrors.concat(validate73.errors);errors = vErrors.length;}var _valid8 = _errs61 === errors;valid11 = valid11 || _valid8;if(!valid11){const _errs62 = errors;if(data11 !== null){const err45 = {instancePath:instancePath+"/pricing",schemaPath:"#/properties/pricing/anyOf/1/type",keyword:"type",params:{type: "null"},message:"must be null"};if(vErrors === null){vErrors = [err45];}else {vErrors.push(err45);}errors++;}var _valid8 = _errs62 === errors;valid11 = valid11 || _valid8;}if(!valid11){const err46 = {instancePath:instancePath+"/pricing",schemaPath:"#/properties/pricing/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err46];}else {vErrors.push(err46);}errors++;}else {errors = _errs60;if(vErrors !== null){if(_errs60){vErrors.length = _errs60;}else {vErrors = null;}}}}}else {const err47 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err47];}else {vErrors.push(err47);}errors++;}validate116.errors = vErrors;return errors === 0;}function validate115(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="aether:validator:Model" */;let vErrors = null;let errors = 0;if(!(validate116(data, {instancePath,parentData,parentDataProperty,rootData}))){vErrors = vErrors === null ? validate116.errors : vErrors.concat(validate116.errors);errors = vErrors.length;}validate115.errors = vErrors;return errors === 0;}export const validateModelFilter = validate120;const schema134 = {"$id":"aether:validator:ModelFilter","$ref":"aether:bindings#/definitions/ModelFilter"};const schema135 = {"type":"object","properties":{"modelType":{"$ref":"aether:bindings#/definitions/ModelType"},"supportsTools":{"type":"boolean"}},"required":[],"additionalProperties":false};function validate121(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;if(data && typeof data == "object" && !Array.isArray(data)){for(const key0 in data){if(!((key0 === "modelType") || (key0 === "supportsTools"))){const err0 = {instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}}if(data.modelType !== undefined){let data0 = data.modelType;const _errs4 = errors;let valid2 = false;const _errs5 = errors;if("chat" !== data0){const err1 = {instancePath:instancePath+"/modelType",schemaPath:"aether:bindings#/definitions/ModelType/anyOf/0/const",keyword:"const",params:{allowedValue: "chat"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}var _valid0 = _errs5 === errors;valid2 = valid2 || _valid0;if(!valid2){const _errs6 = errors;if("image" !== data0){const err2 = {instancePath:instancePath+"/modelType",schemaPath:"aether:bindings#/definitions/ModelType/anyOf/1/const",keyword:"const",params:{allowedValue: "image"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}var _valid0 = _errs6 === errors;valid2 = valid2 || _valid0;if(!valid2){const _errs7 = errors;if("video" !== data0){const err3 = {instancePath:instancePath+"/modelType",schemaPath:"aether:bindings#/definitions/ModelType/anyOf/2/const",keyword:"const",params:{allowedValue: "video"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}var _valid0 = _errs7 === errors;valid2 = valid2 || _valid0;if(!valid2){const _errs8 = errors;if("tts" !== data0){const err4 = {instancePath:instancePath+"/modelType",schemaPath:"aether:bindings#/definitions/ModelType/anyOf/3/const",keyword:"const",params:{allowedValue: "tts"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}var _valid0 = _errs8 === errors;valid2 = valid2 || _valid0;if(!valid2){const _errs9 = errors;if("stt" !== data0){const err5 = {instancePath:instancePath+"/modelType",schemaPath:"aether:bindings#/definitions/ModelType/anyOf/4/const",keyword:"const",params:{allowedValue: "stt"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}var _valid0 = _errs9 === errors;valid2 = valid2 || _valid0;if(!valid2){const _errs10 = errors;if("embedding" !== data0){const err6 = {instancePath:instancePath+"/modelType",schemaPath:"aether:bindings#/definitions/ModelType/anyOf/5/const",keyword:"const",params:{allowedValue: "embedding"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}var _valid0 = _errs10 === errors;valid2 = valid2 || _valid0;if(!valid2){const _errs11 = errors;if("rerank" !== data0){const err7 = {instancePath:instancePath+"/modelType",schemaPath:"aether:bindings#/definitions/ModelType/anyOf/6/const",keyword:"const",params:{allowedValue: "rerank"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}var _valid0 = _errs11 === errors;valid2 = valid2 || _valid0;if(!valid2){const _errs12 = errors;if("unknown" !== data0){const err8 = {instancePath:instancePath+"/modelType",schemaPath:"aether:bindings#/definitions/ModelType/anyOf/7/const",keyword:"const",params:{allowedValue: "unknown"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}var _valid0 = _errs12 === errors;valid2 = valid2 || _valid0;}}}}}}}if(!valid2){const err9 = {instancePath:instancePath+"/modelType",schemaPath:"aether:bindings#/definitions/ModelType/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}else {errors = _errs4;if(vErrors !== null){if(_errs4){vErrors.length = _errs4;}else {vErrors = null;}}}}if(data.supportsTools !== undefined){if(typeof data.supportsTools !== "boolean"){const err10 = {instancePath:instancePath+"/supportsTools",schemaPath:"#/properties/supportsTools/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}}}else {const err11 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}validate121.errors = vErrors;return errors === 0;}function validate120(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="aether:validator:ModelFilter" */;let vErrors = null;let errors = 0;if(!(validate121(data, {instancePath,parentData,parentDataProperty,rootData}))){vErrors = vErrors === null ? validate121.errors : vErrors.concat(validate121.errors);errors = vErrors.length;}validate120.errors = vErrors;return errors === 0;}export const validateModelOption = validate123;const schema137 = {"$id":"aether:validator:ModelOption","$ref":"aether:bindings#/definitions/ModelOption"};const schema138 = {"type":"object","properties":{"endpointId":{"type":"string"},"modelId":{"type":"string"},"label":{"type":"string"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"modelType":{"$ref":"aether:bindings#/definitions/ModelType"},"supportsTools":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"reasoning":{"anyOf":[{"$ref":"aether:bindings#/definitions/ReasoningConfig"},{"type":"null"}]},"nativeWebSearch":{"type":"boolean"},"canVision":{"type":"boolean"}},"required":["endpointId","modelId","label","name","modelType","supportsTools","reasoning","nativeWebSearch","canVision"],"additionalProperties":false};function validate124(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;if(data && typeof data == "object" && !Array.isArray(data)){if(data.endpointId === undefined){const err0 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "endpointId"},message:"must have required property '"+"endpointId"+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}if(data.modelId === undefined){const err1 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "modelId"},message:"must have required property '"+"modelId"+"'"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}if(data.label === undefined){const err2 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "label"},message:"must have required property '"+"label"+"'"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}if(data.name === undefined){const err3 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "name"},message:"must have required property '"+"name"+"'"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}if(data.modelType === undefined){const err4 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "modelType"},message:"must have required property '"+"modelType"+"'"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}if(data.supportsTools === undefined){const err5 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "supportsTools"},message:"must have required property '"+"supportsTools"+"'"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}if(data.reasoning === undefined){const err6 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "reasoning"},message:"must have required property '"+"reasoning"+"'"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}if(data.nativeWebSearch === undefined){const err7 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "nativeWebSearch"},message:"must have required property '"+"nativeWebSearch"+"'"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}if(data.canVision === undefined){const err8 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "canVision"},message:"must have required property '"+"canVision"+"'"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}for(const key0 in data){if(!(func8.call(schema138.properties, key0))){const err9 = {instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}}if(data.endpointId !== undefined){if(typeof data.endpointId !== "string"){const err10 = {instancePath:instancePath+"/endpointId",schemaPath:"#/properties/endpointId/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}}if(data.modelId !== undefined){if(typeof data.modelId !== "string"){const err11 = {instancePath:instancePath+"/modelId",schemaPath:"#/properties/modelId/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}}if(data.label !== undefined){if(typeof data.label !== "string"){const err12 = {instancePath:instancePath+"/label",schemaPath:"#/properties/label/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}}if(data.name !== undefined){let data3 = data.name;const _errs9 = errors;let valid1 = false;const _errs10 = errors;if(typeof data3 !== "string"){const err13 = {instancePath:instancePath+"/name",schemaPath:"#/properties/name/anyOf/0/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}var _valid0 = _errs10 === errors;valid1 = valid1 || _valid0;if(!valid1){const _errs12 = errors;if(data3 !== null){const err14 = {instancePath:instancePath+"/name",schemaPath:"#/properties/name/anyOf/1/type",keyword:"type",params:{type: "null"},message:"must be null"};if(vErrors === null){vErrors = [err14];}else {vErrors.push(err14);}errors++;}var _valid0 = _errs12 === errors;valid1 = valid1 || _valid0;}if(!valid1){const err15 = {instancePath:instancePath+"/name",schemaPath:"#/properties/name/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err15];}else {vErrors.push(err15);}errors++;}else {errors = _errs9;if(vErrors !== null){if(_errs9){vErrors.length = _errs9;}else {vErrors = null;}}}}if(data.modelType !== undefined){let data4 = data.modelType;const _errs16 = errors;let valid3 = false;const _errs17 = errors;if("chat" !== data4){const err16 = {instancePath:instancePath+"/modelType",schemaPath:"aether:bindings#/definitions/ModelType/anyOf/0/const",keyword:"const",params:{allowedValue: "chat"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err16];}else {vErrors.push(err16);}errors++;}var _valid1 = _errs17 === errors;valid3 = valid3 || _valid1;if(!valid3){const _errs18 = errors;if("image" !== data4){const err17 = {instancePath:instancePath+"/modelType",schemaPath:"aether:bindings#/definitions/ModelType/anyOf/1/const",keyword:"const",params:{allowedValue: "image"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err17];}else {vErrors.push(err17);}errors++;}var _valid1 = _errs18 === errors;valid3 = valid3 || _valid1;if(!valid3){const _errs19 = errors;if("video" !== data4){const err18 = {instancePath:instancePath+"/modelType",schemaPath:"aether:bindings#/definitions/ModelType/anyOf/2/const",keyword:"const",params:{allowedValue: "video"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err18];}else {vErrors.push(err18);}errors++;}var _valid1 = _errs19 === errors;valid3 = valid3 || _valid1;if(!valid3){const _errs20 = errors;if("tts" !== data4){const err19 = {instancePath:instancePath+"/modelType",schemaPath:"aether:bindings#/definitions/ModelType/anyOf/3/const",keyword:"const",params:{allowedValue: "tts"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err19];}else {vErrors.push(err19);}errors++;}var _valid1 = _errs20 === errors;valid3 = valid3 || _valid1;if(!valid3){const _errs21 = errors;if("stt" !== data4){const err20 = {instancePath:instancePath+"/modelType",schemaPath:"aether:bindings#/definitions/ModelType/anyOf/4/const",keyword:"const",params:{allowedValue: "stt"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err20];}else {vErrors.push(err20);}errors++;}var _valid1 = _errs21 === errors;valid3 = valid3 || _valid1;if(!valid3){const _errs22 = errors;if("embedding" !== data4){const err21 = {instancePath:instancePath+"/modelType",schemaPath:"aether:bindings#/definitions/ModelType/anyOf/5/const",keyword:"const",params:{allowedValue: "embedding"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err21];}else {vErrors.push(err21);}errors++;}var _valid1 = _errs22 === errors;valid3 = valid3 || _valid1;if(!valid3){const _errs23 = errors;if("rerank" !== data4){const err22 = {instancePath:instancePath+"/modelType",schemaPath:"aether:bindings#/definitions/ModelType/anyOf/6/const",keyword:"const",params:{allowedValue: "rerank"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err22];}else {vErrors.push(err22);}errors++;}var _valid1 = _errs23 === errors;valid3 = valid3 || _valid1;if(!valid3){const _errs24 = errors;if("unknown" !== data4){const err23 = {instancePath:instancePath+"/modelType",schemaPath:"aether:bindings#/definitions/ModelType/anyOf/7/const",keyword:"const",params:{allowedValue: "unknown"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err23];}else {vErrors.push(err23);}errors++;}var _valid1 = _errs24 === errors;valid3 = valid3 || _valid1;}}}}}}}if(!valid3){const err24 = {instancePath:instancePath+"/modelType",schemaPath:"aether:bindings#/definitions/ModelType/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err24];}else {vErrors.push(err24);}errors++;}else {errors = _errs16;if(vErrors !== null){if(_errs16){vErrors.length = _errs16;}else {vErrors = null;}}}}if(data.supportsTools !== undefined){let data5 = data.supportsTools;const _errs26 = errors;let valid4 = false;const _errs27 = errors;if(typeof data5 !== "boolean"){const err25 = {instancePath:instancePath+"/supportsTools",schemaPath:"#/properties/supportsTools/anyOf/0/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"};if(vErrors === null){vErrors = [err25];}else {vErrors.push(err25);}errors++;}var _valid2 = _errs27 === errors;valid4 = valid4 || _valid2;if(!valid4){const _errs29 = errors;if(data5 !== null){const err26 = {instancePath:instancePath+"/supportsTools",schemaPath:"#/properties/supportsTools/anyOf/1/type",keyword:"type",params:{type: "null"},message:"must be null"};if(vErrors === null){vErrors = [err26];}else {vErrors.push(err26);}errors++;}var _valid2 = _errs29 === errors;valid4 = valid4 || _valid2;}if(!valid4){const err27 = {instancePath:instancePath+"/supportsTools",schemaPath:"#/properties/supportsTools/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err27];}else {vErrors.push(err27);}errors++;}else {errors = _errs26;if(vErrors !== null){if(_errs26){vErrors.length = _errs26;}else {vErrors = null;}}}}if(data.reasoning !== undefined){let data6 = data.reasoning;const _errs32 = errors;let valid5 = false;const _errs33 = errors;if(!(validate71(data6, {instancePath:instancePath+"/reasoning",parentData:data,parentDataProperty:"reasoning",rootData}))){vErrors = vErrors === null ? validate71.errors : vErrors.concat(validate71.errors);errors = vErrors.length;}var _valid3 = _errs33 === errors;valid5 = valid5 || _valid3;if(!valid5){const _errs34 = errors;if(data6 !== null){const err28 = {instancePath:instancePath+"/reasoning",schemaPath:"#/properties/reasoning/anyOf/1/type",keyword:"type",params:{type: "null"},message:"must be null"};if(vErrors === null){vErrors = [err28];}else {vErrors.push(err28);}errors++;}var _valid3 = _errs34 === errors;valid5 = valid5 || _valid3;}if(!valid5){const err29 = {instancePath:instancePath+"/reasoning",schemaPath:"#/properties/reasoning/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err29];}else {vErrors.push(err29);}errors++;}else {errors = _errs32;if(vErrors !== null){if(_errs32){vErrors.length = _errs32;}else {vErrors = null;}}}}if(data.nativeWebSearch !== undefined){if(typeof data.nativeWebSearch !== "boolean"){const err30 = {instancePath:instancePath+"/nativeWebSearch",schemaPath:"#/properties/nativeWebSearch/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"};if(vErrors === null){vErrors = [err30];}else {vErrors.push(err30);}errors++;}}if(data.canVision !== undefined){if(typeof data.canVision !== "boolean"){const err31 = {instancePath:instancePath+"/canVision",schemaPath:"#/properties/canVision/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"};if(vErrors === null){vErrors = [err31];}else {vErrors.push(err31);}errors++;}}}else {const err32 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err32];}else {vErrors.push(err32);}errors++;}validate124.errors = vErrors;return errors === 0;}function validate123(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="aether:validator:ModelOption" */;let vErrors = null;let errors = 0;if(!(validate124(data, {instancePath,parentData,parentDataProperty,rootData}))){vErrors = vErrors === null ? validate124.errors : vErrors.concat(validate124.errors);errors = vErrors.length;}validate123.errors = vErrors;return errors === 0;}export const validateModelPricing = validate127;const schema140 = {"$id":"aether:validator:ModelPricing","$ref":"aether:bindings#/definitions/ModelPricing"};function validate128(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;if(data && typeof data == "object" && !Array.isArray(data)){if(data.currency === undefined){const err0 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "currency"},message:"must have required property '"+"currency"+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}if(data.tiers === undefined){const err1 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "tiers"},message:"must have required property '"+"tiers"+"'"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}for(const key0 in data){if(!((key0 === "currency") || (key0 === "tiers"))){const err2 = {instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}}if(data.currency !== undefined){let data0 = data.currency;const _errs4 = errors;let valid2 = false;const _errs5 = errors;if("USD" !== data0){const err3 = {instancePath:instancePath+"/currency",schemaPath:"aether:bindings#/definitions/Currency/anyOf/0/const",keyword:"const",params:{allowedValue: "USD"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}var _valid0 = _errs5 === errors;valid2 = valid2 || _valid0;if(!valid2){const _errs6 = errors;if("CNY" !== data0){const err4 = {instancePath:instancePath+"/currency",schemaPath:"aether:bindings#/definitions/Currency/anyOf/1/const",keyword:"const",params:{allowedValue: "CNY"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}var _valid0 = _errs6 === errors;valid2 = valid2 || _valid0;}if(!valid2){const err5 = {instancePath:instancePath+"/currency",schemaPath:"aether:bindings#/definitions/Currency/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}else {errors = _errs4;if(vErrors !== null){if(_errs4){vErrors.length = _errs4;}else {vErrors = null;}}}}if(data.tiers !== undefined){let data1 = data.tiers;if(Array.isArray(data1)){const len0 = data1.length;for(let i0=0; i0<len0; i0++){let data2 = data1[i0];if(data2 && typeof data2 == "object" && !Array.isArray(data2)){if(data2.minInputTokens === undefined){const err6 = {instancePath:instancePath+"/tiers/" + i0,schemaPath:"aether:bindings#/definitions/PricingTier/required",keyword:"required",params:{missingProperty: "minInputTokens"},message:"must have required property '"+"minInputTokens"+"'"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}if(data2.input === undefined){const err7 = {instancePath:instancePath+"/tiers/" + i0,schemaPath:"aether:bindings#/definitions/PricingTier/required",keyword:"required",params:{missingProperty: "input"},message:"must have required property '"+"input"+"'"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}if(data2.output === undefined){const err8 = {instancePath:instancePath+"/tiers/" + i0,schemaPath:"aether:bindings#/definitions/PricingTier/required",keyword:"required",params:{missingProperty: "output"},message:"must have required property '"+"output"+"'"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}if(data2.cacheRead === undefined){const err9 = {instancePath:instancePath+"/tiers/" + i0,schemaPath:"aether:bindings#/definitions/PricingTier/required",keyword:"required",params:{missingProperty: "cacheRead"},message:"must have required property '"+"cacheRead"+"'"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}if(data2.cacheWrite === undefined){const err10 = {instancePath:instancePath+"/tiers/" + i0,schemaPath:"aether:bindings#/definitions/PricingTier/required",keyword:"required",params:{missingProperty: "cacheWrite"},message:"must have required property '"+"cacheWrite"+"'"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}for(const key1 in data2){if(!(((((key1 === "minInputTokens") || (key1 === "input")) || (key1 === "output")) || (key1 === "cacheRead")) || (key1 === "cacheWrite"))){const err11 = {instancePath:instancePath+"/tiers/" + i0,schemaPath:"aether:bindings#/definitions/PricingTier/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key1},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}}if(data2.minInputTokens !== undefined){let data3 = data2.minInputTokens;if(!((typeof data3 == "number") && (isFinite(data3)))){const err12 = {instancePath:instancePath+"/tiers/" + i0+"/minInputTokens",schemaPath:"aether:bindings#/definitions/PricingTier/properties/minInputTokens/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}}if(data2.input !== undefined){let data4 = data2.input;if(!((typeof data4 == "number") && (isFinite(data4)))){const err13 = {instancePath:instancePath+"/tiers/" + i0+"/input",schemaPath:"aether:bindings#/definitions/PricingTier/properties/input/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}}if(data2.output !== undefined){let data5 = data2.output;if(!((typeof data5 == "number") && (isFinite(data5)))){const err14 = {instancePath:instancePath+"/tiers/" + i0+"/output",schemaPath:"aether:bindings#/definitions/PricingTier/properties/output/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err14];}else {vErrors.push(err14);}errors++;}}if(data2.cacheRead !== undefined){let data6 = data2.cacheRead;const _errs20 = errors;let valid7 = false;const _errs21 = errors;if(!((typeof data6 == "number") && (isFinite(data6)))){const err15 = {instancePath:instancePath+"/tiers/" + i0+"/cacheRead",schemaPath:"aether:bindings#/definitions/PricingTier/properties/cacheRead/anyOf/0/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err15];}else {vErrors.push(err15);}errors++;}var _valid1 = _errs21 === errors;valid7 = valid7 || _valid1;if(!valid7){const _errs23 = errors;if(data6 !== null){const err16 = {instancePath:instancePath+"/tiers/" + i0+"/cacheRead",schemaPath:"aether:bindings#/definitions/PricingTier/properties/cacheRead/anyOf/1/type",keyword:"type",params:{type: "null"},message:"must be null"};if(vErrors === null){vErrors = [err16];}else {vErrors.push(err16);}errors++;}var _valid1 = _errs23 === errors;valid7 = valid7 || _valid1;}if(!valid7){const err17 = {instancePath:instancePath+"/tiers/" + i0+"/cacheRead",schemaPath:"aether:bindings#/definitions/PricingTier/properties/cacheRead/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err17];}else {vErrors.push(err17);}errors++;}else {errors = _errs20;if(vErrors !== null){if(_errs20){vErrors.length = _errs20;}else {vErrors = null;}}}}if(data2.cacheWrite !== undefined){let data7 = data2.cacheWrite;const _errs26 = errors;let valid8 = false;const _errs27 = errors;if(!((typeof data7 == "number") && (isFinite(data7)))){const err18 = {instancePath:instancePath+"/tiers/" + i0+"/cacheWrite",schemaPath:"aether:bindings#/definitions/PricingTier/properties/cacheWrite/anyOf/0/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err18];}else {vErrors.push(err18);}errors++;}var _valid2 = _errs27 === errors;valid8 = valid8 || _valid2;if(!valid8){const _errs29 = errors;if(data7 !== null){const err19 = {instancePath:instancePath+"/tiers/" + i0+"/cacheWrite",schemaPath:"aether:bindings#/definitions/PricingTier/properties/cacheWrite/anyOf/1/type",keyword:"type",params:{type: "null"},message:"must be null"};if(vErrors === null){vErrors = [err19];}else {vErrors.push(err19);}errors++;}var _valid2 = _errs29 === errors;valid8 = valid8 || _valid2;}if(!valid8){const err20 = {instancePath:instancePath+"/tiers/" + i0+"/cacheWrite",schemaPath:"aether:bindings#/definitions/PricingTier/properties/cacheWrite/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err20];}else {vErrors.push(err20);}errors++;}else {errors = _errs26;if(vErrors !== null){if(_errs26){vErrors.length = _errs26;}else {vErrors = null;}}}}}else {const err21 = {instancePath:instancePath+"/tiers/" + i0,schemaPath:"aether:bindings#/definitions/PricingTier/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err21];}else {vErrors.push(err21);}errors++;}}}else {const err22 = {instancePath:instancePath+"/tiers",schemaPath:"#/properties/tiers/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err22];}else {vErrors.push(err22);}errors++;}}}else {const err23 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err23];}else {vErrors.push(err23);}errors++;}validate128.errors = vErrors;return errors === 0;}function validate127(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="aether:validator:ModelPricing" */;let vErrors = null;let errors = 0;if(!(validate128(data, {instancePath,parentData,parentDataProperty,rootData}))){vErrors = vErrors === null ? validate128.errors : vErrors.concat(validate128.errors);errors = vErrors.length;}validate127.errors = vErrors;return errors === 0;}export const validateModelRef = validate130;const schema144 = {"$id":"aether:validator:ModelRef","$ref":"https://aether.local/contracts/v1/common.schema.json#/definitions/ModelRef"};const schema145 = {"type":"object","additionalProperties":false,"required":["endpointId","modelId"],"properties":{"endpointId":{"type":"string"},"modelId":{"type":"string"}}};function validate130(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="aether:validator:ModelRef" */;let vErrors = null;let errors = 0;if(data && typeof data == "object" && !Array.isArray(data)){if(data.endpointId === undefined){const err0 = {instancePath,schemaPath:"https://aether.local/contracts/v1/common.schema.json#/definitions/ModelRef/required",keyword:"required",params:{missingProperty: "endpointId"},message:"must have required property '"+"endpointId"+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}if(data.modelId === undefined){const err1 = {instancePath,schemaPath:"https://aether.local/contracts/v1/common.schema.json#/definitions/ModelRef/required",keyword:"required",params:{missingProperty: "modelId"},message:"must have required property '"+"modelId"+"'"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}for(const key0 in data){if(!((key0 === "endpointId") || (key0 === "modelId"))){const err2 = {instancePath,schemaPath:"https://aether.local/contracts/v1/common.schema.json#/definitions/ModelRef/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}}if(data.endpointId !== undefined){if(typeof data.endpointId !== "string"){const err3 = {instancePath:instancePath+"/endpointId",schemaPath:"https://aether.local/contracts/v1/common.schema.json#/definitions/ModelRef/properties/endpointId/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}}if(data.modelId !== undefined){if(typeof data.modelId !== "string"){const err4 = {instancePath:instancePath+"/modelId",schemaPath:"https://aether.local/contracts/v1/common.schema.json#/definitions/ModelRef/properties/modelId/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}}}else {const err5 = {instancePath,schemaPath:"https://aether.local/contracts/v1/common.schema.json#/definitions/ModelRef/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}validate130.errors = vErrors;return errors === 0;}export const validateModelSave = validate131;const schema146 = {"$id":"aether:validator:ModelSave","$ref":"aether:bindings#/definitions/ModelSave"};function validate132(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;if(data && typeof data == "object" && !Array.isArray(data)){if(data.id === undefined){const err0 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "id"},message:"must have required property '"+"id"+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}if(data.modelType === undefined){const err1 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "modelType"},message:"must have required property '"+"modelType"+"'"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}if(data.typeSource === undefined){const err2 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "typeSource"},message:"must have required property '"+"typeSource"+"'"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}if(data.contextWindow === undefined){const err3 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "contextWindow"},message:"must have required property '"+"contextWindow"+"'"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}if(data.maxOutput === undefined){const err4 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "maxOutput"},message:"must have required property '"+"maxOutput"+"'"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}if(data.canVision === undefined){const err5 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "canVision"},message:"must have required property '"+"canVision"+"'"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}if(data.supportsTools === undefined){const err6 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "supportsTools"},message:"must have required property '"+"supportsTools"+"'"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}if(data.nativeWebSearch === undefined){const err7 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "nativeWebSearch"},message:"must have required property '"+"nativeWebSearch"+"'"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}if(data.name === undefined){const err8 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "name"},message:"must have required property '"+"name"+"'"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}if(data.groupName === undefined){const err9 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "groupName"},message:"must have required property '"+"groupName"+"'"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}if(data.pricing === undefined){const err10 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "pricing"},message:"must have required property '"+"pricing"+"'"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}for(const key0 in data){if(!(func8.call(schema89.properties, key0))){const err11 = {instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}}if(data.id !== undefined){if(typeof data.id !== "string"){const err12 = {instancePath:instancePath+"/id",schemaPath:"#/properties/id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}}if(data.modelType !== undefined){let data1 = data.modelType;const _errs6 = errors;let valid2 = false;const _errs7 = errors;if("chat" !== data1){const err13 = {instancePath:instancePath+"/modelType",schemaPath:"aether:bindings#/definitions/ModelType/anyOf/0/const",keyword:"const",params:{allowedValue: "chat"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}var _valid0 = _errs7 === errors;valid2 = valid2 || _valid0;if(!valid2){const _errs8 = errors;if("image" !== data1){const err14 = {instancePath:instancePath+"/modelType",schemaPath:"aether:bindings#/definitions/ModelType/anyOf/1/const",keyword:"const",params:{allowedValue: "image"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err14];}else {vErrors.push(err14);}errors++;}var _valid0 = _errs8 === errors;valid2 = valid2 || _valid0;if(!valid2){const _errs9 = errors;if("video" !== data1){const err15 = {instancePath:instancePath+"/modelType",schemaPath:"aether:bindings#/definitions/ModelType/anyOf/2/const",keyword:"const",params:{allowedValue: "video"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err15];}else {vErrors.push(err15);}errors++;}var _valid0 = _errs9 === errors;valid2 = valid2 || _valid0;if(!valid2){const _errs10 = errors;if("tts" !== data1){const err16 = {instancePath:instancePath+"/modelType",schemaPath:"aether:bindings#/definitions/ModelType/anyOf/3/const",keyword:"const",params:{allowedValue: "tts"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err16];}else {vErrors.push(err16);}errors++;}var _valid0 = _errs10 === errors;valid2 = valid2 || _valid0;if(!valid2){const _errs11 = errors;if("stt" !== data1){const err17 = {instancePath:instancePath+"/modelType",schemaPath:"aether:bindings#/definitions/ModelType/anyOf/4/const",keyword:"const",params:{allowedValue: "stt"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err17];}else {vErrors.push(err17);}errors++;}var _valid0 = _errs11 === errors;valid2 = valid2 || _valid0;if(!valid2){const _errs12 = errors;if("embedding" !== data1){const err18 = {instancePath:instancePath+"/modelType",schemaPath:"aether:bindings#/definitions/ModelType/anyOf/5/const",keyword:"const",params:{allowedValue: "embedding"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err18];}else {vErrors.push(err18);}errors++;}var _valid0 = _errs12 === errors;valid2 = valid2 || _valid0;if(!valid2){const _errs13 = errors;if("rerank" !== data1){const err19 = {instancePath:instancePath+"/modelType",schemaPath:"aether:bindings#/definitions/ModelType/anyOf/6/const",keyword:"const",params:{allowedValue: "rerank"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err19];}else {vErrors.push(err19);}errors++;}var _valid0 = _errs13 === errors;valid2 = valid2 || _valid0;if(!valid2){const _errs14 = errors;if("unknown" !== data1){const err20 = {instancePath:instancePath+"/modelType",schemaPath:"aether:bindings#/definitions/ModelType/anyOf/7/const",keyword:"const",params:{allowedValue: "unknown"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err20];}else {vErrors.push(err20);}errors++;}var _valid0 = _errs14 === errors;valid2 = valid2 || _valid0;}}}}}}}if(!valid2){const err21 = {instancePath:instancePath+"/modelType",schemaPath:"aether:bindings#/definitions/ModelType/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err21];}else {vErrors.push(err21);}errors++;}else {errors = _errs6;if(vErrors !== null){if(_errs6){vErrors.length = _errs6;}else {vErrors = null;}}}}if(data.typeSource !== undefined){let data2 = data.typeSource;const _errs17 = errors;let valid4 = false;const _errs18 = errors;if("inferred" !== data2){const err22 = {instancePath:instancePath+"/typeSource",schemaPath:"aether:bindings#/definitions/TypeSource/anyOf/0/const",keyword:"const",params:{allowedValue: "inferred"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err22];}else {vErrors.push(err22);}errors++;}var _valid1 = _errs18 === errors;valid4 = valid4 || _valid1;if(!valid4){const _errs19 = errors;if("user" !== data2){const err23 = {instancePath:instancePath+"/typeSource",schemaPath:"aether:bindings#/definitions/TypeSource/anyOf/1/const",keyword:"const",params:{allowedValue: "user"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err23];}else {vErrors.push(err23);}errors++;}var _valid1 = _errs19 === errors;valid4 = valid4 || _valid1;}if(!valid4){const err24 = {instancePath:instancePath+"/typeSource",schemaPath:"aether:bindings#/definitions/TypeSource/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err24];}else {vErrors.push(err24);}errors++;}else {errors = _errs17;if(vErrors !== null){if(_errs17){vErrors.length = _errs17;}else {vErrors = null;}}}}if(data.contextWindow !== undefined){let data3 = data.contextWindow;const _errs21 = errors;let valid5 = false;const _errs22 = errors;if(!((typeof data3 == "number") && (isFinite(data3)))){const err25 = {instancePath:instancePath+"/contextWindow",schemaPath:"#/properties/contextWindow/anyOf/0/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err25];}else {vErrors.push(err25);}errors++;}var _valid2 = _errs22 === errors;valid5 = valid5 || _valid2;if(!valid5){const _errs24 = errors;if(data3 !== null){const err26 = {instancePath:instancePath+"/contextWindow",schemaPath:"#/properties/contextWindow/anyOf/1/type",keyword:"type",params:{type: "null"},message:"must be null"};if(vErrors === null){vErrors = [err26];}else {vErrors.push(err26);}errors++;}var _valid2 = _errs24 === errors;valid5 = valid5 || _valid2;}if(!valid5){const err27 = {instancePath:instancePath+"/contextWindow",schemaPath:"#/properties/contextWindow/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err27];}else {vErrors.push(err27);}errors++;}else {errors = _errs21;if(vErrors !== null){if(_errs21){vErrors.length = _errs21;}else {vErrors = null;}}}}if(data.maxOutput !== undefined){let data4 = data.maxOutput;const _errs27 = errors;let valid6 = false;const _errs28 = errors;if(!((typeof data4 == "number") && (isFinite(data4)))){const err28 = {instancePath:instancePath+"/maxOutput",schemaPath:"#/properties/maxOutput/anyOf/0/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err28];}else {vErrors.push(err28);}errors++;}var _valid3 = _errs28 === errors;valid6 = valid6 || _valid3;if(!valid6){const _errs30 = errors;if(data4 !== null){const err29 = {instancePath:instancePath+"/maxOutput",schemaPath:"#/properties/maxOutput/anyOf/1/type",keyword:"type",params:{type: "null"},message:"must be null"};if(vErrors === null){vErrors = [err29];}else {vErrors.push(err29);}errors++;}var _valid3 = _errs30 === errors;valid6 = valid6 || _valid3;}if(!valid6){const err30 = {instancePath:instancePath+"/maxOutput",schemaPath:"#/properties/maxOutput/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err30];}else {vErrors.push(err30);}errors++;}else {errors = _errs27;if(vErrors !== null){if(_errs27){vErrors.length = _errs27;}else {vErrors = null;}}}}if(data.canVision !== undefined){if(typeof data.canVision !== "boolean"){const err31 = {instancePath:instancePath+"/canVision",schemaPath:"#/properties/canVision/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"};if(vErrors === null){vErrors = [err31];}else {vErrors.push(err31);}errors++;}}if(data.supportsTools !== undefined){let data6 = data.supportsTools;const _errs35 = errors;let valid7 = false;const _errs36 = errors;if(typeof data6 !== "boolean"){const err32 = {instancePath:instancePath+"/supportsTools",schemaPath:"#/properties/supportsTools/anyOf/0/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"};if(vErrors === null){vErrors = [err32];}else {vErrors.push(err32);}errors++;}var _valid4 = _errs36 === errors;valid7 = valid7 || _valid4;if(!valid7){const _errs38 = errors;if(data6 !== null){const err33 = {instancePath:instancePath+"/supportsTools",schemaPath:"#/properties/supportsTools/anyOf/1/type",keyword:"type",params:{type: "null"},message:"must be null"};if(vErrors === null){vErrors = [err33];}else {vErrors.push(err33);}errors++;}var _valid4 = _errs38 === errors;valid7 = valid7 || _valid4;}if(!valid7){const err34 = {instancePath:instancePath+"/supportsTools",schemaPath:"#/properties/supportsTools/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err34];}else {vErrors.push(err34);}errors++;}else {errors = _errs35;if(vErrors !== null){if(_errs35){vErrors.length = _errs35;}else {vErrors = null;}}}}if(data.reasoning !== undefined){let data7 = data.reasoning;const _errs41 = errors;let valid8 = false;const _errs42 = errors;if(!(validate71(data7, {instancePath:instancePath+"/reasoning",parentData:data,parentDataProperty:"reasoning",rootData}))){vErrors = vErrors === null ? validate71.errors : vErrors.concat(validate71.errors);errors = vErrors.length;}var _valid5 = _errs42 === errors;valid8 = valid8 || _valid5;if(!valid8){const _errs43 = errors;if(data7 !== null){const err35 = {instancePath:instancePath+"/reasoning",schemaPath:"#/properties/reasoning/anyOf/1/type",keyword:"type",params:{type: "null"},message:"must be null"};if(vErrors === null){vErrors = [err35];}else {vErrors.push(err35);}errors++;}var _valid5 = _errs43 === errors;valid8 = valid8 || _valid5;}if(!valid8){const err36 = {instancePath:instancePath+"/reasoning",schemaPath:"#/properties/reasoning/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err36];}else {vErrors.push(err36);}errors++;}else {errors = _errs41;if(vErrors !== null){if(_errs41){vErrors.length = _errs41;}else {vErrors = null;}}}}if(data.nativeWebSearch !== undefined){if(typeof data.nativeWebSearch !== "boolean"){const err37 = {instancePath:instancePath+"/nativeWebSearch",schemaPath:"#/properties/nativeWebSearch/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"};if(vErrors === null){vErrors = [err37];}else {vErrors.push(err37);}errors++;}}if(data.name !== undefined){let data9 = data.name;const _errs48 = errors;let valid9 = false;const _errs49 = errors;if(typeof data9 !== "string"){const err38 = {instancePath:instancePath+"/name",schemaPath:"#/properties/name/anyOf/0/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err38];}else {vErrors.push(err38);}errors++;}var _valid6 = _errs49 === errors;valid9 = valid9 || _valid6;if(!valid9){const _errs51 = errors;if(data9 !== null){const err39 = {instancePath:instancePath+"/name",schemaPath:"#/properties/name/anyOf/1/type",keyword:"type",params:{type: "null"},message:"must be null"};if(vErrors === null){vErrors = [err39];}else {vErrors.push(err39);}errors++;}var _valid6 = _errs51 === errors;valid9 = valid9 || _valid6;}if(!valid9){const err40 = {instancePath:instancePath+"/name",schemaPath:"#/properties/name/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err40];}else {vErrors.push(err40);}errors++;}else {errors = _errs48;if(vErrors !== null){if(_errs48){vErrors.length = _errs48;}else {vErrors = null;}}}}if(data.groupName !== undefined){let data10 = data.groupName;const _errs54 = errors;let valid10 = false;const _errs55 = errors;if(typeof data10 !== "string"){const err41 = {instancePath:instancePath+"/groupName",schemaPath:"#/properties/groupName/anyOf/0/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err41];}else {vErrors.push(err41);}errors++;}var _valid7 = _errs55 === errors;valid10 = valid10 || _valid7;if(!valid10){const _errs57 = errors;if(data10 !== null){const err42 = {instancePath:instancePath+"/groupName",schemaPath:"#/properties/groupName/anyOf/1/type",keyword:"type",params:{type: "null"},message:"must be null"};if(vErrors === null){vErrors = [err42];}else {vErrors.push(err42);}errors++;}var _valid7 = _errs57 === errors;valid10 = valid10 || _valid7;}if(!valid10){const err43 = {instancePath:instancePath+"/groupName",schemaPath:"#/properties/groupName/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err43];}else {vErrors.push(err43);}errors++;}else {errors = _errs54;if(vErrors !== null){if(_errs54){vErrors.length = _errs54;}else {vErrors = null;}}}}if(data.pricing !== undefined){let data11 = data.pricing;const _errs60 = errors;let valid11 = false;const _errs61 = errors;if(!(validate73(data11, {instancePath:instancePath+"/pricing",parentData:data,parentDataProperty:"pricing",rootData}))){vErrors = vErrors === null ? validate73.errors : vErrors.concat(validate73.errors);errors = vErrors.length;}var _valid8 = _errs61 === errors;valid11 = valid11 || _valid8;if(!valid11){const _errs62 = errors;if(data11 !== null){const err44 = {instancePath:instancePath+"/pricing",schemaPath:"#/properties/pricing/anyOf/1/type",keyword:"type",params:{type: "null"},message:"must be null"};if(vErrors === null){vErrors = [err44];}else {vErrors.push(err44);}errors++;}var _valid8 = _errs62 === errors;valid11 = valid11 || _valid8;}if(!valid11){const err45 = {instancePath:instancePath+"/pricing",schemaPath:"#/properties/pricing/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err45];}else {vErrors.push(err45);}errors++;}else {errors = _errs60;if(vErrors !== null){if(_errs60){vErrors.length = _errs60;}else {vErrors = null;}}}}}else {const err46 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err46];}else {vErrors.push(err46);}errors++;}validate132.errors = vErrors;return errors === 0;}function validate131(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="aether:validator:ModelSave" */;let vErrors = null;let errors = 0;if(!(validate132(data, {instancePath,parentData,parentDataProperty,rootData}))){vErrors = vErrors === null ? validate132.errors : vErrors.concat(validate132.errors);errors = vErrors.length;}validate131.errors = vErrors;return errors === 0;}export const validateModelType = validate136;const schema150 = {"$id":"aether:validator:ModelType","$ref":"aether:bindings#/definitions/ModelType"};function validate136(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="aether:validator:ModelType" */;let vErrors = null;let errors = 0;const _errs1 = errors;let valid1 = false;const _errs2 = errors;if("chat" !== data){const err0 = {instancePath,schemaPath:"aether:bindings#/definitions/ModelType/anyOf/0/const",keyword:"const",params:{allowedValue: "chat"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}var _valid0 = _errs2 === errors;valid1 = valid1 || _valid0;if(!valid1){const _errs3 = errors;if("image" !== data){const err1 = {instancePath,schemaPath:"aether:bindings#/definitions/ModelType/anyOf/1/const",keyword:"const",params:{allowedValue: "image"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}var _valid0 = _errs3 === errors;valid1 = valid1 || _valid0;if(!valid1){const _errs4 = errors;if("video" !== data){const err2 = {instancePath,schemaPath:"aether:bindings#/definitions/ModelType/anyOf/2/const",keyword:"const",params:{allowedValue: "video"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}var _valid0 = _errs4 === errors;valid1 = valid1 || _valid0;if(!valid1){const _errs5 = errors;if("tts" !== data){const err3 = {instancePath,schemaPath:"aether:bindings#/definitions/ModelType/anyOf/3/const",keyword:"const",params:{allowedValue: "tts"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}var _valid0 = _errs5 === errors;valid1 = valid1 || _valid0;if(!valid1){const _errs6 = errors;if("stt" !== data){const err4 = {instancePath,schemaPath:"aether:bindings#/definitions/ModelType/anyOf/4/const",keyword:"const",params:{allowedValue: "stt"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}var _valid0 = _errs6 === errors;valid1 = valid1 || _valid0;if(!valid1){const _errs7 = errors;if("embedding" !== data){const err5 = {instancePath,schemaPath:"aether:bindings#/definitions/ModelType/anyOf/5/const",keyword:"const",params:{allowedValue: "embedding"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}var _valid0 = _errs7 === errors;valid1 = valid1 || _valid0;if(!valid1){const _errs8 = errors;if("rerank" !== data){const err6 = {instancePath,schemaPath:"aether:bindings#/definitions/ModelType/anyOf/6/const",keyword:"const",params:{allowedValue: "rerank"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}var _valid0 = _errs8 === errors;valid1 = valid1 || _valid0;if(!valid1){const _errs9 = errors;if("unknown" !== data){const err7 = {instancePath,schemaPath:"aether:bindings#/definitions/ModelType/anyOf/7/const",keyword:"const",params:{allowedValue: "unknown"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}var _valid0 = _errs9 === errors;valid1 = valid1 || _valid0;}}}}}}}if(!valid1){const err8 = {instancePath,schemaPath:"aether:bindings#/definitions/ModelType/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}else {errors = _errs1;if(vErrors !== null){if(_errs1){vErrors.length = _errs1;}else {vErrors = null;}}}validate136.errors = vErrors;return errors === 0;}export const validatePermissionMode = validate137;const schema152 = {"$id":"aether:validator:PermissionMode","$ref":"https://aether.local/contracts/v1/common.schema.json#/definitions/PermissionMode"};const schema153 = {"enum":["default","plan","accept_edits","auto","full_access"]};function validate137(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="aether:validator:PermissionMode" */;let vErrors = null;let errors = 0;if(!(((((data === "default") || (data === "plan")) || (data === "accept_edits")) || (data === "auto")) || (data === "full_access"))){const err0 = {instancePath,schemaPath:"https://aether.local/contracts/v1/common.schema.json#/definitions/PermissionMode/enum",keyword:"enum",params:{allowedValues: schema153.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}validate137.errors = vErrors;return errors === 0;}export const validatePreview = validate138;const schema154 = {"$id":"aether:validator:Preview","$ref":"aether:bindings#/definitions/Preview"};const schema155 = {"type":"object","properties":{"digest":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"version":{"anyOf":[{"type":"string"},{"type":"null"}]},"body":{"type":"string"},"license":{"anyOf":[{"type":"string"},{"type":"null"}]},"extra":{"type":"object","additionalProperties":{"type":"string"}},"files":{"type":"array","items":{"$ref":"aether:bindings#/definitions/SkillFileMeta"}},"action":{"$ref":"aether:bindings#/definitions/PreviewAction"},"current":{"anyOf":[{"$ref":"aether:bindings#/definitions/PreviewCurrent"},{"type":"null"}]}},"required":["digest","name","description","version","body","license","extra","files","action","current"],"additionalProperties":false};const schema158 = {"anyOf":[{"const":"install"},{"const":"replace"}]};const schema159 = {"type":"object","properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}]},"revision":{"type":"number"}},"required":["version","revision"],"additionalProperties":false};const schema156 = {"type":"object","properties":{"path":{"type":"string"},"kind":{"$ref":"aether:bindings#/definitions/SkillFileKind"},"size":{"type":"number"}},"required":["path","kind","size"],"additionalProperties":false};const schema157 = {"anyOf":[{"const":"script"},{"const":"reference"},{"const":"asset"}]};function validate140(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;if(data && typeof data == "object" && !Array.isArray(data)){if(data.path === undefined){const err0 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "path"},message:"must have required property '"+"path"+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}if(data.kind === undefined){const err1 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "kind"},message:"must have required property '"+"kind"+"'"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}if(data.size === undefined){const err2 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "size"},message:"must have required property '"+"size"+"'"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}for(const key0 in data){if(!(((key0 === "path") || (key0 === "kind")) || (key0 === "size"))){const err3 = {instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}}if(data.path !== undefined){if(typeof data.path !== "string"){const err4 = {instancePath:instancePath+"/path",schemaPath:"#/properties/path/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}}if(data.kind !== undefined){let data1 = data.kind;const _errs6 = errors;let valid2 = false;const _errs7 = errors;if("script" !== data1){const err5 = {instancePath:instancePath+"/kind",schemaPath:"aether:bindings#/definitions/SkillFileKind/anyOf/0/const",keyword:"const",params:{allowedValue: "script"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}var _valid0 = _errs7 === errors;valid2 = valid2 || _valid0;if(!valid2){const _errs8 = errors;if("reference" !== data1){const err6 = {instancePath:instancePath+"/kind",schemaPath:"aether:bindings#/definitions/SkillFileKind/anyOf/1/const",keyword:"const",params:{allowedValue: "reference"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}var _valid0 = _errs8 === errors;valid2 = valid2 || _valid0;if(!valid2){const _errs9 = errors;if("asset" !== data1){const err7 = {instancePath:instancePath+"/kind",schemaPath:"aether:bindings#/definitions/SkillFileKind/anyOf/2/const",keyword:"const",params:{allowedValue: "asset"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}var _valid0 = _errs9 === errors;valid2 = valid2 || _valid0;}}if(!valid2){const err8 = {instancePath:instancePath+"/kind",schemaPath:"aether:bindings#/definitions/SkillFileKind/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}else {errors = _errs6;if(vErrors !== null){if(_errs6){vErrors.length = _errs6;}else {vErrors = null;}}}}if(data.size !== undefined){let data2 = data.size;if(!((typeof data2 == "number") && (isFinite(data2)))){const err9 = {instancePath:instancePath+"/size",schemaPath:"#/properties/size/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}}}else {const err10 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}validate140.errors = vErrors;return errors === 0;}function validate139(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;if(data && typeof data == "object" && !Array.isArray(data)){if(data.digest === undefined){const err0 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "digest"},message:"must have required property '"+"digest"+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}if(data.name === undefined){const err1 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "name"},message:"must have required property '"+"name"+"'"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}if(data.description === undefined){const err2 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "description"},message:"must have required property '"+"description"+"'"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}if(data.version === undefined){const err3 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "version"},message:"must have required property '"+"version"+"'"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}if(data.body === undefined){const err4 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "body"},message:"must have required property '"+"body"+"'"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}if(data.license === undefined){const err5 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "license"},message:"must have required property '"+"license"+"'"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}if(data.extra === undefined){const err6 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "extra"},message:"must have required property '"+"extra"+"'"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}if(data.files === undefined){const err7 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "files"},message:"must have required property '"+"files"+"'"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}if(data.action === undefined){const err8 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "action"},message:"must have required property '"+"action"+"'"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}if(data.current === undefined){const err9 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "current"},message:"must have required property '"+"current"+"'"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}for(const key0 in data){if(!(func8.call(schema155.properties, key0))){const err10 = {instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}}if(data.digest !== undefined){if(typeof data.digest !== "string"){const err11 = {instancePath:instancePath+"/digest",schemaPath:"#/properties/digest/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}}if(data.name !== undefined){if(typeof data.name !== "string"){const err12 = {instancePath:instancePath+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}}if(data.description !== undefined){if(typeof data.description !== "string"){const err13 = {instancePath:instancePath+"/description",schemaPath:"#/properties/description/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}}if(data.version !== undefined){let data3 = data.version;const _errs9 = errors;let valid1 = false;const _errs10 = errors;if(typeof data3 !== "string"){const err14 = {instancePath:instancePath+"/version",schemaPath:"#/properties/version/anyOf/0/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err14];}else {vErrors.push(err14);}errors++;}var _valid0 = _errs10 === errors;valid1 = valid1 || _valid0;if(!valid1){const _errs12 = errors;if(data3 !== null){const err15 = {instancePath:instancePath+"/version",schemaPath:"#/properties/version/anyOf/1/type",keyword:"type",params:{type: "null"},message:"must be null"};if(vErrors === null){vErrors = [err15];}else {vErrors.push(err15);}errors++;}var _valid0 = _errs12 === errors;valid1 = valid1 || _valid0;}if(!valid1){const err16 = {instancePath:instancePath+"/version",schemaPath:"#/properties/version/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err16];}else {vErrors.push(err16);}errors++;}else {errors = _errs9;if(vErrors !== null){if(_errs9){vErrors.length = _errs9;}else {vErrors = null;}}}}if(data.body !== undefined){if(typeof data.body !== "string"){const err17 = {instancePath:instancePath+"/body",schemaPath:"#/properties/body/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err17];}else {vErrors.push(err17);}errors++;}}if(data.license !== undefined){let data5 = data.license;const _errs17 = errors;let valid2 = false;const _errs18 = errors;if(typeof data5 !== "string"){const err18 = {instancePath:instancePath+"/license",schemaPath:"#/properties/license/anyOf/0/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err18];}else {vErrors.push(err18);}errors++;}var _valid1 = _errs18 === errors;valid2 = valid2 || _valid1;if(!valid2){const _errs20 = errors;if(data5 !== null){const err19 = {instancePath:instancePath+"/license",schemaPath:"#/properties/license/anyOf/1/type",keyword:"type",params:{type: "null"},message:"must be null"};if(vErrors === null){vErrors = [err19];}else {vErrors.push(err19);}errors++;}var _valid1 = _errs20 === errors;valid2 = valid2 || _valid1;}if(!valid2){const err20 = {instancePath:instancePath+"/license",schemaPath:"#/properties/license/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err20];}else {vErrors.push(err20);}errors++;}else {errors = _errs17;if(vErrors !== null){if(_errs17){vErrors.length = _errs17;}else {vErrors = null;}}}}if(data.extra !== undefined){let data6 = data.extra;if(data6 && typeof data6 == "object" && !Array.isArray(data6)){for(const key1 in data6){if(typeof data6[key1] !== "string"){const err21 = {instancePath:instancePath+"/extra/" + key1.replace(/~/g, "~0").replace(/\//g, "~1"),schemaPath:"#/properties/extra/additionalProperties/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err21];}else {vErrors.push(err21);}errors++;}}}else {const err22 = {instancePath:instancePath+"/extra",schemaPath:"#/properties/extra/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err22];}else {vErrors.push(err22);}errors++;}}if(data.files !== undefined){let data8 = data.files;if(Array.isArray(data8)){const len0 = data8.length;for(let i0=0; i0<len0; i0++){if(!(validate140(data8[i0], {instancePath:instancePath+"/files/" + i0,parentData:data8,parentDataProperty:i0,rootData}))){vErrors = vErrors === null ? validate140.errors : vErrors.concat(validate140.errors);errors = vErrors.length;}}}else {const err23 = {instancePath:instancePath+"/files",schemaPath:"#/properties/files/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err23];}else {vErrors.push(err23);}errors++;}}if(data.action !== undefined){let data10 = data.action;const _errs32 = errors;let valid7 = false;const _errs33 = errors;if("install" !== data10){const err24 = {instancePath:instancePath+"/action",schemaPath:"aether:bindings#/definitions/PreviewAction/anyOf/0/const",keyword:"const",params:{allowedValue: "install"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err24];}else {vErrors.push(err24);}errors++;}var _valid2 = _errs33 === errors;valid7 = valid7 || _valid2;if(!valid7){const _errs34 = errors;if("replace" !== data10){const err25 = {instancePath:instancePath+"/action",schemaPath:"aether:bindings#/definitions/PreviewAction/anyOf/1/const",keyword:"const",params:{allowedValue: "replace"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err25];}else {vErrors.push(err25);}errors++;}var _valid2 = _errs34 === errors;valid7 = valid7 || _valid2;}if(!valid7){const err26 = {instancePath:instancePath+"/action",schemaPath:"aether:bindings#/definitions/PreviewAction/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err26];}else {vErrors.push(err26);}errors++;}else {errors = _errs32;if(vErrors !== null){if(_errs32){vErrors.length = _errs32;}else {vErrors = null;}}}}if(data.current !== undefined){let data11 = data.current;const _errs36 = errors;let valid8 = false;const _errs37 = errors;if(data11 && typeof data11 == "object" && !Array.isArray(data11)){if(data11.version === undefined){const err27 = {instancePath:instancePath+"/current",schemaPath:"aether:bindings#/definitions/PreviewCurrent/required",keyword:"required",params:{missingProperty: "version"},message:"must have required property '"+"version"+"'"};if(vErrors === null){vErrors = [err27];}else {vErrors.push(err27);}errors++;}if(data11.revision === undefined){const err28 = {instancePath:instancePath+"/current",schemaPath:"aether:bindings#/definitions/PreviewCurrent/required",keyword:"required",params:{missingProperty: "revision"},message:"must have required property '"+"revision"+"'"};if(vErrors === null){vErrors = [err28];}else {vErrors.push(err28);}errors++;}for(const key2 in data11){if(!((key2 === "version") || (key2 === "revision"))){const err29 = {instancePath:instancePath+"/current",schemaPath:"aether:bindings#/definitions/PreviewCurrent/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key2},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err29];}else {vErrors.push(err29);}errors++;}}if(data11.version !== undefined){let data12 = data11.version;const _errs42 = errors;let valid11 = false;const _errs43 = errors;if(typeof data12 !== "string"){const err30 = {instancePath:instancePath+"/current/version",schemaPath:"aether:bindings#/definitions/PreviewCurrent/properties/version/anyOf/0/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err30];}else {vErrors.push(err30);}errors++;}var _valid4 = _errs43 === errors;valid11 = valid11 || _valid4;if(!valid11){const _errs45 = errors;if(data12 !== null){const err31 = {instancePath:instancePath+"/current/version",schemaPath:"aether:bindings#/definitions/PreviewCurrent/properties/version/anyOf/1/type",keyword:"type",params:{type: "null"},message:"must be null"};if(vErrors === null){vErrors = [err31];}else {vErrors.push(err31);}errors++;}var _valid4 = _errs45 === errors;valid11 = valid11 || _valid4;}if(!valid11){const err32 = {instancePath:instancePath+"/current/version",schemaPath:"aether:bindings#/definitions/PreviewCurrent/properties/version/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err32];}else {vErrors.push(err32);}errors++;}else {errors = _errs42;if(vErrors !== null){if(_errs42){vErrors.length = _errs42;}else {vErrors = null;}}}}if(data11.revision !== undefined){let data13 = data11.revision;if(!((typeof data13 == "number") && (isFinite(data13)))){const err33 = {instancePath:instancePath+"/current/revision",schemaPath:"aether:bindings#/definitions/PreviewCurrent/properties/revision/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err33];}else {vErrors.push(err33);}errors++;}}}else {const err34 = {instancePath:instancePath+"/current",schemaPath:"aether:bindings#/definitions/PreviewCurrent/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err34];}else {vErrors.push(err34);}errors++;}var _valid3 = _errs37 === errors;valid8 = valid8 || _valid3;if(!valid8){const _errs49 = errors;if(data11 !== null){const err35 = {instancePath:instancePath+"/current",schemaPath:"#/properties/current/anyOf/1/type",keyword:"type",params:{type: "null"},message:"must be null"};if(vErrors === null){vErrors = [err35];}else {vErrors.push(err35);}errors++;}var _valid3 = _errs49 === errors;valid8 = valid8 || _valid3;}if(!valid8){const err36 = {instancePath:instancePath+"/current",schemaPath:"#/properties/current/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err36];}else {vErrors.push(err36);}errors++;}else {errors = _errs36;if(vErrors !== null){if(_errs36){vErrors.length = _errs36;}else {vErrors = null;}}}}}else {const err37 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err37];}else {vErrors.push(err37);}errors++;}validate139.errors = vErrors;return errors === 0;}function validate138(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="aether:validator:Preview" */;let vErrors = null;let errors = 0;if(!(validate139(data, {instancePath,parentData,parentDataProperty,rootData}))){vErrors = vErrors === null ? validate139.errors : vErrors.concat(validate139.errors);errors = vErrors.length;}validate138.errors = vErrors;return errors === 0;}export const validatePreviewAction = validate143;const schema160 = {"$id":"aether:validator:PreviewAction","$ref":"aether:bindings#/definitions/PreviewAction"};function validate143(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="aether:validator:PreviewAction" */;let vErrors = null;let errors = 0;const _errs1 = errors;let valid1 = false;const _errs2 = errors;if("install" !== data){const err0 = {instancePath,schemaPath:"aether:bindings#/definitions/PreviewAction/anyOf/0/const",keyword:"const",params:{allowedValue: "install"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}var _valid0 = _errs2 === errors;valid1 = valid1 || _valid0;if(!valid1){const _errs3 = errors;if("replace" !== data){const err1 = {instancePath,schemaPath:"aether:bindings#/definitions/PreviewAction/anyOf/1/const",keyword:"const",params:{allowedValue: "replace"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}var _valid0 = _errs3 === errors;valid1 = valid1 || _valid0;}if(!valid1){const err2 = {instancePath,schemaPath:"aether:bindings#/definitions/PreviewAction/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}else {errors = _errs1;if(vErrors !== null){if(_errs1){vErrors.length = _errs1;}else {vErrors = null;}}}validate143.errors = vErrors;return errors === 0;}export const validatePreviewCurrent = validate144;const schema162 = {"$id":"aether:validator:PreviewCurrent","$ref":"aether:bindings#/definitions/PreviewCurrent"};function validate144(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="aether:validator:PreviewCurrent" */;let vErrors = null;let errors = 0;if(data && typeof data == "object" && !Array.isArray(data)){if(data.version === undefined){const err0 = {instancePath,schemaPath:"aether:bindings#/definitions/PreviewCurrent/required",keyword:"required",params:{missingProperty: "version"},message:"must have required property '"+"version"+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}if(data.revision === undefined){const err1 = {instancePath,schemaPath:"aether:bindings#/definitions/PreviewCurrent/required",keyword:"required",params:{missingProperty: "revision"},message:"must have required property '"+"revision"+"'"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}for(const key0 in data){if(!((key0 === "version") || (key0 === "revision"))){const err2 = {instancePath,schemaPath:"aether:bindings#/definitions/PreviewCurrent/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}}if(data.version !== undefined){let data0 = data.version;const _errs4 = errors;let valid2 = false;const _errs5 = errors;if(typeof data0 !== "string"){const err3 = {instancePath:instancePath+"/version",schemaPath:"aether:bindings#/definitions/PreviewCurrent/properties/version/anyOf/0/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}var _valid0 = _errs5 === errors;valid2 = valid2 || _valid0;if(!valid2){const _errs7 = errors;if(data0 !== null){const err4 = {instancePath:instancePath+"/version",schemaPath:"aether:bindings#/definitions/PreviewCurrent/properties/version/anyOf/1/type",keyword:"type",params:{type: "null"},message:"must be null"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}var _valid0 = _errs7 === errors;valid2 = valid2 || _valid0;}if(!valid2){const err5 = {instancePath:instancePath+"/version",schemaPath:"aether:bindings#/definitions/PreviewCurrent/properties/version/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}else {errors = _errs4;if(vErrors !== null){if(_errs4){vErrors.length = _errs4;}else {vErrors = null;}}}}if(data.revision !== undefined){let data1 = data.revision;if(!((typeof data1 == "number") && (isFinite(data1)))){const err6 = {instancePath:instancePath+"/revision",schemaPath:"aether:bindings#/definitions/PreviewCurrent/properties/revision/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}}}else {const err7 = {instancePath,schemaPath:"aether:bindings#/definitions/PreviewCurrent/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}validate144.errors = vErrors;return errors === 0;}export const validatePricingTier = validate145;const schema164 = {"$id":"aether:validator:PricingTier","$ref":"aether:bindings#/definitions/PricingTier"};function validate145(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="aether:validator:PricingTier" */;let vErrors = null;let errors = 0;if(data && typeof data == "object" && !Array.isArray(data)){if(data.minInputTokens === undefined){const err0 = {instancePath,schemaPath:"aether:bindings#/definitions/PricingTier/required",keyword:"required",params:{missingProperty: "minInputTokens"},message:"must have required property '"+"minInputTokens"+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}if(data.input === undefined){const err1 = {instancePath,schemaPath:"aether:bindings#/definitions/PricingTier/required",keyword:"required",params:{missingProperty: "input"},message:"must have required property '"+"input"+"'"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}if(data.output === undefined){const err2 = {instancePath,schemaPath:"aether:bindings#/definitions/PricingTier/required",keyword:"required",params:{missingProperty: "output"},message:"must have required property '"+"output"+"'"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}if(data.cacheRead === undefined){const err3 = {instancePath,schemaPath:"aether:bindings#/definitions/PricingTier/required",keyword:"required",params:{missingProperty: "cacheRead"},message:"must have required property '"+"cacheRead"+"'"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}if(data.cacheWrite === undefined){const err4 = {instancePath,schemaPath:"aether:bindings#/definitions/PricingTier/required",keyword:"required",params:{missingProperty: "cacheWrite"},message:"must have required property '"+"cacheWrite"+"'"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}for(const key0 in data){if(!(((((key0 === "minInputTokens") || (key0 === "input")) || (key0 === "output")) || (key0 === "cacheRead")) || (key0 === "cacheWrite"))){const err5 = {instancePath,schemaPath:"aether:bindings#/definitions/PricingTier/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}}if(data.minInputTokens !== undefined){let data0 = data.minInputTokens;if(!((typeof data0 == "number") && (isFinite(data0)))){const err6 = {instancePath:instancePath+"/minInputTokens",schemaPath:"aether:bindings#/definitions/PricingTier/properties/minInputTokens/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}}if(data.input !== undefined){let data1 = data.input;if(!((typeof data1 == "number") && (isFinite(data1)))){const err7 = {instancePath:instancePath+"/input",schemaPath:"aether:bindings#/definitions/PricingTier/properties/input/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}}if(data.output !== undefined){let data2 = data.output;if(!((typeof data2 == "number") && (isFinite(data2)))){const err8 = {instancePath:instancePath+"/output",schemaPath:"aether:bindings#/definitions/PricingTier/properties/output/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}}if(data.cacheRead !== undefined){let data3 = data.cacheRead;const _errs10 = errors;let valid2 = false;const _errs11 = errors;if(!((typeof data3 == "number") && (isFinite(data3)))){const err9 = {instancePath:instancePath+"/cacheRead",schemaPath:"aether:bindings#/definitions/PricingTier/properties/cacheRead/anyOf/0/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}var _valid0 = _errs11 === errors;valid2 = valid2 || _valid0;if(!valid2){const _errs13 = errors;if(data3 !== null){const err10 = {instancePath:instancePath+"/cacheRead",schemaPath:"aether:bindings#/definitions/PricingTier/properties/cacheRead/anyOf/1/type",keyword:"type",params:{type: "null"},message:"must be null"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}var _valid0 = _errs13 === errors;valid2 = valid2 || _valid0;}if(!valid2){const err11 = {instancePath:instancePath+"/cacheRead",schemaPath:"aether:bindings#/definitions/PricingTier/properties/cacheRead/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}else {errors = _errs10;if(vErrors !== null){if(_errs10){vErrors.length = _errs10;}else {vErrors = null;}}}}if(data.cacheWrite !== undefined){let data4 = data.cacheWrite;const _errs16 = errors;let valid3 = false;const _errs17 = errors;if(!((typeof data4 == "number") && (isFinite(data4)))){const err12 = {instancePath:instancePath+"/cacheWrite",schemaPath:"aether:bindings#/definitions/PricingTier/properties/cacheWrite/anyOf/0/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}var _valid1 = _errs17 === errors;valid3 = valid3 || _valid1;if(!valid3){const _errs19 = errors;if(data4 !== null){const err13 = {instancePath:instancePath+"/cacheWrite",schemaPath:"aether:bindings#/definitions/PricingTier/properties/cacheWrite/anyOf/1/type",keyword:"type",params:{type: "null"},message:"must be null"};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}var _valid1 = _errs19 === errors;valid3 = valid3 || _valid1;}if(!valid3){const err14 = {instancePath:instancePath+"/cacheWrite",schemaPath:"aether:bindings#/definitions/PricingTier/properties/cacheWrite/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err14];}else {vErrors.push(err14);}errors++;}else {errors = _errs16;if(vErrors !== null){if(_errs16){vErrors.length = _errs16;}else {vErrors = null;}}}}}else {const err15 = {instancePath,schemaPath:"aether:bindings#/definitions/PricingTier/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err15];}else {vErrors.push(err15);}errors++;}validate145.errors = vErrors;return errors === 0;}export const validateProbeError = validate146;const schema166 = {"$id":"aether:validator:ProbeError","$ref":"aether:bindings#/definitions/ProbeError"};const schema167 = {"type":"object","properties":{"kind":{"$ref":"aether:bindings#/definitions/ProbeErrorKind"},"status":{"anyOf":[{"type":"number"},{"type":"null"}]},"message":{"anyOf":[{"type":"string"},{"type":"null"}]},"hint":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["kind","status","message","hint"],"additionalProperties":false};const schema168 = {"anyOf":[{"const":"missing_key"},{"const":"unauthorized"},{"const":"not_found"},{"const":"rate_limited"},{"const":"status"},{"const":"timeout"},{"const":"connect"},{"const":"blocked_address"},{"const":"invalid_body"}]};function validate147(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;if(data && typeof data == "object" && !Array.isArray(data)){if(data.kind === undefined){const err0 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "kind"},message:"must have required property '"+"kind"+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}if(data.status === undefined){const err1 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "status"},message:"must have required property '"+"status"+"'"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}if(data.message === undefined){const err2 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "message"},message:"must have required property '"+"message"+"'"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}if(data.hint === undefined){const err3 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "hint"},message:"must have required property '"+"hint"+"'"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}for(const key0 in data){if(!((((key0 === "kind") || (key0 === "status")) || (key0 === "message")) || (key0 === "hint"))){const err4 = {instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}}if(data.kind !== undefined){let data0 = data.kind;const _errs4 = errors;let valid2 = false;const _errs5 = errors;if("missing_key" !== data0){const err5 = {instancePath:instancePath+"/kind",schemaPath:"aether:bindings#/definitions/ProbeErrorKind/anyOf/0/const",keyword:"const",params:{allowedValue: "missing_key"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}var _valid0 = _errs5 === errors;valid2 = valid2 || _valid0;if(!valid2){const _errs6 = errors;if("unauthorized" !== data0){const err6 = {instancePath:instancePath+"/kind",schemaPath:"aether:bindings#/definitions/ProbeErrorKind/anyOf/1/const",keyword:"const",params:{allowedValue: "unauthorized"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}var _valid0 = _errs6 === errors;valid2 = valid2 || _valid0;if(!valid2){const _errs7 = errors;if("not_found" !== data0){const err7 = {instancePath:instancePath+"/kind",schemaPath:"aether:bindings#/definitions/ProbeErrorKind/anyOf/2/const",keyword:"const",params:{allowedValue: "not_found"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}var _valid0 = _errs7 === errors;valid2 = valid2 || _valid0;if(!valid2){const _errs8 = errors;if("rate_limited" !== data0){const err8 = {instancePath:instancePath+"/kind",schemaPath:"aether:bindings#/definitions/ProbeErrorKind/anyOf/3/const",keyword:"const",params:{allowedValue: "rate_limited"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}var _valid0 = _errs8 === errors;valid2 = valid2 || _valid0;if(!valid2){const _errs9 = errors;if("status" !== data0){const err9 = {instancePath:instancePath+"/kind",schemaPath:"aether:bindings#/definitions/ProbeErrorKind/anyOf/4/const",keyword:"const",params:{allowedValue: "status"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}var _valid0 = _errs9 === errors;valid2 = valid2 || _valid0;if(!valid2){const _errs10 = errors;if("timeout" !== data0){const err10 = {instancePath:instancePath+"/kind",schemaPath:"aether:bindings#/definitions/ProbeErrorKind/anyOf/5/const",keyword:"const",params:{allowedValue: "timeout"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}var _valid0 = _errs10 === errors;valid2 = valid2 || _valid0;if(!valid2){const _errs11 = errors;if("connect" !== data0){const err11 = {instancePath:instancePath+"/kind",schemaPath:"aether:bindings#/definitions/ProbeErrorKind/anyOf/6/const",keyword:"const",params:{allowedValue: "connect"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}var _valid0 = _errs11 === errors;valid2 = valid2 || _valid0;if(!valid2){const _errs12 = errors;if("blocked_address" !== data0){const err12 = {instancePath:instancePath+"/kind",schemaPath:"aether:bindings#/definitions/ProbeErrorKind/anyOf/7/const",keyword:"const",params:{allowedValue: "blocked_address"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}var _valid0 = _errs12 === errors;valid2 = valid2 || _valid0;if(!valid2){const _errs13 = errors;if("invalid_body" !== data0){const err13 = {instancePath:instancePath+"/kind",schemaPath:"aether:bindings#/definitions/ProbeErrorKind/anyOf/8/const",keyword:"const",params:{allowedValue: "invalid_body"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}var _valid0 = _errs13 === errors;valid2 = valid2 || _valid0;}}}}}}}}if(!valid2){const err14 = {instancePath:instancePath+"/kind",schemaPath:"aether:bindings#/definitions/ProbeErrorKind/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err14];}else {vErrors.push(err14);}errors++;}else {errors = _errs4;if(vErrors !== null){if(_errs4){vErrors.length = _errs4;}else {vErrors = null;}}}}if(data.status !== undefined){let data1 = data.status;const _errs15 = errors;let valid3 = false;const _errs16 = errors;if(!((typeof data1 == "number") && (isFinite(data1)))){const err15 = {instancePath:instancePath+"/status",schemaPath:"#/properties/status/anyOf/0/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err15];}else {vErrors.push(err15);}errors++;}var _valid1 = _errs16 === errors;valid3 = valid3 || _valid1;if(!valid3){const _errs18 = errors;if(data1 !== null){const err16 = {instancePath:instancePath+"/status",schemaPath:"#/properties/status/anyOf/1/type",keyword:"type",params:{type: "null"},message:"must be null"};if(vErrors === null){vErrors = [err16];}else {vErrors.push(err16);}errors++;}var _valid1 = _errs18 === errors;valid3 = valid3 || _valid1;}if(!valid3){const err17 = {instancePath:instancePath+"/status",schemaPath:"#/properties/status/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err17];}else {vErrors.push(err17);}errors++;}else {errors = _errs15;if(vErrors !== null){if(_errs15){vErrors.length = _errs15;}else {vErrors = null;}}}}if(data.message !== undefined){let data2 = data.message;const _errs21 = errors;let valid4 = false;const _errs22 = errors;if(typeof data2 !== "string"){const err18 = {instancePath:instancePath+"/message",schemaPath:"#/properties/message/anyOf/0/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err18];}else {vErrors.push(err18);}errors++;}var _valid2 = _errs22 === errors;valid4 = valid4 || _valid2;if(!valid4){const _errs24 = errors;if(data2 !== null){const err19 = {instancePath:instancePath+"/message",schemaPath:"#/properties/message/anyOf/1/type",keyword:"type",params:{type: "null"},message:"must be null"};if(vErrors === null){vErrors = [err19];}else {vErrors.push(err19);}errors++;}var _valid2 = _errs24 === errors;valid4 = valid4 || _valid2;}if(!valid4){const err20 = {instancePath:instancePath+"/message",schemaPath:"#/properties/message/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err20];}else {vErrors.push(err20);}errors++;}else {errors = _errs21;if(vErrors !== null){if(_errs21){vErrors.length = _errs21;}else {vErrors = null;}}}}if(data.hint !== undefined){let data3 = data.hint;const _errs27 = errors;let valid5 = false;const _errs28 = errors;if(typeof data3 !== "string"){const err21 = {instancePath:instancePath+"/hint",schemaPath:"#/properties/hint/anyOf/0/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err21];}else {vErrors.push(err21);}errors++;}var _valid3 = _errs28 === errors;valid5 = valid5 || _valid3;if(!valid5){const _errs30 = errors;if(data3 !== null){const err22 = {instancePath:instancePath+"/hint",schemaPath:"#/properties/hint/anyOf/1/type",keyword:"type",params:{type: "null"},message:"must be null"};if(vErrors === null){vErrors = [err22];}else {vErrors.push(err22);}errors++;}var _valid3 = _errs30 === errors;valid5 = valid5 || _valid3;}if(!valid5){const err23 = {instancePath:instancePath+"/hint",schemaPath:"#/properties/hint/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err23];}else {vErrors.push(err23);}errors++;}else {errors = _errs27;if(vErrors !== null){if(_errs27){vErrors.length = _errs27;}else {vErrors = null;}}}}}else {const err24 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err24];}else {vErrors.push(err24);}errors++;}validate147.errors = vErrors;return errors === 0;}function validate146(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="aether:validator:ProbeError" */;let vErrors = null;let errors = 0;if(!(validate147(data, {instancePath,parentData,parentDataProperty,rootData}))){vErrors = vErrors === null ? validate147.errors : vErrors.concat(validate147.errors);errors = vErrors.length;}validate146.errors = vErrors;return errors === 0;}export const validateProbeErrorKind = validate149;const schema169 = {"$id":"aether:validator:ProbeErrorKind","$ref":"aether:bindings#/definitions/ProbeErrorKind"};function validate149(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="aether:validator:ProbeErrorKind" */;let vErrors = null;let errors = 0;const _errs1 = errors;let valid1 = false;const _errs2 = errors;if("missing_key" !== data){const err0 = {instancePath,schemaPath:"aether:bindings#/definitions/ProbeErrorKind/anyOf/0/const",keyword:"const",params:{allowedValue: "missing_key"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}var _valid0 = _errs2 === errors;valid1 = valid1 || _valid0;if(!valid1){const _errs3 = errors;if("unauthorized" !== data){const err1 = {instancePath,schemaPath:"aether:bindings#/definitions/ProbeErrorKind/anyOf/1/const",keyword:"const",params:{allowedValue: "unauthorized"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}var _valid0 = _errs3 === errors;valid1 = valid1 || _valid0;if(!valid1){const _errs4 = errors;if("not_found" !== data){const err2 = {instancePath,schemaPath:"aether:bindings#/definitions/ProbeErrorKind/anyOf/2/const",keyword:"const",params:{allowedValue: "not_found"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}var _valid0 = _errs4 === errors;valid1 = valid1 || _valid0;if(!valid1){const _errs5 = errors;if("rate_limited" !== data){const err3 = {instancePath,schemaPath:"aether:bindings#/definitions/ProbeErrorKind/anyOf/3/const",keyword:"const",params:{allowedValue: "rate_limited"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}var _valid0 = _errs5 === errors;valid1 = valid1 || _valid0;if(!valid1){const _errs6 = errors;if("status" !== data){const err4 = {instancePath,schemaPath:"aether:bindings#/definitions/ProbeErrorKind/anyOf/4/const",keyword:"const",params:{allowedValue: "status"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}var _valid0 = _errs6 === errors;valid1 = valid1 || _valid0;if(!valid1){const _errs7 = errors;if("timeout" !== data){const err5 = {instancePath,schemaPath:"aether:bindings#/definitions/ProbeErrorKind/anyOf/5/const",keyword:"const",params:{allowedValue: "timeout"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}var _valid0 = _errs7 === errors;valid1 = valid1 || _valid0;if(!valid1){const _errs8 = errors;if("connect" !== data){const err6 = {instancePath,schemaPath:"aether:bindings#/definitions/ProbeErrorKind/anyOf/6/const",keyword:"const",params:{allowedValue: "connect"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}var _valid0 = _errs8 === errors;valid1 = valid1 || _valid0;if(!valid1){const _errs9 = errors;if("blocked_address" !== data){const err7 = {instancePath,schemaPath:"aether:bindings#/definitions/ProbeErrorKind/anyOf/7/const",keyword:"const",params:{allowedValue: "blocked_address"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}var _valid0 = _errs9 === errors;valid1 = valid1 || _valid0;if(!valid1){const _errs10 = errors;if("invalid_body" !== data){const err8 = {instancePath,schemaPath:"aether:bindings#/definitions/ProbeErrorKind/anyOf/8/const",keyword:"const",params:{allowedValue: "invalid_body"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}var _valid0 = _errs10 === errors;valid1 = valid1 || _valid0;}}}}}}}}if(!valid1){const err9 = {instancePath,schemaPath:"aether:bindings#/definitions/ProbeErrorKind/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}else {errors = _errs1;if(vErrors !== null){if(_errs1){vErrors.length = _errs1;}else {vErrors = null;}}}validate149.errors = vErrors;return errors === 0;}export const validateProbeResult = validate150;const schema171 = {"$id":"aether:validator:ProbeResult","$ref":"aether:bindings#/definitions/ProbeResult"};const schema172 = {"type":"object","properties":{"probeUrl":{"type":"string"},"models":{"type":"array","items":{"$ref":"aether:bindings#/definitions/ProbedModel"}},"error":{"anyOf":[{"$ref":"aether:bindings#/definitions/ProbeError"},{"type":"null"}]},"suggestedProtocol":{"anyOf":[{"$ref":"aether:bindings#/definitions/Protocol"},{"type":"null"}]}},"required":["probeUrl","models","error","suggestedProtocol"],"additionalProperties":false};const schema173 = {"type":"object","properties":{"group":{"anyOf":[{"type":"string"},{"type":"null"}]},"id":{"type":"string"},"modelType":{"$ref":"aether:bindings#/definitions/ModelType"},"typeSource":{"$ref":"aether:bindings#/definitions/TypeSource"},"contextWindow":{"anyOf":[{"type":"number"},{"type":"null"}]},"maxOutput":{"anyOf":[{"type":"number"},{"type":"null"}]},"canVision":{"type":"boolean"},"supportsTools":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"reasoning":{"anyOf":[{"$ref":"aether:bindings#/definitions/ReasoningConfig"},{"type":"null"}]},"nativeWebSearch":{"type":"boolean"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"groupName":{"anyOf":[{"type":"string"},{"type":"null"}]},"pricing":{"anyOf":[{"$ref":"aether:bindings#/definitions/ModelPricing"},{"type":"null"}]}},"required":["group","id","modelType","typeSource","contextWindow","maxOutput","canVision","supportsTools","reasoning","nativeWebSearch","name","groupName","pricing"],"additionalProperties":false};function validate152(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;if(data && typeof data == "object" && !Array.isArray(data)){if(data.group === undefined){const err0 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "group"},message:"must have required property '"+"group"+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}if(data.id === undefined){const err1 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "id"},message:"must have required property '"+"id"+"'"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}if(data.modelType === undefined){const err2 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "modelType"},message:"must have required property '"+"modelType"+"'"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}if(data.typeSource === undefined){const err3 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "typeSource"},message:"must have required property '"+"typeSource"+"'"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}if(data.contextWindow === undefined){const err4 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "contextWindow"},message:"must have required property '"+"contextWindow"+"'"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}if(data.maxOutput === undefined){const err5 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "maxOutput"},message:"must have required property '"+"maxOutput"+"'"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}if(data.canVision === undefined){const err6 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "canVision"},message:"must have required property '"+"canVision"+"'"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}if(data.supportsTools === undefined){const err7 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "supportsTools"},message:"must have required property '"+"supportsTools"+"'"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}if(data.reasoning === undefined){const err8 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "reasoning"},message:"must have required property '"+"reasoning"+"'"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}if(data.nativeWebSearch === undefined){const err9 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "nativeWebSearch"},message:"must have required property '"+"nativeWebSearch"+"'"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}if(data.name === undefined){const err10 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "name"},message:"must have required property '"+"name"+"'"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}if(data.groupName === undefined){const err11 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "groupName"},message:"must have required property '"+"groupName"+"'"};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}if(data.pricing === undefined){const err12 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "pricing"},message:"must have required property '"+"pricing"+"'"};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}for(const key0 in data){if(!(func8.call(schema173.properties, key0))){const err13 = {instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}}if(data.group !== undefined){let data0 = data.group;const _errs3 = errors;let valid1 = false;const _errs4 = errors;if(typeof data0 !== "string"){const err14 = {instancePath:instancePath+"/group",schemaPath:"#/properties/group/anyOf/0/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err14];}else {vErrors.push(err14);}errors++;}var _valid0 = _errs4 === errors;valid1 = valid1 || _valid0;if(!valid1){const _errs6 = errors;if(data0 !== null){const err15 = {instancePath:instancePath+"/group",schemaPath:"#/properties/group/anyOf/1/type",keyword:"type",params:{type: "null"},message:"must be null"};if(vErrors === null){vErrors = [err15];}else {vErrors.push(err15);}errors++;}var _valid0 = _errs6 === errors;valid1 = valid1 || _valid0;}if(!valid1){const err16 = {instancePath:instancePath+"/group",schemaPath:"#/properties/group/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err16];}else {vErrors.push(err16);}errors++;}else {errors = _errs3;if(vErrors !== null){if(_errs3){vErrors.length = _errs3;}else {vErrors = null;}}}}if(data.id !== undefined){if(typeof data.id !== "string"){const err17 = {instancePath:instancePath+"/id",schemaPath:"#/properties/id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err17];}else {vErrors.push(err17);}errors++;}}if(data.modelType !== undefined){let data2 = data.modelType;const _errs12 = errors;let valid3 = false;const _errs13 = errors;if("chat" !== data2){const err18 = {instancePath:instancePath+"/modelType",schemaPath:"aether:bindings#/definitions/ModelType/anyOf/0/const",keyword:"const",params:{allowedValue: "chat"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err18];}else {vErrors.push(err18);}errors++;}var _valid1 = _errs13 === errors;valid3 = valid3 || _valid1;if(!valid3){const _errs14 = errors;if("image" !== data2){const err19 = {instancePath:instancePath+"/modelType",schemaPath:"aether:bindings#/definitions/ModelType/anyOf/1/const",keyword:"const",params:{allowedValue: "image"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err19];}else {vErrors.push(err19);}errors++;}var _valid1 = _errs14 === errors;valid3 = valid3 || _valid1;if(!valid3){const _errs15 = errors;if("video" !== data2){const err20 = {instancePath:instancePath+"/modelType",schemaPath:"aether:bindings#/definitions/ModelType/anyOf/2/const",keyword:"const",params:{allowedValue: "video"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err20];}else {vErrors.push(err20);}errors++;}var _valid1 = _errs15 === errors;valid3 = valid3 || _valid1;if(!valid3){const _errs16 = errors;if("tts" !== data2){const err21 = {instancePath:instancePath+"/modelType",schemaPath:"aether:bindings#/definitions/ModelType/anyOf/3/const",keyword:"const",params:{allowedValue: "tts"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err21];}else {vErrors.push(err21);}errors++;}var _valid1 = _errs16 === errors;valid3 = valid3 || _valid1;if(!valid3){const _errs17 = errors;if("stt" !== data2){const err22 = {instancePath:instancePath+"/modelType",schemaPath:"aether:bindings#/definitions/ModelType/anyOf/4/const",keyword:"const",params:{allowedValue: "stt"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err22];}else {vErrors.push(err22);}errors++;}var _valid1 = _errs17 === errors;valid3 = valid3 || _valid1;if(!valid3){const _errs18 = errors;if("embedding" !== data2){const err23 = {instancePath:instancePath+"/modelType",schemaPath:"aether:bindings#/definitions/ModelType/anyOf/5/const",keyword:"const",params:{allowedValue: "embedding"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err23];}else {vErrors.push(err23);}errors++;}var _valid1 = _errs18 === errors;valid3 = valid3 || _valid1;if(!valid3){const _errs19 = errors;if("rerank" !== data2){const err24 = {instancePath:instancePath+"/modelType",schemaPath:"aether:bindings#/definitions/ModelType/anyOf/6/const",keyword:"const",params:{allowedValue: "rerank"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err24];}else {vErrors.push(err24);}errors++;}var _valid1 = _errs19 === errors;valid3 = valid3 || _valid1;if(!valid3){const _errs20 = errors;if("unknown" !== data2){const err25 = {instancePath:instancePath+"/modelType",schemaPath:"aether:bindings#/definitions/ModelType/anyOf/7/const",keyword:"const",params:{allowedValue: "unknown"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err25];}else {vErrors.push(err25);}errors++;}var _valid1 = _errs20 === errors;valid3 = valid3 || _valid1;}}}}}}}if(!valid3){const err26 = {instancePath:instancePath+"/modelType",schemaPath:"aether:bindings#/definitions/ModelType/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err26];}else {vErrors.push(err26);}errors++;}else {errors = _errs12;if(vErrors !== null){if(_errs12){vErrors.length = _errs12;}else {vErrors = null;}}}}if(data.typeSource !== undefined){let data3 = data.typeSource;const _errs23 = errors;let valid5 = false;const _errs24 = errors;if("inferred" !== data3){const err27 = {instancePath:instancePath+"/typeSource",schemaPath:"aether:bindings#/definitions/TypeSource/anyOf/0/const",keyword:"const",params:{allowedValue: "inferred"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err27];}else {vErrors.push(err27);}errors++;}var _valid2 = _errs24 === errors;valid5 = valid5 || _valid2;if(!valid5){const _errs25 = errors;if("user" !== data3){const err28 = {instancePath:instancePath+"/typeSource",schemaPath:"aether:bindings#/definitions/TypeSource/anyOf/1/const",keyword:"const",params:{allowedValue: "user"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err28];}else {vErrors.push(err28);}errors++;}var _valid2 = _errs25 === errors;valid5 = valid5 || _valid2;}if(!valid5){const err29 = {instancePath:instancePath+"/typeSource",schemaPath:"aether:bindings#/definitions/TypeSource/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err29];}else {vErrors.push(err29);}errors++;}else {errors = _errs23;if(vErrors !== null){if(_errs23){vErrors.length = _errs23;}else {vErrors = null;}}}}if(data.contextWindow !== undefined){let data4 = data.contextWindow;const _errs27 = errors;let valid6 = false;const _errs28 = errors;if(!((typeof data4 == "number") && (isFinite(data4)))){const err30 = {instancePath:instancePath+"/contextWindow",schemaPath:"#/properties/contextWindow/anyOf/0/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err30];}else {vErrors.push(err30);}errors++;}var _valid3 = _errs28 === errors;valid6 = valid6 || _valid3;if(!valid6){const _errs30 = errors;if(data4 !== null){const err31 = {instancePath:instancePath+"/contextWindow",schemaPath:"#/properties/contextWindow/anyOf/1/type",keyword:"type",params:{type: "null"},message:"must be null"};if(vErrors === null){vErrors = [err31];}else {vErrors.push(err31);}errors++;}var _valid3 = _errs30 === errors;valid6 = valid6 || _valid3;}if(!valid6){const err32 = {instancePath:instancePath+"/contextWindow",schemaPath:"#/properties/contextWindow/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err32];}else {vErrors.push(err32);}errors++;}else {errors = _errs27;if(vErrors !== null){if(_errs27){vErrors.length = _errs27;}else {vErrors = null;}}}}if(data.maxOutput !== undefined){let data5 = data.maxOutput;const _errs33 = errors;let valid7 = false;const _errs34 = errors;if(!((typeof data5 == "number") && (isFinite(data5)))){const err33 = {instancePath:instancePath+"/maxOutput",schemaPath:"#/properties/maxOutput/anyOf/0/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err33];}else {vErrors.push(err33);}errors++;}var _valid4 = _errs34 === errors;valid7 = valid7 || _valid4;if(!valid7){const _errs36 = errors;if(data5 !== null){const err34 = {instancePath:instancePath+"/maxOutput",schemaPath:"#/properties/maxOutput/anyOf/1/type",keyword:"type",params:{type: "null"},message:"must be null"};if(vErrors === null){vErrors = [err34];}else {vErrors.push(err34);}errors++;}var _valid4 = _errs36 === errors;valid7 = valid7 || _valid4;}if(!valid7){const err35 = {instancePath:instancePath+"/maxOutput",schemaPath:"#/properties/maxOutput/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err35];}else {vErrors.push(err35);}errors++;}else {errors = _errs33;if(vErrors !== null){if(_errs33){vErrors.length = _errs33;}else {vErrors = null;}}}}if(data.canVision !== undefined){if(typeof data.canVision !== "boolean"){const err36 = {instancePath:instancePath+"/canVision",schemaPath:"#/properties/canVision/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"};if(vErrors === null){vErrors = [err36];}else {vErrors.push(err36);}errors++;}}if(data.supportsTools !== undefined){let data7 = data.supportsTools;const _errs41 = errors;let valid8 = false;const _errs42 = errors;if(typeof data7 !== "boolean"){const err37 = {instancePath:instancePath+"/supportsTools",schemaPath:"#/properties/supportsTools/anyOf/0/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"};if(vErrors === null){vErrors = [err37];}else {vErrors.push(err37);}errors++;}var _valid5 = _errs42 === errors;valid8 = valid8 || _valid5;if(!valid8){const _errs44 = errors;if(data7 !== null){const err38 = {instancePath:instancePath+"/supportsTools",schemaPath:"#/properties/supportsTools/anyOf/1/type",keyword:"type",params:{type: "null"},message:"must be null"};if(vErrors === null){vErrors = [err38];}else {vErrors.push(err38);}errors++;}var _valid5 = _errs44 === errors;valid8 = valid8 || _valid5;}if(!valid8){const err39 = {instancePath:instancePath+"/supportsTools",schemaPath:"#/properties/supportsTools/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err39];}else {vErrors.push(err39);}errors++;}else {errors = _errs41;if(vErrors !== null){if(_errs41){vErrors.length = _errs41;}else {vErrors = null;}}}}if(data.reasoning !== undefined){let data8 = data.reasoning;const _errs47 = errors;let valid9 = false;const _errs48 = errors;if(!(validate71(data8, {instancePath:instancePath+"/reasoning",parentData:data,parentDataProperty:"reasoning",rootData}))){vErrors = vErrors === null ? validate71.errors : vErrors.concat(validate71.errors);errors = vErrors.length;}var _valid6 = _errs48 === errors;valid9 = valid9 || _valid6;if(!valid9){const _errs49 = errors;if(data8 !== null){const err40 = {instancePath:instancePath+"/reasoning",schemaPath:"#/properties/reasoning/anyOf/1/type",keyword:"type",params:{type: "null"},message:"must be null"};if(vErrors === null){vErrors = [err40];}else {vErrors.push(err40);}errors++;}var _valid6 = _errs49 === errors;valid9 = valid9 || _valid6;}if(!valid9){const err41 = {instancePath:instancePath+"/reasoning",schemaPath:"#/properties/reasoning/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err41];}else {vErrors.push(err41);}errors++;}else {errors = _errs47;if(vErrors !== null){if(_errs47){vErrors.length = _errs47;}else {vErrors = null;}}}}if(data.nativeWebSearch !== undefined){if(typeof data.nativeWebSearch !== "boolean"){const err42 = {instancePath:instancePath+"/nativeWebSearch",schemaPath:"#/properties/nativeWebSearch/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"};if(vErrors === null){vErrors = [err42];}else {vErrors.push(err42);}errors++;}}if(data.name !== undefined){let data10 = data.name;const _errs54 = errors;let valid10 = false;const _errs55 = errors;if(typeof data10 !== "string"){const err43 = {instancePath:instancePath+"/name",schemaPath:"#/properties/name/anyOf/0/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err43];}else {vErrors.push(err43);}errors++;}var _valid7 = _errs55 === errors;valid10 = valid10 || _valid7;if(!valid10){const _errs57 = errors;if(data10 !== null){const err44 = {instancePath:instancePath+"/name",schemaPath:"#/properties/name/anyOf/1/type",keyword:"type",params:{type: "null"},message:"must be null"};if(vErrors === null){vErrors = [err44];}else {vErrors.push(err44);}errors++;}var _valid7 = _errs57 === errors;valid10 = valid10 || _valid7;}if(!valid10){const err45 = {instancePath:instancePath+"/name",schemaPath:"#/properties/name/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err45];}else {vErrors.push(err45);}errors++;}else {errors = _errs54;if(vErrors !== null){if(_errs54){vErrors.length = _errs54;}else {vErrors = null;}}}}if(data.groupName !== undefined){let data11 = data.groupName;const _errs60 = errors;let valid11 = false;const _errs61 = errors;if(typeof data11 !== "string"){const err46 = {instancePath:instancePath+"/groupName",schemaPath:"#/properties/groupName/anyOf/0/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err46];}else {vErrors.push(err46);}errors++;}var _valid8 = _errs61 === errors;valid11 = valid11 || _valid8;if(!valid11){const _errs63 = errors;if(data11 !== null){const err47 = {instancePath:instancePath+"/groupName",schemaPath:"#/properties/groupName/anyOf/1/type",keyword:"type",params:{type: "null"},message:"must be null"};if(vErrors === null){vErrors = [err47];}else {vErrors.push(err47);}errors++;}var _valid8 = _errs63 === errors;valid11 = valid11 || _valid8;}if(!valid11){const err48 = {instancePath:instancePath+"/groupName",schemaPath:"#/properties/groupName/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err48];}else {vErrors.push(err48);}errors++;}else {errors = _errs60;if(vErrors !== null){if(_errs60){vErrors.length = _errs60;}else {vErrors = null;}}}}if(data.pricing !== undefined){let data12 = data.pricing;const _errs66 = errors;let valid12 = false;const _errs67 = errors;if(!(validate73(data12, {instancePath:instancePath+"/pricing",parentData:data,parentDataProperty:"pricing",rootData}))){vErrors = vErrors === null ? validate73.errors : vErrors.concat(validate73.errors);errors = vErrors.length;}var _valid9 = _errs67 === errors;valid12 = valid12 || _valid9;if(!valid12){const _errs68 = errors;if(data12 !== null){const err49 = {instancePath:instancePath+"/pricing",schemaPath:"#/properties/pricing/anyOf/1/type",keyword:"type",params:{type: "null"},message:"must be null"};if(vErrors === null){vErrors = [err49];}else {vErrors.push(err49);}errors++;}var _valid9 = _errs68 === errors;valid12 = valid12 || _valid9;}if(!valid12){const err50 = {instancePath:instancePath+"/pricing",schemaPath:"#/properties/pricing/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err50];}else {vErrors.push(err50);}errors++;}else {errors = _errs66;if(vErrors !== null){if(_errs66){vErrors.length = _errs66;}else {vErrors = null;}}}}}else {const err51 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err51];}else {vErrors.push(err51);}errors++;}validate152.errors = vErrors;return errors === 0;}function validate156(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;if(data && typeof data == "object" && !Array.isArray(data)){if(data.kind === undefined){const err0 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "kind"},message:"must have required property '"+"kind"+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}if(data.status === undefined){const err1 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "status"},message:"must have required property '"+"status"+"'"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}if(data.message === undefined){const err2 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "message"},message:"must have required property '"+"message"+"'"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}if(data.hint === undefined){const err3 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "hint"},message:"must have required property '"+"hint"+"'"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}for(const key0 in data){if(!((((key0 === "kind") || (key0 === "status")) || (key0 === "message")) || (key0 === "hint"))){const err4 = {instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}}if(data.kind !== undefined){let data0 = data.kind;const _errs4 = errors;let valid2 = false;const _errs5 = errors;if("missing_key" !== data0){const err5 = {instancePath:instancePath+"/kind",schemaPath:"aether:bindings#/definitions/ProbeErrorKind/anyOf/0/const",keyword:"const",params:{allowedValue: "missing_key"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}var _valid0 = _errs5 === errors;valid2 = valid2 || _valid0;if(!valid2){const _errs6 = errors;if("unauthorized" !== data0){const err6 = {instancePath:instancePath+"/kind",schemaPath:"aether:bindings#/definitions/ProbeErrorKind/anyOf/1/const",keyword:"const",params:{allowedValue: "unauthorized"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}var _valid0 = _errs6 === errors;valid2 = valid2 || _valid0;if(!valid2){const _errs7 = errors;if("not_found" !== data0){const err7 = {instancePath:instancePath+"/kind",schemaPath:"aether:bindings#/definitions/ProbeErrorKind/anyOf/2/const",keyword:"const",params:{allowedValue: "not_found"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}var _valid0 = _errs7 === errors;valid2 = valid2 || _valid0;if(!valid2){const _errs8 = errors;if("rate_limited" !== data0){const err8 = {instancePath:instancePath+"/kind",schemaPath:"aether:bindings#/definitions/ProbeErrorKind/anyOf/3/const",keyword:"const",params:{allowedValue: "rate_limited"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}var _valid0 = _errs8 === errors;valid2 = valid2 || _valid0;if(!valid2){const _errs9 = errors;if("status" !== data0){const err9 = {instancePath:instancePath+"/kind",schemaPath:"aether:bindings#/definitions/ProbeErrorKind/anyOf/4/const",keyword:"const",params:{allowedValue: "status"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}var _valid0 = _errs9 === errors;valid2 = valid2 || _valid0;if(!valid2){const _errs10 = errors;if("timeout" !== data0){const err10 = {instancePath:instancePath+"/kind",schemaPath:"aether:bindings#/definitions/ProbeErrorKind/anyOf/5/const",keyword:"const",params:{allowedValue: "timeout"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}var _valid0 = _errs10 === errors;valid2 = valid2 || _valid0;if(!valid2){const _errs11 = errors;if("connect" !== data0){const err11 = {instancePath:instancePath+"/kind",schemaPath:"aether:bindings#/definitions/ProbeErrorKind/anyOf/6/const",keyword:"const",params:{allowedValue: "connect"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}var _valid0 = _errs11 === errors;valid2 = valid2 || _valid0;if(!valid2){const _errs12 = errors;if("blocked_address" !== data0){const err12 = {instancePath:instancePath+"/kind",schemaPath:"aether:bindings#/definitions/ProbeErrorKind/anyOf/7/const",keyword:"const",params:{allowedValue: "blocked_address"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}var _valid0 = _errs12 === errors;valid2 = valid2 || _valid0;if(!valid2){const _errs13 = errors;if("invalid_body" !== data0){const err13 = {instancePath:instancePath+"/kind",schemaPath:"aether:bindings#/definitions/ProbeErrorKind/anyOf/8/const",keyword:"const",params:{allowedValue: "invalid_body"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}var _valid0 = _errs13 === errors;valid2 = valid2 || _valid0;}}}}}}}}if(!valid2){const err14 = {instancePath:instancePath+"/kind",schemaPath:"aether:bindings#/definitions/ProbeErrorKind/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err14];}else {vErrors.push(err14);}errors++;}else {errors = _errs4;if(vErrors !== null){if(_errs4){vErrors.length = _errs4;}else {vErrors = null;}}}}if(data.status !== undefined){let data1 = data.status;const _errs15 = errors;let valid3 = false;const _errs16 = errors;if(!((typeof data1 == "number") && (isFinite(data1)))){const err15 = {instancePath:instancePath+"/status",schemaPath:"#/properties/status/anyOf/0/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err15];}else {vErrors.push(err15);}errors++;}var _valid1 = _errs16 === errors;valid3 = valid3 || _valid1;if(!valid3){const _errs18 = errors;if(data1 !== null){const err16 = {instancePath:instancePath+"/status",schemaPath:"#/properties/status/anyOf/1/type",keyword:"type",params:{type: "null"},message:"must be null"};if(vErrors === null){vErrors = [err16];}else {vErrors.push(err16);}errors++;}var _valid1 = _errs18 === errors;valid3 = valid3 || _valid1;}if(!valid3){const err17 = {instancePath:instancePath+"/status",schemaPath:"#/properties/status/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err17];}else {vErrors.push(err17);}errors++;}else {errors = _errs15;if(vErrors !== null){if(_errs15){vErrors.length = _errs15;}else {vErrors = null;}}}}if(data.message !== undefined){let data2 = data.message;const _errs21 = errors;let valid4 = false;const _errs22 = errors;if(typeof data2 !== "string"){const err18 = {instancePath:instancePath+"/message",schemaPath:"#/properties/message/anyOf/0/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err18];}else {vErrors.push(err18);}errors++;}var _valid2 = _errs22 === errors;valid4 = valid4 || _valid2;if(!valid4){const _errs24 = errors;if(data2 !== null){const err19 = {instancePath:instancePath+"/message",schemaPath:"#/properties/message/anyOf/1/type",keyword:"type",params:{type: "null"},message:"must be null"};if(vErrors === null){vErrors = [err19];}else {vErrors.push(err19);}errors++;}var _valid2 = _errs24 === errors;valid4 = valid4 || _valid2;}if(!valid4){const err20 = {instancePath:instancePath+"/message",schemaPath:"#/properties/message/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err20];}else {vErrors.push(err20);}errors++;}else {errors = _errs21;if(vErrors !== null){if(_errs21){vErrors.length = _errs21;}else {vErrors = null;}}}}if(data.hint !== undefined){let data3 = data.hint;const _errs27 = errors;let valid5 = false;const _errs28 = errors;if(typeof data3 !== "string"){const err21 = {instancePath:instancePath+"/hint",schemaPath:"#/properties/hint/anyOf/0/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err21];}else {vErrors.push(err21);}errors++;}var _valid3 = _errs28 === errors;valid5 = valid5 || _valid3;if(!valid5){const _errs30 = errors;if(data3 !== null){const err22 = {instancePath:instancePath+"/hint",schemaPath:"#/properties/hint/anyOf/1/type",keyword:"type",params:{type: "null"},message:"must be null"};if(vErrors === null){vErrors = [err22];}else {vErrors.push(err22);}errors++;}var _valid3 = _errs30 === errors;valid5 = valid5 || _valid3;}if(!valid5){const err23 = {instancePath:instancePath+"/hint",schemaPath:"#/properties/hint/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err23];}else {vErrors.push(err23);}errors++;}else {errors = _errs27;if(vErrors !== null){if(_errs27){vErrors.length = _errs27;}else {vErrors = null;}}}}}else {const err24 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err24];}else {vErrors.push(err24);}errors++;}validate156.errors = vErrors;return errors === 0;}function validate151(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;if(data && typeof data == "object" && !Array.isArray(data)){if(data.probeUrl === undefined){const err0 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "probeUrl"},message:"must have required property '"+"probeUrl"+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}if(data.models === undefined){const err1 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "models"},message:"must have required property '"+"models"+"'"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}if(data.error === undefined){const err2 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "error"},message:"must have required property '"+"error"+"'"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}if(data.suggestedProtocol === undefined){const err3 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "suggestedProtocol"},message:"must have required property '"+"suggestedProtocol"+"'"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}for(const key0 in data){if(!((((key0 === "probeUrl") || (key0 === "models")) || (key0 === "error")) || (key0 === "suggestedProtocol"))){const err4 = {instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}}if(data.probeUrl !== undefined){if(typeof data.probeUrl !== "string"){const err5 = {instancePath:instancePath+"/probeUrl",schemaPath:"#/properties/probeUrl/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}}if(data.models !== undefined){let data1 = data.models;if(Array.isArray(data1)){const len0 = data1.length;for(let i0=0; i0<len0; i0++){if(!(validate152(data1[i0], {instancePath:instancePath+"/models/" + i0,parentData:data1,parentDataProperty:i0,rootData}))){vErrors = vErrors === null ? validate152.errors : vErrors.concat(validate152.errors);errors = vErrors.length;}}}else {const err6 = {instancePath:instancePath+"/models",schemaPath:"#/properties/models/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}}if(data.error !== undefined){let data3 = data.error;const _errs8 = errors;let valid3 = false;const _errs9 = errors;if(!(validate156(data3, {instancePath:instancePath+"/error",parentData:data,parentDataProperty:"error",rootData}))){vErrors = vErrors === null ? validate156.errors : vErrors.concat(validate156.errors);errors = vErrors.length;}var _valid0 = _errs9 === errors;valid3 = valid3 || _valid0;if(!valid3){const _errs10 = errors;if(data3 !== null){const err7 = {instancePath:instancePath+"/error",schemaPath:"#/properties/error/anyOf/1/type",keyword:"type",params:{type: "null"},message:"must be null"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}var _valid0 = _errs10 === errors;valid3 = valid3 || _valid0;}if(!valid3){const err8 = {instancePath:instancePath+"/error",schemaPath:"#/properties/error/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}else {errors = _errs8;if(vErrors !== null){if(_errs8){vErrors.length = _errs8;}else {vErrors = null;}}}}if(data.suggestedProtocol !== undefined){let data4 = data.suggestedProtocol;const _errs13 = errors;let valid4 = false;const _errs14 = errors;const _errs16 = errors;let valid6 = false;const _errs17 = errors;if("anthropic-messages" !== data4){const err9 = {instancePath:instancePath+"/suggestedProtocol",schemaPath:"aether:bindings#/definitions/Protocol/anyOf/0/const",keyword:"const",params:{allowedValue: "anthropic-messages"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}var _valid2 = _errs17 === errors;valid6 = valid6 || _valid2;if(!valid6){const _errs18 = errors;if("openai-chat" !== data4){const err10 = {instancePath:instancePath+"/suggestedProtocol",schemaPath:"aether:bindings#/definitions/Protocol/anyOf/1/const",keyword:"const",params:{allowedValue: "openai-chat"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}var _valid2 = _errs18 === errors;valid6 = valid6 || _valid2;if(!valid6){const _errs19 = errors;if("openai-responses" !== data4){const err11 = {instancePath:instancePath+"/suggestedProtocol",schemaPath:"aether:bindings#/definitions/Protocol/anyOf/2/const",keyword:"const",params:{allowedValue: "openai-responses"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}var _valid2 = _errs19 === errors;valid6 = valid6 || _valid2;}}if(!valid6){const err12 = {instancePath:instancePath+"/suggestedProtocol",schemaPath:"aether:bindings#/definitions/Protocol/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}else {errors = _errs16;if(vErrors !== null){if(_errs16){vErrors.length = _errs16;}else {vErrors = null;}}}var _valid1 = _errs14 === errors;valid4 = valid4 || _valid1;if(!valid4){const _errs20 = errors;if(data4 !== null){const err13 = {instancePath:instancePath+"/suggestedProtocol",schemaPath:"#/properties/suggestedProtocol/anyOf/1/type",keyword:"type",params:{type: "null"},message:"must be null"};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}var _valid1 = _errs20 === errors;valid4 = valid4 || _valid1;}if(!valid4){const err14 = {instancePath:instancePath+"/suggestedProtocol",schemaPath:"#/properties/suggestedProtocol/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err14];}else {vErrors.push(err14);}errors++;}else {errors = _errs13;if(vErrors !== null){if(_errs13){vErrors.length = _errs13;}else {vErrors = null;}}}}}else {const err15 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err15];}else {vErrors.push(err15);}errors++;}validate151.errors = vErrors;return errors === 0;}function validate150(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="aether:validator:ProbeResult" */;let vErrors = null;let errors = 0;if(!(validate151(data, {instancePath,parentData,parentDataProperty,rootData}))){vErrors = vErrors === null ? validate151.errors : vErrors.concat(validate151.errors);errors = vErrors.length;}validate150.errors = vErrors;return errors === 0;}export const validateProbeTarget = validate159;const schema179 = {"$id":"aether:validator:ProbeTarget","$ref":"aether:bindings#/definitions/ProbeTarget"};const schema180 = {"anyOf":[{"type":"object","properties":{"kind":{"const":"saved"},"endpointId":{"type":"string"}},"required":["kind","endpointId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"const":"draft"},"baseUrl":{"type":"string"},"protocol":{"$ref":"aether:bindings#/definitions/Protocol"},"endpointId":{"type":"string"},"keyId":{"type":"string"}},"required":["kind","baseUrl","protocol"],"additionalProperties":false}]};function validate160(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;const _errs0 = errors;let valid0 = false;const _errs1 = errors;if(data && typeof data == "object" && !Array.isArray(data)){if(data.kind === undefined){const err0 = {instancePath,schemaPath:"#/anyOf/0/required",keyword:"required",params:{missingProperty: "kind"},message:"must have required property '"+"kind"+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}if(data.endpointId === undefined){const err1 = {instancePath,schemaPath:"#/anyOf/0/required",keyword:"required",params:{missingProperty: "endpointId"},message:"must have required property '"+"endpointId"+"'"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}for(const key0 in data){if(!((key0 === "kind") || (key0 === "endpointId"))){const err2 = {instancePath,schemaPath:"#/anyOf/0/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}}if(data.kind !== undefined){if("saved" !== data.kind){const err3 = {instancePath:instancePath+"/kind",schemaPath:"#/anyOf/0/properties/kind/const",keyword:"const",params:{allowedValue: "saved"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}}if(data.endpointId !== undefined){if(typeof data.endpointId !== "string"){const err4 = {instancePath:instancePath+"/endpointId",schemaPath:"#/anyOf/0/properties/endpointId/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}}}else {const err5 = {instancePath,schemaPath:"#/anyOf/0/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}var _valid0 = _errs1 === errors;valid0 = valid0 || _valid0;if(!valid0){const _errs7 = errors;if(data && typeof data == "object" && !Array.isArray(data)){if(data.kind === undefined){const err6 = {instancePath,schemaPath:"#/anyOf/1/required",keyword:"required",params:{missingProperty: "kind"},message:"must have required property '"+"kind"+"'"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}if(data.baseUrl === undefined){const err7 = {instancePath,schemaPath:"#/anyOf/1/required",keyword:"required",params:{missingProperty: "baseUrl"},message:"must have required property '"+"baseUrl"+"'"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}if(data.protocol === undefined){const err8 = {instancePath,schemaPath:"#/anyOf/1/required",keyword:"required",params:{missingProperty: "protocol"},message:"must have required property '"+"protocol"+"'"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}for(const key1 in data){if(!(((((key1 === "kind") || (key1 === "baseUrl")) || (key1 === "protocol")) || (key1 === "endpointId")) || (key1 === "keyId"))){const err9 = {instancePath,schemaPath:"#/anyOf/1/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key1},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}}if(data.kind !== undefined){if("draft" !== data.kind){const err10 = {instancePath:instancePath+"/kind",schemaPath:"#/anyOf/1/properties/kind/const",keyword:"const",params:{allowedValue: "draft"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}}if(data.baseUrl !== undefined){if(typeof data.baseUrl !== "string"){const err11 = {instancePath:instancePath+"/baseUrl",schemaPath:"#/anyOf/1/properties/baseUrl/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}}if(data.protocol !== undefined){let data4 = data.protocol;const _errs15 = errors;let valid4 = false;const _errs16 = errors;if("anthropic-messages" !== data4){const err12 = {instancePath:instancePath+"/protocol",schemaPath:"aether:bindings#/definitions/Protocol/anyOf/0/const",keyword:"const",params:{allowedValue: "anthropic-messages"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}var _valid1 = _errs16 === errors;valid4 = valid4 || _valid1;if(!valid4){const _errs17 = errors;if("openai-chat" !== data4){const err13 = {instancePath:instancePath+"/protocol",schemaPath:"aether:bindings#/definitions/Protocol/anyOf/1/const",keyword:"const",params:{allowedValue: "openai-chat"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}var _valid1 = _errs17 === errors;valid4 = valid4 || _valid1;if(!valid4){const _errs18 = errors;if("openai-responses" !== data4){const err14 = {instancePath:instancePath+"/protocol",schemaPath:"aether:bindings#/definitions/Protocol/anyOf/2/const",keyword:"const",params:{allowedValue: "openai-responses"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err14];}else {vErrors.push(err14);}errors++;}var _valid1 = _errs18 === errors;valid4 = valid4 || _valid1;}}if(!valid4){const err15 = {instancePath:instancePath+"/protocol",schemaPath:"aether:bindings#/definitions/Protocol/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err15];}else {vErrors.push(err15);}errors++;}else {errors = _errs15;if(vErrors !== null){if(_errs15){vErrors.length = _errs15;}else {vErrors = null;}}}}if(data.endpointId !== undefined){if(typeof data.endpointId !== "string"){const err16 = {instancePath:instancePath+"/endpointId",schemaPath:"#/anyOf/1/properties/endpointId/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err16];}else {vErrors.push(err16);}errors++;}}if(data.keyId !== undefined){if(typeof data.keyId !== "string"){const err17 = {instancePath:instancePath+"/keyId",schemaPath:"#/anyOf/1/properties/keyId/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err17];}else {vErrors.push(err17);}errors++;}}}else {const err18 = {instancePath,schemaPath:"#/anyOf/1/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err18];}else {vErrors.push(err18);}errors++;}var _valid0 = _errs7 === errors;valid0 = valid0 || _valid0;}if(!valid0){const err19 = {instancePath,schemaPath:"#/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err19];}else {vErrors.push(err19);}errors++;}else {errors = _errs0;if(vErrors !== null){if(_errs0){vErrors.length = _errs0;}else {vErrors = null;}}}validate160.errors = vErrors;return errors === 0;}function validate159(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="aether:validator:ProbeTarget" */;let vErrors = null;let errors = 0;if(!(validate160(data, {instancePath,parentData,parentDataProperty,rootData}))){vErrors = vErrors === null ? validate160.errors : vErrors.concat(validate160.errors);errors = vErrors.length;}validate159.errors = vErrors;return errors === 0;}export const validateProbedModel = validate162;const schema182 = {"$id":"aether:validator:ProbedModel","$ref":"aether:bindings#/definitions/ProbedModel"};function validate163(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;if(data && typeof data == "object" && !Array.isArray(data)){if(data.group === undefined){const err0 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "group"},message:"must have required property '"+"group"+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}if(data.id === undefined){const err1 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "id"},message:"must have required property '"+"id"+"'"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}if(data.modelType === undefined){const err2 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "modelType"},message:"must have required property '"+"modelType"+"'"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}if(data.typeSource === undefined){const err3 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "typeSource"},message:"must have required property '"+"typeSource"+"'"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}if(data.contextWindow === undefined){const err4 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "contextWindow"},message:"must have required property '"+"contextWindow"+"'"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}if(data.maxOutput === undefined){const err5 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "maxOutput"},message:"must have required property '"+"maxOutput"+"'"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}if(data.canVision === undefined){const err6 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "canVision"},message:"must have required property '"+"canVision"+"'"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}if(data.supportsTools === undefined){const err7 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "supportsTools"},message:"must have required property '"+"supportsTools"+"'"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}if(data.reasoning === undefined){const err8 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "reasoning"},message:"must have required property '"+"reasoning"+"'"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}if(data.nativeWebSearch === undefined){const err9 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "nativeWebSearch"},message:"must have required property '"+"nativeWebSearch"+"'"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}if(data.name === undefined){const err10 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "name"},message:"must have required property '"+"name"+"'"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}if(data.groupName === undefined){const err11 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "groupName"},message:"must have required property '"+"groupName"+"'"};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}if(data.pricing === undefined){const err12 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "pricing"},message:"must have required property '"+"pricing"+"'"};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}for(const key0 in data){if(!(func8.call(schema173.properties, key0))){const err13 = {instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}}if(data.group !== undefined){let data0 = data.group;const _errs3 = errors;let valid1 = false;const _errs4 = errors;if(typeof data0 !== "string"){const err14 = {instancePath:instancePath+"/group",schemaPath:"#/properties/group/anyOf/0/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err14];}else {vErrors.push(err14);}errors++;}var _valid0 = _errs4 === errors;valid1 = valid1 || _valid0;if(!valid1){const _errs6 = errors;if(data0 !== null){const err15 = {instancePath:instancePath+"/group",schemaPath:"#/properties/group/anyOf/1/type",keyword:"type",params:{type: "null"},message:"must be null"};if(vErrors === null){vErrors = [err15];}else {vErrors.push(err15);}errors++;}var _valid0 = _errs6 === errors;valid1 = valid1 || _valid0;}if(!valid1){const err16 = {instancePath:instancePath+"/group",schemaPath:"#/properties/group/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err16];}else {vErrors.push(err16);}errors++;}else {errors = _errs3;if(vErrors !== null){if(_errs3){vErrors.length = _errs3;}else {vErrors = null;}}}}if(data.id !== undefined){if(typeof data.id !== "string"){const err17 = {instancePath:instancePath+"/id",schemaPath:"#/properties/id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err17];}else {vErrors.push(err17);}errors++;}}if(data.modelType !== undefined){let data2 = data.modelType;const _errs12 = errors;let valid3 = false;const _errs13 = errors;if("chat" !== data2){const err18 = {instancePath:instancePath+"/modelType",schemaPath:"aether:bindings#/definitions/ModelType/anyOf/0/const",keyword:"const",params:{allowedValue: "chat"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err18];}else {vErrors.push(err18);}errors++;}var _valid1 = _errs13 === errors;valid3 = valid3 || _valid1;if(!valid3){const _errs14 = errors;if("image" !== data2){const err19 = {instancePath:instancePath+"/modelType",schemaPath:"aether:bindings#/definitions/ModelType/anyOf/1/const",keyword:"const",params:{allowedValue: "image"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err19];}else {vErrors.push(err19);}errors++;}var _valid1 = _errs14 === errors;valid3 = valid3 || _valid1;if(!valid3){const _errs15 = errors;if("video" !== data2){const err20 = {instancePath:instancePath+"/modelType",schemaPath:"aether:bindings#/definitions/ModelType/anyOf/2/const",keyword:"const",params:{allowedValue: "video"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err20];}else {vErrors.push(err20);}errors++;}var _valid1 = _errs15 === errors;valid3 = valid3 || _valid1;if(!valid3){const _errs16 = errors;if("tts" !== data2){const err21 = {instancePath:instancePath+"/modelType",schemaPath:"aether:bindings#/definitions/ModelType/anyOf/3/const",keyword:"const",params:{allowedValue: "tts"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err21];}else {vErrors.push(err21);}errors++;}var _valid1 = _errs16 === errors;valid3 = valid3 || _valid1;if(!valid3){const _errs17 = errors;if("stt" !== data2){const err22 = {instancePath:instancePath+"/modelType",schemaPath:"aether:bindings#/definitions/ModelType/anyOf/4/const",keyword:"const",params:{allowedValue: "stt"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err22];}else {vErrors.push(err22);}errors++;}var _valid1 = _errs17 === errors;valid3 = valid3 || _valid1;if(!valid3){const _errs18 = errors;if("embedding" !== data2){const err23 = {instancePath:instancePath+"/modelType",schemaPath:"aether:bindings#/definitions/ModelType/anyOf/5/const",keyword:"const",params:{allowedValue: "embedding"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err23];}else {vErrors.push(err23);}errors++;}var _valid1 = _errs18 === errors;valid3 = valid3 || _valid1;if(!valid3){const _errs19 = errors;if("rerank" !== data2){const err24 = {instancePath:instancePath+"/modelType",schemaPath:"aether:bindings#/definitions/ModelType/anyOf/6/const",keyword:"const",params:{allowedValue: "rerank"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err24];}else {vErrors.push(err24);}errors++;}var _valid1 = _errs19 === errors;valid3 = valid3 || _valid1;if(!valid3){const _errs20 = errors;if("unknown" !== data2){const err25 = {instancePath:instancePath+"/modelType",schemaPath:"aether:bindings#/definitions/ModelType/anyOf/7/const",keyword:"const",params:{allowedValue: "unknown"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err25];}else {vErrors.push(err25);}errors++;}var _valid1 = _errs20 === errors;valid3 = valid3 || _valid1;}}}}}}}if(!valid3){const err26 = {instancePath:instancePath+"/modelType",schemaPath:"aether:bindings#/definitions/ModelType/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err26];}else {vErrors.push(err26);}errors++;}else {errors = _errs12;if(vErrors !== null){if(_errs12){vErrors.length = _errs12;}else {vErrors = null;}}}}if(data.typeSource !== undefined){let data3 = data.typeSource;const _errs23 = errors;let valid5 = false;const _errs24 = errors;if("inferred" !== data3){const err27 = {instancePath:instancePath+"/typeSource",schemaPath:"aether:bindings#/definitions/TypeSource/anyOf/0/const",keyword:"const",params:{allowedValue: "inferred"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err27];}else {vErrors.push(err27);}errors++;}var _valid2 = _errs24 === errors;valid5 = valid5 || _valid2;if(!valid5){const _errs25 = errors;if("user" !== data3){const err28 = {instancePath:instancePath+"/typeSource",schemaPath:"aether:bindings#/definitions/TypeSource/anyOf/1/const",keyword:"const",params:{allowedValue: "user"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err28];}else {vErrors.push(err28);}errors++;}var _valid2 = _errs25 === errors;valid5 = valid5 || _valid2;}if(!valid5){const err29 = {instancePath:instancePath+"/typeSource",schemaPath:"aether:bindings#/definitions/TypeSource/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err29];}else {vErrors.push(err29);}errors++;}else {errors = _errs23;if(vErrors !== null){if(_errs23){vErrors.length = _errs23;}else {vErrors = null;}}}}if(data.contextWindow !== undefined){let data4 = data.contextWindow;const _errs27 = errors;let valid6 = false;const _errs28 = errors;if(!((typeof data4 == "number") && (isFinite(data4)))){const err30 = {instancePath:instancePath+"/contextWindow",schemaPath:"#/properties/contextWindow/anyOf/0/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err30];}else {vErrors.push(err30);}errors++;}var _valid3 = _errs28 === errors;valid6 = valid6 || _valid3;if(!valid6){const _errs30 = errors;if(data4 !== null){const err31 = {instancePath:instancePath+"/contextWindow",schemaPath:"#/properties/contextWindow/anyOf/1/type",keyword:"type",params:{type: "null"},message:"must be null"};if(vErrors === null){vErrors = [err31];}else {vErrors.push(err31);}errors++;}var _valid3 = _errs30 === errors;valid6 = valid6 || _valid3;}if(!valid6){const err32 = {instancePath:instancePath+"/contextWindow",schemaPath:"#/properties/contextWindow/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err32];}else {vErrors.push(err32);}errors++;}else {errors = _errs27;if(vErrors !== null){if(_errs27){vErrors.length = _errs27;}else {vErrors = null;}}}}if(data.maxOutput !== undefined){let data5 = data.maxOutput;const _errs33 = errors;let valid7 = false;const _errs34 = errors;if(!((typeof data5 == "number") && (isFinite(data5)))){const err33 = {instancePath:instancePath+"/maxOutput",schemaPath:"#/properties/maxOutput/anyOf/0/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err33];}else {vErrors.push(err33);}errors++;}var _valid4 = _errs34 === errors;valid7 = valid7 || _valid4;if(!valid7){const _errs36 = errors;if(data5 !== null){const err34 = {instancePath:instancePath+"/maxOutput",schemaPath:"#/properties/maxOutput/anyOf/1/type",keyword:"type",params:{type: "null"},message:"must be null"};if(vErrors === null){vErrors = [err34];}else {vErrors.push(err34);}errors++;}var _valid4 = _errs36 === errors;valid7 = valid7 || _valid4;}if(!valid7){const err35 = {instancePath:instancePath+"/maxOutput",schemaPath:"#/properties/maxOutput/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err35];}else {vErrors.push(err35);}errors++;}else {errors = _errs33;if(vErrors !== null){if(_errs33){vErrors.length = _errs33;}else {vErrors = null;}}}}if(data.canVision !== undefined){if(typeof data.canVision !== "boolean"){const err36 = {instancePath:instancePath+"/canVision",schemaPath:"#/properties/canVision/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"};if(vErrors === null){vErrors = [err36];}else {vErrors.push(err36);}errors++;}}if(data.supportsTools !== undefined){let data7 = data.supportsTools;const _errs41 = errors;let valid8 = false;const _errs42 = errors;if(typeof data7 !== "boolean"){const err37 = {instancePath:instancePath+"/supportsTools",schemaPath:"#/properties/supportsTools/anyOf/0/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"};if(vErrors === null){vErrors = [err37];}else {vErrors.push(err37);}errors++;}var _valid5 = _errs42 === errors;valid8 = valid8 || _valid5;if(!valid8){const _errs44 = errors;if(data7 !== null){const err38 = {instancePath:instancePath+"/supportsTools",schemaPath:"#/properties/supportsTools/anyOf/1/type",keyword:"type",params:{type: "null"},message:"must be null"};if(vErrors === null){vErrors = [err38];}else {vErrors.push(err38);}errors++;}var _valid5 = _errs44 === errors;valid8 = valid8 || _valid5;}if(!valid8){const err39 = {instancePath:instancePath+"/supportsTools",schemaPath:"#/properties/supportsTools/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err39];}else {vErrors.push(err39);}errors++;}else {errors = _errs41;if(vErrors !== null){if(_errs41){vErrors.length = _errs41;}else {vErrors = null;}}}}if(data.reasoning !== undefined){let data8 = data.reasoning;const _errs47 = errors;let valid9 = false;const _errs48 = errors;if(!(validate71(data8, {instancePath:instancePath+"/reasoning",parentData:data,parentDataProperty:"reasoning",rootData}))){vErrors = vErrors === null ? validate71.errors : vErrors.concat(validate71.errors);errors = vErrors.length;}var _valid6 = _errs48 === errors;valid9 = valid9 || _valid6;if(!valid9){const _errs49 = errors;if(data8 !== null){const err40 = {instancePath:instancePath+"/reasoning",schemaPath:"#/properties/reasoning/anyOf/1/type",keyword:"type",params:{type: "null"},message:"must be null"};if(vErrors === null){vErrors = [err40];}else {vErrors.push(err40);}errors++;}var _valid6 = _errs49 === errors;valid9 = valid9 || _valid6;}if(!valid9){const err41 = {instancePath:instancePath+"/reasoning",schemaPath:"#/properties/reasoning/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err41];}else {vErrors.push(err41);}errors++;}else {errors = _errs47;if(vErrors !== null){if(_errs47){vErrors.length = _errs47;}else {vErrors = null;}}}}if(data.nativeWebSearch !== undefined){if(typeof data.nativeWebSearch !== "boolean"){const err42 = {instancePath:instancePath+"/nativeWebSearch",schemaPath:"#/properties/nativeWebSearch/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"};if(vErrors === null){vErrors = [err42];}else {vErrors.push(err42);}errors++;}}if(data.name !== undefined){let data10 = data.name;const _errs54 = errors;let valid10 = false;const _errs55 = errors;if(typeof data10 !== "string"){const err43 = {instancePath:instancePath+"/name",schemaPath:"#/properties/name/anyOf/0/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err43];}else {vErrors.push(err43);}errors++;}var _valid7 = _errs55 === errors;valid10 = valid10 || _valid7;if(!valid10){const _errs57 = errors;if(data10 !== null){const err44 = {instancePath:instancePath+"/name",schemaPath:"#/properties/name/anyOf/1/type",keyword:"type",params:{type: "null"},message:"must be null"};if(vErrors === null){vErrors = [err44];}else {vErrors.push(err44);}errors++;}var _valid7 = _errs57 === errors;valid10 = valid10 || _valid7;}if(!valid10){const err45 = {instancePath:instancePath+"/name",schemaPath:"#/properties/name/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err45];}else {vErrors.push(err45);}errors++;}else {errors = _errs54;if(vErrors !== null){if(_errs54){vErrors.length = _errs54;}else {vErrors = null;}}}}if(data.groupName !== undefined){let data11 = data.groupName;const _errs60 = errors;let valid11 = false;const _errs61 = errors;if(typeof data11 !== "string"){const err46 = {instancePath:instancePath+"/groupName",schemaPath:"#/properties/groupName/anyOf/0/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err46];}else {vErrors.push(err46);}errors++;}var _valid8 = _errs61 === errors;valid11 = valid11 || _valid8;if(!valid11){const _errs63 = errors;if(data11 !== null){const err47 = {instancePath:instancePath+"/groupName",schemaPath:"#/properties/groupName/anyOf/1/type",keyword:"type",params:{type: "null"},message:"must be null"};if(vErrors === null){vErrors = [err47];}else {vErrors.push(err47);}errors++;}var _valid8 = _errs63 === errors;valid11 = valid11 || _valid8;}if(!valid11){const err48 = {instancePath:instancePath+"/groupName",schemaPath:"#/properties/groupName/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err48];}else {vErrors.push(err48);}errors++;}else {errors = _errs60;if(vErrors !== null){if(_errs60){vErrors.length = _errs60;}else {vErrors = null;}}}}if(data.pricing !== undefined){let data12 = data.pricing;const _errs66 = errors;let valid12 = false;const _errs67 = errors;if(!(validate73(data12, {instancePath:instancePath+"/pricing",parentData:data,parentDataProperty:"pricing",rootData}))){vErrors = vErrors === null ? validate73.errors : vErrors.concat(validate73.errors);errors = vErrors.length;}var _valid9 = _errs67 === errors;valid12 = valid12 || _valid9;if(!valid12){const _errs68 = errors;if(data12 !== null){const err49 = {instancePath:instancePath+"/pricing",schemaPath:"#/properties/pricing/anyOf/1/type",keyword:"type",params:{type: "null"},message:"must be null"};if(vErrors === null){vErrors = [err49];}else {vErrors.push(err49);}errors++;}var _valid9 = _errs68 === errors;valid12 = valid12 || _valid9;}if(!valid12){const err50 = {instancePath:instancePath+"/pricing",schemaPath:"#/properties/pricing/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err50];}else {vErrors.push(err50);}errors++;}else {errors = _errs66;if(vErrors !== null){if(_errs66){vErrors.length = _errs66;}else {vErrors = null;}}}}}else {const err51 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err51];}else {vErrors.push(err51);}errors++;}validate163.errors = vErrors;return errors === 0;}function validate162(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="aether:validator:ProbedModel" */;let vErrors = null;let errors = 0;if(!(validate163(data, {instancePath,parentData,parentDataProperty,rootData}))){vErrors = vErrors === null ? validate163.errors : vErrors.concat(validate163.errors);errors = vErrors.length;}validate162.errors = vErrors;return errors === 0;}export const validateProtocol = validate167;const schema186 = {"$id":"aether:validator:Protocol","$ref":"aether:bindings#/definitions/Protocol"};function validate167(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="aether:validator:Protocol" */;let vErrors = null;let errors = 0;const _errs1 = errors;let valid1 = false;const _errs2 = errors;if("anthropic-messages" !== data){const err0 = {instancePath,schemaPath:"aether:bindings#/definitions/Protocol/anyOf/0/const",keyword:"const",params:{allowedValue: "anthropic-messages"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}var _valid0 = _errs2 === errors;valid1 = valid1 || _valid0;if(!valid1){const _errs3 = errors;if("openai-chat" !== data){const err1 = {instancePath,schemaPath:"aether:bindings#/definitions/Protocol/anyOf/1/const",keyword:"const",params:{allowedValue: "openai-chat"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}var _valid0 = _errs3 === errors;valid1 = valid1 || _valid0;if(!valid1){const _errs4 = errors;if("openai-responses" !== data){const err2 = {instancePath,schemaPath:"aether:bindings#/definitions/Protocol/anyOf/2/const",keyword:"const",params:{allowedValue: "openai-responses"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}var _valid0 = _errs4 === errors;valid1 = valid1 || _valid0;}}if(!valid1){const err3 = {instancePath,schemaPath:"aether:bindings#/definitions/Protocol/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}else {errors = _errs1;if(vErrors !== null){if(_errs1){vErrors.length = _errs1;}else {vErrors = null;}}}validate167.errors = vErrors;return errors === 0;}export const validateProvider = validate168;const schema188 = {"$id":"aether:validator:Provider","$ref":"aether:bindings#/definitions/Provider"};const schema189 = {"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"enabled":{"type":"boolean"},"notes":{"type":"string"},"presetId":{"anyOf":[{"type":"string"},{"type":"null"}]},"endpoints":{"type":"array","items":{"$ref":"aether:bindings#/definitions/Endpoint"}}},"required":["id","name","enabled","notes","presetId","endpoints"],"additionalProperties":false};function validate170(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;if(data && typeof data == "object" && !Array.isArray(data)){if(data.id === undefined){const err0 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "id"},message:"must have required property '"+"id"+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}if(data.slug === undefined){const err1 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "slug"},message:"must have required property '"+"slug"+"'"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}if(data.baseUrl === undefined){const err2 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "baseUrl"},message:"must have required property '"+"baseUrl"+"'"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}if(data.protocol === undefined){const err3 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "protocol"},message:"must have required property '"+"protocol"+"'"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}if(data.keys === undefined){const err4 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "keys"},message:"must have required property '"+"keys"+"'"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}if(data.keyStrategy === undefined){const err5 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "keyStrategy"},message:"must have required property '"+"keyStrategy"+"'"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}if(data.probeUrl === undefined){const err6 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "probeUrl"},message:"must have required property '"+"probeUrl"+"'"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}if(data.models === undefined){const err7 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "models"},message:"must have required property '"+"models"+"'"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}if(data.imageBaseUrl === undefined){const err8 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "imageBaseUrl"},message:"must have required property '"+"imageBaseUrl"+"'"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}if(data.imageEditBaseUrl === undefined){const err9 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "imageEditBaseUrl"},message:"must have required property '"+"imageEditBaseUrl"+"'"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}if(data.headers === undefined){const err10 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "headers"},message:"must have required property '"+"headers"+"'"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}for(const key0 in data){if(!(func8.call(schema68.properties, key0))){const err11 = {instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}}if(data.id !== undefined){if(typeof data.id !== "string"){const err12 = {instancePath:instancePath+"/id",schemaPath:"#/properties/id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}}if(data.slug !== undefined){if(typeof data.slug !== "string"){const err13 = {instancePath:instancePath+"/slug",schemaPath:"#/properties/slug/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}}if(data.baseUrl !== undefined){if(typeof data.baseUrl !== "string"){const err14 = {instancePath:instancePath+"/baseUrl",schemaPath:"#/properties/baseUrl/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err14];}else {vErrors.push(err14);}errors++;}}if(data.protocol !== undefined){let data3 = data.protocol;const _errs10 = errors;let valid2 = false;const _errs11 = errors;if("anthropic-messages" !== data3){const err15 = {instancePath:instancePath+"/protocol",schemaPath:"aether:bindings#/definitions/Protocol/anyOf/0/const",keyword:"const",params:{allowedValue: "anthropic-messages"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err15];}else {vErrors.push(err15);}errors++;}var _valid0 = _errs11 === errors;valid2 = valid2 || _valid0;if(!valid2){const _errs12 = errors;if("openai-chat" !== data3){const err16 = {instancePath:instancePath+"/protocol",schemaPath:"aether:bindings#/definitions/Protocol/anyOf/1/const",keyword:"const",params:{allowedValue: "openai-chat"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err16];}else {vErrors.push(err16);}errors++;}var _valid0 = _errs12 === errors;valid2 = valid2 || _valid0;if(!valid2){const _errs13 = errors;if("openai-responses" !== data3){const err17 = {instancePath:instancePath+"/protocol",schemaPath:"aether:bindings#/definitions/Protocol/anyOf/2/const",keyword:"const",params:{allowedValue: "openai-responses"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err17];}else {vErrors.push(err17);}errors++;}var _valid0 = _errs13 === errors;valid2 = valid2 || _valid0;}}if(!valid2){const err18 = {instancePath:instancePath+"/protocol",schemaPath:"aether:bindings#/definitions/Protocol/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err18];}else {vErrors.push(err18);}errors++;}else {errors = _errs10;if(vErrors !== null){if(_errs10){vErrors.length = _errs10;}else {vErrors = null;}}}}if(data.keys !== undefined){let data4 = data.keys;if(Array.isArray(data4)){const len0 = data4.length;for(let i0=0; i0<len0; i0++){let data5 = data4[i0];if(data5 && typeof data5 == "object" && !Array.isArray(data5)){if(data5.id === undefined){const err19 = {instancePath:instancePath+"/keys/" + i0,schemaPath:"aether:bindings#/definitions/EndpointKey/required",keyword:"required",params:{missingProperty: "id"},message:"must have required property '"+"id"+"'"};if(vErrors === null){vErrors = [err19];}else {vErrors.push(err19);}errors++;}if(data5.label === undefined){const err20 = {instancePath:instancePath+"/keys/" + i0,schemaPath:"aether:bindings#/definitions/EndpointKey/required",keyword:"required",params:{missingProperty: "label"},message:"must have required property '"+"label"+"'"};if(vErrors === null){vErrors = [err20];}else {vErrors.push(err20);}errors++;}if(data5.enabled === undefined){const err21 = {instancePath:instancePath+"/keys/" + i0,schemaPath:"aether:bindings#/definitions/EndpointKey/required",keyword:"required",params:{missingProperty: "enabled"},message:"must have required property '"+"enabled"+"'"};if(vErrors === null){vErrors = [err21];}else {vErrors.push(err21);}errors++;}if(data5.masked === undefined){const err22 = {instancePath:instancePath+"/keys/" + i0,schemaPath:"aether:bindings#/definitions/EndpointKey/required",keyword:"required",params:{missingProperty: "masked"},message:"must have required property '"+"masked"+"'"};if(vErrors === null){vErrors = [err22];}else {vErrors.push(err22);}errors++;}if(data5.readable === undefined){const err23 = {instancePath:instancePath+"/keys/" + i0,schemaPath:"aether:bindings#/definitions/EndpointKey/required",keyword:"required",params:{missingProperty: "readable"},message:"must have required property '"+"readable"+"'"};if(vErrors === null){vErrors = [err23];}else {vErrors.push(err23);}errors++;}if(data5.exhaustedUntil === undefined){const err24 = {instancePath:instancePath+"/keys/" + i0,schemaPath:"aether:bindings#/definitions/EndpointKey/required",keyword:"required",params:{missingProperty: "exhaustedUntil"},message:"must have required property '"+"exhaustedUntil"+"'"};if(vErrors === null){vErrors = [err24];}else {vErrors.push(err24);}errors++;}if(data5.exhaustedReason === undefined){const err25 = {instancePath:instancePath+"/keys/" + i0,schemaPath:"aether:bindings#/definitions/EndpointKey/required",keyword:"required",params:{missingProperty: "exhaustedReason"},message:"must have required property '"+"exhaustedReason"+"'"};if(vErrors === null){vErrors = [err25];}else {vErrors.push(err25);}errors++;}for(const key1 in data5){if(!(((((((key1 === "id") || (key1 === "label")) || (key1 === "enabled")) || (key1 === "masked")) || (key1 === "readable")) || (key1 === "exhaustedUntil")) || (key1 === "exhaustedReason"))){const err26 = {instancePath:instancePath+"/keys/" + i0,schemaPath:"aether:bindings#/definitions/EndpointKey/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key1},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err26];}else {vErrors.push(err26);}errors++;}}if(data5.id !== undefined){if(typeof data5.id !== "string"){const err27 = {instancePath:instancePath+"/keys/" + i0+"/id",schemaPath:"aether:bindings#/definitions/EndpointKey/properties/id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err27];}else {vErrors.push(err27);}errors++;}}if(data5.label !== undefined){if(typeof data5.label !== "string"){const err28 = {instancePath:instancePath+"/keys/" + i0+"/label",schemaPath:"aether:bindings#/definitions/EndpointKey/properties/label/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err28];}else {vErrors.push(err28);}errors++;}}if(data5.enabled !== undefined){if(typeof data5.enabled !== "boolean"){const err29 = {instancePath:instancePath+"/keys/" + i0+"/enabled",schemaPath:"aether:bindings#/definitions/EndpointKey/properties/enabled/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"};if(vErrors === null){vErrors = [err29];}else {vErrors.push(err29);}errors++;}}if(data5.masked !== undefined){let data9 = data5.masked;const _errs27 = errors;let valid7 = false;const _errs28 = errors;if(typeof data9 !== "string"){const err30 = {instancePath:instancePath+"/keys/" + i0+"/masked",schemaPath:"aether:bindings#/definitions/EndpointKey/properties/masked/anyOf/0/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err30];}else {vErrors.push(err30);}errors++;}var _valid1 = _errs28 === errors;valid7 = valid7 || _valid1;if(!valid7){const _errs30 = errors;if(data9 !== null){const err31 = {instancePath:instancePath+"/keys/" + i0+"/masked",schemaPath:"aether:bindings#/definitions/EndpointKey/properties/masked/anyOf/1/type",keyword:"type",params:{type: "null"},message:"must be null"};if(vErrors === null){vErrors = [err31];}else {vErrors.push(err31);}errors++;}var _valid1 = _errs30 === errors;valid7 = valid7 || _valid1;}if(!valid7){const err32 = {instancePath:instancePath+"/keys/" + i0+"/masked",schemaPath:"aether:bindings#/definitions/EndpointKey/properties/masked/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err32];}else {vErrors.push(err32);}errors++;}else {errors = _errs27;if(vErrors !== null){if(_errs27){vErrors.length = _errs27;}else {vErrors = null;}}}}if(data5.readable !== undefined){if(typeof data5.readable !== "boolean"){const err33 = {instancePath:instancePath+"/keys/" + i0+"/readable",schemaPath:"aether:bindings#/definitions/EndpointKey/properties/readable/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"};if(vErrors === null){vErrors = [err33];}else {vErrors.push(err33);}errors++;}}if(data5.exhaustedUntil !== undefined){let data11 = data5.exhaustedUntil;const _errs35 = errors;let valid8 = false;const _errs36 = errors;if(!((typeof data11 == "number") && (isFinite(data11)))){const err34 = {instancePath:instancePath+"/keys/" + i0+"/exhaustedUntil",schemaPath:"aether:bindings#/definitions/EndpointKey/properties/exhaustedUntil/anyOf/0/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err34];}else {vErrors.push(err34);}errors++;}var _valid2 = _errs36 === errors;valid8 = valid8 || _valid2;if(!valid8){const _errs38 = errors;if(data11 !== null){const err35 = {instancePath:instancePath+"/keys/" + i0+"/exhaustedUntil",schemaPath:"aether:bindings#/definitions/EndpointKey/properties/exhaustedUntil/anyOf/1/type",keyword:"type",params:{type: "null"},message:"must be null"};if(vErrors === null){vErrors = [err35];}else {vErrors.push(err35);}errors++;}var _valid2 = _errs38 === errors;valid8 = valid8 || _valid2;}if(!valid8){const err36 = {instancePath:instancePath+"/keys/" + i0+"/exhaustedUntil",schemaPath:"aether:bindings#/definitions/EndpointKey/properties/exhaustedUntil/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err36];}else {vErrors.push(err36);}errors++;}else {errors = _errs35;if(vErrors !== null){if(_errs35){vErrors.length = _errs35;}else {vErrors = null;}}}}if(data5.exhaustedReason !== undefined){let data12 = data5.exhaustedReason;const _errs41 = errors;let valid9 = false;const _errs42 = errors;if(typeof data12 !== "string"){const err37 = {instancePath:instancePath+"/keys/" + i0+"/exhaustedReason",schemaPath:"aether:bindings#/definitions/EndpointKey/properties/exhaustedReason/anyOf/0/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err37];}else {vErrors.push(err37);}errors++;}var _valid3 = _errs42 === errors;valid9 = valid9 || _valid3;if(!valid9){const _errs44 = errors;if(data12 !== null){const err38 = {instancePath:instancePath+"/keys/" + i0+"/exhaustedReason",schemaPath:"aether:bindings#/definitions/EndpointKey/properties/exhaustedReason/anyOf/1/type",keyword:"type",params:{type: "null"},message:"must be null"};if(vErrors === null){vErrors = [err38];}else {vErrors.push(err38);}errors++;}var _valid3 = _errs44 === errors;valid9 = valid9 || _valid3;}if(!valid9){const err39 = {instancePath:instancePath+"/keys/" + i0+"/exhaustedReason",schemaPath:"aether:bindings#/definitions/EndpointKey/properties/exhaustedReason/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err39];}else {vErrors.push(err39);}errors++;}else {errors = _errs41;if(vErrors !== null){if(_errs41){vErrors.length = _errs41;}else {vErrors = null;}}}}}else {const err40 = {instancePath:instancePath+"/keys/" + i0,schemaPath:"aether:bindings#/definitions/EndpointKey/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err40];}else {vErrors.push(err40);}errors++;}}}else {const err41 = {instancePath:instancePath+"/keys",schemaPath:"#/properties/keys/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err41];}else {vErrors.push(err41);}errors++;}}if(data.keyStrategy !== undefined){let data13 = data.keyStrategy;const _errs48 = errors;let valid11 = false;const _errs49 = errors;if("round_robin" !== data13){const err42 = {instancePath:instancePath+"/keyStrategy",schemaPath:"aether:bindings#/definitions/KeyStrategy/anyOf/0/const",keyword:"const",params:{allowedValue: "round_robin"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err42];}else {vErrors.push(err42);}errors++;}var _valid4 = _errs49 === errors;valid11 = valid11 || _valid4;if(!valid11){const _errs50 = errors;if("fill_first" !== data13){const err43 = {instancePath:instancePath+"/keyStrategy",schemaPath:"aether:bindings#/definitions/KeyStrategy/anyOf/1/const",keyword:"const",params:{allowedValue: "fill_first"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err43];}else {vErrors.push(err43);}errors++;}var _valid4 = _errs50 === errors;valid11 = valid11 || _valid4;}if(!valid11){const err44 = {instancePath:instancePath+"/keyStrategy",schemaPath:"aether:bindings#/definitions/KeyStrategy/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err44];}else {vErrors.push(err44);}errors++;}else {errors = _errs48;if(vErrors !== null){if(_errs48){vErrors.length = _errs48;}else {vErrors = null;}}}}if(data.probeUrl !== undefined){if(typeof data.probeUrl !== "string"){const err45 = {instancePath:instancePath+"/probeUrl",schemaPath:"#/properties/probeUrl/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err45];}else {vErrors.push(err45);}errors++;}}if(data.models !== undefined){let data15 = data.models;if(Array.isArray(data15)){const len1 = data15.length;for(let i1=0; i1<len1; i1++){if(!(validate70(data15[i1], {instancePath:instancePath+"/models/" + i1,parentData:data15,parentDataProperty:i1,rootData}))){vErrors = vErrors === null ? validate70.errors : vErrors.concat(validate70.errors);errors = vErrors.length;}}}else {const err46 = {instancePath:instancePath+"/models",schemaPath:"#/properties/models/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err46];}else {vErrors.push(err46);}errors++;}}if(data.imageBaseUrl !== undefined){let data17 = data.imageBaseUrl;const _errs57 = errors;let valid14 = false;const _errs58 = errors;if(typeof data17 !== "string"){const err47 = {instancePath:instancePath+"/imageBaseUrl",schemaPath:"#/properties/imageBaseUrl/anyOf/0/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err47];}else {vErrors.push(err47);}errors++;}var _valid5 = _errs58 === errors;valid14 = valid14 || _valid5;if(!valid14){const _errs60 = errors;if(data17 !== null){const err48 = {instancePath:instancePath+"/imageBaseUrl",schemaPath:"#/properties/imageBaseUrl/anyOf/1/type",keyword:"type",params:{type: "null"},message:"must be null"};if(vErrors === null){vErrors = [err48];}else {vErrors.push(err48);}errors++;}var _valid5 = _errs60 === errors;valid14 = valid14 || _valid5;}if(!valid14){const err49 = {instancePath:instancePath+"/imageBaseUrl",schemaPath:"#/properties/imageBaseUrl/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err49];}else {vErrors.push(err49);}errors++;}else {errors = _errs57;if(vErrors !== null){if(_errs57){vErrors.length = _errs57;}else {vErrors = null;}}}}if(data.imageEditBaseUrl !== undefined){let data18 = data.imageEditBaseUrl;const _errs63 = errors;let valid15 = false;const _errs64 = errors;if(typeof data18 !== "string"){const err50 = {instancePath:instancePath+"/imageEditBaseUrl",schemaPath:"#/properties/imageEditBaseUrl/anyOf/0/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err50];}else {vErrors.push(err50);}errors++;}var _valid6 = _errs64 === errors;valid15 = valid15 || _valid6;if(!valid15){const _errs66 = errors;if(data18 !== null){const err51 = {instancePath:instancePath+"/imageEditBaseUrl",schemaPath:"#/properties/imageEditBaseUrl/anyOf/1/type",keyword:"type",params:{type: "null"},message:"must be null"};if(vErrors === null){vErrors = [err51];}else {vErrors.push(err51);}errors++;}var _valid6 = _errs66 === errors;valid15 = valid15 || _valid6;}if(!valid15){const err52 = {instancePath:instancePath+"/imageEditBaseUrl",schemaPath:"#/properties/imageEditBaseUrl/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err52];}else {vErrors.push(err52);}errors++;}else {errors = _errs63;if(vErrors !== null){if(_errs63){vErrors.length = _errs63;}else {vErrors = null;}}}}if(data.headers !== undefined){let data19 = data.headers;if(data19 && typeof data19 == "object" && !Array.isArray(data19)){for(const key2 in data19){if(typeof data19[key2] !== "string"){const err53 = {instancePath:instancePath+"/headers/" + key2.replace(/~/g, "~0").replace(/\//g, "~1"),schemaPath:"#/properties/headers/additionalProperties/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err53];}else {vErrors.push(err53);}errors++;}}}else {const err54 = {instancePath:instancePath+"/headers",schemaPath:"#/properties/headers/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err54];}else {vErrors.push(err54);}errors++;}}}else {const err55 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err55];}else {vErrors.push(err55);}errors++;}validate170.errors = vErrors;return errors === 0;}function validate169(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;if(data && typeof data == "object" && !Array.isArray(data)){if(data.id === undefined){const err0 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "id"},message:"must have required property '"+"id"+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}if(data.name === undefined){const err1 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "name"},message:"must have required property '"+"name"+"'"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}if(data.enabled === undefined){const err2 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "enabled"},message:"must have required property '"+"enabled"+"'"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}if(data.notes === undefined){const err3 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "notes"},message:"must have required property '"+"notes"+"'"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}if(data.presetId === undefined){const err4 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "presetId"},message:"must have required property '"+"presetId"+"'"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}if(data.endpoints === undefined){const err5 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "endpoints"},message:"must have required property '"+"endpoints"+"'"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}for(const key0 in data){if(!((((((key0 === "id") || (key0 === "name")) || (key0 === "enabled")) || (key0 === "notes")) || (key0 === "presetId")) || (key0 === "endpoints"))){const err6 = {instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}}if(data.id !== undefined){if(typeof data.id !== "string"){const err7 = {instancePath:instancePath+"/id",schemaPath:"#/properties/id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}}if(data.name !== undefined){if(typeof data.name !== "string"){const err8 = {instancePath:instancePath+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}}if(data.enabled !== undefined){if(typeof data.enabled !== "boolean"){const err9 = {instancePath:instancePath+"/enabled",schemaPath:"#/properties/enabled/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}}if(data.notes !== undefined){if(typeof data.notes !== "string"){const err10 = {instancePath:instancePath+"/notes",schemaPath:"#/properties/notes/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}}if(data.presetId !== undefined){let data4 = data.presetId;const _errs11 = errors;let valid1 = false;const _errs12 = errors;if(typeof data4 !== "string"){const err11 = {instancePath:instancePath+"/presetId",schemaPath:"#/properties/presetId/anyOf/0/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}var _valid0 = _errs12 === errors;valid1 = valid1 || _valid0;if(!valid1){const _errs14 = errors;if(data4 !== null){const err12 = {instancePath:instancePath+"/presetId",schemaPath:"#/properties/presetId/anyOf/1/type",keyword:"type",params:{type: "null"},message:"must be null"};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}var _valid0 = _errs14 === errors;valid1 = valid1 || _valid0;}if(!valid1){const err13 = {instancePath:instancePath+"/presetId",schemaPath:"#/properties/presetId/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}else {errors = _errs11;if(vErrors !== null){if(_errs11){vErrors.length = _errs11;}else {vErrors = null;}}}}if(data.endpoints !== undefined){let data5 = data.endpoints;if(Array.isArray(data5)){const len0 = data5.length;for(let i0=0; i0<len0; i0++){if(!(validate170(data5[i0], {instancePath:instancePath+"/endpoints/" + i0,parentData:data5,parentDataProperty:i0,rootData}))){vErrors = vErrors === null ? validate170.errors : vErrors.concat(validate170.errors);errors = vErrors.length;}}}else {const err14 = {instancePath:instancePath+"/endpoints",schemaPath:"#/properties/endpoints/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err14];}else {vErrors.push(err14);}errors++;}}}else {const err15 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err15];}else {vErrors.push(err15);}errors++;}validate169.errors = vErrors;return errors === 0;}function validate168(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="aether:validator:Provider" */;let vErrors = null;let errors = 0;if(!(validate169(data, {instancePath,parentData,parentDataProperty,rootData}))){vErrors = vErrors === null ? validate169.errors : vErrors.concat(validate169.errors);errors = vErrors.length;}validate168.errors = vErrors;return errors === 0;}export const validateProviderSave = validate174;const schema194 = {"$id":"aether:validator:ProviderSave","$ref":"aether:bindings#/definitions/ProviderSave"};const schema195 = {"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"enabled":{"type":"boolean"},"notes":{"type":"string"},"presetId":{"type":"string"},"endpoints":{"type":"array","items":{"$ref":"aether:bindings#/definitions/EndpointSave"}}},"required":["name","endpoints"],"additionalProperties":false};function validate176(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;if(data && typeof data == "object" && !Array.isArray(data)){if(data.slug === undefined){const err0 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "slug"},message:"must have required property '"+"slug"+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}if(data.baseUrl === undefined){const err1 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "baseUrl"},message:"must have required property '"+"baseUrl"+"'"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}if(data.protocol === undefined){const err2 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "protocol"},message:"must have required property '"+"protocol"+"'"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}if(data.models === undefined){const err3 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "models"},message:"must have required property '"+"models"+"'"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}for(const key0 in data){if(!(func8.call(schema86.properties, key0))){const err4 = {instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}}if(data.id !== undefined){if(typeof data.id !== "string"){const err5 = {instancePath:instancePath+"/id",schemaPath:"#/properties/id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}}if(data.slug !== undefined){if(typeof data.slug !== "string"){const err6 = {instancePath:instancePath+"/slug",schemaPath:"#/properties/slug/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}}if(data.baseUrl !== undefined){if(typeof data.baseUrl !== "string"){const err7 = {instancePath:instancePath+"/baseUrl",schemaPath:"#/properties/baseUrl/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}}if(data.protocol !== undefined){let data3 = data.protocol;const _errs10 = errors;let valid2 = false;const _errs11 = errors;if("anthropic-messages" !== data3){const err8 = {instancePath:instancePath+"/protocol",schemaPath:"aether:bindings#/definitions/Protocol/anyOf/0/const",keyword:"const",params:{allowedValue: "anthropic-messages"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}var _valid0 = _errs11 === errors;valid2 = valid2 || _valid0;if(!valid2){const _errs12 = errors;if("openai-chat" !== data3){const err9 = {instancePath:instancePath+"/protocol",schemaPath:"aether:bindings#/definitions/Protocol/anyOf/1/const",keyword:"const",params:{allowedValue: "openai-chat"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}var _valid0 = _errs12 === errors;valid2 = valid2 || _valid0;if(!valid2){const _errs13 = errors;if("openai-responses" !== data3){const err10 = {instancePath:instancePath+"/protocol",schemaPath:"aether:bindings#/definitions/Protocol/anyOf/2/const",keyword:"const",params:{allowedValue: "openai-responses"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}var _valid0 = _errs13 === errors;valid2 = valid2 || _valid0;}}if(!valid2){const err11 = {instancePath:instancePath+"/protocol",schemaPath:"aether:bindings#/definitions/Protocol/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}else {errors = _errs10;if(vErrors !== null){if(_errs10){vErrors.length = _errs10;}else {vErrors = null;}}}}if(data.keyStrategy !== undefined){let data4 = data.keyStrategy;const _errs16 = errors;let valid4 = false;const _errs17 = errors;if("round_robin" !== data4){const err12 = {instancePath:instancePath+"/keyStrategy",schemaPath:"aether:bindings#/definitions/KeyStrategy/anyOf/0/const",keyword:"const",params:{allowedValue: "round_robin"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}var _valid1 = _errs17 === errors;valid4 = valid4 || _valid1;if(!valid4){const _errs18 = errors;if("fill_first" !== data4){const err13 = {instancePath:instancePath+"/keyStrategy",schemaPath:"aether:bindings#/definitions/KeyStrategy/anyOf/1/const",keyword:"const",params:{allowedValue: "fill_first"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}var _valid1 = _errs18 === errors;valid4 = valid4 || _valid1;}if(!valid4){const err14 = {instancePath:instancePath+"/keyStrategy",schemaPath:"aether:bindings#/definitions/KeyStrategy/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err14];}else {vErrors.push(err14);}errors++;}else {errors = _errs16;if(vErrors !== null){if(_errs16){vErrors.length = _errs16;}else {vErrors = null;}}}}if(data.models !== undefined){let data5 = data.models;if(Array.isArray(data5)){const len0 = data5.length;for(let i0=0; i0<len0; i0++){if(!(validate81(data5[i0], {instancePath:instancePath+"/models/" + i0,parentData:data5,parentDataProperty:i0,rootData}))){vErrors = vErrors === null ? validate81.errors : vErrors.concat(validate81.errors);errors = vErrors.length;}}}else {const err15 = {instancePath:instancePath+"/models",schemaPath:"#/properties/models/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err15];}else {vErrors.push(err15);}errors++;}}if(data.imageBaseUrl !== undefined){let data7 = data.imageBaseUrl;const _errs23 = errors;let valid7 = false;const _errs24 = errors;if(typeof data7 !== "string"){const err16 = {instancePath:instancePath+"/imageBaseUrl",schemaPath:"#/properties/imageBaseUrl/anyOf/0/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err16];}else {vErrors.push(err16);}errors++;}var _valid2 = _errs24 === errors;valid7 = valid7 || _valid2;if(!valid7){const _errs26 = errors;if(data7 !== null){const err17 = {instancePath:instancePath+"/imageBaseUrl",schemaPath:"#/properties/imageBaseUrl/anyOf/1/type",keyword:"type",params:{type: "null"},message:"must be null"};if(vErrors === null){vErrors = [err17];}else {vErrors.push(err17);}errors++;}var _valid2 = _errs26 === errors;valid7 = valid7 || _valid2;}if(!valid7){const err18 = {instancePath:instancePath+"/imageBaseUrl",schemaPath:"#/properties/imageBaseUrl/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err18];}else {vErrors.push(err18);}errors++;}else {errors = _errs23;if(vErrors !== null){if(_errs23){vErrors.length = _errs23;}else {vErrors = null;}}}}if(data.imageEditBaseUrl !== undefined){let data8 = data.imageEditBaseUrl;const _errs29 = errors;let valid8 = false;const _errs30 = errors;if(typeof data8 !== "string"){const err19 = {instancePath:instancePath+"/imageEditBaseUrl",schemaPath:"#/properties/imageEditBaseUrl/anyOf/0/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err19];}else {vErrors.push(err19);}errors++;}var _valid3 = _errs30 === errors;valid8 = valid8 || _valid3;if(!valid8){const _errs32 = errors;if(data8 !== null){const err20 = {instancePath:instancePath+"/imageEditBaseUrl",schemaPath:"#/properties/imageEditBaseUrl/anyOf/1/type",keyword:"type",params:{type: "null"},message:"must be null"};if(vErrors === null){vErrors = [err20];}else {vErrors.push(err20);}errors++;}var _valid3 = _errs32 === errors;valid8 = valid8 || _valid3;}if(!valid8){const err21 = {instancePath:instancePath+"/imageEditBaseUrl",schemaPath:"#/properties/imageEditBaseUrl/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err21];}else {vErrors.push(err21);}errors++;}else {errors = _errs29;if(vErrors !== null){if(_errs29){vErrors.length = _errs29;}else {vErrors = null;}}}}if(data.headers !== undefined){let data9 = data.headers;if(data9 && typeof data9 == "object" && !Array.isArray(data9)){for(const key1 in data9){if(typeof data9[key1] !== "string"){const err22 = {instancePath:instancePath+"/headers/" + key1.replace(/~/g, "~0").replace(/\//g, "~1"),schemaPath:"#/properties/headers/additionalProperties/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err22];}else {vErrors.push(err22);}errors++;}}}else {const err23 = {instancePath:instancePath+"/headers",schemaPath:"#/properties/headers/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err23];}else {vErrors.push(err23);}errors++;}}}else {const err24 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err24];}else {vErrors.push(err24);}errors++;}validate176.errors = vErrors;return errors === 0;}function validate175(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;if(data && typeof data == "object" && !Array.isArray(data)){if(data.name === undefined){const err0 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "name"},message:"must have required property '"+"name"+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}if(data.endpoints === undefined){const err1 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "endpoints"},message:"must have required property '"+"endpoints"+"'"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}for(const key0 in data){if(!((((((key0 === "id") || (key0 === "name")) || (key0 === "enabled")) || (key0 === "notes")) || (key0 === "presetId")) || (key0 === "endpoints"))){const err2 = {instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}}if(data.id !== undefined){if(typeof data.id !== "string"){const err3 = {instancePath:instancePath+"/id",schemaPath:"#/properties/id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}}if(data.name !== undefined){if(typeof data.name !== "string"){const err4 = {instancePath:instancePath+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}}if(data.enabled !== undefined){if(typeof data.enabled !== "boolean"){const err5 = {instancePath:instancePath+"/enabled",schemaPath:"#/properties/enabled/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}}if(data.notes !== undefined){if(typeof data.notes !== "string"){const err6 = {instancePath:instancePath+"/notes",schemaPath:"#/properties/notes/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}}if(data.presetId !== undefined){if(typeof data.presetId !== "string"){const err7 = {instancePath:instancePath+"/presetId",schemaPath:"#/properties/presetId/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}}if(data.endpoints !== undefined){let data5 = data.endpoints;if(Array.isArray(data5)){const len0 = data5.length;for(let i0=0; i0<len0; i0++){if(!(validate176(data5[i0], {instancePath:instancePath+"/endpoints/" + i0,parentData:data5,parentDataProperty:i0,rootData}))){vErrors = vErrors === null ? validate176.errors : vErrors.concat(validate176.errors);errors = vErrors.length;}}}else {const err8 = {instancePath:instancePath+"/endpoints",schemaPath:"#/properties/endpoints/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}}}else {const err9 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}validate175.errors = vErrors;return errors === 0;}function validate174(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="aether:validator:ProviderSave" */;let vErrors = null;let errors = 0;if(!(validate175(data, {instancePath,parentData,parentDataProperty,rootData}))){vErrors = vErrors === null ? validate175.errors : vErrors.concat(validate175.errors);errors = vErrors.length;}validate174.errors = vErrors;return errors === 0;}export const validateReasoningConfig = validate180;const schema199 = {"$id":"aether:validator:ReasoningConfig","$ref":"aether:bindings#/definitions/ReasoningConfig"};function validate181(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;if(data && typeof data == "object" && !Array.isArray(data)){if(data.dialect === undefined){const err0 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "dialect"},message:"must have required property '"+"dialect"+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}if(data.efforts === undefined){const err1 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "efforts"},message:"must have required property '"+"efforts"+"'"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}for(const key0 in data){if(!(((key0 === "dialect") || (key0 === "efforts")) || (key0 === "budgetTokens"))){const err2 = {instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}}if(data.dialect !== undefined){let data0 = data.dialect;const _errs4 = errors;let valid2 = false;const _errs5 = errors;if("openai" !== data0){const err3 = {instancePath:instancePath+"/dialect",schemaPath:"aether:bindings#/definitions/ReasoningDialect/anyOf/0/const",keyword:"const",params:{allowedValue: "openai"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}var _valid0 = _errs5 === errors;valid2 = valid2 || _valid0;if(!valid2){const _errs6 = errors;if("anthropic-budget" !== data0){const err4 = {instancePath:instancePath+"/dialect",schemaPath:"aether:bindings#/definitions/ReasoningDialect/anyOf/1/const",keyword:"const",params:{allowedValue: "anthropic-budget"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}var _valid0 = _errs6 === errors;valid2 = valid2 || _valid0;if(!valid2){const _errs7 = errors;if("anthropic-adaptive" !== data0){const err5 = {instancePath:instancePath+"/dialect",schemaPath:"aether:bindings#/definitions/ReasoningDialect/anyOf/2/const",keyword:"const",params:{allowedValue: "anthropic-adaptive"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}var _valid0 = _errs7 === errors;valid2 = valid2 || _valid0;if(!valid2){const _errs8 = errors;if("thinking-type" !== data0){const err6 = {instancePath:instancePath+"/dialect",schemaPath:"aether:bindings#/definitions/ReasoningDialect/anyOf/3/const",keyword:"const",params:{allowedValue: "thinking-type"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}var _valid0 = _errs8 === errors;valid2 = valid2 || _valid0;if(!valid2){const _errs9 = errors;if("qwen" !== data0){const err7 = {instancePath:instancePath+"/dialect",schemaPath:"aether:bindings#/definitions/ReasoningDialect/anyOf/4/const",keyword:"const",params:{allowedValue: "qwen"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}var _valid0 = _errs9 === errors;valid2 = valid2 || _valid0;}}}}if(!valid2){const err8 = {instancePath:instancePath+"/dialect",schemaPath:"aether:bindings#/definitions/ReasoningDialect/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}else {errors = _errs4;if(vErrors !== null){if(_errs4){vErrors.length = _errs4;}else {vErrors = null;}}}}if(data.efforts !== undefined){let data1 = data.efforts;if(Array.isArray(data1)){const len0 = data1.length;for(let i0=0; i0<len0; i0++){let data2 = data1[i0];const _errs14 = errors;let valid6 = false;const _errs15 = errors;if("default" !== data2){const err9 = {instancePath:instancePath+"/efforts/" + i0,schemaPath:"aether:bindings#/definitions/ReasoningEffort/anyOf/0/const",keyword:"const",params:{allowedValue: "default"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}var _valid1 = _errs15 === errors;valid6 = valid6 || _valid1;if(!valid6){const _errs16 = errors;if("none" !== data2){const err10 = {instancePath:instancePath+"/efforts/" + i0,schemaPath:"aether:bindings#/definitions/ReasoningEffort/anyOf/1/const",keyword:"const",params:{allowedValue: "none"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}var _valid1 = _errs16 === errors;valid6 = valid6 || _valid1;if(!valid6){const _errs17 = errors;if("auto" !== data2){const err11 = {instancePath:instancePath+"/efforts/" + i0,schemaPath:"aether:bindings#/definitions/ReasoningEffort/anyOf/2/const",keyword:"const",params:{allowedValue: "auto"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}var _valid1 = _errs17 === errors;valid6 = valid6 || _valid1;if(!valid6){const _errs18 = errors;if("minimal" !== data2){const err12 = {instancePath:instancePath+"/efforts/" + i0,schemaPath:"aether:bindings#/definitions/ReasoningEffort/anyOf/3/const",keyword:"const",params:{allowedValue: "minimal"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}var _valid1 = _errs18 === errors;valid6 = valid6 || _valid1;if(!valid6){const _errs19 = errors;if("low" !== data2){const err13 = {instancePath:instancePath+"/efforts/" + i0,schemaPath:"aether:bindings#/definitions/ReasoningEffort/anyOf/4/const",keyword:"const",params:{allowedValue: "low"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}var _valid1 = _errs19 === errors;valid6 = valid6 || _valid1;if(!valid6){const _errs20 = errors;if("medium" !== data2){const err14 = {instancePath:instancePath+"/efforts/" + i0,schemaPath:"aether:bindings#/definitions/ReasoningEffort/anyOf/5/const",keyword:"const",params:{allowedValue: "medium"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err14];}else {vErrors.push(err14);}errors++;}var _valid1 = _errs20 === errors;valid6 = valid6 || _valid1;if(!valid6){const _errs21 = errors;if("high" !== data2){const err15 = {instancePath:instancePath+"/efforts/" + i0,schemaPath:"aether:bindings#/definitions/ReasoningEffort/anyOf/6/const",keyword:"const",params:{allowedValue: "high"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err15];}else {vErrors.push(err15);}errors++;}var _valid1 = _errs21 === errors;valid6 = valid6 || _valid1;if(!valid6){const _errs22 = errors;if("xhigh" !== data2){const err16 = {instancePath:instancePath+"/efforts/" + i0,schemaPath:"aether:bindings#/definitions/ReasoningEffort/anyOf/7/const",keyword:"const",params:{allowedValue: "xhigh"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err16];}else {vErrors.push(err16);}errors++;}var _valid1 = _errs22 === errors;valid6 = valid6 || _valid1;if(!valid6){const _errs23 = errors;if("max" !== data2){const err17 = {instancePath:instancePath+"/efforts/" + i0,schemaPath:"aether:bindings#/definitions/ReasoningEffort/anyOf/8/const",keyword:"const",params:{allowedValue: "max"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err17];}else {vErrors.push(err17);}errors++;}var _valid1 = _errs23 === errors;valid6 = valid6 || _valid1;}}}}}}}}if(!valid6){const err18 = {instancePath:instancePath+"/efforts/" + i0,schemaPath:"aether:bindings#/definitions/ReasoningEffort/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err18];}else {vErrors.push(err18);}errors++;}else {errors = _errs14;if(vErrors !== null){if(_errs14){vErrors.length = _errs14;}else {vErrors = null;}}}}}else {const err19 = {instancePath:instancePath+"/efforts",schemaPath:"#/properties/efforts/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err19];}else {vErrors.push(err19);}errors++;}}if(data.budgetTokens !== undefined){let data3 = data.budgetTokens;if(!((typeof data3 == "number") && (isFinite(data3)))){const err20 = {instancePath:instancePath+"/budgetTokens",schemaPath:"#/properties/budgetTokens/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err20];}else {vErrors.push(err20);}errors++;}}}else {const err21 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err21];}else {vErrors.push(err21);}errors++;}validate181.errors = vErrors;return errors === 0;}function validate180(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="aether:validator:ReasoningConfig" */;let vErrors = null;let errors = 0;if(!(validate181(data, {instancePath,parentData,parentDataProperty,rootData}))){vErrors = vErrors === null ? validate181.errors : vErrors.concat(validate181.errors);errors = vErrors.length;}validate180.errors = vErrors;return errors === 0;}export const validateReasoningDialect = validate183;const schema203 = {"$id":"aether:validator:ReasoningDialect","$ref":"aether:bindings#/definitions/ReasoningDialect"};function validate183(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="aether:validator:ReasoningDialect" */;let vErrors = null;let errors = 0;const _errs1 = errors;let valid1 = false;const _errs2 = errors;if("openai" !== data){const err0 = {instancePath,schemaPath:"aether:bindings#/definitions/ReasoningDialect/anyOf/0/const",keyword:"const",params:{allowedValue: "openai"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}var _valid0 = _errs2 === errors;valid1 = valid1 || _valid0;if(!valid1){const _errs3 = errors;if("anthropic-budget" !== data){const err1 = {instancePath,schemaPath:"aether:bindings#/definitions/ReasoningDialect/anyOf/1/const",keyword:"const",params:{allowedValue: "anthropic-budget"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}var _valid0 = _errs3 === errors;valid1 = valid1 || _valid0;if(!valid1){const _errs4 = errors;if("anthropic-adaptive" !== data){const err2 = {instancePath,schemaPath:"aether:bindings#/definitions/ReasoningDialect/anyOf/2/const",keyword:"const",params:{allowedValue: "anthropic-adaptive"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}var _valid0 = _errs4 === errors;valid1 = valid1 || _valid0;if(!valid1){const _errs5 = errors;if("thinking-type" !== data){const err3 = {instancePath,schemaPath:"aether:bindings#/definitions/ReasoningDialect/anyOf/3/const",keyword:"const",params:{allowedValue: "thinking-type"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}var _valid0 = _errs5 === errors;valid1 = valid1 || _valid0;if(!valid1){const _errs6 = errors;if("qwen" !== data){const err4 = {instancePath,schemaPath:"aether:bindings#/definitions/ReasoningDialect/anyOf/4/const",keyword:"const",params:{allowedValue: "qwen"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}var _valid0 = _errs6 === errors;valid1 = valid1 || _valid0;}}}}if(!valid1){const err5 = {instancePath,schemaPath:"aether:bindings#/definitions/ReasoningDialect/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}else {errors = _errs1;if(vErrors !== null){if(_errs1){vErrors.length = _errs1;}else {vErrors = null;}}}validate183.errors = vErrors;return errors === 0;}export const validateReasoningEffort = validate184;const schema205 = {"$id":"aether:validator:ReasoningEffort","$ref":"https://aether.local/contracts/v1/common.schema.json#/definitions/ReasoningEffort"};function validate184(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="aether:validator:ReasoningEffort" */;let vErrors = null;let errors = 0;if(!(((((((((data === "default") || (data === "none")) || (data === "auto")) || (data === "minimal")) || (data === "low")) || (data === "medium")) || (data === "high")) || (data === "xhigh")) || (data === "max"))){const err0 = {instancePath,schemaPath:"https://aether.local/contracts/v1/common.schema.json#/definitions/ReasoningEffort/enum",keyword:"enum",params:{allowedValues: schema42.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}validate184.errors = vErrors;return errors === 0;}export const validateRunAccepted = validate185;const schema207 = {"$id":"aether:validator:RunAccepted","$ref":"https://aether.local/contracts/v1/run.schema.json#/definitions/RunAccepted"};const schema208 = {"type":"object","additionalProperties":false,"required":["runId","conversationId","turnId"],"properties":{"runId":{"$ref":"common.schema.json#/definitions/Id"},"conversationId":{"$ref":"common.schema.json#/definitions/NullableId"},"turnId":{"$ref":"common.schema.json#/definitions/NullableId"}}};function validate187(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;const _errs0 = errors;let valid0 = false;const _errs1 = errors;if(typeof data === "string"){if(func2(data) > 128){const err0 = {instancePath,schemaPath:"#/definitions/Id/maxLength",keyword:"maxLength",params:{limit: 128},message:"must NOT have more than 128 characters"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}if(func2(data) < 1){const err1 = {instancePath,schemaPath:"#/definitions/Id/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}}else {const err2 = {instancePath,schemaPath:"#/definitions/Id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}var _valid0 = _errs1 === errors;valid0 = valid0 || _valid0;if(!valid0){const _errs4 = errors;if(data !== null){const err3 = {instancePath,schemaPath:"#/anyOf/1/type",keyword:"type",params:{type: "null"},message:"must be null"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}var _valid0 = _errs4 === errors;valid0 = valid0 || _valid0;}if(!valid0){const err4 = {instancePath,schemaPath:"#/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}else {errors = _errs0;if(vErrors !== null){if(_errs0){vErrors.length = _errs0;}else {vErrors = null;}}}validate187.errors = vErrors;return errors === 0;}function validate186(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;if(data && typeof data == "object" && !Array.isArray(data)){if(data.runId === undefined){const err0 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "runId"},message:"must have required property '"+"runId"+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}if(data.conversationId === undefined){const err1 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "conversationId"},message:"must have required property '"+"conversationId"+"'"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}if(data.turnId === undefined){const err2 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "turnId"},message:"must have required property '"+"turnId"+"'"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}for(const key0 in data){if(!(((key0 === "runId") || (key0 === "conversationId")) || (key0 === "turnId"))){const err3 = {instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}}if(data.runId !== undefined){let data0 = data.runId;if(typeof data0 === "string"){if(func2(data0) > 128){const err4 = {instancePath:instancePath+"/runId",schemaPath:"common.schema.json#/definitions/Id/maxLength",keyword:"maxLength",params:{limit: 128},message:"must NOT have more than 128 characters"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}if(func2(data0) < 1){const err5 = {instancePath:instancePath+"/runId",schemaPath:"common.schema.json#/definitions/Id/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}}else {const err6 = {instancePath:instancePath+"/runId",schemaPath:"common.schema.json#/definitions/Id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}}if(data.conversationId !== undefined){if(!(validate187(data.conversationId, {instancePath:instancePath+"/conversationId",parentData:data,parentDataProperty:"conversationId",rootData}))){vErrors = vErrors === null ? validate187.errors : vErrors.concat(validate187.errors);errors = vErrors.length;}}if(data.turnId !== undefined){if(!(validate187(data.turnId, {instancePath:instancePath+"/turnId",parentData:data,parentDataProperty:"turnId",rootData}))){vErrors = vErrors === null ? validate187.errors : vErrors.concat(validate187.errors);errors = vErrors.length;}}}else {const err7 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}validate186.errors = vErrors;return errors === 0;}function validate185(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="aether:validator:RunAccepted" */;let vErrors = null;let errors = 0;if(!(validate186(data, {instancePath,parentData,parentDataProperty,rootData}))){vErrors = vErrors === null ? validate186.errors : vErrors.concat(validate186.errors);errors = vErrors.length;}validate185.errors = vErrors;return errors === 0;}export const validateRunEvent = validate191;const schema212 = {"$id":"aether:validator:RunEvent","$ref":"https://aether.local/contracts/v1/run.schema.json#/definitions/RunEvent"};const schema213 = {"oneOf":[{"type":"object","additionalProperties":false,"required":["kind"],"properties":{"kind":{"const":"search_start"}}},{"type":"object","additionalProperties":false,"required":["kind","query","provider","hits"],"properties":{"kind":{"const":"search_result"},"query":{"type":"string"},"provider":{"type":"string"},"hits":{"type":"array","items":{"$ref":"common.schema.json#/definitions/SearchHit"}}}},{"type":"object","additionalProperties":false,"required":["kind","round"],"properties":{"kind":{"const":"round_start"},"round":{"$ref":"common.schema.json#/definitions/U32"}}},{"type":"object","additionalProperties":false,"required":["kind","text"],"properties":{"kind":{"const":"text_delta"},"text":{"type":"string"}}},{"type":"object","additionalProperties":false,"required":["kind","text"],"properties":{"kind":{"const":"reasoning_delta"},"text":{"type":"string"}}},{"type":"object","additionalProperties":false,"required":["kind","callId","name","source"],"properties":{"kind":{"const":"tool_call"},"callId":{"type":"string"},"name":{"type":"string"},"source":{"enum":["host","mcp"]},"server":{"type":"string"}}},{"type":"object","additionalProperties":false,"required":["kind","callId","name","argsPreview"],"properties":{"kind":{"const":"approval_required"},"callId":{"type":"string"},"name":{"type":"string"},"argsPreview":{"type":"string","maxLength":2000}}},{"type":"object","additionalProperties":false,"required":["kind","callId","outcome","summary"],"properties":{"kind":{"const":"tool_result"},"callId":{"type":"string"},"outcome":{"$ref":"#/definitions/ToolOutcome"},"summary":{"type":"string"},"payload":true}},{"type":"object","additionalProperties":false,"required":["kind","inputTokens","outputTokens","cacheReadTokens","cacheWriteTokens","reasoningTokens","cost"],"properties":{"kind":{"const":"usage"},"inputTokens":{"$ref":"common.schema.json#/definitions/TokenCount"},"outputTokens":{"$ref":"common.schema.json#/definitions/TokenCount"},"cacheReadTokens":{"$ref":"common.schema.json#/definitions/TokenCount"},"cacheWriteTokens":{"$ref":"common.schema.json#/definitions/TokenCount"},"reasoningTokens":{"$ref":"common.schema.json#/definitions/TokenCount"},"cost":{"anyOf":[{"$ref":"common.schema.json#/definitions/Cost"},{"type":"null"}]}}},{"type":"object","additionalProperties":false,"required":["kind","usage"],"properties":{"kind":{"const":"context"},"usage":{"$ref":"common.schema.json#/definitions/ContextUsage"}}},{"type":"object","additionalProperties":false,"required":["kind","status"],"properties":{"kind":{"const":"end"},"status":{"$ref":"#/definitions/EndStatus"},"error":{"$ref":"error.schema.json#/definitions/KitError"},"exhausted":{"type":"boolean"}},"allOf":[{"if":{"required":["error"],"properties":{"error":true}},"then":{"properties":{"status":{"const":"failed"}}}}]}]};const schema214 = {"type":"object","additionalProperties":false,"required":["title","url","snippet"],"properties":{"title":{"type":"string"},"url":{"type":"string","pattern":"^[Hh][Tt][Tt][Pp][Ss]?://[^\\s/?#]+(?:[/?#][^\\s]*)?$"},"snippet":{"type":"string"}}};const schema216 = {"enum":["ok","error","denied","unknown"]};const pattern2 = new RegExp("^[Hh][Tt][Tt][Pp][Ss]?://[^\\s/?#]+(?:[/?#][^\\s]*)?$", "u");function validate193(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;const _errs0 = errors;let valid0 = false;const _errs1 = errors;if(!(((typeof data == "number") && (!(data % 1) && !isNaN(data))) && (isFinite(data)))){const err0 = {instancePath,schemaPath:"#/definitions/U32/type",keyword:"type",params:{type: "integer"},message:"must be integer"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}if((typeof data == "number") && (isFinite(data))){if(data > 4294967295 || isNaN(data)){const err1 = {instancePath,schemaPath:"#/definitions/U32/maximum",keyword:"maximum",params:{comparison: "<=", limit: 4294967295},message:"must be <= 4294967295"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}if(data < 0 || isNaN(data)){const err2 = {instancePath,schemaPath:"#/definitions/U32/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}}var _valid0 = _errs1 === errors;valid0 = valid0 || _valid0;if(!valid0){const _errs4 = errors;if(data !== null){const err3 = {instancePath,schemaPath:"#/anyOf/1/type",keyword:"type",params:{type: "null"},message:"must be null"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}var _valid0 = _errs4 === errors;valid0 = valid0 || _valid0;}if(!valid0){const err4 = {instancePath,schemaPath:"#/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}else {errors = _errs0;if(vErrors !== null){if(_errs0){vErrors.length = _errs0;}else {vErrors = null;}}}validate193.errors = vErrors;return errors === 0;}function validate199(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;if(data && typeof data == "object" && !Array.isArray(data)){if(data.amount === undefined){const err0 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "amount"},message:"must have required property '"+"amount"+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}if(data.currency === undefined){const err1 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "currency"},message:"must have required property '"+"currency"+"'"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}for(const key0 in data){if(!((key0 === "amount") || (key0 === "currency"))){const err2 = {instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}}if(data.amount !== undefined){let data0 = data.amount;if((typeof data0 == "number") && (isFinite(data0))){if(data0 < 0 || isNaN(data0)){const err3 = {instancePath:instancePath+"/amount",schemaPath:"#/properties/amount/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}}else {const err4 = {instancePath:instancePath+"/amount",schemaPath:"#/properties/amount/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}}if(data.currency !== undefined){let data1 = data.currency;if(!((data1 === "USD") || (data1 === "CNY"))){const err5 = {instancePath:instancePath+"/currency",schemaPath:"#/definitions/Currency/enum",keyword:"enum",params:{allowedValues: schema44.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}}}else {const err6 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}validate199.errors = vErrors;return errors === 0;}function validate201(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;if(data && typeof data == "object" && !Array.isArray(data)){if(data.tokens === undefined){const err0 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "tokens"},message:"must have required property '"+"tokens"+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}if(data.contextWindow === undefined){const err1 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "contextWindow"},message:"must have required property '"+"contextWindow"+"'"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}if(data.source === undefined){const err2 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "source"},message:"must have required property '"+"source"+"'"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}if(data.endpointId === undefined){const err3 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "endpointId"},message:"must have required property '"+"endpointId"+"'"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}if(data.modelId === undefined){const err4 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "modelId"},message:"must have required property '"+"modelId"+"'"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}for(const key0 in data){if(!(((((key0 === "tokens") || (key0 === "contextWindow")) || (key0 === "source")) || (key0 === "endpointId")) || (key0 === "modelId"))){const err5 = {instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}}if(data.tokens !== undefined){if(!(validate18(data.tokens, {instancePath:instancePath+"/tokens",parentData:data,parentDataProperty:"tokens",rootData}))){vErrors = vErrors === null ? validate18.errors : vErrors.concat(validate18.errors);errors = vErrors.length;}}if(data.contextWindow !== undefined){if(!(validate18(data.contextWindow, {instancePath:instancePath+"/contextWindow",parentData:data,parentDataProperty:"contextWindow",rootData}))){vErrors = vErrors === null ? validate18.errors : vErrors.concat(validate18.errors);errors = vErrors.length;}}if(data.source !== undefined){let data2 = data.source;if(!(((data2 === "reported") || (data2 === "estimated")) || (data2 === "unknown"))){const err6 = {instancePath:instancePath+"/source",schemaPath:"#/definitions/ContextSource/enum",keyword:"enum",params:{allowedValues: schema20.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}}if(data.endpointId !== undefined){let data3 = data.endpointId;if((typeof data3 !== "string") && (data3 !== null)){const err7 = {instancePath:instancePath+"/endpointId",schemaPath:"#/properties/endpointId/type",keyword:"type",params:{type: schema22.properties.endpointId.type},message:"must be string,null"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}}if(data.modelId !== undefined){let data4 = data.modelId;if((typeof data4 !== "string") && (data4 !== null)){const err8 = {instancePath:instancePath+"/modelId",schemaPath:"#/properties/modelId/type",keyword:"type",params:{type: schema22.properties.modelId.type},message:"must be string,null"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}}}else {const err9 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}validate201.errors = vErrors;return errors === 0;}function validate205(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;if(data && typeof data == "object" && !Array.isArray(data)){if(data.code === undefined){const err0 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "code"},message:"must have required property '"+"code"+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}if(data.message === undefined){const err1 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "message"},message:"must have required property '"+"message"+"'"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}for(const key0 in data){if(!(((key0 === "code") || (key0 === "message")) || (key0 === "details"))){const err2 = {instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}}if(data.code !== undefined){let data0 = data.code;if(!(((((((((((((((data0 === "bad_request") || (data0 === "not_found")) || (data0 === "conflict")) || (data0 === "unsupported")) || (data0 === "cancelled")) || (data0 === "unauthorized")) || (data0 === "forbidden")) || (data0 === "rate_limited")) || (data0 === "upstream")) || (data0 === "timeout")) || (data0 === "network")) || (data0 === "needs_config")) || (data0 === "budget_exceeded")) || (data0 === "incompatible_db")) || (data0 === "internal"))){const err3 = {instancePath:instancePath+"/code",schemaPath:"#/definitions/KitErrorCode/enum",keyword:"enum",params:{allowedValues: schema61.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}}if(data.message !== undefined){if(typeof data.message !== "string"){const err4 = {instancePath:instancePath+"/message",schemaPath:"#/properties/message/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}}if(data.details !== undefined){let data2 = data.details;if(data2 && typeof data2 == "object" && !Array.isArray(data2)){for(const key1 in data2){if(!(((((((key1 === "field") || (key1 === "reason")) || (key1 === "status")) || (key1 === "limit")) || (key1 === "entity")) || (key1 === "port")) || (key1 === "errorId"))){const err5 = {instancePath:instancePath+"/details",schemaPath:"#/definitions/Details/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key1},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}}if(data2.field !== undefined){if(typeof data2.field !== "string"){const err6 = {instancePath:instancePath+"/details/field",schemaPath:"#/definitions/Details/properties/field/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}}if(data2.reason !== undefined){if(typeof data2.reason !== "string"){const err7 = {instancePath:instancePath+"/details/reason",schemaPath:"#/definitions/Details/properties/reason/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}}if(data2.status !== undefined){let data5 = data2.status;if(!(((typeof data5 == "number") && (!(data5 % 1) && !isNaN(data5))) && (isFinite(data5)))){const err8 = {instancePath:instancePath+"/details/status",schemaPath:"#/definitions/Details/properties/status/type",keyword:"type",params:{type: "integer"},message:"must be integer"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}if((typeof data5 == "number") && (isFinite(data5))){if(data5 > 65535 || isNaN(data5)){const err9 = {instancePath:instancePath+"/details/status",schemaPath:"#/definitions/Details/properties/status/maximum",keyword:"maximum",params:{comparison: "<=", limit: 65535},message:"must be <= 65535"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}if(data5 < 0 || isNaN(data5)){const err10 = {instancePath:instancePath+"/details/status",schemaPath:"#/definitions/Details/properties/status/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}}}if(data2.limit !== undefined){let data6 = data2.limit;if(!(((typeof data6 == "number") && (!(data6 % 1) && !isNaN(data6))) && (isFinite(data6)))){const err11 = {instancePath:instancePath+"/details/limit",schemaPath:"#/definitions/Details/properties/limit/type",keyword:"type",params:{type: "integer"},message:"must be integer"};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}if((typeof data6 == "number") && (isFinite(data6))){if(data6 > 9007199254740991 || isNaN(data6)){const err12 = {instancePath:instancePath+"/details/limit",schemaPath:"#/definitions/Details/properties/limit/maximum",keyword:"maximum",params:{comparison: "<=", limit: 9007199254740991},message:"must be <= 9007199254740991"};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}if(data6 < 0 || isNaN(data6)){const err13 = {instancePath:instancePath+"/details/limit",schemaPath:"#/definitions/Details/properties/limit/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}}}if(data2.entity !== undefined){if(typeof data2.entity !== "string"){const err14 = {instancePath:instancePath+"/details/entity",schemaPath:"#/definitions/Details/properties/entity/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err14];}else {vErrors.push(err14);}errors++;}}if(data2.port !== undefined){let data8 = data2.port;if(!(((typeof data8 == "number") && (!(data8 % 1) && !isNaN(data8))) && (isFinite(data8)))){const err15 = {instancePath:instancePath+"/details/port",schemaPath:"#/definitions/Details/properties/port/type",keyword:"type",params:{type: "integer"},message:"must be integer"};if(vErrors === null){vErrors = [err15];}else {vErrors.push(err15);}errors++;}if((typeof data8 == "number") && (isFinite(data8))){if(data8 > 65535 || isNaN(data8)){const err16 = {instancePath:instancePath+"/details/port",schemaPath:"#/definitions/Details/properties/port/maximum",keyword:"maximum",params:{comparison: "<=", limit: 65535},message:"must be <= 65535"};if(vErrors === null){vErrors = [err16];}else {vErrors.push(err16);}errors++;}if(data8 < 0 || isNaN(data8)){const err17 = {instancePath:instancePath+"/details/port",schemaPath:"#/definitions/Details/properties/port/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err17];}else {vErrors.push(err17);}errors++;}}}if(data2.errorId !== undefined){if(typeof data2.errorId !== "string"){const err18 = {instancePath:instancePath+"/details/errorId",schemaPath:"#/definitions/Details/properties/errorId/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err18];}else {vErrors.push(err18);}errors++;}}}else {const err19 = {instancePath:instancePath+"/details",schemaPath:"#/definitions/Details/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err19];}else {vErrors.push(err19);}errors++;}}}else {const err20 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err20];}else {vErrors.push(err20);}errors++;}validate205.errors = vErrors;return errors === 0;}function validate192(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;const _errs0 = errors;let valid0 = false;let passing0 = null;const _errs1 = errors;if(data && typeof data == "object" && !Array.isArray(data)){if(data.kind === undefined){const err0 = {instancePath,schemaPath:"#/oneOf/0/required",keyword:"required",params:{missingProperty: "kind"},message:"must have required property '"+"kind"+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}for(const key0 in data){if(!(key0 === "kind")){const err1 = {instancePath,schemaPath:"#/oneOf/0/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}}if(data.kind !== undefined){if("search_start" !== data.kind){const err2 = {instancePath:instancePath+"/kind",schemaPath:"#/oneOf/0/properties/kind/const",keyword:"const",params:{allowedValue: "search_start"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}}}else {const err3 = {instancePath,schemaPath:"#/oneOf/0/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}var _valid0 = _errs1 === errors;if(_valid0){valid0 = true;passing0 = 0;}const _errs5 = errors;if(data && typeof data == "object" && !Array.isArray(data)){if(data.kind === undefined){const err4 = {instancePath,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty: "kind"},message:"must have required property '"+"kind"+"'"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}if(data.query === undefined){const err5 = {instancePath,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty: "query"},message:"must have required property '"+"query"+"'"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}if(data.provider === undefined){const err6 = {instancePath,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty: "provider"},message:"must have required property '"+"provider"+"'"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}if(data.hits === undefined){const err7 = {instancePath,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty: "hits"},message:"must have required property '"+"hits"+"'"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}for(const key1 in data){if(!((((key1 === "kind") || (key1 === "query")) || (key1 === "provider")) || (key1 === "hits"))){const err8 = {instancePath,schemaPath:"#/oneOf/1/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key1},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}}if(data.kind !== undefined){if("search_result" !== data.kind){const err9 = {instancePath:instancePath+"/kind",schemaPath:"#/oneOf/1/properties/kind/const",keyword:"const",params:{allowedValue: "search_result"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}}if(data.query !== undefined){if(typeof data.query !== "string"){const err10 = {instancePath:instancePath+"/query",schemaPath:"#/oneOf/1/properties/query/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}}if(data.provider !== undefined){if(typeof data.provider !== "string"){const err11 = {instancePath:instancePath+"/provider",schemaPath:"#/oneOf/1/properties/provider/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}}if(data.hits !== undefined){let data4 = data.hits;if(Array.isArray(data4)){const len0 = data4.length;for(let i0=0; i0<len0; i0++){let data5 = data4[i0];if(data5 && typeof data5 == "object" && !Array.isArray(data5)){if(data5.title === undefined){const err12 = {instancePath:instancePath+"/hits/" + i0,schemaPath:"common.schema.json#/definitions/SearchHit/required",keyword:"required",params:{missingProperty: "title"},message:"must have required property '"+"title"+"'"};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}if(data5.url === undefined){const err13 = {instancePath:instancePath+"/hits/" + i0,schemaPath:"common.schema.json#/definitions/SearchHit/required",keyword:"required",params:{missingProperty: "url"},message:"must have required property '"+"url"+"'"};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}if(data5.snippet === undefined){const err14 = {instancePath:instancePath+"/hits/" + i0,schemaPath:"common.schema.json#/definitions/SearchHit/required",keyword:"required",params:{missingProperty: "snippet"},message:"must have required property '"+"snippet"+"'"};if(vErrors === null){vErrors = [err14];}else {vErrors.push(err14);}errors++;}for(const key2 in data5){if(!(((key2 === "title") || (key2 === "url")) || (key2 === "snippet"))){const err15 = {instancePath:instancePath+"/hits/" + i0,schemaPath:"common.schema.json#/definitions/SearchHit/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key2},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err15];}else {vErrors.push(err15);}errors++;}}if(data5.title !== undefined){if(typeof data5.title !== "string"){const err16 = {instancePath:instancePath+"/hits/" + i0+"/title",schemaPath:"common.schema.json#/definitions/SearchHit/properties/title/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err16];}else {vErrors.push(err16);}errors++;}}if(data5.url !== undefined){let data7 = data5.url;if(typeof data7 === "string"){if(!pattern2.test(data7)){const err17 = {instancePath:instancePath+"/hits/" + i0+"/url",schemaPath:"common.schema.json#/definitions/SearchHit/properties/url/pattern",keyword:"pattern",params:{pattern: "^[Hh][Tt][Tt][Pp][Ss]?://[^\\s/?#]+(?:[/?#][^\\s]*)?$"},message:"must match pattern \""+"^[Hh][Tt][Tt][Pp][Ss]?://[^\\s/?#]+(?:[/?#][^\\s]*)?$"+"\""};if(vErrors === null){vErrors = [err17];}else {vErrors.push(err17);}errors++;}}else {const err18 = {instancePath:instancePath+"/hits/" + i0+"/url",schemaPath:"common.schema.json#/definitions/SearchHit/properties/url/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err18];}else {vErrors.push(err18);}errors++;}}if(data5.snippet !== undefined){if(typeof data5.snippet !== "string"){const err19 = {instancePath:instancePath+"/hits/" + i0+"/snippet",schemaPath:"common.schema.json#/definitions/SearchHit/properties/snippet/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err19];}else {vErrors.push(err19);}errors++;}}}else {const err20 = {instancePath:instancePath+"/hits/" + i0,schemaPath:"common.schema.json#/definitions/SearchHit/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err20];}else {vErrors.push(err20);}errors++;}}}else {const err21 = {instancePath:instancePath+"/hits",schemaPath:"#/oneOf/1/properties/hits/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err21];}else {vErrors.push(err21);}errors++;}}}else {const err22 = {instancePath,schemaPath:"#/oneOf/1/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err22];}else {vErrors.push(err22);}errors++;}var _valid0 = _errs5 === errors;if(_valid0 && valid0){valid0 = false;passing0 = [passing0, 1];}else {if(_valid0){valid0 = true;passing0 = 1;}const _errs25 = errors;if(data && typeof data == "object" && !Array.isArray(data)){if(data.kind === undefined){const err23 = {instancePath,schemaPath:"#/oneOf/2/required",keyword:"required",params:{missingProperty: "kind"},message:"must have required property '"+"kind"+"'"};if(vErrors === null){vErrors = [err23];}else {vErrors.push(err23);}errors++;}if(data.round === undefined){const err24 = {instancePath,schemaPath:"#/oneOf/2/required",keyword:"required",params:{missingProperty: "round"},message:"must have required property '"+"round"+"'"};if(vErrors === null){vErrors = [err24];}else {vErrors.push(err24);}errors++;}for(const key3 in data){if(!((key3 === "kind") || (key3 === "round"))){const err25 = {instancePath,schemaPath:"#/oneOf/2/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key3},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err25];}else {vErrors.push(err25);}errors++;}}if(data.kind !== undefined){if("round_start" !== data.kind){const err26 = {instancePath:instancePath+"/kind",schemaPath:"#/oneOf/2/properties/kind/const",keyword:"const",params:{allowedValue: "round_start"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err26];}else {vErrors.push(err26);}errors++;}}if(data.round !== undefined){let data10 = data.round;if(!(((typeof data10 == "number") && (!(data10 % 1) && !isNaN(data10))) && (isFinite(data10)))){const err27 = {instancePath:instancePath+"/round",schemaPath:"common.schema.json#/definitions/U32/type",keyword:"type",params:{type: "integer"},message:"must be integer"};if(vErrors === null){vErrors = [err27];}else {vErrors.push(err27);}errors++;}if((typeof data10 == "number") && (isFinite(data10))){if(data10 > 4294967295 || isNaN(data10)){const err28 = {instancePath:instancePath+"/round",schemaPath:"common.schema.json#/definitions/U32/maximum",keyword:"maximum",params:{comparison: "<=", limit: 4294967295},message:"must be <= 4294967295"};if(vErrors === null){vErrors = [err28];}else {vErrors.push(err28);}errors++;}if(data10 < 0 || isNaN(data10)){const err29 = {instancePath:instancePath+"/round",schemaPath:"common.schema.json#/definitions/U32/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err29];}else {vErrors.push(err29);}errors++;}}}}else {const err30 = {instancePath,schemaPath:"#/oneOf/2/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err30];}else {vErrors.push(err30);}errors++;}var _valid0 = _errs25 === errors;if(_valid0 && valid0){valid0 = false;passing0 = [passing0, 2];}else {if(_valid0){valid0 = true;passing0 = 2;}const _errs32 = errors;if(data && typeof data == "object" && !Array.isArray(data)){if(data.kind === undefined){const err31 = {instancePath,schemaPath:"#/oneOf/3/required",keyword:"required",params:{missingProperty: "kind"},message:"must have required property '"+"kind"+"'"};if(vErrors === null){vErrors = [err31];}else {vErrors.push(err31);}errors++;}if(data.text === undefined){const err32 = {instancePath,schemaPath:"#/oneOf/3/required",keyword:"required",params:{missingProperty: "text"},message:"must have required property '"+"text"+"'"};if(vErrors === null){vErrors = [err32];}else {vErrors.push(err32);}errors++;}for(const key4 in data){if(!((key4 === "kind") || (key4 === "text"))){const err33 = {instancePath,schemaPath:"#/oneOf/3/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key4},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err33];}else {vErrors.push(err33);}errors++;}}if(data.kind !== undefined){if("text_delta" !== data.kind){const err34 = {instancePath:instancePath+"/kind",schemaPath:"#/oneOf/3/properties/kind/const",keyword:"const",params:{allowedValue: "text_delta"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err34];}else {vErrors.push(err34);}errors++;}}if(data.text !== undefined){if(typeof data.text !== "string"){const err35 = {instancePath:instancePath+"/text",schemaPath:"#/oneOf/3/properties/text/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err35];}else {vErrors.push(err35);}errors++;}}}else {const err36 = {instancePath,schemaPath:"#/oneOf/3/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err36];}else {vErrors.push(err36);}errors++;}var _valid0 = _errs32 === errors;if(_valid0 && valid0){valid0 = false;passing0 = [passing0, 3];}else {if(_valid0){valid0 = true;passing0 = 3;}const _errs38 = errors;if(data && typeof data == "object" && !Array.isArray(data)){if(data.kind === undefined){const err37 = {instancePath,schemaPath:"#/oneOf/4/required",keyword:"required",params:{missingProperty: "kind"},message:"must have required property '"+"kind"+"'"};if(vErrors === null){vErrors = [err37];}else {vErrors.push(err37);}errors++;}if(data.text === undefined){const err38 = {instancePath,schemaPath:"#/oneOf/4/required",keyword:"required",params:{missingProperty: "text"},message:"must have required property '"+"text"+"'"};if(vErrors === null){vErrors = [err38];}else {vErrors.push(err38);}errors++;}for(const key5 in data){if(!((key5 === "kind") || (key5 === "text"))){const err39 = {instancePath,schemaPath:"#/oneOf/4/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key5},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err39];}else {vErrors.push(err39);}errors++;}}if(data.kind !== undefined){if("reasoning_delta" !== data.kind){const err40 = {instancePath:instancePath+"/kind",schemaPath:"#/oneOf/4/properties/kind/const",keyword:"const",params:{allowedValue: "reasoning_delta"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err40];}else {vErrors.push(err40);}errors++;}}if(data.text !== undefined){if(typeof data.text !== "string"){const err41 = {instancePath:instancePath+"/text",schemaPath:"#/oneOf/4/properties/text/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err41];}else {vErrors.push(err41);}errors++;}}}else {const err42 = {instancePath,schemaPath:"#/oneOf/4/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err42];}else {vErrors.push(err42);}errors++;}var _valid0 = _errs38 === errors;if(_valid0 && valid0){valid0 = false;passing0 = [passing0, 4];}else {if(_valid0){valid0 = true;passing0 = 4;}const _errs44 = errors;if(data && typeof data == "object" && !Array.isArray(data)){if(data.kind === undefined){const err43 = {instancePath,schemaPath:"#/oneOf/5/required",keyword:"required",params:{missingProperty: "kind"},message:"must have required property '"+"kind"+"'"};if(vErrors === null){vErrors = [err43];}else {vErrors.push(err43);}errors++;}if(data.callId === undefined){const err44 = {instancePath,schemaPath:"#/oneOf/5/required",keyword:"required",params:{missingProperty: "callId"},message:"must have required property '"+"callId"+"'"};if(vErrors === null){vErrors = [err44];}else {vErrors.push(err44);}errors++;}if(data.name === undefined){const err45 = {instancePath,schemaPath:"#/oneOf/5/required",keyword:"required",params:{missingProperty: "name"},message:"must have required property '"+"name"+"'"};if(vErrors === null){vErrors = [err45];}else {vErrors.push(err45);}errors++;}if(data.source === undefined){const err46 = {instancePath,schemaPath:"#/oneOf/5/required",keyword:"required",params:{missingProperty: "source"},message:"must have required property '"+"source"+"'"};if(vErrors === null){vErrors = [err46];}else {vErrors.push(err46);}errors++;}for(const key6 in data){if(!(((((key6 === "kind") || (key6 === "callId")) || (key6 === "name")) || (key6 === "source")) || (key6 === "server"))){const err47 = {instancePath,schemaPath:"#/oneOf/5/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key6},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err47];}else {vErrors.push(err47);}errors++;}}if(data.kind !== undefined){if("tool_call" !== data.kind){const err48 = {instancePath:instancePath+"/kind",schemaPath:"#/oneOf/5/properties/kind/const",keyword:"const",params:{allowedValue: "tool_call"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err48];}else {vErrors.push(err48);}errors++;}}if(data.callId !== undefined){if(typeof data.callId !== "string"){const err49 = {instancePath:instancePath+"/callId",schemaPath:"#/oneOf/5/properties/callId/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err49];}else {vErrors.push(err49);}errors++;}}if(data.name !== undefined){if(typeof data.name !== "string"){const err50 = {instancePath:instancePath+"/name",schemaPath:"#/oneOf/5/properties/name/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err50];}else {vErrors.push(err50);}errors++;}}if(data.source !== undefined){let data18 = data.source;if(!((data18 === "host") || (data18 === "mcp"))){const err51 = {instancePath:instancePath+"/source",schemaPath:"#/oneOf/5/properties/source/enum",keyword:"enum",params:{allowedValues: schema213.oneOf[5].properties.source.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err51];}else {vErrors.push(err51);}errors++;}}if(data.server !== undefined){if(typeof data.server !== "string"){const err52 = {instancePath:instancePath+"/server",schemaPath:"#/oneOf/5/properties/server/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err52];}else {vErrors.push(err52);}errors++;}}}else {const err53 = {instancePath,schemaPath:"#/oneOf/5/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err53];}else {vErrors.push(err53);}errors++;}var _valid0 = _errs44 === errors;if(_valid0 && valid0){valid0 = false;passing0 = [passing0, 5];}else {if(_valid0){valid0 = true;passing0 = 5;}const _errs55 = errors;if(data && typeof data == "object" && !Array.isArray(data)){if(data.kind === undefined){const err54 = {instancePath,schemaPath:"#/oneOf/6/required",keyword:"required",params:{missingProperty: "kind"},message:"must have required property '"+"kind"+"'"};if(vErrors === null){vErrors = [err54];}else {vErrors.push(err54);}errors++;}if(data.callId === undefined){const err55 = {instancePath,schemaPath:"#/oneOf/6/required",keyword:"required",params:{missingProperty: "callId"},message:"must have required property '"+"callId"+"'"};if(vErrors === null){vErrors = [err55];}else {vErrors.push(err55);}errors++;}if(data.name === undefined){const err56 = {instancePath,schemaPath:"#/oneOf/6/required",keyword:"required",params:{missingProperty: "name"},message:"must have required property '"+"name"+"'"};if(vErrors === null){vErrors = [err56];}else {vErrors.push(err56);}errors++;}if(data.argsPreview === undefined){const err57 = {instancePath,schemaPath:"#/oneOf/6/required",keyword:"required",params:{missingProperty: "argsPreview"},message:"must have required property '"+"argsPreview"+"'"};if(vErrors === null){vErrors = [err57];}else {vErrors.push(err57);}errors++;}for(const key7 in data){if(!((((key7 === "kind") || (key7 === "callId")) || (key7 === "name")) || (key7 === "argsPreview"))){const err58 = {instancePath,schemaPath:"#/oneOf/6/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key7},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err58];}else {vErrors.push(err58);}errors++;}}if(data.kind !== undefined){if("approval_required" !== data.kind){const err59 = {instancePath:instancePath+"/kind",schemaPath:"#/oneOf/6/properties/kind/const",keyword:"const",params:{allowedValue: "approval_required"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err59];}else {vErrors.push(err59);}errors++;}}if(data.callId !== undefined){if(typeof data.callId !== "string"){const err60 = {instancePath:instancePath+"/callId",schemaPath:"#/oneOf/6/properties/callId/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err60];}else {vErrors.push(err60);}errors++;}}if(data.name !== undefined){if(typeof data.name !== "string"){const err61 = {instancePath:instancePath+"/name",schemaPath:"#/oneOf/6/properties/name/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err61];}else {vErrors.push(err61);}errors++;}}if(data.argsPreview !== undefined){let data23 = data.argsPreview;if(typeof data23 === "string"){if(func2(data23) > 2000){const err62 = {instancePath:instancePath+"/argsPreview",schemaPath:"#/oneOf/6/properties/argsPreview/maxLength",keyword:"maxLength",params:{limit: 2000},message:"must NOT have more than 2000 characters"};if(vErrors === null){vErrors = [err62];}else {vErrors.push(err62);}errors++;}}else {const err63 = {instancePath:instancePath+"/argsPreview",schemaPath:"#/oneOf/6/properties/argsPreview/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err63];}else {vErrors.push(err63);}errors++;}}}else {const err64 = {instancePath,schemaPath:"#/oneOf/6/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err64];}else {vErrors.push(err64);}errors++;}var _valid0 = _errs55 === errors;if(_valid0 && valid0){valid0 = false;passing0 = [passing0, 6];}else {if(_valid0){valid0 = true;passing0 = 6;}const _errs65 = errors;if(data && typeof data == "object" && !Array.isArray(data)){if(data.kind === undefined){const err65 = {instancePath,schemaPath:"#/oneOf/7/required",keyword:"required",params:{missingProperty: "kind"},message:"must have required property '"+"kind"+"'"};if(vErrors === null){vErrors = [err65];}else {vErrors.push(err65);}errors++;}if(data.callId === undefined){const err66 = {instancePath,schemaPath:"#/oneOf/7/required",keyword:"required",params:{missingProperty: "callId"},message:"must have required property '"+"callId"+"'"};if(vErrors === null){vErrors = [err66];}else {vErrors.push(err66);}errors++;}if(data.outcome === undefined){const err67 = {instancePath,schemaPath:"#/oneOf/7/required",keyword:"required",params:{missingProperty: "outcome"},message:"must have required property '"+"outcome"+"'"};if(vErrors === null){vErrors = [err67];}else {vErrors.push(err67);}errors++;}if(data.summary === undefined){const err68 = {instancePath,schemaPath:"#/oneOf/7/required",keyword:"required",params:{missingProperty: "summary"},message:"must have required property '"+"summary"+"'"};if(vErrors === null){vErrors = [err68];}else {vErrors.push(err68);}errors++;}for(const key8 in data){if(!(((((key8 === "kind") || (key8 === "callId")) || (key8 === "outcome")) || (key8 === "summary")) || (key8 === "payload"))){const err69 = {instancePath,schemaPath:"#/oneOf/7/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key8},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err69];}else {vErrors.push(err69);}errors++;}}if(data.kind !== undefined){if("tool_result" !== data.kind){const err70 = {instancePath:instancePath+"/kind",schemaPath:"#/oneOf/7/properties/kind/const",keyword:"const",params:{allowedValue: "tool_result"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err70];}else {vErrors.push(err70);}errors++;}}if(data.callId !== undefined){if(typeof data.callId !== "string"){const err71 = {instancePath:instancePath+"/callId",schemaPath:"#/oneOf/7/properties/callId/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err71];}else {vErrors.push(err71);}errors++;}}if(data.outcome !== undefined){let data26 = data.outcome;if(!((((data26 === "ok") || (data26 === "error")) || (data26 === "denied")) || (data26 === "unknown"))){const err72 = {instancePath:instancePath+"/outcome",schemaPath:"#/definitions/ToolOutcome/enum",keyword:"enum",params:{allowedValues: schema216.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err72];}else {vErrors.push(err72);}errors++;}}if(data.summary !== undefined){if(typeof data.summary !== "string"){const err73 = {instancePath:instancePath+"/summary",schemaPath:"#/oneOf/7/properties/summary/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err73];}else {vErrors.push(err73);}errors++;}}}else {const err74 = {instancePath,schemaPath:"#/oneOf/7/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err74];}else {vErrors.push(err74);}errors++;}var _valid0 = _errs65 === errors;if(_valid0 && valid0){valid0 = false;passing0 = [passing0, 7];}else {if(_valid0){valid0 = true;passing0 = 7;}const _errs75 = errors;if(data && typeof data == "object" && !Array.isArray(data)){if(data.kind === undefined){const err75 = {instancePath,schemaPath:"#/oneOf/8/required",keyword:"required",params:{missingProperty: "kind"},message:"must have required property '"+"kind"+"'"};if(vErrors === null){vErrors = [err75];}else {vErrors.push(err75);}errors++;}if(data.inputTokens === undefined){const err76 = {instancePath,schemaPath:"#/oneOf/8/required",keyword:"required",params:{missingProperty: "inputTokens"},message:"must have required property '"+"inputTokens"+"'"};if(vErrors === null){vErrors = [err76];}else {vErrors.push(err76);}errors++;}if(data.outputTokens === undefined){const err77 = {instancePath,schemaPath:"#/oneOf/8/required",keyword:"required",params:{missingProperty: "outputTokens"},message:"must have required property '"+"outputTokens"+"'"};if(vErrors === null){vErrors = [err77];}else {vErrors.push(err77);}errors++;}if(data.cacheReadTokens === undefined){const err78 = {instancePath,schemaPath:"#/oneOf/8/required",keyword:"required",params:{missingProperty: "cacheReadTokens"},message:"must have required property '"+"cacheReadTokens"+"'"};if(vErrors === null){vErrors = [err78];}else {vErrors.push(err78);}errors++;}if(data.cacheWriteTokens === undefined){const err79 = {instancePath,schemaPath:"#/oneOf/8/required",keyword:"required",params:{missingProperty: "cacheWriteTokens"},message:"must have required property '"+"cacheWriteTokens"+"'"};if(vErrors === null){vErrors = [err79];}else {vErrors.push(err79);}errors++;}if(data.reasoningTokens === undefined){const err80 = {instancePath,schemaPath:"#/oneOf/8/required",keyword:"required",params:{missingProperty: "reasoningTokens"},message:"must have required property '"+"reasoningTokens"+"'"};if(vErrors === null){vErrors = [err80];}else {vErrors.push(err80);}errors++;}if(data.cost === undefined){const err81 = {instancePath,schemaPath:"#/oneOf/8/required",keyword:"required",params:{missingProperty: "cost"},message:"must have required property '"+"cost"+"'"};if(vErrors === null){vErrors = [err81];}else {vErrors.push(err81);}errors++;}for(const key9 in data){if(!(((((((key9 === "kind") || (key9 === "inputTokens")) || (key9 === "outputTokens")) || (key9 === "cacheReadTokens")) || (key9 === "cacheWriteTokens")) || (key9 === "reasoningTokens")) || (key9 === "cost"))){const err82 = {instancePath,schemaPath:"#/oneOf/8/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key9},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err82];}else {vErrors.push(err82);}errors++;}}if(data.kind !== undefined){if("usage" !== data.kind){const err83 = {instancePath:instancePath+"/kind",schemaPath:"#/oneOf/8/properties/kind/const",keyword:"const",params:{allowedValue: "usage"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err83];}else {vErrors.push(err83);}errors++;}}if(data.inputTokens !== undefined){if(!(validate193(data.inputTokens, {instancePath:instancePath+"/inputTokens",parentData:data,parentDataProperty:"inputTokens",rootData}))){vErrors = vErrors === null ? validate193.errors : vErrors.concat(validate193.errors);errors = vErrors.length;}}if(data.outputTokens !== undefined){if(!(validate193(data.outputTokens, {instancePath:instancePath+"/outputTokens",parentData:data,parentDataProperty:"outputTokens",rootData}))){vErrors = vErrors === null ? validate193.errors : vErrors.concat(validate193.errors);errors = vErrors.length;}}if(data.cacheReadTokens !== undefined){if(!(validate193(data.cacheReadTokens, {instancePath:instancePath+"/cacheReadTokens",parentData:data,parentDataProperty:"cacheReadTokens",rootData}))){vErrors = vErrors === null ? validate193.errors : vErrors.concat(validate193.errors);errors = vErrors.length;}}if(data.cacheWriteTokens !== undefined){if(!(validate193(data.cacheWriteTokens, {instancePath:instancePath+"/cacheWriteTokens",parentData:data,parentDataProperty:"cacheWriteTokens",rootData}))){vErrors = vErrors === null ? validate193.errors : vErrors.concat(validate193.errors);errors = vErrors.length;}}if(data.reasoningTokens !== undefined){if(!(validate193(data.reasoningTokens, {instancePath:instancePath+"/reasoningTokens",parentData:data,parentDataProperty:"reasoningTokens",rootData}))){vErrors = vErrors === null ? validate193.errors : vErrors.concat(validate193.errors);errors = vErrors.length;}}if(data.cost !== undefined){let data34 = data.cost;const _errs85 = errors;let valid16 = false;const _errs86 = errors;if(!(validate199(data34, {instancePath:instancePath+"/cost",parentData:data,parentDataProperty:"cost",rootData}))){vErrors = vErrors === null ? validate199.errors : vErrors.concat(validate199.errors);errors = vErrors.length;}var _valid1 = _errs86 === errors;valid16 = valid16 || _valid1;if(!valid16){const _errs87 = errors;if(data34 !== null){const err84 = {instancePath:instancePath+"/cost",schemaPath:"#/oneOf/8/properties/cost/anyOf/1/type",keyword:"type",params:{type: "null"},message:"must be null"};if(vErrors === null){vErrors = [err84];}else {vErrors.push(err84);}errors++;}var _valid1 = _errs87 === errors;valid16 = valid16 || _valid1;}if(!valid16){const err85 = {instancePath:instancePath+"/cost",schemaPath:"#/oneOf/8/properties/cost/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err85];}else {vErrors.push(err85);}errors++;}else {errors = _errs85;if(vErrors !== null){if(_errs85){vErrors.length = _errs85;}else {vErrors = null;}}}}}else {const err86 = {instancePath,schemaPath:"#/oneOf/8/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err86];}else {vErrors.push(err86);}errors++;}var _valid0 = _errs75 === errors;if(_valid0 && valid0){valid0 = false;passing0 = [passing0, 8];}else {if(_valid0){valid0 = true;passing0 = 8;}const _errs89 = errors;if(data && typeof data == "object" && !Array.isArray(data)){if(data.kind === undefined){const err87 = {instancePath,schemaPath:"#/oneOf/9/required",keyword:"required",params:{missingProperty: "kind"},message:"must have required property '"+"kind"+"'"};if(vErrors === null){vErrors = [err87];}else {vErrors.push(err87);}errors++;}if(data.usage === undefined){const err88 = {instancePath,schemaPath:"#/oneOf/9/required",keyword:"required",params:{missingProperty: "usage"},message:"must have required property '"+"usage"+"'"};if(vErrors === null){vErrors = [err88];}else {vErrors.push(err88);}errors++;}for(const key10 in data){if(!((key10 === "kind") || (key10 === "usage"))){const err89 = {instancePath,schemaPath:"#/oneOf/9/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key10},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err89];}else {vErrors.push(err89);}errors++;}}if(data.kind !== undefined){if("context" !== data.kind){const err90 = {instancePath:instancePath+"/kind",schemaPath:"#/oneOf/9/properties/kind/const",keyword:"const",params:{allowedValue: "context"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err90];}else {vErrors.push(err90);}errors++;}}if(data.usage !== undefined){if(!(validate201(data.usage, {instancePath:instancePath+"/usage",parentData:data,parentDataProperty:"usage",rootData}))){vErrors = vErrors === null ? validate201.errors : vErrors.concat(validate201.errors);errors = vErrors.length;}}}else {const err91 = {instancePath,schemaPath:"#/oneOf/9/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err91];}else {vErrors.push(err91);}errors++;}var _valid0 = _errs89 === errors;if(_valid0 && valid0){valid0 = false;passing0 = [passing0, 9];}else {if(_valid0){valid0 = true;passing0 = 9;}const _errs94 = errors;const _errs97 = errors;let valid19 = true;const _errs98 = errors;if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if((data.error === undefined) && (missing0 = "error")){const err92 = {};if(vErrors === null){vErrors = [err92];}else {vErrors.push(err92);}errors++;}}var _valid2 = _errs98 === errors;errors = _errs97;if(vErrors !== null){if(_errs97){vErrors.length = _errs97;}else {vErrors = null;}}if(_valid2){const _errs99 = errors;if(data && typeof data == "object" && !Array.isArray(data)){if(data.status !== undefined){if("failed" !== data.status){const err93 = {instancePath:instancePath+"/status",schemaPath:"#/oneOf/10/allOf/0/then/properties/status/const",keyword:"const",params:{allowedValue: "failed"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err93];}else {vErrors.push(err93);}errors++;}}}var _valid2 = _errs99 === errors;valid19 = _valid2;}if(!valid19){const err94 = {instancePath,schemaPath:"#/oneOf/10/allOf/0/if",keyword:"if",params:{failingKeyword: "then"},message:"must match \"then\" schema"};if(vErrors === null){vErrors = [err94];}else {vErrors.push(err94);}errors++;}if(data && typeof data == "object" && !Array.isArray(data)){if(data.kind === undefined){const err95 = {instancePath,schemaPath:"#/oneOf/10/required",keyword:"required",params:{missingProperty: "kind"},message:"must have required property '"+"kind"+"'"};if(vErrors === null){vErrors = [err95];}else {vErrors.push(err95);}errors++;}if(data.status === undefined){const err96 = {instancePath,schemaPath:"#/oneOf/10/required",keyword:"required",params:{missingProperty: "status"},message:"must have required property '"+"status"+"'"};if(vErrors === null){vErrors = [err96];}else {vErrors.push(err96);}errors++;}for(const key11 in data){if(!((((key11 === "kind") || (key11 === "status")) || (key11 === "error")) || (key11 === "exhausted"))){const err97 = {instancePath,schemaPath:"#/oneOf/10/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key11},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err97];}else {vErrors.push(err97);}errors++;}}if(data.kind !== undefined){if("end" !== data.kind){const err98 = {instancePath:instancePath+"/kind",schemaPath:"#/oneOf/10/properties/kind/const",keyword:"const",params:{allowedValue: "end"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err98];}else {vErrors.push(err98);}errors++;}}if(data.status !== undefined){let data39 = data.status;if(!(((data39 === "completed") || (data39 === "failed")) || (data39 === "cancelled"))){const err99 = {instancePath:instancePath+"/status",schemaPath:"#/definitions/EndStatus/enum",keyword:"enum",params:{allowedValues: schema65.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err99];}else {vErrors.push(err99);}errors++;}}if(data.error !== undefined){if(!(validate205(data.error, {instancePath:instancePath+"/error",parentData:data,parentDataProperty:"error",rootData}))){vErrors = vErrors === null ? validate205.errors : vErrors.concat(validate205.errors);errors = vErrors.length;}}if(data.exhausted !== undefined){if(typeof data.exhausted !== "boolean"){const err100 = {instancePath:instancePath+"/exhausted",schemaPath:"#/oneOf/10/properties/exhausted/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"};if(vErrors === null){vErrors = [err100];}else {vErrors.push(err100);}errors++;}}}else {const err101 = {instancePath,schemaPath:"#/oneOf/10/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err101];}else {vErrors.push(err101);}errors++;}var _valid0 = _errs94 === errors;if(_valid0 && valid0){valid0 = false;passing0 = [passing0, 10];}else {if(_valid0){valid0 = true;passing0 = 10;}}}}}}}}}}}if(!valid0){const err102 = {instancePath,schemaPath:"#/oneOf",keyword:"oneOf",params:{passingSchemas: passing0},message:"must match exactly one schema in oneOf"};if(vErrors === null){vErrors = [err102];}else {vErrors.push(err102);}errors++;}else {errors = _errs0;if(vErrors !== null){if(_errs0){vErrors.length = _errs0;}else {vErrors = null;}}}validate192.errors = vErrors;return errors === 0;}function validate191(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="aether:validator:RunEvent" */;let vErrors = null;let errors = 0;if(!(validate192(data, {instancePath,parentData,parentDataProperty,rootData}))){vErrors = vErrors === null ? validate192.errors : vErrors.concat(validate192.errors);errors = vErrors.length;}validate191.errors = vErrors;return errors === 0;}export const validateRunRequest = validate208;const schema227 = {"$id":"aether:validator:RunRequest","$ref":"https://aether.local/contracts/v1/run.schema.json#/definitions/RunRequest"};const schema228 = {"type":"object","additionalProperties":false,"required":["purpose","skills","input","regenerate","language"],"properties":{"purpose":{"type":"string"},"model":{"anyOf":[{"$ref":"common.schema.json#/definitions/ModelRef"},{"type":"null"}]},"skills":{"type":"array","maxItems":20,"items":{"$ref":"common.schema.json#/definitions/SkillRef"}},"context":{"anyOf":[{"$ref":"common.schema.json#/definitions/ContextRef"},{"type":"null"}]},"input":{"type":"string","maxLength":100000},"images":{"type":"array","maxItems":4,"items":{"$ref":"common.schema.json#/definitions/ImagePart"}},"conversationId":{"$ref":"common.schema.json#/definitions/NullableId"},"scope":{"type":["string","null"],"maxLength":200},"webSearch":{"type":"boolean"},"regenerate":{"type":"boolean"},"replyToId":{"$ref":"common.schema.json#/definitions/NullableId"},"retryTurnId":{"$ref":"common.schema.json#/definitions/NullableId"},"translateTurnId":{"$ref":"common.schema.json#/definitions/NullableId"},"targetLanguage":{"type":["string","null"],"minLength":1,"maxLength":80,"pattern":"\\S"},"language":{"type":"string","minLength":1,"maxLength":80},"reasoningEffort":{"$ref":"common.schema.json#/definitions/ReasoningEffort"},"permissionMode":{"$ref":"common.schema.json#/definitions/PermissionMode"},"generateImage":{"type":"boolean"}}};const schema230 = {"type":"object","additionalProperties":false,"required":["id","revision"],"properties":{"id":{"type":"string"},"revision":{"$ref":"#/definitions/U32"}}};function validate210(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;if(data && typeof data == "object" && !Array.isArray(data)){if(data.id === undefined){const err0 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "id"},message:"must have required property '"+"id"+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}if(data.revision === undefined){const err1 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "revision"},message:"must have required property '"+"revision"+"'"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}for(const key0 in data){if(!((key0 === "id") || (key0 === "revision"))){const err2 = {instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}}if(data.id !== undefined){if(typeof data.id !== "string"){const err3 = {instancePath:instancePath+"/id",schemaPath:"#/properties/id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}}if(data.revision !== undefined){let data1 = data.revision;if(!(((typeof data1 == "number") && (!(data1 % 1) && !isNaN(data1))) && (isFinite(data1)))){const err4 = {instancePath:instancePath+"/revision",schemaPath:"#/definitions/U32/type",keyword:"type",params:{type: "integer"},message:"must be integer"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}if((typeof data1 == "number") && (isFinite(data1))){if(data1 > 4294967295 || isNaN(data1)){const err5 = {instancePath:instancePath+"/revision",schemaPath:"#/definitions/U32/maximum",keyword:"maximum",params:{comparison: "<=", limit: 4294967295},message:"must be <= 4294967295"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}if(data1 < 0 || isNaN(data1)){const err6 = {instancePath:instancePath+"/revision",schemaPath:"#/definitions/U32/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}}}}else {const err7 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}validate210.errors = vErrors;return errors === 0;}function validate212(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;if(data && typeof data == "object" && !Array.isArray(data)){if(data.mime === undefined){const err0 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "mime"},message:"must have required property '"+"mime"+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}if(data.data === undefined){const err1 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "data"},message:"must have required property '"+"data"+"'"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}for(const key0 in data){if(!((key0 === "mime") || (key0 === "data"))){const err2 = {instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}}if(data.mime !== undefined){let data0 = data.mime;if(!((((data0 === "image/png") || (data0 === "image/jpeg")) || (data0 === "image/webp")) || (data0 === "image/gif"))){const err3 = {instancePath:instancePath+"/mime",schemaPath:"#/definitions/ImageMime/enum",keyword:"enum",params:{allowedValues: schema46.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}}if(data.data !== undefined){let data1 = data.data;const _errs8 = errors;let valid3 = true;const _errs9 = errors;if(typeof data1 === "string"){if(func2(data1) < 5592408){const err4 = {};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}}var _valid0 = _errs9 === errors;errors = _errs8;if(vErrors !== null){if(_errs8){vErrors.length = _errs8;}else {vErrors = null;}}if(_valid0){const _errs10 = errors;if(typeof data1 === "string"){if(!pattern0.test(data1)){const err5 = {instancePath:instancePath+"/data",schemaPath:"#/properties/data/allOf/0/then/pattern",keyword:"pattern",params:{pattern: "==$"},message:"must match pattern \""+"==$"+"\""};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}}var _valid0 = _errs10 === errors;valid3 = _valid0;}if(!valid3){const err6 = {instancePath:instancePath+"/data",schemaPath:"#/properties/data/allOf/0/if",keyword:"if",params:{failingKeyword: "then"},message:"must match \"then\" schema"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}if(typeof data1 === "string"){if(func2(data1) > 5592408){const err7 = {instancePath:instancePath+"/data",schemaPath:"#/properties/data/maxLength",keyword:"maxLength",params:{limit: 5592408},message:"must NOT have more than 5592408 characters"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}if(!pattern1.test(data1)){const err8 = {instancePath:instancePath+"/data",schemaPath:"#/properties/data/pattern",keyword:"pattern",params:{pattern: "^(?:(?=([A-Za-z0-9+/]{4096}))\\1)*(?:(?=([A-Za-z0-9+/]{4}))\\2){0,1023}(?:[A-Za-z0-9+/][AQgw]==|[A-Za-z0-9+/]{2}[AEIMQUYcgkosw048]=)?$(?![\\s\\S])"},message:"must match pattern \""+"^(?:(?=([A-Za-z0-9+/]{4096}))\\1)*(?:(?=([A-Za-z0-9+/]{4}))\\2){0,1023}(?:[A-Za-z0-9+/][AQgw]==|[A-Za-z0-9+/]{2}[AEIMQUYcgkosw048]=)?$(?![\\s\\S])"+"\""};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}}else {const err9 = {instancePath:instancePath+"/data",schemaPath:"#/properties/data/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}}}else {const err10 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}validate212.errors = vErrors;return errors === 0;}const pattern5 = new RegExp("\\S", "u");function validate209(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;if(data && typeof data == "object" && !Array.isArray(data)){if(data.purpose === undefined){const err0 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "purpose"},message:"must have required property '"+"purpose"+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}if(data.skills === undefined){const err1 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "skills"},message:"must have required property '"+"skills"+"'"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}if(data.input === undefined){const err2 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "input"},message:"must have required property '"+"input"+"'"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}if(data.regenerate === undefined){const err3 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "regenerate"},message:"must have required property '"+"regenerate"+"'"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}if(data.language === undefined){const err4 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "language"},message:"must have required property '"+"language"+"'"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}for(const key0 in data){if(!(func8.call(schema228.properties, key0))){const err5 = {instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}}if(data.purpose !== undefined){if(typeof data.purpose !== "string"){const err6 = {instancePath:instancePath+"/purpose",schemaPath:"#/properties/purpose/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}}if(data.model !== undefined){let data1 = data.model;const _errs5 = errors;let valid1 = false;const _errs6 = errors;if(data1 && typeof data1 == "object" && !Array.isArray(data1)){if(data1.endpointId === undefined){const err7 = {instancePath:instancePath+"/model",schemaPath:"common.schema.json#/definitions/ModelRef/required",keyword:"required",params:{missingProperty: "endpointId"},message:"must have required property '"+"endpointId"+"'"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}if(data1.modelId === undefined){const err8 = {instancePath:instancePath+"/model",schemaPath:"common.schema.json#/definitions/ModelRef/required",keyword:"required",params:{missingProperty: "modelId"},message:"must have required property '"+"modelId"+"'"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}for(const key1 in data1){if(!((key1 === "endpointId") || (key1 === "modelId"))){const err9 = {instancePath:instancePath+"/model",schemaPath:"common.schema.json#/definitions/ModelRef/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key1},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}}if(data1.endpointId !== undefined){if(typeof data1.endpointId !== "string"){const err10 = {instancePath:instancePath+"/model/endpointId",schemaPath:"common.schema.json#/definitions/ModelRef/properties/endpointId/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}}if(data1.modelId !== undefined){if(typeof data1.modelId !== "string"){const err11 = {instancePath:instancePath+"/model/modelId",schemaPath:"common.schema.json#/definitions/ModelRef/properties/modelId/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}}}else {const err12 = {instancePath:instancePath+"/model",schemaPath:"common.schema.json#/definitions/ModelRef/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}var _valid0 = _errs6 === errors;valid1 = valid1 || _valid0;if(!valid1){const _errs14 = errors;if(data1 !== null){const err13 = {instancePath:instancePath+"/model",schemaPath:"#/properties/model/anyOf/1/type",keyword:"type",params:{type: "null"},message:"must be null"};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}var _valid0 = _errs14 === errors;valid1 = valid1 || _valid0;}if(!valid1){const err14 = {instancePath:instancePath+"/model",schemaPath:"#/properties/model/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err14];}else {vErrors.push(err14);}errors++;}else {errors = _errs5;if(vErrors !== null){if(_errs5){vErrors.length = _errs5;}else {vErrors = null;}}}}if(data.skills !== undefined){let data4 = data.skills;if(Array.isArray(data4)){if(data4.length > 20){const err15 = {instancePath:instancePath+"/skills",schemaPath:"#/properties/skills/maxItems",keyword:"maxItems",params:{limit: 20},message:"must NOT have more than 20 items"};if(vErrors === null){vErrors = [err15];}else {vErrors.push(err15);}errors++;}const len0 = data4.length;for(let i0=0; i0<len0; i0++){if(!(validate210(data4[i0], {instancePath:instancePath+"/skills/" + i0,parentData:data4,parentDataProperty:i0,rootData}))){vErrors = vErrors === null ? validate210.errors : vErrors.concat(validate210.errors);errors = vErrors.length;}}}else {const err16 = {instancePath:instancePath+"/skills",schemaPath:"#/properties/skills/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err16];}else {vErrors.push(err16);}errors++;}}if(data.context !== undefined){let data6 = data.context;const _errs20 = errors;let valid6 = false;const _errs21 = errors;if(data6 && typeof data6 == "object" && !Array.isArray(data6)){if(data6.kind === undefined){const err17 = {instancePath:instancePath+"/context",schemaPath:"common.schema.json#/definitions/ContextRef/required",keyword:"required",params:{missingProperty: "kind"},message:"must have required property '"+"kind"+"'"};if(vErrors === null){vErrors = [err17];}else {vErrors.push(err17);}errors++;}if(data6.id === undefined){const err18 = {instancePath:instancePath+"/context",schemaPath:"common.schema.json#/definitions/ContextRef/required",keyword:"required",params:{missingProperty: "id"},message:"must have required property '"+"id"+"'"};if(vErrors === null){vErrors = [err18];}else {vErrors.push(err18);}errors++;}for(const key2 in data6){if(!((key2 === "kind") || (key2 === "id"))){const err19 = {instancePath:instancePath+"/context",schemaPath:"common.schema.json#/definitions/ContextRef/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key2},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err19];}else {vErrors.push(err19);}errors++;}}if(data6.kind !== undefined){if(typeof data6.kind !== "string"){const err20 = {instancePath:instancePath+"/context/kind",schemaPath:"common.schema.json#/definitions/ContextRef/properties/kind/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err20];}else {vErrors.push(err20);}errors++;}}if(data6.id !== undefined){if(typeof data6.id !== "string"){const err21 = {instancePath:instancePath+"/context/id",schemaPath:"common.schema.json#/definitions/ContextRef/properties/id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err21];}else {vErrors.push(err21);}errors++;}}}else {const err22 = {instancePath:instancePath+"/context",schemaPath:"common.schema.json#/definitions/ContextRef/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err22];}else {vErrors.push(err22);}errors++;}var _valid1 = _errs21 === errors;valid6 = valid6 || _valid1;if(!valid6){const _errs29 = errors;if(data6 !== null){const err23 = {instancePath:instancePath+"/context",schemaPath:"#/properties/context/anyOf/1/type",keyword:"type",params:{type: "null"},message:"must be null"};if(vErrors === null){vErrors = [err23];}else {vErrors.push(err23);}errors++;}var _valid1 = _errs29 === errors;valid6 = valid6 || _valid1;}if(!valid6){const err24 = {instancePath:instancePath+"/context",schemaPath:"#/properties/context/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err24];}else {vErrors.push(err24);}errors++;}else {errors = _errs20;if(vErrors !== null){if(_errs20){vErrors.length = _errs20;}else {vErrors = null;}}}}if(data.input !== undefined){let data9 = data.input;if(typeof data9 === "string"){if(func2(data9) > 100000){const err25 = {instancePath:instancePath+"/input",schemaPath:"#/properties/input/maxLength",keyword:"maxLength",params:{limit: 100000},message:"must NOT have more than 100000 characters"};if(vErrors === null){vErrors = [err25];}else {vErrors.push(err25);}errors++;}}else {const err26 = {instancePath:instancePath+"/input",schemaPath:"#/properties/input/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err26];}else {vErrors.push(err26);}errors++;}}if(data.images !== undefined){let data10 = data.images;if(Array.isArray(data10)){if(data10.length > 4){const err27 = {instancePath:instancePath+"/images",schemaPath:"#/properties/images/maxItems",keyword:"maxItems",params:{limit: 4},message:"must NOT have more than 4 items"};if(vErrors === null){vErrors = [err27];}else {vErrors.push(err27);}errors++;}const len1 = data10.length;for(let i1=0; i1<len1; i1++){if(!(validate212(data10[i1], {instancePath:instancePath+"/images/" + i1,parentData:data10,parentDataProperty:i1,rootData}))){vErrors = vErrors === null ? validate212.errors : vErrors.concat(validate212.errors);errors = vErrors.length;}}}else {const err28 = {instancePath:instancePath+"/images",schemaPath:"#/properties/images/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err28];}else {vErrors.push(err28);}errors++;}}if(data.conversationId !== undefined){if(!(validate187(data.conversationId, {instancePath:instancePath+"/conversationId",parentData:data,parentDataProperty:"conversationId",rootData}))){vErrors = vErrors === null ? validate187.errors : vErrors.concat(validate187.errors);errors = vErrors.length;}}if(data.scope !== undefined){let data13 = data.scope;if((typeof data13 !== "string") && (data13 !== null)){const err29 = {instancePath:instancePath+"/scope",schemaPath:"#/properties/scope/type",keyword:"type",params:{type: schema228.properties.scope.type},message:"must be string,null"};if(vErrors === null){vErrors = [err29];}else {vErrors.push(err29);}errors++;}if(typeof data13 === "string"){if(func2(data13) > 200){const err30 = {instancePath:instancePath+"/scope",schemaPath:"#/properties/scope/maxLength",keyword:"maxLength",params:{limit: 200},message:"must NOT have more than 200 characters"};if(vErrors === null){vErrors = [err30];}else {vErrors.push(err30);}errors++;}}}if(data.webSearch !== undefined){if(typeof data.webSearch !== "boolean"){const err31 = {instancePath:instancePath+"/webSearch",schemaPath:"#/properties/webSearch/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"};if(vErrors === null){vErrors = [err31];}else {vErrors.push(err31);}errors++;}}if(data.regenerate !== undefined){if(typeof data.regenerate !== "boolean"){const err32 = {instancePath:instancePath+"/regenerate",schemaPath:"#/properties/regenerate/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"};if(vErrors === null){vErrors = [err32];}else {vErrors.push(err32);}errors++;}}if(data.replyToId !== undefined){if(!(validate187(data.replyToId, {instancePath:instancePath+"/replyToId",parentData:data,parentDataProperty:"replyToId",rootData}))){vErrors = vErrors === null ? validate187.errors : vErrors.concat(validate187.errors);errors = vErrors.length;}}if(data.retryTurnId !== undefined){if(!(validate187(data.retryTurnId, {instancePath:instancePath+"/retryTurnId",parentData:data,parentDataProperty:"retryTurnId",rootData}))){vErrors = vErrors === null ? validate187.errors : vErrors.concat(validate187.errors);errors = vErrors.length;}}if(data.translateTurnId !== undefined){if(!(validate187(data.translateTurnId, {instancePath:instancePath+"/translateTurnId",parentData:data,parentDataProperty:"translateTurnId",rootData}))){vErrors = vErrors === null ? validate187.errors : vErrors.concat(validate187.errors);errors = vErrors.length;}}if(data.targetLanguage !== undefined){let data19 = data.targetLanguage;if((typeof data19 !== "string") && (data19 !== null)){const err33 = {instancePath:instancePath+"/targetLanguage",schemaPath:"#/properties/targetLanguage/type",keyword:"type",params:{type: schema228.properties.targetLanguage.type},message:"must be string,null"};if(vErrors === null){vErrors = [err33];}else {vErrors.push(err33);}errors++;}if(typeof data19 === "string"){if(func2(data19) > 80){const err34 = {instancePath:instancePath+"/targetLanguage",schemaPath:"#/properties/targetLanguage/maxLength",keyword:"maxLength",params:{limit: 80},message:"must NOT have more than 80 characters"};if(vErrors === null){vErrors = [err34];}else {vErrors.push(err34);}errors++;}if(func2(data19) < 1){const err35 = {instancePath:instancePath+"/targetLanguage",schemaPath:"#/properties/targetLanguage/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};if(vErrors === null){vErrors = [err35];}else {vErrors.push(err35);}errors++;}if(!pattern5.test(data19)){const err36 = {instancePath:instancePath+"/targetLanguage",schemaPath:"#/properties/targetLanguage/pattern",keyword:"pattern",params:{pattern: "\\S"},message:"must match pattern \""+"\\S"+"\""};if(vErrors === null){vErrors = [err36];}else {vErrors.push(err36);}errors++;}}}if(data.language !== undefined){let data20 = data.language;if(typeof data20 === "string"){if(func2(data20) > 80){const err37 = {instancePath:instancePath+"/language",schemaPath:"#/properties/language/maxLength",keyword:"maxLength",params:{limit: 80},message:"must NOT have more than 80 characters"};if(vErrors === null){vErrors = [err37];}else {vErrors.push(err37);}errors++;}if(func2(data20) < 1){const err38 = {instancePath:instancePath+"/language",schemaPath:"#/properties/language/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};if(vErrors === null){vErrors = [err38];}else {vErrors.push(err38);}errors++;}}else {const err39 = {instancePath:instancePath+"/language",schemaPath:"#/properties/language/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err39];}else {vErrors.push(err39);}errors++;}}if(data.reasoningEffort !== undefined){let data21 = data.reasoningEffort;if(!(((((((((data21 === "default") || (data21 === "none")) || (data21 === "auto")) || (data21 === "minimal")) || (data21 === "low")) || (data21 === "medium")) || (data21 === "high")) || (data21 === "xhigh")) || (data21 === "max"))){const err40 = {instancePath:instancePath+"/reasoningEffort",schemaPath:"common.schema.json#/definitions/ReasoningEffort/enum",keyword:"enum",params:{allowedValues: schema42.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err40];}else {vErrors.push(err40);}errors++;}}if(data.permissionMode !== undefined){let data22 = data.permissionMode;if(!(((((data22 === "default") || (data22 === "plan")) || (data22 === "accept_edits")) || (data22 === "auto")) || (data22 === "full_access"))){const err41 = {instancePath:instancePath+"/permissionMode",schemaPath:"common.schema.json#/definitions/PermissionMode/enum",keyword:"enum",params:{allowedValues: schema153.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err41];}else {vErrors.push(err41);}errors++;}}if(data.generateImage !== undefined){if(typeof data.generateImage !== "boolean"){const err42 = {instancePath:instancePath+"/generateImage",schemaPath:"#/properties/generateImage/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"};if(vErrors === null){vErrors = [err42];}else {vErrors.push(err42);}errors++;}}}else {const err43 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err43];}else {vErrors.push(err43);}errors++;}validate209.errors = vErrors;return errors === 0;}function validate208(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="aether:validator:RunRequest" */;let vErrors = null;let errors = 0;if(!(validate209(data, {instancePath,parentData,parentDataProperty,rootData}))){vErrors = vErrors === null ? validate209.errors : vErrors.concat(validate209.errors);errors = vErrors.length;}validate208.errors = vErrors;return errors === 0;}export const validateRunSnapshot = validate219;const schema237 = {"$id":"aether:validator:RunSnapshot","$ref":"https://aether.local/contracts/v1/run.schema.json#/definitions/RunSnapshot"};const schema238 = {"type":"object","additionalProperties":false,"required":["runId","conversationId","turnId","status","cancelRequested"],"properties":{"runId":{"$ref":"common.schema.json#/definitions/Id"},"conversationId":{"$ref":"common.schema.json#/definitions/NullableId"},"turnId":{"$ref":"common.schema.json#/definitions/NullableId"},"status":{"$ref":"#/definitions/RunStatus"},"cancelRequested":{"type":"boolean"},"error":{"$ref":"error.schema.json#/definitions/KitError"},"exhausted":{"type":"boolean"}},"allOf":[{"if":{"required":["error"],"properties":{"error":true}},"then":{"properties":{"status":{"const":"failed"}}}}]};const schema240 = {"enum":["running","completed","failed","cancelled"]};function validate220(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;const _errs2 = errors;let valid1 = true;const _errs3 = errors;if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if((data.error === undefined) && (missing0 = "error")){const err0 = {};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}}var _valid0 = _errs3 === errors;errors = _errs2;if(vErrors !== null){if(_errs2){vErrors.length = _errs2;}else {vErrors = null;}}if(_valid0){const _errs4 = errors;if(data && typeof data == "object" && !Array.isArray(data)){if(data.status !== undefined){if("failed" !== data.status){const err1 = {instancePath:instancePath+"/status",schemaPath:"#/allOf/0/then/properties/status/const",keyword:"const",params:{allowedValue: "failed"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}}}var _valid0 = _errs4 === errors;valid1 = _valid0;}if(!valid1){const err2 = {instancePath,schemaPath:"#/allOf/0/if",keyword:"if",params:{failingKeyword: "then"},message:"must match \"then\" schema"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}if(data && typeof data == "object" && !Array.isArray(data)){if(data.runId === undefined){const err3 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "runId"},message:"must have required property '"+"runId"+"'"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}if(data.conversationId === undefined){const err4 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "conversationId"},message:"must have required property '"+"conversationId"+"'"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}if(data.turnId === undefined){const err5 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "turnId"},message:"must have required property '"+"turnId"+"'"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}if(data.status === undefined){const err6 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "status"},message:"must have required property '"+"status"+"'"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}if(data.cancelRequested === undefined){const err7 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "cancelRequested"},message:"must have required property '"+"cancelRequested"+"'"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}for(const key0 in data){if(!(((((((key0 === "runId") || (key0 === "conversationId")) || (key0 === "turnId")) || (key0 === "status")) || (key0 === "cancelRequested")) || (key0 === "error")) || (key0 === "exhausted"))){const err8 = {instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}}if(data.runId !== undefined){let data1 = data.runId;if(typeof data1 === "string"){if(func2(data1) > 128){const err9 = {instancePath:instancePath+"/runId",schemaPath:"common.schema.json#/definitions/Id/maxLength",keyword:"maxLength",params:{limit: 128},message:"must NOT have more than 128 characters"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}if(func2(data1) < 1){const err10 = {instancePath:instancePath+"/runId",schemaPath:"common.schema.json#/definitions/Id/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}}else {const err11 = {instancePath:instancePath+"/runId",schemaPath:"common.schema.json#/definitions/Id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}}if(data.conversationId !== undefined){if(!(validate187(data.conversationId, {instancePath:instancePath+"/conversationId",parentData:data,parentDataProperty:"conversationId",rootData}))){vErrors = vErrors === null ? validate187.errors : vErrors.concat(validate187.errors);errors = vErrors.length;}}if(data.turnId !== undefined){if(!(validate187(data.turnId, {instancePath:instancePath+"/turnId",parentData:data,parentDataProperty:"turnId",rootData}))){vErrors = vErrors === null ? validate187.errors : vErrors.concat(validate187.errors);errors = vErrors.length;}}if(data.status !== undefined){let data4 = data.status;if(!((((data4 === "running") || (data4 === "completed")) || (data4 === "failed")) || (data4 === "cancelled"))){const err12 = {instancePath:instancePath+"/status",schemaPath:"#/definitions/RunStatus/enum",keyword:"enum",params:{allowedValues: schema240.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}}if(data.cancelRequested !== undefined){if(typeof data.cancelRequested !== "boolean"){const err13 = {instancePath:instancePath+"/cancelRequested",schemaPath:"#/properties/cancelRequested/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}}if(data.error !== undefined){if(!(validate205(data.error, {instancePath:instancePath+"/error",parentData:data,parentDataProperty:"error",rootData}))){vErrors = vErrors === null ? validate205.errors : vErrors.concat(validate205.errors);errors = vErrors.length;}}if(data.exhausted !== undefined){if(typeof data.exhausted !== "boolean"){const err14 = {instancePath:instancePath+"/exhausted",schemaPath:"#/properties/exhausted/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"};if(vErrors === null){vErrors = [err14];}else {vErrors.push(err14);}errors++;}}}else {const err15 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err15];}else {vErrors.push(err15);}errors++;}validate220.errors = vErrors;return errors === 0;}function validate219(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="aether:validator:RunSnapshot" */;let vErrors = null;let errors = 0;if(!(validate220(data, {instancePath,parentData,parentDataProperty,rootData}))){vErrors = vErrors === null ? validate220.errors : vErrors.concat(validate220.errors);errors = vErrors.length;}validate219.errors = vErrors;return errors === 0;}export const validateRunStatus = validate225;const schema241 = {"$id":"aether:validator:RunStatus","$ref":"https://aether.local/contracts/v1/run.schema.json#/definitions/RunStatus"};function validate225(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="aether:validator:RunStatus" */;let vErrors = null;let errors = 0;if(!((((data === "running") || (data === "completed")) || (data === "failed")) || (data === "cancelled"))){const err0 = {instancePath,schemaPath:"https://aether.local/contracts/v1/run.schema.json#/definitions/RunStatus/enum",keyword:"enum",params:{allowedValues: schema240.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}validate225.errors = vErrors;return errors === 0;}export const validateScopeState = validate226;const schema243 = {"$id":"aether:validator:ScopeState","$ref":"aether:bindings#/definitions/ScopeState"};const schema244 = {"type":"object","properties":{"id":{"type":"string"},"labelKey":{"type":"string"},"destructive":{"type":"boolean"},"enabled":{"type":"boolean"}},"required":["id","labelKey","destructive","enabled"],"additionalProperties":false};function validate226(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="aether:validator:ScopeState" */;let vErrors = null;let errors = 0;if(data && typeof data == "object" && !Array.isArray(data)){if(data.id === undefined){const err0 = {instancePath,schemaPath:"aether:bindings#/definitions/ScopeState/required",keyword:"required",params:{missingProperty: "id"},message:"must have required property '"+"id"+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}if(data.labelKey === undefined){const err1 = {instancePath,schemaPath:"aether:bindings#/definitions/ScopeState/required",keyword:"required",params:{missingProperty: "labelKey"},message:"must have required property '"+"labelKey"+"'"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}if(data.destructive === undefined){const err2 = {instancePath,schemaPath:"aether:bindings#/definitions/ScopeState/required",keyword:"required",params:{missingProperty: "destructive"},message:"must have required property '"+"destructive"+"'"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}if(data.enabled === undefined){const err3 = {instancePath,schemaPath:"aether:bindings#/definitions/ScopeState/required",keyword:"required",params:{missingProperty: "enabled"},message:"must have required property '"+"enabled"+"'"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}for(const key0 in data){if(!((((key0 === "id") || (key0 === "labelKey")) || (key0 === "destructive")) || (key0 === "enabled"))){const err4 = {instancePath,schemaPath:"aether:bindings#/definitions/ScopeState/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}}if(data.id !== undefined){if(typeof data.id !== "string"){const err5 = {instancePath:instancePath+"/id",schemaPath:"aether:bindings#/definitions/ScopeState/properties/id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}}if(data.labelKey !== undefined){if(typeof data.labelKey !== "string"){const err6 = {instancePath:instancePath+"/labelKey",schemaPath:"aether:bindings#/definitions/ScopeState/properties/labelKey/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}}if(data.destructive !== undefined){if(typeof data.destructive !== "boolean"){const err7 = {instancePath:instancePath+"/destructive",schemaPath:"aether:bindings#/definitions/ScopeState/properties/destructive/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}}if(data.enabled !== undefined){if(typeof data.enabled !== "boolean"){const err8 = {instancePath:instancePath+"/enabled",schemaPath:"aether:bindings#/definitions/ScopeState/properties/enabled/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}}}else {const err9 = {instancePath,schemaPath:"aether:bindings#/definitions/ScopeState/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}validate226.errors = vErrors;return errors === 0;}export const validateSearchCap = validate227;const schema245 = {"$id":"aether:validator:SearchCap","$ref":"aether:bindings#/definitions/SearchCap"};const schema246 = {"anyOf":[{"const":"search"},{"const":"fetch"}]};function validate227(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="aether:validator:SearchCap" */;let vErrors = null;let errors = 0;const _errs1 = errors;let valid1 = false;const _errs2 = errors;if("search" !== data){const err0 = {instancePath,schemaPath:"aether:bindings#/definitions/SearchCap/anyOf/0/const",keyword:"const",params:{allowedValue: "search"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}var _valid0 = _errs2 === errors;valid1 = valid1 || _valid0;if(!valid1){const _errs3 = errors;if("fetch" !== data){const err1 = {instancePath,schemaPath:"aether:bindings#/definitions/SearchCap/anyOf/1/const",keyword:"const",params:{allowedValue: "fetch"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}var _valid0 = _errs3 === errors;valid1 = valid1 || _valid0;}if(!valid1){const err2 = {instancePath,schemaPath:"aether:bindings#/definitions/SearchCap/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}else {errors = _errs1;if(vErrors !== null){if(_errs1){vErrors.length = _errs1;}else {vErrors = null;}}}validate227.errors = vErrors;return errors === 0;}export const validateSearchHit = validate228;const schema247 = {"$id":"aether:validator:SearchHit","$ref":"https://aether.local/contracts/v1/common.schema.json#/definitions/SearchHit"};function validate228(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="aether:validator:SearchHit" */;let vErrors = null;let errors = 0;if(data && typeof data == "object" && !Array.isArray(data)){if(data.title === undefined){const err0 = {instancePath,schemaPath:"https://aether.local/contracts/v1/common.schema.json#/definitions/SearchHit/required",keyword:"required",params:{missingProperty: "title"},message:"must have required property '"+"title"+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}if(data.url === undefined){const err1 = {instancePath,schemaPath:"https://aether.local/contracts/v1/common.schema.json#/definitions/SearchHit/required",keyword:"required",params:{missingProperty: "url"},message:"must have required property '"+"url"+"'"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}if(data.snippet === undefined){const err2 = {instancePath,schemaPath:"https://aether.local/contracts/v1/common.schema.json#/definitions/SearchHit/required",keyword:"required",params:{missingProperty: "snippet"},message:"must have required property '"+"snippet"+"'"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}for(const key0 in data){if(!(((key0 === "title") || (key0 === "url")) || (key0 === "snippet"))){const err3 = {instancePath,schemaPath:"https://aether.local/contracts/v1/common.schema.json#/definitions/SearchHit/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}}if(data.title !== undefined){if(typeof data.title !== "string"){const err4 = {instancePath:instancePath+"/title",schemaPath:"https://aether.local/contracts/v1/common.schema.json#/definitions/SearchHit/properties/title/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}}if(data.url !== undefined){let data1 = data.url;if(typeof data1 === "string"){if(!pattern2.test(data1)){const err5 = {instancePath:instancePath+"/url",schemaPath:"https://aether.local/contracts/v1/common.schema.json#/definitions/SearchHit/properties/url/pattern",keyword:"pattern",params:{pattern: "^[Hh][Tt][Tt][Pp][Ss]?://[^\\s/?#]+(?:[/?#][^\\s]*)?$"},message:"must match pattern \""+"^[Hh][Tt][Tt][Pp][Ss]?://[^\\s/?#]+(?:[/?#][^\\s]*)?$"+"\""};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}}else {const err6 = {instancePath:instancePath+"/url",schemaPath:"https://aether.local/contracts/v1/common.schema.json#/definitions/SearchHit/properties/url/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}}if(data.snippet !== undefined){if(typeof data.snippet !== "string"){const err7 = {instancePath:instancePath+"/snippet",schemaPath:"https://aether.local/contracts/v1/common.schema.json#/definitions/SearchHit/properties/snippet/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}}}else {const err8 = {instancePath,schemaPath:"https://aether.local/contracts/v1/common.schema.json#/definitions/SearchHit/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}validate228.errors = vErrors;return errors === 0;}export const validateSearchKey = validate229;const schema249 = {"$id":"aether:validator:SearchKey","$ref":"aether:bindings#/definitions/SearchKey"};const schema250 = {"type":"object","properties":{"id":{"type":"string"},"masked":{"type":"string"}},"required":["id","masked"],"additionalProperties":false};function validate229(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="aether:validator:SearchKey" */;let vErrors = null;let errors = 0;if(data && typeof data == "object" && !Array.isArray(data)){if(data.id === undefined){const err0 = {instancePath,schemaPath:"aether:bindings#/definitions/SearchKey/required",keyword:"required",params:{missingProperty: "id"},message:"must have required property '"+"id"+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}if(data.masked === undefined){const err1 = {instancePath,schemaPath:"aether:bindings#/definitions/SearchKey/required",keyword:"required",params:{missingProperty: "masked"},message:"must have required property '"+"masked"+"'"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}for(const key0 in data){if(!((key0 === "id") || (key0 === "masked"))){const err2 = {instancePath,schemaPath:"aether:bindings#/definitions/SearchKey/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}}if(data.id !== undefined){if(typeof data.id !== "string"){const err3 = {instancePath:instancePath+"/id",schemaPath:"aether:bindings#/definitions/SearchKey/properties/id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}}if(data.masked !== undefined){if(typeof data.masked !== "string"){const err4 = {instancePath:instancePath+"/masked",schemaPath:"aether:bindings#/definitions/SearchKey/properties/masked/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}}}else {const err5 = {instancePath,schemaPath:"aether:bindings#/definitions/SearchKey/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}validate229.errors = vErrors;return errors === 0;}export const validateSearchPage = validate230;const schema251 = {"$id":"aether:validator:SearchPage","$ref":"aether:bindings#/definitions/SearchPage"};const schema252 = {"type":"object","properties":{"title":{"type":"string"},"url":{"type":"string"},"content":{"type":"string"}},"required":["title","url","content"],"additionalProperties":false};function validate230(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="aether:validator:SearchPage" */;let vErrors = null;let errors = 0;if(data && typeof data == "object" && !Array.isArray(data)){if(data.title === undefined){const err0 = {instancePath,schemaPath:"aether:bindings#/definitions/SearchPage/required",keyword:"required",params:{missingProperty: "title"},message:"must have required property '"+"title"+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}if(data.url === undefined){const err1 = {instancePath,schemaPath:"aether:bindings#/definitions/SearchPage/required",keyword:"required",params:{missingProperty: "url"},message:"must have required property '"+"url"+"'"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}if(data.content === undefined){const err2 = {instancePath,schemaPath:"aether:bindings#/definitions/SearchPage/required",keyword:"required",params:{missingProperty: "content"},message:"must have required property '"+"content"+"'"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}for(const key0 in data){if(!(((key0 === "title") || (key0 === "url")) || (key0 === "content"))){const err3 = {instancePath,schemaPath:"aether:bindings#/definitions/SearchPage/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}}if(data.title !== undefined){if(typeof data.title !== "string"){const err4 = {instancePath:instancePath+"/title",schemaPath:"aether:bindings#/definitions/SearchPage/properties/title/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}}if(data.url !== undefined){if(typeof data.url !== "string"){const err5 = {instancePath:instancePath+"/url",schemaPath:"aether:bindings#/definitions/SearchPage/properties/url/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}}if(data.content !== undefined){if(typeof data.content !== "string"){const err6 = {instancePath:instancePath+"/content",schemaPath:"aether:bindings#/definitions/SearchPage/properties/content/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}}}else {const err7 = {instancePath,schemaPath:"aether:bindings#/definitions/SearchPage/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}validate230.errors = vErrors;return errors === 0;}export const validateSearchPreferences = validate231;const schema253 = {"$id":"aether:validator:SearchPreferences","$ref":"aether:bindings#/definitions/SearchPreferences"};const schema254 = {"type":"object","properties":{"maxResults":{"type":"number"},"compression":{"anyOf":[{"const":"none"},{"const":"cutoff"}]},"cutoffLimit":{"type":"number"},"blacklist":{"type":"array","items":{"type":"string"}},"modelToolsPreferred":{"type":"boolean"}},"required":["maxResults","compression","cutoffLimit","blacklist","modelToolsPreferred"],"additionalProperties":false};function validate231(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="aether:validator:SearchPreferences" */;let vErrors = null;let errors = 0;if(data && typeof data == "object" && !Array.isArray(data)){if(data.maxResults === undefined){const err0 = {instancePath,schemaPath:"aether:bindings#/definitions/SearchPreferences/required",keyword:"required",params:{missingProperty: "maxResults"},message:"must have required property '"+"maxResults"+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}if(data.compression === undefined){const err1 = {instancePath,schemaPath:"aether:bindings#/definitions/SearchPreferences/required",keyword:"required",params:{missingProperty: "compression"},message:"must have required property '"+"compression"+"'"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}if(data.cutoffLimit === undefined){const err2 = {instancePath,schemaPath:"aether:bindings#/definitions/SearchPreferences/required",keyword:"required",params:{missingProperty: "cutoffLimit"},message:"must have required property '"+"cutoffLimit"+"'"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}if(data.blacklist === undefined){const err3 = {instancePath,schemaPath:"aether:bindings#/definitions/SearchPreferences/required",keyword:"required",params:{missingProperty: "blacklist"},message:"must have required property '"+"blacklist"+"'"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}if(data.modelToolsPreferred === undefined){const err4 = {instancePath,schemaPath:"aether:bindings#/definitions/SearchPreferences/required",keyword:"required",params:{missingProperty: "modelToolsPreferred"},message:"must have required property '"+"modelToolsPreferred"+"'"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}for(const key0 in data){if(!(((((key0 === "maxResults") || (key0 === "compression")) || (key0 === "cutoffLimit")) || (key0 === "blacklist")) || (key0 === "modelToolsPreferred"))){const err5 = {instancePath,schemaPath:"aether:bindings#/definitions/SearchPreferences/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}}if(data.maxResults !== undefined){let data0 = data.maxResults;if(!((typeof data0 == "number") && (isFinite(data0)))){const err6 = {instancePath:instancePath+"/maxResults",schemaPath:"aether:bindings#/definitions/SearchPreferences/properties/maxResults/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}}if(data.compression !== undefined){let data1 = data.compression;const _errs6 = errors;let valid2 = false;const _errs7 = errors;if("none" !== data1){const err7 = {instancePath:instancePath+"/compression",schemaPath:"aether:bindings#/definitions/SearchPreferences/properties/compression/anyOf/0/const",keyword:"const",params:{allowedValue: "none"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}var _valid0 = _errs7 === errors;valid2 = valid2 || _valid0;if(!valid2){const _errs8 = errors;if("cutoff" !== data1){const err8 = {instancePath:instancePath+"/compression",schemaPath:"aether:bindings#/definitions/SearchPreferences/properties/compression/anyOf/1/const",keyword:"const",params:{allowedValue: "cutoff"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}var _valid0 = _errs8 === errors;valid2 = valid2 || _valid0;}if(!valid2){const err9 = {instancePath:instancePath+"/compression",schemaPath:"aether:bindings#/definitions/SearchPreferences/properties/compression/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}else {errors = _errs6;if(vErrors !== null){if(_errs6){vErrors.length = _errs6;}else {vErrors = null;}}}}if(data.cutoffLimit !== undefined){let data2 = data.cutoffLimit;if(!((typeof data2 == "number") && (isFinite(data2)))){const err10 = {instancePath:instancePath+"/cutoffLimit",schemaPath:"aether:bindings#/definitions/SearchPreferences/properties/cutoffLimit/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}}if(data.blacklist !== undefined){let data3 = data.blacklist;if(Array.isArray(data3)){const len0 = data3.length;for(let i0=0; i0<len0; i0++){if(typeof data3[i0] !== "string"){const err11 = {instancePath:instancePath+"/blacklist/" + i0,schemaPath:"aether:bindings#/definitions/SearchPreferences/properties/blacklist/items/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}}}else {const err12 = {instancePath:instancePath+"/blacklist",schemaPath:"aether:bindings#/definitions/SearchPreferences/properties/blacklist/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}}if(data.modelToolsPreferred !== undefined){if(typeof data.modelToolsPreferred !== "boolean"){const err13 = {instancePath:instancePath+"/modelToolsPreferred",schemaPath:"aether:bindings#/definitions/SearchPreferences/properties/modelToolsPreferred/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}}}else {const err14 = {instancePath,schemaPath:"aether:bindings#/definitions/SearchPreferences/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err14];}else {vErrors.push(err14);}errors++;}validate231.errors = vErrors;return errors === 0;}export const validateSearchProvider = validate232;const schema255 = {"$id":"aether:validator:SearchProvider","$ref":"aether:bindings#/definitions/SearchProvider"};const schema256 = {"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"officialWebsite":{"type":"string"},"apiKeyWebsite":{"type":"string"},"keyMode":{"anyOf":[{"const":"required"},{"const":"optional"},{"const":"none"}]},"basicAuth":{"type":"boolean"},"defaultBaseUrl":{"type":"string"},"baseUrl":{"type":"string"},"basicAuthUsername":{"type":"string"},"keys":{"type":"array","items":{"$ref":"aether:bindings#/definitions/SearchKey"}},"ready":{"type":"boolean"}},"required":["id","name","description","keyMode","basicAuth","keys","ready"],"additionalProperties":false};function validate233(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;if(data && typeof data == "object" && !Array.isArray(data)){if(data.id === undefined){const err0 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "id"},message:"must have required property '"+"id"+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}if(data.name === undefined){const err1 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "name"},message:"must have required property '"+"name"+"'"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}if(data.description === undefined){const err2 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "description"},message:"must have required property '"+"description"+"'"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}if(data.keyMode === undefined){const err3 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "keyMode"},message:"must have required property '"+"keyMode"+"'"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}if(data.basicAuth === undefined){const err4 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "basicAuth"},message:"must have required property '"+"basicAuth"+"'"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}if(data.keys === undefined){const err5 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "keys"},message:"must have required property '"+"keys"+"'"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}if(data.ready === undefined){const err6 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "ready"},message:"must have required property '"+"ready"+"'"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}for(const key0 in data){if(!(func8.call(schema256.properties, key0))){const err7 = {instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}}if(data.id !== undefined){if(typeof data.id !== "string"){const err8 = {instancePath:instancePath+"/id",schemaPath:"#/properties/id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}}if(data.name !== undefined){if(typeof data.name !== "string"){const err9 = {instancePath:instancePath+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}}if(data.description !== undefined){if(typeof data.description !== "string"){const err10 = {instancePath:instancePath+"/description",schemaPath:"#/properties/description/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}}if(data.officialWebsite !== undefined){if(typeof data.officialWebsite !== "string"){const err11 = {instancePath:instancePath+"/officialWebsite",schemaPath:"#/properties/officialWebsite/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}}if(data.apiKeyWebsite !== undefined){if(typeof data.apiKeyWebsite !== "string"){const err12 = {instancePath:instancePath+"/apiKeyWebsite",schemaPath:"#/properties/apiKeyWebsite/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}}if(data.keyMode !== undefined){let data5 = data.keyMode;const _errs13 = errors;let valid1 = false;const _errs14 = errors;if("required" !== data5){const err13 = {instancePath:instancePath+"/keyMode",schemaPath:"#/properties/keyMode/anyOf/0/const",keyword:"const",params:{allowedValue: "required"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}var _valid0 = _errs14 === errors;valid1 = valid1 || _valid0;if(!valid1){const _errs15 = errors;if("optional" !== data5){const err14 = {instancePath:instancePath+"/keyMode",schemaPath:"#/properties/keyMode/anyOf/1/const",keyword:"const",params:{allowedValue: "optional"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err14];}else {vErrors.push(err14);}errors++;}var _valid0 = _errs15 === errors;valid1 = valid1 || _valid0;if(!valid1){const _errs16 = errors;if("none" !== data5){const err15 = {instancePath:instancePath+"/keyMode",schemaPath:"#/properties/keyMode/anyOf/2/const",keyword:"const",params:{allowedValue: "none"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err15];}else {vErrors.push(err15);}errors++;}var _valid0 = _errs16 === errors;valid1 = valid1 || _valid0;}}if(!valid1){const err16 = {instancePath:instancePath+"/keyMode",schemaPath:"#/properties/keyMode/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err16];}else {vErrors.push(err16);}errors++;}else {errors = _errs13;if(vErrors !== null){if(_errs13){vErrors.length = _errs13;}else {vErrors = null;}}}}if(data.basicAuth !== undefined){if(typeof data.basicAuth !== "boolean"){const err17 = {instancePath:instancePath+"/basicAuth",schemaPath:"#/properties/basicAuth/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"};if(vErrors === null){vErrors = [err17];}else {vErrors.push(err17);}errors++;}}if(data.defaultBaseUrl !== undefined){if(typeof data.defaultBaseUrl !== "string"){const err18 = {instancePath:instancePath+"/defaultBaseUrl",schemaPath:"#/properties/defaultBaseUrl/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err18];}else {vErrors.push(err18);}errors++;}}if(data.baseUrl !== undefined){if(typeof data.baseUrl !== "string"){const err19 = {instancePath:instancePath+"/baseUrl",schemaPath:"#/properties/baseUrl/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err19];}else {vErrors.push(err19);}errors++;}}if(data.basicAuthUsername !== undefined){if(typeof data.basicAuthUsername !== "string"){const err20 = {instancePath:instancePath+"/basicAuthUsername",schemaPath:"#/properties/basicAuthUsername/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err20];}else {vErrors.push(err20);}errors++;}}if(data.keys !== undefined){let data10 = data.keys;if(Array.isArray(data10)){const len0 = data10.length;for(let i0=0; i0<len0; i0++){let data11 = data10[i0];if(data11 && typeof data11 == "object" && !Array.isArray(data11)){if(data11.id === undefined){const err21 = {instancePath:instancePath+"/keys/" + i0,schemaPath:"aether:bindings#/definitions/SearchKey/required",keyword:"required",params:{missingProperty: "id"},message:"must have required property '"+"id"+"'"};if(vErrors === null){vErrors = [err21];}else {vErrors.push(err21);}errors++;}if(data11.masked === undefined){const err22 = {instancePath:instancePath+"/keys/" + i0,schemaPath:"aether:bindings#/definitions/SearchKey/required",keyword:"required",params:{missingProperty: "masked"},message:"must have required property '"+"masked"+"'"};if(vErrors === null){vErrors = [err22];}else {vErrors.push(err22);}errors++;}for(const key1 in data11){if(!((key1 === "id") || (key1 === "masked"))){const err23 = {instancePath:instancePath+"/keys/" + i0,schemaPath:"aether:bindings#/definitions/SearchKey/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key1},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err23];}else {vErrors.push(err23);}errors++;}}if(data11.id !== undefined){if(typeof data11.id !== "string"){const err24 = {instancePath:instancePath+"/keys/" + i0+"/id",schemaPath:"aether:bindings#/definitions/SearchKey/properties/id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err24];}else {vErrors.push(err24);}errors++;}}if(data11.masked !== undefined){if(typeof data11.masked !== "string"){const err25 = {instancePath:instancePath+"/keys/" + i0+"/masked",schemaPath:"aether:bindings#/definitions/SearchKey/properties/masked/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err25];}else {vErrors.push(err25);}errors++;}}}else {const err26 = {instancePath:instancePath+"/keys/" + i0,schemaPath:"aether:bindings#/definitions/SearchKey/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err26];}else {vErrors.push(err26);}errors++;}}}else {const err27 = {instancePath:instancePath+"/keys",schemaPath:"#/properties/keys/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err27];}else {vErrors.push(err27);}errors++;}}if(data.ready !== undefined){if(typeof data.ready !== "boolean"){const err28 = {instancePath:instancePath+"/ready",schemaPath:"#/properties/ready/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"};if(vErrors === null){vErrors = [err28];}else {vErrors.push(err28);}errors++;}}}else {const err29 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err29];}else {vErrors.push(err29);}errors++;}validate233.errors = vErrors;return errors === 0;}function validate232(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="aether:validator:SearchProvider" */;let vErrors = null;let errors = 0;if(!(validate233(data, {instancePath,parentData,parentDataProperty,rootData}))){vErrors = vErrors === null ? validate233.errors : vErrors.concat(validate233.errors);errors = vErrors.length;}validate232.errors = vErrors;return errors === 0;}export const validateSearchResult = validate235;const schema258 = {"$id":"aether:validator:SearchResult","$ref":"aether:bindings#/definitions/SearchResult"};const schema259 = {"type":"object","properties":{"query":{"type":"string"},"provider":{"type":"string"},"hits":{"type":"array","items":{"$ref":"aether:bindings#/definitions/SearchHit"}}},"required":["query","provider","hits"],"additionalProperties":false};const schema260 = {"type":"object","properties":{"title":{"type":"string"},"url":{"type":"string"},"snippet":{"type":"string"}},"required":["title","url","snippet"],"additionalProperties":false};function validate236(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;if(data && typeof data == "object" && !Array.isArray(data)){if(data.query === undefined){const err0 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "query"},message:"must have required property '"+"query"+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}if(data.provider === undefined){const err1 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "provider"},message:"must have required property '"+"provider"+"'"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}if(data.hits === undefined){const err2 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "hits"},message:"must have required property '"+"hits"+"'"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}for(const key0 in data){if(!(((key0 === "query") || (key0 === "provider")) || (key0 === "hits"))){const err3 = {instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}}if(data.query !== undefined){if(typeof data.query !== "string"){const err4 = {instancePath:instancePath+"/query",schemaPath:"#/properties/query/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}}if(data.provider !== undefined){if(typeof data.provider !== "string"){const err5 = {instancePath:instancePath+"/provider",schemaPath:"#/properties/provider/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}}if(data.hits !== undefined){let data2 = data.hits;if(Array.isArray(data2)){const len0 = data2.length;for(let i0=0; i0<len0; i0++){let data3 = data2[i0];if(data3 && typeof data3 == "object" && !Array.isArray(data3)){if(data3.title === undefined){const err6 = {instancePath:instancePath+"/hits/" + i0,schemaPath:"aether:bindings#/definitions/SearchHit/required",keyword:"required",params:{missingProperty: "title"},message:"must have required property '"+"title"+"'"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}if(data3.url === undefined){const err7 = {instancePath:instancePath+"/hits/" + i0,schemaPath:"aether:bindings#/definitions/SearchHit/required",keyword:"required",params:{missingProperty: "url"},message:"must have required property '"+"url"+"'"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}if(data3.snippet === undefined){const err8 = {instancePath:instancePath+"/hits/" + i0,schemaPath:"aether:bindings#/definitions/SearchHit/required",keyword:"required",params:{missingProperty: "snippet"},message:"must have required property '"+"snippet"+"'"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}for(const key1 in data3){if(!(((key1 === "title") || (key1 === "url")) || (key1 === "snippet"))){const err9 = {instancePath:instancePath+"/hits/" + i0,schemaPath:"aether:bindings#/definitions/SearchHit/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key1},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}}if(data3.title !== undefined){if(typeof data3.title !== "string"){const err10 = {instancePath:instancePath+"/hits/" + i0+"/title",schemaPath:"aether:bindings#/definitions/SearchHit/properties/title/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}}if(data3.url !== undefined){if(typeof data3.url !== "string"){const err11 = {instancePath:instancePath+"/hits/" + i0+"/url",schemaPath:"aether:bindings#/definitions/SearchHit/properties/url/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}}if(data3.snippet !== undefined){if(typeof data3.snippet !== "string"){const err12 = {instancePath:instancePath+"/hits/" + i0+"/snippet",schemaPath:"aether:bindings#/definitions/SearchHit/properties/snippet/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}}}else {const err13 = {instancePath:instancePath+"/hits/" + i0,schemaPath:"aether:bindings#/definitions/SearchHit/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}}}else {const err14 = {instancePath:instancePath+"/hits",schemaPath:"#/properties/hits/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err14];}else {vErrors.push(err14);}errors++;}}}else {const err15 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err15];}else {vErrors.push(err15);}errors++;}validate236.errors = vErrors;return errors === 0;}function validate235(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="aether:validator:SearchResult" */;let vErrors = null;let errors = 0;if(!(validate236(data, {instancePath,parentData,parentDataProperty,rootData}))){vErrors = vErrors === null ? validate236.errors : vErrors.concat(validate236.errors);errors = vErrors.length;}validate235.errors = vErrors;return errors === 0;}export const validateSearchSave = validate238;const schema261 = {"$id":"aether:validator:SearchSave","$ref":"aether:bindings#/definitions/SearchSave"};const schema262 = {"type":"object","properties":{"capability":{"$ref":"aether:bindings#/definitions/SearchCap"},"provider":{"type":"string"},"baseUrl":{"type":"string"},"basicAuthUsername":{"type":"string"}},"required":["capability","provider"],"additionalProperties":false};function validate239(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;if(data && typeof data == "object" && !Array.isArray(data)){if(data.capability === undefined){const err0 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "capability"},message:"must have required property '"+"capability"+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}if(data.provider === undefined){const err1 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "provider"},message:"must have required property '"+"provider"+"'"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}for(const key0 in data){if(!((((key0 === "capability") || (key0 === "provider")) || (key0 === "baseUrl")) || (key0 === "basicAuthUsername"))){const err2 = {instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}}if(data.capability !== undefined){let data0 = data.capability;const _errs4 = errors;let valid2 = false;const _errs5 = errors;if("search" !== data0){const err3 = {instancePath:instancePath+"/capability",schemaPath:"aether:bindings#/definitions/SearchCap/anyOf/0/const",keyword:"const",params:{allowedValue: "search"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}var _valid0 = _errs5 === errors;valid2 = valid2 || _valid0;if(!valid2){const _errs6 = errors;if("fetch" !== data0){const err4 = {instancePath:instancePath+"/capability",schemaPath:"aether:bindings#/definitions/SearchCap/anyOf/1/const",keyword:"const",params:{allowedValue: "fetch"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}var _valid0 = _errs6 === errors;valid2 = valid2 || _valid0;}if(!valid2){const err5 = {instancePath:instancePath+"/capability",schemaPath:"aether:bindings#/definitions/SearchCap/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}else {errors = _errs4;if(vErrors !== null){if(_errs4){vErrors.length = _errs4;}else {vErrors = null;}}}}if(data.provider !== undefined){if(typeof data.provider !== "string"){const err6 = {instancePath:instancePath+"/provider",schemaPath:"#/properties/provider/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}}if(data.baseUrl !== undefined){if(typeof data.baseUrl !== "string"){const err7 = {instancePath:instancePath+"/baseUrl",schemaPath:"#/properties/baseUrl/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}}if(data.basicAuthUsername !== undefined){if(typeof data.basicAuthUsername !== "string"){const err8 = {instancePath:instancePath+"/basicAuthUsername",schemaPath:"#/properties/basicAuthUsername/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}}}else {const err9 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}validate239.errors = vErrors;return errors === 0;}function validate238(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="aether:validator:SearchSave" */;let vErrors = null;let errors = 0;if(!(validate239(data, {instancePath,parentData,parentDataProperty,rootData}))){vErrors = vErrors === null ? validate239.errors : vErrors.concat(validate239.errors);errors = vErrors.length;}validate238.errors = vErrors;return errors === 0;}export const validateSearchSettingsDto = validate241;const schema264 = {"$id":"aether:validator:SearchSettingsDto","$ref":"aether:bindings#/definitions/SearchSettingsDto"};const schema265 = {"type":"object","properties":{"capability":{"$ref":"aether:bindings#/definitions/SearchCap"},"defaultProvider":{"type":"string"},"providers":{"type":"array","items":{"$ref":"aether:bindings#/definitions/SearchProvider"}},"preferences":{"$ref":"aether:bindings#/definitions/SearchPreferences"}},"required":["capability","defaultProvider","providers","preferences"],"additionalProperties":false};function validate243(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;if(data && typeof data == "object" && !Array.isArray(data)){if(data.id === undefined){const err0 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "id"},message:"must have required property '"+"id"+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}if(data.name === undefined){const err1 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "name"},message:"must have required property '"+"name"+"'"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}if(data.description === undefined){const err2 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "description"},message:"must have required property '"+"description"+"'"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}if(data.keyMode === undefined){const err3 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "keyMode"},message:"must have required property '"+"keyMode"+"'"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}if(data.basicAuth === undefined){const err4 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "basicAuth"},message:"must have required property '"+"basicAuth"+"'"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}if(data.keys === undefined){const err5 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "keys"},message:"must have required property '"+"keys"+"'"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}if(data.ready === undefined){const err6 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "ready"},message:"must have required property '"+"ready"+"'"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}for(const key0 in data){if(!(func8.call(schema256.properties, key0))){const err7 = {instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}}if(data.id !== undefined){if(typeof data.id !== "string"){const err8 = {instancePath:instancePath+"/id",schemaPath:"#/properties/id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}}if(data.name !== undefined){if(typeof data.name !== "string"){const err9 = {instancePath:instancePath+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}}if(data.description !== undefined){if(typeof data.description !== "string"){const err10 = {instancePath:instancePath+"/description",schemaPath:"#/properties/description/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}}if(data.officialWebsite !== undefined){if(typeof data.officialWebsite !== "string"){const err11 = {instancePath:instancePath+"/officialWebsite",schemaPath:"#/properties/officialWebsite/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}}if(data.apiKeyWebsite !== undefined){if(typeof data.apiKeyWebsite !== "string"){const err12 = {instancePath:instancePath+"/apiKeyWebsite",schemaPath:"#/properties/apiKeyWebsite/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}}if(data.keyMode !== undefined){let data5 = data.keyMode;const _errs13 = errors;let valid1 = false;const _errs14 = errors;if("required" !== data5){const err13 = {instancePath:instancePath+"/keyMode",schemaPath:"#/properties/keyMode/anyOf/0/const",keyword:"const",params:{allowedValue: "required"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}var _valid0 = _errs14 === errors;valid1 = valid1 || _valid0;if(!valid1){const _errs15 = errors;if("optional" !== data5){const err14 = {instancePath:instancePath+"/keyMode",schemaPath:"#/properties/keyMode/anyOf/1/const",keyword:"const",params:{allowedValue: "optional"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err14];}else {vErrors.push(err14);}errors++;}var _valid0 = _errs15 === errors;valid1 = valid1 || _valid0;if(!valid1){const _errs16 = errors;if("none" !== data5){const err15 = {instancePath:instancePath+"/keyMode",schemaPath:"#/properties/keyMode/anyOf/2/const",keyword:"const",params:{allowedValue: "none"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err15];}else {vErrors.push(err15);}errors++;}var _valid0 = _errs16 === errors;valid1 = valid1 || _valid0;}}if(!valid1){const err16 = {instancePath:instancePath+"/keyMode",schemaPath:"#/properties/keyMode/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err16];}else {vErrors.push(err16);}errors++;}else {errors = _errs13;if(vErrors !== null){if(_errs13){vErrors.length = _errs13;}else {vErrors = null;}}}}if(data.basicAuth !== undefined){if(typeof data.basicAuth !== "boolean"){const err17 = {instancePath:instancePath+"/basicAuth",schemaPath:"#/properties/basicAuth/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"};if(vErrors === null){vErrors = [err17];}else {vErrors.push(err17);}errors++;}}if(data.defaultBaseUrl !== undefined){if(typeof data.defaultBaseUrl !== "string"){const err18 = {instancePath:instancePath+"/defaultBaseUrl",schemaPath:"#/properties/defaultBaseUrl/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err18];}else {vErrors.push(err18);}errors++;}}if(data.baseUrl !== undefined){if(typeof data.baseUrl !== "string"){const err19 = {instancePath:instancePath+"/baseUrl",schemaPath:"#/properties/baseUrl/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err19];}else {vErrors.push(err19);}errors++;}}if(data.basicAuthUsername !== undefined){if(typeof data.basicAuthUsername !== "string"){const err20 = {instancePath:instancePath+"/basicAuthUsername",schemaPath:"#/properties/basicAuthUsername/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err20];}else {vErrors.push(err20);}errors++;}}if(data.keys !== undefined){let data10 = data.keys;if(Array.isArray(data10)){const len0 = data10.length;for(let i0=0; i0<len0; i0++){let data11 = data10[i0];if(data11 && typeof data11 == "object" && !Array.isArray(data11)){if(data11.id === undefined){const err21 = {instancePath:instancePath+"/keys/" + i0,schemaPath:"aether:bindings#/definitions/SearchKey/required",keyword:"required",params:{missingProperty: "id"},message:"must have required property '"+"id"+"'"};if(vErrors === null){vErrors = [err21];}else {vErrors.push(err21);}errors++;}if(data11.masked === undefined){const err22 = {instancePath:instancePath+"/keys/" + i0,schemaPath:"aether:bindings#/definitions/SearchKey/required",keyword:"required",params:{missingProperty: "masked"},message:"must have required property '"+"masked"+"'"};if(vErrors === null){vErrors = [err22];}else {vErrors.push(err22);}errors++;}for(const key1 in data11){if(!((key1 === "id") || (key1 === "masked"))){const err23 = {instancePath:instancePath+"/keys/" + i0,schemaPath:"aether:bindings#/definitions/SearchKey/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key1},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err23];}else {vErrors.push(err23);}errors++;}}if(data11.id !== undefined){if(typeof data11.id !== "string"){const err24 = {instancePath:instancePath+"/keys/" + i0+"/id",schemaPath:"aether:bindings#/definitions/SearchKey/properties/id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err24];}else {vErrors.push(err24);}errors++;}}if(data11.masked !== undefined){if(typeof data11.masked !== "string"){const err25 = {instancePath:instancePath+"/keys/" + i0+"/masked",schemaPath:"aether:bindings#/definitions/SearchKey/properties/masked/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err25];}else {vErrors.push(err25);}errors++;}}}else {const err26 = {instancePath:instancePath+"/keys/" + i0,schemaPath:"aether:bindings#/definitions/SearchKey/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err26];}else {vErrors.push(err26);}errors++;}}}else {const err27 = {instancePath:instancePath+"/keys",schemaPath:"#/properties/keys/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err27];}else {vErrors.push(err27);}errors++;}}if(data.ready !== undefined){if(typeof data.ready !== "boolean"){const err28 = {instancePath:instancePath+"/ready",schemaPath:"#/properties/ready/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"};if(vErrors === null){vErrors = [err28];}else {vErrors.push(err28);}errors++;}}}else {const err29 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err29];}else {vErrors.push(err29);}errors++;}validate243.errors = vErrors;return errors === 0;}function validate242(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;if(data && typeof data == "object" && !Array.isArray(data)){if(data.capability === undefined){const err0 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "capability"},message:"must have required property '"+"capability"+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}if(data.defaultProvider === undefined){const err1 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "defaultProvider"},message:"must have required property '"+"defaultProvider"+"'"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}if(data.providers === undefined){const err2 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "providers"},message:"must have required property '"+"providers"+"'"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}if(data.preferences === undefined){const err3 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "preferences"},message:"must have required property '"+"preferences"+"'"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}for(const key0 in data){if(!((((key0 === "capability") || (key0 === "defaultProvider")) || (key0 === "providers")) || (key0 === "preferences"))){const err4 = {instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}}if(data.capability !== undefined){let data0 = data.capability;const _errs4 = errors;let valid2 = false;const _errs5 = errors;if("search" !== data0){const err5 = {instancePath:instancePath+"/capability",schemaPath:"aether:bindings#/definitions/SearchCap/anyOf/0/const",keyword:"const",params:{allowedValue: "search"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}var _valid0 = _errs5 === errors;valid2 = valid2 || _valid0;if(!valid2){const _errs6 = errors;if("fetch" !== data0){const err6 = {instancePath:instancePath+"/capability",schemaPath:"aether:bindings#/definitions/SearchCap/anyOf/1/const",keyword:"const",params:{allowedValue: "fetch"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}var _valid0 = _errs6 === errors;valid2 = valid2 || _valid0;}if(!valid2){const err7 = {instancePath:instancePath+"/capability",schemaPath:"aether:bindings#/definitions/SearchCap/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}else {errors = _errs4;if(vErrors !== null){if(_errs4){vErrors.length = _errs4;}else {vErrors = null;}}}}if(data.defaultProvider !== undefined){if(typeof data.defaultProvider !== "string"){const err8 = {instancePath:instancePath+"/defaultProvider",schemaPath:"#/properties/defaultProvider/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}}if(data.providers !== undefined){let data2 = data.providers;if(Array.isArray(data2)){const len0 = data2.length;for(let i0=0; i0<len0; i0++){if(!(validate243(data2[i0], {instancePath:instancePath+"/providers/" + i0,parentData:data2,parentDataProperty:i0,rootData}))){vErrors = vErrors === null ? validate243.errors : vErrors.concat(validate243.errors);errors = vErrors.length;}}}else {const err9 = {instancePath:instancePath+"/providers",schemaPath:"#/properties/providers/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}}if(data.preferences !== undefined){let data4 = data.preferences;if(data4 && typeof data4 == "object" && !Array.isArray(data4)){if(data4.maxResults === undefined){const err10 = {instancePath:instancePath+"/preferences",schemaPath:"aether:bindings#/definitions/SearchPreferences/required",keyword:"required",params:{missingProperty: "maxResults"},message:"must have required property '"+"maxResults"+"'"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}if(data4.compression === undefined){const err11 = {instancePath:instancePath+"/preferences",schemaPath:"aether:bindings#/definitions/SearchPreferences/required",keyword:"required",params:{missingProperty: "compression"},message:"must have required property '"+"compression"+"'"};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}if(data4.cutoffLimit === undefined){const err12 = {instancePath:instancePath+"/preferences",schemaPath:"aether:bindings#/definitions/SearchPreferences/required",keyword:"required",params:{missingProperty: "cutoffLimit"},message:"must have required property '"+"cutoffLimit"+"'"};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}if(data4.blacklist === undefined){const err13 = {instancePath:instancePath+"/preferences",schemaPath:"aether:bindings#/definitions/SearchPreferences/required",keyword:"required",params:{missingProperty: "blacklist"},message:"must have required property '"+"blacklist"+"'"};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}if(data4.modelToolsPreferred === undefined){const err14 = {instancePath:instancePath+"/preferences",schemaPath:"aether:bindings#/definitions/SearchPreferences/required",keyword:"required",params:{missingProperty: "modelToolsPreferred"},message:"must have required property '"+"modelToolsPreferred"+"'"};if(vErrors === null){vErrors = [err14];}else {vErrors.push(err14);}errors++;}for(const key1 in data4){if(!(((((key1 === "maxResults") || (key1 === "compression")) || (key1 === "cutoffLimit")) || (key1 === "blacklist")) || (key1 === "modelToolsPreferred"))){const err15 = {instancePath:instancePath+"/preferences",schemaPath:"aether:bindings#/definitions/SearchPreferences/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key1},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err15];}else {vErrors.push(err15);}errors++;}}if(data4.maxResults !== undefined){let data5 = data4.maxResults;if(!((typeof data5 == "number") && (isFinite(data5)))){const err16 = {instancePath:instancePath+"/preferences/maxResults",schemaPath:"aether:bindings#/definitions/SearchPreferences/properties/maxResults/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err16];}else {vErrors.push(err16);}errors++;}}if(data4.compression !== undefined){let data6 = data4.compression;const _errs19 = errors;let valid7 = false;const _errs20 = errors;if("none" !== data6){const err17 = {instancePath:instancePath+"/preferences/compression",schemaPath:"aether:bindings#/definitions/SearchPreferences/properties/compression/anyOf/0/const",keyword:"const",params:{allowedValue: "none"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err17];}else {vErrors.push(err17);}errors++;}var _valid1 = _errs20 === errors;valid7 = valid7 || _valid1;if(!valid7){const _errs21 = errors;if("cutoff" !== data6){const err18 = {instancePath:instancePath+"/preferences/compression",schemaPath:"aether:bindings#/definitions/SearchPreferences/properties/compression/anyOf/1/const",keyword:"const",params:{allowedValue: "cutoff"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err18];}else {vErrors.push(err18);}errors++;}var _valid1 = _errs21 === errors;valid7 = valid7 || _valid1;}if(!valid7){const err19 = {instancePath:instancePath+"/preferences/compression",schemaPath:"aether:bindings#/definitions/SearchPreferences/properties/compression/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err19];}else {vErrors.push(err19);}errors++;}else {errors = _errs19;if(vErrors !== null){if(_errs19){vErrors.length = _errs19;}else {vErrors = null;}}}}if(data4.cutoffLimit !== undefined){let data7 = data4.cutoffLimit;if(!((typeof data7 == "number") && (isFinite(data7)))){const err20 = {instancePath:instancePath+"/preferences/cutoffLimit",schemaPath:"aether:bindings#/definitions/SearchPreferences/properties/cutoffLimit/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err20];}else {vErrors.push(err20);}errors++;}}if(data4.blacklist !== undefined){let data8 = data4.blacklist;if(Array.isArray(data8)){const len1 = data8.length;for(let i1=0; i1<len1; i1++){if(typeof data8[i1] !== "string"){const err21 = {instancePath:instancePath+"/preferences/blacklist/" + i1,schemaPath:"aether:bindings#/definitions/SearchPreferences/properties/blacklist/items/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err21];}else {vErrors.push(err21);}errors++;}}}else {const err22 = {instancePath:instancePath+"/preferences/blacklist",schemaPath:"aether:bindings#/definitions/SearchPreferences/properties/blacklist/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err22];}else {vErrors.push(err22);}errors++;}}if(data4.modelToolsPreferred !== undefined){if(typeof data4.modelToolsPreferred !== "boolean"){const err23 = {instancePath:instancePath+"/preferences/modelToolsPreferred",schemaPath:"aether:bindings#/definitions/SearchPreferences/properties/modelToolsPreferred/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"};if(vErrors === null){vErrors = [err23];}else {vErrors.push(err23);}errors++;}}}else {const err24 = {instancePath:instancePath+"/preferences",schemaPath:"aether:bindings#/definitions/SearchPreferences/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err24];}else {vErrors.push(err24);}errors++;}}}else {const err25 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err25];}else {vErrors.push(err25);}errors++;}validate242.errors = vErrors;return errors === 0;}function validate241(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="aether:validator:SearchSettingsDto" */;let vErrors = null;let errors = 0;if(!(validate242(data, {instancePath,parentData,parentDataProperty,rootData}))){vErrors = vErrors === null ? validate242.errors : vErrors.concat(validate242.errors);errors = vErrors.length;}validate241.errors = vErrors;return errors === 0;}export const validateServerDto = validate246;const schema270 = {"$id":"aether:validator:ServerDto","$ref":"aether:bindings#/definitions/ServerDto"};const schema271 = {"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"transport":{"$ref":"aether:bindings#/definitions/McpTransport"},"secretKeys":{"type":"array","items":{"type":"string"}},"enabled":{"type":"boolean"},"trusted":{"type":"boolean"},"allowPrivate":{"type":"boolean"},"tools":{"type":"array","items":{"$ref":"aether:bindings#/definitions/ToolDto"}}},"required":["id","slug","name","transport","secretKeys","enabled","trusted","allowPrivate","tools"],"additionalProperties":false};const schema273 = {"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"readOnly":{"type":"boolean"},"approval":{"$ref":"aether:bindings#/definitions/Approval"}},"required":["name","description","readOnly","approval"],"additionalProperties":false};const schema274 = {"anyOf":[{"const":"auto"},{"const":"ask"},{"const":"deny"}]};function validate248(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;if(data && typeof data == "object" && !Array.isArray(data)){if(data.name === undefined){const err0 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "name"},message:"must have required property '"+"name"+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}if(data.description === undefined){const err1 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "description"},message:"must have required property '"+"description"+"'"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}if(data.readOnly === undefined){const err2 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "readOnly"},message:"must have required property '"+"readOnly"+"'"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}if(data.approval === undefined){const err3 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "approval"},message:"must have required property '"+"approval"+"'"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}for(const key0 in data){if(!((((key0 === "name") || (key0 === "description")) || (key0 === "readOnly")) || (key0 === "approval"))){const err4 = {instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}}if(data.name !== undefined){if(typeof data.name !== "string"){const err5 = {instancePath:instancePath+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}}if(data.description !== undefined){if(typeof data.description !== "string"){const err6 = {instancePath:instancePath+"/description",schemaPath:"#/properties/description/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}}if(data.readOnly !== undefined){if(typeof data.readOnly !== "boolean"){const err7 = {instancePath:instancePath+"/readOnly",schemaPath:"#/properties/readOnly/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}}if(data.approval !== undefined){let data3 = data.approval;const _errs10 = errors;let valid2 = false;const _errs11 = errors;if("auto" !== data3){const err8 = {instancePath:instancePath+"/approval",schemaPath:"aether:bindings#/definitions/Approval/anyOf/0/const",keyword:"const",params:{allowedValue: "auto"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}var _valid0 = _errs11 === errors;valid2 = valid2 || _valid0;if(!valid2){const _errs12 = errors;if("ask" !== data3){const err9 = {instancePath:instancePath+"/approval",schemaPath:"aether:bindings#/definitions/Approval/anyOf/1/const",keyword:"const",params:{allowedValue: "ask"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}var _valid0 = _errs12 === errors;valid2 = valid2 || _valid0;if(!valid2){const _errs13 = errors;if("deny" !== data3){const err10 = {instancePath:instancePath+"/approval",schemaPath:"aether:bindings#/definitions/Approval/anyOf/2/const",keyword:"const",params:{allowedValue: "deny"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}var _valid0 = _errs13 === errors;valid2 = valid2 || _valid0;}}if(!valid2){const err11 = {instancePath:instancePath+"/approval",schemaPath:"aether:bindings#/definitions/Approval/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}else {errors = _errs10;if(vErrors !== null){if(_errs10){vErrors.length = _errs10;}else {vErrors = null;}}}}}else {const err12 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}validate248.errors = vErrors;return errors === 0;}function validate247(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;if(data && typeof data == "object" && !Array.isArray(data)){if(data.id === undefined){const err0 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "id"},message:"must have required property '"+"id"+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}if(data.slug === undefined){const err1 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "slug"},message:"must have required property '"+"slug"+"'"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}if(data.name === undefined){const err2 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "name"},message:"must have required property '"+"name"+"'"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}if(data.transport === undefined){const err3 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "transport"},message:"must have required property '"+"transport"+"'"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}if(data.secretKeys === undefined){const err4 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "secretKeys"},message:"must have required property '"+"secretKeys"+"'"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}if(data.enabled === undefined){const err5 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "enabled"},message:"must have required property '"+"enabled"+"'"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}if(data.trusted === undefined){const err6 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "trusted"},message:"must have required property '"+"trusted"+"'"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}if(data.allowPrivate === undefined){const err7 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "allowPrivate"},message:"must have required property '"+"allowPrivate"+"'"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}if(data.tools === undefined){const err8 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "tools"},message:"must have required property '"+"tools"+"'"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}for(const key0 in data){if(!(func8.call(schema271.properties, key0))){const err9 = {instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}}if(data.id !== undefined){if(typeof data.id !== "string"){const err10 = {instancePath:instancePath+"/id",schemaPath:"#/properties/id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}}if(data.slug !== undefined){if(typeof data.slug !== "string"){const err11 = {instancePath:instancePath+"/slug",schemaPath:"#/properties/slug/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}}if(data.name !== undefined){if(typeof data.name !== "string"){const err12 = {instancePath:instancePath+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}}if(data.transport !== undefined){let data3 = data.transport;const _errs10 = errors;let valid2 = false;const _errs11 = errors;if(data3 && typeof data3 == "object" && !Array.isArray(data3)){if(data3.kind === undefined){const err13 = {instancePath:instancePath+"/transport",schemaPath:"aether:bindings#/definitions/McpTransport/anyOf/0/required",keyword:"required",params:{missingProperty: "kind"},message:"must have required property '"+"kind"+"'"};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}if(data3.url === undefined){const err14 = {instancePath:instancePath+"/transport",schemaPath:"aether:bindings#/definitions/McpTransport/anyOf/0/required",keyword:"required",params:{missingProperty: "url"},message:"must have required property '"+"url"+"'"};if(vErrors === null){vErrors = [err14];}else {vErrors.push(err14);}errors++;}for(const key1 in data3){if(!((key1 === "kind") || (key1 === "url"))){const err15 = {instancePath:instancePath+"/transport",schemaPath:"aether:bindings#/definitions/McpTransport/anyOf/0/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key1},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err15];}else {vErrors.push(err15);}errors++;}}if(data3.kind !== undefined){if("http" !== data3.kind){const err16 = {instancePath:instancePath+"/transport/kind",schemaPath:"aether:bindings#/definitions/McpTransport/anyOf/0/properties/kind/const",keyword:"const",params:{allowedValue: "http"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err16];}else {vErrors.push(err16);}errors++;}}if(data3.url !== undefined){if(typeof data3.url !== "string"){const err17 = {instancePath:instancePath+"/transport/url",schemaPath:"aether:bindings#/definitions/McpTransport/anyOf/0/properties/url/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err17];}else {vErrors.push(err17);}errors++;}}}else {const err18 = {instancePath:instancePath+"/transport",schemaPath:"aether:bindings#/definitions/McpTransport/anyOf/0/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err18];}else {vErrors.push(err18);}errors++;}var _valid0 = _errs11 === errors;valid2 = valid2 || _valid0;if(!valid2){const _errs17 = errors;if(data3 && typeof data3 == "object" && !Array.isArray(data3)){if(data3.kind === undefined){const err19 = {instancePath:instancePath+"/transport",schemaPath:"aether:bindings#/definitions/McpTransport/anyOf/1/required",keyword:"required",params:{missingProperty: "kind"},message:"must have required property '"+"kind"+"'"};if(vErrors === null){vErrors = [err19];}else {vErrors.push(err19);}errors++;}if(data3.command === undefined){const err20 = {instancePath:instancePath+"/transport",schemaPath:"aether:bindings#/definitions/McpTransport/anyOf/1/required",keyword:"required",params:{missingProperty: "command"},message:"must have required property '"+"command"+"'"};if(vErrors === null){vErrors = [err20];}else {vErrors.push(err20);}errors++;}if(data3.args === undefined){const err21 = {instancePath:instancePath+"/transport",schemaPath:"aether:bindings#/definitions/McpTransport/anyOf/1/required",keyword:"required",params:{missingProperty: "args"},message:"must have required property '"+"args"+"'"};if(vErrors === null){vErrors = [err21];}else {vErrors.push(err21);}errors++;}for(const key2 in data3){if(!((((key2 === "kind") || (key2 === "command")) || (key2 === "args")) || (key2 === "cwd"))){const err22 = {instancePath:instancePath+"/transport",schemaPath:"aether:bindings#/definitions/McpTransport/anyOf/1/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key2},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err22];}else {vErrors.push(err22);}errors++;}}if(data3.kind !== undefined){if("stdio" !== data3.kind){const err23 = {instancePath:instancePath+"/transport/kind",schemaPath:"aether:bindings#/definitions/McpTransport/anyOf/1/properties/kind/const",keyword:"const",params:{allowedValue: "stdio"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err23];}else {vErrors.push(err23);}errors++;}}if(data3.command !== undefined){if(typeof data3.command !== "string"){const err24 = {instancePath:instancePath+"/transport/command",schemaPath:"aether:bindings#/definitions/McpTransport/anyOf/1/properties/command/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err24];}else {vErrors.push(err24);}errors++;}}if(data3.args !== undefined){let data8 = data3.args;if(Array.isArray(data8)){const len0 = data8.length;for(let i0=0; i0<len0; i0++){if(typeof data8[i0] !== "string"){const err25 = {instancePath:instancePath+"/transport/args/" + i0,schemaPath:"aether:bindings#/definitions/McpTransport/anyOf/1/properties/args/items/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err25];}else {vErrors.push(err25);}errors++;}}}else {const err26 = {instancePath:instancePath+"/transport/args",schemaPath:"aether:bindings#/definitions/McpTransport/anyOf/1/properties/args/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err26];}else {vErrors.push(err26);}errors++;}}if(data3.cwd !== undefined){if(typeof data3.cwd !== "string"){const err27 = {instancePath:instancePath+"/transport/cwd",schemaPath:"aether:bindings#/definitions/McpTransport/anyOf/1/properties/cwd/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err27];}else {vErrors.push(err27);}errors++;}}}else {const err28 = {instancePath:instancePath+"/transport",schemaPath:"aether:bindings#/definitions/McpTransport/anyOf/1/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err28];}else {vErrors.push(err28);}errors++;}var _valid0 = _errs17 === errors;valid2 = valid2 || _valid0;}if(!valid2){const err29 = {instancePath:instancePath+"/transport",schemaPath:"aether:bindings#/definitions/McpTransport/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err29];}else {vErrors.push(err29);}errors++;}else {errors = _errs10;if(vErrors !== null){if(_errs10){vErrors.length = _errs10;}else {vErrors = null;}}}}if(data.secretKeys !== undefined){let data11 = data.secretKeys;if(Array.isArray(data11)){const len1 = data11.length;for(let i1=0; i1<len1; i1++){if(typeof data11[i1] !== "string"){const err30 = {instancePath:instancePath+"/secretKeys/" + i1,schemaPath:"#/properties/secretKeys/items/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err30];}else {vErrors.push(err30);}errors++;}}}else {const err31 = {instancePath:instancePath+"/secretKeys",schemaPath:"#/properties/secretKeys/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err31];}else {vErrors.push(err31);}errors++;}}if(data.enabled !== undefined){if(typeof data.enabled !== "boolean"){const err32 = {instancePath:instancePath+"/enabled",schemaPath:"#/properties/enabled/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"};if(vErrors === null){vErrors = [err32];}else {vErrors.push(err32);}errors++;}}if(data.trusted !== undefined){if(typeof data.trusted !== "boolean"){const err33 = {instancePath:instancePath+"/trusted",schemaPath:"#/properties/trusted/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"};if(vErrors === null){vErrors = [err33];}else {vErrors.push(err33);}errors++;}}if(data.allowPrivate !== undefined){if(typeof data.allowPrivate !== "boolean"){const err34 = {instancePath:instancePath+"/allowPrivate",schemaPath:"#/properties/allowPrivate/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"};if(vErrors === null){vErrors = [err34];}else {vErrors.push(err34);}errors++;}}if(data.tools !== undefined){let data16 = data.tools;if(Array.isArray(data16)){const len2 = data16.length;for(let i2=0; i2<len2; i2++){if(!(validate248(data16[i2], {instancePath:instancePath+"/tools/" + i2,parentData:data16,parentDataProperty:i2,rootData}))){vErrors = vErrors === null ? validate248.errors : vErrors.concat(validate248.errors);errors = vErrors.length;}}}else {const err35 = {instancePath:instancePath+"/tools",schemaPath:"#/properties/tools/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err35];}else {vErrors.push(err35);}errors++;}}}else {const err36 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err36];}else {vErrors.push(err36);}errors++;}validate247.errors = vErrors;return errors === 0;}function validate246(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="aether:validator:ServerDto" */;let vErrors = null;let errors = 0;if(!(validate247(data, {instancePath,parentData,parentDataProperty,rootData}))){vErrors = vErrors === null ? validate247.errors : vErrors.concat(validate247.errors);errors = vErrors.length;}validate246.errors = vErrors;return errors === 0;}export const validateServerSave = validate251;const schema275 = {"$id":"aether:validator:ServerSave","$ref":"aether:bindings#/definitions/ServerSave"};const schema276 = {"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"transport":{"$ref":"aether:bindings#/definitions/McpTransport"},"secret":{"$ref":"aether:bindings#/definitions/ServerSecret"},"enabled":{"type":"boolean"},"trusted":{"type":"boolean"},"allowPrivate":{"type":"boolean"}},"required":["slug","name","transport","enabled","trusted","allowPrivate"],"additionalProperties":false};const schema278 = {"type":"object","properties":{"headers":{"type":"object","additionalProperties":{"type":"string"}},"query":{"type":"object","additionalProperties":{"type":"string"}},"env":{"type":"object","additionalProperties":{"type":"string"}}},"required":[],"additionalProperties":false};function validate252(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;if(data && typeof data == "object" && !Array.isArray(data)){if(data.slug === undefined){const err0 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "slug"},message:"must have required property '"+"slug"+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}if(data.name === undefined){const err1 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "name"},message:"must have required property '"+"name"+"'"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}if(data.transport === undefined){const err2 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "transport"},message:"must have required property '"+"transport"+"'"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}if(data.enabled === undefined){const err3 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "enabled"},message:"must have required property '"+"enabled"+"'"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}if(data.trusted === undefined){const err4 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "trusted"},message:"must have required property '"+"trusted"+"'"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}if(data.allowPrivate === undefined){const err5 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "allowPrivate"},message:"must have required property '"+"allowPrivate"+"'"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}for(const key0 in data){if(!((((((((key0 === "id") || (key0 === "slug")) || (key0 === "name")) || (key0 === "transport")) || (key0 === "secret")) || (key0 === "enabled")) || (key0 === "trusted")) || (key0 === "allowPrivate"))){const err6 = {instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}}if(data.id !== undefined){if(typeof data.id !== "string"){const err7 = {instancePath:instancePath+"/id",schemaPath:"#/properties/id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}}if(data.slug !== undefined){if(typeof data.slug !== "string"){const err8 = {instancePath:instancePath+"/slug",schemaPath:"#/properties/slug/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}}if(data.name !== undefined){if(typeof data.name !== "string"){const err9 = {instancePath:instancePath+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}}if(data.transport !== undefined){let data3 = data.transport;const _errs10 = errors;let valid2 = false;const _errs11 = errors;if(data3 && typeof data3 == "object" && !Array.isArray(data3)){if(data3.kind === undefined){const err10 = {instancePath:instancePath+"/transport",schemaPath:"aether:bindings#/definitions/McpTransport/anyOf/0/required",keyword:"required",params:{missingProperty: "kind"},message:"must have required property '"+"kind"+"'"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}if(data3.url === undefined){const err11 = {instancePath:instancePath+"/transport",schemaPath:"aether:bindings#/definitions/McpTransport/anyOf/0/required",keyword:"required",params:{missingProperty: "url"},message:"must have required property '"+"url"+"'"};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}for(const key1 in data3){if(!((key1 === "kind") || (key1 === "url"))){const err12 = {instancePath:instancePath+"/transport",schemaPath:"aether:bindings#/definitions/McpTransport/anyOf/0/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key1},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}}if(data3.kind !== undefined){if("http" !== data3.kind){const err13 = {instancePath:instancePath+"/transport/kind",schemaPath:"aether:bindings#/definitions/McpTransport/anyOf/0/properties/kind/const",keyword:"const",params:{allowedValue: "http"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}}if(data3.url !== undefined){if(typeof data3.url !== "string"){const err14 = {instancePath:instancePath+"/transport/url",schemaPath:"aether:bindings#/definitions/McpTransport/anyOf/0/properties/url/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err14];}else {vErrors.push(err14);}errors++;}}}else {const err15 = {instancePath:instancePath+"/transport",schemaPath:"aether:bindings#/definitions/McpTransport/anyOf/0/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err15];}else {vErrors.push(err15);}errors++;}var _valid0 = _errs11 === errors;valid2 = valid2 || _valid0;if(!valid2){const _errs17 = errors;if(data3 && typeof data3 == "object" && !Array.isArray(data3)){if(data3.kind === undefined){const err16 = {instancePath:instancePath+"/transport",schemaPath:"aether:bindings#/definitions/McpTransport/anyOf/1/required",keyword:"required",params:{missingProperty: "kind"},message:"must have required property '"+"kind"+"'"};if(vErrors === null){vErrors = [err16];}else {vErrors.push(err16);}errors++;}if(data3.command === undefined){const err17 = {instancePath:instancePath+"/transport",schemaPath:"aether:bindings#/definitions/McpTransport/anyOf/1/required",keyword:"required",params:{missingProperty: "command"},message:"must have required property '"+"command"+"'"};if(vErrors === null){vErrors = [err17];}else {vErrors.push(err17);}errors++;}if(data3.args === undefined){const err18 = {instancePath:instancePath+"/transport",schemaPath:"aether:bindings#/definitions/McpTransport/anyOf/1/required",keyword:"required",params:{missingProperty: "args"},message:"must have required property '"+"args"+"'"};if(vErrors === null){vErrors = [err18];}else {vErrors.push(err18);}errors++;}for(const key2 in data3){if(!((((key2 === "kind") || (key2 === "command")) || (key2 === "args")) || (key2 === "cwd"))){const err19 = {instancePath:instancePath+"/transport",schemaPath:"aether:bindings#/definitions/McpTransport/anyOf/1/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key2},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err19];}else {vErrors.push(err19);}errors++;}}if(data3.kind !== undefined){if("stdio" !== data3.kind){const err20 = {instancePath:instancePath+"/transport/kind",schemaPath:"aether:bindings#/definitions/McpTransport/anyOf/1/properties/kind/const",keyword:"const",params:{allowedValue: "stdio"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err20];}else {vErrors.push(err20);}errors++;}}if(data3.command !== undefined){if(typeof data3.command !== "string"){const err21 = {instancePath:instancePath+"/transport/command",schemaPath:"aether:bindings#/definitions/McpTransport/anyOf/1/properties/command/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err21];}else {vErrors.push(err21);}errors++;}}if(data3.args !== undefined){let data8 = data3.args;if(Array.isArray(data8)){const len0 = data8.length;for(let i0=0; i0<len0; i0++){if(typeof data8[i0] !== "string"){const err22 = {instancePath:instancePath+"/transport/args/" + i0,schemaPath:"aether:bindings#/definitions/McpTransport/anyOf/1/properties/args/items/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err22];}else {vErrors.push(err22);}errors++;}}}else {const err23 = {instancePath:instancePath+"/transport/args",schemaPath:"aether:bindings#/definitions/McpTransport/anyOf/1/properties/args/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err23];}else {vErrors.push(err23);}errors++;}}if(data3.cwd !== undefined){if(typeof data3.cwd !== "string"){const err24 = {instancePath:instancePath+"/transport/cwd",schemaPath:"aether:bindings#/definitions/McpTransport/anyOf/1/properties/cwd/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err24];}else {vErrors.push(err24);}errors++;}}}else {const err25 = {instancePath:instancePath+"/transport",schemaPath:"aether:bindings#/definitions/McpTransport/anyOf/1/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err25];}else {vErrors.push(err25);}errors++;}var _valid0 = _errs17 === errors;valid2 = valid2 || _valid0;}if(!valid2){const err26 = {instancePath:instancePath+"/transport",schemaPath:"aether:bindings#/definitions/McpTransport/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err26];}else {vErrors.push(err26);}errors++;}else {errors = _errs10;if(vErrors !== null){if(_errs10){vErrors.length = _errs10;}else {vErrors = null;}}}}if(data.secret !== undefined){let data11 = data.secret;if(data11 && typeof data11 == "object" && !Array.isArray(data11)){for(const key3 in data11){if(!(((key3 === "headers") || (key3 === "query")) || (key3 === "env"))){const err27 = {instancePath:instancePath+"/secret",schemaPath:"aether:bindings#/definitions/ServerSecret/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key3},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err27];}else {vErrors.push(err27);}errors++;}}if(data11.headers !== undefined){let data12 = data11.headers;if(data12 && typeof data12 == "object" && !Array.isArray(data12)){for(const key4 in data12){if(typeof data12[key4] !== "string"){const err28 = {instancePath:instancePath+"/secret/headers/" + key4.replace(/~/g, "~0").replace(/\//g, "~1"),schemaPath:"aether:bindings#/definitions/ServerSecret/properties/headers/additionalProperties/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err28];}else {vErrors.push(err28);}errors++;}}}else {const err29 = {instancePath:instancePath+"/secret/headers",schemaPath:"aether:bindings#/definitions/ServerSecret/properties/headers/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err29];}else {vErrors.push(err29);}errors++;}}if(data11.query !== undefined){let data14 = data11.query;if(data14 && typeof data14 == "object" && !Array.isArray(data14)){for(const key5 in data14){if(typeof data14[key5] !== "string"){const err30 = {instancePath:instancePath+"/secret/query/" + key5.replace(/~/g, "~0").replace(/\//g, "~1"),schemaPath:"aether:bindings#/definitions/ServerSecret/properties/query/additionalProperties/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err30];}else {vErrors.push(err30);}errors++;}}}else {const err31 = {instancePath:instancePath+"/secret/query",schemaPath:"aether:bindings#/definitions/ServerSecret/properties/query/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err31];}else {vErrors.push(err31);}errors++;}}if(data11.env !== undefined){let data16 = data11.env;if(data16 && typeof data16 == "object" && !Array.isArray(data16)){for(const key6 in data16){if(typeof data16[key6] !== "string"){const err32 = {instancePath:instancePath+"/secret/env/" + key6.replace(/~/g, "~0").replace(/\//g, "~1"),schemaPath:"aether:bindings#/definitions/ServerSecret/properties/env/additionalProperties/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err32];}else {vErrors.push(err32);}errors++;}}}else {const err33 = {instancePath:instancePath+"/secret/env",schemaPath:"aether:bindings#/definitions/ServerSecret/properties/env/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err33];}else {vErrors.push(err33);}errors++;}}}else {const err34 = {instancePath:instancePath+"/secret",schemaPath:"aether:bindings#/definitions/ServerSecret/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err34];}else {vErrors.push(err34);}errors++;}}if(data.enabled !== undefined){if(typeof data.enabled !== "boolean"){const err35 = {instancePath:instancePath+"/enabled",schemaPath:"#/properties/enabled/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"};if(vErrors === null){vErrors = [err35];}else {vErrors.push(err35);}errors++;}}if(data.trusted !== undefined){if(typeof data.trusted !== "boolean"){const err36 = {instancePath:instancePath+"/trusted",schemaPath:"#/properties/trusted/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"};if(vErrors === null){vErrors = [err36];}else {vErrors.push(err36);}errors++;}}if(data.allowPrivate !== undefined){if(typeof data.allowPrivate !== "boolean"){const err37 = {instancePath:instancePath+"/allowPrivate",schemaPath:"#/properties/allowPrivate/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"};if(vErrors === null){vErrors = [err37];}else {vErrors.push(err37);}errors++;}}}else {const err38 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err38];}else {vErrors.push(err38);}errors++;}validate252.errors = vErrors;return errors === 0;}function validate251(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="aether:validator:ServerSave" */;let vErrors = null;let errors = 0;if(!(validate252(data, {instancePath,parentData,parentDataProperty,rootData}))){vErrors = vErrors === null ? validate252.errors : vErrors.concat(validate252.errors);errors = vErrors.length;}validate251.errors = vErrors;return errors === 0;}export const validateServerSecret = validate254;const schema279 = {"$id":"aether:validator:ServerSecret","$ref":"aether:bindings#/definitions/ServerSecret"};function validate254(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="aether:validator:ServerSecret" */;let vErrors = null;let errors = 0;if(data && typeof data == "object" && !Array.isArray(data)){for(const key0 in data){if(!(((key0 === "headers") || (key0 === "query")) || (key0 === "env"))){const err0 = {instancePath,schemaPath:"aether:bindings#/definitions/ServerSecret/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}}if(data.headers !== undefined){let data0 = data.headers;if(data0 && typeof data0 == "object" && !Array.isArray(data0)){for(const key1 in data0){if(typeof data0[key1] !== "string"){const err1 = {instancePath:instancePath+"/headers/" + key1.replace(/~/g, "~0").replace(/\//g, "~1"),schemaPath:"aether:bindings#/definitions/ServerSecret/properties/headers/additionalProperties/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}}}else {const err2 = {instancePath:instancePath+"/headers",schemaPath:"aether:bindings#/definitions/ServerSecret/properties/headers/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}}if(data.query !== undefined){let data2 = data.query;if(data2 && typeof data2 == "object" && !Array.isArray(data2)){for(const key2 in data2){if(typeof data2[key2] !== "string"){const err3 = {instancePath:instancePath+"/query/" + key2.replace(/~/g, "~0").replace(/\//g, "~1"),schemaPath:"aether:bindings#/definitions/ServerSecret/properties/query/additionalProperties/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}}}else {const err4 = {instancePath:instancePath+"/query",schemaPath:"aether:bindings#/definitions/ServerSecret/properties/query/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}}if(data.env !== undefined){let data4 = data.env;if(data4 && typeof data4 == "object" && !Array.isArray(data4)){for(const key3 in data4){if(typeof data4[key3] !== "string"){const err5 = {instancePath:instancePath+"/env/" + key3.replace(/~/g, "~0").replace(/\//g, "~1"),schemaPath:"aether:bindings#/definitions/ServerSecret/properties/env/additionalProperties/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}}}else {const err6 = {instancePath:instancePath+"/env",schemaPath:"aether:bindings#/definitions/ServerSecret/properties/env/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}}}else {const err7 = {instancePath,schemaPath:"aether:bindings#/definitions/ServerSecret/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}validate254.errors = vErrors;return errors === 0;}export const validateSkillDto = validate255;const schema281 = {"$id":"aether:validator:SkillDto","$ref":"aether:bindings#/definitions/SkillDto"};const schema282 = {"type":"object","properties":{"body":{"type":"string"},"license":{"anyOf":[{"type":"string"},{"type":"null"}]},"extra":{"type":"object","additionalProperties":{"type":"string"}},"files":{"type":"array","items":{"$ref":"aether:bindings#/definitions/SkillFileMeta"}},"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"version":{"anyOf":[{"type":"string"},{"type":"null"}]},"origin":{"$ref":"aether:bindings#/definitions/SkillOrigin"},"revision":{"type":"number"},"bodyChars":{"type":"number"},"updatedAt":{"type":"number"},"hasScripts":{"type":"boolean"},"fileCount":{"type":"number"}},"required":["body","license","extra","files","id","name","description","version","origin","revision","bodyChars","updatedAt","hasScripts","fileCount"],"additionalProperties":false};const schema283 = {"anyOf":[{"const":"imported"},{"const":"manual"},{"const":"builtin"}]};function validate256(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;if(data && typeof data == "object" && !Array.isArray(data)){if(data.body === undefined){const err0 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "body"},message:"must have required property '"+"body"+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}if(data.license === undefined){const err1 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "license"},message:"must have required property '"+"license"+"'"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}if(data.extra === undefined){const err2 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "extra"},message:"must have required property '"+"extra"+"'"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}if(data.files === undefined){const err3 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "files"},message:"must have required property '"+"files"+"'"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}if(data.id === undefined){const err4 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "id"},message:"must have required property '"+"id"+"'"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}if(data.name === undefined){const err5 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "name"},message:"must have required property '"+"name"+"'"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}if(data.description === undefined){const err6 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "description"},message:"must have required property '"+"description"+"'"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}if(data.version === undefined){const err7 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "version"},message:"must have required property '"+"version"+"'"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}if(data.origin === undefined){const err8 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "origin"},message:"must have required property '"+"origin"+"'"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}if(data.revision === undefined){const err9 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "revision"},message:"must have required property '"+"revision"+"'"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}if(data.bodyChars === undefined){const err10 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "bodyChars"},message:"must have required property '"+"bodyChars"+"'"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}if(data.updatedAt === undefined){const err11 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "updatedAt"},message:"must have required property '"+"updatedAt"+"'"};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}if(data.hasScripts === undefined){const err12 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "hasScripts"},message:"must have required property '"+"hasScripts"+"'"};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}if(data.fileCount === undefined){const err13 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "fileCount"},message:"must have required property '"+"fileCount"+"'"};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}for(const key0 in data){if(!(func8.call(schema282.properties, key0))){const err14 = {instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err14];}else {vErrors.push(err14);}errors++;}}if(data.body !== undefined){if(typeof data.body !== "string"){const err15 = {instancePath:instancePath+"/body",schemaPath:"#/properties/body/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err15];}else {vErrors.push(err15);}errors++;}}if(data.license !== undefined){let data1 = data.license;const _errs5 = errors;let valid1 = false;const _errs6 = errors;if(typeof data1 !== "string"){const err16 = {instancePath:instancePath+"/license",schemaPath:"#/properties/license/anyOf/0/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err16];}else {vErrors.push(err16);}errors++;}var _valid0 = _errs6 === errors;valid1 = valid1 || _valid0;if(!valid1){const _errs8 = errors;if(data1 !== null){const err17 = {instancePath:instancePath+"/license",schemaPath:"#/properties/license/anyOf/1/type",keyword:"type",params:{type: "null"},message:"must be null"};if(vErrors === null){vErrors = [err17];}else {vErrors.push(err17);}errors++;}var _valid0 = _errs8 === errors;valid1 = valid1 || _valid0;}if(!valid1){const err18 = {instancePath:instancePath+"/license",schemaPath:"#/properties/license/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err18];}else {vErrors.push(err18);}errors++;}else {errors = _errs5;if(vErrors !== null){if(_errs5){vErrors.length = _errs5;}else {vErrors = null;}}}}if(data.extra !== undefined){let data2 = data.extra;if(data2 && typeof data2 == "object" && !Array.isArray(data2)){for(const key1 in data2){if(typeof data2[key1] !== "string"){const err19 = {instancePath:instancePath+"/extra/" + key1.replace(/~/g, "~0").replace(/\//g, "~1"),schemaPath:"#/properties/extra/additionalProperties/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err19];}else {vErrors.push(err19);}errors++;}}}else {const err20 = {instancePath:instancePath+"/extra",schemaPath:"#/properties/extra/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err20];}else {vErrors.push(err20);}errors++;}}if(data.files !== undefined){let data4 = data.files;if(Array.isArray(data4)){const len0 = data4.length;for(let i0=0; i0<len0; i0++){if(!(validate140(data4[i0], {instancePath:instancePath+"/files/" + i0,parentData:data4,parentDataProperty:i0,rootData}))){vErrors = vErrors === null ? validate140.errors : vErrors.concat(validate140.errors);errors = vErrors.length;}}}else {const err21 = {instancePath:instancePath+"/files",schemaPath:"#/properties/files/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err21];}else {vErrors.push(err21);}errors++;}}if(data.id !== undefined){if(typeof data.id !== "string"){const err22 = {instancePath:instancePath+"/id",schemaPath:"#/properties/id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err22];}else {vErrors.push(err22);}errors++;}}if(data.name !== undefined){if(typeof data.name !== "string"){const err23 = {instancePath:instancePath+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err23];}else {vErrors.push(err23);}errors++;}}if(data.description !== undefined){if(typeof data.description !== "string"){const err24 = {instancePath:instancePath+"/description",schemaPath:"#/properties/description/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err24];}else {vErrors.push(err24);}errors++;}}if(data.version !== undefined){let data9 = data.version;const _errs25 = errors;let valid5 = false;const _errs26 = errors;if(typeof data9 !== "string"){const err25 = {instancePath:instancePath+"/version",schemaPath:"#/properties/version/anyOf/0/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err25];}else {vErrors.push(err25);}errors++;}var _valid1 = _errs26 === errors;valid5 = valid5 || _valid1;if(!valid5){const _errs28 = errors;if(data9 !== null){const err26 = {instancePath:instancePath+"/version",schemaPath:"#/properties/version/anyOf/1/type",keyword:"type",params:{type: "null"},message:"must be null"};if(vErrors === null){vErrors = [err26];}else {vErrors.push(err26);}errors++;}var _valid1 = _errs28 === errors;valid5 = valid5 || _valid1;}if(!valid5){const err27 = {instancePath:instancePath+"/version",schemaPath:"#/properties/version/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err27];}else {vErrors.push(err27);}errors++;}else {errors = _errs25;if(vErrors !== null){if(_errs25){vErrors.length = _errs25;}else {vErrors = null;}}}}if(data.origin !== undefined){let data10 = data.origin;const _errs32 = errors;let valid7 = false;const _errs33 = errors;if("imported" !== data10){const err28 = {instancePath:instancePath+"/origin",schemaPath:"aether:bindings#/definitions/SkillOrigin/anyOf/0/const",keyword:"const",params:{allowedValue: "imported"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err28];}else {vErrors.push(err28);}errors++;}var _valid2 = _errs33 === errors;valid7 = valid7 || _valid2;if(!valid7){const _errs34 = errors;if("manual" !== data10){const err29 = {instancePath:instancePath+"/origin",schemaPath:"aether:bindings#/definitions/SkillOrigin/anyOf/1/const",keyword:"const",params:{allowedValue: "manual"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err29];}else {vErrors.push(err29);}errors++;}var _valid2 = _errs34 === errors;valid7 = valid7 || _valid2;if(!valid7){const _errs35 = errors;if("builtin" !== data10){const err30 = {instancePath:instancePath+"/origin",schemaPath:"aether:bindings#/definitions/SkillOrigin/anyOf/2/const",keyword:"const",params:{allowedValue: "builtin"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err30];}else {vErrors.push(err30);}errors++;}var _valid2 = _errs35 === errors;valid7 = valid7 || _valid2;}}if(!valid7){const err31 = {instancePath:instancePath+"/origin",schemaPath:"aether:bindings#/definitions/SkillOrigin/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err31];}else {vErrors.push(err31);}errors++;}else {errors = _errs32;if(vErrors !== null){if(_errs32){vErrors.length = _errs32;}else {vErrors = null;}}}}if(data.revision !== undefined){let data11 = data.revision;if(!((typeof data11 == "number") && (isFinite(data11)))){const err32 = {instancePath:instancePath+"/revision",schemaPath:"#/properties/revision/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err32];}else {vErrors.push(err32);}errors++;}}if(data.bodyChars !== undefined){let data12 = data.bodyChars;if(!((typeof data12 == "number") && (isFinite(data12)))){const err33 = {instancePath:instancePath+"/bodyChars",schemaPath:"#/properties/bodyChars/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err33];}else {vErrors.push(err33);}errors++;}}if(data.updatedAt !== undefined){let data13 = data.updatedAt;if(!((typeof data13 == "number") && (isFinite(data13)))){const err34 = {instancePath:instancePath+"/updatedAt",schemaPath:"#/properties/updatedAt/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err34];}else {vErrors.push(err34);}errors++;}}if(data.hasScripts !== undefined){if(typeof data.hasScripts !== "boolean"){const err35 = {instancePath:instancePath+"/hasScripts",schemaPath:"#/properties/hasScripts/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"};if(vErrors === null){vErrors = [err35];}else {vErrors.push(err35);}errors++;}}if(data.fileCount !== undefined){let data15 = data.fileCount;if(!((typeof data15 == "number") && (isFinite(data15)))){const err36 = {instancePath:instancePath+"/fileCount",schemaPath:"#/properties/fileCount/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err36];}else {vErrors.push(err36);}errors++;}}}else {const err37 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err37];}else {vErrors.push(err37);}errors++;}validate256.errors = vErrors;return errors === 0;}function validate255(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="aether:validator:SkillDto" */;let vErrors = null;let errors = 0;if(!(validate256(data, {instancePath,parentData,parentDataProperty,rootData}))){vErrors = vErrors === null ? validate256.errors : vErrors.concat(validate256.errors);errors = vErrors.length;}validate255.errors = vErrors;return errors === 0;}export const validateSkillFileKind = validate259;const schema284 = {"$id":"aether:validator:SkillFileKind","$ref":"aether:bindings#/definitions/SkillFileKind"};function validate259(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="aether:validator:SkillFileKind" */;let vErrors = null;let errors = 0;const _errs1 = errors;let valid1 = false;const _errs2 = errors;if("script" !== data){const err0 = {instancePath,schemaPath:"aether:bindings#/definitions/SkillFileKind/anyOf/0/const",keyword:"const",params:{allowedValue: "script"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}var _valid0 = _errs2 === errors;valid1 = valid1 || _valid0;if(!valid1){const _errs3 = errors;if("reference" !== data){const err1 = {instancePath,schemaPath:"aether:bindings#/definitions/SkillFileKind/anyOf/1/const",keyword:"const",params:{allowedValue: "reference"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}var _valid0 = _errs3 === errors;valid1 = valid1 || _valid0;if(!valid1){const _errs4 = errors;if("asset" !== data){const err2 = {instancePath,schemaPath:"aether:bindings#/definitions/SkillFileKind/anyOf/2/const",keyword:"const",params:{allowedValue: "asset"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}var _valid0 = _errs4 === errors;valid1 = valid1 || _valid0;}}if(!valid1){const err3 = {instancePath,schemaPath:"aether:bindings#/definitions/SkillFileKind/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}else {errors = _errs1;if(vErrors !== null){if(_errs1){vErrors.length = _errs1;}else {vErrors = null;}}}validate259.errors = vErrors;return errors === 0;}export const validateSkillFileMeta = validate260;const schema286 = {"$id":"aether:validator:SkillFileMeta","$ref":"aether:bindings#/definitions/SkillFileMeta"};function validate261(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;if(data && typeof data == "object" && !Array.isArray(data)){if(data.path === undefined){const err0 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "path"},message:"must have required property '"+"path"+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}if(data.kind === undefined){const err1 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "kind"},message:"must have required property '"+"kind"+"'"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}if(data.size === undefined){const err2 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "size"},message:"must have required property '"+"size"+"'"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}for(const key0 in data){if(!(((key0 === "path") || (key0 === "kind")) || (key0 === "size"))){const err3 = {instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}}if(data.path !== undefined){if(typeof data.path !== "string"){const err4 = {instancePath:instancePath+"/path",schemaPath:"#/properties/path/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}}if(data.kind !== undefined){let data1 = data.kind;const _errs6 = errors;let valid2 = false;const _errs7 = errors;if("script" !== data1){const err5 = {instancePath:instancePath+"/kind",schemaPath:"aether:bindings#/definitions/SkillFileKind/anyOf/0/const",keyword:"const",params:{allowedValue: "script"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}var _valid0 = _errs7 === errors;valid2 = valid2 || _valid0;if(!valid2){const _errs8 = errors;if("reference" !== data1){const err6 = {instancePath:instancePath+"/kind",schemaPath:"aether:bindings#/definitions/SkillFileKind/anyOf/1/const",keyword:"const",params:{allowedValue: "reference"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}var _valid0 = _errs8 === errors;valid2 = valid2 || _valid0;if(!valid2){const _errs9 = errors;if("asset" !== data1){const err7 = {instancePath:instancePath+"/kind",schemaPath:"aether:bindings#/definitions/SkillFileKind/anyOf/2/const",keyword:"const",params:{allowedValue: "asset"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}var _valid0 = _errs9 === errors;valid2 = valid2 || _valid0;}}if(!valid2){const err8 = {instancePath:instancePath+"/kind",schemaPath:"aether:bindings#/definitions/SkillFileKind/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}else {errors = _errs6;if(vErrors !== null){if(_errs6){vErrors.length = _errs6;}else {vErrors = null;}}}}if(data.size !== undefined){let data2 = data.size;if(!((typeof data2 == "number") && (isFinite(data2)))){const err9 = {instancePath:instancePath+"/size",schemaPath:"#/properties/size/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}}}else {const err10 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}validate261.errors = vErrors;return errors === 0;}function validate260(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="aether:validator:SkillFileMeta" */;let vErrors = null;let errors = 0;if(!(validate261(data, {instancePath,parentData,parentDataProperty,rootData}))){vErrors = vErrors === null ? validate261.errors : vErrors.concat(validate261.errors);errors = vErrors.length;}validate260.errors = vErrors;return errors === 0;}export const validateSkillMeta = validate263;const schema289 = {"$id":"aether:validator:SkillMeta","$ref":"aether:bindings#/definitions/SkillMeta"};const schema290 = {"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"version":{"anyOf":[{"type":"string"},{"type":"null"}]},"origin":{"$ref":"aether:bindings#/definitions/SkillOrigin"},"revision":{"type":"number"},"bodyChars":{"type":"number"},"updatedAt":{"type":"number"},"hasScripts":{"type":"boolean"},"fileCount":{"type":"number"}},"required":["id","name","description","version","origin","revision","bodyChars","updatedAt","hasScripts","fileCount"],"additionalProperties":false};function validate264(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;if(data && typeof data == "object" && !Array.isArray(data)){if(data.id === undefined){const err0 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "id"},message:"must have required property '"+"id"+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}if(data.name === undefined){const err1 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "name"},message:"must have required property '"+"name"+"'"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}if(data.description === undefined){const err2 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "description"},message:"must have required property '"+"description"+"'"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}if(data.version === undefined){const err3 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "version"},message:"must have required property '"+"version"+"'"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}if(data.origin === undefined){const err4 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "origin"},message:"must have required property '"+"origin"+"'"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}if(data.revision === undefined){const err5 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "revision"},message:"must have required property '"+"revision"+"'"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}if(data.bodyChars === undefined){const err6 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "bodyChars"},message:"must have required property '"+"bodyChars"+"'"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}if(data.updatedAt === undefined){const err7 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "updatedAt"},message:"must have required property '"+"updatedAt"+"'"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}if(data.hasScripts === undefined){const err8 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "hasScripts"},message:"must have required property '"+"hasScripts"+"'"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}if(data.fileCount === undefined){const err9 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "fileCount"},message:"must have required property '"+"fileCount"+"'"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}for(const key0 in data){if(!(func8.call(schema290.properties, key0))){const err10 = {instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}}if(data.id !== undefined){if(typeof data.id !== "string"){const err11 = {instancePath:instancePath+"/id",schemaPath:"#/properties/id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}}if(data.name !== undefined){if(typeof data.name !== "string"){const err12 = {instancePath:instancePath+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}}if(data.description !== undefined){if(typeof data.description !== "string"){const err13 = {instancePath:instancePath+"/description",schemaPath:"#/properties/description/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}}if(data.version !== undefined){let data3 = data.version;const _errs9 = errors;let valid1 = false;const _errs10 = errors;if(typeof data3 !== "string"){const err14 = {instancePath:instancePath+"/version",schemaPath:"#/properties/version/anyOf/0/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err14];}else {vErrors.push(err14);}errors++;}var _valid0 = _errs10 === errors;valid1 = valid1 || _valid0;if(!valid1){const _errs12 = errors;if(data3 !== null){const err15 = {instancePath:instancePath+"/version",schemaPath:"#/properties/version/anyOf/1/type",keyword:"type",params:{type: "null"},message:"must be null"};if(vErrors === null){vErrors = [err15];}else {vErrors.push(err15);}errors++;}var _valid0 = _errs12 === errors;valid1 = valid1 || _valid0;}if(!valid1){const err16 = {instancePath:instancePath+"/version",schemaPath:"#/properties/version/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err16];}else {vErrors.push(err16);}errors++;}else {errors = _errs9;if(vErrors !== null){if(_errs9){vErrors.length = _errs9;}else {vErrors = null;}}}}if(data.origin !== undefined){let data4 = data.origin;const _errs16 = errors;let valid3 = false;const _errs17 = errors;if("imported" !== data4){const err17 = {instancePath:instancePath+"/origin",schemaPath:"aether:bindings#/definitions/SkillOrigin/anyOf/0/const",keyword:"const",params:{allowedValue: "imported"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err17];}else {vErrors.push(err17);}errors++;}var _valid1 = _errs17 === errors;valid3 = valid3 || _valid1;if(!valid3){const _errs18 = errors;if("manual" !== data4){const err18 = {instancePath:instancePath+"/origin",schemaPath:"aether:bindings#/definitions/SkillOrigin/anyOf/1/const",keyword:"const",params:{allowedValue: "manual"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err18];}else {vErrors.push(err18);}errors++;}var _valid1 = _errs18 === errors;valid3 = valid3 || _valid1;if(!valid3){const _errs19 = errors;if("builtin" !== data4){const err19 = {instancePath:instancePath+"/origin",schemaPath:"aether:bindings#/definitions/SkillOrigin/anyOf/2/const",keyword:"const",params:{allowedValue: "builtin"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err19];}else {vErrors.push(err19);}errors++;}var _valid1 = _errs19 === errors;valid3 = valid3 || _valid1;}}if(!valid3){const err20 = {instancePath:instancePath+"/origin",schemaPath:"aether:bindings#/definitions/SkillOrigin/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err20];}else {vErrors.push(err20);}errors++;}else {errors = _errs16;if(vErrors !== null){if(_errs16){vErrors.length = _errs16;}else {vErrors = null;}}}}if(data.revision !== undefined){let data5 = data.revision;if(!((typeof data5 == "number") && (isFinite(data5)))){const err21 = {instancePath:instancePath+"/revision",schemaPath:"#/properties/revision/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err21];}else {vErrors.push(err21);}errors++;}}if(data.bodyChars !== undefined){let data6 = data.bodyChars;if(!((typeof data6 == "number") && (isFinite(data6)))){const err22 = {instancePath:instancePath+"/bodyChars",schemaPath:"#/properties/bodyChars/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err22];}else {vErrors.push(err22);}errors++;}}if(data.updatedAt !== undefined){let data7 = data.updatedAt;if(!((typeof data7 == "number") && (isFinite(data7)))){const err23 = {instancePath:instancePath+"/updatedAt",schemaPath:"#/properties/updatedAt/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err23];}else {vErrors.push(err23);}errors++;}}if(data.hasScripts !== undefined){if(typeof data.hasScripts !== "boolean"){const err24 = {instancePath:instancePath+"/hasScripts",schemaPath:"#/properties/hasScripts/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"};if(vErrors === null){vErrors = [err24];}else {vErrors.push(err24);}errors++;}}if(data.fileCount !== undefined){let data9 = data.fileCount;if(!((typeof data9 == "number") && (isFinite(data9)))){const err25 = {instancePath:instancePath+"/fileCount",schemaPath:"#/properties/fileCount/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err25];}else {vErrors.push(err25);}errors++;}}}else {const err26 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err26];}else {vErrors.push(err26);}errors++;}validate264.errors = vErrors;return errors === 0;}function validate263(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="aether:validator:SkillMeta" */;let vErrors = null;let errors = 0;if(!(validate264(data, {instancePath,parentData,parentDataProperty,rootData}))){vErrors = vErrors === null ? validate264.errors : vErrors.concat(validate264.errors);errors = vErrors.length;}validate263.errors = vErrors;return errors === 0;}export const validateSkillOrigin = validate266;const schema292 = {"$id":"aether:validator:SkillOrigin","$ref":"aether:bindings#/definitions/SkillOrigin"};function validate266(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="aether:validator:SkillOrigin" */;let vErrors = null;let errors = 0;const _errs1 = errors;let valid1 = false;const _errs2 = errors;if("imported" !== data){const err0 = {instancePath,schemaPath:"aether:bindings#/definitions/SkillOrigin/anyOf/0/const",keyword:"const",params:{allowedValue: "imported"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}var _valid0 = _errs2 === errors;valid1 = valid1 || _valid0;if(!valid1){const _errs3 = errors;if("manual" !== data){const err1 = {instancePath,schemaPath:"aether:bindings#/definitions/SkillOrigin/anyOf/1/const",keyword:"const",params:{allowedValue: "manual"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}var _valid0 = _errs3 === errors;valid1 = valid1 || _valid0;if(!valid1){const _errs4 = errors;if("builtin" !== data){const err2 = {instancePath,schemaPath:"aether:bindings#/definitions/SkillOrigin/anyOf/2/const",keyword:"const",params:{allowedValue: "builtin"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}var _valid0 = _errs4 === errors;valid1 = valid1 || _valid0;}}if(!valid1){const err3 = {instancePath,schemaPath:"aether:bindings#/definitions/SkillOrigin/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}else {errors = _errs1;if(vErrors !== null){if(_errs1){vErrors.length = _errs1;}else {vErrors = null;}}}validate266.errors = vErrors;return errors === 0;}export const validateSkillRef = validate267;const schema294 = {"$id":"aether:validator:SkillRef","$ref":"https://aether.local/contracts/v1/common.schema.json#/definitions/SkillRef"};function validate268(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;if(data && typeof data == "object" && !Array.isArray(data)){if(data.id === undefined){const err0 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "id"},message:"must have required property '"+"id"+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}if(data.revision === undefined){const err1 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "revision"},message:"must have required property '"+"revision"+"'"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}for(const key0 in data){if(!((key0 === "id") || (key0 === "revision"))){const err2 = {instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}}if(data.id !== undefined){if(typeof data.id !== "string"){const err3 = {instancePath:instancePath+"/id",schemaPath:"#/properties/id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}}if(data.revision !== undefined){let data1 = data.revision;if(!(((typeof data1 == "number") && (!(data1 % 1) && !isNaN(data1))) && (isFinite(data1)))){const err4 = {instancePath:instancePath+"/revision",schemaPath:"#/definitions/U32/type",keyword:"type",params:{type: "integer"},message:"must be integer"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}if((typeof data1 == "number") && (isFinite(data1))){if(data1 > 4294967295 || isNaN(data1)){const err5 = {instancePath:instancePath+"/revision",schemaPath:"#/definitions/U32/maximum",keyword:"maximum",params:{comparison: "<=", limit: 4294967295},message:"must be <= 4294967295"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}if(data1 < 0 || isNaN(data1)){const err6 = {instancePath:instancePath+"/revision",schemaPath:"#/definitions/U32/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}}}}else {const err7 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}validate268.errors = vErrors;return errors === 0;}function validate267(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="aether:validator:SkillRef" */;let vErrors = null;let errors = 0;if(!(validate268(data, {instancePath,parentData,parentDataProperty,rootData}))){vErrors = vErrors === null ? validate268.errors : vErrors.concat(validate268.errors);errors = vErrors.length;}validate267.errors = vErrors;return errors === 0;}export const validateSource = validate270;const schema297 = {"$id":"aether:validator:Source","$ref":"aether:bindings#/definitions/Source"};const schema298 = {"anyOf":[{"type":"object","properties":{"path":{"type":"string"}},"required":["path"],"additionalProperties":false},{"type":"object","properties":{"bytes":{"type":"object","properties":{"fileName":{"type":"string"},"bytes":{"type":"array","items":{"type":"number"}}},"required":["fileName","bytes"],"additionalProperties":false}},"required":["bytes"],"additionalProperties":false}]};function validate270(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="aether:validator:Source" */;let vErrors = null;let errors = 0;const _errs1 = errors;let valid1 = false;const _errs2 = errors;if(data && typeof data == "object" && !Array.isArray(data)){if(data.path === undefined){const err0 = {instancePath,schemaPath:"aether:bindings#/definitions/Source/anyOf/0/required",keyword:"required",params:{missingProperty: "path"},message:"must have required property '"+"path"+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}for(const key0 in data){if(!(key0 === "path")){const err1 = {instancePath,schemaPath:"aether:bindings#/definitions/Source/anyOf/0/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}}if(data.path !== undefined){if(typeof data.path !== "string"){const err2 = {instancePath:instancePath+"/path",schemaPath:"aether:bindings#/definitions/Source/anyOf/0/properties/path/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}}}else {const err3 = {instancePath,schemaPath:"aether:bindings#/definitions/Source/anyOf/0/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}var _valid0 = _errs2 === errors;valid1 = valid1 || _valid0;if(!valid1){const _errs7 = errors;if(data && typeof data == "object" && !Array.isArray(data)){if(data.bytes === undefined){const err4 = {instancePath,schemaPath:"aether:bindings#/definitions/Source/anyOf/1/required",keyword:"required",params:{missingProperty: "bytes"},message:"must have required property '"+"bytes"+"'"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}for(const key1 in data){if(!(key1 === "bytes")){const err5 = {instancePath,schemaPath:"aether:bindings#/definitions/Source/anyOf/1/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key1},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}}if(data.bytes !== undefined){let data1 = data.bytes;if(data1 && typeof data1 == "object" && !Array.isArray(data1)){if(data1.fileName === undefined){const err6 = {instancePath:instancePath+"/bytes",schemaPath:"aether:bindings#/definitions/Source/anyOf/1/properties/bytes/required",keyword:"required",params:{missingProperty: "fileName"},message:"must have required property '"+"fileName"+"'"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}if(data1.bytes === undefined){const err7 = {instancePath:instancePath+"/bytes",schemaPath:"aether:bindings#/definitions/Source/anyOf/1/properties/bytes/required",keyword:"required",params:{missingProperty: "bytes"},message:"must have required property '"+"bytes"+"'"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}for(const key2 in data1){if(!((key2 === "fileName") || (key2 === "bytes"))){const err8 = {instancePath:instancePath+"/bytes",schemaPath:"aether:bindings#/definitions/Source/anyOf/1/properties/bytes/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key2},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}}if(data1.fileName !== undefined){if(typeof data1.fileName !== "string"){const err9 = {instancePath:instancePath+"/bytes/fileName",schemaPath:"aether:bindings#/definitions/Source/anyOf/1/properties/bytes/properties/fileName/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}}if(data1.bytes !== undefined){let data3 = data1.bytes;if(Array.isArray(data3)){const len0 = data3.length;for(let i0=0; i0<len0; i0++){let data4 = data3[i0];if(!((typeof data4 == "number") && (isFinite(data4)))){const err10 = {instancePath:instancePath+"/bytes/bytes/" + i0,schemaPath:"aether:bindings#/definitions/Source/anyOf/1/properties/bytes/properties/bytes/items/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}}}else {const err11 = {instancePath:instancePath+"/bytes/bytes",schemaPath:"aether:bindings#/definitions/Source/anyOf/1/properties/bytes/properties/bytes/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}}}else {const err12 = {instancePath:instancePath+"/bytes",schemaPath:"aether:bindings#/definitions/Source/anyOf/1/properties/bytes/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}}}else {const err13 = {instancePath,schemaPath:"aether:bindings#/definitions/Source/anyOf/1/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}var _valid0 = _errs7 === errors;valid1 = valid1 || _valid0;}if(!valid1){const err14 = {instancePath,schemaPath:"aether:bindings#/definitions/Source/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err14];}else {vErrors.push(err14);}errors++;}else {errors = _errs1;if(vErrors !== null){if(_errs1){vErrors.length = _errs1;}else {vErrors = null;}}}validate270.errors = vErrors;return errors === 0;}export const validateStatus = validate271;const schema299 = {"$id":"aether:validator:Status","$ref":"aether:bindings#/definitions/Status"};const schema300 = {"type":"object","properties":{"running":{"type":"boolean"},"port":{"type":"number"},"url":{"type":"string"},"toolCount":{"type":"number"}},"required":["running","port","url","toolCount"],"additionalProperties":false};function validate271(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="aether:validator:Status" */;let vErrors = null;let errors = 0;if(data && typeof data == "object" && !Array.isArray(data)){if(data.running === undefined){const err0 = {instancePath,schemaPath:"aether:bindings#/definitions/Status/required",keyword:"required",params:{missingProperty: "running"},message:"must have required property '"+"running"+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}if(data.port === undefined){const err1 = {instancePath,schemaPath:"aether:bindings#/definitions/Status/required",keyword:"required",params:{missingProperty: "port"},message:"must have required property '"+"port"+"'"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}if(data.url === undefined){const err2 = {instancePath,schemaPath:"aether:bindings#/definitions/Status/required",keyword:"required",params:{missingProperty: "url"},message:"must have required property '"+"url"+"'"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}if(data.toolCount === undefined){const err3 = {instancePath,schemaPath:"aether:bindings#/definitions/Status/required",keyword:"required",params:{missingProperty: "toolCount"},message:"must have required property '"+"toolCount"+"'"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}for(const key0 in data){if(!((((key0 === "running") || (key0 === "port")) || (key0 === "url")) || (key0 === "toolCount"))){const err4 = {instancePath,schemaPath:"aether:bindings#/definitions/Status/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}}if(data.running !== undefined){if(typeof data.running !== "boolean"){const err5 = {instancePath:instancePath+"/running",schemaPath:"aether:bindings#/definitions/Status/properties/running/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}}if(data.port !== undefined){let data1 = data.port;if(!((typeof data1 == "number") && (isFinite(data1)))){const err6 = {instancePath:instancePath+"/port",schemaPath:"aether:bindings#/definitions/Status/properties/port/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}}if(data.url !== undefined){if(typeof data.url !== "string"){const err7 = {instancePath:instancePath+"/url",schemaPath:"aether:bindings#/definitions/Status/properties/url/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}}if(data.toolCount !== undefined){let data3 = data.toolCount;if(!((typeof data3 == "number") && (isFinite(data3)))){const err8 = {instancePath:instancePath+"/toolCount",schemaPath:"aether:bindings#/definitions/Status/properties/toolCount/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}}}else {const err9 = {instancePath,schemaPath:"aether:bindings#/definitions/Status/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}validate271.errors = vErrors;return errors === 0;}export const validateTokenRecord = validate272;const schema301 = {"$id":"aether:validator:TokenRecord","$ref":"aether:bindings#/definitions/TokenRecord"};const schema302 = {"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"scopes":{"type":"array","items":{"type":"string"}},"createdAt":{"type":"number"},"lastUsedAt":{"anyOf":[{"type":"number"},{"type":"null"}]},"revokedAt":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["id","name","scopes","createdAt","lastUsedAt","revokedAt"],"additionalProperties":false};function validate272(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="aether:validator:TokenRecord" */;let vErrors = null;let errors = 0;if(data && typeof data == "object" && !Array.isArray(data)){if(data.id === undefined){const err0 = {instancePath,schemaPath:"aether:bindings#/definitions/TokenRecord/required",keyword:"required",params:{missingProperty: "id"},message:"must have required property '"+"id"+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}if(data.name === undefined){const err1 = {instancePath,schemaPath:"aether:bindings#/definitions/TokenRecord/required",keyword:"required",params:{missingProperty: "name"},message:"must have required property '"+"name"+"'"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}if(data.scopes === undefined){const err2 = {instancePath,schemaPath:"aether:bindings#/definitions/TokenRecord/required",keyword:"required",params:{missingProperty: "scopes"},message:"must have required property '"+"scopes"+"'"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}if(data.createdAt === undefined){const err3 = {instancePath,schemaPath:"aether:bindings#/definitions/TokenRecord/required",keyword:"required",params:{missingProperty: "createdAt"},message:"must have required property '"+"createdAt"+"'"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}if(data.lastUsedAt === undefined){const err4 = {instancePath,schemaPath:"aether:bindings#/definitions/TokenRecord/required",keyword:"required",params:{missingProperty: "lastUsedAt"},message:"must have required property '"+"lastUsedAt"+"'"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}if(data.revokedAt === undefined){const err5 = {instancePath,schemaPath:"aether:bindings#/definitions/TokenRecord/required",keyword:"required",params:{missingProperty: "revokedAt"},message:"must have required property '"+"revokedAt"+"'"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}for(const key0 in data){if(!((((((key0 === "id") || (key0 === "name")) || (key0 === "scopes")) || (key0 === "createdAt")) || (key0 === "lastUsedAt")) || (key0 === "revokedAt"))){const err6 = {instancePath,schemaPath:"aether:bindings#/definitions/TokenRecord/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}}if(data.id !== undefined){if(typeof data.id !== "string"){const err7 = {instancePath:instancePath+"/id",schemaPath:"aether:bindings#/definitions/TokenRecord/properties/id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}}if(data.name !== undefined){if(typeof data.name !== "string"){const err8 = {instancePath:instancePath+"/name",schemaPath:"aether:bindings#/definitions/TokenRecord/properties/name/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}}if(data.scopes !== undefined){let data2 = data.scopes;if(Array.isArray(data2)){const len0 = data2.length;for(let i0=0; i0<len0; i0++){if(typeof data2[i0] !== "string"){const err9 = {instancePath:instancePath+"/scopes/" + i0,schemaPath:"aether:bindings#/definitions/TokenRecord/properties/scopes/items/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}}}else {const err10 = {instancePath:instancePath+"/scopes",schemaPath:"aether:bindings#/definitions/TokenRecord/properties/scopes/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}}if(data.createdAt !== undefined){let data4 = data.createdAt;if(!((typeof data4 == "number") && (isFinite(data4)))){const err11 = {instancePath:instancePath+"/createdAt",schemaPath:"aether:bindings#/definitions/TokenRecord/properties/createdAt/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}}if(data.lastUsedAt !== undefined){let data5 = data.lastUsedAt;const _errs14 = errors;let valid4 = false;const _errs15 = errors;if(!((typeof data5 == "number") && (isFinite(data5)))){const err12 = {instancePath:instancePath+"/lastUsedAt",schemaPath:"aether:bindings#/definitions/TokenRecord/properties/lastUsedAt/anyOf/0/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}var _valid0 = _errs15 === errors;valid4 = valid4 || _valid0;if(!valid4){const _errs17 = errors;if(data5 !== null){const err13 = {instancePath:instancePath+"/lastUsedAt",schemaPath:"aether:bindings#/definitions/TokenRecord/properties/lastUsedAt/anyOf/1/type",keyword:"type",params:{type: "null"},message:"must be null"};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}var _valid0 = _errs17 === errors;valid4 = valid4 || _valid0;}if(!valid4){const err14 = {instancePath:instancePath+"/lastUsedAt",schemaPath:"aether:bindings#/definitions/TokenRecord/properties/lastUsedAt/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err14];}else {vErrors.push(err14);}errors++;}else {errors = _errs14;if(vErrors !== null){if(_errs14){vErrors.length = _errs14;}else {vErrors = null;}}}}if(data.revokedAt !== undefined){let data6 = data.revokedAt;const _errs20 = errors;let valid5 = false;const _errs21 = errors;if(!((typeof data6 == "number") && (isFinite(data6)))){const err15 = {instancePath:instancePath+"/revokedAt",schemaPath:"aether:bindings#/definitions/TokenRecord/properties/revokedAt/anyOf/0/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err15];}else {vErrors.push(err15);}errors++;}var _valid1 = _errs21 === errors;valid5 = valid5 || _valid1;if(!valid5){const _errs23 = errors;if(data6 !== null){const err16 = {instancePath:instancePath+"/revokedAt",schemaPath:"aether:bindings#/definitions/TokenRecord/properties/revokedAt/anyOf/1/type",keyword:"type",params:{type: "null"},message:"must be null"};if(vErrors === null){vErrors = [err16];}else {vErrors.push(err16);}errors++;}var _valid1 = _errs23 === errors;valid5 = valid5 || _valid1;}if(!valid5){const err17 = {instancePath:instancePath+"/revokedAt",schemaPath:"aether:bindings#/definitions/TokenRecord/properties/revokedAt/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err17];}else {vErrors.push(err17);}errors++;}else {errors = _errs20;if(vErrors !== null){if(_errs20){vErrors.length = _errs20;}else {vErrors = null;}}}}}else {const err18 = {instancePath,schemaPath:"aether:bindings#/definitions/TokenRecord/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err18];}else {vErrors.push(err18);}errors++;}validate272.errors = vErrors;return errors === 0;}export const validateTokenUsage = validate273;const schema303 = {"$id":"aether:validator:TokenUsage","$ref":"https://aether.local/contracts/v1/common.schema.json#/definitions/TokenUsage"};function validate274(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;if(data && typeof data == "object" && !Array.isArray(data)){if(data.inputTokens === undefined){const err0 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "inputTokens"},message:"must have required property '"+"inputTokens"+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}if(data.outputTokens === undefined){const err1 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "outputTokens"},message:"must have required property '"+"outputTokens"+"'"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}if(data.cacheReadTokens === undefined){const err2 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "cacheReadTokens"},message:"must have required property '"+"cacheReadTokens"+"'"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}if(data.cacheWriteTokens === undefined){const err3 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "cacheWriteTokens"},message:"must have required property '"+"cacheWriteTokens"+"'"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}if(data.reasoningTokens === undefined){const err4 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "reasoningTokens"},message:"must have required property '"+"reasoningTokens"+"'"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}for(const key0 in data){if(!(((((key0 === "inputTokens") || (key0 === "outputTokens")) || (key0 === "cacheReadTokens")) || (key0 === "cacheWriteTokens")) || (key0 === "reasoningTokens"))){const err5 = {instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}}if(data.inputTokens !== undefined){if(!(validate18(data.inputTokens, {instancePath:instancePath+"/inputTokens",parentData:data,parentDataProperty:"inputTokens",rootData}))){vErrors = vErrors === null ? validate18.errors : vErrors.concat(validate18.errors);errors = vErrors.length;}}if(data.outputTokens !== undefined){if(!(validate18(data.outputTokens, {instancePath:instancePath+"/outputTokens",parentData:data,parentDataProperty:"outputTokens",rootData}))){vErrors = vErrors === null ? validate18.errors : vErrors.concat(validate18.errors);errors = vErrors.length;}}if(data.cacheReadTokens !== undefined){if(!(validate18(data.cacheReadTokens, {instancePath:instancePath+"/cacheReadTokens",parentData:data,parentDataProperty:"cacheReadTokens",rootData}))){vErrors = vErrors === null ? validate18.errors : vErrors.concat(validate18.errors);errors = vErrors.length;}}if(data.cacheWriteTokens !== undefined){if(!(validate18(data.cacheWriteTokens, {instancePath:instancePath+"/cacheWriteTokens",parentData:data,parentDataProperty:"cacheWriteTokens",rootData}))){vErrors = vErrors === null ? validate18.errors : vErrors.concat(validate18.errors);errors = vErrors.length;}}if(data.reasoningTokens !== undefined){if(!(validate18(data.reasoningTokens, {instancePath:instancePath+"/reasoningTokens",parentData:data,parentDataProperty:"reasoningTokens",rootData}))){vErrors = vErrors === null ? validate18.errors : vErrors.concat(validate18.errors);errors = vErrors.length;}}}else {const err6 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}validate274.errors = vErrors;return errors === 0;}function validate273(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="aether:validator:TokenUsage" */;let vErrors = null;let errors = 0;if(!(validate274(data, {instancePath,parentData,parentDataProperty,rootData}))){vErrors = vErrors === null ? validate274.errors : vErrors.concat(validate274.errors);errors = vErrors.length;}validate273.errors = vErrors;return errors === 0;}export const validateToolDto = validate281;const schema305 = {"$id":"aether:validator:ToolDto","$ref":"aether:bindings#/definitions/ToolDto"};function validate282(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;if(data && typeof data == "object" && !Array.isArray(data)){if(data.name === undefined){const err0 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "name"},message:"must have required property '"+"name"+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}if(data.description === undefined){const err1 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "description"},message:"must have required property '"+"description"+"'"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}if(data.readOnly === undefined){const err2 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "readOnly"},message:"must have required property '"+"readOnly"+"'"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}if(data.approval === undefined){const err3 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "approval"},message:"must have required property '"+"approval"+"'"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}for(const key0 in data){if(!((((key0 === "name") || (key0 === "description")) || (key0 === "readOnly")) || (key0 === "approval"))){const err4 = {instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}}if(data.name !== undefined){if(typeof data.name !== "string"){const err5 = {instancePath:instancePath+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}}if(data.description !== undefined){if(typeof data.description !== "string"){const err6 = {instancePath:instancePath+"/description",schemaPath:"#/properties/description/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}}if(data.readOnly !== undefined){if(typeof data.readOnly !== "boolean"){const err7 = {instancePath:instancePath+"/readOnly",schemaPath:"#/properties/readOnly/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}}if(data.approval !== undefined){let data3 = data.approval;const _errs10 = errors;let valid2 = false;const _errs11 = errors;if("auto" !== data3){const err8 = {instancePath:instancePath+"/approval",schemaPath:"aether:bindings#/definitions/Approval/anyOf/0/const",keyword:"const",params:{allowedValue: "auto"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}var _valid0 = _errs11 === errors;valid2 = valid2 || _valid0;if(!valid2){const _errs12 = errors;if("ask" !== data3){const err9 = {instancePath:instancePath+"/approval",schemaPath:"aether:bindings#/definitions/Approval/anyOf/1/const",keyword:"const",params:{allowedValue: "ask"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}var _valid0 = _errs12 === errors;valid2 = valid2 || _valid0;if(!valid2){const _errs13 = errors;if("deny" !== data3){const err10 = {instancePath:instancePath+"/approval",schemaPath:"aether:bindings#/definitions/Approval/anyOf/2/const",keyword:"const",params:{allowedValue: "deny"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}var _valid0 = _errs13 === errors;valid2 = valid2 || _valid0;}}if(!valid2){const err11 = {instancePath:instancePath+"/approval",schemaPath:"aether:bindings#/definitions/Approval/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}else {errors = _errs10;if(vErrors !== null){if(_errs10){vErrors.length = _errs10;}else {vErrors = null;}}}}}else {const err12 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}validate282.errors = vErrors;return errors === 0;}function validate281(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="aether:validator:ToolDto" */;let vErrors = null;let errors = 0;if(!(validate282(data, {instancePath,parentData,parentDataProperty,rootData}))){vErrors = vErrors === null ? validate282.errors : vErrors.concat(validate282.errors);errors = vErrors.length;}validate281.errors = vErrors;return errors === 0;}export const validateToolEffect = validate284;const schema308 = {"$id":"aether:validator:ToolEffect","$ref":"https://aether.local/contracts/v1/common.schema.json#/definitions/ToolEffect"};const schema309 = {"enum":["read","edit","exec","other"]};function validate284(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="aether:validator:ToolEffect" */;let vErrors = null;let errors = 0;if(!((((data === "read") || (data === "edit")) || (data === "exec")) || (data === "other"))){const err0 = {instancePath,schemaPath:"https://aether.local/contracts/v1/common.schema.json#/definitions/ToolEffect/enum",keyword:"enum",params:{allowedValues: schema309.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}validate284.errors = vErrors;return errors === 0;}export const validateToolOutcome = validate285;const schema310 = {"$id":"aether:validator:ToolOutcome","$ref":"https://aether.local/contracts/v1/run.schema.json#/definitions/ToolOutcome"};function validate285(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="aether:validator:ToolOutcome" */;let vErrors = null;let errors = 0;if(!((((data === "ok") || (data === "error")) || (data === "denied")) || (data === "unknown"))){const err0 = {instancePath,schemaPath:"https://aether.local/contracts/v1/run.schema.json#/definitions/ToolOutcome/enum",keyword:"enum",params:{allowedValues: schema216.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}validate285.errors = vErrors;return errors === 0;}export const validateToolSourceKind = validate286;const schema312 = {"$id":"aether:validator:ToolSourceKind","$ref":"aether:bindings#/definitions/ToolSourceKind"};const schema313 = {"anyOf":[{"const":"host"},{"const":"mcp"}]};function validate286(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="aether:validator:ToolSourceKind" */;let vErrors = null;let errors = 0;const _errs1 = errors;let valid1 = false;const _errs2 = errors;if("host" !== data){const err0 = {instancePath,schemaPath:"aether:bindings#/definitions/ToolSourceKind/anyOf/0/const",keyword:"const",params:{allowedValue: "host"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}var _valid0 = _errs2 === errors;valid1 = valid1 || _valid0;if(!valid1){const _errs3 = errors;if("mcp" !== data){const err1 = {instancePath,schemaPath:"aether:bindings#/definitions/ToolSourceKind/anyOf/1/const",keyword:"const",params:{allowedValue: "mcp"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}var _valid0 = _errs3 === errors;valid1 = valid1 || _valid0;}if(!valid1){const err2 = {instancePath,schemaPath:"aether:bindings#/definitions/ToolSourceKind/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}else {errors = _errs1;if(vErrors !== null){if(_errs1){vErrors.length = _errs1;}else {vErrors = null;}}}validate286.errors = vErrors;return errors === 0;}export const validateTurn = validate287;const schema314 = {"$id":"aether:validator:Turn","$ref":"https://aether.local/contracts/v1/conversation.schema.json#/definitions/Turn"};function validate288(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;if(data && typeof data == "object" && !Array.isArray(data)){if(data.id === undefined){const err0 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "id"},message:"must have required property '"+"id"+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}if(data.parentId === undefined){const err1 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "parentId"},message:"must have required property '"+"parentId"+"'"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}if(data.questionId === undefined){const err2 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "questionId"},message:"must have required property '"+"questionId"+"'"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}if(data.supersedesId === undefined){const err3 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "supersedesId"},message:"must have required property '"+"supersedesId"+"'"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}if(data.kind === undefined){const err4 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "kind"},message:"must have required property '"+"kind"+"'"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}if(data.status === undefined){const err5 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "status"},message:"must have required property '"+"status"+"'"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}if(data.input === undefined){const err6 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "input"},message:"must have required property '"+"input"+"'"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}if(data.text === undefined){const err7 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "text"},message:"must have required property '"+"text"+"'"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}if(data.modelId === undefined){const err8 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "modelId"},message:"must have required property '"+"modelId"+"'"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}if(data.endpointId === undefined){const err9 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "endpointId"},message:"must have required property '"+"endpointId"+"'"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}if(data.errorCode === undefined){const err10 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "errorCode"},message:"must have required property '"+"errorCode"+"'"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}if(data.reasoningText === undefined){const err11 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "reasoningText"},message:"must have required property '"+"reasoningText"+"'"};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}if(data.images === undefined){const err12 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "images"},message:"must have required property '"+"images"+"'"};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}if(data.generated === undefined){const err13 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "generated"},message:"must have required property '"+"generated"+"'"};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}for(const key0 in data){if(!(func8.call(schema35.properties, key0))){const err14 = {instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err14];}else {vErrors.push(err14);}errors++;}}if(data.id !== undefined){let data0 = data.id;if(typeof data0 === "string"){if(func2(data0) > 128){const err15 = {instancePath:instancePath+"/id",schemaPath:"common.schema.json#/definitions/Id/maxLength",keyword:"maxLength",params:{limit: 128},message:"must NOT have more than 128 characters"};if(vErrors === null){vErrors = [err15];}else {vErrors.push(err15);}errors++;}if(func2(data0) < 1){const err16 = {instancePath:instancePath+"/id",schemaPath:"common.schema.json#/definitions/Id/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};if(vErrors === null){vErrors = [err16];}else {vErrors.push(err16);}errors++;}}else {const err17 = {instancePath:instancePath+"/id",schemaPath:"common.schema.json#/definitions/Id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err17];}else {vErrors.push(err17);}errors++;}}if(data.parentId !== undefined){if(!(validate26(data.parentId, {instancePath:instancePath+"/parentId",parentData:data,parentDataProperty:"parentId",rootData}))){vErrors = vErrors === null ? validate26.errors : vErrors.concat(validate26.errors);errors = vErrors.length;}}if(data.questionId !== undefined){let data2 = data.questionId;if(typeof data2 === "string"){if(func2(data2) > 128){const err18 = {instancePath:instancePath+"/questionId",schemaPath:"common.schema.json#/definitions/Id/maxLength",keyword:"maxLength",params:{limit: 128},message:"must NOT have more than 128 characters"};if(vErrors === null){vErrors = [err18];}else {vErrors.push(err18);}errors++;}if(func2(data2) < 1){const err19 = {instancePath:instancePath+"/questionId",schemaPath:"common.schema.json#/definitions/Id/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};if(vErrors === null){vErrors = [err19];}else {vErrors.push(err19);}errors++;}}else {const err20 = {instancePath:instancePath+"/questionId",schemaPath:"common.schema.json#/definitions/Id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err20];}else {vErrors.push(err20);}errors++;}}if(data.supersedesId !== undefined){if(!(validate26(data.supersedesId, {instancePath:instancePath+"/supersedesId",parentData:data,parentDataProperty:"supersedesId",rootData}))){vErrors = vErrors === null ? validate26.errors : vErrors.concat(validate26.errors);errors = vErrors.length;}}if(data.kind !== undefined){let data4 = data.kind;if(!((data4 === "reply") || (data4 === "translation"))){const err21 = {instancePath:instancePath+"/kind",schemaPath:"#/properties/kind/enum",keyword:"enum",params:{allowedValues: schema35.properties.kind.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err21];}else {vErrors.push(err21);}errors++;}}if(data.status !== undefined){let data5 = data.status;if(!((((data5 === "running") || (data5 === "completed")) || (data5 === "failed")) || (data5 === "cancelled"))){const err22 = {instancePath:instancePath+"/status",schemaPath:"#/definitions/TurnStatus/enum",keyword:"enum",params:{allowedValues: schema38.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err22];}else {vErrors.push(err22);}errors++;}}if(data.input !== undefined){let data6 = data.input;if(typeof data6 === "string"){if(func2(data6) > 100000){const err23 = {instancePath:instancePath+"/input",schemaPath:"#/properties/input/maxLength",keyword:"maxLength",params:{limit: 100000},message:"must NOT have more than 100000 characters"};if(vErrors === null){vErrors = [err23];}else {vErrors.push(err23);}errors++;}}else {const err24 = {instancePath:instancePath+"/input",schemaPath:"#/properties/input/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err24];}else {vErrors.push(err24);}errors++;}}if(data.text !== undefined){if(typeof data.text !== "string"){const err25 = {instancePath:instancePath+"/text",schemaPath:"#/properties/text/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err25];}else {vErrors.push(err25);}errors++;}}if(data.modelId !== undefined){let data8 = data.modelId;if((typeof data8 !== "string") && (data8 !== null)){const err26 = {instancePath:instancePath+"/modelId",schemaPath:"#/properties/modelId/type",keyword:"type",params:{type: schema35.properties.modelId.type},message:"must be string,null"};if(vErrors === null){vErrors = [err26];}else {vErrors.push(err26);}errors++;}}if(data.endpointId !== undefined){let data9 = data.endpointId;if((typeof data9 !== "string") && (data9 !== null)){const err27 = {instancePath:instancePath+"/endpointId",schemaPath:"#/properties/endpointId/type",keyword:"type",params:{type: schema35.properties.endpointId.type},message:"must be string,null"};if(vErrors === null){vErrors = [err27];}else {vErrors.push(err27);}errors++;}}if(data.errorCode !== undefined){let data10 = data.errorCode;if((typeof data10 !== "string") && (data10 !== null)){const err28 = {instancePath:instancePath+"/errorCode",schemaPath:"#/properties/errorCode/type",keyword:"type",params:{type: schema35.properties.errorCode.type},message:"must be string,null"};if(vErrors === null){vErrors = [err28];}else {vErrors.push(err28);}errors++;}}if(data.usage !== undefined){let data11 = data.usage;const _errs24 = errors;let valid4 = false;const _errs25 = errors;if(!(validate32(data11, {instancePath:instancePath+"/usage",parentData:data,parentDataProperty:"usage",rootData}))){vErrors = vErrors === null ? validate32.errors : vErrors.concat(validate32.errors);errors = vErrors.length;}var _valid0 = _errs25 === errors;valid4 = valid4 || _valid0;if(!valid4){const _errs26 = errors;if(data11 !== null){const err29 = {instancePath:instancePath+"/usage",schemaPath:"#/properties/usage/anyOf/1/type",keyword:"type",params:{type: "null"},message:"must be null"};if(vErrors === null){vErrors = [err29];}else {vErrors.push(err29);}errors++;}var _valid0 = _errs26 === errors;valid4 = valid4 || _valid0;}if(!valid4){const err30 = {instancePath:instancePath+"/usage",schemaPath:"#/properties/usage/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err30];}else {vErrors.push(err30);}errors++;}else {errors = _errs24;if(vErrors !== null){if(_errs24){vErrors.length = _errs24;}else {vErrors = null;}}}}if(data.contextUsage !== undefined){let data12 = data.contextUsage;const _errs29 = errors;let valid5 = false;const _errs30 = errors;if(!(validate39(data12, {instancePath:instancePath+"/contextUsage",parentData:data,parentDataProperty:"contextUsage",rootData}))){vErrors = vErrors === null ? validate39.errors : vErrors.concat(validate39.errors);errors = vErrors.length;}var _valid1 = _errs30 === errors;valid5 = valid5 || _valid1;if(!valid5){const _errs31 = errors;if(data12 !== null){const err31 = {instancePath:instancePath+"/contextUsage",schemaPath:"#/properties/contextUsage/anyOf/1/type",keyword:"type",params:{type: "null"},message:"must be null"};if(vErrors === null){vErrors = [err31];}else {vErrors.push(err31);}errors++;}var _valid1 = _errs31 === errors;valid5 = valid5 || _valid1;}if(!valid5){const err32 = {instancePath:instancePath+"/contextUsage",schemaPath:"#/properties/contextUsage/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err32];}else {vErrors.push(err32);}errors++;}else {errors = _errs29;if(vErrors !== null){if(_errs29){vErrors.length = _errs29;}else {vErrors = null;}}}}if(data.reasoningEffort !== undefined){let data13 = data.reasoningEffort;const _errs34 = errors;let valid6 = false;const _errs35 = errors;if(!(((((((((data13 === "default") || (data13 === "none")) || (data13 === "auto")) || (data13 === "minimal")) || (data13 === "low")) || (data13 === "medium")) || (data13 === "high")) || (data13 === "xhigh")) || (data13 === "max"))){const err33 = {instancePath:instancePath+"/reasoningEffort",schemaPath:"common.schema.json#/definitions/ReasoningEffort/enum",keyword:"enum",params:{allowedValues: schema42.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err33];}else {vErrors.push(err33);}errors++;}var _valid2 = _errs35 === errors;valid6 = valid6 || _valid2;if(!valid6){const _errs37 = errors;if(data13 !== null){const err34 = {instancePath:instancePath+"/reasoningEffort",schemaPath:"#/properties/reasoningEffort/anyOf/1/type",keyword:"type",params:{type: "null"},message:"must be null"};if(vErrors === null){vErrors = [err34];}else {vErrors.push(err34);}errors++;}var _valid2 = _errs37 === errors;valid6 = valid6 || _valid2;}if(!valid6){const err35 = {instancePath:instancePath+"/reasoningEffort",schemaPath:"#/properties/reasoningEffort/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err35];}else {vErrors.push(err35);}errors++;}else {errors = _errs34;if(vErrors !== null){if(_errs34){vErrors.length = _errs34;}else {vErrors = null;}}}}if(data.cost !== undefined){let data14 = data.cost;const _errs40 = errors;let valid8 = false;const _errs41 = errors;if(!(validate43(data14, {instancePath:instancePath+"/cost",parentData:data,parentDataProperty:"cost",rootData}))){vErrors = vErrors === null ? validate43.errors : vErrors.concat(validate43.errors);errors = vErrors.length;}var _valid3 = _errs41 === errors;valid8 = valid8 || _valid3;if(!valid8){const _errs42 = errors;if(data14 !== null){const err36 = {instancePath:instancePath+"/cost",schemaPath:"#/properties/cost/anyOf/1/type",keyword:"type",params:{type: "null"},message:"must be null"};if(vErrors === null){vErrors = [err36];}else {vErrors.push(err36);}errors++;}var _valid3 = _errs42 === errors;valid8 = valid8 || _valid3;}if(!valid8){const err37 = {instancePath:instancePath+"/cost",schemaPath:"#/properties/cost/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err37];}else {vErrors.push(err37);}errors++;}else {errors = _errs40;if(vErrors !== null){if(_errs40){vErrors.length = _errs40;}else {vErrors = null;}}}}if(data.reasoningText !== undefined){let data15 = data.reasoningText;if((typeof data15 !== "string") && (data15 !== null)){const err38 = {instancePath:instancePath+"/reasoningText",schemaPath:"#/properties/reasoningText/type",keyword:"type",params:{type: schema35.properties.reasoningText.type},message:"must be string,null"};if(vErrors === null){vErrors = [err38];}else {vErrors.push(err38);}errors++;}}if(data.images !== undefined){let data16 = data.images;if(Array.isArray(data16)){const len0 = data16.length;for(let i0=0; i0<len0; i0++){if(!(validate45(data16[i0], {instancePath:instancePath+"/images/" + i0,parentData:data16,parentDataProperty:i0,rootData}))){vErrors = vErrors === null ? validate45.errors : vErrors.concat(validate45.errors);errors = vErrors.length;}}}else {const err39 = {instancePath:instancePath+"/images",schemaPath:"#/properties/images/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err39];}else {vErrors.push(err39);}errors++;}}if(data.generated !== undefined){let data18 = data.generated;if(Array.isArray(data18)){const len1 = data18.length;for(let i1=0; i1<len1; i1++){if(!(validate45(data18[i1], {instancePath:instancePath+"/generated/" + i1,parentData:data18,parentDataProperty:i1,rootData}))){vErrors = vErrors === null ? validate45.errors : vErrors.concat(validate45.errors);errors = vErrors.length;}}}else {const err40 = {instancePath:instancePath+"/generated",schemaPath:"#/properties/generated/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err40];}else {vErrors.push(err40);}errors++;}}}else {const err41 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err41];}else {vErrors.push(err41);}errors++;}validate288.errors = vErrors;return errors === 0;}function validate287(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="aether:validator:Turn" */;let vErrors = null;let errors = 0;if(!(validate288(data, {instancePath,parentData,parentDataProperty,rootData}))){vErrors = vErrors === null ? validate288.errors : vErrors.concat(validate288.errors);errors = vErrors.length;}validate287.errors = vErrors;return errors === 0;}export const validateTurnStatus = validate297;const schema320 = {"$id":"aether:validator:TurnStatus","$ref":"https://aether.local/contracts/v1/conversation.schema.json#/definitions/TurnStatus"};function validate297(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="aether:validator:TurnStatus" */;let vErrors = null;let errors = 0;if(!((((data === "running") || (data === "completed")) || (data === "failed")) || (data === "cancelled"))){const err0 = {instancePath,schemaPath:"https://aether.local/contracts/v1/conversation.schema.json#/definitions/TurnStatus/enum",keyword:"enum",params:{allowedValues: schema38.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}validate297.errors = vErrors;return errors === 0;}export const validateTypeSource = validate298;const schema322 = {"$id":"aether:validator:TypeSource","$ref":"aether:bindings#/definitions/TypeSource"};function validate298(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="aether:validator:TypeSource" */;let vErrors = null;let errors = 0;const _errs1 = errors;let valid1 = false;const _errs2 = errors;if("inferred" !== data){const err0 = {instancePath,schemaPath:"aether:bindings#/definitions/TypeSource/anyOf/0/const",keyword:"const",params:{allowedValue: "inferred"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}var _valid0 = _errs2 === errors;valid1 = valid1 || _valid0;if(!valid1){const _errs3 = errors;if("user" !== data){const err1 = {instancePath,schemaPath:"aether:bindings#/definitions/TypeSource/anyOf/1/const",keyword:"const",params:{allowedValue: "user"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}var _valid0 = _errs3 === errors;valid1 = valid1 || _valid0;}if(!valid1){const err2 = {instancePath,schemaPath:"aether:bindings#/definitions/TypeSource/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}else {errors = _errs1;if(vErrors !== null){if(_errs1){vErrors.length = _errs1;}else {vErrors = null;}}}validate298.errors = vErrors;return errors === 0;}
|