@yemi33/minions 0.1.337 → 0.1.338
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/CHANGELOG.md +5 -0
- package/dashboard/js/settings.js +23 -2
- package/dashboard.js +16 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/dashboard/js/settings.js
CHANGED
|
@@ -75,7 +75,10 @@ async function openSettings() {
|
|
|
75
75
|
'<h3 style="font-size:13px;color:var(--blue);margin-bottom:8px">Routing Table</h3>' +
|
|
76
76
|
'<textarea id="set-routing" rows="12" style="width:100%;padding:8px;background:var(--surface);border:1px solid var(--border);border-radius:4px;color:var(--text);font-family:monospace;font-size:11px;resize:vertical">' + escHtml(data.routing || '') + '</textarea>' +
|
|
77
77
|
|
|
78
|
-
'<
|
|
78
|
+
'<div style="display:flex;align-items:center;gap:12px;margin-top:12px">' +
|
|
79
|
+
'<button onclick="resetSettingsToDefaults()" style="font-size:11px;padding:4px 12px;background:var(--surface2);border:1px solid var(--border);border-radius:4px;color:var(--red);cursor:pointer">Reset to Defaults</button>' +
|
|
80
|
+
'<span id="settings-status" style="font-size:11px;color:var(--muted)"></span>' +
|
|
81
|
+
'</div>' +
|
|
79
82
|
'</div>';
|
|
80
83
|
|
|
81
84
|
document.getElementById('modal-title').textContent = 'Settings';
|
|
@@ -223,4 +226,22 @@ async function addProject() {
|
|
|
223
226
|
} catch (e) { alert('Error: ' + e.message); }
|
|
224
227
|
}
|
|
225
228
|
|
|
226
|
-
|
|
229
|
+
async function resetSettingsToDefaults() {
|
|
230
|
+
if (!confirm('Reset all engine, CLI, and agent settings to defaults? This cannot be undone.')) return;
|
|
231
|
+
const status = document.getElementById('settings-status');
|
|
232
|
+
try {
|
|
233
|
+
status.textContent = 'Resetting...';
|
|
234
|
+
status.style.color = 'var(--blue)';
|
|
235
|
+
const res = await fetch('/api/settings/reset', { method: 'POST' });
|
|
236
|
+
if (!res.ok) { const d = await res.json(); throw new Error(d.error || 'Reset failed'); }
|
|
237
|
+
status.textContent = 'Reset complete. Reloading...';
|
|
238
|
+
status.style.color = 'var(--green)';
|
|
239
|
+
showToast('cmd-toast', 'Settings reset to defaults', true);
|
|
240
|
+
setTimeout(() => openSettings(), 500);
|
|
241
|
+
} catch (e) {
|
|
242
|
+
status.textContent = 'Error: ' + e.message;
|
|
243
|
+
status.style.color = 'var(--red)';
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
window.MinionsSettings = { openSettings, saveSettings, addProject, resetSettingsToDefaults };
|
package/dashboard.js
CHANGED
|
@@ -277,8 +277,7 @@ let ccInFlight = false;
|
|
|
277
277
|
let ccInFlightSince = 0; // timestamp — auto-release stuck guard
|
|
278
278
|
const CC_INFLIGHT_TIMEOUT_MS = 2 * 60 * 1000; // 2 minutes — auto-release if request hangs
|
|
279
279
|
|
|
280
|
-
//
|
|
281
|
-
const _ccPromptHash = require('crypto').createHash('md5').update(CC_STATIC_SYSTEM_PROMPT).digest('hex').slice(0, 8);
|
|
280
|
+
// _ccPromptHash computed after CC_STATIC_SYSTEM_PROMPT is defined (see below)
|
|
282
281
|
|
|
283
282
|
function ccSessionValid() {
|
|
284
283
|
if (!ccSession.sessionId) return false;
|
|
@@ -436,6 +435,9 @@ Available action types:
|
|
|
436
435
|
8. **Never push to git remotes** without the user explicitly confirming.
|
|
437
436
|
9. For long-running processes (dev servers), start them detached so they survive after your session.`;
|
|
438
437
|
|
|
438
|
+
// Hash the system prompt so we can detect changes and invalidate stale sessions
|
|
439
|
+
const _ccPromptHash = require('crypto').createHash('md5').update(CC_STATIC_SYSTEM_PROMPT).digest('hex').slice(0, 8);
|
|
440
|
+
|
|
439
441
|
function buildCCStatePreamble() {
|
|
440
442
|
// Lightweight snapshot — just enough to orient. Use tools for details.
|
|
441
443
|
const agents = getAgents().map(a => `- ${a.name} (${a.id}): ${a.status}${a.currentTask ? ' — ' + a.currentTask.slice(0, 60) : ''}`).join('\n');
|
|
@@ -3279,6 +3281,17 @@ What would you like to discuss or change? When you're happy, say "approve" and I
|
|
|
3279
3281
|
} catch (e) { return jsonReply(res, 500, { error: e.message }); }
|
|
3280
3282
|
}
|
|
3281
3283
|
|
|
3284
|
+
async function handleSettingsReset(req, res) {
|
|
3285
|
+
try {
|
|
3286
|
+
const config = getConfig();
|
|
3287
|
+
config.engine = { ...shared.ENGINE_DEFAULTS };
|
|
3288
|
+
config.claude = { ...shared.DEFAULT_CLAUDE };
|
|
3289
|
+
config.agents = { ...shared.DEFAULT_AGENTS };
|
|
3290
|
+
safeWrite(CONFIG_PATH, config);
|
|
3291
|
+
return jsonReply(res, 200, { ok: true });
|
|
3292
|
+
} catch (e) { return jsonReply(res, 500, { error: e.message }); }
|
|
3293
|
+
}
|
|
3294
|
+
|
|
3282
3295
|
async function handleHealth(req, res) {
|
|
3283
3296
|
const engine = getEngineState();
|
|
3284
3297
|
const agents = getAgents();
|
|
@@ -3740,6 +3753,7 @@ What would you like to discuss or change? When you're happy, say "approve" and I
|
|
|
3740
3753
|
{ method: 'GET', path: '/api/settings', desc: 'Return current engine + claude + routing config', handler: handleSettingsRead },
|
|
3741
3754
|
{ method: 'POST', path: '/api/settings', desc: 'Update engine + claude + agent config', params: 'engine?, claude?, agents?', handler: handleSettingsUpdate },
|
|
3742
3755
|
{ method: 'POST', path: '/api/settings/routing', desc: 'Update routing.md', params: 'content', handler: handleSettingsRouting },
|
|
3756
|
+
{ method: 'POST', path: '/api/settings/reset', desc: 'Reset engine + claude + agent settings to defaults', handler: handleSettingsReset },
|
|
3743
3757
|
];
|
|
3744
3758
|
|
|
3745
3759
|
// Expose routes to CC preamble builder (once, on first request)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yemi33/minions",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.338",
|
|
4
4
|
"description": "Multi-agent AI dev team that runs from ~/.minions/ — five autonomous agents share a single engine, dashboard, and knowledge base",
|
|
5
5
|
"bin": {
|
|
6
6
|
"minions": "bin/minions.js"
|