@meshagent/meshagent-tailwind 0.47.1 → 0.48.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.
Files changed (79) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/dist/cjs/chat/agent-thread.d.ts +24 -24
  3. package/dist/cjs/chat/agent-thread.js +575 -808
  4. package/dist/cjs/chat/chat-bot-view.d.ts +18 -6
  5. package/dist/cjs/chat/chat-bot-view.js +29 -7
  6. package/dist/cjs/chat/chat-feed-widget-view.d.ts +7 -0
  7. package/dist/cjs/chat/chat-feed-widget-view.js +50 -0
  8. package/dist/cjs/chat/chat-feed-widget.d.ts +16 -0
  9. package/dist/cjs/chat/chat-feed-widget.js +51 -0
  10. package/dist/cjs/chat/chat-hooks.d.ts +2 -2
  11. package/dist/cjs/chat/chat-input.d.ts +3 -3
  12. package/dist/cjs/chat/chat-input.js +9 -4
  13. package/dist/cjs/chat/chat-scroller.d.ts +21 -0
  14. package/dist/cjs/chat/chat-scroller.js +139 -0
  15. package/dist/cjs/chat/chat-thread-timeline.d.ts +66 -0
  16. package/dist/cjs/chat/chat-thread-timeline.js +595 -0
  17. package/dist/cjs/chat/dataset-agent-thread.d.ts +16 -4
  18. package/dist/cjs/chat/dataset-agent-thread.js +112 -292
  19. package/dist/cjs/chat/multi-thread-view.d.ts +8 -3
  20. package/dist/cjs/chat/multi-thread-view.js +10 -2
  21. package/dist/cjs/chat/new-chat-thread.d.ts +8 -3
  22. package/dist/cjs/chat/new-chat-thread.js +63 -24
  23. package/dist/cjs/chat/thread-view.d.ts +18 -5
  24. package/dist/cjs/chat/thread-view.js +67 -9
  25. package/dist/cjs/chat/use-chat-virtualizer.d.ts +47 -0
  26. package/dist/cjs/chat/use-chat-virtualizer.js +336 -0
  27. package/dist/cjs/chat/virtualization.d.ts +44 -0
  28. package/dist/cjs/chat/virtualization.js +143 -0
  29. package/dist/cjs/components/ui/button.d.ts +2 -2
  30. package/dist/cjs/components/ui/dialog.d.ts +1 -1
  31. package/dist/cjs/components/ui/dialog.js +11 -1
  32. package/dist/cjs/components/ui/portal-container.d.ts +7 -0
  33. package/dist/cjs/components/ui/portal-container.js +46 -0
  34. package/dist/cjs/file-preview/file-preview.js +1 -1
  35. package/dist/cjs/index.d.ts +3 -0
  36. package/dist/cjs/index.js +4 -0
  37. package/dist/cjs/meetings/meeting-scope.d.ts +2 -1
  38. package/dist/cjs/meetings/meeting-scope.js +1 -0
  39. package/dist/cjs/react-syntax-highlighter.d.js +1 -0
  40. package/dist/esm/chat/agent-thread.d.ts +24 -24
  41. package/dist/esm/chat/agent-thread.js +574 -838
  42. package/dist/esm/chat/chat-bot-view.d.ts +18 -6
  43. package/dist/esm/chat/chat-bot-view.js +29 -7
  44. package/dist/esm/chat/chat-feed-widget-view.d.ts +7 -0
  45. package/dist/esm/chat/chat-feed-widget-view.js +30 -0
  46. package/dist/esm/chat/chat-feed-widget.d.ts +16 -0
  47. package/dist/esm/chat/chat-feed-widget.js +31 -0
  48. package/dist/esm/chat/chat-hooks.d.ts +2 -2
  49. package/dist/esm/chat/chat-input.d.ts +3 -3
  50. package/dist/esm/chat/chat-input.js +9 -4
  51. package/dist/esm/chat/chat-scroller.d.ts +21 -0
  52. package/dist/esm/chat/chat-scroller.js +122 -0
  53. package/dist/esm/chat/chat-thread-timeline.d.ts +66 -0
  54. package/dist/esm/chat/chat-thread-timeline.js +605 -0
  55. package/dist/esm/chat/dataset-agent-thread.d.ts +16 -4
  56. package/dist/esm/chat/dataset-agent-thread.js +114 -307
  57. package/dist/esm/chat/multi-thread-view.d.ts +8 -3
  58. package/dist/esm/chat/multi-thread-view.js +10 -2
  59. package/dist/esm/chat/new-chat-thread.d.ts +8 -3
  60. package/dist/esm/chat/new-chat-thread.js +64 -25
  61. package/dist/esm/chat/thread-view.d.ts +18 -5
  62. package/dist/esm/chat/thread-view.js +67 -9
  63. package/dist/esm/chat/use-chat-virtualizer.d.ts +47 -0
  64. package/dist/esm/chat/use-chat-virtualizer.js +331 -0
  65. package/dist/esm/chat/virtualization.d.ts +44 -0
  66. package/dist/esm/chat/virtualization.js +123 -0
  67. package/dist/esm/components/ui/button.d.ts +2 -2
  68. package/dist/esm/components/ui/dialog.d.ts +1 -1
  69. package/dist/esm/components/ui/dialog.js +11 -1
  70. package/dist/esm/components/ui/portal-container.d.ts +7 -0
  71. package/dist/esm/components/ui/portal-container.js +16 -0
  72. package/dist/esm/file-preview/file-preview.js +1 -1
  73. package/dist/esm/index.d.ts +3 -0
  74. package/dist/esm/index.js +4 -0
  75. package/dist/esm/meetings/meeting-scope.d.ts +2 -1
  76. package/dist/esm/meetings/meeting-scope.js +1 -0
  77. package/dist/esm/react-syntax-highlighter.d.js +0 -0
  78. package/dist/index.css +1 -1
  79. package/package.json +6 -5
package/CHANGELOG.md CHANGED
@@ -1,15 +1,25 @@
1
+ ## [0.48.0]
2
+ - Reworked the TS/JS agent chat stack to preserve ordered threaded messages and support injected-message threads across chat clients and process handling.
3
+ - Added chat feed widgets and virtual scrolling to the React/Tailwind UI, improving large-thread performance.
4
+ - Aligned `meshagent-agents-ts` with the Dart agents implementation and refreshed the shared chat/message contracts.
5
+ - Removed the LiveKit dependency from the React package and updated shared package dependencies for the new chat stack.
6
+
1
7
  ## [0.47.1]
2
8
  - Added duplex messaging stream subscriptions and replay-state alignment in the TypeScript chat clients, bringing the NodeJS SDK in line with the new streaming model.
3
9
  - Reworked messaging and room client flow control so dispatch ordering, close behavior, and presence updates stay consistent under streaming loads.
4
10
  - Expanded stream and presence test coverage for the new messaging behavior.
5
11
 
6
12
  ## [0.47.0]
13
+ - Aligned dataset-backed React chat with Flutter by keeping the real live thread subscription open and reconciling ordered dataset history with live feed state.
14
+ - Moved dataset-thread hydration and chat timeline reduction into the Tailwind UI package so `meshagent-agents-ts` can match the Dart agents API.
7
15
  - Improved TypeScript messaging clients so room delivery order and startup/presence behavior stay consistent.
8
16
  - Moved managed-agent client routing onto the Rust tunnel path and hardened agent chat-client event handling.
9
17
  - Added a `test:rust-process-e2e` entry point for the agents-ts package and expanded live chat/process-agent coverage.
10
18
  - Finished aligning CLI pagination behavior across feeds, rooms, mailboxes, scheduled tasks, and shared helpers.
11
19
 
12
20
  ## [0.46.3]
21
+ - Added `ChatFeedWidget` support for executable, custom React rendering of live and restored client-tool calls in chat feeds.
22
+ - Dataset-backed chat now consumes the typed timeline from `meshagent-agents-ts` instead of parsing and reducing protocol messages in React.
13
23
  - `LivekitProtocolChannel.sendData` now clones outgoing `Uint8Array` payloads before publishing, avoiding shared-buffer mutation issues.
14
24
 
15
25
  ## [0.46.2]
@@ -1,6 +1,9 @@
1
1
  import type { ReactElement } from "react";
2
2
  import type { RoomClient } from "@meshagent/meshagent";
3
- import type { AgentMessage, BaseChatClient, ClientToolkitDescription } from "@meshagent/meshagent-agents";
3
+ import type { AgentMessage, AgentMessageEvent, BaseChatClient, ClientToolkitDescription } from "@meshagent/meshagent-agents";
4
+ import type { AgentUsageSnapshot } from "./chat-thread-timeline.js";
5
+ export { AgentUsageSnapshot, shouldReplaceAgentUsageSnapshot } from "./chat-thread-timeline.js";
6
+ import type { ChatFeedWidget } from "./chat-feed-widget.js";
4
7
  export declare class AgentToolChoice {
5
8
  readonly toolkitName: string;
6
9
  readonly toolName: string;
@@ -10,29 +13,10 @@ export declare class AgentToolChoice {
10
13
  });
11
14
  toJson(): Record<string, string>;
12
15
  }
13
- export declare class AgentUsageSnapshot {
14
- readonly threadPath: string;
15
- readonly turnId?: string;
16
- readonly contextUsedTokens: number;
17
- readonly contextTotalTokens?: number;
18
- readonly compactionMode?: string;
19
- readonly compactionThreshold?: number;
20
- readonly totalTokens?: number;
21
- readonly usage: Record<string, number>;
22
- constructor({ threadPath, turnId, contextUsedTokens, contextTotalTokens, compactionMode, compactionThreshold, totalTokens, usage, }: {
23
- threadPath: string;
24
- turnId?: string;
25
- contextUsedTokens: number;
26
- contextTotalTokens?: number;
27
- compactionMode?: string;
28
- compactionThreshold?: number;
29
- totalTokens?: number;
30
- usage: Record<string, number>;
31
- });
32
- static fromMessage(message: AgentMessage): AgentUsageSnapshot | null;
33
- static fromPayload(payload: Record<string, unknown>): AgentUsageSnapshot | null;
16
+ export interface AgentThreadSuggestion {
17
+ label: string;
18
+ prompt?: string;
34
19
  }
35
- export declare function shouldReplaceAgentUsageSnapshot(current: AgentUsageSnapshot | null | undefined, next: AgentUsageSnapshot): boolean;
36
20
  export interface AgentThreadProps {
37
21
  room: RoomClient;
38
22
  path: string;
@@ -42,8 +26,24 @@ export interface AgentThreadProps {
42
26
  emptyStateTitle?: string;
43
27
  emptyStateDescription?: string;
44
28
  clientToolkits?: ClientToolkitDescription[];
29
+ chatFeedWidgets?: ChatFeedWidget[];
45
30
  toolChoice?: AgentToolChoice;
46
31
  collapseMessages?: boolean;
32
+ suggestions?: readonly AgentThreadSuggestion[];
33
+ enableFileUpload?: boolean;
34
+ persistedEvents?: readonly AgentMessageEvent[];
35
+ deferLiveEvents?: boolean;
36
+ loadThread?: boolean;
37
+ /**
38
+ * Delivers messages to the live agent session. This is not local UI hydration;
39
+ * callers must not use it to replay stored turn lifecycle commands.
40
+ */
41
+ injectPersistedEvents?: boolean;
42
+ composerDisabled?: boolean;
43
+ closeThreadOnUnmount?: boolean;
44
+ onPersistedEventsInjectionStarted?: () => void;
45
+ onPersistedEventsInjected?: (error: unknown | null) => void;
46
+ onEventsChanged?: (threadId: string, events: readonly AgentMessageEvent[], latestMessage: AgentMessage | null) => void;
47
47
  }
48
48
  export declare function formatAgentUsageTokenCount(value: number): string;
49
49
  export declare function formatAgentUsageFooter(usage: AgentUsageSnapshot): string;
@@ -84,4 +84,4 @@ export interface ChatThreadPreviewProps {
84
84
  className?: string;
85
85
  }
86
86
  export declare function ChatThreadPreview({ room, path, className }: ChatThreadPreviewProps): ReactElement;
87
- export declare function AgentThread({ room, path, chatClient, disposeChatClient, agentName, emptyStateTitle, emptyStateDescription, clientToolkits, toolChoice, collapseMessages, }: AgentThreadProps): ReactElement;
87
+ export declare function AgentThread({ room, path, chatClient, disposeChatClient, agentName, emptyStateTitle, emptyStateDescription, clientToolkits, chatFeedWidgets, collapseMessages, suggestions, enableFileUpload, persistedEvents, deferLiveEvents, loadThread, injectPersistedEvents, composerDisabled: composerDisabledProp, closeThreadOnUnmount, onPersistedEventsInjectionStarted, onPersistedEventsInjected, onEventsChanged, }: AgentThreadProps): ReactElement;