openclaw
Version:
Multi-channel AI gateway with extensible messaging integrations
26 lines (25 loc) • 8.01 kB
JavaScript
import { n as readResponseWithLimit, t as readResponseTextSnippet } from "../read-response-with-limit-MDCSJrlg.js";
import { a as maxBytesForKind, i as MAX_VIDEO_BYTES, n as MAX_DOCUMENT_BYTES, o as mediaKindFromMime, r as MAX_IMAGE_BYTES, t as MAX_AUDIO_BYTES } from "../constants-Mf57IYS0.js";
import { a as imageMimeFromFormat, c as kindFromMime, d as sliceMimeSniffBuffer, i as getFileExtension, l as mimeTypeFromFilePath, n as detectMime, o as isAudioFileName, r as extensionForMime, s as isGifMedia, t as FILE_TYPE_SNIFF_MAX_BYTES, u as normalizeMimeType } from "../mime-C8mVE2Bw.js";
import { n as estimateBase64DecodedBytes, t as canonicalizeBase64 } from "../base64-l6yrCyHc.js";
import { a as ensureMediaDir, c as readMediaBuffer, d as saveMediaSource, f as saveMediaStream, i as deleteMediaBuffer, l as resolveMediaBufferPath, n as SaveMediaSourceError, o as extractOriginalFilename, p as setMediaStoreNetworkDepsForTest, r as cleanOldMedia, s as getMediaDir, t as MEDIA_MAX_BYTES, u as saveMediaBuffer } from "../store-C9M_0A1p.js";
import { a as convertHeicToJpeg, c as hasAlphaChannel, d as optimizeImageToPng, h as resizeToPng, i as buildImageResizeSideGrid, l as isImageProcessorUnavailableError, m as resizeToJpeg, n as ImageProcessorUnavailableError, r as MAX_IMAGE_INPUT_PIXELS, s as getImageMetadata, t as IMAGE_REDUCE_QUALITY_STEPS, u as normalizeExifOrientation } from "../image-ops-PfTOpg74.js";
import { a as parseFfprobeCodecAndSampleRate, c as runFfmpeg, d as MEDIA_FFMPEG_MAX_BUFFER_BYTES, f as MEDIA_FFMPEG_TIMEOUT_MS, i as transcodeAudioBufferToOpus, l as runFfprobe, n as probeVideoDimensions, o as parseFfprobeCsvFields, p as MEDIA_FFPROBE_TIMEOUT_MS, r as transcodeAudioBuffer, s as resolveFfmpegBin, t as parseFfprobeVideoDimensions, u as MEDIA_FFMPEG_MAX_AUDIO_DURATION_SECS } from "../media-services-DE3J1qM-.js";
import { t as parseMediaContentLength } from "../content-length-DZY9SBS5.js";
import { a as saveRemoteMedia, i as readRemoteMediaBuffer, n as MediaFetchError, o as saveResponseMedia, r as fetchRemoteMedia, t as DEFAULT_FETCH_MEDIA_MAX_BYTES } from "../fetch-2npQWHQh.js";
import { i as normalizeInboundPathRoots, n as isValidInboundPathRootPattern, r as mergeInboundPathRoots, t as isInboundPathAllowed } from "../inbound-path-policy-CYWsER5a.js";
import { a as getDefaultMediaLocalRoots, i as getAgentScopedMediaLocalRootsForSources, n as buildMediaLocalRoots, r as getAgentScopedMediaLocalRoots, t as appendLocalMediaParentRoots } from "../local-roots-BqdtViGS.js";
import { n as assertLocalMediaAllowed, r as getDefaultLocalRoots, t as LocalMediaAccessError } from "../local-media-access-Bw3v5URj.js";
import { n as normalizePollInput, r as resolvePollMaxSelections, t as normalizePollDurationHours } from "../polls-C-v11_tu.js";
import { n as normalizeMediaProviderId } from "../provider-id-DSbuCFIb.js";
import { i as resolveDocumentMediaModel, n as resolveAutoMediaKeyProviders, r as resolveDefaultMediaModel, t as providerSupportsNativePdfDocument } from "../defaults-BK9rbdLc.js";
import { i as describeImagesWithModelPayloadTransform, n as describeImageWithModelPayloadTransform, r as describeImagesWithModel, t as describeImageWithModel } from "../image-runtime-CmS6zMcE.js";
import { a as DEFAULT_MEDIA_CONCURRENCY, c as DEFAULT_VIDEO_MAX_BASE64_BYTES, i as DEFAULT_MAX_CHARS_BY_CAPABILITY, l as MIN_AUDIO_FILE_BYTES, n as DEFAULT_MAX_BYTES, o as DEFAULT_PROMPT, r as DEFAULT_MAX_CHARS, s as DEFAULT_TIMEOUT_SECONDS, t as CLI_OUTPUT_MAX_BUFFER } from "../defaults.constants-A49pIMjc.js";
import { n as resolveOutboundMediaAccess, r as resolveOutboundMediaLocalRoots, t as buildOutboundMediaLoadOptions } from "../load-options-VzbF4ozo.js";
import { n as resolveOutboundAttachmentFromUrl, t as resolveOutboundAttachmentFromBuffer } from "../outbound-attachment-DeL7GCBY.js";
import { _ as isVoiceMessageCompatibleAudio, a as resolveChannelMediaMaxBytes, c as renderQrPngBase64, d as encodePngRgb, f as encodePngRgba, g as isVoiceCompatibleAudio, h as VOICE_MESSAGE_MIME_TYPES, i as transcribeFirstAudio, l as renderQrPngDataUrl, m as VOICE_MESSAGE_AUDIO_EXTENSIONS, n as createScopedChannelMediaMaxBytesResolver, o as unlinkIfExists, p as fillPixel, r as resolveScopedChannelMediaMaxBytes, s as formatQrPngDataUrl, t as createDirectTextMediaOutbound, u as writeQrPngTempFile } from "../media-runtime-fgpmX6eL.js";
import { t as renderQrTerminal } from "../qr-terminal-zFHurnm4.js";
import { t as readByteStreamWithLimit } from "../read-byte-stream-with-limit-BIgLW6Dz.js";
import { t as buildAgentMediaPayload } from "../agent-media-payload-BXUnfV7N.js";
import { a as runCapability, i as resolveMediaAttachmentLocalRoots, n as clearMediaUnderstandingBinaryCacheForTests, o as createMediaAttachmentCache, r as resolveAutoImageModel, s as normalizeMediaAttachments, t as buildProviderRegistry } from "../runner-CswjdYkd.js";
export { CLI_OUTPUT_MAX_BUFFER, DEFAULT_FETCH_MEDIA_MAX_BYTES, DEFAULT_MAX_BYTES, DEFAULT_MAX_CHARS, DEFAULT_MAX_CHARS_BY_CAPABILITY, DEFAULT_MEDIA_CONCURRENCY, DEFAULT_PROMPT, DEFAULT_TIMEOUT_SECONDS, DEFAULT_VIDEO_MAX_BASE64_BYTES, FILE_TYPE_SNIFF_MAX_BYTES, IMAGE_REDUCE_QUALITY_STEPS, ImageProcessorUnavailableError, LocalMediaAccessError, MAX_AUDIO_BYTES, MAX_DOCUMENT_BYTES, MAX_IMAGE_BYTES, MAX_IMAGE_INPUT_PIXELS, MAX_VIDEO_BYTES, MEDIA_FFMPEG_MAX_AUDIO_DURATION_SECS, MEDIA_FFMPEG_MAX_BUFFER_BYTES, MEDIA_FFMPEG_TIMEOUT_MS, MEDIA_FFPROBE_TIMEOUT_MS, MEDIA_MAX_BYTES, MIN_AUDIO_FILE_BYTES, MediaFetchError, SaveMediaSourceError, VOICE_MESSAGE_AUDIO_EXTENSIONS, VOICE_MESSAGE_MIME_TYPES, appendLocalMediaParentRoots, assertLocalMediaAllowed, buildAgentMediaPayload, buildImageResizeSideGrid, buildMediaLocalRoots, buildOutboundMediaLoadOptions, buildProviderRegistry, canonicalizeBase64, cleanOldMedia, clearMediaUnderstandingBinaryCacheForTests, convertHeicToJpeg, createDirectTextMediaOutbound, createMediaAttachmentCache, createScopedChannelMediaMaxBytesResolver, deleteMediaBuffer, describeImageWithModel, describeImageWithModelPayloadTransform, describeImagesWithModel, describeImagesWithModelPayloadTransform, detectMime, encodePngRgb, encodePngRgba, ensureMediaDir, estimateBase64DecodedBytes, extensionForMime, extractOriginalFilename, fetchRemoteMedia, fillPixel, formatQrPngDataUrl, getAgentScopedMediaLocalRoots, getAgentScopedMediaLocalRootsForSources, getDefaultLocalRoots, getDefaultMediaLocalRoots, getFileExtension, getImageMetadata, getMediaDir, hasAlphaChannel, imageMimeFromFormat, isAudioFileName, isGifMedia, isImageProcessorUnavailableError, isInboundPathAllowed, isValidInboundPathRootPattern, isVoiceCompatibleAudio, isVoiceMessageCompatibleAudio, kindFromMime, maxBytesForKind, mediaKindFromMime, mergeInboundPathRoots, mimeTypeFromFilePath, normalizeExifOrientation, normalizeInboundPathRoots, normalizeMediaAttachments, normalizeMediaProviderId, normalizeMimeType, normalizePollDurationHours, normalizePollInput, optimizeImageToPng, parseFfprobeCodecAndSampleRate, parseFfprobeCsvFields, parseFfprobeVideoDimensions, parseMediaContentLength, probeVideoDimensions, providerSupportsNativePdfDocument, readByteStreamWithLimit, readMediaBuffer, readRemoteMediaBuffer, readResponseTextSnippet, readResponseWithLimit, renderQrPngBase64, renderQrPngDataUrl, renderQrTerminal, resizeToJpeg, resizeToPng, resolveAutoImageModel, resolveAutoMediaKeyProviders, resolveChannelMediaMaxBytes, resolveDefaultMediaModel, resolveDocumentMediaModel, resolveFfmpegBin, resolveMediaAttachmentLocalRoots, resolveMediaBufferPath, resolveOutboundAttachmentFromBuffer, resolveOutboundAttachmentFromUrl, resolveOutboundMediaAccess, resolveOutboundMediaLocalRoots, resolvePollMaxSelections, resolveScopedChannelMediaMaxBytes, runCapability, runFfmpeg, runFfprobe, saveMediaBuffer, saveMediaSource, saveMediaStream, saveRemoteMedia, saveResponseMedia, setMediaStoreNetworkDepsForTest, sliceMimeSniffBuffer, transcodeAudioBuffer, transcodeAudioBufferToOpus, transcribeFirstAudio, unlinkIfExists, writeQrPngTempFile };