@wildo-ai/external-connectors-models 1.1.9 → 1.1.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/esm/core/commons.external-connectors-models.schemas.d.ts +130 -0
- package/dist/esm/core/commons.external-connectors-models.schemas.d.ts.map +1 -1
- package/dist/esm/core/commons.external-connectors-models.schemas.js +193 -0
- package/dist/esm/core/commons.external-connectors-models.schemas.js.map +1 -1
- package/dist/esm/core/security.external-connectors-models.schemas.d.ts +2 -0
- package/dist/esm/core/security.external-connectors-models.schemas.d.ts.map +1 -1
- package/dist/esm/core/security.external-connectors-models.schemas.js +10 -4
- package/dist/esm/core/security.external-connectors-models.schemas.js.map +1 -1
- package/dist/esm/index.d.ts +2 -0
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +2 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/protocols/agent-client-protocol.external-connectors-models.schemas.d.ts +1 -0
- package/dist/esm/protocols/agent-client-protocol.external-connectors-models.schemas.d.ts.map +1 -1
- package/dist/esm/protocols/agent-client-protocol.external-connectors-models.schemas.js +10 -1
- package/dist/esm/protocols/agent-client-protocol.external-connectors-models.schemas.js.map +1 -1
- package/dist/esm/protocols/billing.standard-interface.schemas.d.ts +8 -0
- package/dist/esm/protocols/billing.standard-interface.schemas.d.ts.map +1 -1
- package/dist/esm/protocols/billing.standard-interface.schemas.js +8 -0
- package/dist/esm/protocols/billing.standard-interface.schemas.js.map +1 -1
- package/dist/esm/protocols/content-safety.external-connectors-models.schemas.d.ts +150 -0
- package/dist/esm/protocols/content-safety.external-connectors-models.schemas.d.ts.map +1 -0
- package/dist/esm/protocols/content-safety.external-connectors-models.schemas.js +182 -0
- package/dist/esm/protocols/content-safety.external-connectors-models.schemas.js.map +1 -0
- package/dist/esm/protocols/document-extraction.external-connectors-models.schemas.d.ts +41 -9
- package/dist/esm/protocols/document-extraction.external-connectors-models.schemas.d.ts.map +1 -1
- package/dist/esm/protocols/document-extraction.external-connectors-models.schemas.js +40 -14
- package/dist/esm/protocols/document-extraction.external-connectors-models.schemas.js.map +1 -1
- package/dist/esm/protocols/email.standard-interface.schemas.d.ts.map +1 -1
- package/dist/esm/protocols/email.standard-interface.schemas.js +4 -0
- package/dist/esm/protocols/email.standard-interface.schemas.js.map +1 -1
- package/dist/esm/protocols/embeddings.external-connectors-models.schemas.d.ts +37 -4
- package/dist/esm/protocols/embeddings.external-connectors-models.schemas.d.ts.map +1 -1
- package/dist/esm/protocols/embeddings.external-connectors-models.schemas.js +57 -1
- package/dist/esm/protocols/embeddings.external-connectors-models.schemas.js.map +1 -1
- package/dist/esm/protocols/file-storage.standard-interface.d.ts +6 -0
- package/dist/esm/protocols/file-storage.standard-interface.d.ts.map +1 -1
- package/dist/esm/protocols/file-storage.standard-interface.js.map +1 -1
- package/dist/esm/protocols/hooks-capability.external-connectors-models.schemas.d.ts +7 -2
- package/dist/esm/protocols/hooks-capability.external-connectors-models.schemas.d.ts.map +1 -1
- package/dist/esm/protocols/hooks-capability.external-connectors-models.schemas.js.map +1 -1
- package/dist/esm/protocols/hooks.external-connectors-models.schemas.d.ts +388 -7
- package/dist/esm/protocols/hooks.external-connectors-models.schemas.d.ts.map +1 -1
- package/dist/esm/protocols/hooks.external-connectors-models.schemas.js +238 -0
- package/dist/esm/protocols/hooks.external-connectors-models.schemas.js.map +1 -1
- package/dist/esm/protocols/llm.external-connectors-models.schemas.d.ts +70 -5
- package/dist/esm/protocols/llm.external-connectors-models.schemas.d.ts.map +1 -1
- package/dist/esm/protocols/llm.external-connectors-models.schemas.js +96 -5
- package/dist/esm/protocols/llm.external-connectors-models.schemas.js.map +1 -1
- package/dist/esm/protocols/rest-operations.external-connectors-models.schemas.d.ts +446 -5
- package/dist/esm/protocols/rest-operations.external-connectors-models.schemas.d.ts.map +1 -1
- package/dist/esm/protocols/rest-operations.external-connectors-models.schemas.js +406 -0
- package/dist/esm/protocols/rest-operations.external-connectors-models.schemas.js.map +1 -1
- package/dist/esm/protocols/subject-erasure-effect.standard-interface.d.ts +133 -0
- package/dist/esm/protocols/subject-erasure-effect.standard-interface.d.ts.map +1 -0
- package/dist/esm/protocols/subject-erasure-effect.standard-interface.js +61 -0
- package/dist/esm/protocols/subject-erasure-effect.standard-interface.js.map +1 -0
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +2 -2
|
@@ -648,6 +648,55 @@ export const LLM_MODEL_APPLICABILITY_PREFERENCE = {
|
|
|
648
648
|
const LLM_MODEL_APPLICABILITY_REQUIRED_IO = {
|
|
649
649
|
[LLM_Model_Applicability.VISUAL_JUDGMENT]: [LLM_Model_IO_Capability.MULTIMODAL_VISION],
|
|
650
650
|
};
|
|
651
|
+
const isDeclarationRecord = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
|
|
652
|
+
const isNonEmptyDeclarationString = (value) => typeof value === "string" && value.trim().length > 0;
|
|
653
|
+
const listsOnlyMembersOf = (value, members) => Array.isArray(value) && value.every((member) => members.has(member));
|
|
654
|
+
/**
|
|
655
|
+
* Why a provider's declared chat models ({@link LLM_ModelDeclaration}) cannot be used, or `undefined` (#2516). Absent is
|
|
656
|
+
* fine: an engine provider has none.
|
|
657
|
+
*
|
|
658
|
+
* A registry provider's module is loaded at runtime, so nothing here compiled its `models`; this is the check that holds
|
|
659
|
+
* them to their shape before resolution reads them. Every vocabulary is checked against its enum, because an unknown
|
|
660
|
+
* applicability would simply never match, and an unknown IO capability would read as evidence it is not.
|
|
661
|
+
*/
|
|
662
|
+
export const describeLLMModelDeclarationsDefect = (models) => {
|
|
663
|
+
if (models === undefined)
|
|
664
|
+
return undefined;
|
|
665
|
+
if (!Array.isArray(models))
|
|
666
|
+
return "are not a list";
|
|
667
|
+
const applicabilities = new Set(Object.values(LLM_Model_Applicability));
|
|
668
|
+
const ioCapabilities = new Set(Object.values(LLM_Model_IO_Capability));
|
|
669
|
+
const thinking = new Set(Object.values(LLM_Model_Thinking_Capability));
|
|
670
|
+
const efforts = new Set(Object.values(LLMProvider_ReasoningEffort));
|
|
671
|
+
const seen = new Set();
|
|
672
|
+
for (const [index, declaration] of models.entries()) {
|
|
673
|
+
if (!isDeclarationRecord(declaration) || !isNonEmptyDeclarationString(declaration.model))
|
|
674
|
+
return `have no \`model\` at position ${index}`;
|
|
675
|
+
const model = declaration.model;
|
|
676
|
+
if (seen.has(model))
|
|
677
|
+
return `declare "${model}" twice`;
|
|
678
|
+
seen.add(model);
|
|
679
|
+
if (!listsOnlyMembersOf(declaration.applicabilities, applicabilities))
|
|
680
|
+
return `give "${model}" unknown \`applicabilities\``;
|
|
681
|
+
if (declaration.applicabilities.includes(LLM_Model_Applicability.WORKSPACE_CODING_AGENT)) {
|
|
682
|
+
return `declare "${model}" for workspace coding, which is served over the Agent Client Protocol and never through a chat model`;
|
|
683
|
+
}
|
|
684
|
+
if (declaration.ioCapabilities !== undefined && !listsOnlyMembersOf(declaration.ioCapabilities, ioCapabilities))
|
|
685
|
+
return `give "${model}" unknown \`ioCapabilities\``;
|
|
686
|
+
if (declaration.thinkingCapability !== undefined && !thinking.has(declaration.thinkingCapability))
|
|
687
|
+
return `give "${model}" an unknown \`thinkingCapability\``;
|
|
688
|
+
if (declaration.unsupportedReasoningEfforts !== undefined && !listsOnlyMembersOf(declaration.unsupportedReasoningEfforts, efforts)) {
|
|
689
|
+
return `give "${model}" unknown \`unsupportedReasoningEfforts\``;
|
|
690
|
+
}
|
|
691
|
+
}
|
|
692
|
+
return undefined;
|
|
693
|
+
};
|
|
694
|
+
/**
|
|
695
|
+
* Whether the engine's catalog knows this provider, which decides where its model facts come from (#2516): catalog rows
|
|
696
|
+
* for an engine provider, the provider's own `models` declaration otherwise. One predicate, so the resolver and the agent
|
|
697
|
+
* registration that reads declarations cannot disagree about which side a provider is on.
|
|
698
|
+
*/
|
|
699
|
+
export const isLLMCatalogProvider = (providerRef, catalog = LLM_MODEL_CATALOG) => Object.values(catalog).some((entry) => entry.providerRef === providerRef);
|
|
651
700
|
/** Why {@link resolveModelForApplicability} could not answer — carried into a named CONFIGURATION error. */
|
|
652
701
|
export var LLM_ModelResolutionFailure;
|
|
653
702
|
(function (LLM_ModelResolutionFailure) {
|
|
@@ -657,6 +706,11 @@ export var LLM_ModelResolutionFailure;
|
|
|
657
706
|
LLM_ModelResolutionFailure["NO_RESOLVABLE_AVAILABILITY"] = "no_resolvable_availability";
|
|
658
707
|
/** Candidates exist and are available, but none evidences the required IO capability. */
|
|
659
708
|
LLM_ModelResolutionFailure["REQUIRED_IO_CAPABILITY_UNEVIDENCED"] = "required_io_capability_unevidenced";
|
|
709
|
+
/**
|
|
710
|
+
* An engine provider (one the catalog knows) also declares models. Its models are catalog rows; a declaration beside
|
|
711
|
+
* them would be a second, unchecked source of the same facts, so it is refused rather than merged.
|
|
712
|
+
*/
|
|
713
|
+
LLM_ModelResolutionFailure["CATALOG_PROVIDER_DECLARES_MODELS"] = "catalog_provider_declares_models";
|
|
660
714
|
})(LLM_ModelResolutionFailure || (LLM_ModelResolutionFailure = {}));
|
|
661
715
|
/**
|
|
662
716
|
* Resolve an applicability to ONE concrete model id for a given provider.
|
|
@@ -667,6 +721,13 @@ export var LLM_ModelResolutionFailure;
|
|
|
667
721
|
* this layer exists to remove — the author asked for a KIND of model, and
|
|
668
722
|
* quietly handing them a different kind is worse than refusing.
|
|
669
723
|
*
|
|
724
|
+
* Two sources, decided by whether the catalog knows the provider (as document extraction decides, #2021):
|
|
725
|
+
* - an ENGINE provider resolves through {@link LLM_MODEL_APPLICABILITY_PREFERENCE} and its catalog rows, every gate
|
|
726
|
+
* below applying, and is refused if it also declares models;
|
|
727
|
+
* - any other provider resolves from its own `declaredModels`, in declared order: the first model declaring the
|
|
728
|
+
* applicability and evidencing the required IO capability. A provider that declares none fails with the same
|
|
729
|
+
* named failure, naming what it considered.
|
|
730
|
+
*
|
|
670
731
|
* Note this function answers the semantic question only. Whether the resolved
|
|
671
732
|
* model is reachable over the agent's TRANSPORT (a profile that
|
|
672
733
|
* declares it) is a separate gate owned by the backend, because the transport
|
|
@@ -680,9 +741,26 @@ export var LLM_ModelResolutionFailure;
|
|
|
680
741
|
* nothing.
|
|
681
742
|
*/
|
|
682
743
|
export const resolveModelForApplicability = (input, catalog = LLM_MODEL_CATALOG) => {
|
|
744
|
+
const requiredIo = LLM_MODEL_APPLICABILITY_REQUIRED_IO[input.applicability] ?? [];
|
|
745
|
+
const declared = input.declaredModels ?? [];
|
|
746
|
+
const catalogKnowsProvider = isLLMCatalogProvider(input.providerRef, catalog);
|
|
747
|
+
if (catalogKnowsProvider && declared.length > 0) {
|
|
748
|
+
return { resolved: false, failure: LLM_ModelResolutionFailure.CATALOG_PROVIDER_DECLARES_MODELS, consideredModels: declared.map((entry) => entry.model) };
|
|
749
|
+
}
|
|
750
|
+
if (!catalogKnowsProvider) {
|
|
751
|
+
const applicable = declared.filter((entry) => entry.applicabilities.includes(input.applicability));
|
|
752
|
+
if (applicable.length === 0) {
|
|
753
|
+
return { resolved: false, failure: LLM_ModelResolutionFailure.NO_CANDIDATE_FOR_PROVIDER, consideredModels: declared.map((entry) => entry.model) };
|
|
754
|
+
}
|
|
755
|
+
const capable = applicable.filter((entry) => requiredIo.every((capability) => (entry.ioCapabilities ?? []).includes(capability)));
|
|
756
|
+
if (capable.length === 0) {
|
|
757
|
+
return { resolved: false, failure: LLM_ModelResolutionFailure.REQUIRED_IO_CAPABILITY_UNEVIDENCED, consideredModels: applicable.map((entry) => entry.model) };
|
|
758
|
+
}
|
|
759
|
+
const { model, ...facts } = capable[0];
|
|
760
|
+
return { resolved: true, model, facts, fromOverride: false };
|
|
761
|
+
}
|
|
683
762
|
const override = input.preferenceOverride?.[input.applicability];
|
|
684
763
|
const candidates = override ?? LLM_MODEL_APPLICABILITY_PREFERENCE[input.applicability];
|
|
685
|
-
const requiredIo = LLM_MODEL_APPLICABILITY_REQUIRED_IO[input.applicability] ?? [];
|
|
686
764
|
const forProvider = candidates.filter((model) => {
|
|
687
765
|
const entry = catalog[model];
|
|
688
766
|
return entry.providerRef === input.providerRef && entry.applicabilities.includes(input.applicability);
|
|
@@ -705,7 +783,18 @@ export const resolveModelForApplicability = (input, catalog = LLM_MODEL_CATALOG)
|
|
|
705
783
|
return { resolved: false, failure: LLM_ModelResolutionFailure.REQUIRED_IO_CAPABILITY_UNEVIDENCED, consideredModels: available };
|
|
706
784
|
}
|
|
707
785
|
const model = capable[0];
|
|
708
|
-
|
|
786
|
+
const entry = catalog[model];
|
|
787
|
+
return {
|
|
788
|
+
resolved: true,
|
|
789
|
+
model,
|
|
790
|
+
facts: {
|
|
791
|
+
applicabilities: entry.applicabilities,
|
|
792
|
+
...(entry.ioCapabilities === undefined ? {} : { ioCapabilities: entry.ioCapabilities }),
|
|
793
|
+
...(entry.thinkingCapability === undefined ? {} : { thinkingCapability: entry.thinkingCapability }),
|
|
794
|
+
...(entry.unsupportedReasoningEfforts === undefined ? {} : { unsupportedReasoningEfforts: entry.unsupportedReasoningEfforts }),
|
|
795
|
+
},
|
|
796
|
+
fromOverride: override !== undefined,
|
|
797
|
+
};
|
|
709
798
|
};
|
|
710
799
|
/**
|
|
711
800
|
* Model → thinking capability, DERIVED from {@link LLM_MODEL_CATALOG}.
|
|
@@ -754,13 +843,15 @@ export const getModelThinkingCapability = (model) => LLM_MODEL_THINKING_CAPABILI
|
|
|
754
843
|
*
|
|
755
844
|
* @param model The configured model id (free-form; unknown ids pass).
|
|
756
845
|
* @param effort The configured effort; omit/undefined always passes.
|
|
846
|
+
* @param declared For a model a registry provider declares (#2516), its own thinking facts; they replace the catalog's,
|
|
847
|
+
* which knows nothing of it. Absent facts fail open, exactly as for an unprobed catalog row.
|
|
757
848
|
* @returns A violation message, or `null` if valid/unjudgeable.
|
|
758
849
|
*/
|
|
759
|
-
export const validateReasoningEffortForModel = (model, effort) => {
|
|
850
|
+
export const validateReasoningEffortForModel = (model, effort, declared) => {
|
|
760
851
|
/** @wildo_source:part:end saas.external-providers.llm.model-configuration */
|
|
761
852
|
if (effort === undefined)
|
|
762
853
|
return null;
|
|
763
|
-
const capability = getModelThinkingCapability(model);
|
|
854
|
+
const capability = declared !== undefined ? declared.thinkingCapability : getModelThinkingCapability(model);
|
|
764
855
|
if (capability === undefined)
|
|
765
856
|
return null;
|
|
766
857
|
if (capability === LLM_Model_Thinking_Capability.NONE) {
|
|
@@ -769,7 +860,7 @@ export const validateReasoningEffortForModel = (model, effort) => {
|
|
|
769
860
|
if (capability === LLM_Model_Thinking_Capability.ALWAYS && effort === LLMProvider_ReasoningEffort.NONE) {
|
|
770
861
|
return `Model "${model}" always reasons — its thinking cannot be disabled, so reasoningEffort "none" is rejected by the provider. Use "low" for the cheapest reasoning, or omit reasoningEffort for the model default.`;
|
|
771
862
|
}
|
|
772
|
-
const unsupported = LLM_MODEL_UNSUPPORTED_REASONING_EFFORTS[model];
|
|
863
|
+
const unsupported = declared !== undefined ? declared.unsupportedReasoningEfforts : LLM_MODEL_UNSUPPORTED_REASONING_EFFORTS[model];
|
|
773
864
|
if (unsupported?.includes(effort)) {
|
|
774
865
|
const hint = effort === LLMProvider_ReasoningEffort.PROVIDER_DEFAULT
|
|
775
866
|
? 'Omit reasoningEffort entirely to get the model default.'
|