refactor: rename clawdbot to moltbot
This commit is contained in:
parent
fba2375a45
commit
662962980e
@ -7,7 +7,7 @@ Connects Clawdbot to Gmail via the `gog` CLI.
|
||||
This is a plugin. To install from source:
|
||||
|
||||
```bash
|
||||
clawdbot plugins install ./extensions/gmail
|
||||
moltbot plugins install ./extensions/gmail
|
||||
```
|
||||
|
||||
## Features
|
||||
@ -25,7 +25,7 @@ clawdbot plugins install ./extensions/gmail
|
||||
|
||||
## Configuration
|
||||
|
||||
Add to `clawdbot.json`:
|
||||
Add to `moltbot.json`:
|
||||
|
||||
```json5
|
||||
{
|
||||
|
||||
@ -1,10 +1,10 @@
|
||||
{
|
||||
"name": "gmail",
|
||||
"version": "1.0.0",
|
||||
"description": "Gmail channel for Clawdbot",
|
||||
"name": "@mcinteerj/moltbot-gmail",
|
||||
"version": "1.0.2",
|
||||
"description": "Gmail channel for Moltbot",
|
||||
"type": "module",
|
||||
"main": "index.ts",
|
||||
"clawdbot": {
|
||||
"moltbot": {
|
||||
"extensions": [
|
||||
"./index.ts"
|
||||
],
|
||||
@ -34,7 +34,7 @@
|
||||
"sanitize-html": "^2.14.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"clawdbot": "workspace:*",
|
||||
"moltbot": "workspace:*",
|
||||
"@types/jsdom": "^21.1.7",
|
||||
"@types/dompurify": "^3.0.5",
|
||||
"@types/marked": "^6.0.0",
|
||||
|
||||
@ -2,7 +2,7 @@ import {
|
||||
type ChannelConfig,
|
||||
type ResolvedChannelAccount,
|
||||
DEFAULT_ACCOUNT_ID,
|
||||
} from "clawdbot/plugin-sdk";
|
||||
} from "moltbot/plugin-sdk";
|
||||
import type { GmailConfig } from "./config.js";
|
||||
|
||||
export interface ResolvedGmailAccount extends ResolvedChannelAccount {
|
||||
|
||||
@ -9,7 +9,7 @@ import {
|
||||
type ClawdbotConfig,
|
||||
type ChannelGatewayContext,
|
||||
type MsgContext,
|
||||
} from "clawdbot/plugin-sdk";
|
||||
} from "moltbot/plugin-sdk";
|
||||
import { GmailConfigSchema } from "./config.js";
|
||||
import {
|
||||
resolveGmailAccount,
|
||||
|
||||
@ -2,8 +2,8 @@ import fs from "node:fs/promises";
|
||||
import path from "node:path";
|
||||
import os from "node:os";
|
||||
|
||||
// Store historyIds in ~/.clawdbot/state/gmail/history-{account}.json
|
||||
const STORE_DIR = path.join(os.homedir(), ".clawdbot", "state", "gmail");
|
||||
// Store historyIds in ~/.moltbot/state/gmail/history-{account}.json
|
||||
const STORE_DIR = path.join(os.homedir(), ".moltbot", "state", "gmail");
|
||||
|
||||
interface HistoryState {
|
||||
historyId: string;
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import { type InboundMessage } from "clawdbot/plugin-sdk";
|
||||
import { type InboundMessage } from "moltbot/plugin-sdk";
|
||||
import { extractTextBody } from "./strip-quotes.js";
|
||||
import { extractAttachments } from "./attachments.js";
|
||||
|
||||
|
||||
@ -4,7 +4,7 @@ import fs from "node:fs/promises";
|
||||
import path from "node:path";
|
||||
import os from "node:os";
|
||||
import lockfile from "proper-lockfile";
|
||||
import type { ChannelLogSink, InboundMessage } from "clawdbot/plugin-sdk";
|
||||
import type { ChannelLogSink, InboundMessage } from "moltbot/plugin-sdk";
|
||||
import type { ResolvedGmailAccount } from "./accounts.js";
|
||||
import { loadHistoryId, saveHistoryId } from "./history-store.js";
|
||||
import { parseInboundGmail, parseSearchGmail, type GogPayload, type GogSearchMessage } from "./inbound.js";
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import type { ClawdbotConfig, ChannelOnboardingAdapter } from "clawdbot/plugin-sdk";
|
||||
import { promptAccountId } from "clawdbot/plugin-sdk";
|
||||
import type { ClawdbotConfig, ChannelOnboardingAdapter } from "moltbot/plugin-sdk";
|
||||
import { promptAccountId } from "moltbot/plugin-sdk";
|
||||
import { exec } from "node:child_process";
|
||||
import { promisify } from "node:util";
|
||||
import { listGmailAccountIds, resolveDefaultGmailAccountId } from "./accounts.js";
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
import { spawn } from "node:child_process";
|
||||
import { marked } from "marked";
|
||||
import sanitizeHtml from "sanitize-html";
|
||||
import { type OutboundContext, type ClawdbotConfig } from "clawdbot/plugin-sdk";
|
||||
import { type OutboundContext, type ClawdbotConfig } from "moltbot/plugin-sdk";
|
||||
import { resolveGmailAccount } from "./accounts.js";
|
||||
import { isGmailThreadId } from "./normalize.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,4 +1,4 @@
|
||||
import { type ChannelThreadingAdapter } from "clawdbot/plugin-sdk";
|
||||
import { type ChannelThreadingAdapter } from "moltbot/plugin-sdk";
|
||||
|
||||
export const gmailThreading: ChannelThreadingAdapter = {
|
||||
buildToolContext: ({ context, hasRepliedRef }) => ({
|
||||
|
||||
Loading…
Reference in New Issue
Block a user