@rubytech/taskmaster 1.17.7 → 1.17.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.
|
@@ -155,6 +155,30 @@ export function createChannelSettingsTool() {
|
|
|
155
155
|
});
|
|
156
156
|
return jsonResult({ ok: true, accountId, groupPolicy, result });
|
|
157
157
|
}
|
|
158
|
+
if (action === "set_mention_required") {
|
|
159
|
+
if (typeof params.mentionRequired !== "boolean") {
|
|
160
|
+
throw new Error("mentionRequired (boolean) is required for set_mention_required");
|
|
161
|
+
}
|
|
162
|
+
const mentionRequired = params.mentionRequired;
|
|
163
|
+
const snapshot = await callGatewayTool("config.get", gatewayOpts, {});
|
|
164
|
+
const baseHash = typeof snapshot?.hash === "string" ? snapshot.hash : undefined;
|
|
165
|
+
const result = await callGatewayTool("config.patch", gatewayOpts, {
|
|
166
|
+
raw: JSON.stringify({
|
|
167
|
+
channels: {
|
|
168
|
+
whatsapp: {
|
|
169
|
+
accounts: { [accountId]: { groups: { mentionRequired } } },
|
|
170
|
+
},
|
|
171
|
+
},
|
|
172
|
+
}),
|
|
173
|
+
baseHash,
|
|
174
|
+
note: `agent: set mentionRequired to ${mentionRequired} for account ${accountId}`,
|
|
175
|
+
});
|
|
176
|
+
return jsonResult({ ok: true, accountId, mentionRequired, result });
|
|
177
|
+
}
|
|
178
|
+
if (action === "logout") {
|
|
179
|
+
const result = await callGatewayTool("channels.logout", gatewayOpts, { accountId });
|
|
180
|
+
return jsonResult({ ok: true, accountId, result });
|
|
181
|
+
}
|
|
158
182
|
throw new Error(`Unknown action: ${action}`);
|
|
159
183
|
},
|
|
160
184
|
};
|
package/dist/build-info.json
CHANGED
|
@@ -85,5 +85,11 @@ export function globalInstallArgs(manager, spec, needsSudo = false) {
|
|
|
85
85
|
return [...prefix, "pnpm", "add", "-g", spec];
|
|
86
86
|
if (manager === "bun")
|
|
87
87
|
return [...prefix, "bun", "add", "-g", spec];
|
|
88
|
-
|
|
88
|
+
// When running as sudo, npm reads /root/.npmrc as the user config. If that file
|
|
89
|
+
// contains an expired auth token, npm sends it with the request and the registry
|
|
90
|
+
// returns 404 even for public packages. Passing --userconfig /dev/null skips the
|
|
91
|
+
// user-level config so the install runs unauthenticated, which always works for
|
|
92
|
+
// public packages on the npm registry.
|
|
93
|
+
const npmUserconfig = needsSudo ? ["--userconfig", "/dev/null"] : [];
|
|
94
|
+
return [...prefix, "npm", "i", "-g", spec, ...npmUserconfig];
|
|
89
95
|
}
|