mirror of https://github.com/openclaw/openclaw.git
Matrix: narrow monitor runtime seam
This commit is contained in:
parent
7710579a82
commit
3ceec929df
|
|
@ -1,6 +1,6 @@
|
|||
import { resolveAckReaction, type OpenClawConfig } from "../../runtime-api.js";
|
||||
import type { CoreConfig } from "../../types.js";
|
||||
import { resolveMatrixAccountConfig } from "../accounts.js";
|
||||
import { resolveAckReaction, type OpenClawConfig } from "./runtime-api.js";
|
||||
|
||||
type MatrixAckReactionScope = "group-mentions" | "group-all" | "direct" | "all" | "none" | "off";
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import type { RuntimeEnv } from "../../runtime-api.js";
|
||||
import { getMatrixRuntime } from "../../runtime.js";
|
||||
import type { MatrixConfig } from "../../types.js";
|
||||
import type { MatrixClient } from "../sdk.js";
|
||||
import type { RuntimeEnv } from "./runtime-api.js";
|
||||
|
||||
export function registerMatrixAutoJoin(params: {
|
||||
client: MatrixClient;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,6 @@
|
|||
import { resolveMatrixTargets } from "../../resolve-targets.js";
|
||||
import type { CoreConfig, MatrixRoomConfig } from "../../types.js";
|
||||
import { normalizeMatrixUserId } from "./allowlist.js";
|
||||
import {
|
||||
addAllowlistUserEntriesFromConfigEntry,
|
||||
buildAllowlistResolutionSummary,
|
||||
|
|
@ -6,9 +8,7 @@ import {
|
|||
patchAllowlistUsersInConfigEntries,
|
||||
summarizeMapping,
|
||||
type RuntimeEnv,
|
||||
} from "../../runtime-api.js";
|
||||
import type { CoreConfig, MatrixRoomConfig } from "../../types.js";
|
||||
import { normalizeMatrixUserId } from "./allowlist.js";
|
||||
} from "./runtime-api.js";
|
||||
|
||||
type MatrixRoomsConfig = Record<string, MatrixRoomConfig>;
|
||||
type ResolveMatrixTargetsFn = typeof resolveMatrixTargets;
|
||||
|
|
|
|||
|
|
@ -1,18 +1,5 @@
|
|||
import { resolveControlCommandGate } from "openclaw/plugin-sdk/command-auth";
|
||||
import { getSessionBindingService } from "openclaw/plugin-sdk/conversation-runtime";
|
||||
import {
|
||||
createReplyPrefixOptions,
|
||||
createTypingCallbacks,
|
||||
formatAllowlistMatchMeta,
|
||||
getAgentScopedMediaLocalRoots,
|
||||
logInboundDrop,
|
||||
logTypingFailure,
|
||||
ensureConfiguredAcpBindingReady,
|
||||
type PluginRuntime,
|
||||
type ReplyPayload,
|
||||
type RuntimeEnv,
|
||||
type RuntimeLogger,
|
||||
} from "../../runtime-api.js";
|
||||
import type { CoreConfig, MatrixRoomConfig, ReplyToMode } from "../../types.js";
|
||||
import { createMatrixDraftStream } from "../draft-stream.js";
|
||||
import {
|
||||
|
|
@ -49,6 +36,19 @@ import { createRoomHistoryTracker } from "./room-history.js";
|
|||
import type { HistoryEntry } from "./room-history.js";
|
||||
import { resolveMatrixRoomConfig } from "./rooms.js";
|
||||
import { resolveMatrixInboundRoute } from "./route.js";
|
||||
import {
|
||||
createReplyPrefixOptions,
|
||||
createTypingCallbacks,
|
||||
ensureConfiguredAcpBindingReady,
|
||||
formatAllowlistMatchMeta,
|
||||
getAgentScopedMediaLocalRoots,
|
||||
logInboundDrop,
|
||||
logTypingFailure,
|
||||
type PluginRuntime,
|
||||
type ReplyPayload,
|
||||
type RuntimeEnv,
|
||||
type RuntimeLogger,
|
||||
} from "./runtime-api.js";
|
||||
import { createMatrixThreadContextResolver } from "./thread-context.js";
|
||||
import {
|
||||
resolveMatrixReplyToEventId,
|
||||
|
|
|
|||
|
|
@ -1,9 +1,5 @@
|
|||
import {
|
||||
formatLocationText,
|
||||
toLocationContext,
|
||||
type NormalizedLocation,
|
||||
} from "../../runtime-api.js";
|
||||
import type { LocationMessageEventContent } from "../sdk.js";
|
||||
import { formatLocationText, toLocationContext, type NormalizedLocation } from "./runtime-api.js";
|
||||
import { EventType } from "./types.js";
|
||||
|
||||
export type MatrixLocationPayload = {
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
import { getSessionBindingService } from "openclaw/plugin-sdk/conversation-runtime";
|
||||
import type { PluginRuntime } from "../../runtime-api.js";
|
||||
import type { CoreConfig } from "../../types.js";
|
||||
import { resolveMatrixAccountConfig } from "../accounts.js";
|
||||
import { extractMatrixReactionAnnotation } from "../reaction-common.js";
|
||||
import type { MatrixClient } from "../sdk.js";
|
||||
import { resolveMatrixInboundRoute } from "./route.js";
|
||||
import type { PluginRuntime } from "./runtime-api.js";
|
||||
import { resolveMatrixThreadRootId, resolveMatrixThreadRouting } from "./threads.js";
|
||||
import type { MatrixRawEvent, RoomMessageEventContent } from "./types.js";
|
||||
|
||||
|
|
|
|||
|
|
@ -1,12 +1,7 @@
|
|||
import type {
|
||||
MarkdownTableMode,
|
||||
OpenClawConfig,
|
||||
ReplyPayload,
|
||||
RuntimeEnv,
|
||||
} from "../../runtime-api.js";
|
||||
import { getMatrixRuntime } from "../../runtime.js";
|
||||
import type { MatrixClient } from "../sdk.js";
|
||||
import { chunkMatrixText, sendMessageMatrix } from "../send.js";
|
||||
import type { MarkdownTableMode, OpenClawConfig, ReplyPayload, RuntimeEnv } from "./runtime-api.js";
|
||||
|
||||
const THINKING_TAG_RE = /<\s*\/?\s*(?:think(?:ing)?|thought|antthinking)\b[^<>]*>/gi;
|
||||
const THINKING_BLOCK_RE =
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import { buildChannelKeyCandidates, resolveChannelEntryMatch } from "../../runtime-api.js";
|
||||
import type { MatrixRoomConfig } from "../../types.js";
|
||||
import { buildChannelKeyCandidates, resolveChannelEntryMatch } from "./runtime-api.js";
|
||||
|
||||
export type MatrixRoomConfigResolved = {
|
||||
allowed: boolean;
|
||||
|
|
|
|||
|
|
@ -0,0 +1,30 @@
|
|||
// Narrow Matrix monitor helper seam.
|
||||
// Keep monitor internals off the broad package runtime-api barrel so monitor
|
||||
// tests and shared workers do not pull unrelated Matrix helper surfaces.
|
||||
|
||||
export {
|
||||
addAllowlistUserEntriesFromConfigEntry,
|
||||
buildAllowlistResolutionSummary,
|
||||
buildChannelKeyCandidates,
|
||||
canonicalizeAllowlistWithResolvedIds,
|
||||
createReplyPrefixOptions,
|
||||
createTypingCallbacks,
|
||||
formatAllowlistMatchMeta,
|
||||
formatLocationText,
|
||||
getAgentScopedMediaLocalRoots,
|
||||
logInboundDrop,
|
||||
logTypingFailure,
|
||||
patchAllowlistUsersInConfigEntries,
|
||||
resolveAckReaction,
|
||||
resolveChannelEntryMatch,
|
||||
summarizeMapping,
|
||||
toLocationContext,
|
||||
type MarkdownTableMode,
|
||||
type NormalizedLocation,
|
||||
type OpenClawConfig,
|
||||
type PluginRuntime,
|
||||
type ReplyPayload,
|
||||
type RuntimeEnv,
|
||||
type RuntimeLogger,
|
||||
} from "openclaw/plugin-sdk/matrix";
|
||||
export { ensureConfiguredAcpBindingReady } from "openclaw/plugin-sdk/matrix-runtime-heavy";
|
||||
Loading…
Reference in New Issue