You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Define all core TypeScript types, the abstract storage interface, and the abstract channel adapter interface. These contracts are the foundation that every other package implements against.
Summary
Define all core TypeScript types, the abstract storage interface, and the abstract channel adapter interface. These contracts are the foundation that every other package implements against.
Tasks
Data Model & Types
Channel— id, platform, credentials reference, metadataRecipient— id, webhookUrl, apiKey, metadataThread— threadId (ot_thr_*), channelId, nativeThreadId (nullable), targetId, createdAtTurn— turnId (ot_turn_*), threadId, direction (inbound/outbound), message, timestampRoute— id, criteria (channel, group, DM, thread, mention, sender, content pattern), recipientId, priorityEnvelope— threadId, turnId, replyTo, source, message (single object or array)INFORM,COLLECT,AUTHORIZE,ESCALATE,RESULTintent= A2H, otherwise = Chat SDKot_thr_*,ot_turn_*,ot_tk_*,ot_ch_sk_*)Storage Interface
StorageAdapterinterface:channels: CRUDrecipients: CRUDthreads: create, getById, getByNativeId, listByChannelturns: create, listByThreadroutes: CRUD, match(criteria) → Route[]tokens: create (ephemeral), validate, revokeStorageAdapterFactorypattern for pluggable instantiationChannel Adapter Interface
ChannelAdapterinterface:register(config)— set up webhook/subscription listenerssendMessage(target, message)— send rendered message to channelrenderChatSDK(message, capabilities)— adapt Chat SDK message to platformrenderA2HInline(intent, capabilities)— render buttons/selects for A2HcaptureResponse(thread, turn)— listen for response in thread/reply/DMcapabilities()— returns platform capability flagsChannelCapabilitiestype:{ threads, buttons, selectMenus, replyMessages, dms, fileUpload }Acceptance Criteria
packages/coreDependencies
References