@rubytech/taskmaster 1.3.0 → 1.4.0

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.
Files changed (44) hide show
  1. package/dist/agents/auth-profiles/oauth.js +24 -0
  2. package/dist/agents/tools/message-history-tool.js +2 -3
  3. package/dist/auto-reply/media-note.js +11 -0
  4. package/dist/auto-reply/reply/get-reply.js +4 -0
  5. package/dist/build-info.json +3 -3
  6. package/dist/control-ui/assets/{index-DQ1kxYd4.js → index-BDETQp97.js} +281 -283
  7. package/dist/control-ui/assets/index-BDETQp97.js.map +1 -0
  8. package/dist/control-ui/index.html +1 -1
  9. package/dist/gateway/chat-sanitize.js +5 -1
  10. package/dist/gateway/server/tls.js +2 -2
  11. package/dist/gateway/server-http.js +34 -4
  12. package/dist/gateway/server-methods/chat.js +64 -25
  13. package/dist/gateway/server.impl.js +23 -5
  14. package/dist/infra/tls/gateway.js +19 -3
  15. package/dist/memory/audit.js +9 -0
  16. package/dist/memory/manager.js +1 -1
  17. package/dist/web/auto-reply/monitor/process-message.js +44 -17
  18. package/extensions/diagnostics-otel/node_modules/.bin/acorn +0 -0
  19. package/extensions/googlechat/node_modules/.bin/taskmaster +0 -0
  20. package/extensions/line/node_modules/.bin/taskmaster +0 -0
  21. package/extensions/matrix/node_modules/.bin/markdown-it +0 -0
  22. package/extensions/matrix/node_modules/.bin/taskmaster +0 -0
  23. package/extensions/memory-lancedb/node_modules/.bin/arrow2csv +0 -0
  24. package/extensions/memory-lancedb/node_modules/.bin/openai +0 -0
  25. package/extensions/msteams/node_modules/.bin/taskmaster +0 -0
  26. package/extensions/nostr/node_modules/.bin/taskmaster +0 -0
  27. package/extensions/nostr/node_modules/.bin/tsc +0 -0
  28. package/extensions/nostr/node_modules/.bin/tsserver +0 -0
  29. package/extensions/zalo/node_modules/.bin/taskmaster +0 -0
  30. package/extensions/zalouser/node_modules/.bin/taskmaster +0 -0
  31. package/package.json +54 -64
  32. package/scripts/install.sh +0 -0
  33. package/taskmaster-docs/USER-GUIDE.md +28 -2
  34. package/templates/.DS_Store +0 -0
  35. package/templates/customer/.DS_Store +0 -0
  36. package/templates/customer/agents/.DS_Store +0 -0
  37. package/templates/maxy/.DS_Store +0 -0
  38. package/templates/maxy/.gitignore +1 -0
  39. package/templates/maxy/agents/.DS_Store +0 -0
  40. package/templates/maxy/agents/admin/.DS_Store +0 -0
  41. package/templates/maxy/memory/.DS_Store +0 -0
  42. package/templates/maxy/skills/.DS_Store +0 -0
  43. package/templates/taskmaster/.gitignore +1 -0
  44. package/dist/control-ui/assets/index-DQ1kxYd4.js.map +0 -1
@@ -59,6 +59,30 @@ async function refreshOAuthTokenWithLock(params) {
59
59
  type: "oauth",
60
60
  };
61
61
  saveAuthProfileStore(store, params.agentDir);
62
+ // Propagate refreshed credentials to the main store so auth.status and other agents
63
+ // see the fresh token. Without this, the main store retains a stale refresh token
64
+ // that Anthropic has already rotated, causing auth.status to permanently report
65
+ // "Connection expired" even though the agent is working fine.
66
+ const mainAuthPath = resolveAuthStorePath();
67
+ if (authPath !== mainAuthPath) {
68
+ try {
69
+ const mainStore = ensureAuthProfileStore();
70
+ const mainCred = mainStore.profiles[params.profileId];
71
+ const mainExpiry = mainCred?.type === "oauth" ? mainCred.expires : 0;
72
+ const freshExpiry = result.newCredentials.expires ?? 0;
73
+ if (freshExpiry > mainExpiry) {
74
+ mainStore.profiles[params.profileId] = {
75
+ ...(mainCred ?? cred),
76
+ ...result.newCredentials,
77
+ type: "oauth",
78
+ };
79
+ saveAuthProfileStore(mainStore);
80
+ }
81
+ }
82
+ catch {
83
+ // Best-effort — don't fail the agent's own refresh if main store update fails
84
+ }
85
+ }
62
86
  // Sync refreshed credentials back to Claude Code CLI if this is the claude-cli profile
63
87
  // This ensures Claude Code continues to work after Taskmaster refreshes the token
64
88
  if (params.profileId === CLAUDE_CLI_PROFILE_ID && cred.provider === "anthropic") {
@@ -125,10 +125,9 @@ function resolveArchiveSubdir(params) {
125
125
  if (source === "admin") {
126
126
  return { subdir: "admin" };
127
127
  }
128
- // Phone number — DM archive
128
+ // Phone number — always resolve to user archive
129
129
  if (source.startsWith("+")) {
130
- const subdir = isAdminAgent ? "admin" : `users/${source}`;
131
- return { subdir };
130
+ return { subdir: `users/${source}` };
132
131
  }
133
132
  // Group JID
134
133
  if (source.includes("@g.us")) {
@@ -26,6 +26,17 @@ export function buildInboundMediaNote(ctx) {
26
26
  }
27
27
  }
28
28
  }
29
+ // Audio attachments must NOT be suppressed even when transcription succeeds.
30
+ // The [media attached: ...] annotation is stored alongside the transcript so
31
+ // the chat UI can render an audio playback widget via chat-sanitize.
32
+ const typesArray = Array.isArray(ctx.MediaTypes) ? ctx.MediaTypes : [];
33
+ const singleType = ctx.MediaType?.trim();
34
+ for (const idx of [...suppressed]) {
35
+ const mime = (typesArray[idx] ?? singleType ?? "").split(";")[0].trim();
36
+ if (mime.startsWith("audio/")) {
37
+ suppressed.delete(idx);
38
+ }
39
+ }
29
40
  const pathsFromArray = Array.isArray(ctx.MediaPaths) ? ctx.MediaPaths : undefined;
30
41
  const paths = pathsFromArray && pathsFromArray.length > 0
31
42
  ? pathsFromArray
@@ -81,6 +81,10 @@ export async function getReplyFromConfig(ctx, opts, configOverride) {
81
81
  cfg,
82
82
  });
83
83
  }
84
+ // Notify caller that media understanding is complete. The ctx body now
85
+ // contains the transcript / description instead of a raw <media:*> placeholder.
86
+ // Fires before the agent reply pipeline so archive hooks can record the resolved text.
87
+ opts?.onMediaResolved?.();
84
88
  const commandAuthorized = finalized.CommandAuthorized;
85
89
  resolveCommandAuthorization({
86
90
  ctx: finalized,
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.3.0",
3
- "commit": "6432fa8c1f6f007fcdbee8123de84e0f8450d01c",
4
- "builtAt": "2026-02-24T20:07:40.938Z"
2
+ "version": "1.4.0",
3
+ "commit": "34222eeabd71481db3a4cc2fd6a0918657150079",
4
+ "builtAt": "2026-02-25T10:21:06.215Z"
5
5
  }