@rajat-rastogi/maestro 0.5.0 → 0.5.1

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.
Binary file
Binary file
@@ -599,6 +599,17 @@ class AgentConnectionPool {
599
599
  /** Detailed ping with step-by-step results for UI display. */
600
600
  async pingVerbose(tunnelId) {
601
601
  const steps = [];
602
+ try {
603
+ child_process.execSync(process.platform === "win32" ? "where devtunnel" : "which devtunnel", { stdio: "pipe" });
604
+ steps.push({ label: "devtunnel installed (host)", ok: true });
605
+ } catch {
606
+ steps.push({ label: "devtunnel installed (host)", ok: false, error: "devtunnel not found in PATH" });
607
+ return {
608
+ status: "offline",
609
+ steps,
610
+ suggestion: "Install devtunnel on this machine:\n winget install Microsoft.devtunnel\n devtunnel user login"
611
+ };
612
+ }
602
613
  let wssUrl;
603
614
  try {
604
615
  wssUrl = this.discoverWssUrl(tunnelId);
@@ -606,7 +617,14 @@ class AgentConnectionPool {
606
617
  } catch (err) {
607
618
  const msg = err instanceof Error ? err.message : String(err);
608
619
  steps.push({ label: "Discover tunnel URL", ok: false, error: msg });
609
- const suggestion = msg.includes("No port 9741") ? 'Run "maestro --install-agent" on the remote machine to set up port forwarding' : msg.includes("Tunnel not found") || msg.includes("not found") ? 'Check tunnel ID is correct and "devtunnel host" is running on the remote' : 'Run "devtunnel user login" on this machine and ensure devtunnel is installed';
620
+ let suggestion;
621
+ if (msg.includes("No port 9741")) {
622
+ suggestion = "Port 9741 not configured on the tunnel. Run on the remote:\n devtunnel port create " + tunnelId + " --port-number 9741";
623
+ } else if (msg.includes("not found")) {
624
+ suggestion = "Tunnel not found. Check on the remote:\n devtunnel list\n devtunnel host " + tunnelId;
625
+ } else {
626
+ suggestion = "Run on this machine:\n devtunnel user login";
627
+ }
610
628
  return { status: "offline", steps, suggestion };
611
629
  }
612
630
  let ws;
@@ -615,8 +633,8 @@ class AgentConnectionPool {
615
633
  steps.push({ label: `Connect to agent (${wssUrl})`, ok: true });
616
634
  } catch (err) {
617
635
  const msg = err instanceof Error ? err.message : String(err);
618
- steps.push({ label: `Connect to agent`, ok: false, error: msg });
619
- const suggestion = msg.includes("timeout") ? 'Agent may not be running run "maestro --install-agent" or start manually: node C:\\maestro-agent\\maestro-agent.js' : "Check that the Scheduled Task is running on the remote machine";
636
+ steps.push({ label: "Connect to agent", ok: false, error: msg });
637
+ const suggestion = "Agent not responding. Check on the remote:\n netstat -ano | findstr 9741\n node C:\\maestro-agent\\maestro-agent.js";
620
638
  return { status: "offline", steps, suggestion };
621
639
  }
622
640
  try {
@@ -644,7 +662,7 @@ class AgentConnectionPool {
644
662
  return { status: "online", steps };
645
663
  } else {
646
664
  steps.push({ label: "Agent responded (pong)", ok: false, error: "No response within 5s" });
647
- return { status: "offline", steps, suggestion: "Agent connected but not responding restart the agent process" };
665
+ return { status: "offline", steps, suggestion: "Agent connected but not responding. Restart on the remote:\n Stop-ScheduledTask -TaskName MaestroAgent\n Start-ScheduledTask -TaskName MaestroAgent" };
648
666
  }
649
667
  } catch (err) {
650
668
  steps.push({ label: "Agent responded (pong)", ok: false, error: err instanceof Error ? err.message : String(err) });
@@ -1856,7 +1874,7 @@ function createWindow() {
1856
1874
  minWidth: 900,
1857
1875
  minHeight: 600,
1858
1876
  title: "Maestro",
1859
- icon: path.join(__dirname, "../../assets/icon.png"),
1877
+ icon: path.join(__dirname, process.platform === "win32" ? "../../assets/icon.ico" : "../../assets/icon.png"),
1860
1878
  backgroundColor: "#1a1a2e",
1861
1879
  show: false,
1862
1880
  webPreferences: {
@@ -9737,7 +9737,19 @@ function MachineCard({ machine, onSetup, onRemove, onPing, onAddressSet, onRdp,
9737
9737
  /* @__PURE__ */ jsxRuntimeExports.jsx("span", { style: { flex: 1, fontSize: "12px", color: "var(--text-secondary)" }, children: step.label }),
9738
9738
  step.error && /* @__PURE__ */ jsxRuntimeExports.jsx("span", { style: { fontSize: "11px", color: "var(--state-error)", maxWidth: "250px", overflow: "hidden", textOverflow: "ellipsis" }, title: step.error, children: step.error })
9739
9739
  ] }, i)),
9740
- pingDetails.suggestion && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: styles$d.pingSuggestion, children: pingDetails.suggestion })
9740
+ pingDetails.suggestion && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: styles$d.pingSuggestion, children: pingDetails.suggestion.split("\n").map((line, i) => {
9741
+ const trimmed = line.trim();
9742
+ const isCommand = trimmed.startsWith("winget ") || trimmed.startsWith("devtunnel ") || trimmed.startsWith("netstat ") || trimmed.startsWith("node ") || trimmed.startsWith("Stop-") || trimmed.startsWith("Start-");
9743
+ return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: isCommand ? /* @__PURE__ */ jsxRuntimeExports.jsx(
9744
+ "code",
9745
+ {
9746
+ style: styles$d.pingCommand,
9747
+ onClick: () => navigator.clipboard.writeText(trimmed),
9748
+ title: "Click to copy",
9749
+ children: trimmed
9750
+ }
9751
+ ) : line }, i);
9752
+ }) })
9741
9753
  ] }),
9742
9754
  showTunnelSetup && /* @__PURE__ */ jsxRuntimeExports.jsx(
9743
9755
  TunnelSetupPanel,
@@ -10101,7 +10113,19 @@ const styles$d = {
10101
10113
  borderRadius: "var(--radius-sm)",
10102
10114
  padding: "8px 10px",
10103
10115
  marginTop: "4px",
10104
- lineHeight: 1.5
10116
+ lineHeight: 1.8
10117
+ },
10118
+ pingCommand: {
10119
+ display: "inline-block",
10120
+ fontFamily: "'Cascadia Code', Consolas, monospace",
10121
+ fontSize: "11px",
10122
+ background: "var(--bg-base)",
10123
+ color: "var(--text-primary)",
10124
+ padding: "2px 8px",
10125
+ borderRadius: "3px",
10126
+ cursor: "pointer",
10127
+ border: "1px solid var(--border)",
10128
+ marginLeft: "4px"
10105
10129
  },
10106
10130
  panelFooter: {
10107
10131
  display: "flex",
@@ -10371,7 +10395,7 @@ function MachinesView({ onMachineAdded, onMachineRemoved }) {
10371
10395
  setPingStates((prev) => ({ ...prev, [id2]: "Timeout" }));
10372
10396
  setPingDetails((prev) => ({ ...prev, [id2]: {
10373
10397
  steps: [{ label: "Ping timed out after 25s", ok: false }],
10374
- suggestion: "Check that devtunnel is installed on this machine and the agent is running on the remote"
10398
+ suggestion: "Check on the remote:\n netstat -ano | findstr 9741\n devtunnel host <tunnel-id>"
10375
10399
  } }));
10376
10400
  return;
10377
10401
  }
@@ -5,7 +5,7 @@
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
6
  <meta http-equiv="Content-Security-Policy" content="default-src 'self'; script-src 'self'; style-src 'self' 'unsafe-inline'; connect-src http://localhost:*" />
7
7
  <title>Maestro</title>
8
- <script type="module" crossorigin src="./assets/index-DJcKnzn4.js"></script>
8
+ <script type="module" crossorigin src="./assets/index-D1inqgrm.js"></script>
9
9
  <link rel="stylesheet" crossorigin href="./assets/index-DBLgxEKP.css">
10
10
  </head>
11
11
  <body>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rajat-rastogi/maestro",
3
- "version": "0.5.0",
3
+ "version": "0.5.1",
4
4
  "description": "Conduct your codebase — autonomous AI coding orchestrator",
5
5
  "type": "module",
6
6
  "main": "dist/main.js",