diff --git a/extensions/matrix/src/outbound.ts b/extensions/matrix/src/outbound.ts index 790056486..54fbb09a2 100644 --- a/extensions/matrix/src/outbound.ts +++ b/extensions/matrix/src/outbound.ts @@ -11,7 +11,7 @@ export const matrixOutbound: ChannelOutboundAdapter = { if (!trimmed) { return { ok: false, - error: new Error("Delivering to Matrix requires --to "), + error: new Error("Delivering to Matrix requires target "), }; } return { ok: true, to: trimmed }; diff --git a/extensions/msteams/src/outbound.ts b/extensions/msteams/src/outbound.ts index 063391041..9e46fafbb 100644 --- a/extensions/msteams/src/outbound.ts +++ b/extensions/msteams/src/outbound.ts @@ -15,7 +15,7 @@ export const msteamsOutbound: ChannelOutboundAdapter = { return { ok: false, error: new Error( - "Delivering to MS Teams requires --to ", + "Delivering to MS Teams requires target ", ), }; } diff --git a/extensions/msteams/src/send-context.ts b/extensions/msteams/src/send-context.ts index 327bc37b9..ab4c4e998 100644 --- a/extensions/msteams/src/send-context.ts +++ b/extensions/msteams/src/send-context.ts @@ -26,7 +26,7 @@ export type MSTeamsProactiveContext = { }; /** - * Parse the --to argument into a conversation reference lookup key. + * Parse the target value into a conversation reference lookup key. * Supported formats: * - conversation:19:abc@thread.tacv2 → lookup by conversation ID * - user:aad-object-id → lookup by user AAD object ID @@ -40,7 +40,7 @@ function parseRecipient(to: string): { const finalize = (type: "conversation" | "user", id: string) => { const normalized = id.trim(); if (!normalized) { - throw new Error(`Invalid --to value: missing ${type} id`); + throw new Error(`Invalid target value: missing ${type} id`); } return { type, id: normalized }; }; diff --git a/extensions/zalo/src/channel.ts b/extensions/zalo/src/channel.ts index fdb3a7ef4..5742ec7e8 100644 --- a/extensions/zalo/src/channel.ts +++ b/extensions/zalo/src/channel.ts @@ -185,7 +185,7 @@ export const zaloPlugin: ChannelPlugin = { return "ZALO_BOT_TOKEN can only be used for the default account."; } if (!input.useEnv && !input.token && !input.tokenFile) { - return "Zalo requires --token or --token-file (or --use-env)."; + return "Zalo requires targetken or --token-file (or --use-env)."; } return null; }, @@ -284,7 +284,7 @@ export const zaloPlugin: ChannelPlugin = { if (!trimmed) { return { ok: false, - error: new Error("Delivering to Zalo requires --to "), + error: new Error("Delivering to Zalo requires target "), }; } return { ok: true, to: trimmed }; diff --git a/extensions/zalouser/README.md b/extensions/zalouser/README.md index b9edc6dc4..f1af62ce1 100644 --- a/extensions/zalouser/README.md +++ b/extensions/zalouser/README.md @@ -88,7 +88,7 @@ clawdbot channels login --channel zalouser ### Send a Message ```bash -clawdbot message send --channel zalouser --to --message "Hello from Clawdbot!" +clawdbot message send --channel zalouser --target --message "Hello from Clawdbot!" ``` ## Configuration @@ -152,10 +152,10 @@ zca account label "Work Account" ```bash # Text -clawdbot message send --channel zalouser --to --message "message" +clawdbot message send --channel zalouser --target --message "message" # Media (URL) -clawdbot message send --channel zalouser --to --message "caption" --media-url "https://example.com/img.jpg" +clawdbot message send --channel zalouser --target --message "caption" --media-url "https://example.com/img.jpg" ``` ### Listener @@ -188,7 +188,7 @@ Use `--profile` or `-p` to work with multiple accounts: ```bash clawdbot channels login --channel zalouser --account work -clawdbot message send --channel zalouser --account work --to --message "Hello" +clawdbot message send --channel zalouser --account work --target --message "Hello" ZCA_PROFILE=work zca listen ``` diff --git a/extensions/zalouser/src/channel.ts b/extensions/zalouser/src/channel.ts index d578f7ed9..fd4b92ac6 100644 --- a/extensions/zalouser/src/channel.ts +++ b/extensions/zalouser/src/channel.ts @@ -378,7 +378,7 @@ export const zalouserPlugin: ChannelPlugin = { if (!trimmed) { return { ok: false, - error: new Error("Delivering to Zalouser requires --to "), + error: new Error("Delivering to Zalouser requires target "), }; } return { ok: true, to: trimmed }; diff --git a/src/channels/plugins/discord.ts b/src/channels/plugins/discord.ts index 1b87a5a1f..5f726f292 100644 --- a/src/channels/plugins/discord.ts +++ b/src/channels/plugins/discord.ts @@ -253,7 +253,7 @@ export const discordPlugin: ChannelPlugin = { return "DISCORD_BOT_TOKEN can only be used for the default account."; } if (!input.useEnv && !input.token) { - return "Discord requires --token (or --use-env)."; + return "Discord requires targetken (or --use-env)."; } return null; }, @@ -314,7 +314,7 @@ export const discordPlugin: ChannelPlugin = { if (!trimmed) { return { ok: false, - error: new Error("Delivering to Discord requires --to "), + error: new Error("Delivering to Discord requires target "), }; } return { ok: true, to: trimmed }; diff --git a/src/channels/plugins/imessage.ts b/src/channels/plugins/imessage.ts index 6436d1782..0a52ffa36 100644 --- a/src/channels/plugins/imessage.ts +++ b/src/channels/plugins/imessage.ts @@ -177,7 +177,7 @@ export const imessagePlugin: ChannelPlugin = { if (!trimmed) { return { ok: false, - error: new Error("Delivering to iMessage requires --to "), + error: new Error("Delivering to iMessage requires target "), }; } return { ok: true, to: trimmed }; diff --git a/src/channels/plugins/outbound/discord.ts b/src/channels/plugins/outbound/discord.ts index c1d2cd4b5..7f76b6c72 100644 --- a/src/channels/plugins/outbound/discord.ts +++ b/src/channels/plugins/outbound/discord.ts @@ -11,7 +11,7 @@ export const discordOutbound: ChannelOutboundAdapter = { if (!trimmed) { return { ok: false, - error: new Error("Delivering to Discord requires --to "), + error: new Error("Delivering to Discord requires target "), }; } return { ok: true, to: trimmed }; diff --git a/src/channels/plugins/outbound/imessage.ts b/src/channels/plugins/outbound/imessage.ts index efebe1994..89389b230 100644 --- a/src/channels/plugins/outbound/imessage.ts +++ b/src/channels/plugins/outbound/imessage.ts @@ -12,7 +12,7 @@ export const imessageOutbound: ChannelOutboundAdapter = { if (!trimmed) { return { ok: false, - error: new Error("Delivering to iMessage requires --to "), + error: new Error("Delivering to iMessage requires target "), }; } return { ok: true, to: trimmed }; diff --git a/src/channels/plugins/outbound/signal.ts b/src/channels/plugins/outbound/signal.ts index b8889e933..366b66231 100644 --- a/src/channels/plugins/outbound/signal.ts +++ b/src/channels/plugins/outbound/signal.ts @@ -13,7 +13,7 @@ export const signalOutbound: ChannelOutboundAdapter = { return { ok: false, error: new Error( - "Delivering to Signal requires --to ", + "Delivering to Signal requires target ", ), }; } diff --git a/src/channels/plugins/outbound/slack.ts b/src/channels/plugins/outbound/slack.ts index 48bfc58c4..63fc2e540 100644 --- a/src/channels/plugins/outbound/slack.ts +++ b/src/channels/plugins/outbound/slack.ts @@ -10,7 +10,7 @@ export const slackOutbound: ChannelOutboundAdapter = { if (!trimmed) { return { ok: false, - error: new Error("Delivering to Slack requires --to "), + error: new Error("Delivering to Slack requires target "), }; } return { ok: true, to: trimmed }; diff --git a/src/channels/plugins/outbound/telegram.ts b/src/channels/plugins/outbound/telegram.ts index 931b9a1e6..cb6f5529d 100644 --- a/src/channels/plugins/outbound/telegram.ts +++ b/src/channels/plugins/outbound/telegram.ts @@ -27,7 +27,7 @@ export const telegramOutbound: ChannelOutboundAdapter = { if (!trimmed) { return { ok: false, - error: new Error("Delivering to Telegram requires --to "), + error: new Error("Delivering to Telegram requires target "), }; } return { ok: true, to: trimmed }; diff --git a/src/channels/plugins/outbound/whatsapp.ts b/src/channels/plugins/outbound/whatsapp.ts index 693c7849d..495c0bdaa 100644 --- a/src/channels/plugins/outbound/whatsapp.ts +++ b/src/channels/plugins/outbound/whatsapp.ts @@ -27,7 +27,7 @@ export const whatsappOutbound: ChannelOutboundAdapter = { return { ok: false, error: new Error( - "Delivering to WhatsApp requires --to or channels.whatsapp.allowFrom[0]", + "Delivering to WhatsApp requires target or channels.whatsapp.allowFrom[0]", ), }; } @@ -52,7 +52,7 @@ export const whatsappOutbound: ChannelOutboundAdapter = { return { ok: false, error: new Error( - "Delivering to WhatsApp requires --to or channels.whatsapp.allowFrom[0]", + "Delivering to WhatsApp requires target or channels.whatsapp.allowFrom[0]", ), }; }, diff --git a/src/channels/plugins/signal.ts b/src/channels/plugins/signal.ts index 823fd1db2..7692a038d 100644 --- a/src/channels/plugins/signal.ts +++ b/src/channels/plugins/signal.ts @@ -202,7 +202,7 @@ export const signalPlugin: ChannelPlugin = { return { ok: false, error: new Error( - "Delivering to Signal requires --to ", + "Delivering to Signal requires target ", ), }; } diff --git a/src/channels/plugins/slack.ts b/src/channels/plugins/slack.ts index cade740d8..c82cea5a2 100644 --- a/src/channels/plugins/slack.ts +++ b/src/channels/plugins/slack.ts @@ -497,7 +497,7 @@ export const slackPlugin: ChannelPlugin = { if (!trimmed) { return { ok: false, - error: new Error("Delivering to Slack requires --to "), + error: new Error("Delivering to Slack requires target "), }; } return { ok: true, to: trimmed }; diff --git a/src/channels/plugins/telegram.ts b/src/channels/plugins/telegram.ts index f157bd210..941c73d9a 100644 --- a/src/channels/plugins/telegram.ts +++ b/src/channels/plugins/telegram.ts @@ -215,7 +215,7 @@ export const telegramPlugin: ChannelPlugin = { return "TELEGRAM_BOT_TOKEN can only be used for the default account."; } if (!input.useEnv && !input.token && !input.tokenFile) { - return "Telegram requires --token or --token-file (or --use-env)."; + return "Telegram requires targetken or --token-file (or --use-env)."; } return null; }, @@ -285,7 +285,7 @@ export const telegramPlugin: ChannelPlugin = { if (!trimmed) { return { ok: false, - error: new Error("Delivering to Telegram requires --to "), + error: new Error("Delivering to Telegram requires target "), }; } return { ok: true, to: trimmed }; diff --git a/src/channels/plugins/whatsapp.ts b/src/channels/plugins/whatsapp.ts index 6699f5ab6..0c4171c79 100644 --- a/src/channels/plugins/whatsapp.ts +++ b/src/channels/plugins/whatsapp.ts @@ -316,7 +316,7 @@ export const whatsappPlugin: ChannelPlugin = { return { ok: false, error: new Error( - "Delivering to WhatsApp requires --to or channels.whatsapp.allowFrom[0]", + "Delivering to WhatsApp requires target or channels.whatsapp.allowFrom[0]", ), }; } @@ -341,7 +341,7 @@ export const whatsappPlugin: ChannelPlugin = { return { ok: false, error: new Error( - "Delivering to WhatsApp requires --to or channels.whatsapp.allowFrom[0]", + "Delivering to WhatsApp requires target or channels.whatsapp.allowFrom[0]", ), }; },