@rubytech/taskmaster 1.11.2 → 1.12.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.
- package/dist/agents/skills/workspace.js +3 -0
- package/dist/agents/tools/brand-settings-tool.js +7 -2
- package/dist/agents/tools/channel-settings-tool.js +18 -4
- package/dist/agents/tools/public-chat-settings-tool.js +15 -5
- package/dist/agents/tools/system-status-tool.js +24 -6
- package/dist/build-info.json +3 -3
- package/dist/config/port-defaults.js +0 -8
- package/dist/config/zod-schema.js +24 -1
- package/dist/control-ui/assets/{index-s8s_YKvR.js → index-4h8fLLNN.js} +395 -381
- package/dist/control-ui/assets/index-4h8fLLNN.js.map +1 -0
- package/dist/control-ui/index.html +1 -1
- package/dist/gateway/control-ui.js +25 -10
- package/dist/gateway/public-chat/deliver-email.js +5 -5
- package/dist/gateway/public-chat/deliver-otp.js +50 -16
- package/dist/gateway/public-chat/deliver-sms.js +53 -14
- package/dist/gateway/public-chat-api.js +35 -15
- package/dist/gateway/server-methods/public-chat.js +13 -6
- package/package.json +1 -1
- package/skills/brevo/references/sms-credits.md +28 -20
- package/taskmaster-docs/USER-GUIDE.md +51 -8
- package/dist/control-ui/assets/index-s8s_YKvR.js.map +0 -1
|
@@ -261,6 +261,9 @@ const FORCE_RESYNC_SKILLS = new Set([
|
|
|
261
261
|
"taskmaster",
|
|
262
262
|
// v1.11: new bundled skill replaces workspace copies with generic version
|
|
263
263
|
"strategic-proactivity",
|
|
264
|
+
// v1.11.2: brevo skill updated with SMS credits reference; twilio scoped to voice-call only
|
|
265
|
+
"brevo",
|
|
266
|
+
"twilio",
|
|
264
267
|
]);
|
|
265
268
|
/**
|
|
266
269
|
* Copy bundled skills into a workspace's `skills/` directory.
|
|
@@ -43,7 +43,9 @@ export function createBrandSettingsTool() {
|
|
|
43
43
|
if (action === "get") {
|
|
44
44
|
const config = await callGatewayTool("config.get", gatewayOpts, {});
|
|
45
45
|
let brand = {};
|
|
46
|
-
if (config &&
|
|
46
|
+
if (config &&
|
|
47
|
+
typeof config === "object" &&
|
|
48
|
+
typeof config.raw === "string") {
|
|
47
49
|
try {
|
|
48
50
|
const parsed = JSON.parse(config.raw);
|
|
49
51
|
brand = parsed?.brand ?? {};
|
|
@@ -91,7 +93,10 @@ export function createBrandSettingsTool() {
|
|
|
91
93
|
return jsonResult({ ok: true, ...brandPatch, result });
|
|
92
94
|
}
|
|
93
95
|
if (action === "remove_logo") {
|
|
94
|
-
const workspace = readStringParam(params, "workspace", {
|
|
96
|
+
const workspace = readStringParam(params, "workspace", {
|
|
97
|
+
required: true,
|
|
98
|
+
label: "workspace",
|
|
99
|
+
});
|
|
95
100
|
const result = await callGatewayTool("brand.removeLogo", gatewayOpts, { workspace });
|
|
96
101
|
return jsonResult(result);
|
|
97
102
|
}
|
|
@@ -10,7 +10,13 @@ import { Type } from "@sinclair/typebox";
|
|
|
10
10
|
import { stringEnum, optionalStringEnum } from "../schema/typebox.js";
|
|
11
11
|
import { jsonResult, readStringParam } from "./common.js";
|
|
12
12
|
import { callGatewayTool } from "./gateway.js";
|
|
13
|
-
const CHANNEL_SETTINGS_ACTIONS = [
|
|
13
|
+
const CHANNEL_SETTINGS_ACTIONS = [
|
|
14
|
+
"status",
|
|
15
|
+
"set_model",
|
|
16
|
+
"set_thinking",
|
|
17
|
+
"set_dm_policy",
|
|
18
|
+
"set_group_policy",
|
|
19
|
+
];
|
|
14
20
|
const DM_POLICY_VALUES = ["open", "closed"];
|
|
15
21
|
const GROUP_POLICY_VALUES = ["open", "disabled", "allowlist"];
|
|
16
22
|
const ChannelSettingsSchema = Type.Object({
|
|
@@ -55,7 +61,10 @@ export function createChannelSettingsTool() {
|
|
|
55
61
|
return jsonResult(result);
|
|
56
62
|
}
|
|
57
63
|
// All set_* actions require accountId and use config.patch
|
|
58
|
-
const accountId = readStringParam(params, "accountId", {
|
|
64
|
+
const accountId = readStringParam(params, "accountId", {
|
|
65
|
+
required: true,
|
|
66
|
+
label: "accountId",
|
|
67
|
+
});
|
|
59
68
|
if (action === "set_model") {
|
|
60
69
|
const model = readStringParam(params, "model", { required: true, label: "model" });
|
|
61
70
|
// Patch the WhatsApp account's model in config
|
|
@@ -98,12 +107,17 @@ export function createChannelSettingsTool() {
|
|
|
98
107
|
return jsonResult({ ok: true, accountId, dmPolicy, result });
|
|
99
108
|
}
|
|
100
109
|
if (action === "set_group_policy") {
|
|
101
|
-
const groupPolicy = readStringParam(params, "groupPolicy", {
|
|
110
|
+
const groupPolicy = readStringParam(params, "groupPolicy", {
|
|
111
|
+
required: true,
|
|
112
|
+
label: "groupPolicy",
|
|
113
|
+
});
|
|
102
114
|
const snapshot = await callGatewayTool("config.get", gatewayOpts, {});
|
|
103
115
|
const baseHash = typeof snapshot?.hash === "string" ? snapshot.hash : undefined;
|
|
104
116
|
const result = await callGatewayTool("config.patch", gatewayOpts, {
|
|
105
117
|
raw: JSON.stringify({
|
|
106
|
-
channels: {
|
|
118
|
+
channels: {
|
|
119
|
+
whatsapp: { accounts: { [accountId]: { groups: { mode: groupPolicy } } } },
|
|
120
|
+
},
|
|
107
121
|
}),
|
|
108
122
|
baseHash,
|
|
109
123
|
note: `agent: set group policy to ${groupPolicy} for account ${accountId}`,
|
|
@@ -58,7 +58,9 @@ export function createPublicChatSettingsTool() {
|
|
|
58
58
|
if (action === "status") {
|
|
59
59
|
const config = await callGatewayTool("config.get", gatewayOpts, {});
|
|
60
60
|
let publicChat = {};
|
|
61
|
-
if (config &&
|
|
61
|
+
if (config &&
|
|
62
|
+
typeof config === "object" &&
|
|
63
|
+
typeof config.raw === "string") {
|
|
62
64
|
try {
|
|
63
65
|
const parsed = JSON.parse(config.raw);
|
|
64
66
|
publicChat = parsed?.publicChat ?? {};
|
|
@@ -72,7 +74,7 @@ export function createPublicChatSettingsTool() {
|
|
|
72
74
|
greeting: publicChat.greeting ?? null,
|
|
73
75
|
greetingEnabled: publicChat.greetingEnabled ?? true,
|
|
74
76
|
accessMode: publicChat.accessMode ?? "open",
|
|
75
|
-
verifyMethods: publicChat.verifyMethods ?? ["
|
|
77
|
+
verifyMethods: publicChat.verifyMethods ?? ["whatsapp", "sms"],
|
|
76
78
|
});
|
|
77
79
|
}
|
|
78
80
|
if (action === "enable" || action === "disable") {
|
|
@@ -107,12 +109,20 @@ export function createPublicChatSettingsTool() {
|
|
|
107
109
|
return jsonResult({ ok: true, ...patch, result });
|
|
108
110
|
}
|
|
109
111
|
if (action === "regenerate_greeting") {
|
|
110
|
-
const accountId = readStringParam(params, "accountId", {
|
|
111
|
-
|
|
112
|
+
const accountId = readStringParam(params, "accountId", {
|
|
113
|
+
required: true,
|
|
114
|
+
label: "accountId",
|
|
115
|
+
});
|
|
116
|
+
const result = await callGatewayTool("public.greeting.generate", gatewayOpts, {
|
|
117
|
+
accountId,
|
|
118
|
+
});
|
|
112
119
|
return jsonResult(result);
|
|
113
120
|
}
|
|
114
121
|
if (action === "set_access_mode") {
|
|
115
|
-
const accessMode = readStringParam(params, "accessMode", {
|
|
122
|
+
const accessMode = readStringParam(params, "accessMode", {
|
|
123
|
+
required: true,
|
|
124
|
+
label: "accessMode",
|
|
125
|
+
});
|
|
116
126
|
const snapshot = await callGatewayTool("config.get", gatewayOpts, {});
|
|
117
127
|
const baseHash = typeof snapshot?.hash === "string" ? snapshot.hash : undefined;
|
|
118
128
|
const result = await callGatewayTool("config.patch", gatewayOpts, {
|
|
@@ -9,7 +9,15 @@ import { Type } from "@sinclair/typebox";
|
|
|
9
9
|
import { stringEnum } from "../schema/typebox.js";
|
|
10
10
|
import { jsonResult, readStringParam } from "./common.js";
|
|
11
11
|
import { callGatewayTool } from "./gateway.js";
|
|
12
|
-
const SYSTEM_STATUS_ACTIONS = [
|
|
12
|
+
const SYSTEM_STATUS_ACTIONS = [
|
|
13
|
+
"overview",
|
|
14
|
+
"health",
|
|
15
|
+
"auth",
|
|
16
|
+
"license",
|
|
17
|
+
"channels",
|
|
18
|
+
"models",
|
|
19
|
+
"update",
|
|
20
|
+
];
|
|
13
21
|
const SystemStatusSchema = Type.Object({
|
|
14
22
|
action: stringEnum(SYSTEM_STATUS_ACTIONS, {
|
|
15
23
|
description: '"overview" returns a combined snapshot of all subsystems. Use specific actions for detailed info on one subsystem.',
|
|
@@ -39,11 +47,21 @@ export function createSystemStatusTool() {
|
|
|
39
47
|
callGatewayTool("update.status", {}, {}),
|
|
40
48
|
]);
|
|
41
49
|
return jsonResult({
|
|
42
|
-
health: health.status === "fulfilled"
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
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) },
|
|
47
65
|
});
|
|
48
66
|
}
|
|
49
67
|
const methodMap = {
|
package/dist/build-info.json
CHANGED
|
@@ -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,12 +572,35 @@ 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([
|
|
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(),
|
|
579
584
|
greeting: z.string().max(500).optional(), // deprecated — migrated to greetings map
|
|
580
585
|
greetings: z.record(z.string(), z.string().max(500)).optional(),
|
|
586
|
+
accountSettings: z
|
|
587
|
+
.record(z.string(), z
|
|
588
|
+
.object({
|
|
589
|
+
auth: z
|
|
590
|
+
.union([z.literal("anonymous"), z.literal("verified"), z.literal("choice")])
|
|
591
|
+
.optional(),
|
|
592
|
+
verifyMethods: z
|
|
593
|
+
.array(z.union([
|
|
594
|
+
z.literal("whatsapp"),
|
|
595
|
+
z.literal("sms"),
|
|
596
|
+
z.literal("email"),
|
|
597
|
+
z.literal("phone"),
|
|
598
|
+
]))
|
|
599
|
+
.min(1)
|
|
600
|
+
.optional(),
|
|
601
|
+
})
|
|
602
|
+
.strict())
|
|
603
|
+
.optional(),
|
|
581
604
|
sms: z
|
|
582
605
|
.object({
|
|
583
606
|
accountSid: z.string().optional(),
|