mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 07:40:44 +00:00
perf: narrow inbound debounce sdk imports
This commit is contained in:
@@ -66,6 +66,7 @@ For the plugin authoring guide, see [Plugin SDK overview](/plugins/sdk-overview)
|
||||
| `plugin-sdk/direct-dm` | Shared direct-DM auth/guard helpers |
|
||||
| `plugin-sdk/interactive-runtime` | Semantic message presentation, delivery, and legacy interactive reply helpers. See [Message Presentation](/plugins/message-presentation) |
|
||||
| `plugin-sdk/channel-inbound` | Compatibility barrel for inbound debounce, mention matching, mention-policy helpers, and envelope helpers |
|
||||
| `plugin-sdk/channel-inbound-debounce` | Narrow inbound debounce helpers |
|
||||
| `plugin-sdk/channel-mention-gating` | Narrow mention-policy helpers without the broader inbound runtime surface |
|
||||
| `plugin-sdk/channel-location` | Channel location context and formatting helpers |
|
||||
| `plugin-sdk/channel-logging` | Channel logging helpers for inbound drops and typing/ack failures |
|
||||
|
||||
@@ -2,7 +2,7 @@ import fs from "node:fs";
|
||||
import path from "node:path";
|
||||
import { Readable } from "node:stream";
|
||||
import type * as Lark from "@larksuiteoapi/node-sdk";
|
||||
import { mediaKindFromMime } from "openclaw/plugin-sdk/media-runtime";
|
||||
import { mediaKindFromMime } from "openclaw/plugin-sdk/media-mime";
|
||||
import { withTempDownloadPath } from "openclaw/plugin-sdk/temp-path";
|
||||
import { normalizeLowercaseStringOrEmpty } from "openclaw/plugin-sdk/text-runtime";
|
||||
import type { ClawdbotConfig } from "../runtime-api.js";
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import {
|
||||
createInboundDebouncer,
|
||||
resolveInboundDebounceMs,
|
||||
} from "openclaw/plugin-sdk/channel-inbound";
|
||||
import { hasControlCommand } from "openclaw/plugin-sdk/command-auth";
|
||||
} from "openclaw/plugin-sdk/channel-inbound-debounce";
|
||||
import { hasControlCommand } from "openclaw/plugin-sdk/command-detection";
|
||||
import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
|
||||
import { createNonExitingRuntimeEnv } from "../../../test/helpers/plugins/runtime-env.js";
|
||||
import type { ClawdbotConfig, PluginRuntime, RuntimeEnv } from "../runtime-api.js";
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import {
|
||||
createInboundDebouncer,
|
||||
resolveInboundDebounceMs,
|
||||
} from "openclaw/plugin-sdk/channel-inbound";
|
||||
import { hasControlCommand } from "openclaw/plugin-sdk/command-auth";
|
||||
} from "openclaw/plugin-sdk/channel-inbound-debounce";
|
||||
import { hasControlCommand } from "openclaw/plugin-sdk/command-detection";
|
||||
import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
|
||||
import { createNonExitingTypedRuntimeEnv } from "../../../test/helpers/plugins/runtime-env.js";
|
||||
import type { ClawdbotConfig, PluginRuntime, RuntimeEnv } from "../runtime-api.js";
|
||||
|
||||
@@ -4,7 +4,7 @@ import { shouldDebounceTextInbound } from "openclaw/plugin-sdk/channel-inbound";
|
||||
import {
|
||||
createInboundDebouncer,
|
||||
resolveInboundDebounceMs,
|
||||
} from "openclaw/plugin-sdk/channel-inbound";
|
||||
} from "openclaw/plugin-sdk/channel-inbound-debounce";
|
||||
import { resolveStoredModelOverride } from "openclaw/plugin-sdk/command-auth";
|
||||
import {
|
||||
resolveCommandAuthorization,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { resolveAccountEntry } from "openclaw/plugin-sdk/account-core";
|
||||
import { resolveInboundDebounceMs } from "openclaw/plugin-sdk/channel-inbound";
|
||||
import { resolveInboundDebounceMs } from "openclaw/plugin-sdk/channel-inbound-debounce";
|
||||
import { formatCliCommand } from "openclaw/plugin-sdk/cli-runtime";
|
||||
import { hasControlCommand } from "openclaw/plugin-sdk/command-detection";
|
||||
import { drainPendingDeliveries } from "openclaw/plugin-sdk/infra-runtime";
|
||||
|
||||
@@ -5,7 +5,8 @@ import type {
|
||||
WAMessage,
|
||||
WASocket,
|
||||
} from "@whiskeysockets/baileys";
|
||||
import { createInboundDebouncer, formatLocationText } from "openclaw/plugin-sdk/channel-inbound";
|
||||
import { formatLocationText } from "openclaw/plugin-sdk/channel-inbound";
|
||||
import { createInboundDebouncer } from "openclaw/plugin-sdk/channel-inbound-debounce";
|
||||
import { recordChannelActivity } from "openclaw/plugin-sdk/infra-runtime";
|
||||
import { defaultRuntime } from "openclaw/plugin-sdk/runtime-env";
|
||||
import { createSubsystemLogger } from "openclaw/plugin-sdk/runtime-env";
|
||||
|
||||
@@ -637,6 +637,10 @@
|
||||
"types": "./dist/plugin-sdk/channel-inbound.d.ts",
|
||||
"default": "./dist/plugin-sdk/channel-inbound.js"
|
||||
},
|
||||
"./plugin-sdk/channel-inbound-debounce": {
|
||||
"types": "./dist/plugin-sdk/channel-inbound-debounce.d.ts",
|
||||
"default": "./dist/plugin-sdk/channel-inbound-debounce.js"
|
||||
},
|
||||
"./plugin-sdk/channel-inbound-roots": {
|
||||
"types": "./dist/plugin-sdk/channel-inbound-roots.d.ts",
|
||||
"default": "./dist/plugin-sdk/channel-inbound-roots.js"
|
||||
|
||||
@@ -145,6 +145,7 @@
|
||||
"channel-contract",
|
||||
"channel-feedback",
|
||||
"channel-inbound",
|
||||
"channel-inbound-debounce",
|
||||
"channel-inbound-roots",
|
||||
"channel-logging",
|
||||
"channel-location",
|
||||
|
||||
7
src/plugin-sdk/channel-inbound-debounce.ts
Normal file
7
src/plugin-sdk/channel-inbound-debounce.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
// Narrow inbound debounce helpers for channel plugins.
|
||||
|
||||
export {
|
||||
createInboundDebouncer,
|
||||
resolveInboundDebounceMs,
|
||||
type InboundDebounceCreateParams,
|
||||
} from "../auto-reply/inbound-debounce.js";
|
||||
@@ -6,3 +6,4 @@ export {
|
||||
getFileExtension,
|
||||
normalizeMimeType,
|
||||
} from "../media/mime.js";
|
||||
export { mediaKindFromMime, type MediaKind } from "../media/constants.js";
|
||||
|
||||
Reference in New Issue
Block a user