Skip to content

Commit 0141471

Browse files
committed
refactor: move shared helpers off reserved sdk seams
1 parent e91f9a3 commit 0141471

30 files changed

Lines changed: 89 additions & 34 deletions
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
74344f185b3149695443bf8815c9dd784daf9c0b8118ecc54129dc57899e9564 plugin-sdk-api-baseline.json
2-
7b84c2f1e5743dac9c764fdee6d3b23e64553516c409f4a24f009a36c40d64e8 plugin-sdk-api-baseline.jsonl
1+
491267e919c6bf426f673a9066e703811c7779a32de87edd0ce493147fd4438e plugin-sdk-api-baseline.json
2+
590d21aeb520f34b5bf23abb7b17602b204f170547c772d60b604bb34a3940bb plugin-sdk-api-baseline.jsonl

docs/plugins/sdk-subpaths.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -138,12 +138,12 @@ For the plugin authoring guide, see [Plugin SDK overview](/plugins/sdk-overview)
138138
| `plugin-sdk/allow-from` | `formatAllowFromLowercase` |
139139
| `plugin-sdk/channel-secret-runtime` | Narrow secret-contract collection helpers for channel/plugin secret surfaces |
140140
| `plugin-sdk/secret-ref-runtime` | Narrow `coerceSecretRef` and SecretRef typing helpers for secret-contract/config parsing |
141-
| `plugin-sdk/security-runtime` | Shared trust, DM gating, external-content, and secret-collection helpers |
141+
| `plugin-sdk/security-runtime` | Shared trust, DM gating, external-content, constant-time secret comparison, and secret-collection helpers |
142142
| `plugin-sdk/ssrf-policy` | Host allowlist and private-network SSRF policy helpers |
143143
| `plugin-sdk/ssrf-dispatcher` | Narrow pinned-dispatcher helpers without the broad infra runtime surface |
144-
| `plugin-sdk/ssrf-runtime` | Pinned-dispatcher, SSRF-guarded fetch, and SSRF policy helpers |
144+
| `plugin-sdk/ssrf-runtime` | Pinned-dispatcher, SSRF-guarded fetch, SSRF error, and SSRF policy helpers |
145145
| `plugin-sdk/secret-input` | Secret input parsing helpers |
146-
| `plugin-sdk/webhook-ingress` | Webhook request/target helpers |
146+
| `plugin-sdk/webhook-ingress` | Webhook request/target helpers and raw websocket/body coercion |
147147
| `plugin-sdk/webhook-request-guards` | Request body size/timeout helpers |
148148
</Accordion>
149149

@@ -160,7 +160,7 @@ For the plugin authoring guide, see [Plugin SDK overview](/plugins/sdk-overview)
160160
| `plugin-sdk/lazy-runtime` | Lazy runtime import/binding helpers such as `createLazyRuntimeModule`, `createLazyRuntimeMethod`, and `createLazyRuntimeSurface` |
161161
| `plugin-sdk/process-runtime` | Process exec helpers |
162162
| `plugin-sdk/cli-runtime` | CLI formatting, wait, version, argument-invocation, and lazy command-group helpers |
163-
| `plugin-sdk/gateway-runtime` | Gateway client and channel-status patch helpers |
163+
| `plugin-sdk/gateway-runtime` | Gateway client, gateway CLI RPC, gateway protocol errors, and channel-status patch helpers |
164164
| `plugin-sdk/config-runtime` | Config load/write helpers and plugin-config lookup helpers |
165165
| `plugin-sdk/telegram-command-config` | Telegram command-name/description normalization and duplicate/conflict checks, even when the bundled Telegram contract surface is unavailable |
166166
| `plugin-sdk/text-autolink-runtime` | File-reference autolink detection without the broad text-runtime barrel |

extensions/bluebubbles/src/monitor.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import type { IncomingMessage, ServerResponse } from "node:http";
2-
import { safeEqualSecret } from "openclaw/plugin-sdk/browser-security-runtime";
32
import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
3+
import { safeEqualSecret } from "openclaw/plugin-sdk/security-runtime";
44
import { normalizeLowercaseStringOrEmpty } from "openclaw/plugin-sdk/string-coerce-runtime";
55
import { resolveBlueBubblesEffectiveAllowPrivateNetwork } from "./accounts.js";
66
import { createBlueBubblesDebounceRegistry } from "./monitor-debounce.js";

extensions/feishu/src/monitor-transport-runtime-api.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
export type { RuntimeEnv } from "../runtime-api.js";
2-
export { safeEqualSecret } from "openclaw/plugin-sdk/browser-security-runtime";
2+
export { safeEqualSecret } from "openclaw/plugin-sdk/security-runtime";
33
export { applyBasicWebhookRequestGuards } from "openclaw/plugin-sdk/webhook-ingress";
44
export {
55
installRequestBodyLimitGuard,

extensions/google-meet/index.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1+
import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
12
import {
23
callGatewayFromCli,
34
ErrorCodes,
45
errorShape,
5-
} from "openclaw/plugin-sdk/browser-node-runtime";
6-
import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
7-
import type { GatewayRequestHandlerOptions } from "openclaw/plugin-sdk/gateway-runtime";
6+
type GatewayRequestHandlerOptions,
7+
} from "openclaw/plugin-sdk/gateway-runtime";
88
import { definePluginEntry, type OpenClawPluginApi } from "openclaw/plugin-sdk/plugin-entry";
99
import { normalizeOptionalString } from "openclaw/plugin-sdk/text-runtime";
1010
import { Type } from "typebox";

extensions/google-meet/src/transports/chrome.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { callGatewayFromCli } from "openclaw/plugin-sdk/browser-node-runtime";
21
import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime";
2+
import { callGatewayFromCli } from "openclaw/plugin-sdk/gateway-runtime";
33
import type { PluginRuntime } from "openclaw/plugin-sdk/plugin-runtime";
44
import type { RuntimeLogger } from "openclaw/plugin-sdk/plugin-runtime";
55
import type { GoogleMeetConfig } from "../config.js";

extensions/matrix/src/cli.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import type { Command } from "commander";
22
import { normalizeAccountId } from "openclaw/plugin-sdk/account-id";
3-
import { formatZonedTimestamp } from "openclaw/plugin-sdk/matrix-runtime-shared";
43
import type { ChannelSetupInput } from "openclaw/plugin-sdk/setup";
54
import { resolveMatrixAccount, resolveMatrixAccountConfig } from "./matrix/accounts.js";
65
import { listMatrixOwnDevices, pruneMatrixStaleGatewayDevices } from "./matrix/actions/devices.js";
@@ -30,6 +29,7 @@ import { isOpenClawManagedMatrixDevice } from "./matrix/device-health.js";
3029
import type { MatrixDirectRoomCandidate } from "./matrix/direct-management.js";
3130
import { formatMatrixErrorMessage } from "./matrix/errors.js";
3231
import { applyMatrixProfileUpdate, type MatrixProfileUpdateResult } from "./profile-update.js";
32+
import { formatZonedTimestamp } from "./runtime-api.js";
3333
import { getMatrixRuntime } from "./runtime.js";
3434
import { matrixSetupAdapter } from "./setup-core.js";
3535
import type { CoreConfig } from "./types.js";

extensions/mattermost/runtime-api.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ export { evaluateSenderGroupAccessForPolicy } from "openclaw/plugin-sdk/group-ac
6161
export { createChannelReplyPipeline } from "openclaw/plugin-sdk/channel-reply-pipeline";
6262
export { logTypingFailure } from "openclaw/plugin-sdk/channel-feedback";
6363
export { loadOutboundMediaFromUrl } from "openclaw/plugin-sdk/outbound-media";
64-
export { rawDataToString } from "openclaw/plugin-sdk/browser-node-runtime";
64+
export { rawDataToString } from "openclaw/plugin-sdk/webhook-ingress";
6565
export { chunkTextForOutbound } from "openclaw/plugin-sdk/text-chunking";
6666
export {
6767
DEFAULT_GROUP_HISTORY_LIMIT,

extensions/mattermost/src/mattermost/interactions.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { createHmac } from "node:crypto";
22
import type { IncomingMessage, ServerResponse } from "node:http";
3-
import { safeEqualSecret } from "openclaw/plugin-sdk/browser-security-runtime";
3+
import { safeEqualSecret } from "openclaw/plugin-sdk/security-runtime";
44
import {
55
normalizeOptionalString,
66
normalizeStringifiedOptionalString,

extensions/mattermost/src/mattermost/monitor-helpers.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
import { rawDataToString } from "openclaw/plugin-sdk/browser-node-runtime";
21
import { formatInboundFromLabel as formatInboundFromLabelShared } from "openclaw/plugin-sdk/channel-inbound";
32
import { createDedupeCache, type OpenClawConfig } from "openclaw/plugin-sdk/core";
43
import { resolveThreadSessionKeys as resolveThreadSessionKeysShared } from "openclaw/plugin-sdk/routing";
54
import {
65
normalizeLowercaseStringOrEmpty,
76
normalizeOptionalString,
87
} from "openclaw/plugin-sdk/text-runtime";
8+
import { rawDataToString } from "openclaw/plugin-sdk/webhook-ingress";
99

1010
export { createDedupeCache, rawDataToString };
1111

0 commit comments

Comments
 (0)