chore: rename project to clawdbot
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import fs from "node:fs/promises";
|
||||
import path from "node:path";
|
||||
import type { ClawdisConfig } from "../config/config.js";
|
||||
import type { ClawdbotConfig } from "../config/config.js";
|
||||
import { loginWeb } from "../provider-web.js";
|
||||
import type { RuntimeEnv } from "../runtime.js";
|
||||
import { normalizeE164 } from "../utils.js";
|
||||
@@ -64,11 +64,11 @@ async function noteDiscordTokenHelp(prompter: WizardPrompter): Promise<void> {
|
||||
}
|
||||
|
||||
function buildSlackManifest(botName: string) {
|
||||
const safeName = botName.trim() || "Clawdis";
|
||||
const safeName = botName.trim() || "Clawdbot";
|
||||
const manifest = {
|
||||
display_information: {
|
||||
name: safeName,
|
||||
description: `${safeName} connector for Clawdis`,
|
||||
description: `${safeName} connector for Clawdbot`,
|
||||
},
|
||||
features: {
|
||||
bot_user: {
|
||||
@@ -82,7 +82,7 @@ function buildSlackManifest(botName: string) {
|
||||
slash_commands: [
|
||||
{
|
||||
command: "/clawd",
|
||||
description: "Send a message to Clawdis",
|
||||
description: "Send a message to Clawdbot",
|
||||
should_escape: false,
|
||||
},
|
||||
],
|
||||
@@ -153,7 +153,7 @@ async function noteSlackTokenHelp(
|
||||
);
|
||||
}
|
||||
|
||||
function setWhatsAppAllowFrom(cfg: ClawdisConfig, allowFrom?: string[]) {
|
||||
function setWhatsAppAllowFrom(cfg: ClawdbotConfig, allowFrom?: string[]) {
|
||||
return {
|
||||
...cfg,
|
||||
whatsapp: {
|
||||
@@ -164,10 +164,10 @@ function setWhatsAppAllowFrom(cfg: ClawdisConfig, allowFrom?: string[]) {
|
||||
}
|
||||
|
||||
async function promptWhatsAppAllowFrom(
|
||||
cfg: ClawdisConfig,
|
||||
cfg: ClawdbotConfig,
|
||||
_runtime: RuntimeEnv,
|
||||
prompter: WizardPrompter,
|
||||
): Promise<ClawdisConfig> {
|
||||
): Promise<ClawdbotConfig> {
|
||||
const existingAllowFrom = cfg.whatsapp?.allowFrom ?? [];
|
||||
const existingLabel =
|
||||
existingAllowFrom.length > 0 ? existingAllowFrom.join(", ") : "unset";
|
||||
@@ -236,11 +236,11 @@ async function promptWhatsAppAllowFrom(
|
||||
}
|
||||
|
||||
export async function setupProviders(
|
||||
cfg: ClawdisConfig,
|
||||
cfg: ClawdbotConfig,
|
||||
runtime: RuntimeEnv,
|
||||
prompter: WizardPrompter,
|
||||
options?: { allowDisable?: boolean; allowSignalInstall?: boolean },
|
||||
): Promise<ClawdisConfig> {
|
||||
): Promise<ClawdbotConfig> {
|
||||
const whatsappLinked = await detectWhatsAppLinked();
|
||||
const telegramEnv = Boolean(process.env.TELEGRAM_BOT_TOKEN?.trim());
|
||||
const discordEnv = Boolean(process.env.DISCORD_BOT_TOKEN?.trim());
|
||||
@@ -330,7 +330,7 @@ export async function setupProviders(
|
||||
await prompter.note(
|
||||
[
|
||||
"Scan the QR with WhatsApp on your phone.",
|
||||
"Credentials are stored under ~/.clawdis/credentials/ for future runs.",
|
||||
"Credentials are stored under ~/.clawdbot/credentials/ for future runs.",
|
||||
].join("\n"),
|
||||
"WhatsApp linking",
|
||||
);
|
||||
@@ -349,7 +349,7 @@ export async function setupProviders(
|
||||
}
|
||||
} else if (!whatsappLinked) {
|
||||
await prompter.note(
|
||||
"Run `clawdis login` later to link WhatsApp.",
|
||||
"Run `clawdbot login` later to link WhatsApp.",
|
||||
"WhatsApp",
|
||||
);
|
||||
}
|
||||
@@ -483,7 +483,7 @@ export async function setupProviders(
|
||||
const slackBotName = String(
|
||||
await prompter.text({
|
||||
message: "Slack bot display name (used for manifest)",
|
||||
initialValue: "Clawdis",
|
||||
initialValue: "Clawdbot",
|
||||
}),
|
||||
).trim();
|
||||
if (!slackConfigured) {
|
||||
@@ -641,9 +641,9 @@ export async function setupProviders(
|
||||
|
||||
await prompter.note(
|
||||
[
|
||||
'Link device with: signal-cli link -n "Clawdis"',
|
||||
'Link device with: signal-cli link -n "Clawdbot"',
|
||||
"Scan QR in Signal → Linked Devices",
|
||||
"Then run: clawdis gateway call providers.status --params '{\"probe\":true}'",
|
||||
"Then run: clawdbot gateway call providers.status --params '{\"probe\":true}'",
|
||||
].join("\n"),
|
||||
"Signal next steps",
|
||||
);
|
||||
@@ -679,7 +679,7 @@ export async function setupProviders(
|
||||
|
||||
await prompter.note(
|
||||
[
|
||||
"Ensure Clawdis has Full Disk Access to Messages DB.",
|
||||
"Ensure Clawdbot has Full Disk Access to Messages DB.",
|
||||
"Grant Automation permission for Messages when prompted.",
|
||||
"List chats with: imsg chats --limit 20",
|
||||
].join("\n"),
|
||||
|
||||
Reference in New Issue
Block a user