@rubytech/taskmaster 1.0.96 → 1.0.97

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.
@@ -6,7 +6,7 @@
6
6
  <title>Taskmaster Control</title>
7
7
  <meta name="color-scheme" content="dark light" />
8
8
  <link rel="icon" type="image/png" href="./favicon.png" />
9
- <script type="module" crossorigin src="./assets/index-lbNnMWBM.js"></script>
9
+ <script type="module" crossorigin src="./assets/index-CfNT98JU.js"></script>
10
10
  <link rel="stylesheet" crossorigin href="./assets/index-6WdtDXJj.css">
11
11
  </head>
12
12
  <body>
@@ -199,4 +199,38 @@ export const wifiHandlers = {
199
199
  respond(false, undefined, errorShape(ErrorCodes.UNAVAILABLE, message));
200
200
  }
201
201
  },
202
+ /**
203
+ * Disconnect from the current WiFi network.
204
+ */
205
+ "wifi.disconnect": async ({ respond, context }) => {
206
+ if (!requireLinux(respond))
207
+ return;
208
+ try {
209
+ if (!(await nmcliAvailable())) {
210
+ respond(false, undefined, errorShape(ErrorCodes.UNAVAILABLE, "NetworkManager (nmcli) is not installed"));
211
+ return;
212
+ }
213
+ // Find the active WiFi connection name
214
+ const { stdout: connStdout } = await runExec("nmcli", ["-t", "-f", "NAME,TYPE,DEVICE", "con", "show", "--active"], { timeoutMs: 5_000 });
215
+ let connectionName = null;
216
+ for (const line of connStdout.split("\n")) {
217
+ // Format: NAME:TYPE:DEVICE — look for wifi type on wlan0
218
+ const parts = line.split(":");
219
+ if (parts.length >= 3 && parts[1]?.includes("wireless") && parts[2]?.startsWith("wlan")) {
220
+ connectionName = parts[0];
221
+ break;
222
+ }
223
+ }
224
+ if (!connectionName) {
225
+ respond(true, { disconnected: true }); // Already disconnected
226
+ return;
227
+ }
228
+ await runExec("nmcli", ["con", "down", connectionName], { timeoutMs: 10_000 });
229
+ respond(true, { disconnected: true });
230
+ }
231
+ catch (err) {
232
+ context.logGateway.warn(`wifi.disconnect failed: ${err instanceof Error ? err.message : String(err)}`);
233
+ respond(false, undefined, errorShape(ErrorCodes.UNAVAILABLE, "Failed to disconnect from WiFi"));
234
+ }
235
+ },
202
236
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rubytech/taskmaster",
3
- "version": "1.0.96",
3
+ "version": "1.0.97",
4
4
  "description": "AI-powered business assistant for small businesses",
5
5
  "publishConfig": {
6
6
  "access": "public"