@wrongstack/core 0.292.1 → 0.293.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/coordination/index.js.map +2 -2
- package/dist/core/fallback-profile-manager.d.ts +0 -2
- package/dist/core/fallback-profile-manager.d.ts.map +1 -1
- package/dist/core/system-prompt-builder.d.ts.map +1 -1
- package/dist/defaults/index.js +346 -317
- package/dist/defaults/index.js.map +4 -4
- package/dist/execution/compaction-core.d.ts +3 -0
- package/dist/execution/compaction-core.d.ts.map +1 -1
- package/dist/execution/compactor.d.ts +4 -0
- package/dist/execution/compactor.d.ts.map +1 -1
- package/dist/execution/index.js +133 -49
- package/dist/execution/index.js.map +4 -4
- package/dist/execution/intelligent-compactor.d.ts +5 -1
- package/dist/execution/intelligent-compactor.d.ts.map +1 -1
- package/dist/execution/selective-compactor.d.ts +4 -0
- package/dist/execution/selective-compactor.d.ts.map +1 -1
- package/dist/goal/phase-orchestrator.d.ts +4 -0
- package/dist/goal/phase-orchestrator.d.ts.map +1 -1
- package/dist/hooks/runner.d.ts +0 -2
- package/dist/hooks/runner.d.ts.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +116 -109
- package/dist/index.js.map +2 -2
- package/dist/models/alibaba-token-plan-catalog.d.ts +85 -0
- package/dist/models/alibaba-token-plan-catalog.d.ts.map +1 -0
- package/dist/models/index.d.ts +1 -0
- package/dist/models/index.d.ts.map +1 -1
- package/dist/models/index.js +200 -15
- package/dist/models/index.js.map +4 -4
- package/dist/models/llm-selector.d.ts +4 -0
- package/dist/models/llm-selector.d.ts.map +1 -1
- package/dist/models/models-registry.d.ts +8 -0
- package/dist/models/models-registry.d.ts.map +1 -1
- package/dist/security/index.js +0 -23
- package/dist/security/index.js.map +2 -2
- package/dist/security/permission-policy.d.ts +0 -23
- package/dist/security/permission-policy.d.ts.map +1 -1
- package/dist/storage/config-loader.d.ts.map +1 -1
- package/dist/storage/index.js +6 -5
- package/dist/storage/index.js.map +2 -2
- package/dist/tools/index.js.map +2 -2
- package/dist/types/config.d.ts +9 -16
- package/dist/types/config.d.ts.map +1 -1
- package/dist/types/index.js +2 -3
- package/dist/types/index.js.map +2 -2
- package/dist/utils/index.js +15 -0
- package/dist/utils/index.js.map +2 -2
- package/dist/utils/merge-models-payload.d.ts +9 -0
- package/dist/utils/merge-models-payload.d.ts.map +1 -1
- package/package.json +2 -2
package/dist/utils/index.js
CHANGED
|
@@ -2724,15 +2724,30 @@ function mergeCustomModelDefs(providerCustomModels, configModels) {
|
|
|
2724
2724
|
}
|
|
2725
2725
|
|
|
2726
2726
|
// src/utils/merge-models-payload.ts
|
|
2727
|
+
var REMOVE_PROVIDERS_KEY = "_removeProviders";
|
|
2728
|
+
var REMOVE_MODELS_KEY = "_removeModels";
|
|
2727
2729
|
function mergeModelsPayload(base, overlay) {
|
|
2730
|
+
const removeProviders = Array.isArray(overlay[REMOVE_PROVIDERS_KEY]) ? overlay[REMOVE_PROVIDERS_KEY] : [];
|
|
2731
|
+
const removeModels = overlay[REMOVE_MODELS_KEY] && typeof overlay[REMOVE_MODELS_KEY] === "object" ? overlay[REMOVE_MODELS_KEY] : {};
|
|
2728
2732
|
const out = {};
|
|
2729
2733
|
for (const [id, provider] of Object.entries(base)) {
|
|
2730
2734
|
out[id] = cloneProvider(provider);
|
|
2731
2735
|
}
|
|
2732
2736
|
for (const [id, ovProvider] of Object.entries(overlay)) {
|
|
2737
|
+
if (id === REMOVE_PROVIDERS_KEY || id === REMOVE_MODELS_KEY) continue;
|
|
2733
2738
|
const existing = out[id];
|
|
2734
2739
|
out[id] = existing ? mergeProvider(existing, ovProvider) : cloneProvider(ovProvider);
|
|
2735
2740
|
}
|
|
2741
|
+
for (const providerId of removeProviders) {
|
|
2742
|
+
delete out[providerId];
|
|
2743
|
+
}
|
|
2744
|
+
for (const [providerId, modelIds] of Object.entries(removeModels)) {
|
|
2745
|
+
const provider = out[providerId];
|
|
2746
|
+
if (!provider || !provider.models) continue;
|
|
2747
|
+
for (const modelId of modelIds) {
|
|
2748
|
+
delete provider.models[modelId];
|
|
2749
|
+
}
|
|
2750
|
+
}
|
|
2736
2751
|
return out;
|
|
2737
2752
|
}
|
|
2738
2753
|
function mergeProvider(base, overlay) {
|