MCPcopy Create free account
hub / github.com/ShipSecAI/studio / buildNotifyArgs

Function buildNotifyArgs

worker/src/components/security/notify.ts:240–294  ·  view source on GitHub ↗
(options: BuildNotifyArgsOptions)

Source from the content-addressed store, hash-verified

238 * Follows the Dynamic Args Pattern from component-development.mdx
239 */
240const buildNotifyArgs = (options: BuildNotifyArgsOptions): string[] => {
241 const args: string[] = [];
242
243 // Input file (messages) — uses -i flag instead of stdin piping
244 args.push('-i', options.messagesFile);
245
246 // Provider config (required)
247 args.push('-provider-config', options.providerConfigFile);
248
249 // Optional notify config
250 if (options.notifyConfigFile) {
251 args.push('-config', options.notifyConfigFile);
252 }
253
254 // Boolean flags
255 if (options.bulk) {
256 args.push('-bulk');
257 }
258
259 // Verbose and silent are mutually exclusive — verbose takes precedence
260 if (options.verbose) {
261 args.push('-verbose');
262 } else if (options.silent) {
263 args.push('-silent');
264 }
265
266 // Numeric options
267 if (options.charLimit != null) {
268 args.push('-char-limit', String(options.charLimit));
269 }
270 if (options.delaySeconds != null) {
271 args.push('-delay', String(options.delaySeconds));
272 }
273 if (options.rateLimit != null) {
274 args.push('-rate-limit', String(options.rateLimit));
275 }
276
277 // String options
278 if (options.proxy) {
279 args.push('-proxy', options.proxy);
280 }
281 if (options.messageFormat) {
282 args.push('-msg-format', options.messageFormat);
283 }
284
285 // Provider and recipient filtering
286 if (options.providerIds && options.providerIds.length > 0) {
287 args.push('-provider', options.providerIds.join(','));
288 }
289 if (options.recipientIds && options.recipientIds.length > 0) {
290 args.push('-id', options.recipientIds.join(','));
291 }
292
293 return args;
294};
295
296const definition = defineComponent({
297 id: 'shipsec.notify.dispatch',

Callers 1

executeFunction · 0.85

Calls 1

pushMethod · 0.65

Tested by

no test coverage detected