@proxysoul/soulforge 2.13.1 → 2.13.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/index.js CHANGED
@@ -41578,7 +41578,7 @@ var package_default;
41578
41578
  var init_package = __esm(() => {
41579
41579
  package_default = {
41580
41580
  name: "@proxysoul/soulforge",
41581
- version: "2.13.1",
41581
+ version: "2.13.2",
41582
41582
  description: "Graph-powered code intelligence \u2014 multi-agent coding with codebase-aware AI",
41583
41583
  repository: {
41584
41584
  type: "git",
@@ -84327,6 +84327,47 @@ var init_provider_options = __esm(() => {
84327
84327
  };
84328
84328
  });
84329
84329
 
84330
+ // src/core/retry/settings.ts
84331
+ function resolveRetrySettings(raw, opts = {}) {
84332
+ const defaultBase = opts.agent ? DEFAULT_AGENT_BASE_DELAY_MS : DEFAULT_CHAT_BASE_DELAY_MS;
84333
+ const obj = raw && typeof raw === "object" ? raw : null;
84334
+ const maxRetries = clampIntMin(obj?.maxAttempts, MIN_MAX_ATTEMPTS, DEFAULT_MAX_RETRIES, "retry.maxAttempts");
84335
+ const baseDelayMs = clampInt(obj?.baseDelayMs, MIN_BASE_DELAY_MS, MAX_BASE_DELAY_MS, defaultBase, "retry.baseDelayMs");
84336
+ return {
84337
+ maxRetries,
84338
+ baseDelayMs
84339
+ };
84340
+ }
84341
+ function clampIntMin(value, min, fallback, key) {
84342
+ if (value === undefined)
84343
+ return fallback;
84344
+ if (typeof value !== "number" || !Number.isFinite(value)) {
84345
+ if (key && !warnedKeys.has(key)) {
84346
+ warnedKeys.add(key);
84347
+ logBackgroundError("config", `${key}: expected a finite number, got ${typeof value === "object" ? JSON.stringify(value) : String(value)} (${typeof value}). Using default ${String(fallback)}.`);
84348
+ }
84349
+ return fallback;
84350
+ }
84351
+ return Math.max(min, Math.round(value));
84352
+ }
84353
+ function clampInt(value, min, max, fallback, key) {
84354
+ if (value === undefined)
84355
+ return fallback;
84356
+ if (typeof value !== "number" || !Number.isFinite(value)) {
84357
+ if (key && !warnedKeys.has(key)) {
84358
+ warnedKeys.add(key);
84359
+ logBackgroundError("config", `${key}: expected a finite number, got ${typeof value === "object" ? JSON.stringify(value) : String(value)} (${typeof value}). Using default ${String(fallback)}.`);
84360
+ }
84361
+ return fallback;
84362
+ }
84363
+ return Math.min(max, Math.max(min, Math.round(value)));
84364
+ }
84365
+ var DEFAULT_AGENT_BASE_DELAY_MS = 2000, DEFAULT_CHAT_BASE_DELAY_MS = 1000, DEFAULT_MAX_RETRIES = 3, MIN_MAX_ATTEMPTS = 1, MIN_BASE_DELAY_MS = 250, MAX_BASE_DELAY_MS = 60000, warnedKeys;
84366
+ var init_settings = __esm(() => {
84367
+ init_errors();
84368
+ warnedKeys = new Set;
84369
+ });
84370
+
84330
84371
  // src/core/coordination/WorkspaceCoordinator.ts
84331
84372
  import { resolve as resolve3, sep } from "path";
84332
84373
  function normalizePath2(p) {
@@ -373821,9 +373862,15 @@ var init_stream_options = __esm(() => {
373821
373862
 
373822
373863
  // src/core/agents/web-search.ts
373823
373864
  function createWebSearchAgent(model, opts) {
373865
+ const {
373866
+ maxRetries: retryMaxRetries
373867
+ } = resolveRetrySettings(loadConfig().retry, {
373868
+ agent: true
373869
+ });
373824
373870
  return new ToolLoopAgent({
373825
373871
  id: "web-search",
373826
373872
  model,
373873
+ maxRetries: retryMaxRetries,
373827
373874
  ...supportsTemperature(getModelId(model)) ? {
373828
373875
  temperature: 0
373829
373876
  } : {},
@@ -373881,7 +373928,9 @@ Output a clear, well-structured summary of your findings. Include source URLs fo
373881
373928
  var init_web_search = __esm(() => {
373882
373929
  init_dist22();
373883
373930
  init_zod();
373931
+ init_config();
373884
373932
  init_provider_options();
373933
+ init_settings();
373885
373934
  init_fetch_page();
373886
373935
  init_web_search_scraper();
373887
373936
  init_stream_options();
@@ -376891,9 +376940,15 @@ function createCodeAgent(model, options) {
376891
376940
  disablePruning: options?.disablePruning,
376892
376941
  tabId: options?.tabId
376893
376942
  });
376943
+ const {
376944
+ maxRetries: retryMaxRetries
376945
+ } = resolveRetrySettings(loadConfig().retry, {
376946
+ agent: true
376947
+ });
376894
376948
  return new ToolLoopAgent({
376895
376949
  id: options?.agentId ?? "code",
376896
376950
  model,
376951
+ maxRetries: retryMaxRetries,
376897
376952
  ...supportsTemperature(getModelId(model)) ? {
376898
376953
  temperature: 0
376899
376954
  } : {},
@@ -376930,7 +376985,9 @@ Coordination: report_finding after significant changes (paths, what changed, new
376930
376985
  }
376931
376986
  var init_code = __esm(() => {
376932
376987
  init_dist22();
376988
+ init_config();
376933
376989
  init_provider_options();
376990
+ init_settings();
376934
376991
  init_tools();
376935
376992
  init_bus_tools();
376936
376993
  init_step_utils();
@@ -377010,9 +377067,15 @@ function createExploreAgent(model, options) {
377010
377067
  disablePruning: options?.disablePruning,
377011
377068
  tabId: options?.tabId
377012
377069
  });
377070
+ const {
377071
+ maxRetries: retryMaxRetries
377072
+ } = resolveRetrySettings(loadConfig().retry, {
377073
+ agent: true
377074
+ });
377013
377075
  return new ToolLoopAgent({
377014
377076
  id: options?.agentId ?? "explore",
377015
377077
  model,
377078
+ maxRetries: retryMaxRetries,
377016
377079
  ...supportsTemperature(getModelId(model)) ? {
377017
377080
  temperature: 0
377018
377081
  } : {},
@@ -377047,7 +377110,9 @@ Coordination: report_finding after discoveries \u2014 especially shared symbols/
377047
377110
  }
377048
377111
  var init_explore = __esm(() => {
377049
377112
  init_dist22();
377113
+ init_config();
377050
377114
  init_provider_options();
377115
+ init_settings();
377051
377116
  init_tools();
377052
377117
  init_bus_tools();
377053
377118
  init_step_utils();
@@ -381274,47 +381339,6 @@ var init_agent_results = __esm(() => {
381274
381339
  STUB_PATTERNS = ["[Already in your context", "\u2190 file was edited", "\u2190", "[cached]"];
381275
381340
  });
381276
381341
 
381277
- // src/core/retry/settings.ts
381278
- function resolveRetrySettings(raw, opts = {}) {
381279
- const defaultBase = opts.agent ? DEFAULT_AGENT_BASE_DELAY_MS : DEFAULT_CHAT_BASE_DELAY_MS;
381280
- const obj = raw && typeof raw === "object" ? raw : null;
381281
- const maxRetries = clampIntMin(obj?.maxAttempts, MIN_MAX_ATTEMPTS, DEFAULT_MAX_RETRIES, "retry.maxAttempts");
381282
- const baseDelayMs = clampInt(obj?.baseDelayMs, MIN_BASE_DELAY_MS, MAX_BASE_DELAY_MS, defaultBase, "retry.baseDelayMs");
381283
- return {
381284
- maxRetries,
381285
- baseDelayMs
381286
- };
381287
- }
381288
- function clampIntMin(value, min, fallback, key2) {
381289
- if (value === undefined)
381290
- return fallback;
381291
- if (typeof value !== "number" || !Number.isFinite(value)) {
381292
- if (key2 && !warnedKeys.has(key2)) {
381293
- warnedKeys.add(key2);
381294
- logBackgroundError("config", `${key2}: expected a finite number, got ${typeof value === "object" ? JSON.stringify(value) : String(value)} (${typeof value}). Using default ${String(fallback)}.`);
381295
- }
381296
- return fallback;
381297
- }
381298
- return Math.max(min, Math.round(value));
381299
- }
381300
- function clampInt(value, min, max, fallback, key2) {
381301
- if (value === undefined)
381302
- return fallback;
381303
- if (typeof value !== "number" || !Number.isFinite(value)) {
381304
- if (key2 && !warnedKeys.has(key2)) {
381305
- warnedKeys.add(key2);
381306
- logBackgroundError("config", `${key2}: expected a finite number, got ${typeof value === "object" ? JSON.stringify(value) : String(value)} (${typeof value}). Using default ${String(fallback)}.`);
381307
- }
381308
- return fallback;
381309
- }
381310
- return Math.min(max, Math.max(min, Math.round(value)));
381311
- }
381312
- var DEFAULT_AGENT_BASE_DELAY_MS = 2000, DEFAULT_CHAT_BASE_DELAY_MS = 1000, DEFAULT_MAX_RETRIES = 3, MIN_MAX_ATTEMPTS = 1, MIN_BASE_DELAY_MS = 250, MAX_BASE_DELAY_MS = 60000, warnedKeys;
381313
- var init_settings = __esm(() => {
381314
- init_errors();
381315
- warnedKeys = new Set;
381316
- });
381317
-
381318
381342
  // src/core/agents/agent-runner.ts
381319
381343
  function getMaxConcurrentAgents() {
381320
381344
  const v = loadConfig().taskRouter?.maxConcurrentAgents;
@@ -383513,9 +383537,13 @@ function createForgeAgent({
383513
383537
  }
383514
383538
  }
383515
383539
  };
383540
+ const {
383541
+ maxRetries: retryMaxRetries
383542
+ } = resolveRetrySettings(loadConfig().retry);
383516
383543
  return new ToolLoopAgent({
383517
383544
  id: "forge",
383518
383545
  model,
383546
+ maxRetries: retryMaxRetries,
383519
383547
  ...supportsTemperature(fullModelId ?? getModelId(model)) ? {
383520
383548
  temperature: 0
383521
383549
  } : {},
@@ -383554,9 +383582,11 @@ var init_forge = __esm(() => {
383554
383582
  init_dist4();
383555
383583
  init_dist22();
383556
383584
  init_zod();
383585
+ init_config();
383557
383586
  init_image_compress();
383558
383587
  init_provider_options();
383559
383588
  init_mcp2();
383589
+ init_settings();
383560
383590
  init_tools();
383561
383591
  init_task_list();
383562
383592
  init_step_utils();
@@ -477659,7 +477689,7 @@ Proceeding without it will significantly reduce capabilities \u2014 no soul tool
477659
477689
  break;
477660
477690
  } catch (err2) {
477661
477691
  const msg = err2 instanceof Error ? err2.message : String(err2);
477662
- const isTransient = /overloaded|529|429|rate.?limit|too many requests|503|502|timeout/i.test(msg);
477692
+ const isTransient = /overloaded|529|429|rate.?limit|too many requests|503|502|timeout|timed out|fetch failed|network|econnreset|econnrefused|enotfound|eai_again|socket hang up|connection (?:error|reset|refused|closed)|stream (?:error|closed)|premature close|terminated|aborted.*connection/i.test(msg);
477663
477693
  if (!isTransient || retry === MAX_TRANSIENT_RETRIES || abortController.signal.aborted) {
477664
477694
  throw err2;
477665
477695
  }
@@ -49515,7 +49515,7 @@ var package_default;
49515
49515
  var init_package = __esm(() => {
49516
49516
  package_default = {
49517
49517
  name: "@proxysoul/soulforge",
49518
- version: "2.13.1",
49518
+ version: "2.13.2",
49519
49519
  description: "Graph-powered code intelligence \u2014 multi-agent coding with codebase-aware AI",
49520
49520
  repository: {
49521
49521
  type: "git",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@proxysoul/soulforge",
3
- "version": "2.13.1",
3
+ "version": "2.13.2",
4
4
  "description": "Graph-powered code intelligence — multi-agent coding with codebase-aware AI",
5
5
  "repository": {
6
6
  "type": "git",