@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.
Files changed (51) hide show
  1. package/dist/coordination/index.js.map +2 -2
  2. package/dist/core/fallback-profile-manager.d.ts +0 -2
  3. package/dist/core/fallback-profile-manager.d.ts.map +1 -1
  4. package/dist/core/system-prompt-builder.d.ts.map +1 -1
  5. package/dist/defaults/index.js +346 -317
  6. package/dist/defaults/index.js.map +4 -4
  7. package/dist/execution/compaction-core.d.ts +3 -0
  8. package/dist/execution/compaction-core.d.ts.map +1 -1
  9. package/dist/execution/compactor.d.ts +4 -0
  10. package/dist/execution/compactor.d.ts.map +1 -1
  11. package/dist/execution/index.js +133 -49
  12. package/dist/execution/index.js.map +4 -4
  13. package/dist/execution/intelligent-compactor.d.ts +5 -1
  14. package/dist/execution/intelligent-compactor.d.ts.map +1 -1
  15. package/dist/execution/selective-compactor.d.ts +4 -0
  16. package/dist/execution/selective-compactor.d.ts.map +1 -1
  17. package/dist/goal/phase-orchestrator.d.ts +4 -0
  18. package/dist/goal/phase-orchestrator.d.ts.map +1 -1
  19. package/dist/hooks/runner.d.ts +0 -2
  20. package/dist/hooks/runner.d.ts.map +1 -1
  21. package/dist/index.d.ts +1 -1
  22. package/dist/index.d.ts.map +1 -1
  23. package/dist/index.js +116 -109
  24. package/dist/index.js.map +2 -2
  25. package/dist/models/alibaba-token-plan-catalog.d.ts +85 -0
  26. package/dist/models/alibaba-token-plan-catalog.d.ts.map +1 -0
  27. package/dist/models/index.d.ts +1 -0
  28. package/dist/models/index.d.ts.map +1 -1
  29. package/dist/models/index.js +200 -15
  30. package/dist/models/index.js.map +4 -4
  31. package/dist/models/llm-selector.d.ts +4 -0
  32. package/dist/models/llm-selector.d.ts.map +1 -1
  33. package/dist/models/models-registry.d.ts +8 -0
  34. package/dist/models/models-registry.d.ts.map +1 -1
  35. package/dist/security/index.js +0 -23
  36. package/dist/security/index.js.map +2 -2
  37. package/dist/security/permission-policy.d.ts +0 -23
  38. package/dist/security/permission-policy.d.ts.map +1 -1
  39. package/dist/storage/config-loader.d.ts.map +1 -1
  40. package/dist/storage/index.js +6 -5
  41. package/dist/storage/index.js.map +2 -2
  42. package/dist/tools/index.js.map +2 -2
  43. package/dist/types/config.d.ts +9 -16
  44. package/dist/types/config.d.ts.map +1 -1
  45. package/dist/types/index.js +2 -3
  46. package/dist/types/index.js.map +2 -2
  47. package/dist/utils/index.js +15 -0
  48. package/dist/utils/index.js.map +2 -2
  49. package/dist/utils/merge-models-payload.d.ts +9 -0
  50. package/dist/utils/merge-models-payload.d.ts.map +1 -1
  51. package/package.json +2 -2
@@ -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) {