Plugins: internalize nextcloud talk SDK imports

This commit is contained in:
Vincent Koc 2026-03-17 15:55:34 -07:00
parent e7422716bb
commit af63b72901
13 changed files with 20 additions and 18 deletions

View File

@ -0,0 +1 @@
export * from "openclaw/plugin-sdk/nextcloud-talk";

View File

@ -4,7 +4,7 @@ import {
DEFAULT_ACCOUNT_ID,
normalizeAccountId,
resolveAccountWithDefaultFallback,
} from "openclaw/plugin-sdk/nextcloud-talk";
} from "../runtime-api.js";
import { normalizeResolvedSecretInputString } from "./secret-input.js";
import type { CoreConfig, NextcloudTalkAccountConfig } from "./types.js";

View File

@ -6,6 +6,7 @@ import {
collectAllowlistProviderGroupPolicyWarnings,
collectOpenGroupPolicyRouteAllowlistWarnings,
} from "openclaw/plugin-sdk/channel-policy";
import { runStoppablePassiveMonitor } from "../../shared/passive-monitor.js";
import {
buildBaseChannelStatusSummary,
buildChannelConfigSchema,
@ -16,8 +17,7 @@ import {
setAccountEnabledInConfigSection,
type ChannelPlugin,
type OpenClawConfig,
} from "openclaw/plugin-sdk/nextcloud-talk";
import { runStoppablePassiveMonitor } from "../../shared/passive-monitor.js";
} from "../runtime-api.js";
import {
listNextcloudTalkAccountIds,
resolveDefaultNextcloudTalkAccountId,

View File

@ -1,3 +1,5 @@
import { z } from "zod";
import { requireChannelOpenAllowFrom } from "../../shared/config-schema-helpers.js";
import {
BlockStreamingCoalesceSchema,
DmConfigSchema,
@ -7,9 +9,7 @@ import {
ReplyRuntimeConfigSchemaShape,
ToolPolicySchema,
requireOpenAllowFrom,
} from "openclaw/plugin-sdk/nextcloud-talk";
import { z } from "zod";
import { requireChannelOpenAllowFrom } from "../../shared/config-schema-helpers.js";
} from "../runtime-api.js";
import { buildSecretInputSchema } from "./secret-input.js";
export const NextcloudTalkRoomSchema = z

View File

@ -14,7 +14,7 @@ import {
type OutboundReplyPayload,
type OpenClawConfig,
type RuntimeEnv,
} from "openclaw/plugin-sdk/nextcloud-talk";
} from "../runtime-api.js";
import type { ResolvedNextcloudTalkAccount } from "./accounts.js";
import {
normalizeNextcloudTalkAllowlist,

View File

@ -1,12 +1,12 @@
import { createServer, type IncomingMessage, type Server, type ServerResponse } from "node:http";
import os from "node:os";
import { resolveLoggerBackedRuntime } from "../../shared/runtime.js";
import {
type RuntimeEnv,
isRequestBodyLimitError,
readRequestBodyWithLimit,
requestBodyErrorToText,
} from "openclaw/plugin-sdk/nextcloud-talk";
import { resolveLoggerBackedRuntime } from "../../shared/runtime.js";
} from "../runtime-api.js";
import { resolveNextcloudTalkAccount } from "./accounts.js";
import { handleNextcloudTalkInbound } from "./inbound.js";
import { createNextcloudTalkReplayGuard } from "./replay-guard.js";

View File

@ -3,7 +3,7 @@ import type {
ChannelGroupContext,
GroupPolicy,
GroupToolPolicyConfig,
} from "openclaw/plugin-sdk/nextcloud-talk";
} from "../runtime-api.js";
import {
buildChannelKeyCandidates,
evaluateMatchedGroupAccessForPolicy,
@ -11,7 +11,7 @@ import {
resolveChannelEntryMatchWithFallback,
resolveMentionGatingWithBypass,
resolveNestedAllowlistDecision,
} from "openclaw/plugin-sdk/nextcloud-talk";
} from "../runtime-api.js";
import type { NextcloudTalkRoomConfig } from "./types.js";
function normalizeAllowEntry(raw: string): string {

View File

@ -1,5 +1,5 @@
import path from "node:path";
import { createPersistentDedupe } from "openclaw/plugin-sdk/nextcloud-talk";
import { createPersistentDedupe } from "../runtime-api.js";
const DEFAULT_REPLAY_TTL_MS = 24 * 60 * 60 * 1000;
const DEFAULT_MEMORY_MAX_SIZE = 1_000;

View File

@ -1,6 +1,5 @@
import { readFileSync } from "node:fs";
import { fetchWithSsrFGuard } from "openclaw/plugin-sdk/nextcloud-talk";
import type { RuntimeEnv } from "openclaw/plugin-sdk/nextcloud-talk";
import { fetchWithSsrFGuard, type RuntimeEnv } from "../runtime-api.js";
import type { ResolvedNextcloudTalkAccount } from "./accounts.js";
import { normalizeResolvedSecretInputString } from "./secret-input.js";

View File

@ -1,5 +1,5 @@
import type { PluginRuntime } from "openclaw/plugin-sdk/nextcloud-talk";
import { createPluginRuntimeStore } from "openclaw/plugin-sdk/runtime-store";
import type { PluginRuntime } from "../runtime-api.js";
const { setRuntime: setNextcloudTalkRuntime, getRuntime: getNextcloudTalkRuntime } =
createPluginRuntimeStore<PluginRuntime>("Nextcloud Talk runtime not initialized");

View File

@ -3,7 +3,7 @@ import {
hasConfiguredSecretInput,
normalizeResolvedSecretInputString,
normalizeSecretInputString,
} from "openclaw/plugin-sdk/nextcloud-talk";
} from "../runtime-api.js";
export {
buildSecretInputSchema,

View File

@ -4,7 +4,7 @@ import type {
DmPolicy,
GroupPolicy,
SecretInput,
} from "openclaw/plugin-sdk/nextcloud-talk";
} from "../runtime-api.js";
export type { DmPolicy, GroupPolicy };

View File

@ -123,6 +123,7 @@ const LOCAL_EXTENSION_API_BARREL_GUARDS = [
"llm-task",
"line",
"memory-lancedb",
"nextcloud-talk",
"synology-chat",
"talk-voice",
"thread-ownership",
@ -260,7 +261,8 @@ function collectExtensionFiles(extensionId: string): string[] {
fullPath.includes(".test-") ||
fullPath.includes(".spec.") ||
fullPath.includes(".fixture.") ||
fullPath.includes(".snap")
fullPath.includes(".snap") ||
fullPath.endsWith("/runtime-api.ts")
) {
continue;
}