@invergent/agent-chat-react 2.6.0 → 2.6.2
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/{artifact-chart-X53FKRDZ.js → artifact-chart-62C2XKHA.js} +3 -3
- package/dist/{artifact-chart-X53FKRDZ.js.map → artifact-chart-62C2XKHA.js.map} +1 -1
- package/dist/chunk-47MF6JUW.js +13 -0
- package/dist/chunk-47MF6JUW.js.map +1 -0
- package/dist/index.cjs +157 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +38 -1
- package/dist/index.d.ts +38 -1
- package/dist/index.js +157 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-QSC4UIVT.js +0 -11
- package/dist/chunk-QSC4UIVT.js.map +0 -1
package/dist/index.d.cts
CHANGED
|
@@ -890,6 +890,43 @@ interface UseAgentChatRuntimeInput {
|
|
|
890
890
|
}
|
|
891
891
|
declare function useAgentChatRuntime({ adapter, agentId, sessionId, onSessionChange, }: UseAgentChatRuntimeInput): AgentChatRuntimeApi;
|
|
892
892
|
|
|
893
|
+
interface FetchSseEventStreamOptions {
|
|
894
|
+
/** Fetch implementation — pass the app's authenticated fetch wrapper. */
|
|
895
|
+
fetchFn?: (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>;
|
|
896
|
+
}
|
|
897
|
+
/**
|
|
898
|
+
* SSE-over-fetch event stream with silent-drop detection.
|
|
899
|
+
*
|
|
900
|
+
* Structurally compatible with ``AgentChatEventStream`` (and the inbox
|
|
901
|
+
* stream contract): ``addEventListener``/``close``/``onerror``. Every
|
|
902
|
+
* failure mode — bad response, mid-stream error, clean server close,
|
|
903
|
+
* and watchdog-detected silent stall — funnels through a once-only
|
|
904
|
+
* guard, so consumers can treat ``onerror`` as "reconnect now" without
|
|
905
|
+
* risking a leaked second stream from double-firing.
|
|
906
|
+
*/
|
|
907
|
+
declare class FetchSseEventStream {
|
|
908
|
+
private readonly abort;
|
|
909
|
+
private readonly decoder;
|
|
910
|
+
private readonly listeners;
|
|
911
|
+
private buffer;
|
|
912
|
+
private eventType;
|
|
913
|
+
private eventId;
|
|
914
|
+
private dataLines;
|
|
915
|
+
private readonly url;
|
|
916
|
+
private readonly fetchFn;
|
|
917
|
+
private readonly watchdog;
|
|
918
|
+
private errored;
|
|
919
|
+
onerror: (() => void) | null;
|
|
920
|
+
constructor(url: string, options?: FetchSseEventStreamOptions);
|
|
921
|
+
addEventListener(type: string, listener: (event: AgentChatSseMessageEvent) => void): void;
|
|
922
|
+
close(): void;
|
|
923
|
+
private fail;
|
|
924
|
+
private start;
|
|
925
|
+
private feed;
|
|
926
|
+
private processLine;
|
|
927
|
+
private flushEvent;
|
|
928
|
+
}
|
|
929
|
+
|
|
893
930
|
type MessageResponseProps = ComponentProps<typeof Streamdown>;
|
|
894
931
|
declare const MessageResponse: React.MemoExoticComponent<({ className, ...props }: MessageResponseProps) => react_jsx_runtime.JSX.Element>;
|
|
895
932
|
|
|
@@ -1138,4 +1175,4 @@ interface SessionTreePanelProps {
|
|
|
1138
1175
|
}
|
|
1139
1176
|
declare function SessionTreePanel({ adapter, sessionId, activeSessionId, agentId, title, sessionListLimit, hideRoot, hideHeader, loadList, onSessionSelect, onSessionDelete, }: SessionTreePanelProps): react_jsx_runtime.JSX.Element | null;
|
|
1140
1177
|
|
|
1141
|
-
export { ACTIVE_MISSION_STATUSES, AgentChat, type AgentChatAdapter, type AgentChatAdapterContextValue, AgentChatAdapterProvider, type AgentChatArtifactKind, type AgentChatArtifactMeta, type AgentChatArtifactPayload, type AgentChatAskUserQuestionAnswer, type AgentChatAskUserQuestionArgs, type AgentChatAskUserQuestionChoice, type AgentChatAskUserQuestionQuestion, type AgentChatAttachment, type AgentChatChartArtifactSpec, type AgentChatDisplayAttachment, type AgentChatErrorCategory, type AgentChatErrorInfo, type AgentChatEventStream, type AgentChatEventType, type AgentChatExpertFeedbackRating, type AgentChatHtmlArtifactSpec, type AgentChatImageAttachment, type AgentChatInboxEventStream, type AgentChatInboxItem, type AgentChatInboxKind, type AgentChatInboxList, type AgentChatInboxListInput, type AgentChatInboxStatus, type AgentChatInboxStreamEvent, type AgentChatMarkdownArtifactSpec, type AgentChatMessage, type AgentChatMessageStatus, type AgentChatMissionEvent, type AgentChatMissionEventSession, type AgentChatMissionEventsPage, type AgentChatMissionList, type AgentChatMissionStatus, type AgentChatMissionSummary, type AgentChatMissionTask, type AgentChatMissionWorker, type AgentChatPendingAttachment, type AgentChatProps, type AgentChatResearchSource, type AgentChatRole, type AgentChatRuntimeApi, type AgentChatRuntimeEvent, type AgentChatScheduledWorkItem, type AgentChatScheduledWorkKind, type AgentChatScheduledWorkList, type AgentChatSession, type AgentChatSessionList, type AgentChatSessionTree, type AgentChatSessionTreeNode, type AgentChatSlashCommand, type AgentChatSseMessageEvent, type AgentChatState, type AgentChatSvgArtifactSpec, type AgentChatSystemKind, type AgentChatTableArtifactSpec, type AgentChatTokenUsage, type AgentChatToolCallInfo, type AgentChatWorkspaceEntry, type AgentChatWorkspaceFile, type AgentChatWorkspaceTree, type AgentChatWorkspaceUpload, type ArtifactKind, type ArtifactPayload, type AskUserQuestionAnswer, type AskUserQuestionArgs, type AskUserQuestionChoice, type AskUserQuestionQuestion, type ChartArtifactSpec, type ChatComposerError, type ChatMessage, type CitationSegment, CitationText, type CodingAgentConnection, CodingAgentsPanel, type CodingAgentsPanelProps, ComposioConnectCard, type ComposioConnectCardProps, type ErrorInfo, type HtmlArtifactSpec, type InboxItem, type InboxList, InboxPanel, type InboxPanelProps, type InboxUnreadCountState, IntegrationsBand, type IntegrationsBandProps, IntegrationsPage, type IntegrationsPageProps, MISSION_EVENT_CATEGORIES, type MarkdownArtifactSpec, MessageResponse, type MessageResponseProps, MissionDashboard, type MissionDashboardProps, type MissionEventCategory, type MissionEventsFeed, type MissionTaskBucket, type MissionTaskRailGroup, type MissionTaskRailGroupKey, MissionsPanel, type MissionsPanelProps, ResearchSourcesPanel, type RetryIndicator, type ScheduledWorkItem, type ScheduledWorkList, ScheduledWorkPanel, type ScheduledWorkPanelProps, type SessionTree, type SessionTreeNode, SessionTreePanel, type SessionTreePanelProps, type SvgArtifactSpec, type TableArtifactSpec, type TokenUsage, type ToolCallInfo, type WorkspaceEntry, type WorkspaceFile, type WorkspaceTree, type WorkspaceUpload, defaultSelectedMissionTaskId, deriveMissionWorkerActivityLabel, formatMissionTimestamp, groupMissionTasksByBucket, isTerminalMissionStatus, mergeMissionEvents, missionEventActorLabel, missionEventCategory, missionEventSummary, missionEventTaskId, missionTaskBlocks, missionTaskBucket, missionTaskRailGroups, missionTaskStatusDotClass, missionTaskTitle, missionWorkerTaskCounts, splitCitations, stripMissionControlMarkup, useAgentChatAdapterContext, useAgentChatRuntime, useChatViewMode, useInboxUnreadCount, useMissionEvents };
|
|
1178
|
+
export { ACTIVE_MISSION_STATUSES, AgentChat, type AgentChatAdapter, type AgentChatAdapterContextValue, AgentChatAdapterProvider, type AgentChatArtifactKind, type AgentChatArtifactMeta, type AgentChatArtifactPayload, type AgentChatAskUserQuestionAnswer, type AgentChatAskUserQuestionArgs, type AgentChatAskUserQuestionChoice, type AgentChatAskUserQuestionQuestion, type AgentChatAttachment, type AgentChatChartArtifactSpec, type AgentChatDisplayAttachment, type AgentChatErrorCategory, type AgentChatErrorInfo, type AgentChatEventStream, type AgentChatEventType, type AgentChatExpertFeedbackRating, type AgentChatHtmlArtifactSpec, type AgentChatImageAttachment, type AgentChatInboxEventStream, type AgentChatInboxItem, type AgentChatInboxKind, type AgentChatInboxList, type AgentChatInboxListInput, type AgentChatInboxStatus, type AgentChatInboxStreamEvent, type AgentChatMarkdownArtifactSpec, type AgentChatMessage, type AgentChatMessageStatus, type AgentChatMissionEvent, type AgentChatMissionEventSession, type AgentChatMissionEventsPage, type AgentChatMissionList, type AgentChatMissionStatus, type AgentChatMissionSummary, type AgentChatMissionTask, type AgentChatMissionWorker, type AgentChatPendingAttachment, type AgentChatProps, type AgentChatResearchSource, type AgentChatRole, type AgentChatRuntimeApi, type AgentChatRuntimeEvent, type AgentChatScheduledWorkItem, type AgentChatScheduledWorkKind, type AgentChatScheduledWorkList, type AgentChatSession, type AgentChatSessionList, type AgentChatSessionTree, type AgentChatSessionTreeNode, type AgentChatSlashCommand, type AgentChatSseMessageEvent, type AgentChatState, type AgentChatSvgArtifactSpec, type AgentChatSystemKind, type AgentChatTableArtifactSpec, type AgentChatTokenUsage, type AgentChatToolCallInfo, type AgentChatWorkspaceEntry, type AgentChatWorkspaceFile, type AgentChatWorkspaceTree, type AgentChatWorkspaceUpload, type ArtifactKind, type ArtifactPayload, type AskUserQuestionAnswer, type AskUserQuestionArgs, type AskUserQuestionChoice, type AskUserQuestionQuestion, type ChartArtifactSpec, type ChatComposerError, type ChatMessage, type CitationSegment, CitationText, type CodingAgentConnection, CodingAgentsPanel, type CodingAgentsPanelProps, ComposioConnectCard, type ComposioConnectCardProps, type ErrorInfo, FetchSseEventStream, type FetchSseEventStreamOptions, type HtmlArtifactSpec, type InboxItem, type InboxList, InboxPanel, type InboxPanelProps, type InboxUnreadCountState, IntegrationsBand, type IntegrationsBandProps, IntegrationsPage, type IntegrationsPageProps, MISSION_EVENT_CATEGORIES, type MarkdownArtifactSpec, MessageResponse, type MessageResponseProps, MissionDashboard, type MissionDashboardProps, type MissionEventCategory, type MissionEventsFeed, type MissionTaskBucket, type MissionTaskRailGroup, type MissionTaskRailGroupKey, MissionsPanel, type MissionsPanelProps, ResearchSourcesPanel, type RetryIndicator, type ScheduledWorkItem, type ScheduledWorkList, ScheduledWorkPanel, type ScheduledWorkPanelProps, type SessionTree, type SessionTreeNode, SessionTreePanel, type SessionTreePanelProps, type SvgArtifactSpec, type TableArtifactSpec, type TokenUsage, type ToolCallInfo, type WorkspaceEntry, type WorkspaceFile, type WorkspaceTree, type WorkspaceUpload, defaultSelectedMissionTaskId, deriveMissionWorkerActivityLabel, formatMissionTimestamp, groupMissionTasksByBucket, isTerminalMissionStatus, mergeMissionEvents, missionEventActorLabel, missionEventCategory, missionEventSummary, missionEventTaskId, missionTaskBlocks, missionTaskBucket, missionTaskRailGroups, missionTaskStatusDotClass, missionTaskTitle, missionWorkerTaskCounts, splitCitations, stripMissionControlMarkup, useAgentChatAdapterContext, useAgentChatRuntime, useChatViewMode, useInboxUnreadCount, useMissionEvents };
|
package/dist/index.d.ts
CHANGED
|
@@ -890,6 +890,43 @@ interface UseAgentChatRuntimeInput {
|
|
|
890
890
|
}
|
|
891
891
|
declare function useAgentChatRuntime({ adapter, agentId, sessionId, onSessionChange, }: UseAgentChatRuntimeInput): AgentChatRuntimeApi;
|
|
892
892
|
|
|
893
|
+
interface FetchSseEventStreamOptions {
|
|
894
|
+
/** Fetch implementation — pass the app's authenticated fetch wrapper. */
|
|
895
|
+
fetchFn?: (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>;
|
|
896
|
+
}
|
|
897
|
+
/**
|
|
898
|
+
* SSE-over-fetch event stream with silent-drop detection.
|
|
899
|
+
*
|
|
900
|
+
* Structurally compatible with ``AgentChatEventStream`` (and the inbox
|
|
901
|
+
* stream contract): ``addEventListener``/``close``/``onerror``. Every
|
|
902
|
+
* failure mode — bad response, mid-stream error, clean server close,
|
|
903
|
+
* and watchdog-detected silent stall — funnels through a once-only
|
|
904
|
+
* guard, so consumers can treat ``onerror`` as "reconnect now" without
|
|
905
|
+
* risking a leaked second stream from double-firing.
|
|
906
|
+
*/
|
|
907
|
+
declare class FetchSseEventStream {
|
|
908
|
+
private readonly abort;
|
|
909
|
+
private readonly decoder;
|
|
910
|
+
private readonly listeners;
|
|
911
|
+
private buffer;
|
|
912
|
+
private eventType;
|
|
913
|
+
private eventId;
|
|
914
|
+
private dataLines;
|
|
915
|
+
private readonly url;
|
|
916
|
+
private readonly fetchFn;
|
|
917
|
+
private readonly watchdog;
|
|
918
|
+
private errored;
|
|
919
|
+
onerror: (() => void) | null;
|
|
920
|
+
constructor(url: string, options?: FetchSseEventStreamOptions);
|
|
921
|
+
addEventListener(type: string, listener: (event: AgentChatSseMessageEvent) => void): void;
|
|
922
|
+
close(): void;
|
|
923
|
+
private fail;
|
|
924
|
+
private start;
|
|
925
|
+
private feed;
|
|
926
|
+
private processLine;
|
|
927
|
+
private flushEvent;
|
|
928
|
+
}
|
|
929
|
+
|
|
893
930
|
type MessageResponseProps = ComponentProps<typeof Streamdown>;
|
|
894
931
|
declare const MessageResponse: React.MemoExoticComponent<({ className, ...props }: MessageResponseProps) => react_jsx_runtime.JSX.Element>;
|
|
895
932
|
|
|
@@ -1138,4 +1175,4 @@ interface SessionTreePanelProps {
|
|
|
1138
1175
|
}
|
|
1139
1176
|
declare function SessionTreePanel({ adapter, sessionId, activeSessionId, agentId, title, sessionListLimit, hideRoot, hideHeader, loadList, onSessionSelect, onSessionDelete, }: SessionTreePanelProps): react_jsx_runtime.JSX.Element | null;
|
|
1140
1177
|
|
|
1141
|
-
export { ACTIVE_MISSION_STATUSES, AgentChat, type AgentChatAdapter, type AgentChatAdapterContextValue, AgentChatAdapterProvider, type AgentChatArtifactKind, type AgentChatArtifactMeta, type AgentChatArtifactPayload, type AgentChatAskUserQuestionAnswer, type AgentChatAskUserQuestionArgs, type AgentChatAskUserQuestionChoice, type AgentChatAskUserQuestionQuestion, type AgentChatAttachment, type AgentChatChartArtifactSpec, type AgentChatDisplayAttachment, type AgentChatErrorCategory, type AgentChatErrorInfo, type AgentChatEventStream, type AgentChatEventType, type AgentChatExpertFeedbackRating, type AgentChatHtmlArtifactSpec, type AgentChatImageAttachment, type AgentChatInboxEventStream, type AgentChatInboxItem, type AgentChatInboxKind, type AgentChatInboxList, type AgentChatInboxListInput, type AgentChatInboxStatus, type AgentChatInboxStreamEvent, type AgentChatMarkdownArtifactSpec, type AgentChatMessage, type AgentChatMessageStatus, type AgentChatMissionEvent, type AgentChatMissionEventSession, type AgentChatMissionEventsPage, type AgentChatMissionList, type AgentChatMissionStatus, type AgentChatMissionSummary, type AgentChatMissionTask, type AgentChatMissionWorker, type AgentChatPendingAttachment, type AgentChatProps, type AgentChatResearchSource, type AgentChatRole, type AgentChatRuntimeApi, type AgentChatRuntimeEvent, type AgentChatScheduledWorkItem, type AgentChatScheduledWorkKind, type AgentChatScheduledWorkList, type AgentChatSession, type AgentChatSessionList, type AgentChatSessionTree, type AgentChatSessionTreeNode, type AgentChatSlashCommand, type AgentChatSseMessageEvent, type AgentChatState, type AgentChatSvgArtifactSpec, type AgentChatSystemKind, type AgentChatTableArtifactSpec, type AgentChatTokenUsage, type AgentChatToolCallInfo, type AgentChatWorkspaceEntry, type AgentChatWorkspaceFile, type AgentChatWorkspaceTree, type AgentChatWorkspaceUpload, type ArtifactKind, type ArtifactPayload, type AskUserQuestionAnswer, type AskUserQuestionArgs, type AskUserQuestionChoice, type AskUserQuestionQuestion, type ChartArtifactSpec, type ChatComposerError, type ChatMessage, type CitationSegment, CitationText, type CodingAgentConnection, CodingAgentsPanel, type CodingAgentsPanelProps, ComposioConnectCard, type ComposioConnectCardProps, type ErrorInfo, type HtmlArtifactSpec, type InboxItem, type InboxList, InboxPanel, type InboxPanelProps, type InboxUnreadCountState, IntegrationsBand, type IntegrationsBandProps, IntegrationsPage, type IntegrationsPageProps, MISSION_EVENT_CATEGORIES, type MarkdownArtifactSpec, MessageResponse, type MessageResponseProps, MissionDashboard, type MissionDashboardProps, type MissionEventCategory, type MissionEventsFeed, type MissionTaskBucket, type MissionTaskRailGroup, type MissionTaskRailGroupKey, MissionsPanel, type MissionsPanelProps, ResearchSourcesPanel, type RetryIndicator, type ScheduledWorkItem, type ScheduledWorkList, ScheduledWorkPanel, type ScheduledWorkPanelProps, type SessionTree, type SessionTreeNode, SessionTreePanel, type SessionTreePanelProps, type SvgArtifactSpec, type TableArtifactSpec, type TokenUsage, type ToolCallInfo, type WorkspaceEntry, type WorkspaceFile, type WorkspaceTree, type WorkspaceUpload, defaultSelectedMissionTaskId, deriveMissionWorkerActivityLabel, formatMissionTimestamp, groupMissionTasksByBucket, isTerminalMissionStatus, mergeMissionEvents, missionEventActorLabel, missionEventCategory, missionEventSummary, missionEventTaskId, missionTaskBlocks, missionTaskBucket, missionTaskRailGroups, missionTaskStatusDotClass, missionTaskTitle, missionWorkerTaskCounts, splitCitations, stripMissionControlMarkup, useAgentChatAdapterContext, useAgentChatRuntime, useChatViewMode, useInboxUnreadCount, useMissionEvents };
|
|
1178
|
+
export { ACTIVE_MISSION_STATUSES, AgentChat, type AgentChatAdapter, type AgentChatAdapterContextValue, AgentChatAdapterProvider, type AgentChatArtifactKind, type AgentChatArtifactMeta, type AgentChatArtifactPayload, type AgentChatAskUserQuestionAnswer, type AgentChatAskUserQuestionArgs, type AgentChatAskUserQuestionChoice, type AgentChatAskUserQuestionQuestion, type AgentChatAttachment, type AgentChatChartArtifactSpec, type AgentChatDisplayAttachment, type AgentChatErrorCategory, type AgentChatErrorInfo, type AgentChatEventStream, type AgentChatEventType, type AgentChatExpertFeedbackRating, type AgentChatHtmlArtifactSpec, type AgentChatImageAttachment, type AgentChatInboxEventStream, type AgentChatInboxItem, type AgentChatInboxKind, type AgentChatInboxList, type AgentChatInboxListInput, type AgentChatInboxStatus, type AgentChatInboxStreamEvent, type AgentChatMarkdownArtifactSpec, type AgentChatMessage, type AgentChatMessageStatus, type AgentChatMissionEvent, type AgentChatMissionEventSession, type AgentChatMissionEventsPage, type AgentChatMissionList, type AgentChatMissionStatus, type AgentChatMissionSummary, type AgentChatMissionTask, type AgentChatMissionWorker, type AgentChatPendingAttachment, type AgentChatProps, type AgentChatResearchSource, type AgentChatRole, type AgentChatRuntimeApi, type AgentChatRuntimeEvent, type AgentChatScheduledWorkItem, type AgentChatScheduledWorkKind, type AgentChatScheduledWorkList, type AgentChatSession, type AgentChatSessionList, type AgentChatSessionTree, type AgentChatSessionTreeNode, type AgentChatSlashCommand, type AgentChatSseMessageEvent, type AgentChatState, type AgentChatSvgArtifactSpec, type AgentChatSystemKind, type AgentChatTableArtifactSpec, type AgentChatTokenUsage, type AgentChatToolCallInfo, type AgentChatWorkspaceEntry, type AgentChatWorkspaceFile, type AgentChatWorkspaceTree, type AgentChatWorkspaceUpload, type ArtifactKind, type ArtifactPayload, type AskUserQuestionAnswer, type AskUserQuestionArgs, type AskUserQuestionChoice, type AskUserQuestionQuestion, type ChartArtifactSpec, type ChatComposerError, type ChatMessage, type CitationSegment, CitationText, type CodingAgentConnection, CodingAgentsPanel, type CodingAgentsPanelProps, ComposioConnectCard, type ComposioConnectCardProps, type ErrorInfo, FetchSseEventStream, type FetchSseEventStreamOptions, type HtmlArtifactSpec, type InboxItem, type InboxList, InboxPanel, type InboxPanelProps, type InboxUnreadCountState, IntegrationsBand, type IntegrationsBandProps, IntegrationsPage, type IntegrationsPageProps, MISSION_EVENT_CATEGORIES, type MarkdownArtifactSpec, MessageResponse, type MessageResponseProps, MissionDashboard, type MissionDashboardProps, type MissionEventCategory, type MissionEventsFeed, type MissionTaskBucket, type MissionTaskRailGroup, type MissionTaskRailGroupKey, MissionsPanel, type MissionsPanelProps, ResearchSourcesPanel, type RetryIndicator, type ScheduledWorkItem, type ScheduledWorkList, ScheduledWorkPanel, type ScheduledWorkPanelProps, type SessionTree, type SessionTreeNode, SessionTreePanel, type SessionTreePanelProps, type SvgArtifactSpec, type TableArtifactSpec, type TokenUsage, type ToolCallInfo, type WorkspaceEntry, type WorkspaceFile, type WorkspaceTree, type WorkspaceUpload, defaultSelectedMissionTaskId, deriveMissionWorkerActivityLabel, formatMissionTimestamp, groupMissionTasksByBucket, isTerminalMissionStatus, mergeMissionEvents, missionEventActorLabel, missionEventCategory, missionEventSummary, missionEventTaskId, missionTaskBlocks, missionTaskBucket, missionTaskRailGroups, missionTaskStatusDotClass, missionTaskTitle, missionWorkerTaskCounts, splitCitations, stripMissionControlMarkup, useAgentChatAdapterContext, useAgentChatRuntime, useChatViewMode, useInboxUnreadCount, useMissionEvents };
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { cn } from './chunk-
|
|
1
|
+
import { cn, __publicField } from './chunk-47MF6JUW.js';
|
|
2
2
|
import { createContext, memo, useRef, useEffect, useCallback, useMemo, useState, useLayoutEffect, lazy, useContext, Fragment as Fragment$1, Children, Suspense } from 'react';
|
|
3
3
|
import { ChevronDownIcon, AlertTriangle, ChevronDown, ChevronRight, RefreshCw, File as File$1, FileImage, FileAudio, FileVideo, FileText, FileCode, FileArchive, FileSpreadsheet, PlugZapIcon, ChevronRightIcon, ArrowLeftIcon, Loader2Icon, InboxIcon, Loader2, AlertCircle, Pause, Play, Ban, TargetIcon, CalendarClockIcon, UsersIcon, MessageSquareIcon, ZapIcon, Maximize2Icon, FolderOpenIcon, UploadIcon, RefreshCwIcon, AlertCircleIcon, ExternalLinkIcon, ClipboardCheckIcon, ShieldAlertIcon, TimerIcon, CircleDotIcon, XIcon, Trash2Icon, SquareIcon, ArrowDownIcon, RotateCcwIcon, MousePointer2Icon, DownloadIcon, TrashIcon, ImageIcon, FileTextIcon, CheckIcon, Clock, ArrowRight, TerminalIcon, SparklesIcon, ClockIcon, PlusIcon, CloudIcon, HardDriveIcon, PaperclipIcon, GlobeIcon, FolderIcon, CopyIcon, FileIcon, ChevronLeftIcon, MinusIcon, SearchIcon, CircleDot, XCircle, CheckCircle2, ArrowUpIcon, CircleCheckIcon, ThumbsUpIcon, ThumbsDownIcon, BookOpenIcon, GitBranchIcon, ActivityIcon, EyeIcon, ListTodoIcon, BotIcon, ListIcon, PenLineIcon, FileEditIcon, WrenchIcon, FileCodeIcon, CodeIcon, FileArchiveIcon, FileVideoIcon, FileAudioIcon, FileImageIcon, FileChartLineIcon, FileSpreadsheetIcon, XCircleIcon, CheckCircle2Icon, Code, CircleXIcon, SkullIcon, CheckCircleIcon, CircleIcon } from 'lucide-react';
|
|
4
4
|
import { cva } from 'class-variance-authority';
|
|
@@ -7470,7 +7470,7 @@ async function copyText(text) {
|
|
|
7470
7470
|
}
|
|
7471
7471
|
}
|
|
7472
7472
|
var ArtifactChart = lazy(
|
|
7473
|
-
() => import('./artifact-chart-
|
|
7473
|
+
() => import('./artifact-chart-62C2XKHA.js').then((m) => ({ default: m.ArtifactChart }))
|
|
7474
7474
|
);
|
|
7475
7475
|
var KIND_LABEL = {
|
|
7476
7476
|
markdown: "Markdown document",
|
|
@@ -12298,6 +12298,160 @@ function delegateTaskTargets(rawArgs) {
|
|
|
12298
12298
|
}
|
|
12299
12299
|
return out;
|
|
12300
12300
|
}
|
|
12301
|
+
|
|
12302
|
+
// src/runtime/fetch-sse-stream.ts
|
|
12303
|
+
var STREAM_STALL_THRESHOLD_MS = 45e3;
|
|
12304
|
+
var STREAM_STALL_CHECK_INTERVAL_MS = 5e3;
|
|
12305
|
+
var StreamStallWatchdog = class {
|
|
12306
|
+
constructor(onStall) {
|
|
12307
|
+
__publicField(this, "lastByteAt", Date.now());
|
|
12308
|
+
__publicField(this, "timer", null);
|
|
12309
|
+
__publicField(this, "onStall");
|
|
12310
|
+
__publicField(this, "check", () => {
|
|
12311
|
+
if (Date.now() - this.lastByteAt > STREAM_STALL_THRESHOLD_MS) {
|
|
12312
|
+
this.onStall();
|
|
12313
|
+
}
|
|
12314
|
+
});
|
|
12315
|
+
this.onStall = onStall;
|
|
12316
|
+
}
|
|
12317
|
+
start() {
|
|
12318
|
+
this.lastByteAt = Date.now();
|
|
12319
|
+
this.timer = setInterval(this.check, STREAM_STALL_CHECK_INTERVAL_MS);
|
|
12320
|
+
if (typeof document !== "undefined") {
|
|
12321
|
+
document.addEventListener("visibilitychange", this.check);
|
|
12322
|
+
}
|
|
12323
|
+
if (typeof window !== "undefined") {
|
|
12324
|
+
window.addEventListener("online", this.check);
|
|
12325
|
+
}
|
|
12326
|
+
}
|
|
12327
|
+
touch() {
|
|
12328
|
+
this.lastByteAt = Date.now();
|
|
12329
|
+
}
|
|
12330
|
+
stop() {
|
|
12331
|
+
if (this.timer !== null) {
|
|
12332
|
+
clearInterval(this.timer);
|
|
12333
|
+
this.timer = null;
|
|
12334
|
+
}
|
|
12335
|
+
if (typeof document !== "undefined") {
|
|
12336
|
+
document.removeEventListener("visibilitychange", this.check);
|
|
12337
|
+
}
|
|
12338
|
+
if (typeof window !== "undefined") {
|
|
12339
|
+
window.removeEventListener("online", this.check);
|
|
12340
|
+
}
|
|
12341
|
+
}
|
|
12342
|
+
};
|
|
12343
|
+
var FetchSseEventStream = class {
|
|
12344
|
+
constructor(url, options = {}) {
|
|
12345
|
+
__publicField(this, "abort", new AbortController());
|
|
12346
|
+
__publicField(this, "decoder", new TextDecoder());
|
|
12347
|
+
__publicField(this, "listeners", /* @__PURE__ */ new Map());
|
|
12348
|
+
__publicField(this, "buffer", "");
|
|
12349
|
+
__publicField(this, "eventType", "");
|
|
12350
|
+
__publicField(this, "eventId", "");
|
|
12351
|
+
__publicField(this, "dataLines", []);
|
|
12352
|
+
__publicField(this, "url");
|
|
12353
|
+
__publicField(this, "fetchFn");
|
|
12354
|
+
__publicField(this, "watchdog", new StreamStallWatchdog(() => this.fail()));
|
|
12355
|
+
__publicField(this, "errored", false);
|
|
12356
|
+
__publicField(this, "onerror", null);
|
|
12357
|
+
this.url = url;
|
|
12358
|
+
this.fetchFn = options.fetchFn ?? fetch;
|
|
12359
|
+
queueMicrotask(() => void this.start());
|
|
12360
|
+
}
|
|
12361
|
+
addEventListener(type, listener) {
|
|
12362
|
+
const listeners = this.listeners.get(type) ?? /* @__PURE__ */ new Set();
|
|
12363
|
+
listeners.add(listener);
|
|
12364
|
+
this.listeners.set(type, listeners);
|
|
12365
|
+
}
|
|
12366
|
+
close() {
|
|
12367
|
+
this.watchdog.stop();
|
|
12368
|
+
this.abort.abort();
|
|
12369
|
+
}
|
|
12370
|
+
fail() {
|
|
12371
|
+
if (this.errored) return;
|
|
12372
|
+
this.errored = true;
|
|
12373
|
+
this.watchdog.stop();
|
|
12374
|
+
this.onerror?.();
|
|
12375
|
+
}
|
|
12376
|
+
async start() {
|
|
12377
|
+
try {
|
|
12378
|
+
const response = await this.fetchFn(this.url, {
|
|
12379
|
+
signal: this.abort.signal,
|
|
12380
|
+
headers: { Accept: "text/event-stream" }
|
|
12381
|
+
});
|
|
12382
|
+
if (!response.ok || !response.body) {
|
|
12383
|
+
this.fail();
|
|
12384
|
+
return;
|
|
12385
|
+
}
|
|
12386
|
+
this.watchdog.start();
|
|
12387
|
+
const reader = response.body.getReader();
|
|
12388
|
+
while (!this.abort.signal.aborted) {
|
|
12389
|
+
const { done, value } = await reader.read();
|
|
12390
|
+
if (done) break;
|
|
12391
|
+
this.watchdog.touch();
|
|
12392
|
+
this.feed(this.decoder.decode(value, { stream: true }));
|
|
12393
|
+
}
|
|
12394
|
+
this.feed(this.decoder.decode());
|
|
12395
|
+
this.flushEvent();
|
|
12396
|
+
if (!this.abort.signal.aborted) {
|
|
12397
|
+
this.fail();
|
|
12398
|
+
}
|
|
12399
|
+
} catch (error) {
|
|
12400
|
+
if (!this.abort.signal.aborted) {
|
|
12401
|
+
console.error("SSE stream failed:", error);
|
|
12402
|
+
this.fail();
|
|
12403
|
+
}
|
|
12404
|
+
} finally {
|
|
12405
|
+
this.watchdog.stop();
|
|
12406
|
+
}
|
|
12407
|
+
}
|
|
12408
|
+
feed(chunk) {
|
|
12409
|
+
this.buffer += chunk;
|
|
12410
|
+
for (; ; ) {
|
|
12411
|
+
const newlineIndex = this.buffer.indexOf("\n");
|
|
12412
|
+
if (newlineIndex < 0) return;
|
|
12413
|
+
const line = this.buffer.slice(0, newlineIndex).replace(/\r$/, "");
|
|
12414
|
+
this.buffer = this.buffer.slice(newlineIndex + 1);
|
|
12415
|
+
this.processLine(line);
|
|
12416
|
+
}
|
|
12417
|
+
}
|
|
12418
|
+
processLine(line) {
|
|
12419
|
+
if (line === "") {
|
|
12420
|
+
this.flushEvent();
|
|
12421
|
+
return;
|
|
12422
|
+
}
|
|
12423
|
+
if (line.startsWith(":")) return;
|
|
12424
|
+
const separator = line.indexOf(":");
|
|
12425
|
+
const field = separator >= 0 ? line.slice(0, separator) : line;
|
|
12426
|
+
const rawValue = separator >= 0 ? line.slice(separator + 1) : "";
|
|
12427
|
+
const value = rawValue.startsWith(" ") ? rawValue.slice(1) : rawValue;
|
|
12428
|
+
if (field === "event") {
|
|
12429
|
+
this.eventType = value;
|
|
12430
|
+
} else if (field === "id") {
|
|
12431
|
+
this.eventId = value;
|
|
12432
|
+
} else if (field === "data") {
|
|
12433
|
+
this.dataLines.push(value);
|
|
12434
|
+
}
|
|
12435
|
+
}
|
|
12436
|
+
flushEvent() {
|
|
12437
|
+
if (!this.eventType || this.dataLines.length === 0) {
|
|
12438
|
+
this.dataLines = [];
|
|
12439
|
+
return;
|
|
12440
|
+
}
|
|
12441
|
+
const listeners = this.listeners.get(this.eventType);
|
|
12442
|
+
const event = {
|
|
12443
|
+
data: this.dataLines.join("\n"),
|
|
12444
|
+
lastEventId: this.eventId
|
|
12445
|
+
};
|
|
12446
|
+
if (listeners) {
|
|
12447
|
+
for (const listener of listeners) {
|
|
12448
|
+
listener(event);
|
|
12449
|
+
}
|
|
12450
|
+
}
|
|
12451
|
+
this.eventType = "";
|
|
12452
|
+
this.dataLines = [];
|
|
12453
|
+
}
|
|
12454
|
+
};
|
|
12301
12455
|
var POLL_INTERVAL_MS = 2e3;
|
|
12302
12456
|
var POLL_TIMEOUT_MS = 18e4;
|
|
12303
12457
|
var sleep = (ms) => new Promise((r) => setTimeout(r, ms));
|
|
@@ -15674,6 +15828,6 @@ function SessionTreePanel({
|
|
|
15674
15828
|
] });
|
|
15675
15829
|
}
|
|
15676
15830
|
|
|
15677
|
-
export { ACTIVE_MISSION_STATUSES, AgentChat, AgentChatAdapterProvider, CitationText, CodingAgentsPanel, ComposioConnectCard, InboxPanel, IntegrationsBand, IntegrationsPage, MISSION_EVENT_CATEGORIES, MessageResponse, MissionDashboard, MissionsPanel, ResearchSourcesPanel, ScheduledWorkPanel, SessionTreePanel, defaultSelectedMissionTaskId, deriveMissionWorkerActivityLabel, formatMissionTimestamp, groupMissionTasksByBucket, isTerminalMissionStatus, mergeMissionEvents, missionEventActorLabel, missionEventCategory, missionEventSummary, missionEventTaskId, missionTaskBlocks, missionTaskBucket, missionTaskRailGroups, missionTaskStatusDotClass, missionTaskTitle, missionWorkerTaskCounts, splitCitations, stripMissionControlMarkup, useAgentChatAdapterContext, useAgentChatRuntime, useChatViewMode, useInboxUnreadCount, useMissionEvents };
|
|
15831
|
+
export { ACTIVE_MISSION_STATUSES, AgentChat, AgentChatAdapterProvider, CitationText, CodingAgentsPanel, ComposioConnectCard, FetchSseEventStream, InboxPanel, IntegrationsBand, IntegrationsPage, MISSION_EVENT_CATEGORIES, MessageResponse, MissionDashboard, MissionsPanel, ResearchSourcesPanel, ScheduledWorkPanel, SessionTreePanel, defaultSelectedMissionTaskId, deriveMissionWorkerActivityLabel, formatMissionTimestamp, groupMissionTasksByBucket, isTerminalMissionStatus, mergeMissionEvents, missionEventActorLabel, missionEventCategory, missionEventSummary, missionEventTaskId, missionTaskBlocks, missionTaskBucket, missionTaskRailGroups, missionTaskStatusDotClass, missionTaskTitle, missionWorkerTaskCounts, splitCitations, stripMissionControlMarkup, useAgentChatAdapterContext, useAgentChatRuntime, useChatViewMode, useInboxUnreadCount, useMissionEvents };
|
|
15678
15832
|
//# sourceMappingURL=index.js.map
|
|
15679
15833
|
//# sourceMappingURL=index.js.map
|