@rubytech/taskmaster 1.44.7 → 1.44.8

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.
@@ -1,6 +1,7 @@
1
1
  import crypto from "node:crypto";
2
2
  import path from "node:path";
3
3
  import { loadConfig } from "../config/config.js";
4
+ import { appendUserMessageToSessionTranscript } from "../config/sessions/transcript.js";
4
5
  import { loadSessionStore, resolveAgentIdFromSessionKey, resolveMainSessionKey, resolveStorePath, } from "../config/sessions.js";
5
6
  import { normalizeMainKey } from "../routing/session-key.js";
6
7
  import { resolveQueueSettings } from "../auto-reply/reply/queue.js";
@@ -395,11 +396,34 @@ export async function runSubagentAnnounceFlow(params) {
395
396
  }
396
397
  if (lastErr) {
397
398
  defaultRuntime.error?.(`[subagent-announce] direct send FAILED after ${MAX_ANNOUNCE_ATTEMPTS} attempts ` +
398
- `for "${taskLabel}" — announce lost ` +
399
+ `for "${taskLabel}" — falling back to transcript injection ` +
399
400
  `(child=${params.childSessionKey}, requester=${params.requesterSessionKey}, ` +
400
401
  `channel=${directOrigin?.channel ?? "none"}, to=${directOrigin?.to ?? "none"}, ` +
401
402
  `outcome=${outcome.status}, error=${String(lastErr)})`);
402
- // Fall through didAnnounce stays false so registry can retry on next restart.
403
+ // Fallback: inject the announce directly into the session transcript so it
404
+ // survives model outages and rate limits. The parent agent will process it
405
+ // on the next user interaction rather than losing it entirely.
406
+ try {
407
+ const agentId = resolveAgentIdFromSessionKey(params.requesterSessionKey);
408
+ const result = await appendUserMessageToSessionTranscript({
409
+ agentId,
410
+ sessionKey: params.requesterSessionKey,
411
+ text: triggerMessage,
412
+ });
413
+ if (result.ok) {
414
+ defaultRuntime.log(`[subagent-announce] fallback transcript injection succeeded for "${taskLabel}" ` +
415
+ `(requester=${params.requesterSessionKey}, file=${result.sessionFile})`);
416
+ didAnnounce = true;
417
+ }
418
+ else {
419
+ defaultRuntime.error?.(`[subagent-announce] fallback transcript injection ALSO failed for "${taskLabel}" ` +
420
+ `— announce lost (reason=${result.reason})`);
421
+ }
422
+ }
423
+ catch (fallbackErr) {
424
+ defaultRuntime.error?.(`[subagent-announce] fallback transcript injection threw for "${taskLabel}" ` +
425
+ `— announce lost (error=${String(fallbackErr)})`);
426
+ }
403
427
  }
404
428
  else {
405
429
  didAnnounce = true;
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.44.7",
3
- "commit": "842965d43dfa6cdab9cb31e489c9a295cf755dfb",
4
- "builtAt": "2026-03-28T11:06:01.275Z"
2
+ "version": "1.44.8",
3
+ "commit": "c1ab48a79748dee82521bbd2723dc6167135600e",
4
+ "builtAt": "2026-03-28T14:38:57.994Z"
5
5
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rubytech/taskmaster",
3
- "version": "1.44.7",
3
+ "version": "1.44.8",
4
4
  "description": "AI-powered business assistant for small businesses",
5
5
  "publishConfig": {
6
6
  "access": "public"