@goodandready/dsh-key-rotation 0.7.16 → 0.7.17

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 +5 -1
  2. package/package.json +1 -1
package/lib/index.js CHANGED
@@ -288,7 +288,11 @@ export function apply(ctx, config = {}) {
288
288
  'document.addEventListener("mouseup",function(){if(!dragging)return;dragging=false;el.style.cursor="grab";try{localStorage.setItem("krot-dash-pos",JSON.stringify({left:el.offsetLeft,top:el.offsetTop}));}catch(e){}});' +
289
289
  '})();' +
290
290
  '</script>';
291
- ctx.effect(() => ctx.webServer.tapIndex((html) => html + DASH_HTML), 'dsh-key-rotation: dashboard');
291
+ ctx.effect(() => ctx.webServer.tapIndex((html) => {
292
+ const at = html.indexOf('</body>');
293
+ if (at === -1) return html + DASH_HTML;
294
+ return html.slice(0, at) + DASH_HTML + html.slice(at);
295
+ }), 'dsh-key-rotation: dashboard');
292
296
  // ── key-pool state, persisted across config reloads ──
293
297
  // base provider -> { failedUntil: Map<ref, epochMs>, pointer: number, lastUsed: ref }
294
298
  const poolState = new Map();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@goodandready/dsh-key-rotation",
3
- "version": "0.7.16",
3
+ "version": "0.7.17",
4
4
  "description": "Per-provider API key rotation for DeepSeek Harness: a key pool per provider, auto-created clone routes, and switching to the next key on quota/rate-limit errors. Includes a Settings section (Key Rotation) to edit the key pools, cooldown and switch codes.",
5
5
  "keywords": [
6
6
  "deepseek-harness",