@yemi33/minions 0.1.119 → 0.1.121

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 CHANGED
@@ -1,5 +1,15 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.1.121 (2026-04-01)
4
+
5
+ ### Dashboard
6
+ - dashboard.js
7
+
8
+ ## 0.1.120 (2026-04-01)
9
+
10
+ ### Dashboard
11
+ - dashboard/js/settings.js
12
+
3
13
  ## 0.1.119 (2026-04-01)
4
14
 
5
15
  ### Dashboard
@@ -100,8 +100,10 @@ function settingsField(label, id, value, unit, hint) {
100
100
 
101
101
  async function saveSettings() {
102
102
  const status = document.getElementById('settings-status');
103
+ const saveBtn = document.getElementById('modal-settings-save');
103
104
  status.textContent = 'Saving...';
104
105
  status.style.color = 'var(--blue)';
106
+ if (saveBtn) { saveBtn.disabled = true; saveBtn.style.opacity = '0.6'; saveBtn.innerHTML = 'Saving...'; }
105
107
 
106
108
  try {
107
109
  const enginePayload = {
@@ -152,11 +154,18 @@ async function saveSettings() {
152
154
  });
153
155
  if (!rRes.ok) { const d = await rRes.json(); throw new Error(d.error); }
154
156
 
155
- status.textContent = 'Saved. Restart engine for full effect.';
157
+ status.textContent = 'Saved. Engine picks up changes on next tick.';
156
158
  status.style.color = 'var(--green)';
159
+ if (saveBtn) { saveBtn.innerHTML = '<svg width="12" height="12" viewBox="0 0 16 16" fill="currentColor"><path d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"/></svg> Saved'; saveBtn.style.color = 'var(--green)'; saveBtn.style.borderColor = 'var(--green)'; }
160
+ showToast('cmd-toast', 'Settings saved', true);
161
+ setTimeout(function() {
162
+ if (saveBtn) { saveBtn.disabled = false; saveBtn.style.opacity = ''; saveBtn.innerHTML = '<svg width="12" height="12" viewBox="0 0 16 16" fill="currentColor"><path d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"/></svg> Save'; }
163
+ }, 2000);
157
164
  } catch (e) {
158
165
  status.textContent = 'Error: ' + e.message;
159
166
  status.style.color = 'var(--red)';
167
+ if (saveBtn) { saveBtn.disabled = false; saveBtn.style.opacity = ''; saveBtn.innerHTML = '<svg width="12" height="12" viewBox="0 0 16 16" fill="currentColor"><path d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"/></svg> Save'; }
168
+ showToast('cmd-toast', 'Settings save failed: ' + e.message, false);
160
169
  }
161
170
  }
162
171
 
package/dashboard.js CHANGED
@@ -3095,7 +3095,11 @@ What would you like to discuss or change? When you're happy, say "approve" and I
3095
3095
  }
3096
3096
 
3097
3097
  safeWrite(configPath, config);
3098
- return jsonReply(res, 200, { ok: true, message: 'Settings saved. Restart engine for changes to take full effect.' });
3098
+ // Refresh in-memory CONFIG so subsequent reads see the update
3099
+ reloadConfig();
3100
+ invalidateStatusCache();
3101
+ console.log('[settings] Saved config.json — engine keys:', Object.keys(config.engine || {}));
3102
+ return jsonReply(res, 200, { ok: true, message: 'Settings saved. Engine picks up changes on next tick.' });
3099
3103
  } catch (e) { return jsonReply(res, 500, { error: e.message }); }
3100
3104
  }
3101
3105
 
@@ -3332,6 +3336,16 @@ What would you like to discuss or change? When you're happy, say "approve" and I
3332
3336
  return jsonReply(res, 200, { ok: true, file: path.basename(filePath) });
3333
3337
  }},
3334
3338
 
3339
+ { method: 'POST', path: '/api/agents/charter', desc: 'Save agent charter', params: 'agent, content', handler: async (req, res) => {
3340
+ const body = await readBody(req);
3341
+ if (!body.agent || body.content == null) return jsonReply(res, 400, { error: 'agent and content required' });
3342
+ const agentId = body.agent.replace(/[^a-zA-Z0-9_-]/g, '');
3343
+ const charterDir = path.join(MINIONS_DIR, 'agents', agentId);
3344
+ if (!fs.existsSync(charterDir)) fs.mkdirSync(charterDir, { recursive: true });
3345
+ safeWrite(path.join(charterDir, 'charter.md'), body.content);
3346
+ invalidateStatusCache();
3347
+ return jsonReply(res, 200, { ok: true });
3348
+ }},
3335
3349
  { method: 'POST', path: '/api/agents/steer', desc: 'Inject steering message into a running agent', params: 'agent, message', handler: async (req, res) => {
3336
3350
  const body = await readBody(req);
3337
3351
  const { agent: agentId, message } = body;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yemi33/minions",
3
- "version": "0.1.119",
3
+ "version": "0.1.121",
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"