File transfer subsystem for chat with P2P-first delivery and socket relay fallback.
Although chat_files has no standalone .doh.yaml, it is loaded through the chat package as:
chat_files_serverchat_files_clientchat_files_server.js)Responsibilities:
chat:chat.files (metadata)chat.file_seeds (who can serve each file)Doh.pod.chat_files (size, chunking, timeout, cache caps)chat.messages using [FILE] payload formatSocket events handled include:
chat:file:sharechat:file:request_peerschat:file:signal (WebRTC offer/answer/ICE relay)chat:file:relay_request, chat:file:relay_chunk, chat:file:relay_completechat:file:seed_registeredchat:file:probe (+ probe responses)chat_files_client.js)Main pieces:
TransferManager orchestration for requesting/transferring filesFileCache (IndexedDB-backed local cache)ChunkAccumulator for efficient chunk merge/finalizationChatFileCard UI with transfer state, previews, cancel/download actionsCapabilities:
Default pod keys are declared in Doh.Pod('chat_files_server', ...), including:
chunk_sizemax_file_sizewebrtc_timeoutrelay_batch_sizecache_max_bytesimage_auto_download_maxOverride in pod.yaml as needed.