mirror of
https://github.com/openclaw/openclaw.git
synced 2026-03-12 07:20:45 +00:00
Plugins/msteams: migrate to scoped plugin-sdk imports
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
import type { OpenClawPluginApi } from "openclaw/plugin-sdk/core";
|
import type { OpenClawPluginApi } from "openclaw/plugin-sdk/msteams";
|
||||||
import { emptyPluginConfigSchema } from "openclaw/plugin-sdk/core";
|
import { emptyPluginConfigSchema } from "openclaw/plugin-sdk/msteams";
|
||||||
import { msteamsPlugin } from "./src/channel.js";
|
import { msteamsPlugin } from "./src/channel.js";
|
||||||
import { setMSTeamsRuntime } from "./src/runtime.js";
|
import { setMSTeamsRuntime } from "./src/runtime.js";
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import type { PluginRuntime, SsrFPolicy } from "openclaw/plugin-sdk/compat";
|
import type { PluginRuntime, SsrFPolicy } from "openclaw/plugin-sdk/msteams";
|
||||||
import { beforeEach, describe, expect, it, vi } from "vitest";
|
import { beforeEach, describe, expect, it, vi } from "vitest";
|
||||||
import { createPluginRuntimeMock } from "../../test-utils/plugin-runtime-mock.js";
|
import { createPluginRuntimeMock } from "../../test-utils/plugin-runtime-mock.js";
|
||||||
import {
|
import {
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { fetchWithSsrFGuard, type SsrFPolicy } from "openclaw/plugin-sdk/compat";
|
import { fetchWithSsrFGuard, type SsrFPolicy } from "openclaw/plugin-sdk/msteams";
|
||||||
import { getMSTeamsRuntime } from "../runtime.js";
|
import { getMSTeamsRuntime } from "../runtime.js";
|
||||||
import { downloadMSTeamsAttachments } from "./download.js";
|
import { downloadMSTeamsAttachments } from "./download.js";
|
||||||
import { downloadAndStoreMSTeamsRemoteMedia } from "./remote-media.js";
|
import { downloadAndStoreMSTeamsRemoteMedia } from "./remote-media.js";
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { buildMediaPayload } from "openclaw/plugin-sdk/compat";
|
import { buildMediaPayload } from "openclaw/plugin-sdk/msteams";
|
||||||
|
|
||||||
export function buildMSTeamsMediaPayload(
|
export function buildMSTeamsMediaPayload(
|
||||||
mediaList: Array<{ path: string; contentType?: string }>,
|
mediaList: Array<{ path: string; contentType?: string }>,
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import type { SsrFPolicy } from "openclaw/plugin-sdk/compat";
|
import type { SsrFPolicy } from "openclaw/plugin-sdk/msteams";
|
||||||
import { getMSTeamsRuntime } from "../runtime.js";
|
import { getMSTeamsRuntime } from "../runtime.js";
|
||||||
import { inferPlaceholder } from "./shared.js";
|
import { inferPlaceholder } from "./shared.js";
|
||||||
import type { MSTeamsInboundMedia } from "./types.js";
|
import type { MSTeamsInboundMedia } from "./types.js";
|
||||||
|
|||||||
@@ -4,8 +4,8 @@ import {
|
|||||||
isHttpsUrlAllowedByHostnameSuffixAllowlist,
|
isHttpsUrlAllowedByHostnameSuffixAllowlist,
|
||||||
isPrivateIpAddress,
|
isPrivateIpAddress,
|
||||||
normalizeHostnameSuffixAllowlist,
|
normalizeHostnameSuffixAllowlist,
|
||||||
} from "openclaw/plugin-sdk/compat";
|
} from "openclaw/plugin-sdk/msteams";
|
||||||
import type { SsrFPolicy } from "openclaw/plugin-sdk/compat";
|
import type { SsrFPolicy } from "openclaw/plugin-sdk/msteams";
|
||||||
import type { MSTeamsAttachmentLike } from "./types.js";
|
import type { MSTeamsAttachmentLike } from "./types.js";
|
||||||
|
|
||||||
type InlineImageCandidate =
|
type InlineImageCandidate =
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import type { OpenClawConfig, RuntimeEnv } from "openclaw/plugin-sdk/compat";
|
import type { OpenClawConfig, RuntimeEnv } from "openclaw/plugin-sdk/msteams";
|
||||||
import { describe, expect, it } from "vitest";
|
import { describe, expect, it } from "vitest";
|
||||||
import { msteamsPlugin } from "./channel.js";
|
import { msteamsPlugin } from "./channel.js";
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import type {
|
|||||||
ChannelMessageActionName,
|
ChannelMessageActionName,
|
||||||
ChannelPlugin,
|
ChannelPlugin,
|
||||||
OpenClawConfig,
|
OpenClawConfig,
|
||||||
} from "openclaw/plugin-sdk/compat";
|
} from "openclaw/plugin-sdk/msteams";
|
||||||
import {
|
import {
|
||||||
buildBaseChannelStatusSummary,
|
buildBaseChannelStatusSummary,
|
||||||
buildChannelConfigSchema,
|
buildChannelConfigSchema,
|
||||||
@@ -12,7 +12,7 @@ import {
|
|||||||
PAIRING_APPROVED_MESSAGE,
|
PAIRING_APPROVED_MESSAGE,
|
||||||
resolveAllowlistProviderRuntimeGroupPolicy,
|
resolveAllowlistProviderRuntimeGroupPolicy,
|
||||||
resolveDefaultGroupPolicy,
|
resolveDefaultGroupPolicy,
|
||||||
} from "openclaw/plugin-sdk/compat";
|
} from "openclaw/plugin-sdk/msteams";
|
||||||
import { listMSTeamsDirectoryGroupsLive, listMSTeamsDirectoryPeersLive } from "./directory-live.js";
|
import { listMSTeamsDirectoryGroupsLive, listMSTeamsDirectoryPeersLive } from "./directory-live.js";
|
||||||
import { msteamsOnboardingAdapter } from "./onboarding.js";
|
import { msteamsOnboardingAdapter } from "./onboarding.js";
|
||||||
import { msteamsOutbound } from "./outbound.js";
|
import { msteamsOutbound } from "./outbound.js";
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import type { ChannelDirectoryEntry } from "openclaw/plugin-sdk/compat";
|
import type { ChannelDirectoryEntry } from "openclaw/plugin-sdk/msteams";
|
||||||
import { searchGraphUsers } from "./graph-users.js";
|
import { searchGraphUsers } from "./graph-users.js";
|
||||||
import {
|
import {
|
||||||
type GraphChannel,
|
type GraphChannel,
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
export { withFileLock } from "openclaw/plugin-sdk/compat";
|
export { withFileLock } from "openclaw/plugin-sdk/msteams";
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import type { MSTeamsConfig } from "openclaw/plugin-sdk/compat";
|
import type { MSTeamsConfig } from "openclaw/plugin-sdk/msteams";
|
||||||
import { GRAPH_ROOT } from "./attachments/shared.js";
|
import { GRAPH_ROOT } from "./attachments/shared.js";
|
||||||
import { loadMSTeamsSdkWithAuth } from "./sdk.js";
|
import { loadMSTeamsSdkWithAuth } from "./sdk.js";
|
||||||
import { readAccessToken } from "./token-response.js";
|
import { readAccessToken } from "./token-response.js";
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import {
|
|||||||
extensionForMime,
|
extensionForMime,
|
||||||
extractOriginalFilename,
|
extractOriginalFilename,
|
||||||
getFileExtension,
|
getFileExtension,
|
||||||
} from "openclaw/plugin-sdk/compat";
|
} from "openclaw/plugin-sdk/msteams";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Detect MIME type from URL extension or data URL.
|
* Detect MIME type from URL extension or data URL.
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import { mkdtemp, rm, writeFile } from "node:fs/promises";
|
import { mkdtemp, rm, writeFile } from "node:fs/promises";
|
||||||
import os from "node:os";
|
import os from "node:os";
|
||||||
import path from "node:path";
|
import path from "node:path";
|
||||||
import { SILENT_REPLY_TOKEN, type PluginRuntime } from "openclaw/plugin-sdk/compat";
|
import { SILENT_REPLY_TOKEN, type PluginRuntime } from "openclaw/plugin-sdk/msteams";
|
||||||
import { beforeEach, describe, expect, it, vi } from "vitest";
|
import { beforeEach, describe, expect, it, vi } from "vitest";
|
||||||
import { createPluginRuntimeMock } from "../../test-utils/plugin-runtime-mock.js";
|
import { createPluginRuntimeMock } from "../../test-utils/plugin-runtime-mock.js";
|
||||||
import type { StoredConversationReference } from "./conversation-store.js";
|
import type { StoredConversationReference } from "./conversation-store.js";
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import {
|
|||||||
type ReplyPayload,
|
type ReplyPayload,
|
||||||
SILENT_REPLY_TOKEN,
|
SILENT_REPLY_TOKEN,
|
||||||
sleep,
|
sleep,
|
||||||
} from "openclaw/plugin-sdk/compat";
|
} from "openclaw/plugin-sdk/msteams";
|
||||||
import type { MSTeamsAccessTokenProvider } from "./attachments/types.js";
|
import type { MSTeamsAccessTokenProvider } from "./attachments/types.js";
|
||||||
import type { StoredConversationReference } from "./conversation-store.js";
|
import type { StoredConversationReference } from "./conversation-store.js";
|
||||||
import { classifyMSTeamsSendError } from "./errors.js";
|
import { classifyMSTeamsSendError } from "./errors.js";
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import type { OpenClawConfig, PluginRuntime, RuntimeEnv } from "openclaw/plugin-sdk/compat";
|
import type { OpenClawConfig, PluginRuntime, RuntimeEnv } from "openclaw/plugin-sdk/msteams";
|
||||||
import { beforeEach, describe, expect, it, vi } from "vitest";
|
import { beforeEach, describe, expect, it, vi } from "vitest";
|
||||||
import type { MSTeamsConversationStore } from "./conversation-store.js";
|
import type { MSTeamsConversationStore } from "./conversation-store.js";
|
||||||
import type { MSTeamsAdapter } from "./messenger.js";
|
import type { MSTeamsAdapter } from "./messenger.js";
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import type { OpenClawConfig, RuntimeEnv } from "openclaw/plugin-sdk/compat";
|
import type { OpenClawConfig, RuntimeEnv } from "openclaw/plugin-sdk/msteams";
|
||||||
import type { MSTeamsConversationStore } from "./conversation-store.js";
|
import type { MSTeamsConversationStore } from "./conversation-store.js";
|
||||||
import { buildFileInfoCard, parseFileConsentInvoke, uploadToConsentUrl } from "./file-consent.js";
|
import { buildFileInfoCard, parseFileConsentInvoke, uploadToConsentUrl } from "./file-consent.js";
|
||||||
import { normalizeMSTeamsConversationId } from "./inbound.js";
|
import { normalizeMSTeamsConversationId } from "./inbound.js";
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import type { OpenClawConfig, PluginRuntime, RuntimeEnv } from "openclaw/plugin-sdk/compat";
|
import type { OpenClawConfig, PluginRuntime, RuntimeEnv } from "openclaw/plugin-sdk/msteams";
|
||||||
import { describe, expect, it, vi } from "vitest";
|
import { describe, expect, it, vi } from "vitest";
|
||||||
import type { MSTeamsMessageHandlerDeps } from "../monitor-handler.js";
|
import type { MSTeamsMessageHandlerDeps } from "../monitor-handler.js";
|
||||||
import { setMSTeamsRuntime } from "../runtime.js";
|
import { setMSTeamsRuntime } from "../runtime.js";
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ import {
|
|||||||
resolveEffectiveAllowFromLists,
|
resolveEffectiveAllowFromLists,
|
||||||
resolveDmGroupAccessWithLists,
|
resolveDmGroupAccessWithLists,
|
||||||
type HistoryEntry,
|
type HistoryEntry,
|
||||||
} from "openclaw/plugin-sdk/compat";
|
} from "openclaw/plugin-sdk/msteams";
|
||||||
import {
|
import {
|
||||||
buildMSTeamsAttachmentPlaceholder,
|
buildMSTeamsAttachmentPlaceholder,
|
||||||
buildMSTeamsMediaPayload,
|
buildMSTeamsMediaPayload,
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { EventEmitter } from "node:events";
|
import { EventEmitter } from "node:events";
|
||||||
import type { OpenClawConfig, RuntimeEnv } from "openclaw/plugin-sdk/compat";
|
import type { OpenClawConfig, RuntimeEnv } from "openclaw/plugin-sdk/msteams";
|
||||||
import { afterEach, describe, expect, it, vi } from "vitest";
|
import { afterEach, describe, expect, it, vi } from "vitest";
|
||||||
import type { MSTeamsConversationStore } from "./conversation-store.js";
|
import type { MSTeamsConversationStore } from "./conversation-store.js";
|
||||||
import type { MSTeamsPollStore } from "./polls.js";
|
import type { MSTeamsPollStore } from "./polls.js";
|
||||||
@@ -15,7 +15,7 @@ const expressControl = vi.hoisted(() => ({
|
|||||||
mode: { value: "listening" as "listening" | "error" },
|
mode: { value: "listening" as "listening" | "error" },
|
||||||
}));
|
}));
|
||||||
|
|
||||||
vi.mock("openclaw/plugin-sdk", () => ({
|
vi.mock("openclaw/plugin-sdk/msteams", () => ({
|
||||||
DEFAULT_WEBHOOK_MAX_BODY_BYTES: 1024 * 1024,
|
DEFAULT_WEBHOOK_MAX_BODY_BYTES: 1024 * 1024,
|
||||||
normalizeSecretInputString: (value: unknown) =>
|
normalizeSecretInputString: (value: unknown) =>
|
||||||
typeof value === "string" && value.trim() ? value.trim() : undefined,
|
typeof value === "string" && value.trim() ? value.trim() : undefined,
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import {
|
|||||||
summarizeMapping,
|
summarizeMapping,
|
||||||
type OpenClawConfig,
|
type OpenClawConfig,
|
||||||
type RuntimeEnv,
|
type RuntimeEnv,
|
||||||
} from "openclaw/plugin-sdk/compat";
|
} from "openclaw/plugin-sdk/msteams";
|
||||||
import { createMSTeamsConversationStoreFs } from "./conversation-store-fs.js";
|
import { createMSTeamsConversationStoreFs } from "./conversation-store-fs.js";
|
||||||
import type { MSTeamsConversationStore } from "./conversation-store.js";
|
import type { MSTeamsConversationStore } from "./conversation-store.js";
|
||||||
import { formatUnknownError } from "./errors.js";
|
import { formatUnknownError } from "./errors.js";
|
||||||
|
|||||||
@@ -5,14 +5,14 @@ import type {
|
|||||||
DmPolicy,
|
DmPolicy,
|
||||||
WizardPrompter,
|
WizardPrompter,
|
||||||
MSTeamsTeamConfig,
|
MSTeamsTeamConfig,
|
||||||
} from "openclaw/plugin-sdk/compat";
|
} from "openclaw/plugin-sdk/msteams";
|
||||||
import {
|
import {
|
||||||
addWildcardAllowFrom,
|
addWildcardAllowFrom,
|
||||||
DEFAULT_ACCOUNT_ID,
|
DEFAULT_ACCOUNT_ID,
|
||||||
formatDocsLink,
|
formatDocsLink,
|
||||||
mergeAllowFromEntries,
|
mergeAllowFromEntries,
|
||||||
promptChannelAccessConfig,
|
promptChannelAccessConfig,
|
||||||
} from "openclaw/plugin-sdk/compat";
|
} from "openclaw/plugin-sdk/msteams";
|
||||||
import {
|
import {
|
||||||
parseMSTeamsTeamEntry,
|
parseMSTeamsTeamEntry,
|
||||||
resolveMSTeamsChannelAllowlist,
|
resolveMSTeamsChannelAllowlist,
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import type { OpenClawConfig } from "openclaw/plugin-sdk";
|
import type { OpenClawConfig } from "openclaw/plugin-sdk/msteams";
|
||||||
import { beforeEach, describe, expect, it, vi } from "vitest";
|
import { beforeEach, describe, expect, it, vi } from "vitest";
|
||||||
|
|
||||||
const mocks = vi.hoisted(() => ({
|
const mocks = vi.hoisted(() => ({
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import type { ChannelOutboundAdapter } from "openclaw/plugin-sdk/compat";
|
import type { ChannelOutboundAdapter } from "openclaw/plugin-sdk/msteams";
|
||||||
import { createMSTeamsPollStoreFs } from "./polls.js";
|
import { createMSTeamsPollStoreFs } from "./polls.js";
|
||||||
import { getMSTeamsRuntime } from "./runtime.js";
|
import { getMSTeamsRuntime } from "./runtime.js";
|
||||||
import { sendMessageMSTeams, sendPollMSTeams } from "./send.js";
|
import { sendMessageMSTeams, sendPollMSTeams } from "./send.js";
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import type { MSTeamsConfig } from "openclaw/plugin-sdk/compat";
|
import type { MSTeamsConfig } from "openclaw/plugin-sdk/msteams";
|
||||||
import { describe, expect, it } from "vitest";
|
import { describe, expect, it } from "vitest";
|
||||||
import {
|
import {
|
||||||
isMSTeamsGroupAllowed,
|
isMSTeamsGroupAllowed,
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import type {
|
|||||||
MSTeamsConfig,
|
MSTeamsConfig,
|
||||||
MSTeamsReplyStyle,
|
MSTeamsReplyStyle,
|
||||||
MSTeamsTeamConfig,
|
MSTeamsTeamConfig,
|
||||||
} from "openclaw/plugin-sdk/compat";
|
} from "openclaw/plugin-sdk/msteams";
|
||||||
import {
|
import {
|
||||||
buildChannelKeyCandidates,
|
buildChannelKeyCandidates,
|
||||||
normalizeChannelSlug,
|
normalizeChannelSlug,
|
||||||
@@ -15,7 +15,7 @@ import {
|
|||||||
resolveToolsBySender,
|
resolveToolsBySender,
|
||||||
resolveChannelEntryMatchWithFallback,
|
resolveChannelEntryMatchWithFallback,
|
||||||
resolveNestedAllowlistDecision,
|
resolveNestedAllowlistDecision,
|
||||||
} from "openclaw/plugin-sdk/compat";
|
} from "openclaw/plugin-sdk/msteams";
|
||||||
|
|
||||||
export type MSTeamsResolvedRouteConfig = {
|
export type MSTeamsResolvedRouteConfig = {
|
||||||
teamConfig?: MSTeamsTeamConfig;
|
teamConfig?: MSTeamsTeamConfig;
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import type { MSTeamsConfig } from "openclaw/plugin-sdk/compat";
|
import type { MSTeamsConfig } from "openclaw/plugin-sdk/msteams";
|
||||||
import { describe, expect, it, vi } from "vitest";
|
import { describe, expect, it, vi } from "vitest";
|
||||||
|
|
||||||
const hostMockState = vi.hoisted(() => ({
|
const hostMockState = vi.hoisted(() => ({
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import type { BaseProbeResult, MSTeamsConfig } from "openclaw/plugin-sdk/compat";
|
import type { BaseProbeResult, MSTeamsConfig } from "openclaw/plugin-sdk/msteams";
|
||||||
import { formatUnknownError } from "./errors.js";
|
import { formatUnknownError } from "./errors.js";
|
||||||
import { loadMSTeamsSdkWithAuth } from "./sdk.js";
|
import { loadMSTeamsSdkWithAuth } from "./sdk.js";
|
||||||
import { readAccessToken } from "./token-response.js";
|
import { readAccessToken } from "./token-response.js";
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import {
|
|||||||
type OpenClawConfig,
|
type OpenClawConfig,
|
||||||
type MSTeamsReplyStyle,
|
type MSTeamsReplyStyle,
|
||||||
type RuntimeEnv,
|
type RuntimeEnv,
|
||||||
} from "openclaw/plugin-sdk/compat";
|
} from "openclaw/plugin-sdk/msteams";
|
||||||
import type { MSTeamsAccessTokenProvider } from "./attachments/types.js";
|
import type { MSTeamsAccessTokenProvider } from "./attachments/types.js";
|
||||||
import type { StoredConversationReference } from "./conversation-store.js";
|
import type { StoredConversationReference } from "./conversation-store.js";
|
||||||
import {
|
import {
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import type { PluginRuntime } from "openclaw/plugin-sdk/compat";
|
import type { PluginRuntime } from "openclaw/plugin-sdk/msteams";
|
||||||
|
|
||||||
let runtime: PluginRuntime | null = null;
|
let runtime: PluginRuntime | null = null;
|
||||||
|
|
||||||
|
|||||||
@@ -2,6 +2,6 @@ import {
|
|||||||
hasConfiguredSecretInput,
|
hasConfiguredSecretInput,
|
||||||
normalizeResolvedSecretInputString,
|
normalizeResolvedSecretInputString,
|
||||||
normalizeSecretInputString,
|
normalizeSecretInputString,
|
||||||
} from "openclaw/plugin-sdk/compat";
|
} from "openclaw/plugin-sdk/msteams";
|
||||||
|
|
||||||
export { hasConfiguredSecretInput, normalizeResolvedSecretInputString, normalizeSecretInputString };
|
export { hasConfiguredSecretInput, normalizeResolvedSecretInputString, normalizeSecretInputString };
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import {
|
|||||||
resolveChannelMediaMaxBytes,
|
resolveChannelMediaMaxBytes,
|
||||||
type OpenClawConfig,
|
type OpenClawConfig,
|
||||||
type PluginRuntime,
|
type PluginRuntime,
|
||||||
} from "openclaw/plugin-sdk/compat";
|
} from "openclaw/plugin-sdk/msteams";
|
||||||
import type { MSTeamsAccessTokenProvider } from "./attachments/types.js";
|
import type { MSTeamsAccessTokenProvider } from "./attachments/types.js";
|
||||||
import { createMSTeamsConversationStoreFs } from "./conversation-store-fs.js";
|
import { createMSTeamsConversationStoreFs } from "./conversation-store-fs.js";
|
||||||
import type {
|
import type {
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import type { OpenClawConfig } from "openclaw/plugin-sdk/compat";
|
import type { OpenClawConfig } from "openclaw/plugin-sdk/msteams";
|
||||||
import { beforeEach, describe, expect, it, vi } from "vitest";
|
import { beforeEach, describe, expect, it, vi } from "vitest";
|
||||||
import { sendMessageMSTeams } from "./send.js";
|
import { sendMessageMSTeams } from "./send.js";
|
||||||
|
|
||||||
@@ -11,7 +11,7 @@ const mockState = vi.hoisted(() => ({
|
|||||||
sendMSTeamsMessages: vi.fn(),
|
sendMSTeamsMessages: vi.fn(),
|
||||||
}));
|
}));
|
||||||
|
|
||||||
vi.mock("openclaw/plugin-sdk", () => ({
|
vi.mock("openclaw/plugin-sdk/msteams", () => ({
|
||||||
loadOutboundMediaFromUrl: mockState.loadOutboundMediaFromUrl,
|
loadOutboundMediaFromUrl: mockState.loadOutboundMediaFromUrl,
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import type { OpenClawConfig } from "openclaw/plugin-sdk/compat";
|
import type { OpenClawConfig } from "openclaw/plugin-sdk/msteams";
|
||||||
import { loadOutboundMediaFromUrl } from "openclaw/plugin-sdk/compat";
|
import { loadOutboundMediaFromUrl } from "openclaw/plugin-sdk/msteams";
|
||||||
import { createMSTeamsConversationStoreFs } from "./conversation-store-fs.js";
|
import { createMSTeamsConversationStoreFs } from "./conversation-store-fs.js";
|
||||||
import {
|
import {
|
||||||
classifyMSTeamsSendError,
|
classifyMSTeamsSendError,
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import fs from "node:fs";
|
import fs from "node:fs";
|
||||||
import { readJsonFileWithFallback, writeJsonFileAtomically } from "openclaw/plugin-sdk/compat";
|
import { readJsonFileWithFallback, writeJsonFileAtomically } from "openclaw/plugin-sdk/msteams";
|
||||||
import { withFileLock as withPathLock } from "./file-lock.js";
|
import { withFileLock as withPathLock } from "./file-lock.js";
|
||||||
|
|
||||||
const STORE_LOCK_OPTIONS = {
|
const STORE_LOCK_OPTIONS = {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import os from "node:os";
|
import os from "node:os";
|
||||||
import path from "node:path";
|
import path from "node:path";
|
||||||
import type { PluginRuntime } from "openclaw/plugin-sdk/compat";
|
import type { PluginRuntime } from "openclaw/plugin-sdk/msteams";
|
||||||
|
|
||||||
export const msteamsRuntimeStub = {
|
export const msteamsRuntimeStub = {
|
||||||
state: {
|
state: {
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import type { MSTeamsConfig } from "openclaw/plugin-sdk/compat";
|
import type { MSTeamsConfig } from "openclaw/plugin-sdk/msteams";
|
||||||
import {
|
import {
|
||||||
hasConfiguredSecretInput,
|
hasConfiguredSecretInput,
|
||||||
normalizeResolvedSecretInputString,
|
normalizeResolvedSecretInputString,
|
||||||
|
|||||||
Reference in New Issue
Block a user