mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-19 11:38:38 +00:00
Plugins/nextcloud-talk: 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/nextcloud-talk";
|
||||||
import { emptyPluginConfigSchema } from "openclaw/plugin-sdk/core";
|
import { emptyPluginConfigSchema } from "openclaw/plugin-sdk/nextcloud-talk";
|
||||||
import { nextcloudTalkPlugin } from "./src/channel.js";
|
import { nextcloudTalkPlugin } from "./src/channel.js";
|
||||||
import { setNextcloudTalkRuntime } from "./src/runtime.js";
|
import { setNextcloudTalkRuntime } from "./src/runtime.js";
|
||||||
|
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import {
|
|||||||
import {
|
import {
|
||||||
listConfiguredAccountIds as listConfiguredAccountIdsFromSection,
|
listConfiguredAccountIds as listConfiguredAccountIdsFromSection,
|
||||||
resolveAccountWithDefaultFallback,
|
resolveAccountWithDefaultFallback,
|
||||||
} from "openclaw/plugin-sdk/compat";
|
} from "openclaw/plugin-sdk/nextcloud-talk";
|
||||||
import { normalizeResolvedSecretInputString } from "./secret-input.js";
|
import { normalizeResolvedSecretInputString } from "./secret-input.js";
|
||||||
import type { CoreConfig, NextcloudTalkAccountConfig } from "./types.js";
|
import type { CoreConfig, NextcloudTalkAccountConfig } from "./types.js";
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ import {
|
|||||||
type ChannelPlugin,
|
type ChannelPlugin,
|
||||||
type OpenClawConfig,
|
type OpenClawConfig,
|
||||||
type ChannelSetupInput,
|
type ChannelSetupInput,
|
||||||
} from "openclaw/plugin-sdk/compat";
|
} from "openclaw/plugin-sdk/nextcloud-talk";
|
||||||
import { waitForAbortSignal } from "../../../src/infra/abort-signal.js";
|
import { waitForAbortSignal } from "../../../src/infra/abort-signal.js";
|
||||||
import {
|
import {
|
||||||
listNextcloudTalkAccountIds,
|
listNextcloudTalkAccountIds,
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import {
|
|||||||
ReplyRuntimeConfigSchemaShape,
|
ReplyRuntimeConfigSchemaShape,
|
||||||
ToolPolicySchema,
|
ToolPolicySchema,
|
||||||
requireOpenAllowFrom,
|
requireOpenAllowFrom,
|
||||||
} from "openclaw/plugin-sdk/compat";
|
} from "openclaw/plugin-sdk/nextcloud-talk";
|
||||||
import { z } from "zod";
|
import { z } from "zod";
|
||||||
import { buildSecretInputSchema } from "./secret-input.js";
|
import { buildSecretInputSchema } from "./secret-input.js";
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import type { PluginRuntime, RuntimeEnv } from "openclaw/plugin-sdk/compat";
|
import type { PluginRuntime, RuntimeEnv } from "openclaw/plugin-sdk/nextcloud-talk";
|
||||||
import { describe, expect, it, vi } from "vitest";
|
import { describe, expect, it, vi } from "vitest";
|
||||||
import type { ResolvedNextcloudTalkAccount } from "./accounts.js";
|
import type { ResolvedNextcloudTalkAccount } from "./accounts.js";
|
||||||
import { handleNextcloudTalkInbound } from "./inbound.js";
|
import { handleNextcloudTalkInbound } from "./inbound.js";
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ import {
|
|||||||
type OutboundReplyPayload,
|
type OutboundReplyPayload,
|
||||||
type OpenClawConfig,
|
type OpenClawConfig,
|
||||||
type RuntimeEnv,
|
type RuntimeEnv,
|
||||||
} from "openclaw/plugin-sdk/compat";
|
} from "openclaw/plugin-sdk/nextcloud-talk";
|
||||||
import type { ResolvedNextcloudTalkAccount } from "./accounts.js";
|
import type { ResolvedNextcloudTalkAccount } from "./accounts.js";
|
||||||
import {
|
import {
|
||||||
normalizeNextcloudTalkAllowlist,
|
normalizeNextcloudTalkAllowlist,
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import {
|
|||||||
isRequestBodyLimitError,
|
isRequestBodyLimitError,
|
||||||
readRequestBodyWithLimit,
|
readRequestBodyWithLimit,
|
||||||
requestBodyErrorToText,
|
requestBodyErrorToText,
|
||||||
} from "openclaw/plugin-sdk/compat";
|
} from "openclaw/plugin-sdk/nextcloud-talk";
|
||||||
import { resolveNextcloudTalkAccount } from "./accounts.js";
|
import { resolveNextcloudTalkAccount } from "./accounts.js";
|
||||||
import { handleNextcloudTalkInbound } from "./inbound.js";
|
import { handleNextcloudTalkInbound } from "./inbound.js";
|
||||||
import { createNextcloudTalkReplayGuard } from "./replay-guard.js";
|
import { createNextcloudTalkReplayGuard } from "./replay-guard.js";
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ import {
|
|||||||
type ChannelOnboardingDmPolicy,
|
type ChannelOnboardingDmPolicy,
|
||||||
type OpenClawConfig,
|
type OpenClawConfig,
|
||||||
type WizardPrompter,
|
type WizardPrompter,
|
||||||
} from "openclaw/plugin-sdk/compat";
|
} from "openclaw/plugin-sdk/nextcloud-talk";
|
||||||
import {
|
import {
|
||||||
listNextcloudTalkAccountIds,
|
listNextcloudTalkAccountIds,
|
||||||
resolveDefaultNextcloudTalkAccountId,
|
resolveDefaultNextcloudTalkAccountId,
|
||||||
|
|||||||
@@ -3,14 +3,14 @@ import type {
|
|||||||
ChannelGroupContext,
|
ChannelGroupContext,
|
||||||
GroupPolicy,
|
GroupPolicy,
|
||||||
GroupToolPolicyConfig,
|
GroupToolPolicyConfig,
|
||||||
} from "openclaw/plugin-sdk/compat";
|
} from "openclaw/plugin-sdk/nextcloud-talk";
|
||||||
import {
|
import {
|
||||||
buildChannelKeyCandidates,
|
buildChannelKeyCandidates,
|
||||||
normalizeChannelSlug,
|
normalizeChannelSlug,
|
||||||
resolveChannelEntryMatchWithFallback,
|
resolveChannelEntryMatchWithFallback,
|
||||||
resolveMentionGatingWithBypass,
|
resolveMentionGatingWithBypass,
|
||||||
resolveNestedAllowlistDecision,
|
resolveNestedAllowlistDecision,
|
||||||
} from "openclaw/plugin-sdk/compat";
|
} from "openclaw/plugin-sdk/nextcloud-talk";
|
||||||
import type { NextcloudTalkRoomConfig } from "./types.js";
|
import type { NextcloudTalkRoomConfig } from "./types.js";
|
||||||
|
|
||||||
function normalizeAllowEntry(raw: string): string {
|
function normalizeAllowEntry(raw: string): string {
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import path from "node:path";
|
import path from "node:path";
|
||||||
import { createPersistentDedupe } from "openclaw/plugin-sdk/compat";
|
import { createPersistentDedupe } from "openclaw/plugin-sdk/nextcloud-talk";
|
||||||
|
|
||||||
const DEFAULT_REPLAY_TTL_MS = 24 * 60 * 60 * 1000;
|
const DEFAULT_REPLAY_TTL_MS = 24 * 60 * 60 * 1000;
|
||||||
const DEFAULT_MEMORY_MAX_SIZE = 1_000;
|
const DEFAULT_MEMORY_MAX_SIZE = 1_000;
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { readFileSync } from "node:fs";
|
import { readFileSync } from "node:fs";
|
||||||
import { fetchWithSsrFGuard } from "openclaw/plugin-sdk/compat";
|
import { fetchWithSsrFGuard } from "openclaw/plugin-sdk/nextcloud-talk";
|
||||||
import type { RuntimeEnv } from "openclaw/plugin-sdk/compat";
|
import type { RuntimeEnv } from "openclaw/plugin-sdk/nextcloud-talk";
|
||||||
import type { ResolvedNextcloudTalkAccount } from "./accounts.js";
|
import type { ResolvedNextcloudTalkAccount } from "./accounts.js";
|
||||||
import { normalizeResolvedSecretInputString } from "./secret-input.js";
|
import { normalizeResolvedSecretInputString } from "./secret-input.js";
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import type { PluginRuntime } from "openclaw/plugin-sdk/compat";
|
import type { PluginRuntime } from "openclaw/plugin-sdk/nextcloud-talk";
|
||||||
|
|
||||||
let runtime: PluginRuntime | null = null;
|
let runtime: PluginRuntime | null = null;
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import {
|
|||||||
hasConfiguredSecretInput,
|
hasConfiguredSecretInput,
|
||||||
normalizeResolvedSecretInputString,
|
normalizeResolvedSecretInputString,
|
||||||
normalizeSecretInputString,
|
normalizeSecretInputString,
|
||||||
} from "openclaw/plugin-sdk/compat";
|
} from "openclaw/plugin-sdk/nextcloud-talk";
|
||||||
import { z } from "zod";
|
import { z } from "zod";
|
||||||
|
|
||||||
export { hasConfiguredSecretInput, normalizeResolvedSecretInputString, normalizeSecretInputString };
|
export { hasConfiguredSecretInput, normalizeResolvedSecretInputString, normalizeSecretInputString };
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import type {
|
|||||||
DmPolicy,
|
DmPolicy,
|
||||||
GroupPolicy,
|
GroupPolicy,
|
||||||
SecretInput,
|
SecretInput,
|
||||||
} from "openclaw/plugin-sdk/compat";
|
} from "openclaw/plugin-sdk/nextcloud-talk";
|
||||||
|
|
||||||
export type { DmPolicy, GroupPolicy };
|
export type { DmPolicy, GroupPolicy };
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user