perf: narrow inbound debounce sdk imports · openclaw/openclaw@c7ee5d8
steipete
·
2026-04-24
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -66,6 +66,7 @@ For the plugin authoring guide, see [Plugin SDK overview](/plugins/sdk-overview)
|
66 | 66 | | `plugin-sdk/direct-dm` | Shared direct-DM auth/guard helpers | |
67 | 67 | | `plugin-sdk/interactive-runtime` | Semantic message presentation, delivery, and legacy interactive reply helpers. See [Message Presentation](/plugins/message-presentation) | |
68 | 68 | | `plugin-sdk/channel-inbound` | Compatibility barrel for inbound debounce, mention matching, mention-policy helpers, and envelope helpers | |
| 69 | +| `plugin-sdk/channel-inbound-debounce` | Narrow inbound debounce helpers | |
69 | 70 | | `plugin-sdk/channel-mention-gating` | Narrow mention-policy helpers without the broader inbound runtime surface | |
70 | 71 | | `plugin-sdk/channel-location` | Channel location context and formatting helpers | |
71 | 72 | | `plugin-sdk/channel-logging` | Channel logging helpers for inbound drops and typing/ack failures | |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -2,7 +2,7 @@ import fs from "node:fs";
|
2 | 2 | import path from "node:path"; |
3 | 3 | import { Readable } from "node:stream"; |
4 | 4 | import type * as Lark from "@larksuiteoapi/node-sdk"; |
5 | | -import { mediaKindFromMime } from "openclaw/plugin-sdk/media-runtime"; |
| 5 | +import { mediaKindFromMime } from "openclaw/plugin-sdk/media-mime"; |
6 | 6 | import { withTempDownloadPath } from "openclaw/plugin-sdk/temp-path"; |
7 | 7 | import { normalizeLowercaseStringOrEmpty } from "openclaw/plugin-sdk/text-runtime"; |
8 | 8 | import type { ClawdbotConfig } from "../runtime-api.js"; |
|
| Original file line number | Diff line number | Diff line change |
|---|
|
1 | 1 | import { |
2 | 2 | createInboundDebouncer, |
3 | 3 | resolveInboundDebounceMs, |
4 | | -} from "openclaw/plugin-sdk/channel-inbound"; |
5 | | -import { hasControlCommand } from "openclaw/plugin-sdk/command-auth"; |
| 4 | +} from "openclaw/plugin-sdk/channel-inbound-debounce"; |
| 5 | +import { hasControlCommand } from "openclaw/plugin-sdk/command-detection"; |
6 | 6 | import { afterEach, beforeEach, describe, expect, it, vi } from "vitest"; |
7 | 7 | import { createNonExitingRuntimeEnv } from "../../../test/helpers/plugins/runtime-env.js"; |
8 | 8 | import type { ClawdbotConfig, PluginRuntime, RuntimeEnv } from "../runtime-api.js"; |
|
| Original file line number | Diff line number | Diff line change |
|---|
|
1 | 1 | import { |
2 | 2 | createInboundDebouncer, |
3 | 3 | resolveInboundDebounceMs, |
4 | | -} from "openclaw/plugin-sdk/channel-inbound"; |
5 | | -import { hasControlCommand } from "openclaw/plugin-sdk/command-auth"; |
| 4 | +} from "openclaw/plugin-sdk/channel-inbound-debounce"; |
| 5 | +import { hasControlCommand } from "openclaw/plugin-sdk/command-detection"; |
6 | 6 | import { afterEach, beforeEach, describe, expect, it, vi } from "vitest"; |
7 | 7 | import { createNonExitingTypedRuntimeEnv } from "../../../test/helpers/plugins/runtime-env.js"; |
8 | 8 | import type { ClawdbotConfig, PluginRuntime, RuntimeEnv } from "../runtime-api.js"; |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -4,7 +4,7 @@ import { shouldDebounceTextInbound } from "openclaw/plugin-sdk/channel-inbound";
|
4 | 4 | import { |
5 | 5 | createInboundDebouncer, |
6 | 6 | resolveInboundDebounceMs, |
7 | | -} from "openclaw/plugin-sdk/channel-inbound"; |
| 7 | +} from "openclaw/plugin-sdk/channel-inbound-debounce"; |
8 | 8 | import { resolveStoredModelOverride } from "openclaw/plugin-sdk/command-auth"; |
9 | 9 | import { |
10 | 10 | resolveCommandAuthorization, |
|
| Original file line number | Diff line number | Diff line change |
|---|
|
1 | 1 | import { resolveAccountEntry } from "openclaw/plugin-sdk/account-core"; |
2 | | -import { resolveInboundDebounceMs } from "openclaw/plugin-sdk/channel-inbound"; |
| 2 | +import { resolveInboundDebounceMs } from "openclaw/plugin-sdk/channel-inbound-debounce"; |
3 | 3 | import { formatCliCommand } from "openclaw/plugin-sdk/cli-runtime"; |
4 | 4 | import { hasControlCommand } from "openclaw/plugin-sdk/command-detection"; |
5 | 5 | import { drainPendingDeliveries } from "openclaw/plugin-sdk/infra-runtime"; |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -5,7 +5,8 @@ import type {
|
5 | 5 | WAMessage, |
6 | 6 | WASocket, |
7 | 7 | } from "@whiskeysockets/baileys"; |
8 | | -import { createInboundDebouncer, formatLocationText } from "openclaw/plugin-sdk/channel-inbound"; |
| 8 | +import { formatLocationText } from "openclaw/plugin-sdk/channel-inbound"; |
| 9 | +import { createInboundDebouncer } from "openclaw/plugin-sdk/channel-inbound-debounce"; |
9 | 10 | import { recordChannelActivity } from "openclaw/plugin-sdk/infra-runtime"; |
10 | 11 | import { defaultRuntime } from "openclaw/plugin-sdk/runtime-env"; |
11 | 12 | import { createSubsystemLogger } from "openclaw/plugin-sdk/runtime-env"; |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -637,6 +637,10 @@
|
637 | 637 | "types": "./dist/plugin-sdk/channel-inbound.d.ts", |
638 | 638 | "default": "./dist/plugin-sdk/channel-inbound.js" |
639 | 639 | }, |
| 640 | +"./plugin-sdk/channel-inbound-debounce": { |
| 641 | +"types": "./dist/plugin-sdk/channel-inbound-debounce.d.ts", |
| 642 | +"default": "./dist/plugin-sdk/channel-inbound-debounce.js" |
| 643 | + }, |
640 | 644 | "./plugin-sdk/channel-inbound-roots": { |
641 | 645 | "types": "./dist/plugin-sdk/channel-inbound-roots.d.ts", |
642 | 646 | "default": "./dist/plugin-sdk/channel-inbound-roots.js" |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -145,6 +145,7 @@
|
145 | 145 | "channel-contract", |
146 | 146 | "channel-feedback", |
147 | 147 | "channel-inbound", |
| 148 | +"channel-inbound-debounce", |
148 | 149 | "channel-inbound-roots", |
149 | 150 | "channel-logging", |
150 | 151 | "channel-location", |
|
| Original file line number | Diff line number | Diff line change |
|---|
|
| 1 | +// Narrow inbound debounce helpers for channel plugins. |
| 2 | + |
| 3 | +export { |
| 4 | +createInboundDebouncer, |
| 5 | +resolveInboundDebounceMs, |
| 6 | +type InboundDebounceCreateParams, |
| 7 | +} from "../auto-reply/inbound-debounce.js"; |
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。