refactor: trim extension helper shims

This commit is contained in:
Peter Steinberger
2026-05-01 14:38:56 +01:00
parent 77c0ecdf34
commit 15649228d4
15 changed files with 1 additions and 73 deletions

View File

@@ -5,7 +5,6 @@ export {
projectCredentialSnapshotFields,
resolveConfiguredFromCredentialStatuses,
} from "openclaw/plugin-sdk/channel-status";
export { createScopedChannelConfigAdapter } from "openclaw/plugin-sdk/channel-config-helpers";
export type { ChannelPlugin } from "openclaw/plugin-sdk/channel-core";
export type { OpenClawConfig } from "openclaw/plugin-sdk/config-types";

View File

@@ -79,6 +79,5 @@ export const THREAD_BINDINGS_VERSION = 1 as const;
export const THREAD_BINDINGS_SWEEP_INTERVAL_MS = 120_000;
export const DEFAULT_THREAD_BINDING_IDLE_TIMEOUT_MS = 24 * 60 * 60 * 1000; // 24h
export const DEFAULT_THREAD_BINDING_MAX_AGE_MS = 0; // disabled
export const DEFAULT_FAREWELL_TEXT = "Thread unfocused. Messages here will no longer be routed.";
export const DISCORD_UNKNOWN_CHANNEL_ERROR_CODE = 10_003;
export const RECENT_UNBOUND_WEBHOOK_ECHO_WINDOW_MS = 30_000;

View File

@@ -498,8 +498,6 @@ export async function runFeishuLogin(params: {
// Exported wizard
// ---------------------------------------------------------------------------
export { feishuSetupAdapter } from "./setup-core.js";
export const feishuSetupWizard: ChannelSetupWizard = {
channel,
resolveAccountIdForConfigure: ({ accountOverride, defaultAccountId, cfg }) =>

View File

@@ -91,8 +91,6 @@ const googlechatDmPolicy: ChannelSetupDmPolicy = {
promptAllowFrom,
};
export { googlechatSetupAdapter } from "./setup-core.js";
function createServiceAccountTextInput(params: {
inputKey: GoogleChatTextInputKey;
message: string;

View File

@@ -647,5 +647,3 @@ export async function monitorIMessageProvider(opts: MonitorIMessageOpts = {}): P
await activeClient.stop();
}
}
export const resolveIMessageRuntimeGroupPolicy = resolveOpenProviderRuntimeGroupPolicy;

View File

@@ -81,8 +81,6 @@ const lineDmPolicy: ChannelSetupDmPolicy = {
}),
};
export { lineSetupAdapter } from "./setup-core.js";
export const lineSetupWizard: ChannelSetupWizard = {
channel,
status: createStandardChannelSetupStatus({

View File

@@ -1 +0,0 @@
export { createWindowsCmdShimFixture } from "openclaw/plugin-sdk/test-env";

View File

@@ -1,8 +1,4 @@
export { createAccountStatusSink } from "openclaw/plugin-sdk/channel-lifecycle";
export type { ChannelPlugin } from "openclaw/plugin-sdk/core";
export { DEFAULT_ACCOUNT_ID } from "openclaw/plugin-sdk/core";
export {
resolveAllowlistProviderRuntimeGroupPolicy,
resolveDefaultGroupPolicy,
} from "openclaw/plugin-sdk/runtime-group-policy";
export { chunkTextForOutbound } from "openclaw/plugin-sdk/text-chunking";

View File

@@ -1,35 +0,0 @@
import * as ssrf from "openclaw/plugin-sdk/ssrf-runtime";
import { normalizeLowercaseStringOrEmpty } from "openclaw/plugin-sdk/text-runtime";
import { vi } from "vitest";
export function mockPublicPinnedHostname() {
return vi.spyOn(ssrf, "resolvePinnedHostnameWithPolicy").mockImplementation(async (hostname) => {
const normalized = normalizeLowercaseStringOrEmpty(hostname).replace(/\.$/, "");
const addresses = ["93.184.216.34"];
const lookup = ((host: string, options?: unknown, callback?: unknown) => {
const cb =
typeof options === "function"
? (options as (err: NodeJS.ErrnoException | null, address: unknown) => void)
: (callback as (err: NodeJS.ErrnoException | null, address: unknown) => void);
if (!cb) {
return;
}
if (normalizeLowercaseStringOrEmpty(host).replace(/\.$/, "") !== normalized) {
cb(null, []);
return;
}
cb(
null,
addresses.map((address) => ({
address,
family: address.includes(":") ? 6 : 4,
})),
);
}) as never;
return {
hostname: normalized,
addresses,
lookup,
};
});
}

View File

@@ -1 +0,0 @@
export { createAuthRateLimiter } from "openclaw/plugin-sdk/webhook-ingress";

View File

@@ -24,7 +24,6 @@ export {
export type {
QaBusAttachment,
QaBusConversation,
QaBusConversationKind,
QaBusCreateThreadInput,
QaBusDeleteMessageInput,
QaBusEditMessageInput,

View File

@@ -42,20 +42,6 @@ export interface PluginApprovalRequest {
};
}
export interface ExecApprovalResolved {
id: string;
decision: string;
resolvedBy?: string;
[key: string]: unknown;
}
export interface PluginApprovalResolved {
id: string;
decision: string;
resolvedBy?: string;
[key: string]: unknown;
}
export type ApprovalDecision = "allow-once" | "allow-always" | "deny";
export interface ApprovalTarget {

View File

@@ -2,7 +2,6 @@ export { getRuntimeConfig } from "openclaw/plugin-sdk/runtime-config-snapshot";
export { isDangerousNameMatchingEnabled } from "openclaw/plugin-sdk/dangerous-name-runtime";
export {
readSessionUpdatedAt,
recordSessionMetaFromInbound,
resolveSessionKey,
resolveStorePath,
updateLastRoute,

View File

@@ -21,8 +21,6 @@ function parseList(value: string): string[] {
.filter(Boolean);
}
export { tlonSetupAdapter } from "./setup-core.js";
export const tlonSetupWizard = createTlonSetupWizardBase({
resolveConfigured: async ({ cfg, accountId }) => await resolveTlonSetupConfigured(cfg, accountId),
resolveStatusLines: async ({ cfg, accountId }) =>

View File

@@ -1,7 +1,4 @@
export {
ssrfPolicyFromDangerouslyAllowPrivateNetwork,
ssrfPolicyFromAllowPrivateNetwork,
} from "openclaw/plugin-sdk/ssrf-runtime";
export { ssrfPolicyFromDangerouslyAllowPrivateNetwork } from "openclaw/plugin-sdk/ssrf-runtime";
import { normalizeUrbitHostname, validateUrbitBaseUrl } from "./base-url.js";
import { UrbitUrlError } from "./errors.js";