@rajat-rastogi/maestro 0.5.2 → 0.5.3

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.
@@ -29,8 +29,8 @@ const net = require("net");
29
29
  const os = require("os");
30
30
  const ini = require("ini");
31
31
  const crypto = require("crypto");
32
- const WebSocket = require("ws");
33
32
  const util = require("util");
33
+ const WebSocket = require("ws");
34
34
  const pty = require("node-pty");
35
35
  const ssh2 = require("ssh2");
36
36
  function _interopNamespaceDefault(e) {
@@ -504,6 +504,7 @@ function registerSessionsIpc(sessionManager2) {
504
504
  sessionManager2.resize(id, cols, rows);
505
505
  });
506
506
  }
507
+ const execAsync$2 = util.promisify(child_process.exec);
507
508
  class AgentConnectionPool {
508
509
  static instance = new AgentConnectionPool();
509
510
  static getInstance() {
@@ -520,9 +521,9 @@ class AgentConnectionPool {
520
521
  * Discover the WSS URL for a tunnel by running `devtunnel show`.
521
522
  * Parses the port line to find the HTTPS URL, converts to WSS.
522
523
  */
523
- discoverWssUrl(tunnelId) {
524
+ async discoverWssUrl(tunnelId) {
524
525
  console.log(`[AgentPool] discovering WSS URL for "${tunnelId}"...`);
525
- const output = child_process.execSync(`devtunnel show ${tunnelId}`, {
526
+ const { stdout: output } = await execAsync$2(`devtunnel show ${tunnelId}`, {
526
527
  encoding: "utf8",
527
528
  env: this.wingetEnv(),
528
529
  timeout: 1e4
@@ -556,7 +557,7 @@ class AgentConnectionPool {
556
557
  }
557
558
  let wssUrl;
558
559
  try {
559
- ({ wssUrl } = this.discoverWssUrl(tunnelId));
560
+ ({ wssUrl } = await this.discoverWssUrl(tunnelId));
560
561
  } catch (err) {
561
562
  console.log(`[AgentPool] getConnection failed: ${err instanceof Error ? err.message : String(err)}`);
562
563
  throw err;
@@ -602,7 +603,7 @@ class AgentConnectionPool {
602
603
  async pingVerbose(tunnelId) {
603
604
  const steps = [];
604
605
  try {
605
- child_process.execSync(process.platform === "win32" ? "where devtunnel" : "which devtunnel", { stdio: "pipe" });
606
+ await execAsync$2(process.platform === "win32" ? "where devtunnel" : "which devtunnel");
606
607
  steps.push({ label: "devtunnel installed (host)", ok: true });
607
608
  } catch {
608
609
  steps.push({ label: "devtunnel installed (host)", ok: false, error: "devtunnel not found in PATH" });
@@ -615,7 +616,7 @@ class AgentConnectionPool {
615
616
  let wssUrl;
616
617
  let hostConnections;
617
618
  try {
618
- ({ wssUrl, hostConnections } = this.discoverWssUrl(tunnelId));
619
+ ({ wssUrl, hostConnections } = await this.discoverWssUrl(tunnelId));
619
620
  steps.push({ label: "Discover tunnel URL", ok: true });
620
621
  } catch (err) {
621
622
  const msg = err instanceof Error ? err.message : String(err);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rajat-rastogi/maestro",
3
- "version": "0.5.2",
3
+ "version": "0.5.3",
4
4
  "description": "Conduct your codebase — autonomous AI coding orchestrator",
5
5
  "type": "module",
6
6
  "main": "dist/main.js",