mirror of
https://github.com/openclaw/openclaw.git
synced 2026-03-20 22:40:58 +00:00
Matrix: restore local sdk barrel imports
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
import { Type } from "@sinclair/typebox";
|
||||
import { requiresExplicitMatrixDefaultAccount } from "./account-selection.js";
|
||||
import { resolveDefaultMatrixAccountId, resolveMatrixAccount } from "./matrix/accounts.js";
|
||||
import {
|
||||
createActionGate,
|
||||
readNumberParam,
|
||||
@@ -8,9 +10,7 @@ import {
|
||||
type ChannelMessageActionName,
|
||||
type ChannelMessageToolDiscovery,
|
||||
type ChannelToolSend,
|
||||
} from "openclaw/plugin-sdk/matrix";
|
||||
import { requiresExplicitMatrixDefaultAccount } from "./account-selection.js";
|
||||
import { resolveDefaultMatrixAccountId, resolveMatrixAccount } from "./matrix/accounts.js";
|
||||
} from "./runtime-api.js";
|
||||
import type { CoreConfig } from "./types.js";
|
||||
|
||||
const MATRIX_PLUGIN_HANDLED_ACTIONS = new Set<ChannelMessageActionName>([
|
||||
|
||||
@@ -1,9 +1,4 @@
|
||||
import type { Command } from "commander";
|
||||
import {
|
||||
formatZonedTimestamp,
|
||||
normalizeAccountId,
|
||||
type ChannelSetupInput,
|
||||
} from "openclaw/plugin-sdk/matrix";
|
||||
import { resolveMatrixAccount, resolveMatrixAccountConfig } from "./matrix/accounts.js";
|
||||
import { withResolvedActionClient, withStartedActionClient } from "./matrix/actions/client.js";
|
||||
import { listMatrixOwnDevices, pruneMatrixStaleGatewayDevices } from "./matrix/actions/devices.js";
|
||||
@@ -27,6 +22,7 @@ import {
|
||||
type MatrixDirectRoomCandidate,
|
||||
} from "./matrix/direct-management.js";
|
||||
import { applyMatrixProfileUpdate, type MatrixProfileUpdateResult } from "./profile-update.js";
|
||||
import { formatZonedTimestamp, normalizeAccountId, type ChannelSetupInput } from "./runtime-api.js";
|
||||
import { getMatrixRuntime } from "./runtime.js";
|
||||
import { maybeBootstrapNewEncryptedMatrixAccount } from "./setup-bootstrap.js";
|
||||
import { matrixSetupAdapter } from "./setup-core.js";
|
||||
|
||||
@@ -4,12 +4,8 @@ import {
|
||||
DmPolicySchema,
|
||||
GroupPolicySchema,
|
||||
} from "openclaw/plugin-sdk/channel-config-schema";
|
||||
import {
|
||||
buildSecretInputSchema,
|
||||
MarkdownConfigSchema,
|
||||
ToolPolicySchema,
|
||||
} from "openclaw/plugin-sdk/matrix";
|
||||
import { z } from "zod";
|
||||
import { buildSecretInputSchema, MarkdownConfigSchema, ToolPolicySchema } from "./runtime-api.js";
|
||||
|
||||
const matrixActionSchema = z
|
||||
.object({
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import type { ChannelDirectoryEntry } from "openclaw/plugin-sdk/matrix";
|
||||
import { resolveMatrixAuth } from "./matrix/client.js";
|
||||
import { MatrixAuthedHttpClient } from "./matrix/sdk/http-client.js";
|
||||
import { isMatrixQualifiedUserId, normalizeMatrixMessagingTarget } from "./matrix/target-ids.js";
|
||||
import type { ChannelDirectoryEntry } from "./runtime-api.js";
|
||||
|
||||
type MatrixUserResult = {
|
||||
user_id?: string;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import type { ChannelGroupContext, GroupToolPolicyConfig } from "openclaw/plugin-sdk/matrix";
|
||||
import { resolveMatrixAccountConfig } from "./matrix/accounts.js";
|
||||
import { resolveMatrixRoomConfig } from "./matrix/monitor/rooms.js";
|
||||
import { normalizeMatrixResolvableTarget } from "./matrix/target-ids.js";
|
||||
import type { ChannelGroupContext, GroupToolPolicyConfig } from "./runtime-api.js";
|
||||
import type { CoreConfig } from "./types.js";
|
||||
|
||||
function resolveMatrixRoomConfigForGroup(params: ChannelGroupContext) {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { normalizeAccountId } from "openclaw/plugin-sdk/account-id";
|
||||
import { DEFAULT_ACCOUNT_ID } from "openclaw/plugin-sdk/matrix";
|
||||
import { DEFAULT_ACCOUNT_ID } from "../runtime-api.js";
|
||||
import type { CoreConfig, MatrixAccountConfig, MatrixConfig } from "../types.js";
|
||||
|
||||
export function resolveMatrixBaseConfig(cfg: CoreConfig): MatrixConfig {
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
import {
|
||||
DEFAULT_ACCOUNT_ID,
|
||||
hasConfiguredSecretInput,
|
||||
normalizeAccountId,
|
||||
} from "openclaw/plugin-sdk/matrix";
|
||||
import {
|
||||
resolveConfiguredMatrixAccountIds,
|
||||
resolveMatrixDefaultOrOnlyAccountId,
|
||||
} from "../account-selection.js";
|
||||
import {
|
||||
DEFAULT_ACCOUNT_ID,
|
||||
hasConfiguredSecretInput,
|
||||
normalizeAccountId,
|
||||
} from "../runtime-api.js";
|
||||
import type { CoreConfig, MatrixConfig } from "../types.js";
|
||||
import { findMatrixAccountConfig, resolveMatrixBaseConfig } from "./account-config.js";
|
||||
import { resolveMatrixConfigForAccount } from "./client.js";
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
import {
|
||||
DEFAULT_ACCOUNT_ID,
|
||||
isPrivateOrLoopbackHost,
|
||||
normalizeAccountId,
|
||||
normalizeOptionalAccountId,
|
||||
normalizeResolvedSecretInputString,
|
||||
} from "openclaw/plugin-sdk/matrix";
|
||||
import {
|
||||
requiresExplicitMatrixDefaultAccount,
|
||||
resolveMatrixDefaultOrOnlyAccountId,
|
||||
} from "../../account-selection.js";
|
||||
import { resolveMatrixAccountStringValues } from "../../auth-precedence.js";
|
||||
import { getMatrixScopedEnvVarNames } from "../../env-vars.js";
|
||||
import {
|
||||
DEFAULT_ACCOUNT_ID,
|
||||
isPrivateOrLoopbackHost,
|
||||
normalizeAccountId,
|
||||
normalizeOptionalAccountId,
|
||||
normalizeResolvedSecretInputString,
|
||||
} from "../../runtime-api.js";
|
||||
import { getMatrixRuntime } from "../../runtime.js";
|
||||
import type { CoreConfig } from "../../types.js";
|
||||
import {
|
||||
|
||||
@@ -7,7 +7,7 @@ import {
|
||||
type ISyncResponse,
|
||||
type IStoredClientOpts,
|
||||
} from "matrix-js-sdk";
|
||||
import { writeJsonFileAtomically } from "openclaw/plugin-sdk/matrix";
|
||||
import { writeJsonFileAtomically } from "../../runtime-api.js";
|
||||
import { LogService } from "../sdk/logger.js";
|
||||
|
||||
const STORE_VERSION = 1;
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import fs from "node:fs";
|
||||
import os from "node:os";
|
||||
import path from "node:path";
|
||||
import { maybeCreateMatrixMigrationSnapshot, normalizeAccountId } from "openclaw/plugin-sdk/matrix";
|
||||
import {
|
||||
requiresExplicitMatrixDefaultAccount,
|
||||
resolveMatrixDefaultOrOnlyAccountId,
|
||||
} from "../../account-selection.js";
|
||||
import { maybeCreateMatrixMigrationSnapshot, normalizeAccountId } from "../../runtime-api.js";
|
||||
import { getMatrixRuntime } from "../../runtime.js";
|
||||
import {
|
||||
resolveMatrixAccountStorageRoot,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { DEFAULT_ACCOUNT_ID } from "openclaw/plugin-sdk/account-id";
|
||||
import { normalizeAccountId } from "openclaw/plugin-sdk/matrix";
|
||||
import { normalizeAccountId } from "../runtime-api.js";
|
||||
import type { CoreConfig, MatrixConfig } from "../types.js";
|
||||
import { findMatrixAccountConfig } from "./account-config.js";
|
||||
|
||||
|
||||
@@ -2,11 +2,11 @@ import fs from "node:fs";
|
||||
import os from "node:os";
|
||||
import path from "node:path";
|
||||
import { DEFAULT_ACCOUNT_ID, normalizeAccountId } from "openclaw/plugin-sdk/account-id";
|
||||
import { writeJsonFileAtomically } from "openclaw/plugin-sdk/matrix";
|
||||
import {
|
||||
requiresExplicitMatrixDefaultAccount,
|
||||
resolveMatrixDefaultOrOnlyAccountId,
|
||||
} from "../account-selection.js";
|
||||
import { writeJsonFileAtomically } from "../runtime-api.js";
|
||||
import { getMatrixRuntime } from "../runtime.js";
|
||||
import {
|
||||
resolveMatrixCredentialsDir as resolveSharedMatrixCredentialsDir,
|
||||
|
||||
@@ -3,7 +3,7 @@ import fs from "node:fs";
|
||||
import { createRequire } from "node:module";
|
||||
import path from "node:path";
|
||||
import { fileURLToPath } from "node:url";
|
||||
import type { RuntimeEnv } from "openclaw/plugin-sdk/matrix";
|
||||
import type { RuntimeEnv } from "../runtime-api.js";
|
||||
|
||||
const REQUIRED_MATRIX_PACKAGES = ["matrix-js-sdk", "@matrix-org/matrix-sdk-crypto-nodejs"];
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { resolveAckReaction, type OpenClawConfig } from "openclaw/plugin-sdk/matrix";
|
||||
import { resolveAckReaction, type OpenClawConfig } from "../../runtime-api.js";
|
||||
import type { CoreConfig } from "../../types.js";
|
||||
import { resolveMatrixAccountConfig } from "../accounts.js";
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ import {
|
||||
normalizeStringEntries,
|
||||
resolveAllowlistMatchByCandidates,
|
||||
type AllowlistMatch,
|
||||
} from "openclaw/plugin-sdk/matrix";
|
||||
} from "../../runtime-api.js";
|
||||
|
||||
function normalizeAllowList(list?: Array<string | number>) {
|
||||
return normalizeStringEntries(list);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { RuntimeEnv } from "openclaw/plugin-sdk/matrix";
|
||||
import type { RuntimeEnv } from "../../runtime-api.js";
|
||||
import { getMatrixRuntime } from "../../runtime.js";
|
||||
import type { MatrixConfig } from "../../types.js";
|
||||
import type { MatrixClient } from "../sdk.js";
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import { resolveMatrixTargets } from "../../resolve-targets.js";
|
||||
import {
|
||||
addAllowlistUserEntriesFromConfigEntry,
|
||||
buildAllowlistResolutionSummary,
|
||||
@@ -5,8 +6,7 @@ import {
|
||||
patchAllowlistUsersInConfigEntries,
|
||||
summarizeMapping,
|
||||
type RuntimeEnv,
|
||||
} from "openclaw/plugin-sdk/matrix";
|
||||
import { resolveMatrixTargets } from "../../resolve-targets.js";
|
||||
} from "../../runtime-api.js";
|
||||
import type { CoreConfig, MatrixRoomConfig } from "../../types.js";
|
||||
import { normalizeMatrixUserId } from "./allowlist.js";
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { PluginRuntime, RuntimeLogger } from "openclaw/plugin-sdk/matrix";
|
||||
import type { PluginRuntime, RuntimeLogger } from "../../runtime-api.js";
|
||||
import type { CoreConfig } from "../../types.js";
|
||||
import type { MatrixAuth } from "../client.js";
|
||||
import { formatMatrixEncryptedEventDisabledWarning } from "../encryption-guidance.js";
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import type { RuntimeEnv, RuntimeLogger } from "openclaw/plugin-sdk/matrix";
|
||||
import { vi } from "vitest";
|
||||
import type { RuntimeEnv, RuntimeLogger } from "../../runtime-api.js";
|
||||
import type { MatrixRoomConfig, ReplyToMode } from "../../types.js";
|
||||
import type { MatrixClient } from "../sdk.js";
|
||||
import { createMatrixRoomMessageHandler, type MatrixMonitorHandlerParams } from "./handler.js";
|
||||
|
||||
@@ -11,7 +11,7 @@ import {
|
||||
type ReplyPayload,
|
||||
type RuntimeEnv,
|
||||
type RuntimeLogger,
|
||||
} from "openclaw/plugin-sdk/matrix";
|
||||
} from "../../runtime-api.js";
|
||||
import type { CoreConfig, MatrixRoomConfig, ReplyToMode } from "../../types.js";
|
||||
import { formatMatrixMediaUnavailableText } from "../media-text.js";
|
||||
import { fetchMatrixPollSnapshot } from "../poll-summary.js";
|
||||
|
||||
@@ -7,7 +7,7 @@ import {
|
||||
resolveDefaultGroupPolicy,
|
||||
warnMissingProviderGroupPolicyFallbackOnce,
|
||||
type RuntimeEnv,
|
||||
} from "openclaw/plugin-sdk/matrix";
|
||||
} from "../../runtime-api.js";
|
||||
import { getMatrixRuntime } from "../../runtime.js";
|
||||
import type { CoreConfig, ReplyToMode } from "../../types.js";
|
||||
import { resolveMatrixAccount } from "../accounts.js";
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import fs from "node:fs/promises";
|
||||
import os from "node:os";
|
||||
import path from "node:path";
|
||||
import { readJsonFileWithFallback, writeJsonFileAtomically } from "openclaw/plugin-sdk/matrix";
|
||||
import { readJsonFileWithFallback, writeJsonFileAtomically } from "../../runtime-api.js";
|
||||
import { getMatrixRuntime } from "../../runtime.js";
|
||||
import { resolveMatrixStoragePaths } from "../client/storage.js";
|
||||
import type { MatrixAuth } from "../client/types.js";
|
||||
|
||||
@@ -2,7 +2,7 @@ import {
|
||||
formatLocationText,
|
||||
toLocationContext,
|
||||
type NormalizedLocation,
|
||||
} from "openclaw/plugin-sdk/matrix";
|
||||
} from "../../runtime-api.js";
|
||||
import type { LocationMessageEventContent } from "../sdk.js";
|
||||
import { EventType } from "./types.js";
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { PluginRuntime } from "openclaw/plugin-sdk/matrix";
|
||||
import type { PluginRuntime } from "../../runtime-api.js";
|
||||
import type { CoreConfig } from "../../types.js";
|
||||
import { resolveMatrixAccountConfig } from "../accounts.js";
|
||||
import { extractMatrixReactionAnnotation } from "../reaction-common.js";
|
||||
|
||||
@@ -3,7 +3,7 @@ import type {
|
||||
OpenClawConfig,
|
||||
ReplyPayload,
|
||||
RuntimeEnv,
|
||||
} from "openclaw/plugin-sdk/matrix";
|
||||
} from "../../runtime-api.js";
|
||||
import { getMatrixRuntime } from "../../runtime.js";
|
||||
import type { MatrixClient } from "../sdk.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 = {
|
||||
|
||||
@@ -3,7 +3,7 @@ import {
|
||||
resolveAgentIdFromSessionKey,
|
||||
resolveConfiguredAcpBindingRecord,
|
||||
type PluginRuntime,
|
||||
} from "openclaw/plugin-sdk/matrix";
|
||||
} from "../../runtime-api.js";
|
||||
import type { CoreConfig } from "../../types.js";
|
||||
|
||||
type MatrixResolvedRoute = ReturnType<PluginRuntime["channel"]["routing"]["resolveAgentRoute"]>;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import fs from "node:fs/promises";
|
||||
import path from "node:path";
|
||||
import { readJsonFileWithFallback, writeJsonFileAtomically } from "openclaw/plugin-sdk/matrix";
|
||||
import { readJsonFileWithFallback, writeJsonFileAtomically } from "../../runtime-api.js";
|
||||
import type { MatrixConfig } from "../../types.js";
|
||||
import { resolveMatrixStoragePaths } from "../client/storage.js";
|
||||
import type { MatrixAuth } from "../client/types.js";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { RuntimeLogger } from "openclaw/plugin-sdk/matrix";
|
||||
import type { RuntimeLogger } from "../../runtime-api.js";
|
||||
import type { CoreConfig, MatrixConfig } from "../../types.js";
|
||||
import type { MatrixAuth } from "../client.js";
|
||||
import { updateMatrixAccountConfig } from "../config-update.js";
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
* - m.poll.end - Closes a poll
|
||||
*/
|
||||
|
||||
import { normalizePollInput, type PollInput } from "openclaw/plugin-sdk/matrix";
|
||||
import { normalizePollInput, 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 { format } from "node:util";
|
||||
import { redactSensitiveText, type RuntimeLogger } from "openclaw/plugin-sdk/matrix";
|
||||
import { redactSensitiveText, type RuntimeLogger } from "../../runtime-api.js";
|
||||
import { getMatrixRuntime } from "../../runtime.js";
|
||||
|
||||
export type Logger = {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { PollInput } from "openclaw/plugin-sdk/matrix";
|
||||
import type { PollInput } from "../runtime-api.js";
|
||||
import { getMatrixRuntime } from "../runtime.js";
|
||||
import type { CoreConfig } from "../types.js";
|
||||
import { buildPollStartContent, M_POLL_START } from "./poll-types.js";
|
||||
|
||||
@@ -8,7 +8,7 @@ import {
|
||||
writeJsonFileAtomically,
|
||||
type BindingTargetKind,
|
||||
type SessionBindingRecord,
|
||||
} from "openclaw/plugin-sdk/matrix";
|
||||
} from "../runtime-api.js";
|
||||
import { resolveMatrixStoragePaths } from "./client/storage.js";
|
||||
import type { MatrixAuth } from "./client/types.js";
|
||||
import type { MatrixClient } from "./sdk.js";
|
||||
|
||||
@@ -1,16 +1,4 @@
|
||||
import { DEFAULT_ACCOUNT_ID } from "openclaw/plugin-sdk/account-id";
|
||||
import type { DmPolicy } from "openclaw/plugin-sdk/matrix";
|
||||
import {
|
||||
addWildcardAllowFrom,
|
||||
formatDocsLink,
|
||||
mergeAllowFromEntries,
|
||||
moveSingleAccountChannelSectionToDefaultAccount,
|
||||
normalizeAccountId,
|
||||
promptChannelAccessConfig,
|
||||
promptAccountId,
|
||||
type RuntimeEnv,
|
||||
type WizardPrompter,
|
||||
} from "openclaw/plugin-sdk/matrix";
|
||||
import {
|
||||
type ChannelSetupDmPolicy,
|
||||
type ChannelSetupWizardAdapter,
|
||||
@@ -31,6 +19,18 @@ import {
|
||||
} from "./matrix/config-update.js";
|
||||
import { ensureMatrixSdkInstalled, isMatrixSdkAvailable } from "./matrix/deps.js";
|
||||
import { resolveMatrixTargets } from "./resolve-targets.js";
|
||||
import type { DmPolicy } from "./runtime-api.js";
|
||||
import {
|
||||
addWildcardAllowFrom,
|
||||
formatDocsLink,
|
||||
mergeAllowFromEntries,
|
||||
moveSingleAccountChannelSectionToDefaultAccount,
|
||||
normalizeAccountId,
|
||||
promptChannelAccessConfig,
|
||||
promptAccountId,
|
||||
type RuntimeEnv,
|
||||
type WizardPrompter,
|
||||
} from "./runtime-api.js";
|
||||
import { runMatrixSetupBootstrapAfterConfigWrite } from "./setup-bootstrap.js";
|
||||
import type { CoreConfig } from "./types.js";
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { resolveOutboundSendDep, type ChannelOutboundAdapter } from "openclaw/plugin-sdk/matrix";
|
||||
import { sendMessageMatrix, sendPollMatrix } from "./matrix/send.js";
|
||||
import { resolveOutboundSendDep, type ChannelOutboundAdapter } from "./runtime-api.js";
|
||||
import { getMatrixRuntime } from "./runtime.js";
|
||||
|
||||
export const matrixOutbound: ChannelOutboundAdapter = {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { normalizeAccountId } from "openclaw/plugin-sdk/matrix";
|
||||
import { updateMatrixOwnProfile } from "./matrix/actions/profile.js";
|
||||
import { updateMatrixAccountConfig, resolveMatrixConfigPath } from "./matrix/config-update.js";
|
||||
import { normalizeAccountId } from "./runtime-api.js";
|
||||
import { getMatrixRuntime } from "./runtime.js";
|
||||
import type { CoreConfig } from "./types.js";
|
||||
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import { listMatrixDirectoryGroupsLive, listMatrixDirectoryPeersLive } from "./directory-live.js";
|
||||
import { isMatrixQualifiedUserId, normalizeMatrixMessagingTarget } from "./matrix/target-ids.js";
|
||||
import type {
|
||||
ChannelDirectoryEntry,
|
||||
ChannelResolveKind,
|
||||
ChannelResolveResult,
|
||||
RuntimeEnv,
|
||||
} from "openclaw/plugin-sdk/matrix";
|
||||
import { listMatrixDirectoryGroupsLive, listMatrixDirectoryPeersLive } from "./directory-live.js";
|
||||
import { isMatrixQualifiedUserId, normalizeMatrixMessagingTarget } from "./matrix/target-ids.js";
|
||||
} from "./runtime-api.js";
|
||||
|
||||
function normalizeLookupQuery(query: string): string {
|
||||
return query.trim().toLowerCase();
|
||||
|
||||
@@ -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");
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import type { RuntimeEnv } from "openclaw/plugin-sdk/matrix";
|
||||
import { hasExplicitMatrixAccountConfig } from "./matrix/account-config.js";
|
||||
import { resolveMatrixAccountConfig } from "./matrix/accounts.js";
|
||||
import { bootstrapMatrixVerification } from "./matrix/actions/verification.js";
|
||||
import type { RuntimeEnv } from "./runtime-api.js";
|
||||
import type { CoreConfig } from "./types.js";
|
||||
|
||||
export type MatrixSetupVerificationBootstrapResult = {
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
import { resolveMatrixEnvAuthReadiness } from "./matrix/client.js";
|
||||
import { updateMatrixAccountConfig } from "./matrix/config-update.js";
|
||||
import {
|
||||
applyAccountNameToChannelSection,
|
||||
DEFAULT_ACCOUNT_ID,
|
||||
@@ -5,9 +7,7 @@ import {
|
||||
normalizeAccountId,
|
||||
normalizeSecretInputString,
|
||||
type ChannelSetupInput,
|
||||
} from "openclaw/plugin-sdk/matrix";
|
||||
import { resolveMatrixEnvAuthReadiness } from "./matrix/client.js";
|
||||
import { updateMatrixAccountConfig } from "./matrix/config-update.js";
|
||||
} from "./runtime-api.js";
|
||||
import type { CoreConfig } from "./types.js";
|
||||
|
||||
const channel = "matrix" as const;
|
||||
|
||||
@@ -1,12 +1,4 @@
|
||||
import type { AgentToolResult } from "@mariozechner/pi-agent-core";
|
||||
import {
|
||||
createActionGate,
|
||||
jsonResult,
|
||||
readNumberParam,
|
||||
readReactionParams,
|
||||
readStringArrayParam,
|
||||
readStringParam,
|
||||
} from "openclaw/plugin-sdk/matrix";
|
||||
import { resolveMatrixAccountConfig } from "./matrix/accounts.js";
|
||||
import {
|
||||
bootstrapMatrixVerification,
|
||||
@@ -41,6 +33,14 @@ import {
|
||||
} from "./matrix/actions.js";
|
||||
import { reactMatrixMessage } from "./matrix/send.js";
|
||||
import { applyMatrixProfileUpdate } from "./profile-update.js";
|
||||
import {
|
||||
createActionGate,
|
||||
jsonResult,
|
||||
readNumberParam,
|
||||
readReactionParams,
|
||||
readStringArrayParam,
|
||||
readStringParam,
|
||||
} from "./runtime-api.js";
|
||||
import type { CoreConfig } from "./types.js";
|
||||
|
||||
const messageActions = new Set(["sendMessage", "editMessage", "deleteMessage", "readMessages"]);
|
||||
|
||||
@@ -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";
|
||||
|
||||
Reference in New Issue
Block a user