mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 05:30:42 +00:00
refactor: hide agent helper internals
This commit is contained in:
@@ -238,7 +238,7 @@ function triggerFetch(): void {
|
||||
* triggers a background API fetch as a last resort.
|
||||
* Does not block — returns immediately.
|
||||
*/
|
||||
export function ensureOpenRouterModelCache(): void {
|
||||
function ensureOpenRouterModelCache(): void {
|
||||
if (cache) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -29,9 +29,9 @@ export const RUNTIME_AUTH_REFRESH_MARGIN_MS = 5 * 60 * 1000;
|
||||
export const RUNTIME_AUTH_REFRESH_RETRY_MS = 60 * 1000;
|
||||
export const RUNTIME_AUTH_REFRESH_MIN_DELAY_MS = 5 * 1000;
|
||||
|
||||
export const DEFAULT_OVERLOAD_FAILOVER_BACKOFF_MS = 0;
|
||||
export const DEFAULT_MAX_OVERLOAD_PROFILE_ROTATIONS = 1;
|
||||
export const DEFAULT_MAX_RATE_LIMIT_PROFILE_ROTATIONS = 1;
|
||||
const DEFAULT_OVERLOAD_FAILOVER_BACKOFF_MS = 0;
|
||||
const DEFAULT_MAX_OVERLOAD_PROFILE_ROTATIONS = 1;
|
||||
const DEFAULT_MAX_RATE_LIMIT_PROFILE_ROTATIONS = 1;
|
||||
|
||||
export function resolveOverloadFailoverBackoffMs(cfg?: OpenClawConfig): number {
|
||||
return cfg?.auth?.cooldowns?.overloadedBackoffMs ?? DEFAULT_OVERLOAD_FAILOVER_BACKOFF_MS;
|
||||
|
||||
@@ -18,7 +18,7 @@ import { loadEmbeddedPiMcpConfig } from "./embedded-pi-mcp.js";
|
||||
const log = createSubsystemLogger("embedded-pi-settings");
|
||||
|
||||
export const DEFAULT_EMBEDDED_PI_PROJECT_SETTINGS_POLICY = "sanitize";
|
||||
export const SANITIZED_PROJECT_PI_KEYS = ["shellPath", "shellCommandPrefix"] as const;
|
||||
const SANITIZED_PROJECT_PI_KEYS = ["shellPath", "shellCommandPrefix"] as const;
|
||||
|
||||
export type EmbeddedPiProjectSettingsPolicy = "trusted" | "sanitize" | "ignore";
|
||||
|
||||
|
||||
@@ -46,7 +46,7 @@ export async function createDockerSandboxBackend(
|
||||
});
|
||||
}
|
||||
|
||||
export function createDockerSandboxBackendHandle(params: {
|
||||
function createDockerSandboxBackendHandle(params: {
|
||||
containerName: string;
|
||||
workdir: string;
|
||||
env?: Record<string, string>;
|
||||
|
||||
Reference in New Issue
Block a user