@rubytech/taskmaster 1.11.1 → 1.12.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 (30) hide show
  1. package/dist/agents/skills/workspace.js +3 -0
  2. package/dist/agents/taskmaster-tools.js +14 -0
  3. package/dist/agents/tool-policy.js +18 -0
  4. package/dist/agents/tools/brand-settings-tool.js +106 -0
  5. package/dist/agents/tools/channel-settings-tool.js +130 -0
  6. package/dist/agents/tools/logs-read-tool.js +67 -0
  7. package/dist/agents/tools/public-chat-settings-tool.js +138 -0
  8. package/dist/agents/tools/skill-manage-tool.js +105 -0
  9. package/dist/agents/tools/system-status-tool.js +82 -0
  10. package/dist/agents/tools/usage-report-tool.js +46 -0
  11. package/dist/build-info.json +3 -3
  12. package/dist/config/port-defaults.js +0 -8
  13. package/dist/config/zod-schema.js +6 -1
  14. package/dist/control-ui/assets/{index-YAjVyXqJ.js → index-DpMaqt-b.js} +657 -677
  15. package/dist/control-ui/assets/index-DpMaqt-b.js.map +1 -0
  16. package/dist/control-ui/index.html +1 -1
  17. package/dist/gateway/control-ui.js +2 -2
  18. package/dist/gateway/public-chat/deliver-otp.js +54 -18
  19. package/dist/gateway/public-chat/deliver-sms.js +96 -24
  20. package/dist/gateway/public-chat-api.js +12 -7
  21. package/dist/gateway/server-methods/public-chat.js +11 -6
  22. package/package.json +1 -1
  23. package/skills/brevo/SKILL.md +9 -8
  24. package/skills/brevo/references/browser-setup.md +13 -3
  25. package/skills/brevo/references/sms-credits.md +76 -0
  26. package/skills/system-admin/SKILL.md +68 -0
  27. package/skills/twilio/SKILL.md +14 -11
  28. package/skills/twilio/references/browser-setup.md +15 -24
  29. package/taskmaster-docs/USER-GUIDE.md +51 -8
  30. package/dist/control-ui/assets/index-YAjVyXqJ.js.map +0 -1
@@ -0,0 +1,82 @@
1
+ /**
2
+ * Agent tool for checking system status.
3
+ *
4
+ * Gives the agent a unified view of gateway health, auth status, license info,
5
+ * channel connections, available models, and software update availability —
6
+ * everything a user would normally check by opening the Setup dashboard.
7
+ */
8
+ import { Type } from "@sinclair/typebox";
9
+ import { stringEnum } from "../schema/typebox.js";
10
+ import { jsonResult, readStringParam } from "./common.js";
11
+ import { callGatewayTool } from "./gateway.js";
12
+ const SYSTEM_STATUS_ACTIONS = [
13
+ "overview",
14
+ "health",
15
+ "auth",
16
+ "license",
17
+ "channels",
18
+ "models",
19
+ "update",
20
+ ];
21
+ const SystemStatusSchema = Type.Object({
22
+ action: stringEnum(SYSTEM_STATUS_ACTIONS, {
23
+ description: '"overview" returns a combined snapshot of all subsystems. Use specific actions for detailed info on one subsystem.',
24
+ }),
25
+ });
26
+ export function createSystemStatusTool() {
27
+ return {
28
+ label: "System Status",
29
+ name: "system_status",
30
+ description: "Check the status of the Taskmaster system. " +
31
+ '"overview" returns a combined snapshot (health, auth, license, channels, version, update availability). ' +
32
+ "Use specific actions for detail: " +
33
+ '"health" (gateway health), "auth" (Claude API auth), "license" (license info), ' +
34
+ '"channels" (WhatsApp/iMessage connections), "models" (available LLM models), ' +
35
+ '"update" (software version and update availability).',
36
+ parameters: SystemStatusSchema,
37
+ execute: async (_toolCallId, args) => {
38
+ const params = args;
39
+ const action = readStringParam(params, "action", { required: true });
40
+ if (action === "overview") {
41
+ // Fetch all subsystems in parallel for a unified snapshot
42
+ const [health, auth, license, channels, update] = await Promise.allSettled([
43
+ callGatewayTool("health", {}, {}),
44
+ callGatewayTool("auth.status", {}, {}),
45
+ callGatewayTool("license.status", {}, {}),
46
+ callGatewayTool("channels.status", {}, {}),
47
+ callGatewayTool("update.status", {}, {}),
48
+ ]);
49
+ return jsonResult({
50
+ health: health.status === "fulfilled"
51
+ ? health.value
52
+ : { error: String(health.reason) },
53
+ auth: auth.status === "fulfilled"
54
+ ? auth.value
55
+ : { error: String(auth.reason) },
56
+ license: license.status === "fulfilled"
57
+ ? license.value
58
+ : { error: String(license.reason) },
59
+ channels: channels.status === "fulfilled"
60
+ ? channels.value
61
+ : { error: String(channels.reason) },
62
+ update: update.status === "fulfilled"
63
+ ? update.value
64
+ : { error: String(update.reason) },
65
+ });
66
+ }
67
+ const methodMap = {
68
+ health: "health",
69
+ auth: "auth.status",
70
+ license: "license.status",
71
+ channels: "channels.status",
72
+ models: "models.list",
73
+ update: "update.status",
74
+ };
75
+ const method = methodMap[action];
76
+ if (!method)
77
+ throw new Error(`Unknown action: ${action}`);
78
+ const result = await callGatewayTool(method, {}, {});
79
+ return jsonResult(result);
80
+ },
81
+ };
82
+ }
@@ -0,0 +1,46 @@
1
+ /**
2
+ * Agent tool for checking usage and cost data.
3
+ *
4
+ * Wraps the `usage.status` and `usage.cost` gateway methods so the agent can
5
+ * report on token consumption and spend without the user opening the UI.
6
+ */
7
+ import { Type } from "@sinclair/typebox";
8
+ import { stringEnum } from "../schema/typebox.js";
9
+ import { jsonResult, readStringParam } from "./common.js";
10
+ import { callGatewayTool } from "./gateway.js";
11
+ const USAGE_ACTIONS = ["summary", "cost"];
12
+ const UsageReportSchema = Type.Object({
13
+ action: stringEnum(USAGE_ACTIONS, {
14
+ description: '"summary" returns token counts by model/provider. "cost" returns estimated spend by provider over a time period.',
15
+ }),
16
+ days: Type.Optional(Type.Number({
17
+ description: "Number of days to include in the cost report (default 30). Only used with the cost action.",
18
+ })),
19
+ });
20
+ export function createUsageReportTool() {
21
+ return {
22
+ label: "Usage Report",
23
+ name: "usage_report",
24
+ description: "Check token usage and cost data. " +
25
+ '"summary" shows token counts by model/provider. ' +
26
+ '"cost" shows estimated spend over a period (default 30 days). ' +
27
+ "Use the days parameter with cost to change the reporting window.",
28
+ parameters: UsageReportSchema,
29
+ execute: async (_toolCallId, args) => {
30
+ const params = args;
31
+ const action = readStringParam(params, "action", { required: true });
32
+ if (action === "summary") {
33
+ const result = await callGatewayTool("usage.status", {}, {});
34
+ return jsonResult(result);
35
+ }
36
+ if (action === "cost") {
37
+ const days = typeof params.days === "number" && Number.isFinite(params.days)
38
+ ? Math.max(1, Math.floor(params.days))
39
+ : 30;
40
+ const result = await callGatewayTool("usage.cost", {}, { days });
41
+ return jsonResult(result);
42
+ }
43
+ throw new Error(`Unknown action: ${action}`);
44
+ },
45
+ };
46
+ }
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.11.1",
3
- "commit": "8d046d383d7f5333a6b81d355d6d5b36f470f9ce",
4
- "builtAt": "2026-03-01T13:29:28.295Z"
2
+ "version": "1.12.0",
3
+ "commit": "ebb96bd656e075830461ab3dfe33e15ebb3332b5",
4
+ "builtAt": "2026-03-01T20:21:45.170Z"
5
5
  }
@@ -7,20 +7,12 @@ function clampPort(port, fallback) {
7
7
  function derivePort(base, offset, fallback) {
8
8
  return clampPort(base + offset, fallback);
9
9
  }
10
- export const DEFAULT_BRIDGE_PORT = 18790;
11
10
  export const DEFAULT_BROWSER_CONTROL_PORT = 18791;
12
- export const DEFAULT_CANVAS_HOST_PORT = 18793;
13
11
  export const DEFAULT_BROWSER_CDP_PORT_RANGE_START = 18800;
14
12
  export const DEFAULT_BROWSER_CDP_PORT_RANGE_END = 18899;
15
- export function deriveDefaultBridgePort(gatewayPort) {
16
- return derivePort(gatewayPort, 1, DEFAULT_BRIDGE_PORT);
17
- }
18
13
  export function deriveDefaultBrowserControlPort(gatewayPort) {
19
14
  return derivePort(gatewayPort, 2, DEFAULT_BROWSER_CONTROL_PORT);
20
15
  }
21
- export function deriveDefaultCanvasHostPort(gatewayPort) {
22
- return derivePort(gatewayPort, 4, DEFAULT_CANVAS_HOST_PORT);
23
- }
24
16
  export function deriveDefaultBrowserCdpPortRange(browserControlPort) {
25
17
  const start = derivePort(browserControlPort, 9, DEFAULT_BROWSER_CDP_PORT_RANGE_START);
26
18
  const end = clampPort(start + (DEFAULT_BROWSER_CDP_PORT_RANGE_END - DEFAULT_BROWSER_CDP_PORT_RANGE_START), DEFAULT_BROWSER_CDP_PORT_RANGE_END);
@@ -572,7 +572,12 @@ export const TaskmasterSchema = z
572
572
  .union([z.literal("anonymous"), z.literal("verified"), z.literal("choice")])
573
573
  .optional(),
574
574
  verifyMethods: z
575
- .array(z.union([z.literal("phone"), z.literal("email")]))
575
+ .array(z.union([
576
+ z.literal("whatsapp"),
577
+ z.literal("sms"),
578
+ z.literal("email"),
579
+ z.literal("phone"), // deprecated — normalized to ["whatsapp", "sms"] at runtime
580
+ ]))
576
581
  .min(1)
577
582
  .optional(),
578
583
  cookieTtlDays: z.number().int().positive().optional(),