@yemi33/minions 0.1.2188 → 0.1.2189

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 (3) hide show
  1. package/dashboard.js +22 -7
  2. package/engine.js +11 -0
  3. package/package.json +1 -1
package/dashboard.js CHANGED
@@ -13560,13 +13560,28 @@ if (require.main === module) {
13560
13560
  // (engine/shared.js#openUrlInBrowser) now owns the env-var check and
13561
13561
  // emits a debug-level SUPPRESSED log entry so we can prove the kill-
13562
13562
  // switch is firing.
13563
- const result = shared.openUrlInBrowser(`http://localhost:${PORT}`, {
13564
- reason: 'dashboard-self-open',
13565
- callerHint: 'dashboard.js:13124',
13566
- });
13567
- if (!result.ok && !result.suppressed) {
13568
- console.log(` Could not auto-open browser: ${result.error}`);
13569
- console.log(` Please open http://localhost:${PORT} manually.`);
13563
+ //
13564
+ // W-mqef-dashboard-tty — only self-open for an interactive human run
13565
+ // (`node dashboard.js` in a terminal). The CLI spawns the dashboard
13566
+ // DETACHED + non-TTY with MINIONS_NO_AUTO_OPEN=1 and orchestrates the open
13567
+ // itself, so it never relied on this branch. But the dashboard integration
13568
+ // tests — and any agent running `npm test` spawn dashboard.js with piped
13569
+ // stdio and NO env guard, so this fired for real on every test run, popping
13570
+ // a browser tab to a random localhost port that the test then tore down
13571
+ // (blank window on the operator's desktop). stdout.isTTY is false for every
13572
+ // programmatic spawn (tests, agents, CI, the detached CLI dashboard) and
13573
+ // true only for a real terminal session, so it's the correct discriminator.
13574
+ if (process.stdout.isTTY) {
13575
+ const result = shared.openUrlInBrowser(`http://localhost:${PORT}`, {
13576
+ reason: 'dashboard-self-open',
13577
+ callerHint: 'dashboard.js:13124',
13578
+ });
13579
+ if (!result.ok && !result.suppressed) {
13580
+ console.log(` Could not auto-open browser: ${result.error}`);
13581
+ console.log(` Please open http://localhost:${PORT} manually.`);
13582
+ }
13583
+ } else {
13584
+ console.log(` Open http://localhost:${PORT} in your browser.`);
13570
13585
  }
13571
13586
 
13572
13587
  // Warm the CC runtime binary cache off the request path so the first CC /
package/engine.js CHANGED
@@ -3306,6 +3306,14 @@ async function spawnAgent(dispatchItem, config) {
3306
3306
  // them unconditionally regardless of repo host.
3307
3307
  childEnv.GIT_TERMINAL_PROMPT = '0';
3308
3308
  childEnv.GCM_INTERACTIVE = 'never';
3309
+ // W-mqef-dashboard-tty — agents run headless and must never pop a browser on
3310
+ // the operator's desktop. Stamp the suppression env so anything an agent runs
3311
+ // that funnels through shared.openUrlInBrowser — notably the dashboard a
3312
+ // `npm test` run boots — inherits the guard. The engine's own process env did
3313
+ // NOT carry this flag, so agent-spawned dashboards were self-opening to a
3314
+ // random localhost port (blank window). Belt-and-suspenders with dashboard.js's
3315
+ // stdout.isTTY gate.
3316
+ childEnv.MINIONS_NO_AUTO_OPEN = '1';
3309
3317
 
3310
3318
  if (getRepoHost(project) === 'ado') {
3311
3319
  // Inject cached ADO token so ADO agents skip re-authentication (#998).
@@ -3756,6 +3764,9 @@ async function spawnAgent(dispatchItem, config) {
3756
3764
  // credential dialogs on `git push` against stale PATs.
3757
3765
  childEnv.GIT_TERMINAL_PROMPT = '0';
3758
3766
  childEnv.GCM_INTERACTIVE = 'never';
3767
+ // W-mqef-dashboard-tty — same browser-popup suppression on steering resume
3768
+ // (see the initial spawn site). Agents must never auto-open a browser.
3769
+ childEnv.MINIONS_NO_AUTO_OPEN = '1';
3759
3770
  if (getRepoHost(project) === 'ado') {
3760
3771
  // Inject cached ADO token for steering session too (#998)
3761
3772
  try {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yemi33/minions",
3
- "version": "0.1.2188",
3
+ "version": "0.1.2189",
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"