mirror of https://github.com/openclaw/openclaw.git
Plugins: internalize matrix and feishu SDK imports
This commit is contained in:
parent
1313767825
commit
889bb8a78a
|
|
@ -0,0 +1 @@
|
|||
export * from "openclaw/plugin-sdk/feishu";
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
import { DEFAULT_ACCOUNT_ID, normalizeAccountId } from "openclaw/plugin-sdk/account-id";
|
||||
import type { ClawdbotConfig } from "openclaw/plugin-sdk/feishu";
|
||||
import type { ClawdbotConfig } from "../runtime-api.js";
|
||||
import { normalizeResolvedSecretInputString, normalizeSecretInputString } from "./secret-input.js";
|
||||
import type {
|
||||
FeishuConfig,
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import type * as Lark from "@larksuiteoapi/node-sdk";
|
||||
import { Type } from "@sinclair/typebox";
|
||||
import type { OpenClawPluginApi } from "openclaw/plugin-sdk/feishu";
|
||||
import type { OpenClawPluginApi } from "../runtime-api.js";
|
||||
import { listEnabledFeishuAccounts } from "./accounts.js";
|
||||
import { createFeishuToolClient } from "./tool-account.js";
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,9 @@ import {
|
|||
resolveConfiguredBindingRoute,
|
||||
} from "openclaw/plugin-sdk/conversation-runtime";
|
||||
import { getSessionBindingService } from "openclaw/plugin-sdk/conversation-runtime";
|
||||
import type { ClawdbotConfig, RuntimeEnv } from "openclaw/plugin-sdk/feishu";
|
||||
import { deriveLastRoutePolicy } from "openclaw/plugin-sdk/routing";
|
||||
import { resolveAgentIdFromSessionKey } from "openclaw/plugin-sdk/routing";
|
||||
import type { ClawdbotConfig, RuntimeEnv } from "../runtime-api.js";
|
||||
import {
|
||||
buildAgentMediaPayload,
|
||||
buildPendingHistoryContextFromMap,
|
||||
|
|
@ -18,9 +20,7 @@ import {
|
|||
resolveOpenProviderRuntimeGroupPolicy,
|
||||
resolveDefaultGroupPolicy,
|
||||
warnMissingProviderGroupPolicyFallbackOnce,
|
||||
} from "openclaw/plugin-sdk/feishu";
|
||||
import { deriveLastRoutePolicy } from "openclaw/plugin-sdk/routing";
|
||||
import { resolveAgentIdFromSessionKey } from "openclaw/plugin-sdk/routing";
|
||||
} from "../runtime-api.js";
|
||||
import { resolveFeishuAccount } from "./accounts.js";
|
||||
import { createFeishuClient } from "./client.js";
|
||||
import { buildFeishuConversationId } from "./conversation-id.js";
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import type { ClawdbotConfig, RuntimeEnv } from "openclaw/plugin-sdk/feishu";
|
||||
import type { ClawdbotConfig, RuntimeEnv } from "../runtime-api.js";
|
||||
import { resolveFeishuAccount } from "./accounts.js";
|
||||
import { handleFeishuMessage, type FeishuMessageEvent } from "./bot.js";
|
||||
import { decodeFeishuCardAction, buildFeishuCardActionTextFallback } from "./card-interaction.js";
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import type { ClawdbotConfig, RuntimeEnv } from "openclaw/plugin-sdk/feishu";
|
||||
import type { ClawdbotConfig, RuntimeEnv } from "../runtime-api.js";
|
||||
import { createFeishuCardInteractionEnvelope } from "./card-interaction.js";
|
||||
import { FEISHU_APPROVAL_REQUEST_ACTION } from "./card-ux-approval.js";
|
||||
import { buildFeishuCardButton, buildFeishuCardInteractionContext } from "./card-ux-shared.js";
|
||||
|
|
|
|||
|
|
@ -6,7 +6,8 @@ import type {
|
|||
ChannelMessageActionAdapter,
|
||||
ChannelMessageToolDiscovery,
|
||||
} from "openclaw/plugin-sdk/channel-runtime";
|
||||
import type { ChannelMeta, ChannelPlugin, ClawdbotConfig } from "openclaw/plugin-sdk/feishu";
|
||||
import { createLazyRuntimeNamedExport } from "openclaw/plugin-sdk/lazy-runtime";
|
||||
import type { ChannelMeta, ChannelPlugin, ClawdbotConfig } from "../runtime-api.js";
|
||||
import {
|
||||
buildChannelConfigSchema,
|
||||
buildProbeChannelStatusSummary,
|
||||
|
|
@ -15,9 +16,8 @@ import {
|
|||
createDefaultChannelRuntimeState,
|
||||
DEFAULT_ACCOUNT_ID,
|
||||
PAIRING_APPROVED_MESSAGE,
|
||||
} from "openclaw/plugin-sdk/feishu";
|
||||
import type { ChannelMessageActionName } from "openclaw/plugin-sdk/feishu";
|
||||
import { createLazyRuntimeNamedExport } from "openclaw/plugin-sdk/lazy-runtime";
|
||||
} from "../runtime-api.js";
|
||||
import type { ChannelMessageActionName } from "../runtime-api.js";
|
||||
import {
|
||||
resolveFeishuAccount,
|
||||
resolveFeishuCredentials,
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import type * as Lark from "@larksuiteoapi/node-sdk";
|
||||
import type { OpenClawPluginApi } from "openclaw/plugin-sdk/feishu";
|
||||
import type { OpenClawPluginApi } from "../runtime-api.js";
|
||||
import { listEnabledFeishuAccounts } from "./accounts.js";
|
||||
import { FeishuChatSchema, type FeishuChatParams } from "./chat-schema.js";
|
||||
import { createFeishuClient } from "./client.js";
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import {
|
|||
createDedupeCache,
|
||||
createPersistentDedupe,
|
||||
readJsonFileWithFallback,
|
||||
} from "openclaw/plugin-sdk/feishu";
|
||||
} from "../runtime-api.js";
|
||||
|
||||
// Persistent TTL: 24 hours — survives restarts & WebSocket reconnects.
|
||||
const DEDUP_TTL_MS = 24 * 60 * 60 * 1000;
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ import {
|
|||
listDirectoryGroupEntriesFromMapKeysAndAllowFrom,
|
||||
listDirectoryUserEntriesFromAllowFromAndMapKeys,
|
||||
} from "openclaw/plugin-sdk/directory-runtime";
|
||||
import type { ClawdbotConfig } from "openclaw/plugin-sdk/feishu";
|
||||
import type { ClawdbotConfig } from "../runtime-api.js";
|
||||
import { resolveFeishuAccount } from "./accounts.js";
|
||||
import { normalizeFeishuTarget } from "./targets.js";
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import type { ClawdbotConfig } from "openclaw/plugin-sdk/feishu";
|
||||
import type { ClawdbotConfig } from "../runtime-api.js";
|
||||
import { resolveFeishuAccount } from "./accounts.js";
|
||||
import { createFeishuClient } from "./client.js";
|
||||
import {
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import { isAbsolute } from "node:path";
|
|||
import { basename } from "node:path";
|
||||
import type * as Lark from "@larksuiteoapi/node-sdk";
|
||||
import { Type } from "@sinclair/typebox";
|
||||
import type { OpenClawPluginApi } from "openclaw/plugin-sdk/feishu";
|
||||
import type { OpenClawPluginApi } from "../runtime-api.js";
|
||||
import { listEnabledFeishuAccounts } from "./accounts.js";
|
||||
import { FeishuDocSchema, type FeishuDocParams } from "./doc-schema.js";
|
||||
import { BATCH_SIZE, insertBlocksInBatches } from "./docx-batch-insert.js";
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import type * as Lark from "@larksuiteoapi/node-sdk";
|
||||
import type { OpenClawPluginApi } from "openclaw/plugin-sdk/feishu";
|
||||
import type { OpenClawPluginApi } from "../runtime-api.js";
|
||||
import { listEnabledFeishuAccounts } from "./accounts.js";
|
||||
import { FeishuDriveSchema, type FeishuDriveParams } from "./drive-schema.js";
|
||||
import { createFeishuToolClient, resolveAnyEnabledFeishuToolsConfig } from "./tool-account.js";
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import fs from "node:fs";
|
||||
import os from "node:os";
|
||||
import path from "node:path";
|
||||
import type { OpenClawConfig, PluginRuntime } from "openclaw/plugin-sdk/feishu";
|
||||
import type { OpenClawConfig, PluginRuntime } from "../runtime-api.js";
|
||||
import type { DynamicAgentCreationConfig } from "./types.js";
|
||||
|
||||
export type MaybeCreateDynamicAgentResult = {
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
import fs from "fs";
|
||||
import path from "path";
|
||||
import { Readable } from "stream";
|
||||
import { withTempDownloadPath, type ClawdbotConfig } from "openclaw/plugin-sdk/feishu";
|
||||
import { mediaKindFromMime } from "openclaw/plugin-sdk/media-runtime";
|
||||
import { withTempDownloadPath, type ClawdbotConfig } from "../runtime-api.js";
|
||||
import { resolveFeishuAccount } from "./accounts.js";
|
||||
import { createFeishuClient } from "./client.js";
|
||||
import { normalizeFeishuExternalKey } from "./external-keys.js";
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import * as crypto from "crypto";
|
||||
import * as Lark from "@larksuiteoapi/node-sdk";
|
||||
import type { ClawdbotConfig, RuntimeEnv, HistoryEntry } from "openclaw/plugin-sdk/feishu";
|
||||
import type { ClawdbotConfig, RuntimeEnv, HistoryEntry } from "../runtime-api.js";
|
||||
import { resolveFeishuAccount } from "./accounts.js";
|
||||
import { raceWithTimeoutAndAbort } from "./async.js";
|
||||
import {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import type { RuntimeEnv } from "openclaw/plugin-sdk/feishu";
|
||||
import type { RuntimeEnv } from "../runtime-api.js";
|
||||
import { probeFeishu } from "./probe.js";
|
||||
import type { ResolvedFeishuAccount } from "./types.js";
|
||||
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ import {
|
|||
type RuntimeEnv,
|
||||
WEBHOOK_ANOMALY_COUNTER_DEFAULTS as WEBHOOK_ANOMALY_COUNTER_DEFAULTS_FROM_SDK,
|
||||
WEBHOOK_RATE_LIMIT_DEFAULTS as WEBHOOK_RATE_LIMIT_DEFAULTS_FROM_SDK,
|
||||
} from "openclaw/plugin-sdk/feishu";
|
||||
} from "../runtime-api.js";
|
||||
|
||||
export const wsClients = new Map<string, Lark.WSClient>();
|
||||
export const httpServers = new Map<string, http.Server>();
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ import {
|
|||
readJsonBodyWithLimit,
|
||||
type RuntimeEnv,
|
||||
installRequestBodyLimitGuard,
|
||||
} from "openclaw/plugin-sdk/feishu";
|
||||
} from "../runtime-api.js";
|
||||
import { createFeishuWSClient } from "./client.js";
|
||||
import {
|
||||
botNames,
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import type { ClawdbotConfig, RuntimeEnv } from "openclaw/plugin-sdk/feishu";
|
||||
import type { ClawdbotConfig, RuntimeEnv } from "../runtime-api.js";
|
||||
import { listEnabledFeishuAccounts, resolveFeishuAccount } from "./accounts.js";
|
||||
import {
|
||||
monitorSingleAccount,
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import { createServer } from "node:http";
|
||||
import type { AddressInfo } from "node:net";
|
||||
import type { ClawdbotConfig } from "openclaw/plugin-sdk/feishu";
|
||||
import { vi } from "vitest";
|
||||
import type { ClawdbotConfig } from "../runtime-api.js";
|
||||
import type { monitorFeishuProvider } from "./monitor.js";
|
||||
|
||||
export async function getFreePort(): Promise<number> {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import fs from "fs";
|
||||
import path from "path";
|
||||
import type { ChannelOutboundAdapter } from "openclaw/plugin-sdk/feishu";
|
||||
import type { ChannelOutboundAdapter } from "../runtime-api.js";
|
||||
import { resolveFeishuAccount } from "./accounts.js";
|
||||
import { sendMediaFeishu } from "./media.js";
|
||||
import { getFeishuRuntime } from "./runtime.js";
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import type * as Lark from "@larksuiteoapi/node-sdk";
|
||||
import type { OpenClawPluginApi } from "openclaw/plugin-sdk/feishu";
|
||||
import type { OpenClawPluginApi } from "../runtime-api.js";
|
||||
import { listEnabledFeishuAccounts } from "./accounts.js";
|
||||
import { FeishuPermSchema, type FeishuPermParams } from "./perm-schema.js";
|
||||
import { createFeishuToolClient, resolveAnyEnabledFeishuToolsConfig } from "./tool-account.js";
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import type { ClawdbotConfig } from "openclaw/plugin-sdk/feishu";
|
||||
import type { ClawdbotConfig } from "../runtime-api.js";
|
||||
import { resolveFeishuAccount } from "./accounts.js";
|
||||
import { createFeishuClient } from "./client.js";
|
||||
|
||||
|
|
|
|||
|
|
@ -1,9 +1,5 @@
|
|||
import type {
|
||||
AllowlistMatch,
|
||||
ChannelGroupContext,
|
||||
GroupToolPolicyConfig,
|
||||
} from "openclaw/plugin-sdk/feishu";
|
||||
import { evaluateSenderGroupAccessForPolicy } from "openclaw/plugin-sdk/feishu";
|
||||
import type { AllowlistMatch, ChannelGroupContext, GroupToolPolicyConfig } from "../runtime-api.js";
|
||||
import { evaluateSenderGroupAccessForPolicy } from "../runtime-api.js";
|
||||
import { normalizeFeishuTarget } from "./targets.js";
|
||||
import type { FeishuConfig, FeishuGroupConfig } from "./types.js";
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import type { ClawdbotConfig } from "openclaw/plugin-sdk/feishu";
|
||||
import type { ClawdbotConfig } from "../runtime-api.js";
|
||||
import { resolveFeishuAccount } from "./accounts.js";
|
||||
import { createFeishuClient } from "./client.js";
|
||||
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ import {
|
|||
type OutboundIdentity,
|
||||
type ReplyPayload,
|
||||
type RuntimeEnv,
|
||||
} from "openclaw/plugin-sdk/feishu";
|
||||
} from "../runtime-api.js";
|
||||
import { resolveFeishuAccount } from "./accounts.js";
|
||||
import { createFeishuClient } from "./client.js";
|
||||
import { sendMediaFeishu } from "./media.js";
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import type { PluginRuntime } from "openclaw/plugin-sdk/feishu";
|
||||
import { createPluginRuntimeStore } from "openclaw/plugin-sdk/runtime-store";
|
||||
import type { PluginRuntime } from "../runtime-api.js";
|
||||
|
||||
const { setRuntime: setFeishuRuntime, getRuntime: getFeishuRuntime } =
|
||||
createPluginRuntimeStore<PluginRuntime>("Feishu runtime not initialized");
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ import {
|
|||
hasConfiguredSecretInput,
|
||||
normalizeResolvedSecretInputString,
|
||||
normalizeSecretInputString,
|
||||
} from "openclaw/plugin-sdk/feishu";
|
||||
} from "../runtime-api.js";
|
||||
|
||||
export {
|
||||
buildSecretInputSchema,
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import type { ClawdbotConfig } from "openclaw/plugin-sdk/feishu";
|
||||
import type { ClawdbotConfig } from "../runtime-api.js";
|
||||
import { resolveFeishuAccount } from "./accounts.js";
|
||||
import { createFeishuClient } from "./client.js";
|
||||
import { resolveReceiveIdType, normalizeFeishuTarget } from "./targets.js";
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import type { ClawdbotConfig } from "openclaw/plugin-sdk/feishu";
|
||||
import type { ClawdbotConfig } from "../runtime-api.js";
|
||||
import { resolveFeishuAccount } from "./accounts.js";
|
||||
import { createFeishuClient } from "./client.js";
|
||||
import type { MentionTarget } from "./mention.js";
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
*/
|
||||
|
||||
import type { Client } from "@larksuiteoapi/node-sdk";
|
||||
import { fetchWithSsrFGuard } from "openclaw/plugin-sdk/feishu";
|
||||
import { fetchWithSsrFGuard } from "../runtime-api.js";
|
||||
import { resolveFeishuCardTemplate, type CardHeaderConfig } from "./send.js";
|
||||
import type { FeishuDomain } from "./types.js";
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import type { OpenClawPluginApi } from "openclaw/plugin-sdk/feishu";
|
||||
import type { OpenClawPluginApi } from "../runtime-api.js";
|
||||
import { buildFeishuConversationId, parseFeishuConversationId } from "./conversation-id.js";
|
||||
import { normalizeFeishuTarget } from "./targets.js";
|
||||
import { getFeishuThreadBindingManager } from "./thread-bindings.js";
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import type * as Lark from "@larksuiteoapi/node-sdk";
|
||||
import type { OpenClawPluginApi } from "openclaw/plugin-sdk/feishu";
|
||||
import type { OpenClawPluginApi } from "../runtime-api.js";
|
||||
import { resolveFeishuAccount } from "./accounts.js";
|
||||
import { createFeishuClient } from "./client.js";
|
||||
import { resolveToolsConfig } from "./tools-config.js";
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import type { AnyAgentTool, OpenClawPluginApi } from "openclaw/plugin-sdk/feishu";
|
||||
import type { AnyAgentTool, OpenClawPluginApi } from "../runtime-api.js";
|
||||
|
||||
type ToolContextLike = {
|
||||
agentAccountId?: string;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import type { BaseProbeResult } from "openclaw/plugin-sdk/feishu";
|
||||
import type { BaseProbeResult } from "../runtime-api.js";
|
||||
import type {
|
||||
FeishuConfigSchema,
|
||||
FeishuGroupSchema,
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import type { ClawdbotConfig, RuntimeEnv } from "openclaw/plugin-sdk/feishu";
|
||||
import type { ClawdbotConfig, RuntimeEnv } from "../runtime-api.js";
|
||||
import { resolveFeishuAccount } from "./accounts.js";
|
||||
import { createFeishuClient } from "./client.js";
|
||||
import { getFeishuRuntime } from "./runtime.js";
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import type * as Lark from "@larksuiteoapi/node-sdk";
|
||||
import type { OpenClawPluginApi } from "openclaw/plugin-sdk/feishu";
|
||||
import type { OpenClawPluginApi } from "../runtime-api.js";
|
||||
import { listEnabledFeishuAccounts } from "./accounts.js";
|
||||
import { createFeishuToolClient, resolveAnyEnabledFeishuToolsConfig } from "./tool-account.js";
|
||||
import {
|
||||
|
|
|
|||
|
|
@ -0,0 +1 @@
|
|||
export * from "openclaw/plugin-sdk/matrix";
|
||||
|
|
@ -6,7 +6,7 @@ import {
|
|||
type ChannelMessageActionContext,
|
||||
type ChannelMessageActionName,
|
||||
type ChannelToolSend,
|
||||
} from "openclaw/plugin-sdk/matrix";
|
||||
} from "../runtime-api.js";
|
||||
import { resolveMatrixAccount } from "./matrix/accounts.js";
|
||||
import { handleMatrixAction } from "./tool-actions.js";
|
||||
import type { CoreConfig } from "./types.js";
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ import {
|
|||
collectAllowlistProviderGroupPolicyWarnings,
|
||||
} from "openclaw/plugin-sdk/channel-policy";
|
||||
import { createLazyRuntimeNamedExport } from "openclaw/plugin-sdk/lazy-runtime";
|
||||
import { buildTrafficStatusSummary } from "../../shared/channel-status-summary.js";
|
||||
import {
|
||||
buildChannelConfigSchema,
|
||||
buildProbeChannelStatusSummary,
|
||||
|
|
@ -15,8 +16,7 @@ import {
|
|||
DEFAULT_ACCOUNT_ID,
|
||||
PAIRING_APPROVED_MESSAGE,
|
||||
type ChannelPlugin,
|
||||
} from "openclaw/plugin-sdk/matrix";
|
||||
import { buildTrafficStatusSummary } from "../../shared/channel-status-summary.js";
|
||||
} from "../runtime-api.js";
|
||||
import { matrixMessageActions } from "./actions.js";
|
||||
import { MatrixConfigSchema } from "./config-schema.js";
|
||||
import {
|
||||
|
|
|
|||
|
|
@ -4,8 +4,8 @@ import {
|
|||
DmPolicySchema,
|
||||
GroupPolicySchema,
|
||||
} from "openclaw/plugin-sdk/channel-config-schema";
|
||||
import { MarkdownConfigSchema, ToolPolicySchema } from "openclaw/plugin-sdk/matrix";
|
||||
import { z } from "zod";
|
||||
import { MarkdownConfigSchema, ToolPolicySchema } from "../runtime-api.js";
|
||||
import { buildSecretInputSchema } from "./secret-input.js";
|
||||
|
||||
const matrixActionSchema = z
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import type { ChannelDirectoryEntry } from "openclaw/plugin-sdk/matrix";
|
||||
import type { ChannelDirectoryEntry } from "../runtime-api.js";
|
||||
import { resolveMatrixAuth } from "./matrix/client.js";
|
||||
|
||||
type MatrixUserResult = {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import type { ChannelGroupContext, GroupToolPolicyConfig } from "openclaw/plugin-sdk/matrix";
|
||||
import type { ChannelGroupContext, GroupToolPolicyConfig } from "../runtime-api.js";
|
||||
import { resolveMatrixAccountConfig } from "./matrix/accounts.js";
|
||||
import { resolveMatrixRoomConfig } from "./matrix/monitor/rooms.js";
|
||||
import type { CoreConfig } from "./types.js";
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import { normalizeAccountId } from "openclaw/plugin-sdk/account-id";
|
||||
import { createAccountListHelpers } from "openclaw/plugin-sdk/matrix";
|
||||
import { createAccountListHelpers } from "../../runtime-api.js";
|
||||
import { hasConfiguredSecretInput } from "../secret-input.js";
|
||||
import type { CoreConfig, MatrixConfig } from "../types.js";
|
||||
import { resolveMatrixConfigForAccount } from "./client.js";
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import { DEFAULT_ACCOUNT_ID, normalizeAccountId } from "openclaw/plugin-sdk/account-id";
|
||||
import { fetchWithSsrFGuard } from "openclaw/plugin-sdk/matrix";
|
||||
import { fetchWithSsrFGuard } from "../../../runtime-api.js";
|
||||
import { getMatrixRuntime } from "../../runtime.js";
|
||||
import {
|
||||
normalizeResolvedSecretInputString,
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ import fs from "node:fs";
|
|||
import { createRequire } from "node:module";
|
||||
import path from "node:path";
|
||||
import { fileURLToPath } from "node:url";
|
||||
import { runPluginCommandWithTimeout, type RuntimeEnv } from "openclaw/plugin-sdk/matrix";
|
||||
import { runPluginCommandWithTimeout, type RuntimeEnv } from "../../runtime-api.js";
|
||||
|
||||
const MATRIX_SDK_PACKAGE = "@vector-im/matrix-bot-sdk";
|
||||
const MATRIX_CRYPTO_DOWNLOAD_HELPER = "@matrix-org/matrix-sdk-crypto-nodejs/download-lib.js";
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import {
|
|||
readStoreAllowFromForDmPolicy,
|
||||
resolveDmGroupAccessWithLists,
|
||||
resolveSenderScopedGroupPolicy,
|
||||
} from "openclaw/plugin-sdk/matrix";
|
||||
} from "../../../runtime-api.js";
|
||||
import {
|
||||
normalizeMatrixAllowList,
|
||||
resolveMatrixAllowListMatch,
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ import {
|
|||
normalizeStringEntries,
|
||||
resolveCompiledAllowlistMatch,
|
||||
type AllowlistMatch,
|
||||
} from "openclaw/plugin-sdk/matrix";
|
||||
} from "../../../runtime-api.js";
|
||||
|
||||
function normalizeAllowList(list?: Array<string | number>) {
|
||||
return normalizeStringEntries(list);
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import type { MatrixClient } from "@vector-im/matrix-bot-sdk";
|
||||
import type { RuntimeEnv } from "openclaw/plugin-sdk/matrix";
|
||||
import type { RuntimeEnv } from "../../../runtime-api.js";
|
||||
import { getMatrixRuntime } from "../../runtime.js";
|
||||
import type { CoreConfig } from "../../types.js";
|
||||
import { loadMatrixSdk } from "../sdk-runtime.js";
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import type { MatrixClient } from "@vector-im/matrix-bot-sdk";
|
||||
import type { PluginRuntime, RuntimeLogger } from "openclaw/plugin-sdk/matrix";
|
||||
import type { PluginRuntime, RuntimeLogger } from "../../../runtime-api.js";
|
||||
import type { MatrixAuth } from "../client.js";
|
||||
import { sendReadReceiptMatrix } from "../send.js";
|
||||
import type { MatrixRawEvent } from "./types.js";
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ import {
|
|||
type PluginRuntime,
|
||||
type RuntimeEnv,
|
||||
type RuntimeLogger,
|
||||
} from "openclaw/plugin-sdk/matrix";
|
||||
} from "../../../runtime-api.js";
|
||||
import type { CoreConfig, MatrixRoomConfig, ReplyToMode } from "../../types.js";
|
||||
import { fetchEventSummary } from "../actions/summary.js";
|
||||
import {
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ import {
|
|||
summarizeMapping,
|
||||
warnMissingProviderGroupPolicyFallbackOnce,
|
||||
type RuntimeEnv,
|
||||
} from "openclaw/plugin-sdk/matrix";
|
||||
} from "../../../runtime-api.js";
|
||||
import { resolveMatrixTargets } from "../../resolve-targets.js";
|
||||
import { getMatrixRuntime } from "../../runtime.js";
|
||||
import type { CoreConfig, MatrixConfig, MatrixRoomConfig, ReplyToMode } from "../../types.js";
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ import {
|
|||
formatLocationText,
|
||||
toLocationContext,
|
||||
type NormalizedLocation,
|
||||
} from "openclaw/plugin-sdk/matrix";
|
||||
} from "../../../runtime-api.js";
|
||||
import { EventType } from "./types.js";
|
||||
|
||||
export type MatrixLocationPayload = {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import type { MatrixClient } from "@vector-im/matrix-bot-sdk";
|
||||
import type { MarkdownTableMode, ReplyPayload, RuntimeEnv } from "openclaw/plugin-sdk/matrix";
|
||||
import type { MarkdownTableMode, ReplyPayload, RuntimeEnv } from "../../../runtime-api.js";
|
||||
import { getMatrixRuntime } from "../../runtime.js";
|
||||
import { sendMessageMatrix } from "../send.js";
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { buildChannelKeyCandidates, resolveChannelEntryMatch } from "openclaw/plugin-sdk/matrix";
|
||||
import { buildChannelKeyCandidates, resolveChannelEntryMatch } from "../../../runtime-api.js";
|
||||
import type { MatrixRoomConfig } from "../../types.js";
|
||||
|
||||
export type MatrixRoomConfigResolved = {
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
* - m.poll.end - Closes a poll
|
||||
*/
|
||||
|
||||
import type { PollInput } from "openclaw/plugin-sdk/matrix";
|
||||
import type { PollInput } from "../../runtime-api.js";
|
||||
|
||||
export const M_POLL_START = "m.poll.start" as const;
|
||||
export const M_POLL_RESPONSE = "m.poll.response" as const;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import type { BaseProbeResult } from "openclaw/plugin-sdk/matrix";
|
||||
import type { BaseProbeResult } from "../../runtime-api.js";
|
||||
import { createMatrixClient, isBunRuntime } from "./client.js";
|
||||
|
||||
export type MatrixProbe = BaseProbeResult & {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import type { MatrixClient } from "@vector-im/matrix-bot-sdk";
|
||||
import type { PollInput } from "openclaw/plugin-sdk/matrix";
|
||||
import type { PollInput } from "../../runtime-api.js";
|
||||
import { getMatrixRuntime } from "../runtime.js";
|
||||
import { buildPollStartContent, M_POLL_START } from "./poll-types.js";
|
||||
import { enqueueSend } from "./send-queue.js";
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import { resolveOutboundSendDep } from "openclaw/plugin-sdk/channel-runtime";
|
||||
import type { ChannelOutboundAdapter } from "openclaw/plugin-sdk/matrix";
|
||||
import type { ChannelOutboundAdapter } from "../runtime-api.js";
|
||||
import { sendMessageMatrix, sendPollMatrix } from "./matrix/send.js";
|
||||
import { getMatrixRuntime } from "./runtime.js";
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import type {
|
|||
ChannelResolveKind,
|
||||
ChannelResolveResult,
|
||||
RuntimeEnv,
|
||||
} from "openclaw/plugin-sdk/matrix";
|
||||
} from "../runtime-api.js";
|
||||
import { listMatrixDirectoryGroupsLive, listMatrixDirectoryPeersLive } from "./directory-live.js";
|
||||
|
||||
function findExactDirectoryMatches(
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import type { PluginRuntime } from "openclaw/plugin-sdk/matrix";
|
||||
import { createPluginRuntimeStore } from "openclaw/plugin-sdk/runtime-store";
|
||||
import type { PluginRuntime } from "../runtime-api.js";
|
||||
|
||||
const { setRuntime: setMatrixRuntime, getRuntime: getMatrixRuntime } =
|
||||
createPluginRuntimeStore<PluginRuntime>("Matrix runtime not initialized");
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ import {
|
|||
hasConfiguredSecretInput,
|
||||
normalizeResolvedSecretInputString,
|
||||
normalizeSecretInputString,
|
||||
} from "openclaw/plugin-sdk/matrix";
|
||||
} from "../runtime-api.js";
|
||||
|
||||
export {
|
||||
buildSecretInputSchema,
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ import {
|
|||
readNumberParam,
|
||||
readReactionParams,
|
||||
readStringParam,
|
||||
} from "openclaw/plugin-sdk/matrix";
|
||||
} from "../runtime-api.js";
|
||||
import {
|
||||
deleteMatrixMessage,
|
||||
editMatrixMessage,
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import type { DmPolicy, GroupPolicy, SecretInput } from "openclaw/plugin-sdk/matrix";
|
||||
import type { DmPolicy, GroupPolicy, SecretInput } from "../runtime-api.js";
|
||||
export type { DmPolicy, GroupPolicy };
|
||||
|
||||
export type ReplyToMode = "off" | "first" | "all";
|
||||
|
|
|
|||
|
|
@ -122,8 +122,10 @@ const LOCAL_EXTENSION_API_BARREL_GUARDS = [
|
|||
"device-pair",
|
||||
"diagnostics-otel",
|
||||
"diffs",
|
||||
"feishu",
|
||||
"llm-task",
|
||||
"line",
|
||||
"matrix",
|
||||
"mattermost",
|
||||
"memory-lancedb",
|
||||
"nextcloud-talk",
|
||||
|
|
|
|||
Loading…
Reference in New Issue