dsh-loop-engine 0.1.7-rc2 → 0.1.7-rc3

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 (2) hide show
  1. package/lib/index.js +18 -3
  2. package/package.json +1 -1
package/lib/index.js CHANGED
@@ -7530,6 +7530,8 @@ function apply(ctx, config) {
7530
7530
  const AGENT_PRESETS_NS = "agent-presets";
7531
7531
  const PRESET_DEFAULT_ATTEMPTS = 30;
7532
7532
  const PRESET_DEFAULT_RETRY_MS = 100;
7533
+ const PRESET_SOURCE_ATTEMPTS = 20;
7534
+ const PRESET_SOURCE_RETRY_MS = 100;
7533
7535
  const ROUTE_ATTEMPTS = 30;
7534
7536
  const ROUTE_RETRY_MS = 100;
7535
7537
  const ROUTER_ATTEMPTS = 40;
@@ -7605,11 +7607,24 @@ function apply(ctx, config) {
7605
7607
  }
7606
7608
  return void 0;
7607
7609
  }
7608
- const settled = authoring ??= ensureEnginePresets(resolveDshHome2(), presets).catch((error) => {
7609
- ctx.logger.error(`loop-engine: engine preset authoring failed: ${String(error)}`);
7610
+ const settled = authoring ??= (async () => {
7611
+ let lastError;
7612
+ for (let attempt2 = 0; attempt2 <= PRESET_SOURCE_ATTEMPTS; attempt2 += 1) {
7613
+ try {
7614
+ return await ensureEnginePresets(resolveDshHome2(), presets);
7615
+ } catch (error) {
7616
+ lastError = error;
7617
+ if (attempt2 < PRESET_SOURCE_ATTEMPTS) {
7618
+ await new Promise((resolve5) => {
7619
+ setTimeout(resolve5, PRESET_SOURCE_RETRY_MS);
7620
+ });
7621
+ }
7622
+ }
7623
+ }
7624
+ ctx.logger.error(`loop-engine: engine preset authoring failed: ${String(lastError)}`);
7610
7625
  authoring = void 0;
7611
7626
  return false;
7612
- });
7627
+ })();
7613
7628
  return { presets, settled };
7614
7629
  };
7615
7630
  let authoring;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "dsh-loop-engine",
3
3
  "description": "Web-switchable agent loop engine selection for the DeepSeek Harness - out-of-tree plugin (Claude Code / Codex / Pi / Kimi Code drivers) maintained by @kuun993, zero main-repo changes",
4
- "version": "0.1.7-rc2",
4
+ "version": "0.1.7-rc3",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },