@yemi33/minions 0.1.31 → 0.1.33

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,16 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.1.33 (2026-03-28)
4
+
5
+ ### Dashboard
6
+ - dashboard.js
7
+
8
+ ## 0.1.32 (2026-03-28)
9
+
10
+ ### Dashboard
11
+ - dashboard.js
12
+ - dashboard/js/settings.js
13
+
3
14
  ## 0.1.31 (2026-03-28)
4
15
 
5
16
  ### Dashboard
@@ -134,35 +134,20 @@ async function saveSettings() {
134
134
  }
135
135
  }
136
136
 
137
- function addProject() {
138
- document.getElementById('modal-title').textContent = 'Add Project';
139
- document.getElementById('modal-body').innerHTML =
140
- '<div style="display:flex;flex-direction:column;gap:12px">' +
141
- '<label style="color:var(--text);font-size:var(--text-md)">Project Path' +
142
- '<input id="add-project-path" style="display:block;width:100%;margin-top:4px;padding:8px 10px;background:var(--bg);border:1px solid var(--border);border-radius:var(--radius-sm);color:var(--text);font-size:13px;font-family:monospace" placeholder="C:\\Users\\you\\repos\\my-project">' +
143
- '</label>' +
144
- '<div style="font-size:11px;color:var(--muted)">Enter the full path to a git repository. The engine will auto-detect the repo host, branch, and project name.</div>' +
145
- '<div style="display:flex;justify-content:flex-end;gap:8px">' +
146
- '<button onclick="closeModal()" class="pr-pager-btn">Cancel</button>' +
147
- '<button onclick="_submitAddProject()" style="padding:6px 16px;background:var(--blue);color:#fff;border:none;border-radius:var(--radius-sm);cursor:pointer">Add Project</button>' +
148
- '</div>' +
149
- '</div>';
150
- document.getElementById('modal').classList.add('open');
151
- setTimeout(() => document.getElementById('add-project-path')?.focus(), 100);
152
- }
153
-
154
- async function _submitAddProject() {
155
- const pathInput = document.getElementById('add-project-path');
156
- if (!pathInput?.value.trim()) { alert('Path is required'); return; }
137
+ async function addProject() {
157
138
  try {
158
- const res = await fetch('/api/projects/add', {
139
+ const browseRes = await fetch('/api/projects/browse', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: '{}' });
140
+ const browseData = await browseRes.json();
141
+ if (!browseRes.ok) { alert('Error: ' + (browseData.error || 'unknown')); return; }
142
+ if (browseData.cancelled || !browseData.path) return;
143
+
144
+ const addRes = await fetch('/api/projects/add', {
159
145
  method: 'POST', headers: { 'Content-Type': 'application/json' },
160
- body: JSON.stringify({ path: pathInput.value.trim() })
146
+ body: JSON.stringify({ path: browseData.path })
161
147
  });
162
- const data = await res.json();
163
- if (!res.ok) { alert('Failed: ' + (data.error || 'unknown')); return; }
164
- closeModal();
165
- try { showToast('cmd-toast', 'Project "' + data.name + '" added — restart engine to pick it up', true); } catch {}
148
+ const addData = await addRes.json();
149
+ if (!addRes.ok) { alert('Failed: ' + (addData.error || 'unknown')); return; }
150
+ try { showToast('cmd-toast', 'Project "' + addData.name + '" added — restart engine to pick it up', true); } catch {}
166
151
  refresh();
167
152
  } catch (e) { alert('Error: ' + e.message); }
168
153
  }
package/dashboard.js CHANGED
@@ -2429,14 +2429,28 @@ What would you like to discuss or change? When you're happy, say "approve" and I
2429
2429
  const { execSync } = require('child_process');
2430
2430
  let selectedPath = '';
2431
2431
  if (process.platform === 'win32') {
2432
- // Use COM Shell.Applicationreliably shows folder picker in foreground
2433
- const vbs = 'Set shell = CreateObject("Shell.Application")\r\nSet folder = shell.BrowseForFolder(0, "Select project folder", &H0051, "")\r\nIf Not folder Is Nothing Then\r\n WScript.Echo folder.Self.Path\r\nEnd If';
2434
- const vbsPath = path.join(MINIONS_DIR, 'engine', 'tmp', '_browse.vbs');
2435
- fs.mkdirSync(path.dirname(vbsPath), { recursive: true });
2436
- fs.writeFileSync(vbsPath, vbs);
2432
+ // PowerShell STA with topmost window as owner forces folder dialog to foreground
2433
+ // Write PS script to temp file to avoid shell quoting issues
2434
+ const psScript = [
2435
+ 'Add-Type -AssemblyName System.Windows.Forms',
2436
+ '$f = New-Object System.Windows.Forms.FolderBrowserDialog',
2437
+ '$f.Description = "Select project folder"',
2438
+ '$f.ShowNewFolderButton = $false',
2439
+ '$owner = New-Object System.Windows.Forms.Form',
2440
+ '$owner.TopMost = $true',
2441
+ '$owner.StartPosition = "CenterScreen"',
2442
+ '$owner.WindowState = "Minimized"',
2443
+ '$owner.Show()',
2444
+ '$owner.Hide()',
2445
+ 'if ($f.ShowDialog($owner) -eq "OK") { Write-Output $f.SelectedPath }',
2446
+ '$owner.Dispose()',
2447
+ ].join('\r\n');
2448
+ const psPath = path.join(MINIONS_DIR, 'engine', 'tmp', '_browse.ps1');
2449
+ fs.mkdirSync(path.dirname(psPath), { recursive: true });
2450
+ fs.writeFileSync(psPath, psScript);
2437
2451
  try {
2438
- selectedPath = execSync(`cscript //NoLogo "${vbsPath}"`, { encoding: 'utf8', timeout: 120000 }).trim();
2439
- } finally { try { fs.unlinkSync(vbsPath); } catch {} }
2452
+ selectedPath = execSync(`powershell -STA -NoProfile -ExecutionPolicy Bypass -File "${psPath}"`, { encoding: 'utf8', timeout: 120000 }).trim();
2453
+ } finally { try { fs.unlinkSync(psPath); } catch {} }
2440
2454
  } else if (process.platform === 'darwin') {
2441
2455
  selectedPath = execSync(`osascript -e 'POSIX path of (choose folder with prompt "Select project folder")'`, { encoding: 'utf8', timeout: 120000 }).trim();
2442
2456
  } else {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yemi33/minions",
3
- "version": "0.1.31",
3
+ "version": "0.1.33",
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"