import { a as normalizeFastMode, c as normalizeOptionalLowercaseString, d as normalizeOptionalThreadValue, f as normalizeStringifiedEntries, h as resolvePrimaryStringValue, i as lowercasePreservingWhitespace, l as normalizeOptionalString, m as readStringValue, n as hasNonEmptyString, o as normalizeLowercaseStringOrEmpty, p as normalizeStringifiedOptionalString, r as localeLowercasePreservingWhitespace, s as normalizeNullableString, t as FastMode, u as normalizeOptionalStringifiedId } from "../string-coerce-DJnd-JG-.js";
import { g as resolveReactionLevel, h as ResolvedReactionLevel, m as ReactionLevel } from "../types.channels-BfbPuCac.js";
import { t as convertMarkdownTables } from "../tables-BBMGs0qO.js";
import { t as withTimeout } from "../timing-DpqpPUMw.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-B1sBDPQ8.js";
import { c as resolveUserPath } from "../home-dir-4pOw9r_P.js";
import { a as displayPath, c as normalizeE164, d as resolveHomeDir, f as safeParseJson, h as escapeRegExp, i as clampNumber, l as pathExists, m as shortenHomePath, n as clamp, o as displayString, p as shortenHomeInString, r as clampInt, s as ensureDir, t as CONFIG_DIR, u as resolveConfigDir } from "../utils-fb973z5A.js";
import { t as sleep } from "../sleep-DMWnIfLw.js";
import { a as asRecord, i as asOptionalRecord, n as asNullableRecord, o as isRecord, r as asOptionalObjectRecord, s as readStringField, t as asNullableObjectRecord } from "../record-coerce-BCQdFoCN.js";
import { n as sliceUtf16Safe, r as truncateUtf16Safe } from "../utf16-slice-DvSyDs5j.js";
import { n as resolveGlobalSingleton, t as resolveGlobalMap } from "../global-singleton-D7qTIcxD.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 { a as sanitizeAssistantVisibleTextWithProfile, c as stripDowngradedToolCallText, d as stripToolCallXmlTags, i as sanitizeAssistantVisibleTextWithOptions, l as stripLegacyBracketToolCallBlocks, n as sanitizeAssistantFinalAnswerText, o as stripAssistantInternalScaffolding, r as sanitizeAssistantVisibleText, s as stripAssistantInternalTraceLines, t as AssistantVisibleTextSanitizerProfile, u as stripMinimaxToolCallXml } from "../assistant-visible-text-Bo-pttz5.js";
import { a as getChildLogger, c as isFileLogLevelEnabled, d as setLoggerOverride, f as testApi, i as PinoLikeLogger, l as resetLogger, m as LoggerSettings, 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-06bprrXw.js";
import { t as summarizeStringEntries } from "../string-sample-D8vAF65F.js";
import { A as MarkdownTableMeta, C as RenderMarkdownIRChunksWithinLimitOptions, D as MarkdownParseOptions, E as MarkdownIR, F as MarkdownLinkSpan, I as MarkdownStyle, L as MarkdownStyleSpan, M as markdownToIR, N as markdownToIRWithMeta, O as MarkdownTableCell, P as sliceMarkdownIR, S as renderMarkdownWithMarkers, T as renderMarkdownIRChunksWithinLimit, _ as isInsideCode, a as sanitizeReplyDirectiveId, b as RenderStyleMap, c as stripInlineDirectiveTagsFromMessageForDisplay, d as ReasoningTagScope, f as ReasoningTagTrim, g as findCodeRegions, h as CodeRegion, i as parseInlineDirectives, j as chunkMarkdownIR, k as MarkdownTableData, l as stripMarkdown, m as stripReasoningTagsFromText, n as DisplayMessageWithContent, o as stripInlineDirectiveTagsForDelivery, p as hasOrphanReasoningCloseBoundary, r as InlineDirectiveParseResult, s as stripInlineDirectiveTagsForDisplay, t as chunkItems, u as ReasoningTagMode, v as RenderLink, w as RenderedMarkdownChunk, x as RenderStyleMarker, y as RenderOptions } from "../chunk-items-CSt0nDzZ.js";
import { n as isAutoLinkedFileRef, t as FILE_REF_EXTENSIONS_WITH_TLD } from "../auto-linked-file-ref-5zRwmLog.js";
import { t as sanitizeTerminalText } from "../safe-text-BE8n_0tu.js";
import { n as hasSystemMark, r as prefixSystemMessage, t as SYSTEM_MARK } from "../system-message-BaqODHMh.js";
import { n as createScopedExpiringIdCache, t as ScopedExpiringIdCache } from "../scoped-expiring-id-cache-Cwc0_0gQ.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-ytzHzowY.js";
export { AssistantVisibleTextSanitizerProfile, CONFIG_DIR, CodeRegion, DEFAULT_LOG_DIR, DEFAULT_LOG_FILE, DisplayMessageWithContent, FILE_REF_EXTENSIONS_WITH_TLD, FastMode, InlineDirectiveParseResult, LoggerResolvedSettings, type LoggerSettings, MarkdownIR, type MarkdownLinkSpan, MarkdownParseOptions, type MarkdownStyle, type MarkdownStyleSpan, MarkdownTableCell, MarkdownTableData, MarkdownTableMeta, PinoLikeLogger, ReactionLevel, ReasoningTagMode, ReasoningTagScope, 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, sanitizeAssistantFinalAnswerText, 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 };