chat 4.21.0 → 4.22.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +141 -6
- package/dist/index.js +372 -68
- package/dist/index.js.map +1 -1
- package/docs/concurrency.mdx +223 -0
- package/docs/meta.json +1 -0
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -336,6 +336,20 @@ declare class NotImplementedError extends ChatError {
|
|
|
336
336
|
interface ChatConfig<TAdapters extends Record<string, Adapter> = Record<string, Adapter>> {
|
|
337
337
|
/** Map of adapter name to adapter instance */
|
|
338
338
|
adapters: TAdapters;
|
|
339
|
+
/**
|
|
340
|
+
* How to handle messages that arrive while a handler is already
|
|
341
|
+
* processing on the same thread.
|
|
342
|
+
*
|
|
343
|
+
* - `'drop'` (default) — discard the message (throw `LockError`)
|
|
344
|
+
* - `'queue'` — queue the message; when the current handler finishes,
|
|
345
|
+
* process only the latest queued message with `context.skipped` containing
|
|
346
|
+
* all intermediate messages
|
|
347
|
+
* - `'debounce'` — all messages start/reset a debounce timer; only the
|
|
348
|
+
* final message in a burst is processed
|
|
349
|
+
* - `'concurrent'` — no locking; all messages processed in parallel
|
|
350
|
+
* - `ConcurrencyConfig` — fine-grained control over strategy and parameters
|
|
351
|
+
*/
|
|
352
|
+
concurrency?: ConcurrencyStrategy | ConcurrencyConfig;
|
|
339
353
|
/**
|
|
340
354
|
* TTL for message deduplication entries in milliseconds.
|
|
341
355
|
* Defaults to 300000 (5 minutes). Increase if your webhook cold starts
|
|
@@ -350,6 +364,17 @@ interface ChatConfig<TAdapters extends Record<string, Adapter> = Record<string,
|
|
|
350
364
|
* wait until some real text has been streamed before creating the message.
|
|
351
365
|
*/
|
|
352
366
|
fallbackStreamingPlaceholderText?: string | null;
|
|
367
|
+
/**
|
|
368
|
+
* Lock scope determines which messages contend for the same lock.
|
|
369
|
+
*
|
|
370
|
+
* - `'thread'`: lock per threadId (default for most adapters)
|
|
371
|
+
* - `'channel'`: lock per channelId (default for WhatsApp, Telegram)
|
|
372
|
+
* - function: resolve scope dynamically per message (async supported)
|
|
373
|
+
*
|
|
374
|
+
* When not set, falls back to the adapter's `lockScope` property,
|
|
375
|
+
* then to `'thread'`.
|
|
376
|
+
*/
|
|
377
|
+
lockScope?: LockScope | ((context: LockScopeContext) => LockScope | Promise<LockScope>);
|
|
353
378
|
/**
|
|
354
379
|
* Logger instance or log level.
|
|
355
380
|
* Pass "silent" to disable all logging.
|
|
@@ -366,6 +391,8 @@ interface ChatConfig<TAdapters extends Record<string, Adapter> = Record<string,
|
|
|
366
391
|
ttlMs?: number;
|
|
367
392
|
};
|
|
368
393
|
/**
|
|
394
|
+
* @deprecated Use `concurrency` instead.
|
|
395
|
+
*
|
|
369
396
|
* Behavior when a thread lock cannot be acquired (another handler is processing).
|
|
370
397
|
* - `'drop'` (default) — throw `LockError`, preserving current behavior
|
|
371
398
|
* - `'force'` — force-release the existing lock and re-acquire
|
|
@@ -501,6 +528,14 @@ interface Adapter<TThreadId = unknown, TRawMessage = unknown> {
|
|
|
501
528
|
* List threads in a channel.
|
|
502
529
|
*/
|
|
503
530
|
listThreads?(channelId: string, options?: ListThreadsOptions): Promise<ListThreadsResult<TRawMessage>>;
|
|
531
|
+
/**
|
|
532
|
+
* Default lock scope for this adapter.
|
|
533
|
+
* - `'thread'` (default): lock per threadId
|
|
534
|
+
* - `'channel'`: lock per channelId (for channel-based platforms like WhatsApp, Telegram)
|
|
535
|
+
*
|
|
536
|
+
* Can be overridden by `ChatConfig.lockScope`.
|
|
537
|
+
*/
|
|
538
|
+
readonly lockScope?: LockScope;
|
|
504
539
|
/** Unique name for this adapter (e.g., "slack", "teams") */
|
|
505
540
|
readonly name: string;
|
|
506
541
|
/**
|
|
@@ -716,6 +751,57 @@ interface ChatInstance {
|
|
|
716
751
|
channelId: string;
|
|
717
752
|
}, options?: WebhookOptions): void;
|
|
718
753
|
}
|
|
754
|
+
/** Lock scope determines which messages contend for the same lock. */
|
|
755
|
+
type LockScope = "thread" | "channel";
|
|
756
|
+
/** Context provided to the lockScope resolver function. */
|
|
757
|
+
interface LockScopeContext {
|
|
758
|
+
adapter: Adapter;
|
|
759
|
+
channelId: string;
|
|
760
|
+
isDM: boolean;
|
|
761
|
+
threadId: string;
|
|
762
|
+
}
|
|
763
|
+
/** Concurrency strategy for overlapping messages on the same thread. */
|
|
764
|
+
type ConcurrencyStrategy = "drop" | "queue" | "debounce" | "concurrent";
|
|
765
|
+
/** Fine-grained concurrency configuration. */
|
|
766
|
+
interface ConcurrencyConfig {
|
|
767
|
+
/** Debounce window in milliseconds (debounce strategy). Default: 1500. */
|
|
768
|
+
debounceMs?: number;
|
|
769
|
+
/** Max concurrent handlers per thread (concurrent strategy). Default: Infinity. */
|
|
770
|
+
maxConcurrent?: number;
|
|
771
|
+
/** Max queued messages per thread (queue/debounce strategy). Default: 10. */
|
|
772
|
+
maxQueueSize?: number;
|
|
773
|
+
/** What to do when queue is full. Default: 'drop-oldest'. */
|
|
774
|
+
onQueueFull?: "drop-oldest" | "drop-newest";
|
|
775
|
+
/** TTL for queued entries in milliseconds. Default: 90000 (90s). */
|
|
776
|
+
queueEntryTtlMs?: number;
|
|
777
|
+
/** The concurrency strategy to use. */
|
|
778
|
+
strategy: ConcurrencyStrategy;
|
|
779
|
+
}
|
|
780
|
+
/**
|
|
781
|
+
* An entry in the per-thread message queue.
|
|
782
|
+
* Used by the `queue` and `debounce` concurrency strategies.
|
|
783
|
+
*/
|
|
784
|
+
interface QueueEntry {
|
|
785
|
+
/** When this entry was enqueued (Unix ms). */
|
|
786
|
+
enqueuedAt: number;
|
|
787
|
+
/** When this entry expires (Unix ms). Stale entries are discarded on dequeue. */
|
|
788
|
+
expiresAt: number;
|
|
789
|
+
/** The queued message. */
|
|
790
|
+
message: Message;
|
|
791
|
+
}
|
|
792
|
+
/**
|
|
793
|
+
* Context provided to message handlers when messages were queued
|
|
794
|
+
* while a previous handler was running.
|
|
795
|
+
*/
|
|
796
|
+
interface MessageContext {
|
|
797
|
+
/**
|
|
798
|
+
* Messages that arrived while the previous handler was running,
|
|
799
|
+
* in chronological order, excluding the current message (which is the latest).
|
|
800
|
+
*/
|
|
801
|
+
skipped: Message[];
|
|
802
|
+
/** Total messages received since last handler ran (skipped.length + 1). */
|
|
803
|
+
totalSinceLastHandler: number;
|
|
804
|
+
}
|
|
719
805
|
interface StateAdapter {
|
|
720
806
|
/** Acquire a lock on a thread (returns null if already locked) */
|
|
721
807
|
acquireLock(threadId: string, ttlMs: number): Promise<Lock | null>;
|
|
@@ -728,8 +814,12 @@ interface StateAdapter {
|
|
|
728
814
|
connect(): Promise<void>;
|
|
729
815
|
/** Delete a cached value */
|
|
730
816
|
delete(key: string): Promise<void>;
|
|
817
|
+
/** Pop the next message from the thread's queue. Returns null if empty. */
|
|
818
|
+
dequeue(threadId: string): Promise<QueueEntry | null>;
|
|
731
819
|
/** Disconnect from the state backend */
|
|
732
820
|
disconnect(): Promise<void>;
|
|
821
|
+
/** Atomically append a message to the thread's pending queue. Returns new queue depth. */
|
|
822
|
+
enqueue(threadId: string, entry: QueueEntry, maxSize: number): Promise<number>;
|
|
733
823
|
/** Extend a lock's TTL */
|
|
734
824
|
extendLock(lock: Lock, ttlMs: number): Promise<boolean>;
|
|
735
825
|
/**
|
|
@@ -744,6 +834,8 @@ interface StateAdapter {
|
|
|
744
834
|
getList<T = unknown>(key: string): Promise<T[]>;
|
|
745
835
|
/** Check if subscribed to a thread */
|
|
746
836
|
isSubscribed(threadId: string): Promise<boolean>;
|
|
837
|
+
/** Get the current queue depth for a thread. */
|
|
838
|
+
queueDepth(threadId: string): Promise<number>;
|
|
747
839
|
/** Release a lock */
|
|
748
840
|
releaseLock(lock: Lock): Promise<void>;
|
|
749
841
|
/** Set a cached value with optional TTL in milliseconds */
|
|
@@ -1349,7 +1441,7 @@ interface FileUpload {
|
|
|
1349
1441
|
* });
|
|
1350
1442
|
* ```
|
|
1351
1443
|
*/
|
|
1352
|
-
type MentionHandler<TState = Record<string, unknown>> = (thread: Thread<TState>, message: Message) => void | Promise<void>;
|
|
1444
|
+
type MentionHandler<TState = Record<string, unknown>> = (thread: Thread<TState>, message: Message, context?: MessageContext) => void | Promise<void>;
|
|
1353
1445
|
/**
|
|
1354
1446
|
* Handler for direct messages (1:1 conversations with the bot).
|
|
1355
1447
|
*
|
|
@@ -1358,14 +1450,14 @@ type MentionHandler<TState = Record<string, unknown>> = (thread: Thread<TState>,
|
|
|
1358
1450
|
* handlers are registered, DMs fall through to `onNewMention` for backward
|
|
1359
1451
|
* compatibility.
|
|
1360
1452
|
*/
|
|
1361
|
-
type DirectMessageHandler<TState = Record<string, unknown>> = (thread: Thread<TState>, message: Message, channel: Channel<TState
|
|
1453
|
+
type DirectMessageHandler<TState = Record<string, unknown>> = (thread: Thread<TState>, message: Message, channel: Channel<TState>, context?: MessageContext) => void | Promise<void>;
|
|
1362
1454
|
/**
|
|
1363
1455
|
* Handler for messages matching a regex pattern.
|
|
1364
1456
|
*
|
|
1365
1457
|
* Registered via `chat.onNewMessage(pattern, handler)`. Called when a message
|
|
1366
1458
|
* matches the pattern in an unsubscribed thread.
|
|
1367
1459
|
*/
|
|
1368
|
-
type MessageHandler<TState = Record<string, unknown>> = (thread: Thread<TState>, message: Message) => void | Promise<void>;
|
|
1460
|
+
type MessageHandler<TState = Record<string, unknown>> = (thread: Thread<TState>, message: Message, context?: MessageContext) => void | Promise<void>;
|
|
1369
1461
|
/**
|
|
1370
1462
|
* Handler for messages in subscribed threads.
|
|
1371
1463
|
*
|
|
@@ -1389,7 +1481,7 @@ type MessageHandler<TState = Record<string, unknown>> = (thread: Thread<TState>,
|
|
|
1389
1481
|
* });
|
|
1390
1482
|
* ```
|
|
1391
1483
|
*/
|
|
1392
|
-
type SubscribedMessageHandler<TState = Record<string, unknown>> = (thread: Thread<TState>, message: Message) => void | Promise<void>;
|
|
1484
|
+
type SubscribedMessageHandler<TState = Record<string, unknown>> = (thread: Thread<TState>, message: Message, context?: MessageContext) => void | Promise<void>;
|
|
1393
1485
|
/**
|
|
1394
1486
|
* Well-known emoji that work across platforms (Slack and Google Chat).
|
|
1395
1487
|
* These are normalized to a common format regardless of platform.
|
|
@@ -2101,6 +2193,9 @@ declare class Chat<TAdapters extends Record<string, Adapter> = Record<string, Ad
|
|
|
2101
2193
|
private readonly _dedupeTtlMs;
|
|
2102
2194
|
private readonly _onLockConflict;
|
|
2103
2195
|
private readonly _messageHistory;
|
|
2196
|
+
private readonly _concurrencyStrategy;
|
|
2197
|
+
private readonly _concurrencyConfig;
|
|
2198
|
+
private readonly _lockScope;
|
|
2104
2199
|
private readonly mentionHandlers;
|
|
2105
2200
|
private readonly directMessageHandlers;
|
|
2106
2201
|
private readonly messagePatterns;
|
|
@@ -2470,6 +2565,12 @@ declare class Chat<TAdapters extends Record<string, Adapter> = Record<string, Ad
|
|
|
2470
2565
|
* Infer which adapter to use based on the userId format.
|
|
2471
2566
|
*/
|
|
2472
2567
|
private inferAdapterFromUserId;
|
|
2568
|
+
/**
|
|
2569
|
+
* Resolve the lock key for a message based on lock scope.
|
|
2570
|
+
* With 'thread' scope, returns threadId. With 'channel' scope,
|
|
2571
|
+
* returns channelId (derived via adapter.channelIdFromThreadId).
|
|
2572
|
+
*/
|
|
2573
|
+
private getLockKey;
|
|
2473
2574
|
/**
|
|
2474
2575
|
* Handle an incoming message from an adapter.
|
|
2475
2576
|
* This is called by adapters when they receive a webhook.
|
|
@@ -2478,9 +2579,36 @@ declare class Chat<TAdapters extends Record<string, Adapter> = Record<string, Ad
|
|
|
2478
2579
|
* - Deduplication: Same message may arrive multiple times (e.g., Slack sends
|
|
2479
2580
|
* both `message` and `app_mention` events, GChat sends direct webhook + Pub/Sub)
|
|
2480
2581
|
* - Bot filtering: Messages from the bot itself are skipped
|
|
2481
|
-
* -
|
|
2582
|
+
* - Concurrency: Controlled by `concurrency` config (drop, queue, debounce, concurrent)
|
|
2482
2583
|
*/
|
|
2483
2584
|
handleIncomingMessage(adapter: Adapter, threadId: string, message: Message): Promise<void>;
|
|
2585
|
+
/**
|
|
2586
|
+
* Drop strategy: acquire lock or fail. Original behavior.
|
|
2587
|
+
*/
|
|
2588
|
+
private handleDrop;
|
|
2589
|
+
/**
|
|
2590
|
+
* Queue/Debounce strategy: enqueue if lock is busy, drain after processing.
|
|
2591
|
+
*/
|
|
2592
|
+
private handleQueueOrDebounce;
|
|
2593
|
+
/**
|
|
2594
|
+
* Debounce loop: wait for debounceMs, check if newer message arrived,
|
|
2595
|
+
* repeat until no new messages, then process the final message.
|
|
2596
|
+
*/
|
|
2597
|
+
private debounceLoop;
|
|
2598
|
+
/**
|
|
2599
|
+
* Drain queue: collect all pending messages, dispatch the latest with
|
|
2600
|
+
* skipped context, then check for more.
|
|
2601
|
+
*/
|
|
2602
|
+
private drainQueue;
|
|
2603
|
+
/**
|
|
2604
|
+
* Concurrent strategy: no locking, process immediately.
|
|
2605
|
+
*/
|
|
2606
|
+
private handleConcurrent;
|
|
2607
|
+
/**
|
|
2608
|
+
* Dispatch a message to the appropriate handler chain based on
|
|
2609
|
+
* subscription status, mention detection, and pattern matching.
|
|
2610
|
+
*/
|
|
2611
|
+
private dispatchToHandlers;
|
|
2484
2612
|
private createThread;
|
|
2485
2613
|
/**
|
|
2486
2614
|
* Detect if the bot was mentioned in the message.
|
|
@@ -2488,6 +2616,13 @@ declare class Chat<TAdapters extends Record<string, Adapter> = Record<string, Ad
|
|
|
2488
2616
|
*/
|
|
2489
2617
|
private detectMention;
|
|
2490
2618
|
private escapeRegex;
|
|
2619
|
+
/**
|
|
2620
|
+
* Reconstruct a proper Message instance from a dequeued entry.
|
|
2621
|
+
* After JSON roundtrip through the state adapter, the message is a plain
|
|
2622
|
+
* object (not a Message instance). This restores class invariants like
|
|
2623
|
+
* `links` defaulting to `[]` and `metadata.dateSent` being a Date.
|
|
2624
|
+
*/
|
|
2625
|
+
private rehydrateMessage;
|
|
2491
2626
|
private runHandlers;
|
|
2492
2627
|
}
|
|
2493
2628
|
|
|
@@ -3001,4 +3136,4 @@ declare const Select: SelectComponent;
|
|
|
3001
3136
|
declare const SelectOption: SelectOptionComponent;
|
|
3002
3137
|
declare const TextInput: TextInputComponent;
|
|
3003
3138
|
|
|
3004
|
-
export { type ActionEvent, type ActionHandler, Actions, ActionsComponent, type Adapter, type AdapterPostableMessage, type AiAssistantMessage, type AiFilePart, type AiImagePart, type AiMessage, type AiMessagePart, type AiTextPart, type AiUserMessage, type AppHomeOpenedEvent, type AppHomeOpenedHandler, type AssistantContextChangedEvent, type AssistantContextChangedHandler, type AssistantThreadStartedEvent, type AssistantThreadStartedHandler, type Attachment, type Author, BaseFormatConverter, Button, ButtonComponent, Card, CardChild, CardComponent, CardElement, CardLink, CardLinkComponent, CardText, type Channel, ChannelImpl, type ChannelInfo, Chat, type ChatConfig, ChatElement, ChatError, type ChatInstance, ConsoleLogger, type CustomEmojiMap, DEFAULT_EMOJI_MAP, type DirectMessageHandler, Divider, DividerComponent, type Emoji, type EmojiFormats, type EmojiMapConfig, EmojiResolver, type EmojiValue, type EphemeralMessage, type FetchDirection, type FetchOptions, type FetchResult, Field, FieldComponent, Fields, FieldsComponent, type FileUpload, type FormatConverter, type FormattedContent, Image, ImageComponent, LinkButton, LinkButtonComponent, type LinkPreview, type ListThreadsOptions, type ListThreadsResult, type Lock, LockError, type LogLevel, type Logger, type MarkdownConverter, type MarkdownTextChunk, type MemberJoinedChannelEvent, type MemberJoinedChannelHandler, type MentionHandler, Message, type MessageData, type MessageHandler, MessageHistoryCache, type MessageHistoryConfig, type MessageMetadata, Modal, type ModalCloseEvent, type ModalCloseHandler, type ModalCloseResponse, ModalComponent, ModalElement, type ModalErrorsResponse, type ModalPushResponse, type ModalResponse, type ModalSubmitEvent, type ModalSubmitHandler, type ModalUpdateResponse, NotImplementedError, type PlanUpdateChunk, type PostEphemeralOptions, type Postable, type PostableAst, type PostableCard, type PostableMarkdown, type PostableMessage, type PostableRaw, RadioSelect, RadioSelectComponent, RateLimitError, type RawMessage, type ReactionEvent, type ReactionHandler, type ScheduledMessage, Section, SectionComponent, Select, SelectComponent, SelectOption, SelectOptionComponent, type SentMessage, type SerializedChannel, type SerializedMessage, type SerializedThread, type SlashCommandEvent, type SlashCommandHandler, type StateAdapter, type StreamChunk, type StreamEvent, type StreamOptions, StreamingMarkdownRenderer, type SubscribedMessageHandler, THREAD_STATE_TTL_MS, Table, type TaskUpdateChunk, TextComponent, TextInput, TextInputComponent, type Thread, ThreadImpl, type ThreadInfo, type ThreadSummary, type WebhookOptions, type WellKnownEmoji, blockquote, cardChildToFallbackText, codeBlock, convertEmojiPlaceholders, createEmoji, defaultEmojiResolver, deriveChannelId, emoji, emphasis, fromFullStream, fromReactElement, fromReactModalElement, getEmoji, getNodeChildren, getNodeValue, inlineCode, isBlockquoteNode, isCardElement, isCodeNode, isDeleteNode, isEmphasisNode, isInlineCodeNode, isJSX, isLinkNode, isListItemNode, isListNode, isModalElement, isParagraphNode, isStrongNode, isTableCellNode, isTableNode, isTableRowNode, isTextNode, link, markdownToPlainText, paragraph, parseMarkdown, root, strikethrough, stringifyMarkdown, strong, tableElementToAscii, tableToAscii, text, toAiMessages, toCardElement, toModalElement, toPlainText, walkAst };
|
|
3139
|
+
export { type ActionEvent, type ActionHandler, Actions, ActionsComponent, type Adapter, type AdapterPostableMessage, type AiAssistantMessage, type AiFilePart, type AiImagePart, type AiMessage, type AiMessagePart, type AiTextPart, type AiUserMessage, type AppHomeOpenedEvent, type AppHomeOpenedHandler, type AssistantContextChangedEvent, type AssistantContextChangedHandler, type AssistantThreadStartedEvent, type AssistantThreadStartedHandler, type Attachment, type Author, BaseFormatConverter, Button, ButtonComponent, Card, CardChild, CardComponent, CardElement, CardLink, CardLinkComponent, CardText, type Channel, ChannelImpl, type ChannelInfo, Chat, type ChatConfig, ChatElement, ChatError, type ChatInstance, type ConcurrencyConfig, type ConcurrencyStrategy, ConsoleLogger, type CustomEmojiMap, DEFAULT_EMOJI_MAP, type DirectMessageHandler, Divider, DividerComponent, type Emoji, type EmojiFormats, type EmojiMapConfig, EmojiResolver, type EmojiValue, type EphemeralMessage, type FetchDirection, type FetchOptions, type FetchResult, Field, FieldComponent, Fields, FieldsComponent, type FileUpload, type FormatConverter, type FormattedContent, Image, ImageComponent, LinkButton, LinkButtonComponent, type LinkPreview, type ListThreadsOptions, type ListThreadsResult, type Lock, LockError, type LockScope, type LockScopeContext, type LogLevel, type Logger, type MarkdownConverter, type MarkdownTextChunk, type MemberJoinedChannelEvent, type MemberJoinedChannelHandler, type MentionHandler, Message, type MessageContext, type MessageData, type MessageHandler, MessageHistoryCache, type MessageHistoryConfig, type MessageMetadata, Modal, type ModalCloseEvent, type ModalCloseHandler, type ModalCloseResponse, ModalComponent, ModalElement, type ModalErrorsResponse, type ModalPushResponse, type ModalResponse, type ModalSubmitEvent, type ModalSubmitHandler, type ModalUpdateResponse, NotImplementedError, type PlanUpdateChunk, type PostEphemeralOptions, type Postable, type PostableAst, type PostableCard, type PostableMarkdown, type PostableMessage, type PostableRaw, type QueueEntry, RadioSelect, RadioSelectComponent, RateLimitError, type RawMessage, type ReactionEvent, type ReactionHandler, type ScheduledMessage, Section, SectionComponent, Select, SelectComponent, SelectOption, SelectOptionComponent, type SentMessage, type SerializedChannel, type SerializedMessage, type SerializedThread, type SlashCommandEvent, type SlashCommandHandler, type StateAdapter, type StreamChunk, type StreamEvent, type StreamOptions, StreamingMarkdownRenderer, type SubscribedMessageHandler, THREAD_STATE_TTL_MS, Table, type TaskUpdateChunk, TextComponent, TextInput, TextInputComponent, type Thread, ThreadImpl, type ThreadInfo, type ThreadSummary, type WebhookOptions, type WellKnownEmoji, blockquote, cardChildToFallbackText, codeBlock, convertEmojiPlaceholders, createEmoji, defaultEmojiResolver, deriveChannelId, emoji, emphasis, fromFullStream, fromReactElement, fromReactModalElement, getEmoji, getNodeChildren, getNodeValue, inlineCode, isBlockquoteNode, isCardElement, isCodeNode, isDeleteNode, isEmphasisNode, isInlineCodeNode, isJSX, isLinkNode, isListItemNode, isListNode, isModalElement, isParagraphNode, isStrongNode, isTableCellNode, isTableNode, isTableRowNode, isTextNode, link, markdownToPlainText, paragraph, parseMarkdown, root, strikethrough, stringifyMarkdown, strong, tableElementToAscii, tableToAscii, text, toAiMessages, toCardElement, toModalElement, toPlainText, walkAst };
|