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