refactor: rename clawdbot to moltbot with legacy compat

This commit is contained in:
Peter Steinberger
2026-01-27 12:19:58 +00:00
parent 83460df96f
commit 6d16a658e5
1839 changed files with 11250 additions and 11199 deletions

View File

@@ -3,37 +3,37 @@
## 2026.1.23
### Changes
- Version alignment with core Clawdbot release numbers.
- Version alignment with core Moltbot release numbers.
## 2026.1.22
### Changes
- Version alignment with core Clawdbot release numbers.
- Version alignment with core Moltbot release numbers.
## 2026.1.21
### Changes
- Version alignment with core Clawdbot release numbers.
- Version alignment with core Moltbot release numbers.
## 2026.1.20
### Changes
- Version alignment with core Clawdbot release numbers.
- Version alignment with core Moltbot release numbers.
## 2026.1.17-1
### Changes
- Version alignment with core Clawdbot release numbers.
- Version alignment with core Moltbot release numbers.
## 2026.1.17
### Changes
- Version alignment with core Clawdbot release numbers.
- Version alignment with core Moltbot release numbers.
## 2026.1.16
### Changes
- Version alignment with core Clawdbot release numbers.
- Version alignment with core Moltbot release numbers.
## 2026.1.15

View File

@@ -1,4 +1,4 @@
import type { ClawdbotPluginApi } from "clawdbot/plugin-sdk";
import type { MoltbotPluginApi } from "clawdbot/plugin-sdk";
import { emptyPluginConfigSchema } from "clawdbot/plugin-sdk";
import { msteamsPlugin } from "./src/channel.js";
@@ -9,7 +9,7 @@ const plugin = {
name: "Microsoft Teams",
description: "Microsoft Teams channel plugin (Bot Framework)",
configSchema: emptyPluginConfigSchema(),
register(api: ClawdbotPluginApi) {
register(api: MoltbotPluginApi) {
setMSTeamsRuntime(api.runtime);
api.registerChannel({ plugin: msteamsPlugin });
},

View File

@@ -2,8 +2,8 @@
"name": "@moltbot/msteams",
"version": "2026.1.26",
"type": "module",
"description": "Clawdbot Microsoft Teams channel plugin",
"clawdbot": {
"description": "Moltbot Microsoft Teams channel plugin",
"moltbot": {
"extensions": [
"./index.ts"
],
@@ -29,7 +29,7 @@
"@microsoft/agents-hosting": "^1.2.2",
"@microsoft/agents-hosting-express": "^1.2.2",
"@microsoft/agents-hosting-extensions-teams": "^1.2.2",
"clawdbot": "workspace:*",
"moltbot": "workspace:*",
"express": "^5.2.1",
"proper-lockfile": "^4.1.2"
}

View File

@@ -1,6 +1,6 @@
import { describe, expect, it } from "vitest";
import type { ClawdbotConfig } from "clawdbot/plugin-sdk";
import type { MoltbotConfig } from "clawdbot/plugin-sdk";
import { msteamsPlugin } from "./channel.js";
@@ -21,7 +21,7 @@ describe("msteams directory", () => {
},
},
},
} as unknown as ClawdbotConfig;
} as unknown as MoltbotConfig;
expect(msteamsPlugin.directory).toBeTruthy();
expect(msteamsPlugin.directory?.listPeers).toBeTruthy();

View File

@@ -1,4 +1,4 @@
import type { ChannelMessageActionName, ChannelPlugin, ClawdbotConfig } from "clawdbot/plugin-sdk";
import type { ChannelMessageActionName, ChannelPlugin, MoltbotConfig } from "clawdbot/plugin-sdk";
import {
buildChannelConfigSchema,
DEFAULT_ACCOUNT_ID,
@@ -102,7 +102,7 @@ export const msteamsPlugin: ChannelPlugin<ResolvedMSTeamsAccount> = {
},
}),
deleteAccount: ({ cfg }) => {
const next = { ...cfg } as ClawdbotConfig;
const next = { ...cfg } as MoltbotConfig;
const nextChannels = { ...cfg.channels };
delete nextChannels.msteams;
if (Object.keys(nextChannels).length > 0) {

View File

@@ -26,7 +26,7 @@ describe("msteams conversation store (fs)", () => {
});
it("filters and prunes expired entries (but keeps legacy ones)", async () => {
const stateDir = await fs.promises.mkdtemp(path.join(os.tmpdir(), "clawdbot-msteams-store-"));
const stateDir = await fs.promises.mkdtemp(path.join(os.tmpdir(), "moltbot-msteams-store-"));
const env: NodeJS.ProcessEnv = {
...process.env,

View File

@@ -36,8 +36,8 @@ export async function uploadToOneDrive(params: {
const fetchFn = params.fetchFn ?? fetch;
const token = await params.tokenProvider.getAccessToken(GRAPH_SCOPE);
// Use "ClawdbotShared" folder to organize bot-uploaded files
const uploadPath = `/ClawdbotShared/${encodeURIComponent(params.filename)}`;
// Use "MoltbotShared" folder to organize bot-uploaded files
const uploadPath = `/MoltbotShared/${encodeURIComponent(params.filename)}`;
const res = await fetchFn(`${GRAPH_ROOT}/me/drive/root:${uploadPath}:/content`, {
method: "PUT",
@@ -179,8 +179,8 @@ export async function uploadToSharePoint(params: {
const fetchFn = params.fetchFn ?? fetch;
const token = await params.tokenProvider.getAccessToken(GRAPH_SCOPE);
// Use "ClawdbotShared" folder to organize bot-uploaded files
const uploadPath = `/ClawdbotShared/${encodeURIComponent(params.filename)}`;
// Use "MoltbotShared" folder to organize bot-uploaded files
const uploadPath = `/MoltbotShared/${encodeURIComponent(params.filename)}`;
const res = await fetchFn(`${GRAPH_ROOT}/sites/${params.siteId}/drive/root:${uploadPath}:/content`, {
method: "PUT",

View File

@@ -1,4 +1,4 @@
import type { ClawdbotConfig, RuntimeEnv } from "clawdbot/plugin-sdk";
import type { MoltbotConfig, RuntimeEnv } from "clawdbot/plugin-sdk";
import type { MSTeamsConversationStore } from "./conversation-store.js";
import {
buildFileInfoCard,
@@ -27,7 +27,7 @@ export type MSTeamsActivityHandler = {
};
export type MSTeamsMessageHandlerDeps = {
cfg: ClawdbotConfig;
cfg: MoltbotConfig;
runtime: RuntimeEnv;
appId: string;
adapter: MSTeamsAdapter;

View File

@@ -2,7 +2,7 @@ import type { Request, Response } from "express";
import {
mergeAllowlist,
summarizeMapping,
type ClawdbotConfig,
type MoltbotConfig,
type RuntimeEnv,
} from "clawdbot/plugin-sdk";
import type { MSTeamsConversationStore } from "./conversation-store.js";
@@ -20,7 +20,7 @@ import { resolveMSTeamsCredentials } from "./token.js";
import { getMSTeamsRuntime } from "./runtime.js";
export type MonitorMSTeamsOpts = {
cfg: ClawdbotConfig;
cfg: MoltbotConfig;
runtime?: RuntimeEnv;
abortSignal?: AbortSignal;
conversationStore?: MSTeamsConversationStore;

View File

@@ -1,7 +1,7 @@
import type {
ChannelOnboardingAdapter,
ChannelOnboardingDmPolicy,
ClawdbotConfig,
MoltbotConfig,
DmPolicy,
WizardPrompter,
} from "clawdbot/plugin-sdk";
@@ -21,7 +21,7 @@ import {
const channel = "msteams" as const;
function setMSTeamsDmPolicy(cfg: ClawdbotConfig, dmPolicy: DmPolicy) {
function setMSTeamsDmPolicy(cfg: MoltbotConfig, dmPolicy: DmPolicy) {
const allowFrom =
dmPolicy === "open"
? addWildcardAllowFrom(cfg.channels?.msteams?.allowFrom)?.map((entry) => String(entry))
@@ -39,7 +39,7 @@ function setMSTeamsDmPolicy(cfg: ClawdbotConfig, dmPolicy: DmPolicy) {
};
}
function setMSTeamsAllowFrom(cfg: ClawdbotConfig, allowFrom: string[]): ClawdbotConfig {
function setMSTeamsAllowFrom(cfg: MoltbotConfig, allowFrom: string[]): MoltbotConfig {
return {
...cfg,
channels: {
@@ -64,9 +64,9 @@ function looksLikeGuid(value: string): boolean {
}
async function promptMSTeamsAllowFrom(params: {
cfg: ClawdbotConfig;
cfg: MoltbotConfig;
prompter: WizardPrompter;
}): Promise<ClawdbotConfig> {
}): Promise<MoltbotConfig> {
const existing = params.cfg.channels?.msteams?.allowFrom ?? [];
await params.prompter.note(
[
@@ -144,9 +144,9 @@ async function noteMSTeamsCredentialHelp(prompter: WizardPrompter): Promise<void
}
function setMSTeamsGroupPolicy(
cfg: ClawdbotConfig,
cfg: MoltbotConfig,
groupPolicy: "open" | "allowlist" | "disabled",
): ClawdbotConfig {
): MoltbotConfig {
return {
...cfg,
channels: {
@@ -161,9 +161,9 @@ function setMSTeamsGroupPolicy(
}
function setMSTeamsTeamsAllowlist(
cfg: ClawdbotConfig,
cfg: MoltbotConfig,
entries: Array<{ teamKey: string; channelKey?: string }>,
): ClawdbotConfig {
): MoltbotConfig {
const baseTeams = cfg.channels?.msteams?.teams ?? {};
const teams: Record<string, { channels?: Record<string, unknown> }> = { ...baseTeams };
for (const entry of entries) {

View File

@@ -8,7 +8,7 @@ import { createMSTeamsPollStoreFs } from "./polls.js";
import { createMSTeamsPollStoreMemory } from "./polls-store-memory.js";
const createFsStore = async () => {
const stateDir = await fs.promises.mkdtemp(path.join(os.tmpdir(), "clawdbot-msteams-polls-"));
const stateDir = await fs.promises.mkdtemp(path.join(os.tmpdir(), "moltbot-msteams-polls-"));
return createMSTeamsPollStoreFs({ stateDir });
};

View File

@@ -39,7 +39,7 @@ describe("msteams polls", () => {
it("extracts poll votes from activity values", () => {
const vote = extractMSTeamsPollVote({
value: {
clawdbotPollId: "poll-1",
moltbotPollId: "poll-1",
choices: "0,1",
},
});
@@ -51,7 +51,7 @@ describe("msteams polls", () => {
});
it("stores and records poll votes", async () => {
const home = await fs.promises.mkdtemp(path.join(os.tmpdir(), "clawdbot-msteams-polls-"));
const home = await fs.promises.mkdtemp(path.join(os.tmpdir(), "moltbot-msteams-polls-"));
const store = createMSTeamsPollStoreFs({ homedir: () => home });
await store.createPoll({
id: "poll-2",

View File

@@ -97,13 +97,13 @@ export function extractMSTeamsPollVote(
const value = activity?.value;
if (!value || !isRecord(value)) return null;
const pollId =
readNestedString(value, ["clawdbotPollId"]) ??
readNestedString(value, ["moltbotPollId"]) ??
readNestedString(value, ["pollId"]) ??
readNestedString(value, ["clawdbot", "pollId"]) ??
readNestedString(value, ["clawdbot", "poll", "id"]) ??
readNestedString(value, ["data", "clawdbotPollId"]) ??
readNestedString(value, ["moltbot", "pollId"]) ??
readNestedString(value, ["moltbot", "poll", "id"]) ??
readNestedString(value, ["data", "moltbotPollId"]) ??
readNestedString(value, ["data", "pollId"]) ??
readNestedString(value, ["data", "clawdbot", "pollId"]);
readNestedString(value, ["data", "moltbot", "pollId"]);
if (!pollId) return null;
const directSelections = extractSelections(value.choices);
@@ -176,13 +176,13 @@ export function buildMSTeamsPollCard(params: {
type: "Action.Submit",
title: "Vote",
data: {
clawdbotPollId: pollId,
moltbotPollId: pollId,
},
msteams: {
type: "messageBack",
text: "clawdbot poll vote",
text: "moltbot poll vote",
displayText: "Vote recorded",
value: { clawdbotPollId: pollId },
value: { moltbotPollId: pollId },
},
},
],

View File

@@ -3,7 +3,7 @@ import {
createTypingCallbacks,
logTypingFailure,
resolveChannelMediaMaxBytes,
type ClawdbotConfig,
type MoltbotConfig,
type MSTeamsReplyStyle,
type RuntimeEnv,
} from "clawdbot/plugin-sdk";
@@ -24,7 +24,7 @@ import type { MSTeamsTurnContext } from "./sdk-types.js";
import { getMSTeamsRuntime } from "./runtime.js";
export function createMSTeamsReplyDispatcher(params: {
cfg: ClawdbotConfig;
cfg: MoltbotConfig;
agentId: string;
runtime: RuntimeEnv;
log: MSTeamsMonitorLogger;

View File

@@ -1,4 +1,4 @@
import { resolveChannelMediaMaxBytes, type ClawdbotConfig, type PluginRuntime } from "clawdbot/plugin-sdk";
import { resolveChannelMediaMaxBytes, type MoltbotConfig, type PluginRuntime } from "clawdbot/plugin-sdk";
import type { MSTeamsAccessTokenProvider } from "./attachments/types.js";
import type {
MSTeamsConversationStore,
@@ -84,7 +84,7 @@ async function findConversationReference(recipient: {
}
export async function resolveMSTeamsSendContext(params: {
cfg: ClawdbotConfig;
cfg: MoltbotConfig;
to: string;
}): Promise<MSTeamsProactiveContext> {
const msteamsCfg = params.cfg.channels?.msteams;

View File

@@ -1,5 +1,5 @@
import { loadWebMedia, resolveChannelMediaMaxBytes } from "clawdbot/plugin-sdk";
import type { ClawdbotConfig } from "clawdbot/plugin-sdk";
import type { MoltbotConfig } from "clawdbot/plugin-sdk";
import { createMSTeamsConversationStoreFs } from "./conversation-store-fs.js";
import {
classifyMSTeamsSendError,
@@ -21,7 +21,7 @@ import { resolveMSTeamsSendContext, type MSTeamsProactiveContext } from "./send-
export type SendMSTeamsMessageParams = {
/** Full config (for credentials) */
cfg: ClawdbotConfig;
cfg: MoltbotConfig;
/** Conversation ID or user ID to send to */
to: string;
/** Message text */
@@ -48,7 +48,7 @@ const MSTEAMS_MAX_MEDIA_BYTES = 100 * 1024 * 1024;
export type SendMSTeamsPollParams = {
/** Full config (for credentials) */
cfg: ClawdbotConfig;
cfg: MoltbotConfig;
/** Conversation ID or user ID to send to */
to: string;
/** Poll question */
@@ -67,7 +67,7 @@ export type SendMSTeamsPollResult = {
export type SendMSTeamsCardParams = {
/** Full config (for credentials) */
cfg: ClawdbotConfig;
cfg: MoltbotConfig;
/** Conversation ID or user ID to send to */
to: string;
/** Adaptive Card JSON object */