Plugins: internalize googlechat SDK imports

This commit is contained in:
Vincent Koc
2026-03-17 21:00:23 -07:00
parent 4285eb3539
commit 2b67a3f76e
12 changed files with 121 additions and 18 deletions

View File

@@ -1,6 +1,5 @@
import { DEFAULT_ACCOUNT_ID, normalizeAccountId } from "openclaw/plugin-sdk/account-id";
import { isSecretRef } from "openclaw/plugin-sdk/googlechat";
import { createAccountListHelpers, type OpenClawConfig } from "openclaw/plugin-sdk/googlechat";
import { isSecretRef, createAccountListHelpers, type OpenClawConfig } from "../runtime-api.js";
import type { GoogleChatAccountConfig } from "./types.config.js";
export type GoogleChatCredentialSource = "file" | "inline" | "env" | "none";

View File

@@ -2,7 +2,7 @@ import type {
ChannelMessageActionAdapter,
ChannelMessageActionName,
OpenClawConfig,
} from "openclaw/plugin-sdk/googlechat";
} from "../runtime-api.js";
import {
createActionGate,
extractToolSend,
@@ -10,7 +10,7 @@ import {
readNumberParam,
readReactionParams,
readStringParam,
} from "openclaw/plugin-sdk/googlechat";
} from "../runtime-api.js";
import { listEnabledGoogleChatAccounts, resolveGoogleChatAccount } from "./accounts.js";
import {
createGoogleChatReaction,

View File

@@ -1,5 +1,5 @@
import crypto from "node:crypto";
import { fetchWithSsrFGuard } from "openclaw/plugin-sdk/googlechat";
import { fetchWithSsrFGuard } from "../runtime-api.js";
import type { ResolvedGoogleChatAccount } from "./accounts.js";
import { getGoogleChatAccessToken } from "./auth.js";
import type { GoogleChatReaction } from "./types.js";

View File

@@ -8,6 +8,8 @@ import {
buildOpenGroupPolicyConfigureRouteAllowlistWarning,
collectAllowlistProviderGroupPolicyWarnings,
} from "openclaw/plugin-sdk/channel-policy";
import { createLazyRuntimeNamedExport } from "openclaw/plugin-sdk/lazy-runtime";
import { buildPassiveProbedChannelStatusSummary } from "../../shared/channel-status-summary.js";
import {
buildComputedAccountStatusSnapshot,
buildChannelConfigSchema,
@@ -24,10 +26,8 @@ import {
type ChannelPlugin,
type ChannelStatusIssue,
type OpenClawConfig,
} from "openclaw/plugin-sdk/googlechat";
import { GoogleChatConfigSchema } from "openclaw/plugin-sdk/googlechat";
import { createLazyRuntimeNamedExport } from "openclaw/plugin-sdk/lazy-runtime";
import { buildPassiveProbedChannelStatusSummary } from "../../shared/channel-status-summary.js";
} from "../runtime-api.js";
import { GoogleChatConfigSchema } from "../runtime-api.js";
import {
listGoogleChatAccountIds,
resolveDefaultGoogleChatAccountId,

View File

@@ -1,5 +1,5 @@
import { resolveChannelGroupRequireMention } from "openclaw/plugin-sdk/channel-policy";
import type { OpenClawConfig } from "openclaw/plugin-sdk/googlechat";
import type { OpenClawConfig } from "../runtime-api.js";
type GoogleChatGroupContext = {
cfg: OpenClawConfig;

View File

@@ -10,8 +10,8 @@ import {
resolveMentionGatingWithBypass,
resolveSenderScopedGroupPolicy,
warnMissingProviderGroupPolicyFallbackOnce,
} from "openclaw/plugin-sdk/googlechat";
import type { OpenClawConfig } from "openclaw/plugin-sdk/googlechat";
type OpenClawConfig,
} from "../runtime-api.js";
import type { ResolvedGoogleChatAccount } from "./accounts.js";
import { sendGoogleChatMessage } from "./api.js";
import type { GoogleChatCoreRuntime } from "./monitor-types.js";

View File

@@ -1,4 +1,4 @@
import type { OpenClawConfig } from "openclaw/plugin-sdk/googlechat";
import type { OpenClawConfig } from "../runtime-api.js";
import type { ResolvedGoogleChatAccount } from "./accounts.js";
import type { GoogleChatAudienceType } from "./auth.js";
import { getGoogleChatRuntime } from "./runtime.js";

View File

@@ -4,7 +4,7 @@ import {
resolveWebhookTargetWithAuthOrReject,
withResolvedWebhookRequestPipeline,
type WebhookInFlightLimiter,
} from "openclaw/plugin-sdk/googlechat";
} from "../runtime-api.js";
import { verifyGoogleChatRequest } from "./auth.js";
import type { WebhookTarget } from "./monitor-types.js";
import type {

View File

@@ -1,12 +1,12 @@
import type { IncomingMessage, ServerResponse } from "node:http";
import type { OpenClawConfig } from "openclaw/plugin-sdk/googlechat";
import type { OpenClawConfig } from "../runtime-api.js";
import {
createWebhookInFlightLimiter,
createReplyPrefixOptions,
registerWebhookTargetWithPluginRoute,
resolveInboundRouteEnvelopeBuilderWithRuntime,
resolveWebhookPath,
} from "openclaw/plugin-sdk/googlechat";
} from "../runtime-api.js";
import { type ResolvedGoogleChatAccount } from "./accounts.js";
import {
downloadGoogleChatMedia,

View File

@@ -1,5 +1,5 @@
import type { PluginRuntime } from "openclaw/plugin-sdk/googlechat";
import { createPluginRuntimeStore } from "openclaw/plugin-sdk/runtime-store";
import type { PluginRuntime } from "../runtime-api.js";
const { setRuntime: setGoogleChatRuntime, getRuntime: getGoogleChatRuntime } =
createPluginRuntimeStore<PluginRuntime>("Google Chat runtime not initialized");

View File

@@ -1,3 +1,3 @@
import type { GoogleChatAccountConfig, GoogleChatConfig } from "openclaw/plugin-sdk/googlechat";
import type { GoogleChatAccountConfig, GoogleChatConfig } from "../runtime-api.js";
export type { GoogleChatAccountConfig, GoogleChatConfig };