Plugins: internalize nextcloud talk SDK imports
This commit is contained in:
parent
e7422716bb
commit
af63b72901
1
extensions/nextcloud-talk/runtime-api.ts
Normal file
1
extensions/nextcloud-talk/runtime-api.ts
Normal file
@ -0,0 +1 @@
|
||||
export * from "openclaw/plugin-sdk/nextcloud-talk";
|
||||
@ -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";
|
||||
|
||||
|
||||
@ -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,
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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,
|
||||
|
||||
@ -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";
|
||||
|
||||
@ -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 {
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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";
|
||||
|
||||
|
||||
@ -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");
|
||||
|
||||
@ -3,7 +3,7 @@ import {
|
||||
hasConfiguredSecretInput,
|
||||
normalizeResolvedSecretInputString,
|
||||
normalizeSecretInputString,
|
||||
} from "openclaw/plugin-sdk/nextcloud-talk";
|
||||
} from "../runtime-api.js";
|
||||
|
||||
export {
|
||||
buildSecretInputSchema,
|
||||
|
||||
@ -4,7 +4,7 @@ import type {
|
||||
DmPolicy,
|
||||
GroupPolicy,
|
||||
SecretInput,
|
||||
} from "openclaw/plugin-sdk/nextcloud-talk";
|
||||
} from "../runtime-api.js";
|
||||
|
||||
export type { DmPolicy, GroupPolicy };
|
||||
|
||||
|
||||
@ -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;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user