@wrongstack/core 0.298.1 → 0.298.2
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/coordination/index.js +92 -7
- package/dist/coordination/mail-tools.d.ts +3 -3
- package/dist/coordination/mailbox-codecs.d.ts +1 -1
- package/dist/coordination/mailbox-project-server.js +32 -1
- package/dist/coordination/mailbox-types.d.ts +158 -3
- package/dist/coordination/model-matrix.d.ts +16 -0
- package/dist/core/index.js +447 -43
- package/dist/defaults/index.js +21 -2
- package/dist/index.js +667 -519
- package/dist/infrastructure/index.js +20 -1
- package/dist/models/index.d.ts +1 -0
- package/dist/models/index.js +108 -1
- package/dist/models/models-dev-schema.d.ts +308 -0
- package/dist/plugin/index.js +14 -6
- package/dist/plugins/auto-review-plugin.d.ts +17 -2
- package/dist/storage/index.js +20 -1
- package/dist/tools/index.js +30 -2
- package/dist/types/config/providers.d.ts +13 -1
- package/dist/types/models-registry.d.ts +9 -4
- package/package.json +4 -3
package/dist/defaults/index.js
CHANGED
|
@@ -28279,7 +28279,7 @@ import * as fs11 from "node:fs/promises";
|
|
|
28279
28279
|
import * as path33 from "node:path";
|
|
28280
28280
|
var DEFAULT_URL = "https://models.dev/api.json";
|
|
28281
28281
|
var ENV_URL_KEY = "WRONGSTACK_MODELS_DEV_URL";
|
|
28282
|
-
var DEFAULT_TTL_SECONDS =
|
|
28282
|
+
var DEFAULT_TTL_SECONDS = 3 * 3600;
|
|
28283
28283
|
var DEFAULT_REFRESH_TIMEOUT_MS = 15e3;
|
|
28284
28284
|
var FAMILY_BY_NPM = {
|
|
28285
28285
|
"@ai-sdk/anthropic": "anthropic",
|
|
@@ -32085,13 +32085,32 @@ function inlineDefinition(model) {
|
|
|
32085
32085
|
if (maxOutput !== void 0) definition.maxOutput = maxOutput;
|
|
32086
32086
|
const capabilities = readCapabilities(model);
|
|
32087
32087
|
if (capabilities) definition.capabilities = capabilities;
|
|
32088
|
+
const { id: _id, ...rest } = model;
|
|
32089
|
+
if (Object.keys(rest).length > 0) {
|
|
32090
|
+
definition.modelsDev = rest;
|
|
32091
|
+
}
|
|
32088
32092
|
return definition;
|
|
32089
32093
|
}
|
|
32090
32094
|
function mergeDefinitions(base, patch) {
|
|
32095
|
+
const mergedModelsDev = (() => {
|
|
32096
|
+
if (!base?.modelsDev && !patch.modelsDev) return void 0;
|
|
32097
|
+
const baseMd = base?.modelsDev ?? {};
|
|
32098
|
+
const patchMd = patch.modelsDev ?? {};
|
|
32099
|
+
const result = { ...baseMd, ...patchMd };
|
|
32100
|
+
for (const nestedKey of ["limit", "cost", "modalities"]) {
|
|
32101
|
+
const bn = baseMd?.[nestedKey];
|
|
32102
|
+
const pn = patchMd?.[nestedKey];
|
|
32103
|
+
if (bn || pn) {
|
|
32104
|
+
result[nestedKey] = { ...bn ?? {}, ...pn ?? {} };
|
|
32105
|
+
}
|
|
32106
|
+
}
|
|
32107
|
+
return result;
|
|
32108
|
+
})();
|
|
32091
32109
|
return {
|
|
32092
32110
|
...base,
|
|
32093
32111
|
...patch,
|
|
32094
|
-
...base?.capabilities || patch.capabilities ? { capabilities: { ...base?.capabilities, ...patch.capabilities } } : {}
|
|
32112
|
+
...base?.capabilities || patch.capabilities ? { capabilities: { ...base?.capabilities, ...patch.capabilities } } : {},
|
|
32113
|
+
...mergedModelsDev ? { modelsDev: mergedModelsDev } : {}
|
|
32095
32114
|
};
|
|
32096
32115
|
}
|
|
32097
32116
|
function normalizeInlineProviderModels(config, warn) {
|