UNPKG

openclaw

Version:

Multi-channel AI gateway with extensible messaging integrations

66 lines (65 loc) • 24.6 kB
import { a as normalizeEnv, i as logAcceptedEnvOption, n as isTruthyEnvValue, o as normalizeZaiEnv, r as isVitestRuntimeEnv, s as resolveEnvNormalizationKeys, t as expandEnvNormalizationKeys } from "../env-DpEiW8Oq.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-DNvW4XW_.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 isDiagnosticsEnabled, n as emitDiagnosticEvent, p as onDiagnosticEvent, t as areDiagnosticsEnabledForProcess } from "../diagnostic-events-CLCyIzm6.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-MzBWZWSC.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-Dz6h3Nj6.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-DNPNwOqt.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-De7EkXMQ.js"; import { n as buildTimeoutAbortSignal, r as fetchWithTimeout, t as bindAbortRelay } from "../fetch-timeout-CHGVJ1eQ.js"; import { t as normalizeHostname } from "../hostname-DAZapKzN.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-DmSIVBht.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-DOG_pqmj.js"; import { t as fetchWithRuntimeDispatcher } from "../runtime-fetch-XsbYKq6O.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 isSystemEventContextChanged, d as resetSystemEventsForTest, f as resolveSystemEventDeliveryContext, i as drainSystemEvents, l as peekSystemEventEntries, n as consumeSystemEventEntries, o as enqueueSystemEventEntry, r as drainSystemEventEntries, s as hasSystemEvents, t as consumeSelectedSystemEventEntries, u as peekSystemEvents } from "../system-events-B4uVi8eM.js"; import { n as sleepWithAbort, t as computeBackoff } from "../backoff-S1yazmy1.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 isWindowsPlatform, i as analyzeWindowsShellCommand, n as resolvePlannedSegmentArgv, o as tokenizeWindowsSegment, r as analyzeArgvCommand, s as windowsEscapeArg, t as buildEnforcedShellCommand } from "../exec-approvals-analysis-DFuSdYi7.js"; import { a as isSafeBinUsage, c as resolveAllowAlwaysPatterns, i as evaluateShellAllowlistWithAuthorization, l as resolveSafeBins, n as evaluateExecAllowlistWithAuthorization, o as normalizeSafeBins, r as evaluateShellAllowlist, s as resolveAllowAlwaysPatternEntries, t as evaluateExecAllowlist } from "../exec-approvals-allowlist-CVSIo3dH.js"; import { A as requestExecApprovalViaSocket, B as resolveExecApprovalsFromFile, C as normalizeExecSecurity, D as readExecApprovalsSnapshot, E as persistAllowAlwaysPatterns, F as resolveExecApprovalAllowedDecisions, G as resolveExecModePolicy, H as resolveExecApprovalsSocketPath, I as resolveExecApprovalRequestAllowedDecisions, J as saveExecApprovals, K as resolveExecPolicyForMode, L as resolveExecApprovalUnavailableDecisions, M as requiresExecApproval, N as resolveAllowAlwaysPatternCoverage, O as recordAllowlistMatchesUse, P as resolveAllowAlwaysPersistenceDecision, R as resolveExecApprovals, S as normalizeExecMode, T as persistAllowAlwaysDecision, U as resolveExecApprovalsTranscriptPath, V as resolveExecApprovalsPath, W as resolveExecModeFromPolicy, _ as minSecurity, a as OPTIONAL_EXEC_APPROVAL_DECISIONS, b as normalizeExecAsk, c as commandRequiresSecurityAuditSuppressionApproval, d as hasExactCommandDurableExecApproval, f as hasNodeCommandAllowAlwaysMarker, g as mergeExecApprovalsSocketDefaults, h as maxAsk, i as EXEC_TARGET_VALUES, j as requireValidExecTarget, k as recordAllowlistUse, l as ensureExecApprovals, m as loadExecApprovals, n as DEFAULT_EXEC_APPROVAL_DECISIONS, o as addAllowlistEntry, p as isExecApprovalDecisionAllowed, q as restoreExecApprovalsSnapshot, r as DEFAULT_EXEC_APPROVAL_TIMEOUT_MS, s as addDurableCommandApproval, t as DEFAULT_EXEC_APPROVAL_ASK_FALLBACK, u as hasDurableExecApproval, v as normalizeExecApprovalUnavailableDecisions, w as normalizeExecTarget, x as normalizeExecHost, y as normalizeExecApprovals, z as resolveExecApprovalsDisplayPath } from "../exec-approvals-zVFNVwl1.js"; import { n as resolveHeartbeatIntervalMs, r as resolveHeartbeatSummaryForAgent, t as isHeartbeatEnabledForAgent } from "../heartbeat-summary-BWKHPe8B.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-DLCr-g6e.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-Cs4HXql4.js"; import { n as wrapFetchWithAbortSignal, t as resolveFetch } from "../fetch-C13FzR_K.js"; import { t as loadSecretFileSync } from "../secret-file-Bf30e8vr.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-BtzijiyX.js"; import { a as isExecApprovalChannelRuntimeTerminalStartError, i as createExecApprovalChannelRuntime, n as deliverApprovalRequestViaChannelNativePlan, o as resolveChannelNativeApprovalDeliveryPlan, r as ExecApprovalChannelRuntimeTerminalStartError, t as createChannelNativeApprovalRuntime } from "../approval-native-runtime-BRZlxWCL.js"; import { i as sanitizeExecApprovalWarningText, n as sanitizeExecApprovalDisplayText, r as sanitizeExecApprovalDisplayTextWithStatus, t as resolveExecApprovalCommandDisplay } from "../exec-approval-command-display-32Mdz-D1.js"; import { i as resolveExecApprovalSessionTarget, n as resolveApprovalRequestSessionConversation, r as resolveApprovalRequestSessionTarget, t as resolveApprovalRequestOriginTarget } from "../exec-approval-session-target-BaDJBoeh.js"; import { n as resolveAgentOutboundIdentity, t as normalizeOutboundIdentity } from "../identity-CIhfgOHt.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-BA7IDChI.js"; import { t as drainPendingDeliveries } from "../delivery-queue-runtime-DiwIZhhI.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-Z3mhnRNk.js"; import { n as createChannelApiRetryRunner, r as createRateLimitRetryRunner, t as CHANNEL_API_RETRY_DEFAULTS } from "../retry-policy-5_OQdnqM.js"; import { i as normalizeScpRemotePath, n as isSafeScpRemotePath, r as normalizeScpRemoteHost, t as isSafeScpRemoteHost } from "../scp-host-DDsxuPSj.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-B35YwKq4.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, OPTIONAL_EXEC_APPROVAL_DECISIONS, 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, analyzeWindowsShellCommand, 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, 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, enqueueSystemEventEntry, ensureAbsoluteDirectory, ensureExecApprovals, ensureGlobalUndiciDispatcherStreamTimeouts, ensureGlobalUndiciEnvProxyDispatcher, ensureGlobalUndiciStreamTimeouts, evaluateExecAllowlist, evaluateExecAllowlistWithAuthorization, evaluateShellAllowlist, evaluateShellAllowlistWithAuthorization, expandEnvNormalizationKeys, 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, hasExactCommandDurableExecApproval, 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, normalizeExecApprovalUnavailableDecisions, 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, persistAllowAlwaysDecision, 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, resolveAllowAlwaysPersistenceDecision, resolveAllowlistCandidatePath, resolveApprovalAuditCandidatePath, resolveApprovalAuditTrustPath, resolveApprovalRequestOriginTarget, resolveApprovalRequestSessionConversation, resolveApprovalRequestSessionTarget, resolveChannelNativeApprovalDeliveryPlan, resolveCommandResolution, resolveCommandResolutionFromArgv, resolveNonNegativeIntegerOption as resolveDedupeNonNegativeInteger, resolveDiagnosticFlags, resolveEffectiveHomeDir, resolveEnvHttpProxyAgentOptions, resolveEnvHttpProxyUrl, resolveEnvNormalizationKeys, resolveExecApprovalAllowedDecisions, resolveExecApprovalCommandDisplay, resolveExecApprovalRequestAllowedDecisions, resolveExecApprovalSessionTarget, resolveExecApprovalUnavailableDecisions, 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, ssrfPolicyFromAllowPrivateNetwork, ssrfPolicyFromDangerouslyAllowPrivateNetwork, ssrfPolicyFromHttpBaseUrlAllowedHostname, ssrfPolicyFromHttpBaseUrlAllowedOrigin, ssrfPolicyFromHttpBaseUrlFakeIpHostnameAllowlist, ssrfPolicyFromPrivateNetworkOptIn, statRegularFile, statRegularFileSync, stringifyNonErrorCause, stripInternalRuntimeScaffolding, toErrorObject, tokenizeWindowsSegment, tryReadJson, tryReadSecretFileSync, trySafeFileURLToPath, waitForTransportReady, walkDirectory, walkDirectorySync, windowsEscapeArg, withFileLock, withStrictGuardedFetchMode, withTimeout, withTrustedEnvProxyGuardedFetchMode, withTrustedExplicitProxyGuardedFetchMode, wrapFetchWithAbortSignal, writeExternalFileWithinRoot, writeFileWithinRoot, writeJson, writeJson as writeJsonAtomic, writeJsonSync, writeSecretFileAtomic as writePrivateSecretFileAtomic, writeTextAtomic };