import { g as resolveReactionLevel, h as ResolvedReactionLevel, m as ReactionLevel } from "./types.channels-CIRBU8QJ.js";
import { _ as sleep, a as displayPath, b as escapeRegExp, c as isRecord, d as resolveConfigDir, f as resolveHomeDir, g as shortenHomePath, h as shortenHomeInString, i as clampNumber, l as normalizeE164, m as safeParseJson, n as clamp, o as displayString, p as resolveUserPath, r as clampInt, s as ensureDir, t as CONFIG_DIR, u as pathExists, v as sliceUtf16Safe, y as truncateUtf16Safe } from "./utils-CRegZsWE.js";
import { a as normalizeLowercaseStringOrEmpty, c as normalizeOptionalString, d as normalizeStringifiedEntries, f as normalizeStringifiedOptionalString, i as normalizeFastMode, l as normalizeOptionalStringifiedId, m as resolvePrimaryStringValue, n as localeLowercasePreservingWhitespace, o as normalizeNullableString, p as readStringValue, r as lowercasePreservingWhitespace, s as normalizeOptionalLowercaseString, t as hasNonEmptyString, u as normalizeOptionalThreadValue } from "./string-coerce-CHpWMcj5.js";
import { t as convertMarkdownTables } from "./tables-BBMGs0qO.js";
import { a as stripAssistantInternalScaffolding, c as stripLegacyBracketToolCallBlocks, i as sanitizeAssistantVisibleTextWithProfile, l as stripMinimaxToolCallXml, n as sanitizeAssistantVisibleText, o as stripAssistantInternalTraceLines, r as sanitizeAssistantVisibleTextWithOptions, s as stripDowngradedToolCallText, t as AssistantVisibleTextSanitizerProfile, u as stripToolCallXmlTags } from "./assistant-visible-text-BkPy-bj_.js";
import { _ as uniqueStrings, a as normalizeOptionalTrimmedStringList, c as normalizeSortedUniqueTrimmedStringList, d as normalizeTrimmedStringList, f as normalizeUniqueSingleOrTrimmedStringList, g as sortUniqueStrings, h as normalizeUniqueTrimmedStringList, i as normalizeHyphenSlug, l as normalizeStringEntries, m as normalizeUniqueStringEntriesLower, n as normalizeAtHashSlug, o as normalizeSingleOrTrimmedStringList, p as normalizeUniqueStringEntries, r as normalizeCsvOrLooseStringList, s as normalizeSortedUniqueStringEntries, t as normalizeArrayBackedTrimmedStringList, u as normalizeStringEntriesLower, v as uniqueValues } from "./string-normalization-BUWquf-_.js";
import { n as buildTimeoutAbortSignal, r as fetchWithTimeout, t as bindAbortRelay } from "./fetch-timeout-D2yvPshT.js";
import { K as withTimeout } from "./fs-safe-DGWa_p_W.js";
import { n as resolveGlobalSingleton, t as resolveGlobalMap } from "./global-singleton-D7qTIcxD.js";
import { n as createScopedExpiringIdCache, t as ScopedExpiringIdCache } from "./scoped-expiring-id-cache-DBw3jYn7.js";
import { n as hasSystemMark, r as prefixSystemMessage, t as SYSTEM_MARK } from "./system-message-BaqODHMh.js";
import { a as getChildLogger, c as isFileLogLevelEnabled, d as setLoggerOverride, f as testApi, h as LoggerSettings, i as PinoLikeLogger, l as resetLogger, n as DEFAULT_LOG_FILE, o as getLogger, p as toPinoLikeLogger, r as LoggerResolvedSettings, s as getResolvedLoggerSettings, t as DEFAULT_LOG_DIR, u as setLoggerConfigLoaderForTests } from "./logger-U6tQqZy1.js";
import { A as logDebug, C as resolveStuckSessionWarnMs, D as diagnosticLogger, E as updateDiagnosticSessionFile, M as logInfo, N as logSuccess, O as logLaneDequeue, P as logWarn, S as resolveStuckSessionAbortMs, T as stopDiagnosticHeartbeat, _ as logWebhookProcessed, a as logActiveRuns, b as requestStuckDiagnosticSessionRecovery, c as logMessageProcessed, d as logRunAttempt, f as logSessionAttention, g as logWebhookError, h as logToolLoopAction, i as isStuckSessionRecoveryEnabled, j as logError, k as logLaneEnqueue, l as logMessageQueued, m as logSessionTurnCreated, n as sha256HexPrefix, o as logMessageDispatchCompleted, p as logSessionStateChange, r as getDiagnosticSessionStateCountForTest, s as logMessageDispatchStarted, t as redactIdentifier, u as logMessageReceived, v as logWebhookReceived, w as startDiagnosticHeartbeat, x as resetDiagnosticStateForTest, y as markDiagnosticSessionProgress } from "./redact-identifier-CRZ2lmcE.js";
import { a as computeSensitiveRedactionBitmap, c as redactSecrets, d as redactSensitiveLines, f as redactSensitiveText, g as resolveRedactOptions, h as redactToolPayloadTextWithConfig, i as ResolvedRedactOptions, l as redactSensitiveFieldValue, m as redactToolPayloadText, n as RedactPattern, o as getDefaultRedactPatterns, p as redactToolDetail, r as RedactSensitiveMode, s as isSensitiveFieldKey, t as RedactOptions, u as redactSensitiveFieldValueWithConfig } from "./redact-9sIDGpHV.js";
import { a as asOptionalRecord, i as asOptionalObjectRecord, n as asNullableObjectRecord, o as asRecord, r as asNullableRecord, s as readStringField, t as summarizeStringEntries } from "./string-sample-DQrE5T9a.js";
import { n as isAutoLinkedFileRef, t as FILE_REF_EXTENSIONS_WITH_TLD } from "./auto-linked-file-ref-5zRwmLog.js";
import { A as MarkdownStyleSpan, C as RenderMarkdownIRChunksWithinLimitOptions, D as MarkdownLinkSpan, E as MarkdownIR, F as markdownToIRWithMeta, I as sliceMarkdownIR, M as MarkdownTableMeta, N as chunkMarkdownIR, O as MarkdownParseOptions, P as markdownToIR, S as renderMarkdownWithMarkers, T as renderMarkdownIRChunksWithinLimit, _ as isInsideCode, a as sanitizeReplyDirectiveId, b as RenderStyleMap, c as stripInlineDirectiveTagsFromMessageForDisplay, d as ReasoningTagMode, f as ReasoningTagTrim, g as findCodeRegions, h as CodeRegion, i as parseInlineDirectives, j as MarkdownTableData, k as MarkdownStyle, l as sanitizeTerminalText, m as stripReasoningTagsFromText, n as DisplayMessageWithContent, o as stripInlineDirectiveTagsForDelivery, p as hasOrphanReasoningCloseBoundary, r as InlineDirectiveParseResult, s as stripInlineDirectiveTagsForDisplay, t as chunkItems, u as stripMarkdown, v as RenderLink, w as RenderedMarkdownChunk, x as RenderStyleMarker, y as RenderOptions } from "./chunk-items-C4YpQx67.js";
export { AssistantVisibleTextSanitizerProfile, CONFIG_DIR, CodeRegion, DEFAULT_LOG_DIR, DEFAULT_LOG_FILE, DisplayMessageWithContent, FILE_REF_EXTENSIONS_WITH_TLD, InlineDirectiveParseResult, LoggerResolvedSettings, type LoggerSettings, MarkdownIR, MarkdownLinkSpan, MarkdownParseOptions, MarkdownStyle, MarkdownStyleSpan, MarkdownTableData, MarkdownTableMeta, PinoLikeLogger, ReactionLevel, ReasoningTagMode, ReasoningTagTrim, RedactOptions, RedactPattern, RedactSensitiveMode, RenderLink, RenderMarkdownIRChunksWithinLimitOptions, RenderOptions, RenderStyleMap, RenderStyleMarker, RenderedMarkdownChunk, ResolvedReactionLevel, ResolvedRedactOptions, SYSTEM_MARK, ScopedExpiringIdCache, testApi as __test__, testApi, asNullableObjectRecord, asNullableRecord, asOptionalObjectRecord, asOptionalRecord, asRecord, bindAbortRelay, buildTimeoutAbortSignal, chunkItems, chunkMarkdownIR, clamp, clampInt, clampNumber, computeSensitiveRedactionBitmap, convertMarkdownTables, createScopedExpiringIdCache, diagnosticLogger, displayPath, displayString, ensureDir, escapeRegExp, fetchWithTimeout, findCodeRegions, getChildLogger, getDefaultRedactPatterns, getDiagnosticSessionStateCountForTest, getLogger, getResolvedLoggerSettings, hasNonEmptyString, hasOrphanReasoningCloseBoundary, hasSystemMark, isAutoLinkedFileRef, isFileLogLevelEnabled, isInsideCode, isRecord, isSensitiveFieldKey, isStuckSessionRecoveryEnabled, localeLowercasePreservingWhitespace, logActiveRuns, logDebug, logError, logInfo, logLaneDequeue, logLaneEnqueue, logMessageDispatchCompleted, logMessageDispatchStarted, logMessageProcessed, logMessageQueued, logMessageReceived, logRunAttempt, logSessionAttention, logSessionStateChange, logSessionTurnCreated, logSuccess, logToolLoopAction, logWarn, logWebhookError, logWebhookProcessed, logWebhookReceived, lowercasePreservingWhitespace, markDiagnosticSessionProgress, markdownToIR, markdownToIRWithMeta, normalizeArrayBackedTrimmedStringList, normalizeAtHashSlug, normalizeCsvOrLooseStringList, normalizeE164, normalizeFastMode, normalizeHyphenSlug, normalizeLowercaseStringOrEmpty, normalizeNullableString, normalizeOptionalLowercaseString, normalizeOptionalString, normalizeOptionalStringifiedId, normalizeOptionalThreadValue, normalizeOptionalTrimmedStringList, normalizeSingleOrTrimmedStringList, normalizeSortedUniqueStringEntries, normalizeSortedUniqueTrimmedStringList, normalizeStringEntries, normalizeStringEntriesLower, normalizeStringifiedEntries, normalizeStringifiedOptionalString, normalizeTrimmedStringList, normalizeUniqueSingleOrTrimmedStringList, normalizeUniqueStringEntries, normalizeUniqueStringEntriesLower, normalizeUniqueTrimmedStringList, parseInlineDirectives, pathExists, prefixSystemMessage, readStringField, readStringValue, redactIdentifier, redactSecrets, redactSensitiveFieldValue, redactSensitiveFieldValueWithConfig, redactSensitiveLines, redactSensitiveText, redactToolDetail, redactToolPayloadText, redactToolPayloadTextWithConfig, renderMarkdownIRChunksWithinLimit, renderMarkdownWithMarkers, requestStuckDiagnosticSessionRecovery, resetDiagnosticStateForTest, resetLogger, resolveConfigDir, resolveGlobalMap, resolveGlobalSingleton, resolveHomeDir, resolvePrimaryStringValue, resolveReactionLevel, resolveRedactOptions, resolveStuckSessionAbortMs, resolveStuckSessionWarnMs, resolveUserPath, safeParseJson, sanitizeAssistantVisibleText, sanitizeAssistantVisibleTextWithOptions, sanitizeAssistantVisibleTextWithProfile, sanitizeReplyDirectiveId, sanitizeTerminalText, setLoggerConfigLoaderForTests, setLoggerOverride, sha256HexPrefix, shortenHomeInString, shortenHomePath, sleep, sliceMarkdownIR, sliceUtf16Safe, sortUniqueStrings, startDiagnosticHeartbeat, stopDiagnosticHeartbeat, stripAssistantInternalScaffolding, stripAssistantInternalTraceLines, stripDowngradedToolCallText, stripInlineDirectiveTagsForDelivery, stripInlineDirectiveTagsForDisplay, stripInlineDirectiveTagsFromMessageForDisplay, stripLegacyBracketToolCallBlocks, stripMarkdown, stripMinimaxToolCallXml, stripReasoningTagsFromText, stripToolCallXmlTags, summarizeStringEntries, toPinoLikeLogger, truncateUtf16Safe, uniqueStrings, uniqueValues, updateDiagnosticSessionFile, withTimeout };