refactor: hide infra helper internals

This commit is contained in:
Peter Steinberger
2026-05-02 07:02:28 +01:00
parent 0a798af4fc
commit 2cc79ff184
5 changed files with 5 additions and 5 deletions

View File

@@ -467,7 +467,7 @@ export function resolveClawHubBaseUrl(baseUrl?: string): string {
return normalizeBaseUrl(baseUrl);
}
export function formatSha256Integrity(bytes: Uint8Array): string {
function formatSha256Integrity(bytes: Uint8Array): string {
const digest = createHash("sha256").update(bytes).digest("base64");
return `sha256-${digest}`;
}

View File

@@ -6,7 +6,7 @@ import { createHttp1ProxyAgent } from "../undici-runtime.js";
export const DEFAULT_PROXY_VALIDATION_ALLOWED_URLS = ["https://example.com/"] as const;
export const DEFAULT_PROXY_VALIDATION_TIMEOUT_MS = 5000;
const DEFAULT_PROXY_VALIDATION_TIMEOUT_MS = 5000;
const DENIED_CANARY_HEADER = "x-openclaw-proxy-validation-canary";
export type ProxyValidationConfigSource = "override" | "config" | "env" | "missing" | "disabled";

View File

@@ -39,7 +39,7 @@ function resolvePluginTargetPrefix(prefix: string): string | undefined {
return undefined;
}
export function resolveChannelTargetProviderPrefix(
function resolveChannelTargetProviderPrefix(
raw?: string | null,
): ChannelTargetProviderPrefix | undefined {
const match = /^\s*([a-z][a-z0-9_-]*):/i.exec(raw ?? "");

View File

@@ -22,7 +22,7 @@ import { hasPotentialPluginActionParam } from "./message-action-param-keys.js";
export const readBooleanParam = readBooleanParamShared;
export const BASE_ACTION_MEDIA_SOURCE_PARAM_KEYS = [
const BASE_ACTION_MEDIA_SOURCE_PARAM_KEYS = [
"media",
"path",
"filePath",

View File

@@ -96,7 +96,7 @@ function cloneRestartSentinelPayload(payload: RestartSentinelPayload): RestartSe
return JSON.parse(JSON.stringify(payload)) as RestartSentinelPayload;
}
export async function rewriteRestartSentinel(
async function rewriteRestartSentinel(
rewrite: (payload: RestartSentinelPayload) => RestartSentinelPayload | null,
env: NodeJS.ProcessEnv = process.env,
): Promise<RestartSentinel | null> {