Files
Peter SteinbergerandGitHub 0ac7b24d56 feat(channels): batch 3 producers drop media placeholder bodies (#111800)
* feat(channels): batch 3 producers drop media placeholder bodies

Media-placeholder program batch 3: iMessage, Signal, and WhatsApp stop
minting <media:kind> placeholder bodies. Primary bodies carry captions
only with one aligned structured fact per native attachment (type-only
for missing/rejected/oversized). Echo, quote, and pending-history
records gain structured media facts so dedupe and previews work without
rendered text. Signal media-only outbound sends drop the placeholder
body entirely (signal-cli accepts attachment-only sends; recipients now
see just the media). WhatsApp audio preflight de-stringed; qa-lab
sticker recognizer moved to structured facts; WhatsApp gif maps to
video (presentation mode, no behavioral consumer).

* test(whatsapp): keep media classifier private
2026-07-20 04:22:44 -07:00

89 lines
2.3 KiB
TypeScript

// Whatsapp API module exposes the plugin public contract.
export {
getActiveWebListener,
resolveWebAccountId,
type ActiveWebListener,
type ActiveWebSendOptions,
} from "./src/active-listener.js";
export { handleWhatsAppAction, whatsAppActionRuntime } from "./src/action-runtime.js";
export { createWhatsAppLoginTool } from "./src/agent-tools-login.js";
export {
formatWhatsAppWebAuthStatusState,
getWebAuthAgeMs,
hasWebCredsSync,
logWebSelfId,
logoutWeb,
pickWebChannel,
readCredsJsonRaw,
readWebAuthExistsBestEffort,
readWebAuthExistsForDecision,
readWebAuthSnapshot,
readWebAuthSnapshotBestEffort,
readWebAuthState,
readWebSelfId,
readWebSelfIdentity,
readWebSelfIdentityForDecision,
resolveDefaultWebAuthDir,
resolveWebCredsBackupPath,
resolveWebCredsPath,
restoreCredsFromBackupIfNeeded,
webAuthExists,
WA_WEB_AUTH_DIR,
WHATSAPP_AUTH_UNSTABLE_CODE,
WhatsAppAuthUnstableError,
type WhatsAppWebAuthState,
} from "./src/auth-store.js";
export {
DEFAULT_WEB_MEDIA_BYTES,
HEARTBEAT_PROMPT,
HEARTBEAT_TOKEN,
monitorWebChannel,
SILENT_REPLY_TOKEN,
stripHeartbeatToken,
type WebChannelStatus,
type WebMonitorTuning,
} from "./src/auto-reply.js";
export {
extractContactContext,
extractLocationData,
extractText,
monitorWebInbox,
resetWebInboundDedupe,
type LegacyFlatWebInboundMessage,
type WebInboundCallbackMessage,
type WebInboundMessage,
type WebInboundMessageInput,
type WebListenerCloseReason,
type WhatsAppInboundAdmission,
} from "./src/inbound.js";
export { loginWeb } from "./src/login.js";
export {
getDefaultLocalRoots,
loadWebMedia,
loadWebMediaRaw,
LocalMediaAccessError,
optimizeImageToJpeg,
optimizeImageToPng,
type LocalMediaAccessErrorCode,
type WebMediaResult,
} from "./src/media.js";
export {
sendMessageWhatsApp,
sendPollWhatsApp,
sendReactionWhatsApp,
sendTypingWhatsApp,
} from "./src/send.js";
export {
createWaSocket,
formatError,
getStatusCode,
newConnectionId,
waitForCredsSaveQueue,
waitForCredsSaveQueueWithTimeout,
waitForWaConnection,
writeCredsJsonAtomically,
type CredsQueueWaitResult,
} from "./src/session.js";
export { setWhatsAppRuntime } from "./src/runtime.js";
export { startWebLoginWithQr, waitForWebLogin } from "./login-qr-runtime.js";