import { A as PreparedChannelNativeApprovalTarget, M as ChannelApprovalNativePlannedTarget, N as resolveChannelNativeApprovalDeliveryPlan, f as ExecApprovalChannelRuntime, j as ChannelApprovalNativeDeliveryPlan, m as ExecApprovalChannelRuntimeEventKind, p as ExecApprovalChannelRuntimeAdapter } from "./approval-handler-runtime-types-2PlpDA8y.js"; import { $ as requireValidExecTarget, $t as resolveExecutionTargetCandidatePath, A as commandRequiresSecurityAuditSuppressionApproval, At as resolveSafeBins, B as normalizeExecApprovalUnavailableDecisions, Bt as ExecCommandSegment, C as ExecTarget, Ct as evaluateExecAllowlistWithAuthorization, D as SystemRunApprovalPlan, Dt as normalizeSafeBins, E as SystemRunApprovalFileOperand, Et as isSafeBinUsage, F as isExecApprovalDecisionAllowed, Ft as isWindowsPlatform, G as normalizeExecSecurity, Gt as matchAllowlist, H as normalizeExecAsk, Ht as CommandResolution, I as loadExecApprovals, It as tokenizeWindowsSegment, J as persistAllowAlwaysPatterns, Jt as resolveApprovalAuditCandidatePath, K as normalizeExecTarget, Kt as parseExecArgvToken, L as maxAsk, Lt as windowsEscapeArg, M as hasDurableExecApproval, Mt as buildEnforcedShellCommand, N as hasExactCommandDurableExecApproval, Nt as resolvePlannedSegmentArgv, O as addAllowlistEntry, Ot as resolveAllowAlwaysPatternEntries, P as hasNodeCommandAllowAlwaysMarker, Pt as analyzeWindowsShellCommand, Q as requestExecApprovalViaSocket, Qt as resolveExecutableTrustPath, R as mergeExecApprovalsSocketDefaults, Rt as analyzeArgvCommand, S as ExecSecurity, St as evaluateExecAllowlist, T as SystemRunApprovalBinding, Tt as evaluateShellAllowlistWithAuthorization, U as normalizeExecHost, Ut as ExecArgvToken, V as normalizeExecApprovals, Vt as ShellChainOperator, W as normalizeExecMode, Wt as ExecutableResolution, X as recordAllowlistMatchesUse, Xt as resolveCommandResolution, Y as readExecApprovalsSnapshot, Yt as resolveApprovalAuditTrustPath, Z as recordAllowlistUse, Zt as resolveCommandResolutionFromArgv, _ as ExecApprovalsResolved, _t as AllowAlwaysPattern, a as DEFAULT_EXEC_APPROVAL_TIMEOUT_MS, an as resolvePolicyTargetTrustPath, at as resolveExecApprovalUnavailableDecisions, b as ExecHost, bt as ExecSegmentSatisfiedBy, c as ExecApprovalDecision, ct as resolveExecApprovalsFromFile, d as ExecApprovalResolved, dt as resolveExecApprovalsTranscriptPath, en as resolveExecutionTargetResolution, et as requiresExecApproval, f as ExecApprovalUnavailableDecision, ft as resolveExecModeFromPolicy, g as ExecApprovalsFile, gt as saveExecApprovals, h as ExecApprovalsDefaults, ht as restoreExecApprovalsSnapshot, i as DEFAULT_EXEC_APPROVAL_DECISIONS, in as resolvePolicyTargetResolution, it as resolveExecApprovalRequestAllowedDecisions, j as ensureExecApprovals, k as addDurableCommandApproval, kt as resolveAllowAlwaysPatterns, l as ExecApprovalRequest, lt as resolveExecApprovalsPath, m as ExecApprovalsDefaultOverrides, mt as resolveExecPolicyForMode, n as AllowAlwaysPersistenceReason, nn as resolvePolicyAllowlistCandidatePath, nt as resolveAllowAlwaysPersistenceDecision, o as EXEC_TARGET_VALUES, on as ExecAllowlistEntry, ot as resolveExecApprovals, p as ExecApprovalsAgent, pt as resolveExecModePolicy, q as persistAllowAlwaysDecision, qt as resolveAllowlistCandidatePath, r as DEFAULT_EXEC_APPROVAL_ASK_FALLBACK, rn as resolvePolicyTargetCandidatePath, rt as resolveExecApprovalAllowedDecisions, s as ExecApprovalCommandSpan, st as resolveExecApprovalsDisplayPath, t as AllowAlwaysPersistenceDecision, tn as resolveExecutionTargetTrustPath, tt as resolveAllowAlwaysPatternCoverage, u as ExecApprovalRequestPayload, ut as resolveExecApprovalsSocketPath, v as ExecApprovalsSnapshot, vt as ExecAllowlistAnalysis, w as OPTIONAL_EXEC_APPROVAL_DECISIONS, wt as evaluateShellAllowlist, x as ExecMode, xt as SkillBinTrustEntry, y as ExecAsk, yt as ExecAllowlistEvaluation, z as minSecurity, zt as ExecCommandAnalysis } from "./exec-approvals-bouecjdj.js"; import { a as PLUGIN_APPROVAL_TITLE_MAX_LENGTH, c as PluginApprovalRequestPayload, d as buildPluginApprovalExpiredMessage, f as buildPluginApprovalRequestMessage, h as resolvePluginApprovalTimeoutMs, i as PLUGIN_APPROVAL_DESCRIPTION_MAX_LENGTH, l as PluginApprovalResolved, m as resolvePluginApprovalRequestAllowedDecisions, n as DEFAULT_PLUGIN_APPROVAL_TIMEOUT_MS, o as PluginApprovalActionView, p as buildPluginApprovalResolvedMessage, r as MAX_PLUGIN_APPROVAL_TIMEOUT_MS, s as PluginApprovalRequest, t as DEFAULT_PLUGIN_APPROVAL_DECISIONS, u as approvalDecisionLabel } from "./plugin-approvals-BJKrB_Dr.js"; import { i as resolveOutboundSendDep, n as ResolveOutboundSendDepOptions, r as resolveLegacyOutboundSendDepKeys, t as OutboundSendDeps } from "./send-deps-Ds6JW9s7.js"; import { u as OutboundIdentity } from "./outbound.types-BrpDgzc5.js"; import { C as resolveSsrFPolicyForUrl, E as ssrfPolicyFromHttpBaseUrlFakeIpHostnameAllowlist, S as resolvePinnedHostnameWithPolicy, T as ssrfPolicyFromHttpBaseUrlAllowedOrigin, _ as isSameSsrFPolicy, a as SsrFBlockedError, b as normalizeHostnameAllowlist, c as assertPublicHostname, d as createPinnedLookup, f as isBlockedHostname, g as isPrivateNetworkAllowedByPolicy, h as isPrivateIpAddress, i as PinnedHostnameOverride, l as closeDispatcher, m as isHostnameAllowedByPattern, n as PinnedDispatcherPolicy, o as SsrFPolicy, p as isBlockedHostnameOrIp, r as PinnedHostname, s as assertHostnameAllowedWithPolicy, t as LookupFn, u as createPinnedDispatcher, v as matchesHostnameAllowlist, w as ssrfPolicyFromHttpBaseUrlAllowedHostname, x as resolvePinnedHostname, y as mergeSsrFPolicies } from "./ssrf-skjEI_i5.js"; import { a as drainSystemEvents, c as hasSystemEvents, d as peekSystemEvents, f as resetSystemEventsForTest, i as drainSystemEventEntries, l as isSystemEventContextChanged, n as consumeSelectedSystemEventEntries, o as enqueueSystemEvent, p as resolveSystemEventDeliveryContext, r as consumeSystemEventEntries, s as enqueueSystemEventEntry, t as SystemEvent, u as peekSystemEventEntries } from "./system-events-BLt5iC5_.js"; import { i as resolveHeartbeatSummaryForAgent, n as isHeartbeatEnabledForAgent, r as resolveHeartbeatIntervalMs, t as HeartbeatSummary } from "./heartbeat-summary-BI9V7C_A.js"; import { $ as DiagnosticSessionRecoveryCompletedEvent, A as DiagnosticMessageQueuedEvent, At as emitTrustedDiagnosticEventWithPrivateData, B as DiagnosticRunAttemptEvent, Bt as resetDiagnosticEventsForTest, C as DiagnosticMessageDeliveryCompletedEvent, Ct as DiagnosticWebhookReceivedEvent, D as DiagnosticMessageDispatchCompletedEvent, Dt as emitFailoverEvent, E as DiagnosticMessageDeliveryStartedEvent, Et as emitDiagnosticEventWithTrustedTraceContext, F as DiagnosticModelCallStartedEvent, Ft as isDiagnosticsEnabled, G as DiagnosticSecurityEventActor, H as DiagnosticRunProgressEvent, Ht as waitForDiagnosticEventsDrained, I as DiagnosticPayloadLargeEvent, It as isInternalDiagnosticEventMetadata, J as DiagnosticSecurityEventPolicy, K as DiagnosticSecurityEventControl, L as DiagnosticPhaseCompletedEvent, Lt as onDiagnosticEvent, M as DiagnosticModelCallCompletedEvent, Mt as formatDiagnosticTraceparentForPropagation, N as DiagnosticModelCallContent, Nt as getInternalDiagnosticEventSequence, O as DiagnosticMessageDispatchStartedEvent, Ot as emitInternalDiagnosticEvent, P as DiagnosticModelCallErrorEvent, Pt as hasPendingInternalDiagnosticEvent, Q as DiagnosticSessionLongRunningEvent, R as DiagnosticPhaseDetails, Rt as onInternalDiagnosticEvent, S as DiagnosticMemoryUsage, St as DiagnosticWebhookProcessedEvent, T as DiagnosticMessageDeliveryKind, Tt as emitDiagnosticEvent, U as DiagnosticRunStartedEvent, V as DiagnosticRunCompletedEvent, Vt as setDiagnosticsEnabledForProcess, W as DiagnosticSecurityEvent, X as DiagnosticSessionActiveWorkKind, Y as DiagnosticSecurityEventTarget, Z as DiagnosticSessionAttentionClassification, _ as DiagnosticLivenessWarningEvent, _t as DiagnosticToolLoopEvent, a as DiagnosticEventPayload, at as DiagnosticSessionStuckEvent, b as DiagnosticMemoryPressureEvent, bt as DiagnosticUsageEvent, c as DiagnosticFailoverEvent, ct as DiagnosticSkillTelemetrySource, d as DiagnosticHarnessRunOutcome, dt as DiagnosticTelemetryExporterEvent, et as DiagnosticSessionRecoveryRequestedEvent, f as DiagnosticHarnessRunPhase, ft as DiagnosticToolCallContent, g as DiagnosticLaneEnqueueEvent, gt as DiagnosticToolExecutionStartedEvent, h as DiagnosticLaneDequeueEvent, ht as DiagnosticToolExecutionErrorEvent, i as DiagnosticEventMetadata, it as DiagnosticSessionStateEvent, j as DiagnosticMessageReceivedEvent, jt as emitTrustedSecurityEvent, k as DiagnosticMessageProcessedEvent, kt as emitTrustedDiagnosticEvent, l as DiagnosticHarnessRunCompletedEvent, lt as DiagnosticSkillUsedEvent, m as DiagnosticHeartbeatEvent, mt as DiagnosticToolExecutionCompletedEvent, n as DiagnosticContextAssembledEvent, nt as DiagnosticSessionStalledEvent, o as DiagnosticEventPrivateData, ot as DiagnosticSessionTurnCreatedEvent, p as DiagnosticHarnessRunStartedEvent, pt as DiagnosticToolExecutionBlockedEvent, q as DiagnosticSecurityEventInput, r as DiagnosticEventInput, rt as DiagnosticSessionState, s as DiagnosticExecProcessCompletedEvent, st as DiagnosticSkillActivation, t as DiagnosticAsyncQueueDroppedEvent, tt as DiagnosticSessionRecoveryStatus, u as DiagnosticHarnessRunErrorEvent, ut as DiagnosticTalkEvent, v as DiagnosticLivenessWarningReason, vt as DiagnosticToolParamsSummary, w as DiagnosticMessageDeliveryErrorEvent, wt as areDiagnosticsEnabledForProcess, x as DiagnosticMemorySampleEvent, xt as DiagnosticWebhookErrorEvent, y as DiagnosticLogRecordEvent, yt as DiagnosticToolSource, z as DiagnosticPhaseSnapshot, zt as onTrustedInternalDiagnosticEvent } from "./diagnostic-events-DysGbru8.js"; import { a as retryAsync, i as resolveRetryConfig, n as RetryInfo, r as RetryOptions, t as RetryConfig } from "./retry-iCQJ-qpp.js"; import { i as resetChannelActivityForTest, n as getChannelActivity, r as recordChannelActivity, t as ChannelDirection } from "./channel-activity-B4WQX84y.js"; import { l as normalizeOutboundIdentity, u as resolveAgentOutboundIdentity } from "./delivery-queue-Cg_INAC8.js"; import { a as formatErrorMessage, c as isErrno, d as toErrorObject, i as extractErrorCode, l as readErrorName, n as collectErrorGraphCandidates, o as formatUncaughtError, r as detectErrorKind, s as hasErrnoCode, t as ErrorKind, u as stringifyNonErrorCause } from "./errors-BICDLNaN.js"; import { t as formatApprovalDisplayPath } from "./approval-display-paths-Hb4BQ_zR.js"; import { n as fetchWithRuntimeDispatcher } from "./runtime-fetch-BXfVBfRP.js"; import { a as fetchWithSsrFGuard, c as withTrustedEnvProxyGuardedFetchMode, i as GuardedFetchResult, l as withTrustedExplicitProxyGuardedFetchMode, n as GuardedFetchMode, o as retainSafeHeadersForCrossOriginRedirectHeaders, r as GuardedFetchOptions, s as withStrictGuardedFetchMode, t as GUARDED_FETCH_MODE } from "./fetch-guard-BKvfwdRa.js"; import { _ as formatExecApprovalExpiresIn, a as ExecApprovalUnavailableReason, b as parseExecApprovalCommandText, c as buildApprovalInteractiveReplyFromActionDescriptors, d as buildExecApprovalActionDescriptors, f as buildExecApprovalCommandText, g as buildExecApprovalUnavailableReplyPayload, h as buildExecApprovalPresentation, i as ExecApprovalReplyMetadata, l as buildApprovalPresentation, m as buildExecApprovalPendingReplyPayload, n as ExecApprovalPendingReplyParams, o as ExecApprovalUnavailableReplyParams, p as buildExecApprovalInteractiveReply, r as ExecApprovalReplyDecision, s as buildApprovalInteractiveReply, t as ExecApprovalActionDescriptor, u as buildApprovalPresentationFromActionDescriptors, v as getExecApprovalApproverDmNoticeText, y as getExecApprovalReplyMetadata } from "./exec-approval-reply-CkOWfCH-.js"; import { n as createExecApprovalChannelRuntime, r as isExecApprovalChannelRuntimeTerminalStartError, t as ExecApprovalChannelRuntimeTerminalStartError } from "./exec-approval-channel-runtime-CJpDYe8w.js"; import { a as resolveApprovalRequestSessionTarget, i as resolveApprovalRequestSessionConversation, n as ExecApprovalSessionTarget, o as resolveExecApprovalSessionTarget, r as resolveApprovalRequestOriginTarget, t as ApprovalRequestSessionConversation } from "./exec-approval-session-target-BdS-TlcY.js"; import { a as sanitizeExecApprovalWarningText, i as sanitizeExecApprovalDisplayTextWithStatus, n as resolveExecApprovalCommandDisplay, r as sanitizeExecApprovalDisplayText, t as SanitizedExecApprovalDisplayText } from "./exec-approval-command-display-uliV3W34.js"; import { n as deliverApprovalRequestViaChannelNativePlan, t as createChannelNativeApprovalRuntime } from "./approval-native-runtime-CRcDGgNn.js"; import { _ as writeJsonAtomic, a as readJson, c as readJsonFileSync, d as readRootJsonObjectSync, f as readRootJsonSync, g as writeJson, h as tryReadJsonSync, i as readDurableJsonFile, l as readJsonIfExists, m as tryReadJson, n as WriteTextAtomicOptions, o as readJsonFile, p as readRootStructuredFileSync, r as createAsyncLock, s as readJsonFileStrict, t as JsonFileReadError, u as readJsonSync, v as writeJsonSync, y as writeTextAtomic } from "./json-files-CJRQm2a_.js"; import { a as emitHeartbeatEvent, c as resetHeartbeatEventsForTest, i as HeartbeatIndicatorType, l as resolveIndicatorType, n as resolveHeartbeatVisibility, o as getLastHeartbeatEvent, r as HeartbeatEventPayload, s as onHeartbeatEvent, t as ResolvedHeartbeatVisibility } from "./heartbeat-visibility-D_WvUcIm.js"; import { n as WaitForTransportReadyParams, r as waitForTransportReady, t as TransportReadyResult } from "./transport-ready-Dc0_wy9k.js"; import { a as resolveNonNegativeIntegerOption, i as resolveGlobalDedupeCache, n as DedupeCacheOptions, r as createDedupeCache, t as DedupeCache } from "./dedupe-D3F9WT__.js"; import { a as generateSecureUuid, i as generateSecureToken, n as generateSecureHex, r as generateSecureInt, t as generateSecureFraction } from "./secure-random-BTcaoAnv.js"; import { a as SecretFileReadResult, c as tryReadSecretFileSync, i as SecretFileReadOptions, l as writePrivateSecretFileAtomic, n as PRIVATE_SECRET_DIR_MODE, o as loadSecretFileSync, r as PRIVATE_SECRET_FILE_MODE, s as readSecretFileSync, t as DEFAULT_SECRET_FILE_MAX_BYTES } from "./secret-file-CjbjgOXf.js"; import { C as resolveExpiresAtMsFromDurationOrEpoch, T as resolveExpiresAtMsFromEpochSeconds, _ as parseStrictInteger, b as positiveSecondsToSafeMilliseconds, d as clampTimerTimeoutMs, f as finiteSecondsToTimerSafeMilliseconds, g as parseStrictFiniteNumber, h as parseFiniteNumber, m as nonNegativeSecondsToSafeMilliseconds, n as MAX_TIMER_TIMEOUT_MS, r as MAX_TIMER_TIMEOUT_SECONDS, v as parseStrictNonNegativeInteger, w as resolveExpiresAtMsFromDurationSeconds, y as parseStrictPositiveInteger } from "./number-coercion-Ds_8dOjj.js"; import { n as createRuntimeOutboundDelegates } from "./runtime-forwarders-rNf2NQl_.js"; import { n as stripInternalRuntimeScaffolding, t as sanitizeForPlainText } from "./sanitize-text-BMx_OmdN.js"; import { t as pruneMapToMaxSize } from "./map-size-Cxg6PuCO.js"; import { n as ResolvePreferredOpenClawTmpDirOptions, r as resolvePreferredOpenClawTmpDir, t as POSIX_OPENCLAW_TMP_DIR } from "./tmp-openclaw-dir-ubX-9dkk.js"; import { i as runTasksWithConcurrency, n as RunTasksWithConcurrencyOptions, r as RunTasksWithConcurrencyResult, t as ConcurrencyErrorMode } from "./run-with-concurrency-D8f3owDy.js"; import { drainPendingDeliveries } from "./delivery-queue-runtime.js"; import { n as matchesDiagnosticFlag, r as resolveDiagnosticFlags, t as isDiagnosticFlagEnabled } from "./diagnostic-flags-BceimsG_.js"; import { n as buildTimeoutAbortSignal, r as fetchWithTimeout, t as bindAbortRelay } from "./fetch-timeout-D2yvPshT.js"; import { a as resolveFetch, i as resolveProxyFetchFromEnv, n as getProxyUrlFromFetch, o as wrapFetchWithAbortSignal, r as makeProxyFetch, t as PROXY_FETCH_PROXY_URL } from "./proxy-fetch-DPt1dxTl.js"; import { a as hasProxyEnvConfigured, c as resolveEnvHttpProxyUrl, i as hasEnvHttpProxyConfigured, l as shouldUseEnvHttpProxyForUrl, n as PROXY_ENV_KEYS, o as matchesNoProxy, r as hasEnvHttpProxyAgentConfigured, s as resolveEnvHttpProxyAgentOptions, t as EnvHttpProxyAgentProxyOptions } from "./proxy-env-CRHrWZla.js"; import { A as readFileWithinRoot, B as resolveRegularFileAppendFlags, C as ensureAbsoluteDirectory, D as openLocalFileSafely, E as movePathToTrash, F as readSecureFile, G as walkDirectory, H as sanitizeUntrustedFileName, I as resolveAbsolutePathForRead, J as writeExternalFileWithinRoot, K as walkDirectorySync, L as resolveAbsolutePathForWrite, M as readLocalFileSafely, N as readRegularFile, O as pathExists, P as readRegularFileSync, R as resolveLocalPathFromRootsSync, S as canonicalPathFromExistingAncestor, T as isPathInside, U as statRegularFile, V as root, W as statRegularFileSync, Y as writeFileWithinRoot, _ as WalkDirectoryOptions, a as ExternalFileWriteResult, b as appendRegularFileSync, c as MovePathToTrashOptions, d as ResolvedAbsolutePath, f as ResolvedWritableAbsolutePath, g as WalkDirectoryEntry, h as SecureFileReadResult, i as ExternalFileWriteOptions, j as readLocalFileFromRoots, k as pathExistsSync, l as OpenResult, m as SecureFileReadOptions, n as EnsureAbsoluteDirectoryOptions, o as FsSafeError, p as Root, q as withTimeout, r as EnsureAbsoluteDirectoryResult, s as FsSafeErrorCode, t as AbsolutePathSymlinkPolicy, u as ReadResult, v as WalkDirectoryResult, w as findExistingAncestor, x as assertAbsolutePathInput, y as appendRegularFile, z as resolveOpenedFileRealPathForHandle } from "./fs-safe-Dff5zUCF.js"; import { a as safeFileURLToPath, i as isWindowsNetworkPath, n as basenameFromMediaSource, o as trySafeFileURLToPath, r as hasEncodedFileUrlSeparator, t as assertNoWindowsNetworkPath } from "./local-file-access-CCj2ALZB.js"; import { c as drainFileLockStateForTest, i as FileLockOptions, l as resetFileLockStateForTest, n as FILE_LOCK_TIMEOUT_ERROR_CODE, o as FileLockTimeoutError, r as FileLockHandle, s as acquireFileLock, u as withFileLock } from "./file-lock-JSDrNuSX.js"; import { t as normalizeHostname } from "./hostname-BVCWBh-K.js"; import { i as normalizeScpRemotePath, n as isSafeScpRemotePath, r as normalizeScpRemoteHost, t as isSafeScpRemoteHost } from "./scp-host-yP_sSiFf.js"; import { C as normalizeEnv, D as computeBackoff, E as BackoffPolicy, O as sleepWithAbort, S as logAcceptedEnvOption, T as resolveEnvNormalizationKeys, _ as formatDurationPrecise, a as resetWSLStateForTests, b as isTruthyEnvValue, c as ensureGlobalUndiciEnvProxyDispatcher, d as globalUndiciStreamTimeoutMs, f as resetGlobalUndiciStreamTimeoutsForTests, g as formatDurationHuman, h as formatDurationCompact, i as isWSLSync, l as ensureGlobalUndiciStreamTimeouts, m as FormatDurationSecondsOptions, n as isWSL2Sync, o as DEFAULT_UNDICI_STREAM_TIMEOUT_MS, p as FormatDurationCompactOptions, r as isWSLEnv, s as ensureGlobalUndiciDispatcherStreamTimeouts, t as isWSL, u as forceResetGlobalDispatcher, v as formatDurationSeconds, w as normalizeZaiEnv, x as isVitestRuntimeEnv, y as expandEnvNormalizationKeys } from "./wsl-DbS0T5Cb.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-CsTKsPTB.js"; import { a as ReadRequestBodyOptions, c as RequestBodyLimitGuard, d as isRequestBodyLimitError, f as readJsonBodyWithLimit, h as testApi, i as ReadJsonBodyResult, l as RequestBodyLimitGuardOptions, m as requestBodyErrorToText, n as DEFAULT_WEBHOOK_MAX_BODY_BYTES, o as RequestBodyLimitError, p as readRequestBodyWithLimit, r as ReadJsonBodyOptions, s as RequestBodyLimitErrorCode, t as DEFAULT_WEBHOOK_BODY_TIMEOUT_MS, u as installRequestBodyLimitGuard } from "./http-body-CbF0Hltn.js"; import { i as createRateLimitRetryRunner, n as RetryRunner, r as createChannelApiRetryRunner, t as CHANNEL_API_RETRY_DEFAULTS } from "./retry-policy-DhepAljj.js"; import { n as hasSystemMark, r as prefixSystemMessage, t as SYSTEM_MARK } from "./system-message-BaqODHMh.js"; import { a as hasLegacyFlatAllowPrivateNetworkAlias, c as migrateLegacyFlatAllowPrivateNetworkAlias, d as ssrfPolicyFromDangerouslyAllowPrivateNetwork, f as ssrfPolicyFromPrivateNetworkOptIn, i as createLegacyPrivateNetworkDoctorContract, l as normalizeHostnameSuffixAllowlist, n as assertHttpUrlTargetsPrivateNetwork, o as isHttpsUrlAllowedByHostnameSuffixAllowlist, r as buildHostnameAllowlistPolicyFromSuffixAllowlist, s as isPrivateNetworkOptInEnabled, t as PrivateNetworkOptInInput, u as ssrfPolicyFromAllowPrivateNetwork } from "./ssrf-policy-Bavu202g.js"; export { type AbsolutePathSymlinkPolicy, AllowAlwaysPattern, AllowAlwaysPersistenceDecision, AllowAlwaysPersistenceReason, ApprovalRequestSessionConversation, BackoffPolicy, CHANNEL_API_RETRY_DEFAULTS, ChannelApprovalNativeDeliveryPlan, ChannelApprovalNativePlannedTarget, ChannelDirection, type CommandResolution, ConcurrencyErrorMode, 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, DedupeCache, DedupeCacheOptions, type DiagnosticAsyncQueueDroppedEvent, type DiagnosticContextAssembledEvent, type DiagnosticEventInput, type DiagnosticEventMetadata, type DiagnosticEventPayload, type DiagnosticEventPrivateData, type DiagnosticExecProcessCompletedEvent, type DiagnosticFailoverEvent, type DiagnosticHarnessRunCompletedEvent, type DiagnosticHarnessRunErrorEvent, type DiagnosticHarnessRunOutcome, type DiagnosticHarnessRunPhase, type DiagnosticHarnessRunStartedEvent, type DiagnosticHeartbeatEvent, type DiagnosticLaneDequeueEvent, type DiagnosticLaneEnqueueEvent, type DiagnosticLivenessWarningEvent, type DiagnosticLivenessWarningReason, type DiagnosticLogRecordEvent, type DiagnosticMemoryPressureEvent, type DiagnosticMemorySampleEvent, type DiagnosticMemoryUsage, type DiagnosticMessageDeliveryCompletedEvent, type DiagnosticMessageDeliveryErrorEvent, type DiagnosticMessageDeliveryKind, type DiagnosticMessageDeliveryStartedEvent, type DiagnosticMessageDispatchCompletedEvent, type DiagnosticMessageDispatchStartedEvent, type DiagnosticMessageProcessedEvent, type DiagnosticMessageQueuedEvent, type DiagnosticMessageReceivedEvent, type DiagnosticModelCallCompletedEvent, type DiagnosticModelCallContent, type DiagnosticModelCallErrorEvent, type DiagnosticModelCallStartedEvent, type DiagnosticPayloadLargeEvent, type DiagnosticPhaseCompletedEvent, type DiagnosticPhaseDetails, type DiagnosticPhaseSnapshot, type DiagnosticRunAttemptEvent, type DiagnosticRunCompletedEvent, type DiagnosticRunProgressEvent, type DiagnosticRunStartedEvent, type DiagnosticSecurityEvent, type DiagnosticSecurityEventActor, type DiagnosticSecurityEventControl, type DiagnosticSecurityEventInput, type DiagnosticSecurityEventPolicy, type DiagnosticSecurityEventTarget, type DiagnosticSessionActiveWorkKind, type DiagnosticSessionAttentionClassification, type DiagnosticSessionLongRunningEvent, type DiagnosticSessionRecoveryCompletedEvent, type DiagnosticSessionRecoveryRequestedEvent, type DiagnosticSessionRecoveryStatus, type DiagnosticSessionStalledEvent, type DiagnosticSessionState, type DiagnosticSessionStateEvent, type DiagnosticSessionStuckEvent, type DiagnosticSessionTurnCreatedEvent, type DiagnosticSkillActivation, type DiagnosticSkillTelemetrySource, type DiagnosticSkillUsedEvent, type DiagnosticTalkEvent, type DiagnosticTelemetryExporterEvent, type DiagnosticToolCallContent, type DiagnosticToolExecutionBlockedEvent, type DiagnosticToolExecutionCompletedEvent, type DiagnosticToolExecutionErrorEvent, type DiagnosticToolExecutionStartedEvent, type DiagnosticToolLoopEvent, type DiagnosticToolParamsSummary, type DiagnosticToolSource, type DiagnosticUsageEvent, type DiagnosticWebhookErrorEvent, type DiagnosticWebhookProcessedEvent, type DiagnosticWebhookReceivedEvent, EXEC_TARGET_VALUES, type EnsureAbsoluteDirectoryOptions, type EnsureAbsoluteDirectoryResult, EnvHttpProxyAgentProxyOptions, ErrorKind, ExecAllowlistAnalysis, type ExecAllowlistEntry, ExecAllowlistEvaluation, ExecApprovalActionDescriptor, type ExecApprovalChannelRuntime, type ExecApprovalChannelRuntimeAdapter, type ExecApprovalChannelRuntimeEventKind, ExecApprovalChannelRuntimeTerminalStartError, ExecApprovalCommandSpan, ExecApprovalDecision, ExecApprovalPendingReplyParams, ExecApprovalReplyDecision, ExecApprovalReplyMetadata, ExecApprovalRequest, ExecApprovalRequestPayload, ExecApprovalResolved, ExecApprovalSessionTarget, ExecApprovalUnavailableDecision, ExecApprovalUnavailableReason, ExecApprovalUnavailableReplyParams, ExecApprovalsAgent, ExecApprovalsDefaultOverrides, ExecApprovalsDefaults, ExecApprovalsFile, ExecApprovalsResolved, ExecApprovalsSnapshot, type ExecArgvToken, ExecAsk, type ExecCommandAnalysis, type ExecCommandSegment, ExecHost, ExecMode, ExecSecurity, ExecSegmentSatisfiedBy, ExecTarget, type ExecutableResolution, ExternalFileWriteOptions, ExternalFileWriteResult, FILE_LOCK_TIMEOUT_ERROR_CODE, type FileLockHandle, type FileLockOptions, type FileLockTimeoutError, FormatDurationCompactOptions, FormatDurationSecondsOptions, FsSafeError, type FsSafeErrorCode, GUARDED_FETCH_MODE, type GuardedFetchMode, type GuardedFetchOptions, type GuardedFetchResult, HeartbeatEventPayload, HeartbeatIndicatorType, HeartbeatSummary, JsonFileReadError, LookupFn, MAX_PLUGIN_APPROVAL_TIMEOUT_MS, MAX_TIMER_TIMEOUT_MS, MAX_TIMER_TIMEOUT_SECONDS, type MovePathToTrashOptions, OPTIONAL_EXEC_APPROVAL_DECISIONS, type OpenResult, type OutboundIdentity, OutboundSendDeps, 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, PinnedDispatcherPolicy, PinnedHostname, PinnedHostnameOverride, PluginApprovalActionView, PluginApprovalRequest, PluginApprovalRequestPayload, PluginApprovalResolved, type PreparedChannelNativeApprovalTarget, PrivateNetworkOptInInput, ReadJsonBodyOptions, ReadJsonBodyResult, ReadRequestBodyOptions, type ReadResult, RequestBodyLimitError, RequestBodyLimitErrorCode, RequestBodyLimitGuard, RequestBodyLimitGuardOptions, ResolveOutboundSendDepOptions, ResolvePreferredOpenClawTmpDirOptions, type ResolvedAbsolutePath, ResolvedHeartbeatVisibility, type ResolvedWritableAbsolutePath, RetryConfig, RetryInfo, RetryOptions, RetryRunner, type Root, RunTasksWithConcurrencyOptions, RunTasksWithConcurrencyResult, SYSTEM_MARK, SanitizedExecApprovalDisplayText, type SecretFileReadOptions, SecretFileReadResult, type SecureFileReadOptions, type SecureFileReadResult, type ShellChainOperator, SkillBinTrustEntry, SsrFBlockedError, SsrFPolicy, SystemEvent, SystemRunApprovalBinding, SystemRunApprovalFileOperand, SystemRunApprovalPlan, TransportReadyResult, WaitForTransportReadyParams, type WalkDirectoryEntry, type WalkDirectoryOptions, type WalkDirectoryResult, WriteTextAtomicOptions, 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, type emitDiagnosticEventWithTrustedTraceContext, type emitFailoverEvent, emitHeartbeatEvent, type emitInternalDiagnosticEvent, type emitTrustedDiagnosticEvent, type emitTrustedDiagnosticEventWithPrivateData, type emitTrustedSecurityEvent, enqueueSystemEvent, enqueueSystemEventEntry, ensureAbsoluteDirectory, ensureExecApprovals, ensureGlobalUndiciDispatcherStreamTimeouts, ensureGlobalUndiciEnvProxyDispatcher, ensureGlobalUndiciStreamTimeouts, evaluateExecAllowlist, evaluateExecAllowlistWithAuthorization, evaluateShellAllowlist, evaluateShellAllowlistWithAuthorization, expandEnvNormalizationKeys, expandHomePrefix, extractErrorCode, fetchWithRuntimeDispatcher, fetchWithSsrFGuard, fetchWithTimeout, findExistingAncestor, finiteSecondsToTimerSafeMilliseconds, forceResetGlobalDispatcher, formatApprovalDisplayPath, type formatDiagnosticTraceparentForPropagation, formatDurationCompact, formatDurationHuman, formatDurationPrecise, formatDurationSeconds, formatErrorMessage, formatExecApprovalExpiresIn, formatUncaughtError, generateSecureFraction, generateSecureHex, generateSecureInt, generateSecureToken, generateSecureUuid, getChannelActivity, getExecApprovalApproverDmNoticeText, getExecApprovalReplyMetadata, type getInternalDiagnosticEventSequence, getLastHeartbeatEvent, getProxyUrlFromFetch, globalUndiciStreamTimeoutMs, hasDurableExecApproval, hasEncodedFileUrlSeparator, hasEnvHttpProxyAgentConfigured, hasEnvHttpProxyConfigured, hasErrnoCode, hasExactCommandDurableExecApproval, hasLegacyFlatAllowPrivateNetworkAlias, hasNodeCommandAllowAlwaysMarker, type hasPendingInternalDiagnosticEvent, hasProxyEnvConfigured, hasSystemEvents, hasSystemMark, installRequestBodyLimitGuard, isBlockedHostname, isBlockedHostnameOrIp, isDiagnosticFlagEnabled, isDiagnosticsEnabled, isErrno, isExecApprovalChannelRuntimeTerminalStartError, isExecApprovalDecisionAllowed, isHeartbeatEnabledForAgent, isHostnameAllowedByPattern, isHttpsUrlAllowedByHostnameSuffixAllowlist, type isInternalDiagnosticEventMetadata, 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, type onInternalDiagnosticEvent, type onTrustedInternalDiagnosticEvent, 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, readJsonFileSync, readJsonIfExists, readJsonSync, readLocalFileFromRoots, readLocalFileSafely, readRegularFile, readRegularFileSync, readRequestBodyWithLimit, readRootJsonObjectSync, readRootJsonSync, readRootStructuredFileSync, readSecretFileSync, readSecureFile, recordAllowlistMatchesUse, recordAllowlistUse, recordChannelActivity, requestBodyErrorToText, requestExecApprovalViaSocket, requireValidExecTarget, requiresExecApproval, resetChannelActivityForTest, type resetDiagnosticEventsForTest, 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, type setDiagnosticsEnabledForProcess, shouldUseEnvHttpProxyForUrl, sleepWithAbort, ssrfPolicyFromAllowPrivateNetwork, ssrfPolicyFromDangerouslyAllowPrivateNetwork, ssrfPolicyFromHttpBaseUrlAllowedHostname, ssrfPolicyFromHttpBaseUrlAllowedOrigin, ssrfPolicyFromHttpBaseUrlFakeIpHostnameAllowlist, ssrfPolicyFromPrivateNetworkOptIn, statRegularFile, statRegularFileSync, stringifyNonErrorCause, stripInternalRuntimeScaffolding, toErrorObject, tokenizeWindowsSegment, tryReadJson, tryReadJsonSync, tryReadSecretFileSync, trySafeFileURLToPath, type waitForDiagnosticEventsDrained, waitForTransportReady, walkDirectory, walkDirectorySync, windowsEscapeArg, withFileLock, withStrictGuardedFetchMode, withTimeout, withTrustedEnvProxyGuardedFetchMode, withTrustedExplicitProxyGuardedFetchMode, wrapFetchWithAbortSignal, writeExternalFileWithinRoot, writeFileWithinRoot, writeJson, writeJsonAtomic, writeJsonSync, writePrivateSecretFileAtomic, writeTextAtomic };