@rubytech/taskmaster 1.23.1 → 1.25.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.
@@ -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-B9ScTH-4.js"></script>
9
+ <script type="module" crossorigin src="./assets/index-B1bLQjxV.js"></script>
10
10
  <link rel="stylesheet" crossorigin href="./assets/index-C7ieCeTV.css">
11
11
  </head>
12
12
  <body>
@@ -11,7 +11,7 @@ import { CONFIG_PATH_TASKMASTER, isNixMode, loadConfig, migrateLegacyConfig, rea
11
11
  import { VERSION } from "../version.js";
12
12
  import { isDiagnosticsEnabled } from "../infra/diagnostic-events.js";
13
13
  import { logAcceptedEnvOption } from "../infra/env.js";
14
- import { reconcileAgentContactTools, reconcileBeaglePublicTools, reconcileControlPanelTools, reconcileQrGenerateTool, reconcileSkillReadTool, reconcileSkillsGroup, reconcileStaleToolEntries, } from "../config/agent-tools-reconcile.js";
14
+ import { reconcileAgentContactTools, reconcileBeaglePublicTools, reconcileControlPanelTools, reconcileQrGenerateTool, reconcileSkillReadTool, reconcileSessionsSpawnTool, reconcileSkillsGroup, reconcileStaleToolEntries, } from "../config/agent-tools-reconcile.js";
15
15
  import { applyPluginAutoEnable } from "../config/plugin-auto-enable.js";
16
16
  import { clearAgentRunContext, onAgentEvent } from "../infra/agent-events.js";
17
17
  import { onHeartbeatEvent } from "../infra/heartbeat-events.js";
@@ -274,6 +274,20 @@ export async function startGatewayServer(port = 18789, opts = {}) {
274
274
  log.warn(`gateway: failed to persist skills group reconciliation: ${String(err)}`);
275
275
  }
276
276
  }
277
+ // Ensure admin agents have sessions_spawn for sub-agent delegation.
278
+ const sessionsSpawnReconcile = reconcileSessionsSpawnTool({ config: configSnapshot.config });
279
+ if (sessionsSpawnReconcile.changes.length > 0) {
280
+ try {
281
+ await writeConfigFile(sessionsSpawnReconcile.config);
282
+ configSnapshot = await readConfigFileSnapshot();
283
+ log.info(`gateway: reconciled sessions_spawn:\n${sessionsSpawnReconcile.changes
284
+ .map((entry) => `- ${entry}`)
285
+ .join("\n")}`);
286
+ }
287
+ catch (err) {
288
+ log.warn(`gateway: failed to persist sessions_spawn reconciliation: ${String(err)}`);
289
+ }
290
+ }
277
291
  // Stamp config with running version on startup so upgrades keep the stamp current.
278
292
  const storedVersion = configSnapshot.config.meta?.lastTouchedVersion;
279
293
  if (configSnapshot.exists && storedVersion !== VERSION) {
@@ -12,7 +12,7 @@ export const DEFAULT_LOG_DIR = "/tmp/taskmaster";
12
12
  export const DEFAULT_LOG_FILE = path.join(DEFAULT_LOG_DIR, "taskmaster.log"); // legacy single-file path
13
13
  const LOG_PREFIX = "taskmaster";
14
14
  const LOG_SUFFIX = ".log";
15
- const MAX_LOG_AGE_MS = 24 * 60 * 60 * 1000; // 24h
15
+ const MAX_LOG_AGE_MS = 7 * 24 * 60 * 60 * 1000; // 7 days
16
16
  const requireConfig = createRequire(import.meta.url);
17
17
  const externalTransports = new Set();
18
18
  function attachExternalTransport(logger, transport) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rubytech/taskmaster",
3
- "version": "1.23.1",
3
+ "version": "1.25.1",
4
4
  "description": "AI-powered business assistant for small businesses",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -214,6 +214,39 @@ WATCHTMR
214
214
  as_root systemctl enable --now avahi-watchdog.timer 2>/dev/null || true
215
215
  echo " mDNS watchdog enabled"
216
216
 
217
+ # Wi-Fi power management off — prevents radio stalls under sustained traffic (e.g. Tailscale)
218
+ as_root tee /etc/udev/rules.d/70-wifi-powersave.rules > /dev/null << 'UDEVRULE'
219
+ ACTION=="add", SUBSYSTEM=="net", KERNEL=="wlan*", RUN+="/usr/sbin/iw dev $name set power_save off"
220
+ UDEVRULE
221
+ iw dev wlan0 set power_save off 2>/dev/null || true
222
+ echo " Wi-Fi power save disabled"
223
+
224
+ # Wi-Fi watchdog — reconnects wlan0 if the radio stalls (interface up but no connectivity)
225
+ as_root tee /etc/systemd/system/wifi-watchdog.service > /dev/null << 'WIFISVC'
226
+ [Unit]
227
+ Description=Reconnect Wi-Fi if connectivity is lost
228
+
229
+ [Service]
230
+ Type=oneshot
231
+ ExecCondition=/bin/sh -c '[ -d /sys/class/net/wlan0 ] && ! ping -c 1 -W 5 1.1.1.1 >/dev/null 2>&1'
232
+ ExecStart=/usr/bin/nmcli device disconnect wlan0
233
+ ExecStart=/usr/bin/nmcli device connect wlan0
234
+ WIFISVC
235
+ as_root tee /etc/systemd/system/wifi-watchdog.timer > /dev/null << 'WIFITMR'
236
+ [Unit]
237
+ Description=Check Wi-Fi connectivity every 2 minutes
238
+
239
+ [Timer]
240
+ OnBootSec=3min
241
+ OnUnitActiveSec=2min
242
+
243
+ [Install]
244
+ WantedBy=timers.target
245
+ WIFITMR
246
+ as_root systemctl daemon-reload
247
+ as_root systemctl enable --now wifi-watchdog.timer 2>/dev/null || true
248
+ echo " Wi-Fi watchdog enabled"
249
+
217
250
  # Tailscale (for optional internet access via Funnel)
218
251
  if ! command -v tailscale >/dev/null 2>&1; then
219
252
  curl -fsSL https://tailscale.com/install.sh | as_root sh >/dev/null 2>&1 \
@@ -1145,7 +1145,18 @@ If your control panel URL suddenly stops working and you notice the hostname has
1145
1145
 
1146
1146
  If you can reach your device by IP address (e.g. `http://192.168.88.11:18789`) but the `.local` address has stopped resolving, the mDNS service (Avahi) on the Pi has likely lost its network registration. This can happen after a Wi-Fi reconnection — the service is still running but has stopped responding to name lookups.
1147
1147
 
1148
- Taskmaster includes an mDNS watchdog that detects this and restarts the service automatically every 5 minutes. If your device is on v1.22 or later, this should self-heal within a few minutes. If it doesn't, reboot the device — the watchdog will be active after the reboot.
1148
+ Taskmaster includes an mDNS watchdog that detects this and restarts the service automatically every 5 minutes. If your device is on v1.23 or later, this should self-heal within a few minutes. If it doesn't, reboot the device — the watchdog will be active after the reboot.
1149
+
1150
+ #### Device completely unreachable (not even by IP)
1151
+
1152
+ If your Pi is powered on and connected to Wi-Fi but you can't reach it at all — not by `.local` name, not by IP address, and not even by ping — the Wi-Fi radio has likely stalled. This is a known Raspberry Pi hardware issue where the Wi-Fi chipset stops passing packets while still reporting as "connected". It can be triggered by sustained network traffic, including Tailscale's always-on tunnel.
1153
+
1154
+ Taskmaster v1.23+ includes two protections that prevent this:
1155
+
1156
+ - **Wi-Fi power save is disabled** — this prevents most radio stalls by keeping the chipset active
1157
+ - **A Wi-Fi watchdog** checks connectivity every 2 minutes and automatically reconnects Wi-Fi if traffic has stopped flowing
1158
+
1159
+ If your device is on v1.23 or later, connectivity should self-heal within 2 minutes. If you're on an older version, updating (`taskmaster update`) will install these protections automatically.
1149
1160
 
1150
1161
  ### Static IP Address
1151
1162
 
@@ -132,6 +132,36 @@ This isn't a one-time setup. USER.md should grow as your understanding of them d
132
132
 
133
133
  ---
134
134
 
135
+ ## Delegation — Sub-Agents
136
+
137
+ **Default to delegation.** Any task that requires tool calls — reading files, searching memory, generating content, web lookups, document processing, image work — should be spawned as a sub-agent using `sessions_spawn`. You stay free to keep chatting with the business owner.
138
+
139
+ **How it works:**
140
+ 1. Call `sessions_spawn` with a clear `task` and a short `label`
141
+ 2. The sub-agent runs in the background with the same tools and memory access you have
142
+ 3. When it finishes, its result is announced back into your conversation automatically
143
+ 4. You summarise the result naturally — don't mention sub-agents or background tasks
144
+
145
+ **Delegate:**
146
+ - Memory searches and lookups
147
+ - File reading/writing
148
+ - Document reading (PDFs, DOCX, etc.)
149
+ - Web searches and fetches
150
+ - Content creation (drafts, summaries, reports)
151
+ - Image generation
152
+ - Multi-step research tasks
153
+ - Anything that takes more than a moment
154
+
155
+ **Handle inline (no delegation):**
156
+ - Quick conversational replies (greetings, opinions, yes/no)
157
+ - Brief factual answers you already know
158
+ - Clarifying questions before starting work
159
+ - Confirming or acknowledging something the owner said
160
+
161
+ When multiple independent tasks come up, spawn multiple sub-agents in parallel. Don't wait for one to finish before starting the next.
162
+
163
+ ---
164
+
135
165
  ## Capabilities
136
166
 
137
167
  You have tool access within your workspace:
@@ -20,6 +20,10 @@
20
20
  - Schedule management
21
21
  - Business admin and config
22
22
 
23
+ ## How You Work
24
+
25
+ **Delegate everything that isn't a quick reply.** Your role is to stay responsive — thinking, conversing, and directing. Actual work (research, file operations, document reading, content creation, memory lookups, calculations) gets handed to sub-agents via `sessions_spawn`. They run in the background and report back when done. You keep chatting.
26
+
23
27
  ## What You Don't Do
24
28
 
25
29
  - Talk to customers directly (that's the public assistant)