chore: full rebrand clawdbot -> moltbot
- Replace all CLAWDBOT_* env vars with MOLTBOT_* - Replace all .clawdbot paths with .moltbot - Update daemon labels to bot.molt.* - Update plugin SDK imports to moltbot/plugin-sdk - Remove clawdbot bin alias from package.json - Preserve legacy compatibility in compat/legacy-names.ts
This commit is contained in:
parent
699784dbee
commit
a0ea122d92
@ -1,5 +1,5 @@
|
||||
import type { MoltbotPluginApi } from "clawdbot/plugin-sdk";
|
||||
import { emptyPluginConfigSchema } from "clawdbot/plugin-sdk";
|
||||
import type { MoltbotPluginApi } from "moltbot/plugin-sdk";
|
||||
import { emptyPluginConfigSchema } from "moltbot/plugin-sdk";
|
||||
|
||||
import { bluebubblesPlugin } from "./src/channel.js";
|
||||
import { handleBlueBubblesWebhookRequest } from "./src/monitor.js";
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import type { MoltbotConfig } from "clawdbot/plugin-sdk";
|
||||
import { DEFAULT_ACCOUNT_ID, normalizeAccountId } from "clawdbot/plugin-sdk";
|
||||
import type { MoltbotConfig } from "moltbot/plugin-sdk";
|
||||
import { DEFAULT_ACCOUNT_ID, normalizeAccountId } from "moltbot/plugin-sdk";
|
||||
import { normalizeBlueBubblesServerUrl, type BlueBubblesAccountConfig } from "./types.js";
|
||||
|
||||
export type ResolvedBlueBubblesAccount = {
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
import { describe, expect, it, vi, beforeEach } from "vitest";
|
||||
|
||||
import { bluebubblesMessageActions } from "./actions.js";
|
||||
import type { MoltbotConfig } from "clawdbot/plugin-sdk";
|
||||
import type { MoltbotConfig } from "moltbot/plugin-sdk";
|
||||
|
||||
vi.mock("./accounts.js", () => ({
|
||||
resolveBlueBubblesAccount: vi.fn(({ cfg, accountId }) => {
|
||||
|
||||
@ -10,7 +10,7 @@ import {
|
||||
type ChannelMessageActionName,
|
||||
type ChannelToolSend,
|
||||
type MoltbotConfig,
|
||||
} from "clawdbot/plugin-sdk";
|
||||
} from "moltbot/plugin-sdk";
|
||||
|
||||
import { resolveBlueBubblesAccount } from "./accounts.js";
|
||||
import { resolveBlueBubblesMessageId } from "./monitor.js";
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
import crypto from "node:crypto";
|
||||
import path from "node:path";
|
||||
import type { MoltbotConfig } from "clawdbot/plugin-sdk";
|
||||
import type { MoltbotConfig } from "moltbot/plugin-sdk";
|
||||
import { resolveBlueBubblesAccount } from "./accounts.js";
|
||||
import { resolveChatGuidForTarget } from "./send.js";
|
||||
import { parseBlueBubblesTarget, normalizeBlueBubblesHandle } from "./targets.js";
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import type { ChannelAccountSnapshot, ChannelPlugin, MoltbotConfig } from "clawdbot/plugin-sdk";
|
||||
import type { ChannelAccountSnapshot, ChannelPlugin, MoltbotConfig } from "moltbot/plugin-sdk";
|
||||
import {
|
||||
applyAccountNameToChannelSection,
|
||||
buildChannelConfigSchema,
|
||||
@ -12,7 +12,7 @@ import {
|
||||
resolveBlueBubblesGroupRequireMention,
|
||||
resolveBlueBubblesGroupToolPolicy,
|
||||
setAccountEnabledInConfigSection,
|
||||
} from "clawdbot/plugin-sdk";
|
||||
} from "moltbot/plugin-sdk";
|
||||
|
||||
import {
|
||||
listBlueBubblesAccountIds,
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
import crypto from "node:crypto";
|
||||
import { resolveBlueBubblesAccount } from "./accounts.js";
|
||||
import type { MoltbotConfig } from "clawdbot/plugin-sdk";
|
||||
import type { MoltbotConfig } from "moltbot/plugin-sdk";
|
||||
import { blueBubblesFetchWithTimeout, buildBlueBubblesApiUrl } from "./types.js";
|
||||
|
||||
export type BlueBubblesChatOpts = {
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import { MarkdownConfigSchema, ToolPolicySchema } from "clawdbot/plugin-sdk";
|
||||
import { MarkdownConfigSchema, ToolPolicySchema } from "moltbot/plugin-sdk";
|
||||
import { z } from "zod";
|
||||
|
||||
const allowFromEntry = z.union([z.string(), z.number()]);
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
import path from "node:path";
|
||||
import { fileURLToPath } from "node:url";
|
||||
|
||||
import { resolveChannelMediaMaxBytes, type MoltbotConfig } from "clawdbot/plugin-sdk";
|
||||
import { resolveChannelMediaMaxBytes, type MoltbotConfig } from "moltbot/plugin-sdk";
|
||||
|
||||
import { sendBlueBubblesAttachment } from "./attachments.js";
|
||||
import { resolveBlueBubblesMessageId } from "./monitor.js";
|
||||
|
||||
@ -2,8 +2,8 @@ import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
|
||||
import type { IncomingMessage, ServerResponse } from "node:http";
|
||||
import { EventEmitter } from "node:events";
|
||||
|
||||
import { removeAckReactionAfterReply, shouldAckReaction } from "clawdbot/plugin-sdk";
|
||||
import type { MoltbotConfig, PluginRuntime } from "clawdbot/plugin-sdk";
|
||||
import { removeAckReactionAfterReply, shouldAckReaction } from "moltbot/plugin-sdk";
|
||||
import type { MoltbotConfig, PluginRuntime } from "moltbot/plugin-sdk";
|
||||
import {
|
||||
handleBlueBubblesWebhookRequest,
|
||||
registerBlueBubblesWebhookTarget,
|
||||
|
||||
@ -1,13 +1,13 @@
|
||||
import type { IncomingMessage, ServerResponse } from "node:http";
|
||||
|
||||
import type { MoltbotConfig } from "clawdbot/plugin-sdk";
|
||||
import type { MoltbotConfig } from "moltbot/plugin-sdk";
|
||||
import {
|
||||
logAckFailure,
|
||||
logInboundDrop,
|
||||
logTypingFailure,
|
||||
resolveAckReaction,
|
||||
resolveControlCommandGate,
|
||||
} from "clawdbot/plugin-sdk";
|
||||
} from "moltbot/plugin-sdk";
|
||||
import { markBlueBubblesChatRead, sendBlueBubblesTyping } from "./chat.js";
|
||||
import { resolveChatGuidForTarget, sendMessageBlueBubbles } from "./send.js";
|
||||
import { downloadBlueBubblesAttachment } from "./attachments.js";
|
||||
|
||||
@ -4,14 +4,14 @@ import type {
|
||||
MoltbotConfig,
|
||||
DmPolicy,
|
||||
WizardPrompter,
|
||||
} from "clawdbot/plugin-sdk";
|
||||
} from "moltbot/plugin-sdk";
|
||||
import {
|
||||
DEFAULT_ACCOUNT_ID,
|
||||
addWildcardAllowFrom,
|
||||
formatDocsLink,
|
||||
normalizeAccountId,
|
||||
promptAccountId,
|
||||
} from "clawdbot/plugin-sdk";
|
||||
} from "moltbot/plugin-sdk";
|
||||
import {
|
||||
listBlueBubblesAccountIds,
|
||||
resolveBlueBubblesAccount,
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import { resolveBlueBubblesAccount } from "./accounts.js";
|
||||
import type { MoltbotConfig } from "clawdbot/plugin-sdk";
|
||||
import type { MoltbotConfig } from "moltbot/plugin-sdk";
|
||||
import { blueBubblesFetchWithTimeout, buildBlueBubblesApiUrl } from "./types.js";
|
||||
|
||||
export type BlueBubblesReactionOpts = {
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import type { PluginRuntime } from "clawdbot/plugin-sdk";
|
||||
import type { PluginRuntime } from "moltbot/plugin-sdk";
|
||||
|
||||
let runtime: PluginRuntime | null = null;
|
||||
|
||||
|
||||
@ -6,7 +6,7 @@ import {
|
||||
normalizeBlueBubblesHandle,
|
||||
parseBlueBubblesTarget,
|
||||
} from "./targets.js";
|
||||
import type { MoltbotConfig } from "clawdbot/plugin-sdk";
|
||||
import type { MoltbotConfig } from "moltbot/plugin-sdk";
|
||||
import {
|
||||
blueBubblesFetchWithTimeout,
|
||||
buildBlueBubblesApiUrl,
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import { emptyPluginConfigSchema } from "clawdbot/plugin-sdk";
|
||||
import { emptyPluginConfigSchema } from "moltbot/plugin-sdk";
|
||||
|
||||
const DEFAULT_BASE_URL = "http://localhost:3000/v1";
|
||||
const DEFAULT_API_KEY = "n/a";
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import type { MoltbotPluginApi } from "clawdbot/plugin-sdk";
|
||||
import { emptyPluginConfigSchema } from "clawdbot/plugin-sdk";
|
||||
import type { MoltbotPluginApi } from "moltbot/plugin-sdk";
|
||||
import { emptyPluginConfigSchema } from "moltbot/plugin-sdk";
|
||||
|
||||
import { createDiagnosticsOtelService } from "./src/service.js";
|
||||
|
||||
|
||||
@ -95,8 +95,8 @@ vi.mock("@opentelemetry/semantic-conventions", () => ({
|
||||
},
|
||||
}));
|
||||
|
||||
vi.mock("clawdbot/plugin-sdk", async () => {
|
||||
const actual = await vi.importActual<typeof import("clawdbot/plugin-sdk")>("clawdbot/plugin-sdk");
|
||||
vi.mock("moltbot/plugin-sdk", async () => {
|
||||
const actual = await vi.importActual<typeof import("moltbot/plugin-sdk")>("moltbot/plugin-sdk");
|
||||
return {
|
||||
...actual,
|
||||
registerLogTransport: registerLogTransportMock,
|
||||
@ -104,7 +104,7 @@ vi.mock("clawdbot/plugin-sdk", async () => {
|
||||
});
|
||||
|
||||
import { createDiagnosticsOtelService } from "./service.js";
|
||||
import { emitDiagnosticEvent } from "clawdbot/plugin-sdk";
|
||||
import { emitDiagnosticEvent } from "moltbot/plugin-sdk";
|
||||
|
||||
describe("diagnostics-otel service", () => {
|
||||
beforeEach(() => {
|
||||
|
||||
@ -10,8 +10,8 @@ import { NodeSDK } from "@opentelemetry/sdk-node";
|
||||
import { ParentBasedSampler, TraceIdRatioBasedSampler } from "@opentelemetry/sdk-trace-base";
|
||||
import { SemanticResourceAttributes } from "@opentelemetry/semantic-conventions";
|
||||
|
||||
import type { MoltbotPluginService, DiagnosticEventPayload } from "clawdbot/plugin-sdk";
|
||||
import { onDiagnosticEvent, registerLogTransport } from "clawdbot/plugin-sdk";
|
||||
import type { MoltbotPluginService, DiagnosticEventPayload } from "moltbot/plugin-sdk";
|
||||
import { onDiagnosticEvent, registerLogTransport } from "moltbot/plugin-sdk";
|
||||
|
||||
const DEFAULT_SERVICE_NAME = "moltbot";
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import type { MoltbotPluginApi } from "clawdbot/plugin-sdk";
|
||||
import { emptyPluginConfigSchema } from "clawdbot/plugin-sdk";
|
||||
import type { MoltbotPluginApi } from "moltbot/plugin-sdk";
|
||||
import { emptyPluginConfigSchema } from "moltbot/plugin-sdk";
|
||||
|
||||
import { discordPlugin } from "./src/channel.js";
|
||||
import { setDiscordRuntime } from "./src/runtime.js";
|
||||
|
||||
@ -25,7 +25,7 @@ import {
|
||||
type ChannelMessageActionAdapter,
|
||||
type ChannelPlugin,
|
||||
type ResolvedDiscordAccount,
|
||||
} from "clawdbot/plugin-sdk";
|
||||
} from "moltbot/plugin-sdk";
|
||||
|
||||
import { getDiscordRuntime } from "./runtime.js";
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import type { PluginRuntime } from "clawdbot/plugin-sdk";
|
||||
import type { PluginRuntime } from "moltbot/plugin-sdk";
|
||||
|
||||
let runtime: PluginRuntime | null = null;
|
||||
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
import { createHash, randomBytes } from "node:crypto";
|
||||
import { readFileSync } from "node:fs";
|
||||
import { createServer } from "node:http";
|
||||
import { emptyPluginConfigSchema } from "clawdbot/plugin-sdk";
|
||||
import { emptyPluginConfigSchema } from "moltbot/plugin-sdk";
|
||||
|
||||
// OAuth constants - decoded from pi-ai's base64 encoded values to stay in sync
|
||||
const decode = (s: string) => Buffer.from(s, "base64").toString();
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import { emptyPluginConfigSchema } from "clawdbot/plugin-sdk";
|
||||
import { emptyPluginConfigSchema } from "moltbot/plugin-sdk";
|
||||
|
||||
import { loginGeminiCliOAuth } from "./oauth.js";
|
||||
|
||||
@ -6,8 +6,8 @@ const PROVIDER_ID = "google-gemini-cli";
|
||||
const PROVIDER_LABEL = "Gemini CLI OAuth";
|
||||
const DEFAULT_MODEL = "google-gemini-cli/gemini-3-pro-preview";
|
||||
const ENV_VARS = [
|
||||
"CLAWDBOT_GEMINI_OAUTH_CLIENT_ID",
|
||||
"CLAWDBOT_GEMINI_OAUTH_CLIENT_SECRET",
|
||||
"MOLTBOT_GEMINI_OAUTH_CLIENT_ID",
|
||||
"MOLTBOT_GEMINI_OAUTH_CLIENT_SECRET",
|
||||
"GEMINI_CLI_OAUTH_CLIENT_ID",
|
||||
"GEMINI_CLI_OAUTH_CLIENT_SECRET",
|
||||
];
|
||||
|
||||
@ -3,9 +3,9 @@ import { existsSync, readFileSync, readdirSync, realpathSync } from "node:fs";
|
||||
import { createServer } from "node:http";
|
||||
import { delimiter, dirname, join } from "node:path";
|
||||
|
||||
const CLIENT_ID_KEYS = ["CLAWDBOT_GEMINI_OAUTH_CLIENT_ID", "GEMINI_CLI_OAUTH_CLIENT_ID"];
|
||||
const CLIENT_ID_KEYS = ["MOLTBOT_GEMINI_OAUTH_CLIENT_ID", "GEMINI_CLI_OAUTH_CLIENT_ID"];
|
||||
const CLIENT_SECRET_KEYS = [
|
||||
"CLAWDBOT_GEMINI_OAUTH_CLIENT_SECRET",
|
||||
"MOLTBOT_GEMINI_OAUTH_CLIENT_SECRET",
|
||||
"GEMINI_CLI_OAUTH_CLIENT_SECRET",
|
||||
];
|
||||
const REDIRECT_URI = "http://localhost:8085/oauth2callback";
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import type { MoltbotPluginApi } from "clawdbot/plugin-sdk";
|
||||
import { emptyPluginConfigSchema } from "clawdbot/plugin-sdk";
|
||||
import type { MoltbotPluginApi } from "moltbot/plugin-sdk";
|
||||
import { emptyPluginConfigSchema } from "moltbot/plugin-sdk";
|
||||
|
||||
import { googlechatDock, googlechatPlugin } from "./src/channel.js";
|
||||
import { handleGoogleChatWebhookRequest } from "./src/monitor.js";
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import type { MoltbotConfig } from "clawdbot/plugin-sdk";
|
||||
import { DEFAULT_ACCOUNT_ID, normalizeAccountId } from "clawdbot/plugin-sdk";
|
||||
import type { MoltbotConfig } from "moltbot/plugin-sdk";
|
||||
import { DEFAULT_ACCOUNT_ID, normalizeAccountId } from "moltbot/plugin-sdk";
|
||||
|
||||
import type { GoogleChatAccountConfig, GoogleChatConfig } from "./types.config.js";
|
||||
|
||||
|
||||
@ -2,14 +2,14 @@ import type {
|
||||
ChannelMessageActionAdapter,
|
||||
ChannelMessageActionName,
|
||||
MoltbotConfig,
|
||||
} from "clawdbot/plugin-sdk";
|
||||
} from "moltbot/plugin-sdk";
|
||||
import {
|
||||
createActionGate,
|
||||
jsonResult,
|
||||
readNumberParam,
|
||||
readReactionParams,
|
||||
readStringParam,
|
||||
} from "clawdbot/plugin-sdk";
|
||||
} from "moltbot/plugin-sdk";
|
||||
|
||||
import { listEnabledGoogleChatAccounts, resolveGoogleChatAccount } from "./accounts.js";
|
||||
import {
|
||||
|
||||
@ -16,8 +16,8 @@ import {
|
||||
type ChannelMessageActionAdapter,
|
||||
type ChannelPlugin,
|
||||
type MoltbotConfig,
|
||||
} from "clawdbot/plugin-sdk";
|
||||
import { GoogleChatConfigSchema } from "clawdbot/plugin-sdk";
|
||||
} from "moltbot/plugin-sdk";
|
||||
import { GoogleChatConfigSchema } from "moltbot/plugin-sdk";
|
||||
|
||||
import {
|
||||
listGoogleChatAccountIds,
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
import type { IncomingMessage, ServerResponse } from "node:http";
|
||||
|
||||
import type { MoltbotConfig } from "clawdbot/plugin-sdk";
|
||||
import { resolveMentionGatingWithBypass } from "clawdbot/plugin-sdk";
|
||||
import type { MoltbotConfig } from "moltbot/plugin-sdk";
|
||||
import { resolveMentionGatingWithBypass } from "moltbot/plugin-sdk";
|
||||
|
||||
import {
|
||||
type ResolvedGoogleChatAccount
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import type { MoltbotConfig, DmPolicy } from "clawdbot/plugin-sdk";
|
||||
import type { MoltbotConfig, DmPolicy } from "moltbot/plugin-sdk";
|
||||
import {
|
||||
addWildcardAllowFrom,
|
||||
formatDocsLink,
|
||||
@ -9,7 +9,7 @@ import {
|
||||
DEFAULT_ACCOUNT_ID,
|
||||
normalizeAccountId,
|
||||
migrateBaseNameToDefaultAccount,
|
||||
} from "clawdbot/plugin-sdk";
|
||||
} from "moltbot/plugin-sdk";
|
||||
|
||||
import {
|
||||
listGoogleChatAccountIds,
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import type { PluginRuntime } from "clawdbot/plugin-sdk";
|
||||
import type { PluginRuntime } from "moltbot/plugin-sdk";
|
||||
|
||||
let runtime: PluginRuntime | null = null;
|
||||
|
||||
|
||||
@ -1,3 +1,3 @@
|
||||
import type { GoogleChatAccountConfig, GoogleChatConfig } from "clawdbot/plugin-sdk";
|
||||
import type { GoogleChatAccountConfig, GoogleChatConfig } from "moltbot/plugin-sdk";
|
||||
|
||||
export type { GoogleChatAccountConfig, GoogleChatConfig };
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import type { MoltbotPluginApi } from "clawdbot/plugin-sdk";
|
||||
import { emptyPluginConfigSchema } from "clawdbot/plugin-sdk";
|
||||
import type { MoltbotPluginApi } from "moltbot/plugin-sdk";
|
||||
import { emptyPluginConfigSchema } from "moltbot/plugin-sdk";
|
||||
|
||||
import { imessagePlugin } from "./src/channel.js";
|
||||
import { setIMessageRuntime } from "./src/runtime.js";
|
||||
|
||||
@ -21,7 +21,7 @@ import {
|
||||
setAccountEnabledInConfigSection,
|
||||
type ChannelPlugin,
|
||||
type ResolvedIMessageAccount,
|
||||
} from "clawdbot/plugin-sdk";
|
||||
} from "moltbot/plugin-sdk";
|
||||
|
||||
import { getIMessageRuntime } from "./runtime.js";
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import type { PluginRuntime } from "clawdbot/plugin-sdk";
|
||||
import type { PluginRuntime } from "moltbot/plugin-sdk";
|
||||
|
||||
let runtime: PluginRuntime | null = null;
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import type { MoltbotPluginApi } from "clawdbot/plugin-sdk";
|
||||
import { emptyPluginConfigSchema } from "clawdbot/plugin-sdk";
|
||||
import type { MoltbotPluginApi } from "moltbot/plugin-sdk";
|
||||
import { emptyPluginConfigSchema } from "moltbot/plugin-sdk";
|
||||
|
||||
import { linePlugin } from "./src/channel.js";
|
||||
import { registerLineCardCommand } from "./src/card-command.js";
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import type { MoltbotPluginApi, LineChannelData, ReplyPayload } from "clawdbot/plugin-sdk";
|
||||
import type { MoltbotPluginApi, LineChannelData, ReplyPayload } from "moltbot/plugin-sdk";
|
||||
import {
|
||||
createActionCard,
|
||||
createImageCard,
|
||||
@ -7,7 +7,7 @@ import {
|
||||
createReceiptCard,
|
||||
type CardAction,
|
||||
type ListItem,
|
||||
} from "clawdbot/plugin-sdk";
|
||||
} from "moltbot/plugin-sdk";
|
||||
|
||||
const CARD_USAGE = `Usage: /card <type> "title" "body" [options]
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import { beforeEach, describe, expect, it, vi } from "vitest";
|
||||
import type { MoltbotConfig, PluginRuntime } from "clawdbot/plugin-sdk";
|
||||
import type { MoltbotConfig, PluginRuntime } from "moltbot/plugin-sdk";
|
||||
import { linePlugin } from "./channel.js";
|
||||
import { setLineRuntime } from "./runtime.js";
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import { describe, expect, it, vi } from "vitest";
|
||||
import type { MoltbotConfig, PluginRuntime } from "clawdbot/plugin-sdk";
|
||||
import type { MoltbotConfig, PluginRuntime } from "moltbot/plugin-sdk";
|
||||
import { linePlugin } from "./channel.js";
|
||||
import { setLineRuntime } from "./runtime.js";
|
||||
|
||||
|
||||
@ -8,7 +8,7 @@ import {
|
||||
type LineConfig,
|
||||
type LineChannelData,
|
||||
type ResolvedLineAccount,
|
||||
} from "clawdbot/plugin-sdk";
|
||||
} from "moltbot/plugin-sdk";
|
||||
|
||||
import { getLineRuntime } from "./runtime.js";
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import type { PluginRuntime } from "clawdbot/plugin-sdk";
|
||||
import type { PluginRuntime } from "moltbot/plugin-sdk";
|
||||
|
||||
let runtime: PluginRuntime | null = null;
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import type { MoltbotPluginApi } from "clawdbot/plugin-sdk";
|
||||
import { emptyPluginConfigSchema } from "clawdbot/plugin-sdk";
|
||||
import type { MoltbotPluginApi } from "moltbot/plugin-sdk";
|
||||
import { emptyPluginConfigSchema } from "moltbot/plugin-sdk";
|
||||
|
||||
import { matrixPlugin } from "./src/channel.js";
|
||||
import { setMatrixRuntime } from "./src/runtime.js";
|
||||
|
||||
@ -6,7 +6,7 @@ import {
|
||||
type ChannelMessageActionContext,
|
||||
type ChannelMessageActionName,
|
||||
type ChannelToolSend,
|
||||
} from "clawdbot/plugin-sdk";
|
||||
} from "moltbot/plugin-sdk";
|
||||
import { resolveMatrixAccount } from "./matrix/accounts.js";
|
||||
import { handleMatrixAction } from "./tool-actions.js";
|
||||
import type { CoreConfig } from "./types.js";
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
import { beforeEach, describe, expect, it } from "vitest";
|
||||
|
||||
import type { PluginRuntime } from "clawdbot/plugin-sdk";
|
||||
import type { PluginRuntime } from "moltbot/plugin-sdk";
|
||||
import type { CoreConfig } from "./types.js";
|
||||
|
||||
import { matrixPlugin } from "./channel.js";
|
||||
|
||||
@ -8,7 +8,7 @@ import {
|
||||
PAIRING_APPROVED_MESSAGE,
|
||||
setAccountEnabledInConfigSection,
|
||||
type ChannelPlugin,
|
||||
} from "clawdbot/plugin-sdk";
|
||||
} from "moltbot/plugin-sdk";
|
||||
|
||||
import { matrixMessageActions } from "./actions.js";
|
||||
import { MatrixConfigSchema } from "./config-schema.js";
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import { MarkdownConfigSchema, ToolPolicySchema } from "clawdbot/plugin-sdk";
|
||||
import { MarkdownConfigSchema, ToolPolicySchema } from "moltbot/plugin-sdk";
|
||||
import { z } from "zod";
|
||||
|
||||
const allowFromEntry = z.union([z.string(), z.number()]);
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import type { ChannelDirectoryEntry } from "clawdbot/plugin-sdk";
|
||||
import type { ChannelDirectoryEntry } from "moltbot/plugin-sdk";
|
||||
|
||||
import { resolveMatrixAuth } from "./matrix/client.js";
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import type { ChannelGroupContext, GroupToolPolicyConfig } from "clawdbot/plugin-sdk";
|
||||
import type { ChannelGroupContext, GroupToolPolicyConfig } from "moltbot/plugin-sdk";
|
||||
|
||||
import { resolveMatrixRoomConfig } from "./matrix/monitor/rooms.js";
|
||||
import type { CoreConfig } from "./types.js";
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import { DEFAULT_ACCOUNT_ID, normalizeAccountId } from "clawdbot/plugin-sdk";
|
||||
import { DEFAULT_ACCOUNT_ID, normalizeAccountId } from "moltbot/plugin-sdk";
|
||||
import type { CoreConfig, MatrixConfig } from "../types.js";
|
||||
import { resolveMatrixConfig } from "./client.js";
|
||||
import { credentialsMatchConfig, loadMatrixCredentials } from "./credentials.js";
|
||||
|
||||
@ -22,7 +22,7 @@ export async function resolveActionClient(
|
||||
if (opts.client) return { client: opts.client, stopOnDone: false };
|
||||
const active = getActiveMatrixClient();
|
||||
if (active) return { client: active, stopOnDone: false };
|
||||
const shouldShareClient = Boolean(process.env.CLAWDBOT_GATEWAY_PORT);
|
||||
const shouldShareClient = Boolean(process.env.MOLTBOT_GATEWAY_PORT);
|
||||
if (shouldShareClient) {
|
||||
const client = await resolveSharedMatrixClient({
|
||||
cfg: getMatrixRuntime().config.loadConfig() as CoreConfig,
|
||||
|
||||
@ -3,7 +3,7 @@ import path from "node:path";
|
||||
import { createRequire } from "node:module";
|
||||
import { fileURLToPath } from "node:url";
|
||||
|
||||
import type { RuntimeEnv } from "clawdbot/plugin-sdk";
|
||||
import type { RuntimeEnv } from "moltbot/plugin-sdk";
|
||||
import { getMatrixRuntime } from "../runtime.js";
|
||||
|
||||
const MATRIX_SDK_PACKAGE = "@vector-im/matrix-bot-sdk";
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import type { AllowlistMatch } from "clawdbot/plugin-sdk";
|
||||
import type { AllowlistMatch } from "moltbot/plugin-sdk";
|
||||
|
||||
function normalizeAllowList(list?: Array<string | number>) {
|
||||
return (list ?? []).map((entry) => String(entry).trim()).filter(Boolean);
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
import type { MatrixClient } from "@vector-im/matrix-bot-sdk";
|
||||
import { AutojoinRoomsMixin } from "@vector-im/matrix-bot-sdk";
|
||||
|
||||
import type { RuntimeEnv } from "clawdbot/plugin-sdk";
|
||||
import type { RuntimeEnv } from "moltbot/plugin-sdk";
|
||||
import type { CoreConfig } from "../../types.js";
|
||||
import { getMatrixRuntime } from "../../runtime.js";
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import type { MatrixClient } from "@vector-im/matrix-bot-sdk";
|
||||
import type { PluginRuntime } from "clawdbot/plugin-sdk";
|
||||
import type { PluginRuntime } from "moltbot/plugin-sdk";
|
||||
|
||||
import type { MatrixAuth } from "../client.js";
|
||||
import type { MatrixRawEvent } from "./types.js";
|
||||
|
||||
@ -8,7 +8,7 @@ import {
|
||||
logTypingFailure,
|
||||
resolveControlCommandGate,
|
||||
type RuntimeEnv,
|
||||
} from "clawdbot/plugin-sdk";
|
||||
} from "moltbot/plugin-sdk";
|
||||
import type { CoreConfig, ReplyToMode } from "../../types.js";
|
||||
import {
|
||||
formatPollAsText,
|
||||
@ -37,7 +37,7 @@ export type MatrixMonitorHandlerParams = {
|
||||
logging: {
|
||||
shouldLogVerbose: () => boolean;
|
||||
};
|
||||
channel: typeof import("clawdbot/plugin-sdk")["channel"];
|
||||
channel: typeof import("moltbot/plugin-sdk")["channel"];
|
||||
system: {
|
||||
enqueueSystemEvent: (
|
||||
text: string,
|
||||
@ -59,7 +59,7 @@ export type MatrixMonitorHandlerParams = {
|
||||
: Record<string, unknown> | undefined
|
||||
: Record<string, unknown> | undefined;
|
||||
mentionRegexes: ReturnType<
|
||||
typeof import("clawdbot/plugin-sdk")["channel"]["mentions"]["buildMentionRegexes"]
|
||||
typeof import("moltbot/plugin-sdk")["channel"]["mentions"]["buildMentionRegexes"]
|
||||
>;
|
||||
groupPolicy: "open" | "allowlist" | "disabled";
|
||||
replyToMode: ReplyToMode;
|
||||
|
||||
@ -4,7 +4,7 @@ import {
|
||||
mergeAllowlist,
|
||||
summarizeMapping,
|
||||
type RuntimeEnv,
|
||||
} from "clawdbot/plugin-sdk";
|
||||
} from "moltbot/plugin-sdk";
|
||||
import type { CoreConfig, ReplyToMode } from "../../types.js";
|
||||
import { setActiveMatrixClient } from "../active-client.js";
|
||||
import {
|
||||
|
||||
@ -4,7 +4,7 @@ import {
|
||||
formatLocationText,
|
||||
toLocationContext,
|
||||
type NormalizedLocation,
|
||||
} from "clawdbot/plugin-sdk";
|
||||
} from "moltbot/plugin-sdk";
|
||||
import { EventType } from "./types.js";
|
||||
|
||||
export type MatrixLocationPayload = {
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
import { beforeEach, describe, expect, it, vi } from "vitest";
|
||||
|
||||
import type { PluginRuntime } from "clawdbot/plugin-sdk";
|
||||
import type { PluginRuntime } from "moltbot/plugin-sdk";
|
||||
import { setMatrixRuntime } from "../../runtime.js";
|
||||
import { downloadMatrixMedia } from "./media.js";
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
import type { MatrixClient } from "@vector-im/matrix-bot-sdk";
|
||||
|
||||
import type { MarkdownTableMode, ReplyPayload, RuntimeEnv } from "clawdbot/plugin-sdk";
|
||||
import type { MarkdownTableMode, ReplyPayload, RuntimeEnv } from "moltbot/plugin-sdk";
|
||||
import { sendMessageMatrix } from "../send.js";
|
||||
import { getMatrixRuntime } from "../../runtime.js";
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import type { MatrixRoomConfig } from "../../types.js";
|
||||
import { buildChannelKeyCandidates, resolveChannelEntryMatch } from "clawdbot/plugin-sdk";
|
||||
import { buildChannelKeyCandidates, resolveChannelEntryMatch } from "moltbot/plugin-sdk";
|
||||
|
||||
export type MatrixRoomConfigResolved = {
|
||||
allowed: boolean;
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
* - m.poll.end - Closes a poll
|
||||
*/
|
||||
|
||||
import type { PollInput } from "clawdbot/plugin-sdk";
|
||||
import type { PollInput } from "moltbot/plugin-sdk";
|
||||
|
||||
export const M_POLL_START = "m.poll.start" as const;
|
||||
export const M_POLL_RESPONSE = "m.poll.response" as const;
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
import { beforeAll, beforeEach, describe, expect, it, vi } from "vitest";
|
||||
|
||||
import type { PluginRuntime } from "clawdbot/plugin-sdk";
|
||||
import type { PluginRuntime } from "moltbot/plugin-sdk";
|
||||
import { setMatrixRuntime } from "../runtime.js";
|
||||
|
||||
vi.mock("@vector-im/matrix-bot-sdk", () => ({
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
import type { MatrixClient } from "@vector-im/matrix-bot-sdk";
|
||||
|
||||
import type { PollInput } from "clawdbot/plugin-sdk";
|
||||
import type { PollInput } from "moltbot/plugin-sdk";
|
||||
import { getMatrixRuntime } from "../runtime.js";
|
||||
import { buildPollStartContent, M_POLL_START } from "./poll-types.js";
|
||||
import { resolveMatrixClient, resolveMediaMaxBytes } from "./send/client.js";
|
||||
|
||||
@ -34,7 +34,7 @@ export async function resolveMatrixClient(opts: {
|
||||
if (opts.client) return { client: opts.client, stopOnDone: false };
|
||||
const active = getActiveMatrixClient();
|
||||
if (active) return { client: active, stopOnDone: false };
|
||||
const shouldShareClient = Boolean(process.env.CLAWDBOT_GATEWAY_PORT);
|
||||
const shouldShareClient = Boolean(process.env.MOLTBOT_GATEWAY_PORT);
|
||||
if (shouldShareClient) {
|
||||
const client = await resolveSharedMatrixClient({
|
||||
timeoutMs: opts.timeoutMs,
|
||||
|
||||
@ -5,7 +5,7 @@ import {
|
||||
type ChannelOnboardingAdapter,
|
||||
type ChannelOnboardingDmPolicy,
|
||||
type WizardPrompter,
|
||||
} from "clawdbot/plugin-sdk";
|
||||
} from "moltbot/plugin-sdk";
|
||||
import { listMatrixDirectoryGroupsLive } from "./directory-live.js";
|
||||
import { listMatrixDirectoryPeersLive } from "./directory-live.js";
|
||||
import { resolveMatrixAccount } from "./matrix/accounts.js";
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import type { ChannelOutboundAdapter } from "clawdbot/plugin-sdk";
|
||||
import type { ChannelOutboundAdapter } from "moltbot/plugin-sdk";
|
||||
|
||||
import { getMatrixRuntime } from "./runtime.js";
|
||||
import { sendMessageMatrix, sendPollMatrix } from "./matrix/send.js";
|
||||
|
||||
@ -3,7 +3,7 @@ import type {
|
||||
ChannelResolveKind,
|
||||
ChannelResolveResult,
|
||||
RuntimeEnv,
|
||||
} from "clawdbot/plugin-sdk";
|
||||
} from "moltbot/plugin-sdk";
|
||||
|
||||
import {
|
||||
listMatrixDirectoryGroupsLive,
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import type { PluginRuntime } from "clawdbot/plugin-sdk";
|
||||
import type { PluginRuntime } from "moltbot/plugin-sdk";
|
||||
|
||||
let runtime: PluginRuntime | null = null;
|
||||
|
||||
|
||||
@ -21,7 +21,7 @@ import {
|
||||
readNumberParam,
|
||||
readReactionParams,
|
||||
readStringParam,
|
||||
} from "clawdbot/plugin-sdk";
|
||||
} from "moltbot/plugin-sdk";
|
||||
|
||||
const messageActions = new Set(["sendMessage", "editMessage", "deleteMessage", "readMessages"]);
|
||||
const reactionActions = new Set(["react", "reactions"]);
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import type { MoltbotPluginApi } from "clawdbot/plugin-sdk";
|
||||
import { emptyPluginConfigSchema } from "clawdbot/plugin-sdk";
|
||||
import type { MoltbotPluginApi } from "moltbot/plugin-sdk";
|
||||
import { emptyPluginConfigSchema } from "moltbot/plugin-sdk";
|
||||
|
||||
import { mattermostPlugin } from "./src/channel.js";
|
||||
import { setMattermostRuntime } from "./src/runtime.js";
|
||||
|
||||
@ -8,7 +8,7 @@ import {
|
||||
normalizeAccountId,
|
||||
setAccountEnabledInConfigSection,
|
||||
type ChannelPlugin,
|
||||
} from "clawdbot/plugin-sdk";
|
||||
} from "moltbot/plugin-sdk";
|
||||
|
||||
import { MattermostConfigSchema } from "./config-schema.js";
|
||||
import { resolveMattermostGroupRequireMention } from "./group-mentions.js";
|
||||
|
||||
@ -6,7 +6,7 @@ import {
|
||||
GroupPolicySchema,
|
||||
MarkdownConfigSchema,
|
||||
requireOpenAllowFrom,
|
||||
} from "clawdbot/plugin-sdk";
|
||||
} from "moltbot/plugin-sdk";
|
||||
|
||||
const MattermostAccountSchemaBase = z
|
||||
.object({
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import type { ChannelGroupContext } from "clawdbot/plugin-sdk";
|
||||
import type { ChannelGroupContext } from "moltbot/plugin-sdk";
|
||||
|
||||
import { resolveMattermostAccount } from "./mattermost/accounts.js";
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import type { MoltbotConfig } from "clawdbot/plugin-sdk";
|
||||
import { DEFAULT_ACCOUNT_ID, normalizeAccountId } from "clawdbot/plugin-sdk";
|
||||
import type { MoltbotConfig } from "moltbot/plugin-sdk";
|
||||
import { DEFAULT_ACCOUNT_ID, normalizeAccountId } from "moltbot/plugin-sdk";
|
||||
|
||||
import type { MattermostAccountConfig, MattermostChatMode } from "../types.js";
|
||||
import { normalizeMattermostBaseUrl } from "./client.js";
|
||||
|
||||
@ -2,7 +2,7 @@ import { Buffer } from "node:buffer";
|
||||
|
||||
import type WebSocket from "ws";
|
||||
|
||||
import type { MoltbotConfig } from "clawdbot/plugin-sdk";
|
||||
import type { MoltbotConfig } from "moltbot/plugin-sdk";
|
||||
|
||||
export type ResponsePrefixContext = {
|
||||
model?: string;
|
||||
|
||||
@ -5,7 +5,7 @@ import type {
|
||||
MoltbotConfig,
|
||||
ReplyPayload,
|
||||
RuntimeEnv,
|
||||
} from "clawdbot/plugin-sdk";
|
||||
} from "moltbot/plugin-sdk";
|
||||
import {
|
||||
createReplyPrefixContext,
|
||||
createTypingCallbacks,
|
||||
@ -18,7 +18,7 @@ import {
|
||||
resolveControlCommandGate,
|
||||
resolveChannelMediaMaxBytes,
|
||||
type HistoryEntry,
|
||||
} from "clawdbot/plugin-sdk";
|
||||
} from "moltbot/plugin-sdk";
|
||||
|
||||
import { getMattermostRuntime } from "../runtime.js";
|
||||
import { resolveMattermostAccount } from "./accounts.js";
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import type { MoltbotConfig, WizardPrompter } from "clawdbot/plugin-sdk";
|
||||
import { DEFAULT_ACCOUNT_ID, normalizeAccountId } from "clawdbot/plugin-sdk";
|
||||
import type { MoltbotConfig, WizardPrompter } from "moltbot/plugin-sdk";
|
||||
import { DEFAULT_ACCOUNT_ID, normalizeAccountId } from "moltbot/plugin-sdk";
|
||||
|
||||
type PromptAccountIdParams = {
|
||||
cfg: MoltbotConfig;
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import type { ChannelOnboardingAdapter, MoltbotConfig, WizardPrompter } from "clawdbot/plugin-sdk";
|
||||
import { DEFAULT_ACCOUNT_ID, normalizeAccountId } from "clawdbot/plugin-sdk";
|
||||
import type { ChannelOnboardingAdapter, MoltbotConfig, WizardPrompter } from "moltbot/plugin-sdk";
|
||||
import { DEFAULT_ACCOUNT_ID, normalizeAccountId } from "moltbot/plugin-sdk";
|
||||
|
||||
import {
|
||||
listMattermostAccountIds,
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import type { PluginRuntime } from "clawdbot/plugin-sdk";
|
||||
import type { PluginRuntime } from "moltbot/plugin-sdk";
|
||||
|
||||
let runtime: PluginRuntime | null = null;
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import type { BlockStreamingCoalesceConfig, DmPolicy, GroupPolicy } from "clawdbot/plugin-sdk";
|
||||
import type { BlockStreamingCoalesceConfig, DmPolicy, GroupPolicy } from "moltbot/plugin-sdk";
|
||||
|
||||
export type MattermostChatMode = "oncall" | "onmessage" | "onchar";
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import type { MoltbotPluginApi } from "clawdbot/plugin-sdk";
|
||||
import { emptyPluginConfigSchema } from "clawdbot/plugin-sdk";
|
||||
import type { MoltbotPluginApi } from "moltbot/plugin-sdk";
|
||||
import { emptyPluginConfigSchema } from "moltbot/plugin-sdk";
|
||||
|
||||
const memoryCorePlugin = {
|
||||
id: "memory-core",
|
||||
|
||||
@ -17,7 +17,7 @@ export const MEMORY_CATEGORIES = ["preference", "fact", "decision", "entity", "o
|
||||
export type MemoryCategory = (typeof MEMORY_CATEGORIES)[number];
|
||||
|
||||
const DEFAULT_MODEL = "text-embedding-3-small";
|
||||
const DEFAULT_DB_PATH = join(homedir(), ".clawdbot", "memory", "lancedb");
|
||||
const DEFAULT_DB_PATH = join(homedir(), ".moltbot", "memory", "lancedb");
|
||||
|
||||
const EMBEDDING_DIMENSIONS: Record<string, number> = {
|
||||
"text-embedding-3-small": 1536,
|
||||
@ -99,7 +99,7 @@ export const memoryConfigSchema = {
|
||||
},
|
||||
dbPath: {
|
||||
label: "Database Path",
|
||||
placeholder: "~/.clawdbot/memory/lancedb",
|
||||
placeholder: "~/.moltbot/memory/lancedb",
|
||||
advanced: true,
|
||||
},
|
||||
autoCapture: {
|
||||
|
||||
@ -16,7 +16,7 @@ import os from "node:os";
|
||||
|
||||
const OPENAI_API_KEY = process.env.OPENAI_API_KEY ?? "test-key";
|
||||
const HAS_OPENAI_KEY = Boolean(process.env.OPENAI_API_KEY);
|
||||
const liveEnabled = HAS_OPENAI_KEY && process.env.CLAWDBOT_LIVE_TEST === "1";
|
||||
const liveEnabled = HAS_OPENAI_KEY && process.env.MOLTBOT_LIVE_TEST === "1";
|
||||
const describeLive = liveEnabled ? describe : describe.skip;
|
||||
|
||||
describe("memory plugin e2e", () => {
|
||||
|
||||
@ -10,8 +10,8 @@ import { Type } from "@sinclair/typebox";
|
||||
import * as lancedb from "@lancedb/lancedb";
|
||||
import OpenAI from "openai";
|
||||
import { randomUUID } from "node:crypto";
|
||||
import type { MoltbotPluginApi } from "clawdbot/plugin-sdk";
|
||||
import { stringEnum } from "clawdbot/plugin-sdk";
|
||||
import type { MoltbotPluginApi } from "moltbot/plugin-sdk";
|
||||
import { stringEnum } from "moltbot/plugin-sdk";
|
||||
|
||||
import {
|
||||
MEMORY_CATEGORIES,
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import type { MoltbotPluginApi } from "clawdbot/plugin-sdk";
|
||||
import { emptyPluginConfigSchema } from "clawdbot/plugin-sdk";
|
||||
import type { MoltbotPluginApi } from "moltbot/plugin-sdk";
|
||||
import { emptyPluginConfigSchema } from "moltbot/plugin-sdk";
|
||||
|
||||
import { msteamsPlugin } from "./src/channel.js";
|
||||
import { setMSTeamsRuntime } from "./src/runtime.js";
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
import { beforeEach, describe, expect, it, vi } from "vitest";
|
||||
|
||||
import type { PluginRuntime } from "clawdbot/plugin-sdk";
|
||||
import type { PluginRuntime } from "moltbot/plugin-sdk";
|
||||
import { setMSTeamsRuntime } from "./runtime.js";
|
||||
|
||||
const detectMimeMock = vi.fn(async () => "image/png");
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
import { describe, expect, it } from "vitest";
|
||||
|
||||
import type { MoltbotConfig } from "clawdbot/plugin-sdk";
|
||||
import type { MoltbotConfig } from "moltbot/plugin-sdk";
|
||||
|
||||
import { msteamsPlugin } from "./channel.js";
|
||||
|
||||
|
||||
@ -1,10 +1,10 @@
|
||||
import type { ChannelMessageActionName, ChannelPlugin, MoltbotConfig } from "clawdbot/plugin-sdk";
|
||||
import type { ChannelMessageActionName, ChannelPlugin, MoltbotConfig } from "moltbot/plugin-sdk";
|
||||
import {
|
||||
buildChannelConfigSchema,
|
||||
DEFAULT_ACCOUNT_ID,
|
||||
MSTeamsConfigSchema,
|
||||
PAIRING_APPROVED_MESSAGE,
|
||||
} from "clawdbot/plugin-sdk";
|
||||
} from "moltbot/plugin-sdk";
|
||||
|
||||
import { msteamsOnboardingAdapter } from "./onboarding.js";
|
||||
import { msteamsOutbound } from "./outbound.js";
|
||||
|
||||
@ -4,7 +4,7 @@ import path from "node:path";
|
||||
|
||||
import { beforeEach, describe, expect, it } from "vitest";
|
||||
|
||||
import type { PluginRuntime } from "clawdbot/plugin-sdk";
|
||||
import type { PluginRuntime } from "moltbot/plugin-sdk";
|
||||
import type { StoredConversationReference } from "./conversation-store.js";
|
||||
import { createMSTeamsConversationStoreFs } from "./conversation-store-fs.js";
|
||||
import { setMSTeamsRuntime } from "./runtime.js";
|
||||
@ -12,10 +12,10 @@ import { setMSTeamsRuntime } from "./runtime.js";
|
||||
const runtimeStub = {
|
||||
state: {
|
||||
resolveStateDir: (env: NodeJS.ProcessEnv = process.env, homedir?: () => string) => {
|
||||
const override = env.CLAWDBOT_STATE_DIR?.trim();
|
||||
const override = env.MOLTBOT_STATE_DIR?.trim();
|
||||
if (override) return override;
|
||||
const resolvedHome = homedir ? homedir() : os.homedir();
|
||||
return path.join(resolvedHome, ".clawdbot");
|
||||
return path.join(resolvedHome, ".moltbot");
|
||||
},
|
||||
},
|
||||
} as unknown as PluginRuntime;
|
||||
@ -30,7 +30,7 @@ describe("msteams conversation store (fs)", () => {
|
||||
|
||||
const env: NodeJS.ProcessEnv = {
|
||||
...process.env,
|
||||
CLAWDBOT_STATE_DIR: stateDir,
|
||||
MOLTBOT_STATE_DIR: stateDir,
|
||||
};
|
||||
|
||||
const store = createMSTeamsConversationStoreFs({ env, ttlMs: 1_000 });
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import type { ChannelDirectoryEntry } from "clawdbot/plugin-sdk";
|
||||
import type { ChannelDirectoryEntry } from "moltbot/plugin-sdk";
|
||||
|
||||
import { GRAPH_ROOT } from "./attachments/shared.js";
|
||||
import { loadMSTeamsSdkWithAuth } from "./sdk.js";
|
||||
|
||||
@ -9,7 +9,7 @@ import {
|
||||
extensionForMime,
|
||||
extractOriginalFilename,
|
||||
getFileExtension,
|
||||
} from "clawdbot/plugin-sdk";
|
||||
} from "moltbot/plugin-sdk";
|
||||
|
||||
/**
|
||||
* Detect MIME type from URL extension or data URL.
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
import { beforeEach, describe, expect, it } from "vitest";
|
||||
|
||||
import { SILENT_REPLY_TOKEN, type PluginRuntime } from "clawdbot/plugin-sdk";
|
||||
import { SILENT_REPLY_TOKEN, type PluginRuntime } from "moltbot/plugin-sdk";
|
||||
import type { StoredConversationReference } from "./conversation-store.js";
|
||||
import {
|
||||
type MSTeamsAdapter,
|
||||
|
||||
@ -6,7 +6,7 @@ import {
|
||||
type MSTeamsReplyStyle,
|
||||
type ReplyPayload,
|
||||
SILENT_REPLY_TOKEN,
|
||||
} from "clawdbot/plugin-sdk";
|
||||
} from "moltbot/plugin-sdk";
|
||||
import type { MSTeamsAccessTokenProvider } from "./attachments/types.js";
|
||||
import type { StoredConversationReference } from "./conversation-store.js";
|
||||
import { classifyMSTeamsSendError } from "./errors.js";
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import type { MoltbotConfig, RuntimeEnv } from "clawdbot/plugin-sdk";
|
||||
import type { MoltbotConfig, RuntimeEnv } from "moltbot/plugin-sdk";
|
||||
import type { MSTeamsConversationStore } from "./conversation-store.js";
|
||||
import {
|
||||
buildFileInfoCard,
|
||||
|
||||
@ -8,7 +8,7 @@ import {
|
||||
resolveMentionGating,
|
||||
formatAllowlistMatchMeta,
|
||||
type HistoryEntry,
|
||||
} from "clawdbot/plugin-sdk";
|
||||
} from "moltbot/plugin-sdk";
|
||||
|
||||
import {
|
||||
buildMSTeamsAttachmentPlaceholder,
|
||||
|
||||
@ -4,7 +4,7 @@ import {
|
||||
summarizeMapping,
|
||||
type MoltbotConfig,
|
||||
type RuntimeEnv,
|
||||
} from "clawdbot/plugin-sdk";
|
||||
} from "moltbot/plugin-sdk";
|
||||
import type { MSTeamsConversationStore } from "./conversation-store.js";
|
||||
import { createMSTeamsConversationStoreFs } from "./conversation-store-fs.js";
|
||||
import { formatUnknownError } from "./errors.js";
|
||||
|
||||
@ -4,13 +4,13 @@ import type {
|
||||
MoltbotConfig,
|
||||
DmPolicy,
|
||||
WizardPrompter,
|
||||
} from "clawdbot/plugin-sdk";
|
||||
} from "moltbot/plugin-sdk";
|
||||
import {
|
||||
addWildcardAllowFrom,
|
||||
DEFAULT_ACCOUNT_ID,
|
||||
formatDocsLink,
|
||||
promptChannelAccessConfig,
|
||||
} from "clawdbot/plugin-sdk";
|
||||
} from "moltbot/plugin-sdk";
|
||||
|
||||
import { resolveMSTeamsCredentials } from "./token.js";
|
||||
import {
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import type { ChannelOutboundAdapter } from "clawdbot/plugin-sdk";
|
||||
import type { ChannelOutboundAdapter } from "moltbot/plugin-sdk";
|
||||
|
||||
import { createMSTeamsPollStoreFs } from "./polls.js";
|
||||
import { getMSTeamsRuntime } from "./runtime.js";
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
import { describe, expect, it } from "vitest";
|
||||
|
||||
import type { MSTeamsConfig } from "clawdbot/plugin-sdk";
|
||||
import type { MSTeamsConfig } from "moltbot/plugin-sdk";
|
||||
import {
|
||||
isMSTeamsGroupAllowed,
|
||||
resolveMSTeamsReplyPolicy,
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user