mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 14:00:47 +00:00
refactor: trim extension helper shims
This commit is contained in:
@@ -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";
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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 }) =>
|
||||
|
||||
@@ -91,8 +91,6 @@ const googlechatDmPolicy: ChannelSetupDmPolicy = {
|
||||
promptAllowFrom,
|
||||
};
|
||||
|
||||
export { googlechatSetupAdapter } from "./setup-core.js";
|
||||
|
||||
function createServiceAccountTextInput(params: {
|
||||
inputKey: GoogleChatTextInputKey;
|
||||
message: string;
|
||||
|
||||
@@ -647,5 +647,3 @@ export async function monitorIMessageProvider(opts: MonitorIMessageOpts = {}): P
|
||||
await activeClient.stop();
|
||||
}
|
||||
}
|
||||
|
||||
export const resolveIMessageRuntimeGroupPolicy = resolveOpenProviderRuntimeGroupPolicy;
|
||||
|
||||
@@ -81,8 +81,6 @@ const lineDmPolicy: ChannelSetupDmPolicy = {
|
||||
}),
|
||||
};
|
||||
|
||||
export { lineSetupAdapter } from "./setup-core.js";
|
||||
|
||||
export const lineSetupWizard: ChannelSetupWizard = {
|
||||
channel,
|
||||
status: createStandardChannelSetupStatus({
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
export { createWindowsCmdShimFixture } from "openclaw/plugin-sdk/test-env";
|
||||
@@ -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";
|
||||
|
||||
@@ -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,
|
||||
};
|
||||
});
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
export { createAuthRateLimiter } from "openclaw/plugin-sdk/webhook-ingress";
|
||||
@@ -24,7 +24,6 @@ export {
|
||||
export type {
|
||||
QaBusAttachment,
|
||||
QaBusConversation,
|
||||
QaBusConversationKind,
|
||||
QaBusCreateThreadInput,
|
||||
QaBusDeleteMessageInput,
|
||||
QaBusEditMessageInput,
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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 }) =>
|
||||
|
||||
@@ -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";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user