mirror of
https://github.com/openclaw/openclaw.git
synced 2026-06-06 05:51:15 +08:00
docs: document messaging extension sources
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
// Matrix API module exposes the plugin public contract.
|
||||
export { matrixPlugin } from "./src/channel.js";
|
||||
export { createMatrixSetupWizardProxy, matrixSetupAdapter } from "./src/setup-core.js";
|
||||
export { matrixOnboardingAdapter } from "./src/setup-surface.js";
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Matrix plugin module implements auth presence behavior.
|
||||
import fs from "node:fs";
|
||||
import os from "node:os";
|
||||
import path from "node:path";
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Matrix plugin module implements cli metadata behavior.
|
||||
import { definePluginEntry } from "openclaw/plugin-sdk/plugin-entry";
|
||||
import { registerMatrixCliMetadata } from "./src/cli-metadata.js";
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Matrix API module exposes the plugin public contract.
|
||||
export {
|
||||
createMatrixThreadBindingManager,
|
||||
resetMatrixThreadBindingsForTests,
|
||||
|
||||
@@ -1 +1,2 @@
|
||||
// Matrix API module exposes the plugin public contract.
|
||||
export { normalizeCompatibilityConfig, legacyConfigRules } from "./src/doctor-contract.js";
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Matrix API module exposes the plugin public contract.
|
||||
export * from "./src/account-selection.js";
|
||||
export * from "./src/env-vars.js";
|
||||
export * from "./src/storage-paths.js";
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Matrix tests cover index plugin behavior.
|
||||
import { createTestPluginApi } from "openclaw/plugin-sdk/plugin-test-api";
|
||||
import { describe, expect, it, vi } from "vitest";
|
||||
import { registerMatrixCliMetadata } from "./cli-metadata.js";
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Matrix plugin entrypoint registers its OpenClaw integration.
|
||||
import {
|
||||
defineBundledChannelEntry,
|
||||
type OpenClawPluginApi,
|
||||
|
||||
@@ -1 +1,2 @@
|
||||
// Matrix plugin module implements plugin entry.handlers behavior.
|
||||
export * from "./src/plugin-entry.runtime.ts";
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Matrix API module exposes the plugin public contract.
|
||||
export {
|
||||
type MatrixResolvedStringField,
|
||||
type MatrixResolvedStringValues,
|
||||
|
||||
@@ -1 +1,2 @@
|
||||
// Matrix API module exposes the plugin public contract.
|
||||
export * from "./src/matrix-migration.runtime.js";
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Matrix API module exposes the plugin public contract.
|
||||
export {
|
||||
channelSecrets,
|
||||
collectRuntimeConfigAssignments,
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Matrix plugin module implements setup entry behavior.
|
||||
import { defineBundledChannelSetupEntry } from "openclaw/plugin-sdk/channel-entry-contract";
|
||||
|
||||
export default defineBundledChannelSetupEntry({
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Matrix tests cover account selection plugin behavior.
|
||||
import type { OpenClawConfig } from "openclaw/plugin-sdk/config-contracts";
|
||||
import { describe, expect, it } from "vitest";
|
||||
import {
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Matrix plugin module implements account selection behavior.
|
||||
import {
|
||||
listCombinedAccountIds,
|
||||
listConfiguredAccountIds,
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Matrix tests cover actions.account propagation plugin behavior.
|
||||
import { beforeEach, describe, expect, it, vi } from "vitest";
|
||||
import type { ChannelMessageActionContext } from "../runtime-api.js";
|
||||
import type { CoreConfig } from "./types.js";
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Matrix tests cover actions plugin behavior.
|
||||
import { beforeEach, describe, expect, it } from "vitest";
|
||||
import type { PluginRuntime } from "../runtime-api.js";
|
||||
import { matrixMessageActions } from "./actions.js";
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Matrix plugin module implements actions behavior.
|
||||
import {
|
||||
createActionGate,
|
||||
readPositiveIntegerParam,
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Matrix tests cover approval auth plugin behavior.
|
||||
import { describe, expect, it } from "vitest";
|
||||
import { matrixApprovalAuth } from "./approval-auth.js";
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Matrix plugin module implements approval auth behavior.
|
||||
import {
|
||||
createResolvedApproverActionAuthAdapter,
|
||||
resolveApprovalApprovers,
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Matrix tests cover approval handler plugin behavior.
|
||||
import type {
|
||||
ExecApprovalRequest,
|
||||
PluginApprovalRequest,
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Matrix plugin module implements approval handler behavior.
|
||||
import { setTimeout as sleep } from "node:timers/promises";
|
||||
import type {
|
||||
ChannelApprovalCapabilityHandlerContext,
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Matrix plugin module implements approval ids behavior.
|
||||
import { normalizeMatrixUserId } from "./matrix/monitor/allowlist.js";
|
||||
|
||||
export function normalizeMatrixApproverId(value: string | number): string | undefined {
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Matrix tests cover approval native plugin behavior.
|
||||
import type { OpenClawConfig } from "openclaw/plugin-sdk/config-contracts";
|
||||
import { describe, expect, it } from "vitest";
|
||||
import { matrixApprovalCapability } from "./approval-native.js";
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Matrix plugin module implements approval native behavior.
|
||||
import {
|
||||
createChannelApprovalCapability,
|
||||
createApproverRestrictedNativeApprovalCapability,
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Matrix plugin module implements approval reaction auth behavior.
|
||||
import { resolveApprovalApprovers } from "openclaw/plugin-sdk/approval-auth-runtime";
|
||||
import { normalizeMatrixApproverId } from "./approval-ids.js";
|
||||
import { resolveMatrixAccount } from "./matrix/accounts.js";
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Matrix tests cover approval reactions plugin behavior.
|
||||
import { afterEach, describe, expect, it, vi } from "vitest";
|
||||
import {
|
||||
buildMatrixApprovalReactionHint,
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Matrix plugin module implements approval reactions behavior.
|
||||
import type { ExecApprovalReplyDecision } from "openclaw/plugin-sdk/approval-runtime";
|
||||
import { getOptionalMatrixRuntime } from "./runtime.js";
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Matrix plugin module implements auth precedence behavior.
|
||||
import { DEFAULT_ACCOUNT_ID, normalizeAccountId } from "openclaw/plugin-sdk/account-id";
|
||||
|
||||
export type MatrixResolvedStringField =
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Matrix plugin module implements channel account paths behavior.
|
||||
import { createPairingPrefixStripper } from "openclaw/plugin-sdk/channel-pairing";
|
||||
import { PAIRING_APPROVED_MESSAGE } from "openclaw/plugin-sdk/channel-status";
|
||||
import type { PinnedDispatcherPolicy, SsrFPolicy } from "openclaw/plugin-sdk/ssrf-dispatcher";
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Matrix tests cover channel.account paths plugin behavior.
|
||||
import { PAIRING_APPROVED_MESSAGE } from "openclaw/plugin-sdk/channel-status";
|
||||
import { beforeEach, describe, expect, it, vi } from "vitest";
|
||||
import { createMatrixPairingText, createMatrixProbeAccount } from "./channel-account-paths.js";
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Matrix tests cover channelirectory plugin behavior.
|
||||
import { createRuntimeEnv } from "openclaw/plugin-sdk/plugin-test-runtime";
|
||||
import { beforeEach, describe, expect, it } from "vitest";
|
||||
import type { RuntimeEnv } from "../runtime-api.js";
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Matrix tests cover channel.message adapter plugin behavior.
|
||||
import {
|
||||
verifyChannelMessageAdapterCapabilityProofs,
|
||||
verifyChannelMessageLiveCapabilityAdapterProofs,
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Matrix tests cover channel.resolve plugin behavior.
|
||||
import { createNonExitingRuntimeEnv } from "openclaw/plugin-sdk/plugin-test-runtime";
|
||||
import { beforeEach, describe, expect, it, vi } from "vitest";
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Matrix plugin module implements channel behavior.
|
||||
import { listMatrixDirectoryGroupsLive, listMatrixDirectoryPeersLive } from "./directory-live.js";
|
||||
import { resolveMatrixAuth } from "./matrix/client.js";
|
||||
import { probeMatrix } from "./matrix/probe.js";
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Matrix tests cover channel.setup plugin behavior.
|
||||
import { beforeEach, describe, expect, it, vi } from "vitest";
|
||||
import type { RuntimeEnv } from "../runtime-api.js";
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Matrix plugin module implements channel.setup behavior.
|
||||
import { describeAccountSnapshot } from "openclaw/plugin-sdk/account-helpers";
|
||||
import type { ChannelPlugin } from "openclaw/plugin-sdk/channel-core";
|
||||
import { matrixConfigAdapter } from "./config-adapter.js";
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Matrix plugin module implements channel behavior.
|
||||
import { describeAccountSnapshot } from "openclaw/plugin-sdk/account-helpers";
|
||||
import {
|
||||
adaptScopedAccountAccessor,
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Matrix plugin module implements cli metadata behavior.
|
||||
import type { OpenClawPluginApi } from "openclaw/plugin-sdk/channel-plugin-common";
|
||||
|
||||
export function registerMatrixCliMetadata(api: OpenClawPluginApi) {
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Matrix tests cover cli plugin behavior.
|
||||
import { Command } from "commander";
|
||||
import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
|
||||
import { registerMatrixCli, resetMatrixCliStateForTests } from "./cli.js";
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Matrix plugin module implements cli behavior.
|
||||
import type { Command } from "commander";
|
||||
import { normalizeAccountId } from "openclaw/plugin-sdk/account-id";
|
||||
import { parseStrictInteger, timestampMsToIsoString } from "openclaw/plugin-sdk/number-runtime";
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Matrix helper module supports config adapter behavior.
|
||||
import { DEFAULT_ACCOUNT_ID } from "openclaw/plugin-sdk/account-id";
|
||||
import {
|
||||
adaptScopedAccountAccessor,
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Matrix tests cover config schema plugin behavior.
|
||||
import { describe, expect, it } from "vitest";
|
||||
import { MatrixConfigSchema } from "./config-schema.js";
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Matrix helper module supports config schema behavior.
|
||||
import { buildChannelConfigSchema } from "openclaw/plugin-sdk/channel-config-primitives";
|
||||
import {
|
||||
AllowFromListSchema,
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Matrix helper module supports config ui hints behavior.
|
||||
import type { ChannelConfigUiHint } from "openclaw/plugin-sdk/channel-core";
|
||||
|
||||
export const matrixChannelConfigUiHints = {
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Matrix tests cover directory live plugin behavior.
|
||||
import { beforeAll, beforeEach, describe, expect, it, vi } from "vitest";
|
||||
|
||||
const { matrixAuthedHttpClientCtorMock, requestJsonMock } = vi.hoisted(() => ({
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Matrix plugin module implements directory live behavior.
|
||||
import {
|
||||
normalizeLowercaseStringOrEmpty,
|
||||
normalizeOptionalString,
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Matrix plugin module implements doctor contract behavior.
|
||||
import type {
|
||||
ChannelDoctorConfigMutation,
|
||||
ChannelDoctorLegacyConfigRule,
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Matrix tests cover doctor plugin behavior.
|
||||
import fs from "node:fs/promises";
|
||||
import { tmpdir } from "node:os";
|
||||
import path from "node:path";
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Matrix plugin module implements doctor behavior.
|
||||
import type { ChannelDoctorAdapter } from "openclaw/plugin-sdk/channel-contract";
|
||||
import type { OpenClawConfig } from "openclaw/plugin-sdk/config-contracts";
|
||||
import {
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Matrix plugin module implements env vars behavior.
|
||||
import { normalizeAccountId, normalizeOptionalAccountId } from "openclaw/plugin-sdk/account-id";
|
||||
|
||||
const MATRIX_SCOPED_ENV_SUFFIXES = [
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Matrix tests cover exec approval resolver plugin behavior.
|
||||
import { beforeEach, describe, expect, it, vi } from "vitest";
|
||||
|
||||
const approvalRuntimeHoisted = vi.hoisted(() => ({
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Matrix plugin module implements exec approval resolver behavior.
|
||||
import { resolveApprovalOverGateway } from "openclaw/plugin-sdk/approval-gateway-runtime";
|
||||
import type { ExecApprovalReplyDecision } from "openclaw/plugin-sdk/approval-runtime";
|
||||
import type { OpenClawConfig } from "openclaw/plugin-sdk/config-contracts";
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Matrix tests cover exec approvals plugin behavior.
|
||||
import fs from "node:fs";
|
||||
import os from "node:os";
|
||||
import path from "node:path";
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Matrix plugin module implements exec approvals behavior.
|
||||
import { resolveApprovalApprovers } from "openclaw/plugin-sdk/approval-auth-runtime";
|
||||
import {
|
||||
createChannelExecApprovalProfile,
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Matrix tests cover group mentions plugin behavior.
|
||||
import { describe, expect, it } from "vitest";
|
||||
import { resolveMatrixGroupToolPolicy } from "./group-mentions.js";
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Matrix plugin module implements group mentions behavior.
|
||||
import { resolveMatrixAccountConfig } from "./matrix/accounts.js";
|
||||
import { resolveMatrixRoomConfig } from "./matrix/monitor/rooms.js";
|
||||
import { normalizeMatrixResolvableTarget } from "./matrix/target-ids.js";
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Matrix tests cover legacy crypto inspector availability plugin behavior.
|
||||
import path from "node:path";
|
||||
import { beforeEach, describe, expect, it, vi } from "vitest";
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Matrix plugin module implements legacy crypto inspector availability behavior.
|
||||
import fs from "node:fs";
|
||||
import path from "node:path";
|
||||
import { fileURLToPath } from "node:url";
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Matrix tests cover legacy crypto plugin behavior.
|
||||
import fs from "node:fs";
|
||||
import path from "node:path";
|
||||
import type { OpenClawConfig } from "openclaw/plugin-sdk/config-contracts";
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Matrix plugin module implements legacy crypto behavior.
|
||||
import fs from "node:fs";
|
||||
import os from "node:os";
|
||||
import path from "node:path";
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Matrix tests cover legacy state plugin behavior.
|
||||
import fs from "node:fs";
|
||||
import path from "node:path";
|
||||
import type { OpenClawConfig } from "openclaw/plugin-sdk/config-contracts";
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Matrix plugin module implements legacy state behavior.
|
||||
import fs from "node:fs";
|
||||
import os from "node:os";
|
||||
import path from "node:path";
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Matrix plugin module implements matrix migration behavior.
|
||||
export { autoMigrateLegacyMatrixState, detectLegacyMatrixState } from "./legacy-state.js";
|
||||
export { autoPrepareLegacyMatrixCrypto, detectLegacyMatrixCrypto } from "./legacy-crypto.js";
|
||||
export {
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Matrix helper module supports account config behavior.
|
||||
import { normalizeAccountId } from "openclaw/plugin-sdk/account-id";
|
||||
import { DEFAULT_ACCOUNT_ID } from "openclaw/plugin-sdk/account-id";
|
||||
import {
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Matrix tests cover accounts.readiness plugin behavior.
|
||||
import { describe, expect, it } from "vitest";
|
||||
import { installMatrixTestRuntime } from "../test-runtime.js";
|
||||
import type { CoreConfig } from "../types.js";
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Matrix tests cover accounts plugin behavior.
|
||||
import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
|
||||
import { getMatrixScopedEnvVarNames } from "../env-vars.js";
|
||||
import type { CoreConfig } from "../types.js";
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Matrix plugin module implements accounts behavior.
|
||||
import { DEFAULT_ACCOUNT_ID, normalizeAccountId } from "openclaw/plugin-sdk/account-id";
|
||||
import { hasConfiguredSecretInput } from "openclaw/plugin-sdk/secret-input-runtime";
|
||||
import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Matrix plugin module implements actions behavior.
|
||||
export type {
|
||||
MatrixActionClientOpts,
|
||||
MatrixMessageSummary,
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Matrix tests cover client plugin behavior.
|
||||
import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest";
|
||||
import {
|
||||
createMockMatrixClient,
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Matrix plugin module implements client behavior.
|
||||
import { withResolvedRuntimeMatrixClient } from "../client-bootstrap.js";
|
||||
import { resolveMatrixRoomId } from "../send.js";
|
||||
import type { MatrixActionClient, MatrixActionClientOpts } from "./types.js";
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Matrix tests cover devices plugin behavior.
|
||||
import { beforeEach, describe, expect, it, vi } from "vitest";
|
||||
|
||||
const withResolvedActionClientMock = vi.fn();
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Matrix plugin module implements devices behavior.
|
||||
import { summarizeMatrixDeviceHealth } from "../device-health.js";
|
||||
import { withResolvedActionClient } from "./client.js";
|
||||
import type { MatrixActionClientOpts } from "./types.js";
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Matrix tests cover limits plugin behavior.
|
||||
import { describe, expect, it } from "vitest";
|
||||
import { resolveMatrixActionLimit } from "./limits.js";
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Matrix plugin module implements limits behavior.
|
||||
import { resolveIntegerOption } from "openclaw/plugin-sdk/number-runtime";
|
||||
|
||||
export function resolveMatrixActionLimit(raw: unknown, fallback: number): number {
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Matrix tests cover messages plugin behavior.
|
||||
import { describe, expect, it, vi } from "vitest";
|
||||
import { setMatrixRuntime } from "../../runtime.js";
|
||||
import type { MatrixClient } from "../sdk.js";
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Matrix plugin module implements messages behavior.
|
||||
import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
||||
import { fetchMatrixPollMessageSummary, resolveMatrixPollRootEventId } from "../poll-summary.js";
|
||||
import { isPollEventType } from "../poll-types.js";
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Matrix tests cover pins plugin behavior.
|
||||
import { describe, expect, it, vi } from "vitest";
|
||||
import type { MatrixClient } from "../sdk.js";
|
||||
import { listMatrixPins, pinMatrixMessage, unpinMatrixMessage } from "./pins.js";
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Matrix plugin module implements pins behavior.
|
||||
import { withResolvedRoomAction } from "./client.js";
|
||||
import { fetchEventSummary, readPinnedEvents } from "./summary.js";
|
||||
import {
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Matrix tests cover polls plugin behavior.
|
||||
import { describe, expect, it, vi } from "vitest";
|
||||
import type { MatrixClient } from "../sdk.js";
|
||||
import { voteMatrixPoll } from "./polls.js";
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Matrix plugin module implements polls behavior.
|
||||
import { uniqueStrings, uniqueValues } from "openclaw/plugin-sdk/string-coerce-runtime";
|
||||
import {
|
||||
buildPollResponseContent,
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Matrix tests cover profile plugin behavior.
|
||||
import { beforeEach, describe, expect, it, vi } from "vitest";
|
||||
|
||||
const loadWebMediaMock = vi.fn();
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Matrix plugin module implements profile behavior.
|
||||
import { getMatrixRuntime } from "../../runtime.js";
|
||||
import { syncMatrixOwnProfile, type MatrixProfileSyncResult } from "../profile.js";
|
||||
import { withResolvedActionClient } from "./client.js";
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Matrix tests cover reactions plugin behavior.
|
||||
import { describe, expect, it, vi } from "vitest";
|
||||
import type { MatrixClient } from "../sdk.js";
|
||||
import { listMatrixReactions, removeMatrixReactions } from "./reactions.js";
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Matrix plugin module implements reactions behavior.
|
||||
import {
|
||||
buildMatrixReactionRelationsPath,
|
||||
selectOwnMatrixReactionEventIds,
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Matrix tests cover room plugin behavior.
|
||||
import { describe, expect, it, vi } from "vitest";
|
||||
import type { MatrixClient } from "../sdk.js";
|
||||
import { getMatrixMemberInfo, getMatrixRoomInfo } from "./room.js";
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Matrix plugin module implements room behavior.
|
||||
import { resolveMatrixRoomId } from "../send.js";
|
||||
import { withResolvedActionClient, withResolvedRoomAction } from "./client.js";
|
||||
import { EventType, type MatrixActionClientOpts } from "./types.js";
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Matrix tests cover summary plugin behavior.
|
||||
import { describe, expect, it } from "vitest";
|
||||
import { summarizeMatrixRawEvent } from "./summary.js";
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Matrix plugin module implements summary behavior.
|
||||
import { isMatrixNotFoundError } from "../errors.js";
|
||||
import { resolveMatrixMessageAttachment, resolveMatrixMessageBody } from "../media-text.js";
|
||||
import { fetchMatrixPollMessageSummary } from "../poll-summary.js";
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Matrix type declarations define plugin contracts.
|
||||
import type { CoreConfig } from "../../types.js";
|
||||
import { MATRIX_REACTION_EVENT_TYPE } from "../reaction-common.js";
|
||||
import type { MatrixClient, MessageEventContent } from "../sdk.js";
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Matrix tests cover verification plugin behavior.
|
||||
import { beforeAll, beforeEach, describe, expect, it, vi } from "vitest";
|
||||
|
||||
const withResolvedActionClientMock = vi.fn();
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Matrix plugin module implements verification behavior.
|
||||
import { setTimeout as sleep } from "node:timers/promises";
|
||||
import { requireRuntimeConfig } from "openclaw/plugin-sdk/plugin-config-runtime";
|
||||
import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Matrix plugin module implements active client behavior.
|
||||
import { DEFAULT_ACCOUNT_ID, normalizeAccountId } from "openclaw/plugin-sdk/account-id";
|
||||
import type { MatrixClient } from "./sdk.js";
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Matrix plugin module implements async lock behavior.
|
||||
export type AsyncLock = <T>(fn: () => Promise<T>) => Promise<T>;
|
||||
|
||||
export function createAsyncLock(): AsyncLock {
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Matrix plugin module implements backup health behavior.
|
||||
type MatrixRoomKeyBackupStatusLike = {
|
||||
serverVersion: string | null;
|
||||
activeVersion: string | null;
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Matrix tests cover client bootstrap plugin behavior.
|
||||
import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest";
|
||||
import {
|
||||
createMockMatrixClient,
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Matrix plugin module implements client bootstrap behavior.
|
||||
import { requireRuntimeConfig } from "openclaw/plugin-sdk/plugin-config-runtime";
|
||||
import type { CoreConfig } from "../types.js";
|
||||
import { getActiveMatrixClient } from "./active-client.js";
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Matrix helper module supports client resolver helpers behavior.
|
||||
import { expect, vi, type Mock } from "vitest";
|
||||
import type { MatrixClient } from "./sdk.js";
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Matrix tests cover client plugin behavior.
|
||||
import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
|
||||
import { installMatrixTestRuntime } from "../test-runtime.js";
|
||||
import type { CoreConfig } from "../types.js";
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Matrix plugin module implements client behavior.
|
||||
export type { MatrixAuth } from "./client/types.js";
|
||||
export { isBunRuntime } from "./client/runtime.js";
|
||||
export { getMatrixScopedEnvVarNames } from "../env-vars.js";
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user