chore: rename project to clawdbot

This commit is contained in:
Peter Steinberger
2026-01-04 14:32:47 +00:00
parent d48dc71fa4
commit 246adaa119
841 changed files with 4590 additions and 4328 deletions

View File

@@ -23,7 +23,7 @@ vi.mock("../agents/model-catalog.js", () => ({
import { loadModelCatalog } from "../agents/model-catalog.js";
import { runEmbeddedPiAgent } from "../agents/pi-embedded.js";
import type { ClawdisConfig } from "../config/config.js";
import type { ClawdbotConfig } from "../config/config.js";
import * as configModule from "../config/config.js";
import type { RuntimeEnv } from "../runtime.js";
import { agentCommand } from "./agent.js";
@@ -39,7 +39,7 @@ const runtime: RuntimeEnv = {
const configSpy = vi.spyOn(configModule, "loadConfig");
async function withTempHome<T>(fn: (home: string) => Promise<T>): Promise<T> {
const base = fs.mkdtempSync(path.join(os.tmpdir(), "clawdis-agent-"));
const base = fs.mkdtempSync(path.join(os.tmpdir(), "clawdbot-agent-"));
const previousHome = process.env.HOME;
process.env.HOME = base;
try {
@@ -53,9 +53,9 @@ async function withTempHome<T>(fn: (home: string) => Promise<T>): Promise<T> {
function mockConfig(
home: string,
storePath: string,
routingOverrides?: Partial<NonNullable<ClawdisConfig["routing"]>>,
agentOverrides?: Partial<NonNullable<ClawdisConfig["agent"]>>,
telegramOverrides?: Partial<NonNullable<ClawdisConfig["telegram"]>>,
routingOverrides?: Partial<NonNullable<ClawdbotConfig["routing"]>>,
agentOverrides?: Partial<NonNullable<ClawdbotConfig["agent"]>>,
telegramOverrides?: Partial<NonNullable<ClawdbotConfig["telegram"]>>,
) {
configSpy.mockReturnValue({
agent: {

View File

@@ -27,7 +27,7 @@ import {
type VerboseLevel,
} from "../auto-reply/thinking.js";
import { type CliDeps, createDefaultDeps } from "../cli/deps.js";
import { type ClawdisConfig, loadConfig } from "../config/config.js";
import { type ClawdbotConfig, loadConfig } from "../config/config.js";
import {
DEFAULT_IDLE_MINUTES,
loadSessionStore,
@@ -77,7 +77,7 @@ type SessionResolution = {
};
function resolveSession(opts: {
cfg: ClawdisConfig;
cfg: ClawdbotConfig;
to?: string;
sessionId?: string;
}): SessionResolution {
@@ -540,7 +540,7 @@ export async function agentCommand(
}
if (deliveryProvider === "webchat") {
const err = new Error(
"Delivering to WebChat is not supported via `clawdis agent`; use WhatsApp/Telegram or run with --deliver=false.",
"Delivering to WebChat is not supported via `clawdbot agent`; use WhatsApp/Telegram or run with --deliver=false.",
);
if (!bestEffortDeliver) throw err;
logDeliveryError(err);

View File

@@ -11,9 +11,9 @@ import {
text,
} from "@clack/prompts";
import { loginAnthropic, type OAuthCredentials } from "@mariozechner/pi-ai";
import type { ClawdisConfig } from "../config/config.js";
import type { ClawdbotConfig } from "../config/config.js";
import {
CONFIG_PATH_CLAWDIS,
CONFIG_PATH_CLAWDBOT,
readConfigFileSnapshot,
resolveGatewayPort,
writeConfigFile,
@@ -66,10 +66,10 @@ type ConfigureWizardParams = {
};
async function promptGatewayConfig(
cfg: ClawdisConfig,
cfg: ClawdbotConfig,
runtime: RuntimeEnv,
): Promise<{
config: ClawdisConfig;
config: ClawdbotConfig;
port: number;
token?: string;
}> {
@@ -221,9 +221,9 @@ async function promptGatewayConfig(
}
async function promptAuthConfig(
cfg: ClawdisConfig,
cfg: ClawdbotConfig,
runtime: RuntimeEnv,
): Promise<ClawdisConfig> {
): Promise<ClawdbotConfig> {
const authChoice = guardCancel(
await select({
message: "Model/auth choice",
@@ -399,8 +399,8 @@ async function maybeInstallDaemon(params: {
await resolveGatewayProgramArguments({ port: params.port, dev: devMode });
const environment: Record<string, string | undefined> = {
PATH: process.env.PATH,
CLAWDIS_GATEWAY_TOKEN: params.gatewayToken,
CLAWDIS_LAUNCHD_LABEL:
CLAWDBOT_GATEWAY_TOKEN: params.gatewayToken,
CLAWDBOT_LAUNCHD_LABEL:
process.platform === "darwin" ? GATEWAY_LAUNCH_AGENT_LABEL : undefined,
};
await service.install({
@@ -418,12 +418,12 @@ export async function runConfigureWizard(
) {
printWizardHeader(runtime);
intro(
opts.command === "update" ? "Clawdis update wizard" : "Clawdis configure",
opts.command === "update" ? "Clawdbot update wizard" : "Clawdbot configure",
);
const prompter = createClackPrompter();
const snapshot = await readConfigFileSnapshot();
let baseConfig: ClawdisConfig = snapshot.valid ? snapshot.config : {};
let baseConfig: ClawdbotConfig = snapshot.valid ? snapshot.config : {};
if (snapshot.exists) {
const title = snapshot.valid
@@ -453,10 +453,10 @@ export async function runConfigureWizard(
const localUrl = "ws://127.0.0.1:18789";
const localProbe = await probeGatewayReachable({
url: localUrl,
token: process.env.CLAWDIS_GATEWAY_TOKEN,
token: process.env.CLAWDBOT_GATEWAY_TOKEN,
password:
baseConfig.gateway?.auth?.password ??
process.env.CLAWDIS_GATEWAY_PASSWORD,
process.env.CLAWDBOT_GATEWAY_PASSWORD,
});
const remoteUrl = baseConfig.gateway?.remote?.url?.trim() ?? "";
const remoteProbe = remoteUrl
@@ -498,7 +498,7 @@ export async function runConfigureWizard(
mode,
});
await writeConfigFile(remoteConfig);
runtime.log(`Updated ${CONFIG_PATH_CLAWDIS}`);
runtime.log(`Updated ${CONFIG_PATH_CLAWDBOT}`);
outro("Remote gateway configured.");
return;
}
@@ -583,7 +583,7 @@ export async function runConfigureWizard(
mode,
});
await writeConfigFile(nextConfig);
runtime.log(`Updated ${CONFIG_PATH_CLAWDIS}`);
runtime.log(`Updated ${CONFIG_PATH_CLAWDBOT}`);
if (selected.includes("daemon")) {
if (!selected.includes("gateway")) {

View File

@@ -19,7 +19,7 @@ vi.mock("../agents/skills-status.js", () => ({
}));
vi.mock("../config/config.js", () => ({
CONFIG_PATH_CLAWDIS: "/tmp/clawdis.json",
CONFIG_PATH_CLAWDBOT: "/tmp/clawdbot.json",
readConfigFileSnapshot,
writeConfigFile,
migrateLegacyConfig,
@@ -54,7 +54,7 @@ vi.mock("./onboard-helpers.js", () => ({
describe("doctor", () => {
it("migrates routing.allowFrom to whatsapp.allowFrom", async () => {
readConfigFileSnapshot.mockResolvedValue({
path: "/tmp/clawdis.json",
path: "/tmp/clawdbot.json",
exists: true,
raw: "{}",
parsed: { routing: { allowFrom: ["+15555550123"] } },

View File

@@ -1,9 +1,9 @@
import { confirm, intro, note, outro } from "@clack/prompts";
import { buildWorkspaceSkillStatus } from "../agents/skills-status.js";
import type { ClawdisConfig } from "../config/config.js";
import type { ClawdbotConfig } from "../config/config.js";
import {
CONFIG_PATH_CLAWDIS,
CONFIG_PATH_CLAWDBOT,
migrateLegacyConfig,
readConfigFileSnapshot,
writeConfigFile,
@@ -20,16 +20,16 @@ import {
printWizardHeader,
} from "./onboard-helpers.js";
function resolveMode(cfg: ClawdisConfig): "local" | "remote" {
function resolveMode(cfg: ClawdbotConfig): "local" | "remote" {
return cfg.gateway?.mode === "remote" ? "remote" : "local";
}
export async function doctorCommand(runtime: RuntimeEnv = defaultRuntime) {
printWizardHeader(runtime);
intro("Clawdis doctor");
intro("Clawdbot doctor");
const snapshot = await readConfigFileSnapshot();
let cfg: ClawdisConfig = snapshot.valid ? snapshot.config : {};
let cfg: ClawdbotConfig = snapshot.valid ? snapshot.config : {};
if (
snapshot.exists &&
!snapshot.valid &&
@@ -130,7 +130,7 @@ export async function doctorCommand(runtime: RuntimeEnv = defaultRuntime) {
cfg = applyWizardMetadata(cfg, { command: "doctor", mode: resolveMode(cfg) });
await writeConfigFile(cfg);
runtime.log(`Updated ${CONFIG_PATH_CLAWDIS}`);
runtime.log(`Updated ${CONFIG_PATH_CLAWDBOT}`);
outro("Doctor complete.");
}

View File

@@ -104,7 +104,7 @@ describe("getHealthSnapshot", () => {
});
it("treats telegram.tokenFile as configured", async () => {
const tmpDir = fs.mkdtempSync(path.join(os.tmpdir(), "clawdis-health-"));
const tmpDir = fs.mkdtempSync(path.join(os.tmpdir(), "clawdbot-health-"));
const tokenFile = path.join(tmpDir, "telegram-token");
fs.writeFileSync(tokenFile, "t-file\n", "utf-8");
testConfig = { telegram: { tokenFile } };

View File

@@ -125,7 +125,7 @@ export async function healthCommand(
runtime.log(
summary.web.linked
? `Web: linked (auth age ${summary.web.authAgeMs ? `${Math.round(summary.web.authAgeMs / 60000)}m` : "unknown"})`
: "Web: not linked (run clawdis login)",
: "Web: not linked (run clawdbot login)",
);
if (summary.web.linked) {
logWebSelfId(runtime, true);

View File

@@ -4,8 +4,8 @@ import path from "node:path";
import type { OAuthCredentials, OAuthProvider } from "@mariozechner/pi-ai";
import { discoverAuthStorage } from "@mariozechner/pi-coding-agent";
import { resolveClawdisAgentDir } from "../agents/agent-paths.js";
import type { ClawdisConfig } from "../config/config.js";
import { resolveClawdbotAgentDir } from "../agents/agent-paths.js";
import type { ClawdbotConfig } from "../config/config.js";
import { CONFIG_DIR } from "../utils.js";
export async function writeOAuthCredentials(
@@ -29,12 +29,12 @@ export async function writeOAuthCredentials(
}
export async function setAnthropicApiKey(key: string) {
const agentDir = resolveClawdisAgentDir();
const agentDir = resolveClawdbotAgentDir();
const authStorage = discoverAuthStorage(agentDir);
authStorage.set("anthropic", { type: "api_key", key });
}
export function applyMinimaxConfig(cfg: ClawdisConfig): ClawdisConfig {
export function applyMinimaxConfig(cfg: ClawdbotConfig): ClawdbotConfig {
const allowed = new Set(cfg.agent?.allowedModels ?? []);
allowed.add("anthropic/claude-opus-4-5");
allowed.add("lmstudio/minimax-m2.1-gs32");

View File

@@ -9,8 +9,8 @@ import {
DEFAULT_AGENT_WORKSPACE_DIR,
ensureAgentWorkspace,
} from "../agents/workspace.js";
import type { ClawdisConfig } from "../config/config.js";
import { CONFIG_PATH_CLAWDIS } from "../config/config.js";
import type { ClawdbotConfig } from "../config/config.js";
import { CONFIG_PATH_CLAWDBOT } from "../config/config.js";
import { resolveSessionTranscriptsDir } from "../config/sessions.js";
import { callGateway } from "../gateway/call.js";
import { normalizeControlUiBasePath } from "../gateway/control-ui.js";
@@ -29,7 +29,7 @@ export function guardCancel<T>(value: T, runtime: RuntimeEnv): T {
return value;
}
export function summarizeExistingConfig(config: ClawdisConfig): string {
export function summarizeExistingConfig(config: ClawdbotConfig): string {
const rows: string[] = [];
if (config.agent?.workspace)
rows.push(`workspace: ${config.agent.workspace}`);
@@ -64,9 +64,9 @@ export function printWizardHeader(runtime: RuntimeEnv) {
}
export function applyWizardMetadata(
cfg: ClawdisConfig,
cfg: ClawdbotConfig,
params: { command: string; mode: "local" | "remote" },
): ClawdisConfig {
): ClawdbotConfig {
const commit =
process.env.GIT_COMMIT?.trim() || process.env.GIT_SHA?.trim() || undefined;
return {
@@ -145,7 +145,7 @@ export async function handleReset(
workspaceDir: string,
runtime: RuntimeEnv,
) {
await moveToTrash(CONFIG_PATH_CLAWDIS, runtime);
await moveToTrash(CONFIG_PATH_CLAWDBOT, runtime);
if (scope === "config") return;
await moveToTrash(path.join(CONFIG_DIR, "credentials"), runtime);
await moveToTrash(resolveSessionTranscriptsDir(), runtime);

View File

@@ -1,8 +1,8 @@
import path from "node:path";
import {
type ClawdisConfig,
CONFIG_PATH_CLAWDIS,
type ClawdbotConfig,
CONFIG_PATH_CLAWDBOT,
readConfigFileSnapshot,
resolveGatewayPort,
writeConfigFile,
@@ -32,7 +32,7 @@ export async function runNonInteractiveOnboarding(
runtime: RuntimeEnv = defaultRuntime,
) {
const snapshot = await readConfigFileSnapshot();
const baseConfig: ClawdisConfig = snapshot.valid ? snapshot.config : {};
const baseConfig: ClawdbotConfig = snapshot.valid ? snapshot.config : {};
const mode: OnboardMode = opts.mode ?? "local";
if (mode === "remote") {
@@ -43,7 +43,7 @@ export async function runNonInteractiveOnboarding(
return;
}
let nextConfig: ClawdisConfig = {
let nextConfig: ClawdbotConfig = {
...baseConfig,
gateway: {
...baseConfig.gateway,
@@ -56,7 +56,7 @@ export async function runNonInteractiveOnboarding(
};
nextConfig = applyWizardMetadata(nextConfig, { command: "onboard", mode });
await writeConfigFile(nextConfig);
runtime.log(`Updated ${CONFIG_PATH_CLAWDIS}`);
runtime.log(`Updated ${CONFIG_PATH_CLAWDBOT}`);
const payload = {
mode,
@@ -76,7 +76,7 @@ export async function runNonInteractiveOnboarding(
(opts.workspace ?? baseConfig.agent?.workspace ?? DEFAULT_WORKSPACE).trim(),
);
let nextConfig: ClawdisConfig = {
let nextConfig: ClawdbotConfig = {
...baseConfig,
agent: {
...baseConfig.agent,
@@ -200,7 +200,7 @@ export async function runNonInteractiveOnboarding(
nextConfig = applyWizardMetadata(nextConfig, { command: "onboard", mode });
await writeConfigFile(nextConfig);
runtime.log(`Updated ${CONFIG_PATH_CLAWDIS}`);
runtime.log(`Updated ${CONFIG_PATH_CLAWDBOT}`);
await ensureWorkspaceAndSessions(workspaceDir, runtime);
if (opts.installDaemon) {
@@ -212,8 +212,8 @@ export async function runNonInteractiveOnboarding(
await resolveGatewayProgramArguments({ port, dev: devMode });
const environment: Record<string, string | undefined> = {
PATH: process.env.PATH,
CLAWDIS_GATEWAY_TOKEN: gatewayToken,
CLAWDIS_LAUNCHD_LABEL:
CLAWDBOT_GATEWAY_TOKEN: gatewayToken,
CLAWDBOT_LAUNCHD_LABEL:
process.platform === "darwin" ? GATEWAY_LAUNCH_AGENT_LABEL : undefined,
};
await service.install({

View File

@@ -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"),

View File

@@ -1,4 +1,4 @@
import type { ClawdisConfig } from "../config/config.js";
import type { ClawdbotConfig } from "../config/config.js";
import type { GatewayBonjourBeacon } from "../infra/bonjour-discovery.js";
import { discoverGatewayBeacons } from "../infra/bonjour-discovery.js";
import type { WizardPrompter } from "../wizard/prompts.js";
@@ -25,9 +25,9 @@ function ensureWsUrl(value: string): string {
}
export async function promptRemoteGatewayConfig(
cfg: ClawdisConfig,
cfg: ClawdbotConfig,
prompter: WizardPrompter,
): Promise<ClawdisConfig> {
): Promise<ClawdbotConfig> {
let selectedBeacon: GatewayBonjourBeacon | null = null;
let suggestedUrl = cfg.gateway?.remote?.url ?? DEFAULT_GATEWAY_URL;

View File

@@ -1,6 +1,6 @@
import { installSkill } from "../agents/skills-install.js";
import { buildWorkspaceSkillStatus } from "../agents/skills-status.js";
import type { ClawdisConfig } from "../config/config.js";
import type { ClawdbotConfig } from "../config/config.js";
import type { RuntimeEnv } from "../runtime.js";
import type { WizardPrompter } from "../wizard/prompts.js";
import { detectBinary, resolveNodeManagerOptions } from "./onboard-helpers.js";
@@ -30,10 +30,10 @@ function formatSkillHint(skill: {
}
function upsertSkillEntry(
cfg: ClawdisConfig,
cfg: ClawdbotConfig,
skillKey: string,
patch: { apiKey?: string },
): ClawdisConfig {
): ClawdbotConfig {
const entries = { ...cfg.skills?.entries };
const existing = (entries[skillKey] as { apiKey?: string } | undefined) ?? {};
entries[skillKey] = { ...existing, ...patch };
@@ -47,11 +47,11 @@ function upsertSkillEntry(
}
export async function setupSkills(
cfg: ClawdisConfig,
cfg: ClawdbotConfig,
workspaceDir: string,
runtime: RuntimeEnv,
prompter: WizardPrompter,
): Promise<ClawdisConfig> {
): Promise<ClawdbotConfig> {
const report = buildWorkspaceSkillStatus(workspaceDir, { config: cfg });
const eligible = report.skills.filter((s) => s.eligible);
const missing = report.skills.filter(
@@ -109,7 +109,7 @@ export async function setupSkills(
options: resolveNodeManagerOptions(),
})) as "npm" | "pnpm" | "bun";
let next: ClawdisConfig = {
let next: ClawdbotConfig = {
...cfg,
skills: {
...cfg.skills,
@@ -166,7 +166,7 @@ export async function setupSkills(
if (result.stderr) runtime.log(result.stderr.trim());
else if (result.stdout) runtime.log(result.stdout.trim());
runtime.log(
"Tip: run `clawdis doctor` to review skills + requirements.",
"Tip: run `clawdbot doctor` to review skills + requirements.",
);
}
}

View File

@@ -7,20 +7,20 @@ import {
DEFAULT_AGENT_WORKSPACE_DIR,
ensureAgentWorkspace,
} from "../agents/workspace.js";
import { type ClawdisConfig, CONFIG_PATH_CLAWDIS } from "../config/config.js";
import { type ClawdbotConfig, CONFIG_PATH_CLAWDBOT } from "../config/config.js";
import { resolveSessionTranscriptsDir } from "../config/sessions.js";
import type { RuntimeEnv } from "../runtime.js";
import { defaultRuntime } from "../runtime.js";
async function readConfigFileRaw(): Promise<{
exists: boolean;
parsed: ClawdisConfig;
parsed: ClawdbotConfig;
}> {
try {
const raw = await fs.readFile(CONFIG_PATH_CLAWDIS, "utf-8");
const raw = await fs.readFile(CONFIG_PATH_CLAWDBOT, "utf-8");
const parsed = JSON5.parse(raw);
if (parsed && typeof parsed === "object") {
return { exists: true, parsed: parsed as ClawdisConfig };
return { exists: true, parsed: parsed as ClawdbotConfig };
}
return { exists: true, parsed: {} };
} catch {
@@ -28,10 +28,10 @@ async function readConfigFileRaw(): Promise<{
}
}
async function writeConfigFile(cfg: ClawdisConfig) {
await fs.mkdir(path.dirname(CONFIG_PATH_CLAWDIS), { recursive: true });
async function writeConfigFile(cfg: ClawdbotConfig) {
await fs.mkdir(path.dirname(CONFIG_PATH_CLAWDBOT), { recursive: true });
const json = JSON.stringify(cfg, null, 2).trimEnd().concat("\n");
await fs.writeFile(CONFIG_PATH_CLAWDIS, json, "utf-8");
await fs.writeFile(CONFIG_PATH_CLAWDBOT, json, "utf-8");
}
export async function setupCommand(
@@ -50,7 +50,7 @@ export async function setupCommand(
const workspace =
desiredWorkspace ?? agent.workspace ?? DEFAULT_AGENT_WORKSPACE_DIR;
const next: ClawdisConfig = {
const next: ClawdbotConfig = {
...cfg,
agent: {
...agent,
@@ -62,11 +62,11 @@ export async function setupCommand(
await writeConfigFile(next);
runtime.log(
!existingRaw.exists
? `Wrote ${CONFIG_PATH_CLAWDIS}`
: `Updated ${CONFIG_PATH_CLAWDIS} (set agent.workspace)`,
? `Wrote ${CONFIG_PATH_CLAWDBOT}`
: `Updated ${CONFIG_PATH_CLAWDBOT} (set agent.workspace)`,
);
} else {
runtime.log(`Config OK: ${CONFIG_PATH_CLAWDIS}`);
runtime.log(`Config OK: ${CONFIG_PATH_CLAWDBOT}`);
}
const ws = await ensureAgentWorkspace({

View File

@@ -132,7 +132,7 @@ export async function installSignalCli(
"https://api.github.com/repos/AsamK/signal-cli/releases/latest";
const response = await fetch(apiUrl, {
headers: {
"User-Agent": "clawdis",
"User-Agent": "clawdbot",
Accept: "application/vnd.github+json",
},
});
@@ -158,7 +158,7 @@ export async function installSignalCli(
};
}
const tmpDir = await fs.mkdtemp(path.join(os.tmpdir(), "clawdis-signal-"));
const tmpDir = await fs.mkdtemp(path.join(os.tmpdir(), "clawdbot-signal-"));
const archivePath = path.join(tmpDir, assetName);
runtime.log(`Downloading signal-cli ${version} (${assetName})…`);