openclaw
Version:
Multi-channel AI gateway with extensible messaging integrations
66 lines (65 loc) • 24 kB
JavaScript
import { a as normalizeZaiEnv, i as normalizeEnv, n as isVitestRuntimeEnv, r as logAcceptedEnvOption, t as isTruthyEnvValue } from "../env-Di49gJwo.js";
import { E as resolveExpiresAtMsFromEpochSeconds, T as resolveExpiresAtMsFromDurationSeconds, _ as parseStrictFiniteNumber, b as parseStrictPositiveInteger, f as clampTimerTimeoutMs, g as parseFiniteNumber, h as nonNegativeSecondsToSafeMilliseconds, n as MAX_TIMER_TIMEOUT_MS, p as finiteSecondsToTimerSafeMilliseconds, r as MAX_TIMER_TIMEOUT_SECONDS, v as parseStrictInteger, w as resolveExpiresAtMsFromDurationOrEpoch, x as positiveSecondsToSafeMilliseconds, y as parseStrictNonNegativeInteger } from "../number-coercion-CJQ8TR--.js";
import "../parse-finite-number-Z7n6tXLk.js";
import { a as resolveOsHomeRelativePath, c as resolveUserPath, i as resolveOsHomeDir, n as resolveEffectiveHomeDir, o as resolveRequiredHomeDir, r as resolveHomeRelativePath, s as resolveRequiredOsHomeDir, t as expandHomePrefix } from "../home-dir-BjcCg_IW.js";
import { a as formatUncaughtError, c as readErrorName, i as formatErrorMessage, l as stringifyNonErrorCause, n as detectErrorKind, o as hasErrnoCode, r as extractErrorCode, s as isErrno, t as collectErrorGraphCandidates, u as toErrorObject } from "../errors-BXgSefBE.js";
import { t as createAsyncLock } from "../async-lock-CaiUOILd.js";
import { i as isPathInside, m as FsSafeError } from "../path-BlG8lhgR.js";
import { A as resolveAbsolutePathForWrite, C as trySafeFileURLToPath, D as canonicalPathFromExistingAncestor, E as assertAbsolutePathInput, O as findExistingAncestor, S as safeFileURLToPath, T as pathExistsSync, _ as resolveLocalPathFromRootsSync, a as walkDirectory, b as hasEncodedFileUrlSeparator, c as withTimeout, g as readLocalFileFromRoots, i as writeFileWithinRoot, k as resolveAbsolutePathForRead, l as movePathToTrash, n as readFileWithinRoot, o as walkDirectorySync, r as writeExternalFileWithinRoot, s as readSecureFile, t as ensureAbsoluteDirectory, v as assertNoWindowsNetworkPath, w as pathExists, x as isWindowsNetworkPath, y as basenameFromMediaSource } from "../fs-safe-aqmM_n6V.js";
import { r as sanitizeUntrustedFileName } from "../sibling-temp-CLpkwDtX.js";
import { a as root, i as readLocalFileSafely, r as openLocalFileSafely, u as resolveOpenedFileRealPathForHandle } from "../secure-temp-dir-XAWcZnE2.js";
import { a as resolveRegularFileAppendFlags, i as readRegularFileSync, n as appendRegularFileSync, o as statRegularFile, r as readRegularFile, s as statRegularFileSync, t as appendRegularFile } from "../regular-file-BD2zl6_l.js";
import { d as onDiagnosticEvent, l as isDiagnosticsEnabled, n as emitDiagnosticEvent, t as areDiagnosticsEnabledForProcess } from "../diagnostic-events-Chmz2PSy.js";
import { n as resolvePreferredOpenClawTmpDir, t as POSIX_OPENCLAW_TMP_DIR } from "../tmp-openclaw-dir-DOKojISm.js";
import { a as tryReadSecretFileSync, i as readSecretFileSync, n as PRIVATE_SECRET_DIR_MODE, o as writeSecretFileAtomic, r as PRIVATE_SECRET_FILE_MODE, t as DEFAULT_SECRET_FILE_MAX_BYTES } from "../secret-file-PClaG9G0.js";
import { a as readJsonIfExists, c as JsonFileReadError, d as readRootJsonSync, f as readRootStructuredFileSync, h as writeJsonSync, i as readJsonFileStrict, l as readJsonSync, m as writeJson, n as readJson, o as tryReadJson, p as tryReadJsonSync, r as readJsonFile, s as writeTextAtomic, t as readDurableJsonFile, u as readRootJsonObjectSync } from "../json-files-2umMHm0W.js";
import { n as matchesDiagnosticFlag, r as resolveDiagnosticFlags, t as isDiagnosticFlagEnabled } from "../diagnostic-flags-4mY6zjJI.js";
import { t as runTasksWithConcurrency } from "../run-with-concurrency-DivrDqxu.js";
import { a as resolveApprovalAuditTrustPath, c as resolveExecutableTrustPath, d as resolveExecutionTargetTrustPath, f as resolvePolicyAllowlistCandidatePath, h as resolvePolicyTargetTrustPath, i as resolveApprovalAuditCandidatePath, l as resolveExecutionTargetCandidatePath, m as resolvePolicyTargetResolution, n as parseExecArgvToken, o as resolveCommandResolution, p as resolvePolicyTargetCandidatePath, r as resolveAllowlistCandidatePath, s as resolveCommandResolutionFromArgv, t as matchAllowlist, u as resolveExecutionTargetResolution } from "../exec-command-resolution-CqhcxBz-.js";
import { a as resetFileLockStateForTest, i as drainFileLockStateForTest, n as FILE_LOCK_TIMEOUT_ERROR_CODE, o as withFileLock, r as acquireFileLock } from "../file-lock-BOaqUSu6.js";
import "../file-lock-DQM8YrNh.js";
import { a as resetWSLStateForTests, i as isWSLSync, n as isWSL2Sync, r as isWSLEnv, t as isWSL } from "../wsl-Bb_g7JpO.js";
import { a as matchesNoProxy, c as shouldUseEnvHttpProxyForUrl, i as hasProxyEnvConfigured, n as hasEnvHttpProxyAgentConfigured, o as resolveEnvHttpProxyAgentOptions, r as hasEnvHttpProxyConfigured, s as resolveEnvHttpProxyUrl, t as PROXY_ENV_KEYS } from "../proxy-env-B9aW4MXJ.js";
import { a as forceResetGlobalDispatcher, i as ensureGlobalUndiciStreamTimeouts, n as ensureGlobalUndiciDispatcherStreamTimeouts, o as globalUndiciStreamTimeoutMs, r as ensureGlobalUndiciEnvProxyDispatcher, s as resetGlobalUndiciStreamTimeoutsForTests, t as DEFAULT_UNDICI_STREAM_TIMEOUT_MS } from "../undici-global-dispatcher-DTahNL39.js";
import { n as buildTimeoutAbortSignal, r as fetchWithTimeout, t as bindAbortRelay } from "../fetch-timeout-CDaw0X8V.js";
import { t as normalizeHostname } from "../hostname-D8MH4bbf.js";
import { _ as resolvePinnedHostnameWithPolicy, a as createPinnedDispatcher, b as ssrfPolicyFromHttpBaseUrlAllowedOrigin, c as isBlockedHostnameOrIp, d as isPrivateNetworkAllowedByPolicy, f as isSameSsrFPolicy, g as resolvePinnedHostname, h as normalizeHostnameAllowlist, i as closeDispatcher, l as isHostnameAllowedByPattern, m as mergeSsrFPolicies, n as assertHostnameAllowedWithPolicy, o as createPinnedLookup, p as matchesHostnameAllowlist, r as assertPublicHostname, s as isBlockedHostname, t as SsrFBlockedError, u as isPrivateIpAddress, v as resolveSsrFPolicyForUrl, x as ssrfPolicyFromHttpBaseUrlFakeIpHostnameAllowlist, y as ssrfPolicyFromHttpBaseUrlAllowedHostname } from "../ssrf-CvPEXMGn.js";
import { a as withStrictGuardedFetchMode, i as retainSafeHeadersForCrossOriginRedirectHeaders, o as withTrustedEnvProxyGuardedFetchMode, r as fetchWithSsrFGuard, s as withTrustedExplicitProxyGuardedFetchMode, t as GUARDED_FETCH_MODE } from "../fetch-guard-BttkNCLm.js";
import { t as fetchWithRuntimeDispatcher } from "../runtime-fetch-BwqSVSNK.js";
import { t as pruneMapToMaxSize } from "../map-size-DAGm21RM.js";
import { n as resolveNonNegativeIntegerOption } from "../numeric-options-BuRt1hwI.js";
import { n as resolveGlobalDedupeCache, t as createDedupeCache } from "../dedupe-DnzL4okR.js";
import "../local-file-access-CBe_wA_B.js";
import { a as enqueueSystemEvent, c as peekSystemEventEntries, d as resolveSystemEventDeliveryContext, i as drainSystemEvents, l as peekSystemEvents, n as consumeSystemEventEntries, o as hasSystemEvents, r as drainSystemEventEntries, s as isSystemEventContextChanged, t as consumeSelectedSystemEventEntries, u as resetSystemEventsForTest } from "../system-events-C5WI3S5a.js";
import { n as sleepWithAbort, t as computeBackoff } from "../backoff-S1yazmy1.js";
import { n as resolveHeartbeatIntervalMs, r as resolveHeartbeatSummaryForAgent, t as isHeartbeatEnabledForAgent } from "../heartbeat-summary-B73O--Iv.js";
import { a as PLUGIN_APPROVAL_TITLE_MAX_LENGTH, c as buildPluginApprovalRequestMessage, d as resolvePluginApprovalTimeoutMs, i as PLUGIN_APPROVAL_DESCRIPTION_MAX_LENGTH, l as buildPluginApprovalResolvedMessage, n as DEFAULT_PLUGIN_APPROVAL_TIMEOUT_MS, o as approvalDecisionLabel, r as MAX_PLUGIN_APPROVAL_TIMEOUT_MS, s as buildPluginApprovalExpiredMessage, t as DEFAULT_PLUGIN_APPROVAL_DECISIONS, u as resolvePluginApprovalRequestAllowedDecisions } from "../plugin-approvals-CcsweryB.js";
import { a as buildSafeShellCommand, c as splitCommandChain, i as buildSafeBinsShellCommand, l as splitCommandChainWithOperators, n as analyzeShellCommand, o as isWindowsPlatform, r as buildEnforcedShellCommand, s as resolvePlannedSegmentArgv, t as analyzeArgvCommand, u as windowsEscapeArg } from "../exec-approvals-analysis-B4N2JXzl.js";
import { a as resolveAllowAlwaysPatternEntries, i as normalizeSafeBins, n as evaluateShellAllowlist, o as resolveAllowAlwaysPatterns, r as isSafeBinUsage, s as resolveSafeBins, t as evaluateExecAllowlist } from "../exec-approvals-allowlist-VYEHBfj3.js";
import { A as resolveExecApprovalAllowedDecisions, B as resolveExecPolicyForMode, C as readExecApprovalsSnapshot, D as requireValidExecTarget, E as requestExecApprovalViaSocket, F as resolveExecApprovalsPath, H as saveExecApprovals, I as resolveExecApprovalsSocketPath, L as resolveExecApprovalsTranscriptPath, M as resolveExecApprovals, N as resolveExecApprovalsDisplayPath, O as requiresExecApproval, P as resolveExecApprovalsFromFile, R as resolveExecModeFromPolicy, S as persistAllowAlwaysPatterns, T as recordAllowlistUse, V as restoreExecApprovalsSnapshot, _ as normalizeExecAsk, a as addAllowlistEntry, b as normalizeExecSecurity, c as ensureExecApprovals, d as isExecApprovalDecisionAllowed, f as loadExecApprovals, g as normalizeExecApprovals, h as minSecurity, i as EXEC_TARGET_VALUES, j as resolveExecApprovalRequestAllowedDecisions, k as resolveAllowAlwaysPatternCoverage, l as hasDurableExecApproval, m as mergeExecApprovalsSocketDefaults, n as DEFAULT_EXEC_APPROVAL_DECISIONS, o as addDurableCommandApproval, p as maxAsk, r as DEFAULT_EXEC_APPROVAL_TIMEOUT_MS, s as commandRequiresSecurityAuditSuppressionApproval, t as DEFAULT_EXEC_APPROVAL_ASK_FALLBACK, u as hasNodeCommandAllowAlwaysMarker, v as normalizeExecHost, w as recordAllowlistMatchesUse, x as normalizeExecTarget, y as normalizeExecMode, z as resolveExecModePolicy } from "../exec-approvals-C6M6SGY3.js";
import { a as generateSecureUuid, i as generateSecureToken, n as generateSecureHex, r as generateSecureInt, t as generateSecureFraction } from "../secure-random-Ds4AFLgz.js";
import { n as retryAsync, t as resolveRetryConfig } from "../retry-BSIArBBz.js";
import { n as stripInternalRuntimeScaffolding, t as sanitizeForPlainText } from "../sanitize-text-BOGhD8MR.js";
import { n as resolveOutboundSendDep, t as resolveLegacyOutboundSendDepKeys } from "../send-deps-DjbvQHZ4.js";
import { n as hasSystemMark, r as prefixSystemMessage, t as SYSTEM_MARK } from "../system-message-Dltw0_t9.js";
import { i as formatDurationSeconds, n as formatDurationHuman, r as formatDurationPrecise, t as formatDurationCompact } from "../format-duration-BrZ-AaEJ.js";
import { i as resolveProxyFetchFromEnv, n as getProxyUrlFromFetch, r as makeProxyFetch, t as PROXY_FETCH_PROXY_URL } from "../proxy-fetch-Ii-XBOip.js";
import { n as wrapFetchWithAbortSignal, t as resolveFetch } from "../fetch-C0IyrVwh.js";
import { t as loadSecretFileSync } from "../secret-file-DihiQkbi.js";
import { n as recordChannelActivity, r as resetChannelActivityForTest, t as getChannelActivity } from "../channel-activity-4piA219h.js";
import { n as createRuntimeOutboundDelegates } from "../runtime-forwarders-Dxil5z45.js";
import { t as formatApprovalDisplayPath } from "../approval-display-paths-DlQSsCnq.js";
import { a as buildExecApprovalActionDescriptors, c as buildExecApprovalPendingReplyPayload, d as formatExecApprovalExpiresIn, f as getExecApprovalApproverDmNoticeText, i as buildApprovalPresentationFromActionDescriptors, l as buildExecApprovalPresentation, m as parseExecApprovalCommandText, n as buildApprovalInteractiveReplyFromActionDescriptors, o as buildExecApprovalCommandText, p as getExecApprovalReplyMetadata, r as buildApprovalPresentation, s as buildExecApprovalInteractiveReply, t as buildApprovalInteractiveReply, u as buildExecApprovalUnavailableReplyPayload } from "../exec-approval-reply-BXMsffTv.js";
import { a as isExecApprovalChannelRuntimeTerminalStartError, i as createExecApprovalChannelRuntime, n as deliverApprovalRequestViaChannelNativePlan, o as resolveChannelNativeApprovalDeliveryPlan, r as ExecApprovalChannelRuntimeTerminalStartError, t as createChannelNativeApprovalRuntime } from "../approval-native-runtime-BKbmE99v.js";
import { i as sanitizeExecApprovalWarningText, n as sanitizeExecApprovalDisplayText, r as sanitizeExecApprovalDisplayTextWithStatus, t as resolveExecApprovalCommandDisplay } from "../exec-approval-command-display-BYD_3EWn.js";
import { i as resolveExecApprovalSessionTarget, n as resolveApprovalRequestSessionConversation, r as resolveApprovalRequestSessionTarget, t as resolveApprovalRequestOriginTarget } from "../exec-approval-session-target-DfDihhuU.js";
import { n as resolveAgentOutboundIdentity, t as normalizeOutboundIdentity } from "../identity-Cl_l7pDP.js";
import { a as resolveIndicatorType, i as resetHeartbeatEventsForTest, n as getLastHeartbeatEvent, r as onHeartbeatEvent, t as emitHeartbeatEvent } from "../heartbeat-events-DlT3VAUF.js";
import { t as resolveHeartbeatVisibility } from "../heartbeat-visibility-BWEWr0c7.js";
import { t as waitForTransportReady } from "../transport-ready-CPbvF2Ea.js";
import { t as drainPendingDeliveries } from "../delivery-queue-runtime-DZ2a_Ald.js";
import { a as isRequestBodyLimitError, c as requestBodyErrorToText, i as installRequestBodyLimitGuard, l as testApi, n as DEFAULT_WEBHOOK_MAX_BODY_BYTES, o as readJsonBodyWithLimit, r as RequestBodyLimitError, s as readRequestBodyWithLimit, t as DEFAULT_WEBHOOK_BODY_TIMEOUT_MS } from "../http-body-DASeqdKJ.js";
import { n as createChannelApiRetryRunner, r as createRateLimitRetryRunner, t as CHANNEL_API_RETRY_DEFAULTS } from "../retry-policy-COMGOvKi.js";
import { i as normalizeScpRemotePath, n as isSafeScpRemotePath, r as normalizeScpRemoteHost, t as isSafeScpRemoteHost } from "../scp-host-D4uXCtRP.js";
import { a as isHttpsUrlAllowedByHostnameSuffixAllowlist, c as normalizeHostnameSuffixAllowlist, d as ssrfPolicyFromPrivateNetworkOptIn, i as hasLegacyFlatAllowPrivateNetworkAlias, l as ssrfPolicyFromAllowPrivateNetwork, n as buildHostnameAllowlistPolicyFromSuffixAllowlist, o as isPrivateNetworkOptInEnabled, r as createLegacyPrivateNetworkDoctorContract, s as migrateLegacyFlatAllowPrivateNetworkAlias, t as assertHttpUrlTargetsPrivateNetwork, u as ssrfPolicyFromDangerouslyAllowPrivateNetwork } from "../ssrf-policy-sZLyyYht.js";
export { CHANNEL_API_RETRY_DEFAULTS, DEFAULT_EXEC_APPROVAL_ASK_FALLBACK, DEFAULT_EXEC_APPROVAL_DECISIONS, DEFAULT_EXEC_APPROVAL_TIMEOUT_MS, DEFAULT_PLUGIN_APPROVAL_DECISIONS, DEFAULT_PLUGIN_APPROVAL_TIMEOUT_MS, DEFAULT_SECRET_FILE_MAX_BYTES, DEFAULT_UNDICI_STREAM_TIMEOUT_MS, DEFAULT_WEBHOOK_BODY_TIMEOUT_MS, DEFAULT_WEBHOOK_MAX_BODY_BYTES, EXEC_TARGET_VALUES, ExecApprovalChannelRuntimeTerminalStartError, FILE_LOCK_TIMEOUT_ERROR_CODE, FsSafeError, GUARDED_FETCH_MODE, JsonFileReadError, MAX_PLUGIN_APPROVAL_TIMEOUT_MS, MAX_TIMER_TIMEOUT_MS, MAX_TIMER_TIMEOUT_SECONDS, PLUGIN_APPROVAL_DESCRIPTION_MAX_LENGTH, PLUGIN_APPROVAL_TITLE_MAX_LENGTH, POSIX_OPENCLAW_TMP_DIR, PRIVATE_SECRET_DIR_MODE, PRIVATE_SECRET_FILE_MODE, PROXY_ENV_KEYS, PROXY_FETCH_PROXY_URL, RequestBodyLimitError, SYSTEM_MARK, SsrFBlockedError, testApi as __test__, testApi, acquireFileLock, addAllowlistEntry, addDurableCommandApproval, analyzeArgvCommand, analyzeShellCommand, appendRegularFile, appendRegularFileSync, approvalDecisionLabel, areDiagnosticsEnabledForProcess, assertAbsolutePathInput, assertHostnameAllowedWithPolicy, assertHttpUrlTargetsPrivateNetwork, assertNoWindowsNetworkPath, assertPublicHostname, basenameFromMediaSource, bindAbortRelay, buildApprovalInteractiveReply, buildApprovalInteractiveReplyFromActionDescriptors, buildApprovalPresentation, buildApprovalPresentationFromActionDescriptors, buildEnforcedShellCommand, buildExecApprovalActionDescriptors, buildExecApprovalCommandText, buildExecApprovalInteractiveReply, buildExecApprovalPendingReplyPayload, buildExecApprovalPresentation, buildExecApprovalUnavailableReplyPayload, buildHostnameAllowlistPolicyFromSuffixAllowlist, buildPluginApprovalExpiredMessage, buildPluginApprovalRequestMessage, buildPluginApprovalResolvedMessage, buildSafeBinsShellCommand, buildSafeShellCommand, buildTimeoutAbortSignal, canonicalPathFromExistingAncestor, clampTimerTimeoutMs, closeDispatcher, collectErrorGraphCandidates, commandRequiresSecurityAuditSuppressionApproval, computeBackoff, consumeSelectedSystemEventEntries, consumeSystemEventEntries, createAsyncLock, createChannelApiRetryRunner, createChannelNativeApprovalRuntime, createDedupeCache, createExecApprovalChannelRuntime, createLegacyPrivateNetworkDoctorContract, createPinnedDispatcher, createPinnedLookup, createRateLimitRetryRunner, createRuntimeOutboundDelegates, deliverApprovalRequestViaChannelNativePlan, detectErrorKind, drainFileLockStateForTest, drainPendingDeliveries, drainSystemEventEntries, drainSystemEvents, emitDiagnosticEvent, emitHeartbeatEvent, enqueueSystemEvent, ensureAbsoluteDirectory, ensureExecApprovals, ensureGlobalUndiciDispatcherStreamTimeouts, ensureGlobalUndiciEnvProxyDispatcher, ensureGlobalUndiciStreamTimeouts, evaluateExecAllowlist, evaluateShellAllowlist, expandHomePrefix, extractErrorCode, fetchWithRuntimeDispatcher, fetchWithSsrFGuard, fetchWithTimeout, findExistingAncestor, finiteSecondsToTimerSafeMilliseconds, forceResetGlobalDispatcher, formatApprovalDisplayPath, formatDurationCompact, formatDurationHuman, formatDurationPrecise, formatDurationSeconds, formatErrorMessage, formatExecApprovalExpiresIn, formatUncaughtError, generateSecureFraction, generateSecureHex, generateSecureInt, generateSecureToken, generateSecureUuid, getChannelActivity, getExecApprovalApproverDmNoticeText, getExecApprovalReplyMetadata, getLastHeartbeatEvent, getProxyUrlFromFetch, globalUndiciStreamTimeoutMs, hasDurableExecApproval, hasEncodedFileUrlSeparator, hasEnvHttpProxyAgentConfigured, hasEnvHttpProxyConfigured, hasErrnoCode, hasLegacyFlatAllowPrivateNetworkAlias, hasNodeCommandAllowAlwaysMarker, hasProxyEnvConfigured, hasSystemEvents, hasSystemMark, installRequestBodyLimitGuard, isBlockedHostname, isBlockedHostnameOrIp, isDiagnosticFlagEnabled, isDiagnosticsEnabled, isErrno, isExecApprovalChannelRuntimeTerminalStartError, isExecApprovalDecisionAllowed, isHeartbeatEnabledForAgent, isHostnameAllowedByPattern, isHttpsUrlAllowedByHostnameSuffixAllowlist, isPathInside, isPrivateIpAddress, isPrivateNetworkAllowedByPolicy, isPrivateNetworkOptInEnabled, isRequestBodyLimitError, isSafeBinUsage, isSafeScpRemoteHost, isSafeScpRemotePath, isSameSsrFPolicy, isSystemEventContextChanged, isTruthyEnvValue, isVitestRuntimeEnv, isWSL, isWSL2Sync, isWSLEnv, isWSLSync, isWindowsNetworkPath, isWindowsPlatform, loadExecApprovals, loadSecretFileSync, logAcceptedEnvOption, makeProxyFetch, matchAllowlist, matchesDiagnosticFlag, matchesHostnameAllowlist, matchesNoProxy, maxAsk, mergeExecApprovalsSocketDefaults, mergeSsrFPolicies, migrateLegacyFlatAllowPrivateNetworkAlias, minSecurity, movePathToTrash, nonNegativeSecondsToSafeMilliseconds, normalizeEnv, normalizeExecApprovals, normalizeExecAsk, normalizeExecHost, normalizeExecMode, normalizeExecSecurity, normalizeExecTarget, normalizeHostname, normalizeHostnameAllowlist, normalizeHostnameSuffixAllowlist, normalizeOutboundIdentity, normalizeSafeBins, normalizeScpRemoteHost, normalizeScpRemotePath, normalizeZaiEnv, onDiagnosticEvent, onHeartbeatEvent, openLocalFileSafely, parseExecApprovalCommandText, parseExecArgvToken, parseFiniteNumber, parseStrictFiniteNumber, parseStrictInteger, parseStrictNonNegativeInteger, parseStrictPositiveInteger, pathExists, pathExistsSync, peekSystemEventEntries, peekSystemEvents, persistAllowAlwaysPatterns, positiveSecondsToSafeMilliseconds, prefixSystemMessage, pruneMapToMaxSize, readDurableJsonFile, readErrorName, readExecApprovalsSnapshot, readFileWithinRoot, readJson, readJsonBodyWithLimit, readJsonFile, readJsonFileStrict, tryReadJsonSync as readJsonFileSync, tryReadJsonSync, readJsonIfExists, readJsonSync, readLocalFileFromRoots, readLocalFileSafely, readRegularFile, readRegularFileSync, readRequestBodyWithLimit, readRootJsonObjectSync, readRootJsonSync, readRootStructuredFileSync, readSecretFileSync, readSecureFile, recordAllowlistMatchesUse, recordAllowlistUse, recordChannelActivity, requestBodyErrorToText, requestExecApprovalViaSocket, requireValidExecTarget, requiresExecApproval, resetChannelActivityForTest, resetFileLockStateForTest, resetGlobalUndiciStreamTimeoutsForTests, resetHeartbeatEventsForTest, resetSystemEventsForTest, resetWSLStateForTests, resolveAbsolutePathForRead, resolveAbsolutePathForWrite, resolveAgentOutboundIdentity, resolveAllowAlwaysPatternCoverage, resolveAllowAlwaysPatternEntries, resolveAllowAlwaysPatterns, resolveAllowlistCandidatePath, resolveApprovalAuditCandidatePath, resolveApprovalAuditTrustPath, resolveApprovalRequestOriginTarget, resolveApprovalRequestSessionConversation, resolveApprovalRequestSessionTarget, resolveChannelNativeApprovalDeliveryPlan, resolveCommandResolution, resolveCommandResolutionFromArgv, resolveNonNegativeIntegerOption as resolveDedupeNonNegativeInteger, resolveDiagnosticFlags, resolveEffectiveHomeDir, resolveEnvHttpProxyAgentOptions, resolveEnvHttpProxyUrl, resolveExecApprovalAllowedDecisions, resolveExecApprovalCommandDisplay, resolveExecApprovalRequestAllowedDecisions, resolveExecApprovalSessionTarget, resolveExecApprovals, resolveExecApprovalsDisplayPath, resolveExecApprovalsFromFile, resolveExecApprovalsPath, resolveExecApprovalsSocketPath, resolveExecApprovalsTranscriptPath, resolveExecModeFromPolicy, resolveExecModePolicy, resolveExecPolicyForMode, resolveExecutableTrustPath, resolveExecutionTargetCandidatePath, resolveExecutionTargetResolution, resolveExecutionTargetTrustPath, resolveExpiresAtMsFromDurationOrEpoch, resolveExpiresAtMsFromDurationSeconds, resolveExpiresAtMsFromEpochSeconds, resolveFetch, resolveGlobalDedupeCache, resolveHeartbeatIntervalMs, resolveHeartbeatSummaryForAgent, resolveHeartbeatVisibility, resolveHomeRelativePath, resolveIndicatorType, resolveLegacyOutboundSendDepKeys, resolveLocalPathFromRootsSync, resolveOpenedFileRealPathForHandle, resolveOsHomeDir, resolveOsHomeRelativePath, resolveOutboundSendDep, resolvePinnedHostname, resolvePinnedHostnameWithPolicy, resolvePlannedSegmentArgv, resolvePluginApprovalRequestAllowedDecisions, resolvePluginApprovalTimeoutMs, resolvePolicyAllowlistCandidatePath, resolvePolicyTargetCandidatePath, resolvePolicyTargetResolution, resolvePolicyTargetTrustPath, resolvePreferredOpenClawTmpDir, resolveProxyFetchFromEnv, resolveRegularFileAppendFlags, resolveRequiredHomeDir, resolveRequiredOsHomeDir, resolveRetryConfig, resolveSafeBins, resolveSsrFPolicyForUrl, resolveSystemEventDeliveryContext, resolveUserPath, restoreExecApprovalsSnapshot, retainSafeHeadersForCrossOriginRedirectHeaders, retryAsync, root, runTasksWithConcurrency, safeFileURLToPath, sanitizeExecApprovalDisplayText, sanitizeExecApprovalDisplayTextWithStatus, sanitizeExecApprovalWarningText, sanitizeForPlainText, sanitizeUntrustedFileName, saveExecApprovals, shouldUseEnvHttpProxyForUrl, sleepWithAbort, splitCommandChain, splitCommandChainWithOperators, ssrfPolicyFromAllowPrivateNetwork, ssrfPolicyFromDangerouslyAllowPrivateNetwork, ssrfPolicyFromHttpBaseUrlAllowedHostname, ssrfPolicyFromHttpBaseUrlAllowedOrigin, ssrfPolicyFromHttpBaseUrlFakeIpHostnameAllowlist, ssrfPolicyFromPrivateNetworkOptIn, statRegularFile, statRegularFileSync, stringifyNonErrorCause, stripInternalRuntimeScaffolding, toErrorObject, tryReadJson, tryReadSecretFileSync, trySafeFileURLToPath, waitForTransportReady, walkDirectory, walkDirectorySync, windowsEscapeArg, withFileLock, withStrictGuardedFetchMode, withTimeout, withTrustedEnvProxyGuardedFetchMode, withTrustedExplicitProxyGuardedFetchMode, wrapFetchWithAbortSignal, writeExternalFileWithinRoot, writeFileWithinRoot, writeJson, writeJson as writeJsonAtomic, writeJsonSync, writeSecretFileAtomic as writePrivateSecretFileAtomic, writeTextAtomic };