@tangle-network/sandbox-ui 0.3.7 → 0.3.10

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 (39) hide show
  1. package/dist/active-sessions-store-CeOmXgv5.d.ts +85 -0
  2. package/dist/artifact-pane-Bh45Ssco.d.ts +24 -0
  3. package/dist/{chat-container-B34uj-J1.d.ts → chat-container-Dn1jWtWo.d.ts} +15 -3
  4. package/dist/chat.d.ts +16 -4
  5. package/dist/chat.js +2 -2
  6. package/dist/{chunk-PXRPYAMM.js → chunk-6H3EFUUC.js} +96 -74
  7. package/dist/{chunk-WUR652Y3.js → chunk-72UEKFZ2.js} +113 -89
  8. package/dist/{chunk-5LV6DZZF.js → chunk-FOQTE67I.js} +278 -21
  9. package/dist/chunk-MGCVTFKB.js +10910 -0
  10. package/dist/chunk-OEX7NZE3.js +321 -0
  11. package/dist/chunk-Q56BYXQF.js +61 -0
  12. package/dist/{chunk-ZSNOGOUX.js → chunk-RQOX5JRR.js} +541 -76
  13. package/dist/{chunk-PDV7W4NY.js → chunk-SULQQJPB.js} +1 -56
  14. package/dist/chunk-W4LM3QYZ.js +54 -0
  15. package/dist/{chunk-JF6E2DS5.js → chunk-ZYGWTIWO.js} +171 -155
  16. package/dist/document-editor-pane-Bk-9MQmw.d.ts +116 -0
  17. package/dist/document-editor-pane-GRIQOJHB.js +11 -0
  18. package/dist/editor.d.ts +7 -84
  19. package/dist/editor.js +18 -699
  20. package/dist/{expanded-tool-detail-BDi_h_dZ.d.ts → expanded-tool-detail-DM5M_T9h.d.ts} +10 -2
  21. package/dist/{file-tabs-CmaoDVBI.d.ts → file-tabs-BLfxfmAH.d.ts} +1 -22
  22. package/dist/files.d.ts +25 -3
  23. package/dist/files.js +2 -1
  24. package/dist/hooks.d.ts +3 -1
  25. package/dist/hooks.js +6 -1
  26. package/dist/index.d.ts +12 -6
  27. package/dist/index.js +21 -8
  28. package/dist/pages.js +4 -2
  29. package/dist/primitives.js +4 -2
  30. package/dist/run.d.ts +1 -1
  31. package/dist/run.js +1 -1
  32. package/dist/sdk-hooks.d.ts +32 -1
  33. package/dist/sdk-hooks.js +6 -1
  34. package/dist/stores.d.ts +1 -0
  35. package/dist/stores.js +60 -1
  36. package/dist/types.d.ts +2 -0
  37. package/dist/workspace.d.ts +84 -6
  38. package/dist/workspace.js +10 -4
  39. package/package.json +17 -6
@@ -1,4 +1,5 @@
1
1
  import * as React from 'react';
2
+ import { ReactNode } from 'react';
2
3
  import * as react_jsx_runtime from 'react/jsx-runtime';
3
4
  import { R as Run } from './run-CtFZ6s-D.js';
4
5
  import { a as SessionPart, b as ToolPart, R as ReasoningPart } from './parts-CyGkM6Fp.js';
@@ -12,12 +13,18 @@ interface RunGroupProps {
12
13
  onToggle: () => void;
13
14
  branding?: AgentBranding;
14
15
  renderToolDetail?: CustomToolRenderer;
16
+ headerActions?: ReactNode;
17
+ renderToolActions?: (part: ToolPart, options: {
18
+ run: Run;
19
+ messageId: string;
20
+ partIndex: number;
21
+ }) => ReactNode;
15
22
  }
16
23
  /**
17
24
  * Collapsible container for a consecutive group of assistant messages (a "run").
18
25
  * Shows a summary header with stats and renders tool/thinking/text parts.
19
26
  */
20
- declare const RunGroup: React.MemoExoticComponent<({ run, partMap, collapsed, onToggle, branding, renderToolDetail, }: RunGroupProps) => react_jsx_runtime.JSX.Element | null>;
27
+ declare const RunGroup: React.MemoExoticComponent<({ run, partMap, collapsed, onToggle, branding, renderToolDetail, headerActions, renderToolActions, }: RunGroupProps) => react_jsx_runtime.JSX.Element | null>;
21
28
 
22
29
  interface InlineToolItemProps {
23
30
  part: ToolPart;
@@ -25,13 +32,14 @@ interface InlineToolItemProps {
25
32
  groupPosition?: "single" | "first" | "middle" | "last";
26
33
  className?: string;
27
34
  contentClassName?: string;
35
+ actions?: ReactNode;
28
36
  }
29
37
  /**
30
38
  * Compact single-line tool call display (32px height).
31
39
  * Shows icon, title, description, duration, and status indicator.
32
40
  * Expands on click to show ExpandedToolDetail.
33
41
  */
34
- declare const InlineToolItem: React.MemoExoticComponent<({ part, renderToolDetail, groupPosition, className, contentClassName, }: InlineToolItemProps) => react_jsx_runtime.JSX.Element>;
42
+ declare const InlineToolItem: React.MemoExoticComponent<({ part, renderToolDetail, groupPosition, className, contentClassName, actions, }: InlineToolItemProps) => react_jsx_runtime.JSX.Element>;
35
43
 
36
44
  interface InlineThinkingItemProps {
37
45
  part: ReasoningPart;
@@ -1,25 +1,4 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { ReactNode } from 'react';
3
-
4
- interface ArtifactPaneProps {
5
- eyebrow?: ReactNode;
6
- title: ReactNode;
7
- subtitle?: ReactNode;
8
- meta?: ReactNode;
9
- headerActions?: ReactNode;
10
- tabs?: ReactNode;
11
- toolbar?: ReactNode;
12
- footer?: ReactNode;
13
- emptyState?: ReactNode;
14
- children?: ReactNode;
15
- className?: string;
16
- contentClassName?: string;
17
- }
18
- /**
19
- * ArtifactPane — shared frame for files, previews, documents, inspectors, and
20
- * other artifact-like surfaces inside sandbox applications.
21
- */
22
- declare function ArtifactPane({ eyebrow, title, subtitle, meta, headerActions, tabs, toolbar, footer, emptyState, children, className, contentClassName, }: ArtifactPaneProps): react_jsx_runtime.JSX.Element;
23
2
 
24
3
  /**
25
4
  * FileTree — directory browser with file type icons.
@@ -69,4 +48,4 @@ interface FileTabsProps {
69
48
  }
70
49
  declare function FileTabs({ tabs, activeId, onSelect, onClose, className }: FileTabsProps): react_jsx_runtime.JSX.Element | null;
71
50
 
72
- export { ArtifactPane as A, type FileNode as F, type ArtifactPaneProps as a, type FileTabData as b, FileTabs as c, type FileTabsProps as d, FileTree as e, type FileTreeProps as f, type FileTreeVisibilityOptions as g, filterFileTree as h };
51
+ export { type FileNode as F, type FileTabData as a, FileTabs as b, type FileTabsProps as c, FileTree as d, type FileTreeProps as e, type FileTreeVisibilityOptions as f, filterFileTree as g };
package/dist/files.d.ts CHANGED
@@ -1,7 +1,11 @@
1
- import { b as FileTabData, a as ArtifactPaneProps } from './file-tabs-CmaoDVBI.js';
2
- export { F as FileNode, c as FileTabs, d as FileTabsProps, e as FileTree, f as FileTreeProps, g as FileTreeVisibilityOptions, h as filterFileTree } from './file-tabs-CmaoDVBI.js';
1
+ import { a as FileTabData } from './file-tabs-BLfxfmAH.js';
2
+ export { F as FileNode, b as FileTabs, c as FileTabsProps, d as FileTree, e as FileTreeProps, f as FileTreeVisibilityOptions, g as filterFileTree } from './file-tabs-BLfxfmAH.js';
3
3
  import * as react_jsx_runtime from 'react/jsx-runtime';
4
+ import { b as DocumentEditorMode, D as DocumentEditorBackend, d as DocumentEditorPaneCollaborationConfig } from './document-editor-pane-Bk-9MQmw.js';
5
+ import { A as ArtifactPaneProps } from './artifact-pane-Bh45Ssco.js';
4
6
  import 'react';
7
+ import '@hocuspocus/provider';
8
+ import 'yjs';
5
9
 
6
10
  /**
7
11
  * FilePreview — universal file renderer.
@@ -26,6 +30,23 @@ interface FilePreviewProps {
26
30
  }
27
31
  declare function FilePreview({ filename, content, blobUrl, mimeType, onClose, onDownload, hideHeader, className, }: FilePreviewProps): react_jsx_runtime.JSX.Element;
28
32
 
33
+ interface FileArtifactPaneEditorOptions {
34
+ enabled?: boolean;
35
+ mode?: DocumentEditorMode;
36
+ defaultMode?: DocumentEditorMode;
37
+ onModeChange?: (mode: DocumentEditorMode) => void;
38
+ backend?: DocumentEditorBackend;
39
+ collaboration?: DocumentEditorPaneCollaborationConfig;
40
+ placeholder?: string;
41
+ autoFocus?: boolean;
42
+ readOnly?: boolean;
43
+ saving?: boolean;
44
+ saveLabel?: string;
45
+ onChange?: (markdown: string) => void;
46
+ onSave?: (markdown: string) => Promise<void> | void;
47
+ previewClassName?: string;
48
+ editorClassName?: string;
49
+ }
29
50
  interface FileArtifactPaneProps extends Omit<FilePreviewProps, "className"> {
30
51
  path?: string;
31
52
  tabs?: FileTabData[];
@@ -37,11 +58,12 @@ interface FileArtifactPaneProps extends Omit<FilePreviewProps, "className"> {
37
58
  toolbar?: ArtifactPaneProps["toolbar"];
38
59
  footer?: ArtifactPaneProps["footer"];
39
60
  className?: string;
61
+ editor?: FileArtifactPaneEditorOptions;
40
62
  }
41
63
  /**
42
64
  * FileArtifactPane — opinionated artifact frame for file previews with tabs and
43
65
  * header actions.
44
66
  */
45
- declare function FileArtifactPane({ filename, content, blobUrl, mimeType, onClose, onDownload, path, tabs, activeTabId, onTabSelect, onTabClose, eyebrow, meta, toolbar, footer, className, }: FileArtifactPaneProps): react_jsx_runtime.JSX.Element;
67
+ declare function FileArtifactPane({ filename, content, blobUrl, mimeType, onClose, onDownload, path, tabs, activeTabId, onTabSelect, onTabClose, eyebrow, meta, toolbar, footer, className, editor, }: FileArtifactPaneProps): react_jsx_runtime.JSX.Element;
46
68
 
47
69
  export { FileArtifactPane, type FileArtifactPaneProps, FilePreview, type FilePreviewProps, FileTabData };
package/dist/files.js CHANGED
@@ -4,7 +4,8 @@ import {
4
4
  FileTabs,
5
5
  FileTree,
6
6
  filterFileTree
7
- } from "./chunk-JF6E2DS5.js";
7
+ } from "./chunk-ZYGWTIWO.js";
8
+ import "./chunk-W4LM3QYZ.js";
8
9
  import "./chunk-LTFK464G.js";
9
10
  import "./chunk-RQHJBTEU.js";
10
11
  export {
package/dist/hooks.d.ts CHANGED
@@ -1,10 +1,12 @@
1
1
  export { A as AuthUser, U as UseAuthOptions, a as UseAuthResult, b as UsePtySessionOptions, c as UsePtySessionReturn, d as createAuthFetcher, u as useApiKey, e as useAuth, f as usePtySession } from './use-pty-session-DeZSxOCN.js';
2
- export { AgentStreamEvent, AppendUserMessageOptions, ApplySdkEventOptions, AutomationStreamEvent, BeginAssistantMessageOptions, BotStreamEvent, CompleteAssistantMessageOptions, ConnectionState, SSEEvent, SdkSessionAttachment, SdkSessionEvent, SdkSessionSeed, SessionInfo, SidecarAuth, TaskStreamEvent, TerminalStreamEvent, UseRunGroupsOptions, UseSSEStreamOptions, UseSSEStreamResult, UseSdkSessionOptions, UseSdkSessionReturn, UseSessionStreamOptions, UseSessionStreamResult, UseSidecarAuthOptions, UseToolCallStreamReturn, useAutoScroll, useDropdownMenu, useRunCollapseState, useRunGroups, useSSEStream, useSdkSession, useSessionStream, useSidecarAuth, useToolCallStream } from './sdk-hooks.js';
2
+ export { AgentStreamEvent, AppendUserMessageOptions, ApplySdkEventOptions, AutomationStreamEvent, BeginAssistantMessageOptions, BotStreamEvent, CompleteAssistantMessageOptions, ConnectionState, RealtimeSessionOptions, RealtimeSessionRegistry, RealtimeSessionRegistryProps, RealtimeSessionState, RealtimeSessionTarget, SSEEvent, SdkSessionAttachment, SdkSessionEvent, SdkSessionSeed, SessionInfo, SidecarAuth, TaskStreamEvent, TerminalStreamEvent, UseRunGroupsOptions, UseSSEStreamOptions, UseSSEStreamResult, UseSdkSessionOptions, UseSdkSessionReturn, UseSessionStreamOptions, UseSessionStreamResult, UseSidecarAuthOptions, UseToolCallStreamReturn, useAutoScroll, useDropdownMenu, useRealtimeSession, useRunCollapseState, useRunGroups, useSSEStream, useSdkSession, useSessionStream, useSidecarAuth, useToolCallStream } from './sdk-hooks.js';
3
3
  import * as _tanstack_react_query from '@tanstack/react-query';
4
4
  import { S as Session } from './sidecar-CFU2W9j1.js';
5
5
  import 'react';
6
6
  import './run-CtFZ6s-D.js';
7
7
  import './parts-CyGkM6Fp.js';
8
+ import './active-sessions-store-CeOmXgv5.js';
9
+ import 'nanostores';
8
10
  import './tool-call-feed-D5Ume-Pt.js';
9
11
  import 'react/jsx-runtime';
10
12
 
package/dist/hooks.js CHANGED
@@ -7,14 +7,17 @@ import {
7
7
  usePtySession
8
8
  } from "./chunk-GRYHFH5O.js";
9
9
  import {
10
+ RealtimeSessionRegistry,
10
11
  useDropdownMenu,
12
+ useRealtimeSession,
11
13
  useSSEStream,
12
14
  useSdkSession,
13
15
  useSessionStream,
14
16
  useSidecarAuth,
15
17
  useToolCallStream
16
- } from "./chunk-5LV6DZZF.js";
18
+ } from "./chunk-FOQTE67I.js";
17
19
  import "./chunk-CCKNIAS7.js";
20
+ import "./chunk-OEX7NZE3.js";
18
21
  import {
19
22
  useAutoScroll,
20
23
  useRunCollapseState,
@@ -92,6 +95,7 @@ function useRenameSession(apiUrl, token) {
92
95
  });
93
96
  }
94
97
  export {
98
+ RealtimeSessionRegistry,
95
99
  createAuthFetcher,
96
100
  useApiKey,
97
101
  useAuth,
@@ -100,6 +104,7 @@ export {
100
104
  useDeleteSession,
101
105
  useDropdownMenu,
102
106
  usePtySession,
107
+ useRealtimeSession,
103
108
  useRenameSession,
104
109
  useRunCollapseState,
105
110
  useRunGroups,
package/dist/index.d.ts CHANGED
@@ -3,26 +3,28 @@ export { Avatar, AvatarFallback, AvatarImage, Badge, BadgeProps, Card, CardConte
3
3
  import * as react_jsx_runtime from 'react/jsx-runtime';
4
4
  import * as React from 'react';
5
5
  import React__default from 'react';
6
- export { AgentWorkbench, AuditCheck, AuditResults, AuditResultsProps, BannerType, ContextBadge, DirectoryPane, DirectoryPaneProps, FormAudit, RuntimePane, RuntimePaneProps, SandboxWorkbench, SandboxWorkbenchArtifact, SandboxWorkbenchCustomArtifact, SandboxWorkbenchFileArtifact, SandboxWorkbenchLayoutOptions, SandboxWorkbenchMarkdownArtifact, SandboxWorkbenchOpenUIArtifact, SandboxWorkbenchProps, SandboxWorkbenchSessionProps, StatusBanner, StatusBannerProps, StatusBar, StatusBarProps, TerminalLine, TerminalPanel, TerminalProps, WorkspaceLayout, WorkspaceLayoutProps } from './workspace.js';
7
- export { A as ArtifactPane, a as ArtifactPaneProps, F as FileNode, b as FileTabData, c as FileTabs, d as FileTabsProps, e as FileTree, f as FileTreeProps, g as FileTreeVisibilityOptions, h as filterFileTree } from './file-tabs-CmaoDVBI.js';
6
+ export { AgentWorkbench, AuditCheck, AuditResults, AuditResultsProps, BannerType, ContextBadge, DirectoryPane, DirectoryPaneProps, FormAudit, RuntimePane, RuntimePaneProps, SandboxWorkbench, SandboxWorkbenchArtifact, SandboxWorkbenchCustomArtifact, SandboxWorkbenchFileArtifact, SandboxWorkbenchLayoutOptions, SandboxWorkbenchMarkdownArtifact, SandboxWorkbenchOpenUIArtifact, SandboxWorkbenchProps, SandboxWorkbenchSessionProps, SessionActivityMonitor, SessionActivityMonitorProps, SessionSidebar, SessionSidebarBadge, SessionSidebarFilter, SessionSidebarItem, SessionSidebarLink, SessionSidebarProps, StatusBanner, StatusBannerProps, StatusBar, StatusBarProps, TerminalLine, TerminalPanel, TerminalProps, WorkspaceLayout, WorkspaceLayoutProps } from './workspace.js';
7
+ export { a as ArtifactPane, A as ArtifactPaneProps } from './artifact-pane-Bh45Ssco.js';
8
8
  export { OpenUIAction, OpenUIActionsNode, OpenUIArtifactRenderer, OpenUIArtifactRendererProps, OpenUIBadgeNode, OpenUICardNode, OpenUICodeNode, OpenUIComponentNode, OpenUIGridNode, OpenUIHeadingNode, OpenUIKeyValueNode, OpenUIMarkdownNode, OpenUIPrimitive, OpenUISeparatorNode, OpenUIStackNode, OpenUIStatNode, OpenUITableNode, OpenUITextNode } from './openui.js';
9
- export { AgentTimeline, AgentTimelineArtifactItem, AgentTimelineCustomItem, AgentTimelineItem, AgentTimelineMessageItem, AgentTimelineProps, AgentTimelineStatusItem, AgentTimelineTone, AgentTimelineToolGroupItem, AgentTimelineToolItem, ChatMessage, ChatMessageProps, MessageList, MessageRole, ThinkingIndicator, ThinkingIndicatorProps, UserMessage } from './chat.js';
10
- export { C as ChatContainer, a as ChatInput, b as ChatInputProps, P as PendingFile } from './chat-container-B34uj-J1.js';
9
+ export { AgentTimeline, AgentTimelineArtifactItem, AgentTimelineCustomItem, AgentTimelineItem, AgentTimelineMessageItem, AgentTimelineProps, AgentTimelineStatusItem, AgentTimelineTone, AgentTimelineToolGroupItem, AgentTimelineToolItem, ChatMessage, ChatMessageProps, MessageList, MessageListProps, MessageRole, ThinkingIndicator, ThinkingIndicatorProps, UserMessage, UserMessageProps } from './chat.js';
10
+ export { C as ChatContainer, a as ChatContainerProps, b as ChatInput, c as ChatInputProps, P as PendingFile } from './chat-container-Dn1jWtWo.js';
11
11
  export { F as FeedSegment, T as ToolCallData, a as ToolCallFeed, b as ToolCallFeedProps, c as ToolCallGroup, d as ToolCallGroupProps, e as ToolCallStatus, f as ToolCallStep, g as ToolCallStepProps, h as ToolCallType, p as parseToolEvent } from './tool-call-feed-D5Ume-Pt.js';
12
- export { E as ExpandedToolDetail, I as InlineThinkingItem, c as InlineToolItem, R as RunGroup } from './expanded-tool-detail-BDi_h_dZ.js';
12
+ export { E as ExpandedToolDetail, I as InlineThinkingItem, c as InlineToolItem, R as RunGroup, e as RunGroupProps } from './expanded-tool-detail-DM5M_T9h.js';
13
13
  import { b as ToolPart } from './parts-CyGkM6Fp.js';
14
14
  export { R as ReasoningPart, S as SessionMessage, a as SessionPart, T as TextPart, c as ToolState, d as ToolStatus, e as ToolTime } from './parts-CyGkM6Fp.js';
15
+ export { F as FileNode, a as FileTabData, b as FileTabs, c as FileTabsProps, d as FileTree, e as FileTreeProps, f as FileTreeVisibilityOptions, g as filterFileTree } from './file-tabs-BLfxfmAH.js';
15
16
  export { FileArtifactPane, FileArtifactPaneProps, FilePreview, FilePreviewProps } from './files.js';
16
17
  export { A as AppSidebar, a as AppSidebarProps, B as Backend, b as BackendSelector, c as BackendSelectorProps, C as ClusterStatusBar, d as ClusterStatusBarProps, e as ClusterStatusItem, f as CreditBalance, g as CreditBalanceProps, D as DashboardLayout, h as DashboardLayoutProps, i as DashboardUser, I as Invoice, j as InvoiceTable, k as InvoiceTableProps, N as NavItem, l as NewSandboxCard, m as NewSandboxCardProps, P as PlanCardData, n as PlanCards, o as PlanCardsProps, p as ProfileComparison, q as ProfileComparisonProps, r as ProfileSelector, s as ProfileSelectorProps, R as ResourceMeter, t as ResourceMeterProps, S as SandboxCard, u as SandboxCardData, v as SandboxCardProps, w as SandboxStatus, x as SandboxTable, y as SandboxTableProps, z as SidebarNavItem, E as SidebarSandbox, T as TopNavLink, V as VariantList, F as VariantListProps } from './index-BJIPTCKk.js';
17
18
  export { c as BillingDashboard, d as BillingDashboardProps, e as PricingCards, f as PricingPageProps, g as UsageChart, h as UsageChartProps, U as UsageDataPoint } from './usage-chart-CY9xo3KX.js';
18
19
  export { AuthHeader, GitHubLoginButton, LoginLayout, LoginLayoutProps, UserMenu } from './auth.js';
19
20
  export { CodeBlock, CopyButton, Markdown, MarkdownProps } from './markdown.js';
20
- export { AppendUserMessageOptions, ApplySdkEventOptions, BeginAssistantMessageOptions, CompleteAssistantMessageOptions, SdkSessionAttachment, SdkSessionEvent, SdkSessionSeed, UseSdkSessionOptions, UseSdkSessionReturn, UseToolCallStreamReturn, useAutoScroll, useDropdownMenu, useRunCollapseState, useRunGroups, useSSEStream, useSdkSession, useSessionStream, useSidecarAuth, useToolCallStream } from './sdk-hooks.js';
21
+ export { AppendUserMessageOptions, ApplySdkEventOptions, BeginAssistantMessageOptions, CompleteAssistantMessageOptions, RealtimeSessionOptions, RealtimeSessionRegistry, RealtimeSessionRegistryProps, RealtimeSessionState, RealtimeSessionTarget, SdkSessionAttachment, SdkSessionEvent, SdkSessionSeed, UseSdkSessionOptions, UseSdkSessionReturn, UseToolCallStreamReturn, useAutoScroll, useDropdownMenu, useRealtimeSession, useRunCollapseState, useRunGroups, useSSEStream, useSdkSession, useSessionStream, useSidecarAuth, useToolCallStream } from './sdk-hooks.js';
21
22
  export { d as createAuthFetcher, u as useApiKey, e as useAuth, f as usePtySession } from './use-pty-session-DeZSxOCN.js';
22
23
  export { G as GroupedMessage, R as Run, b as RunStats, T as ToolCategory } from './run-CtFZ6s-D.js';
23
24
  export { S as Session } from './sidecar-CFU2W9j1.js';
24
25
  export { C as CustomToolRenderer, D as DisplayVariant, T as ToolDisplayMetadata } from './tool-display-Ct9nFAzJ.js';
25
26
  export { A as AgentBranding } from './branding-DCi5VEik.js';
27
+ export { A as ActiveProjectActivity, a as ActiveSessionActivityOptions, b as ActiveSessionConnectionOptions, c as ActiveSessionConnectionState, d as ActiveSessionReconnectState, e as ActiveSessionRecord, f as ActiveSessionStatus, g as ActiveSessionTransportMode, h as ActiveSessionsState, R as RegisterActiveSessionOptions, S as SessionProjectKey } from './active-sessions-store-CeOmXgv5.js';
26
28
  export { TOOL_CATEGORY_ICONS, cn, copyText, formatDuration, getToolCategory, getToolDisplayMetadata, getToolErrorText, timeAgo, truncateText } from './utils.js';
27
29
  import 'class-variance-authority/types';
28
30
  import '@radix-ui/react-dialog';
@@ -33,6 +35,10 @@ import '@radix-ui/react-tabs';
33
35
  import '@radix-ui/react-progress';
34
36
  import '@radix-ui/react-switch';
35
37
  import '@radix-ui/react-label';
38
+ import './document-editor-pane-Bk-9MQmw.js';
39
+ import '@hocuspocus/provider';
40
+ import 'yjs';
41
+ import 'nanostores';
36
42
  import 'clsx';
37
43
 
38
44
  type Theme = "light" | "dark" | "system";
package/dist/index.js CHANGED
@@ -17,13 +17,15 @@ import {
17
17
  usePtySession
18
18
  } from "./chunk-GRYHFH5O.js";
19
19
  import {
20
+ RealtimeSessionRegistry,
20
21
  useDropdownMenu,
22
+ useRealtimeSession,
21
23
  useSSEStream,
22
24
  useSdkSession,
23
25
  useSessionStream,
24
26
  useSidecarAuth,
25
27
  useToolCallStream
26
- } from "./chunk-5LV6DZZF.js";
28
+ } from "./chunk-FOQTE67I.js";
27
29
  import {
28
30
  DropZone,
29
31
  Label,
@@ -63,12 +65,14 @@ import {
63
65
  DialogOverlay,
64
66
  DialogPortal,
65
67
  DialogTitle,
66
- DialogTrigger,
68
+ DialogTrigger
69
+ } from "./chunk-SULQQJPB.js";
70
+ import {
67
71
  Tabs,
68
72
  TabsContent,
69
73
  TabsList,
70
74
  TabsTrigger
71
- } from "./chunk-PDV7W4NY.js";
75
+ } from "./chunk-Q56BYXQF.js";
72
76
  import {
73
77
  ToolCallFeed,
74
78
  parseToolEvent
@@ -79,11 +83,14 @@ import {
79
83
  DirectoryPane,
80
84
  RuntimePane,
81
85
  SandboxWorkbench,
86
+ SessionActivityMonitor,
87
+ SessionSidebar,
82
88
  StatusBanner,
83
89
  StatusBar,
84
90
  TerminalPanel,
85
91
  WorkspaceLayout
86
- } from "./chunk-ZSNOGOUX.js";
92
+ } from "./chunk-RQOX5JRR.js";
93
+ import "./chunk-OEX7NZE3.js";
87
94
  import {
88
95
  EmptyState,
89
96
  Input,
@@ -97,7 +104,7 @@ import {
97
104
  MessageList,
98
105
  ThinkingIndicator,
99
106
  UserMessage
100
- } from "./chunk-PXRPYAMM.js";
107
+ } from "./chunk-6H3EFUUC.js";
101
108
  import {
102
109
  useAutoScroll,
103
110
  useRunCollapseState,
@@ -115,7 +122,7 @@ import {
115
122
  RunGroup,
116
123
  WebSearchPreview,
117
124
  WriteFilePreview
118
- } from "./chunk-WUR652Y3.js";
125
+ } from "./chunk-72UEKFZ2.js";
119
126
  import {
120
127
  formatDuration,
121
128
  truncateText
@@ -146,13 +153,15 @@ import {
146
153
  TableRow
147
154
  } from "./chunk-TQN3VR4F.js";
148
155
  import {
149
- ArtifactPane,
150
156
  FileArtifactPane,
151
157
  FilePreview,
152
158
  FileTabs,
153
159
  FileTree,
154
160
  filterFileTree
155
- } from "./chunk-JF6E2DS5.js";
161
+ } from "./chunk-ZYGWTIWO.js";
162
+ import {
163
+ ArtifactPane
164
+ } from "./chunk-W4LM3QYZ.js";
156
165
  import {
157
166
  CodeBlock as CodeBlock2,
158
167
  CopyButton,
@@ -393,6 +402,7 @@ export {
393
402
  ProfileSelector,
394
403
  Progress,
395
404
  QuestionPreview,
405
+ RealtimeSessionRegistry,
396
406
  ResourceMeter,
397
407
  RunGroup,
398
408
  RuntimePane,
@@ -409,6 +419,8 @@ export {
409
419
  SelectSeparator,
410
420
  SelectTrigger,
411
421
  SelectValue,
422
+ SessionActivityMonitor,
423
+ SessionSidebar,
412
424
  Skeleton,
413
425
  SkeletonCard,
414
426
  SkeletonTable,
@@ -469,6 +481,7 @@ export {
469
481
  useAutoScroll,
470
482
  useDropdownMenu,
471
483
  usePtySession,
484
+ useRealtimeSession,
472
485
  useRunCollapseState,
473
486
  useRunGroups,
474
487
  useSSEStream,
package/dist/pages.js CHANGED
@@ -4,12 +4,14 @@ import {
4
4
  DialogDescription,
5
5
  DialogFooter,
6
6
  DialogHeader,
7
- DialogTitle,
7
+ DialogTitle
8
+ } from "./chunk-SULQQJPB.js";
9
+ import {
8
10
  Tabs,
9
11
  TabsContent,
10
12
  TabsList,
11
13
  TabsTrigger
12
- } from "./chunk-PDV7W4NY.js";
14
+ } from "./chunk-Q56BYXQF.js";
13
15
  import {
14
16
  EmptyState,
15
17
  Input
@@ -37,12 +37,14 @@ import {
37
37
  DialogOverlay,
38
38
  DialogPortal,
39
39
  DialogTitle,
40
- DialogTrigger,
40
+ DialogTrigger
41
+ } from "./chunk-SULQQJPB.js";
42
+ import {
41
43
  Tabs,
42
44
  TabsContent,
43
45
  TabsList,
44
46
  TabsTrigger
45
- } from "./chunk-PDV7W4NY.js";
47
+ } from "./chunk-Q56BYXQF.js";
46
48
  import {
47
49
  EmptyState,
48
50
  Input,
package/dist/run.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export { E as ExpandedToolDetail, a as ExpandedToolDetailProps, I as InlineThinkingItem, b as InlineThinkingItemProps, c as InlineToolItem, d as InlineToolItemProps, R as RunGroup, e as RunGroupProps } from './expanded-tool-detail-BDi_h_dZ.js';
1
+ export { E as ExpandedToolDetail, a as ExpandedToolDetailProps, I as InlineThinkingItem, b as InlineThinkingItemProps, c as InlineToolItem, d as InlineToolItemProps, R as RunGroup, e as RunGroupProps } from './expanded-tool-detail-DM5M_T9h.js';
2
2
  import * as react_jsx_runtime from 'react/jsx-runtime';
3
3
  export { F as FeedSegment, T as ToolCallData, a as ToolCallFeed, b as ToolCallFeedProps, c as ToolCallGroup, d as ToolCallGroupProps, e as ToolCallStatus, f as ToolCallStep, g as ToolCallStepProps, h as ToolCallType, p as parseToolEvent } from './tool-call-feed-D5Ume-Pt.js';
4
4
  import 'react';
package/dist/run.js CHANGED
@@ -8,7 +8,7 @@ import {
8
8
  InlineToolItem,
9
9
  LiveDuration,
10
10
  RunGroup
11
- } from "./chunk-WUR652Y3.js";
11
+ } from "./chunk-72UEKFZ2.js";
12
12
  import "./chunk-HRMUF35V.js";
13
13
  import {
14
14
  ToolCallGroup,
@@ -2,7 +2,9 @@ import * as React from 'react';
2
2
  import { RefObject } from 'react';
3
3
  import { G as GroupedMessage, R as Run } from './run-CtFZ6s-D.js';
4
4
  import { S as SessionMessage, a as SessionPart } from './parts-CyGkM6Fp.js';
5
+ import { R as RegisterActiveSessionOptions, g as ActiveSessionTransportMode, c as ActiveSessionConnectionState } from './active-sessions-store-CeOmXgv5.js';
5
6
  import { F as FeedSegment } from './tool-call-feed-D5Ume-Pt.js';
7
+ import 'nanostores';
6
8
  import 'react/jsx-runtime';
7
9
 
8
10
  /**
@@ -212,6 +214,35 @@ interface UseSdkSessionReturn {
212
214
  }
213
215
  declare function useSdkSession({ initialMessages, }?: UseSdkSessionOptions): UseSdkSessionReturn;
214
216
 
217
+ interface RealtimeSessionOptions extends RegisterActiveSessionOptions {
218
+ connectUrl?: string | null;
219
+ enabled?: boolean;
220
+ foreground?: boolean;
221
+ keepRegistered?: boolean;
222
+ reconnect?: boolean;
223
+ reconnectIntervalMs?: number;
224
+ maxReconnectAttempts?: number;
225
+ transportMode?: ActiveSessionTransportMode;
226
+ onEvent?: (event: SdkSessionEvent) => void;
227
+ onOpen?: () => void;
228
+ onClose?: () => void;
229
+ onError?: (error: Error) => void;
230
+ }
231
+ interface RealtimeSessionState {
232
+ connectionState: ActiveSessionConnectionState;
233
+ lastError: string | null;
234
+ reconnectAttempts: number;
235
+ isConnected: boolean;
236
+ }
237
+ interface RealtimeSessionTarget extends RealtimeSessionOptions {
238
+ key?: string;
239
+ }
240
+ interface RealtimeSessionRegistryProps {
241
+ sessions: RealtimeSessionTarget[];
242
+ }
243
+ declare function useRealtimeSession({ sessionId, projectId, projectLabel, title, href, metadata, connectUrl, enabled, foreground, keepRegistered, reconnect, reconnectIntervalMs, maxReconnectAttempts, transportMode, onEvent, onOpen, onClose, onError, }: RealtimeSessionOptions): RealtimeSessionState;
244
+ declare function RealtimeSessionRegistry({ sessions }: RealtimeSessionRegistryProps): React.FunctionComponentElement<RealtimeSessionTarget>[];
245
+
215
246
  interface UseRunGroupsOptions {
216
247
  messages: SessionMessage[];
217
248
  partMap: Record<string, SessionPart[]>;
@@ -325,4 +356,4 @@ interface SidecarAuth {
325
356
  */
326
357
  declare function useSidecarAuth({ resourceId, apiUrl, signMessage }: UseSidecarAuthOptions): SidecarAuth;
327
358
 
328
- export { type AgentStreamEvent, type AppendUserMessageOptions, type ApplySdkEventOptions, type AutomationStreamEvent, type BeginAssistantMessageOptions, type BotStreamEvent, type CompleteAssistantMessageOptions, type ConnectionState, type SSEEvent, type SdkSessionAttachment, type SdkSessionEvent, type SdkSessionSeed, type SessionInfo, type SidecarAuth, type TaskStreamEvent, type TerminalStreamEvent, type UseRunGroupsOptions, type UseSSEStreamOptions, type UseSSEStreamResult, type UseSdkSessionOptions, type UseSdkSessionReturn, type UseSessionStreamOptions, type UseSessionStreamResult, type UseSidecarAuthOptions, type UseToolCallStreamReturn, useAutoScroll, useDropdownMenu, useRunCollapseState, useRunGroups, useSSEStream, useSdkSession, useSessionStream, useSidecarAuth, useToolCallStream };
359
+ export { type AgentStreamEvent, type AppendUserMessageOptions, type ApplySdkEventOptions, type AutomationStreamEvent, type BeginAssistantMessageOptions, type BotStreamEvent, type CompleteAssistantMessageOptions, type ConnectionState, type RealtimeSessionOptions, RealtimeSessionRegistry, type RealtimeSessionRegistryProps, type RealtimeSessionState, type RealtimeSessionTarget, type SSEEvent, type SdkSessionAttachment, type SdkSessionEvent, type SdkSessionSeed, type SessionInfo, type SidecarAuth, type TaskStreamEvent, type TerminalStreamEvent, type UseRunGroupsOptions, type UseSSEStreamOptions, type UseSSEStreamResult, type UseSdkSessionOptions, type UseSdkSessionReturn, type UseSessionStreamOptions, type UseSessionStreamResult, type UseSidecarAuthOptions, type UseToolCallStreamReturn, useAutoScroll, useDropdownMenu, useRealtimeSession, useRunCollapseState, useRunGroups, useSSEStream, useSdkSession, useSessionStream, useSidecarAuth, useToolCallStream };
package/dist/sdk-hooks.js CHANGED
@@ -1,12 +1,15 @@
1
1
  import {
2
+ RealtimeSessionRegistry,
2
3
  useDropdownMenu,
4
+ useRealtimeSession,
3
5
  useSSEStream,
4
6
  useSdkSession,
5
7
  useSessionStream,
6
8
  useSidecarAuth,
7
9
  useToolCallStream
8
- } from "./chunk-5LV6DZZF.js";
10
+ } from "./chunk-FOQTE67I.js";
9
11
  import "./chunk-CCKNIAS7.js";
12
+ import "./chunk-OEX7NZE3.js";
10
13
  import {
11
14
  useAutoScroll,
12
15
  useRunCollapseState,
@@ -17,8 +20,10 @@ import "./chunk-BX6AQMUS.js";
17
20
  import "./chunk-LTFK464G.js";
18
21
  import "./chunk-RQHJBTEU.js";
19
22
  export {
23
+ RealtimeSessionRegistry,
20
24
  useAutoScroll,
21
25
  useDropdownMenu,
26
+ useRealtimeSession,
22
27
  useRunCollapseState,
23
28
  useRunGroups,
24
29
  useSSEStream,
package/dist/stores.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  import * as nanostores from 'nanostores';
2
+ export { A as ActiveProjectActivity, a as ActiveSessionActivityOptions, b as ActiveSessionConnectionOptions, c as ActiveSessionConnectionState, d as ActiveSessionReconnectState, e as ActiveSessionRecord, f as ActiveSessionStatus, g as ActiveSessionTransportMode, h as ActiveSessionsState, R as RegisterActiveSessionOptions, S as SessionProjectKey, i as activeSessionsAtom, j as bumpActiveSessionActivity, k as getActiveSession, l as getAllActiveSessions, m as getAllProjectActivity, n as getSessionsByActivity, o as getSessionsForNavbar, p as getSessionsForProject, q as getTotalRunningSessionCount, r as hasBackgroundRunningSessions, s as registerActiveSession, t as resetActiveSessions, u as setActiveSessionAttention, v as setActiveSessionConnection, w as setActiveSessionError, x as setActiveSessionRunning, y as setForegroundActiveSession, z as unregisterActiveSession, B as updateActiveSessionMeta, C as useActiveSession, D as useActiveSessions, E as useActiveSessionsState, F as useHasBackgroundRunningSessions, G as useNavbarSessions, H as useProjectActivity, I as useProjectSessions, J as useSessionsByActivity, K as useTotalRunningSessions } from './active-sessions-store-CeOmXgv5.js';
2
3
  import { S as SessionMessage, a as SessionPart } from './parts-CyGkM6Fp.js';
3
4
 
4
5
  interface ChatSession {
package/dist/stores.js CHANGED
@@ -1,3 +1,34 @@
1
+ import {
2
+ activeSessionsAtom,
3
+ bumpActiveSessionActivity,
4
+ getActiveSession,
5
+ getAllActiveSessions,
6
+ getAllProjectActivity,
7
+ getSessionsByActivity,
8
+ getSessionsForNavbar,
9
+ getSessionsForProject,
10
+ getTotalRunningSessionCount,
11
+ hasBackgroundRunningSessions,
12
+ registerActiveSession,
13
+ resetActiveSessions,
14
+ setActiveSessionAttention,
15
+ setActiveSessionConnection,
16
+ setActiveSessionError,
17
+ setActiveSessionRunning,
18
+ setForegroundActiveSession,
19
+ unregisterActiveSession,
20
+ updateActiveSessionMeta,
21
+ useActiveSession,
22
+ useActiveSessions,
23
+ useActiveSessionsState,
24
+ useHasBackgroundRunningSessions,
25
+ useNavbarSessions,
26
+ useProjectActivity,
27
+ useProjectSessions,
28
+ useSessionsByActivity,
29
+ useTotalRunningSessions
30
+ } from "./chunk-OEX7NZE3.js";
31
+
1
32
  // src/stores/session-store.ts
2
33
  import { atom } from "nanostores";
3
34
  var sessionAtom = atom(null);
@@ -36,14 +67,42 @@ function clearChat() {
36
67
  insertionCounter = 0;
37
68
  }
38
69
  export {
70
+ activeSessionsAtom,
39
71
  addMessage,
40
72
  addParts,
73
+ bumpActiveSessionActivity,
41
74
  clearChat,
42
75
  connectSession,
43
76
  disconnectSession,
77
+ getActiveSession,
78
+ getAllActiveSessions,
79
+ getAllProjectActivity,
80
+ getSessionsByActivity,
81
+ getSessionsForNavbar,
82
+ getSessionsForProject,
83
+ getTotalRunningSessionCount,
84
+ hasBackgroundRunningSessions,
44
85
  isStreamingAtom,
45
86
  messagesAtom,
46
87
  partMapAtom,
88
+ registerActiveSession,
89
+ resetActiveSessions,
47
90
  sessionAtom,
48
- updatePart
91
+ setActiveSessionAttention,
92
+ setActiveSessionConnection,
93
+ setActiveSessionError,
94
+ setActiveSessionRunning,
95
+ setForegroundActiveSession,
96
+ unregisterActiveSession,
97
+ updateActiveSessionMeta,
98
+ updatePart,
99
+ useActiveSession,
100
+ useActiveSessions,
101
+ useActiveSessionsState,
102
+ useHasBackgroundRunningSessions,
103
+ useNavbarSessions,
104
+ useProjectActivity,
105
+ useProjectSessions,
106
+ useSessionsByActivity,
107
+ useTotalRunningSessions
49
108
  };
package/dist/types.d.ts CHANGED
@@ -3,4 +3,6 @@ export { F as FinalTextPart, G as GroupedMessage, M as MessageRun, a as MessageU
3
3
  export { S as Session } from './sidecar-CFU2W9j1.js';
4
4
  export { C as CustomToolRenderer, D as DisplayVariant, T as ToolDisplayMetadata } from './tool-display-Ct9nFAzJ.js';
5
5
  export { A as AgentBranding } from './branding-DCi5VEik.js';
6
+ export { A as ActiveProjectActivity, a as ActiveSessionActivityOptions, b as ActiveSessionConnectionOptions, c as ActiveSessionConnectionState, d as ActiveSessionReconnectState, e as ActiveSessionRecord, f as ActiveSessionStatus, g as ActiveSessionTransportMode, h as ActiveSessionsState, R as RegisterActiveSessionOptions, S as SessionProjectKey } from './active-sessions-store-CeOmXgv5.js';
6
7
  import 'react';
8
+ import 'nanostores';