@getcatalystiq/agent-plane-ui 0.1.30 → 0.1.31
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.cjs +641 -258
- package/dist/index.d.cts +75 -2
- package/dist/index.d.ts +75 -2
- package/dist/index.js +394 -24
- package/package.json +2 -1
package/dist/index.d.cts
CHANGED
|
@@ -6,6 +6,7 @@ import { ClassValue } from 'clsx';
|
|
|
6
6
|
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
7
7
|
import { VariantProps } from 'class-variance-authority';
|
|
8
8
|
import { DailyAgentStat } from './charts.cjs';
|
|
9
|
+
import * as ToastPrimitives from '@radix-ui/react-toast';
|
|
9
10
|
|
|
10
11
|
/** Skills directory types. */
|
|
11
12
|
interface SkillDirectoryEntry {
|
|
@@ -64,6 +65,11 @@ type PlaygroundStreamEvent = PlaygroundTextDeltaEvent | PlaygroundRunStartedEven
|
|
|
64
65
|
type: string;
|
|
65
66
|
[key: string]: unknown;
|
|
66
67
|
};
|
|
68
|
+
/** Minimal stream event type for run streaming (compatible with SDK StreamEvent). */
|
|
69
|
+
interface StreamEventLike {
|
|
70
|
+
type: string;
|
|
71
|
+
[key: string]: unknown;
|
|
72
|
+
}
|
|
67
73
|
/** Async iterable stream of events (compatible with SDK RunStream). */
|
|
68
74
|
interface PlaygroundStream extends AsyncIterable<PlaygroundStreamEvent> {
|
|
69
75
|
run_id: string | null;
|
|
@@ -104,6 +110,10 @@ interface AgentPlaneClient {
|
|
|
104
110
|
cancel(runId: string): Promise<unknown>;
|
|
105
111
|
transcript(runId: string): Promise<unknown>;
|
|
106
112
|
transcriptArray(runId: string): Promise<unknown[]>;
|
|
113
|
+
stream(runId: string, options?: {
|
|
114
|
+
offset?: number;
|
|
115
|
+
signal?: AbortSignal;
|
|
116
|
+
}): Promise<AsyncIterable<StreamEventLike>>;
|
|
107
117
|
};
|
|
108
118
|
sessions: {
|
|
109
119
|
list(params?: Record<string, unknown>): Promise<unknown>;
|
|
@@ -261,6 +271,28 @@ declare function useNavigation(): NavigationContextValue;
|
|
|
261
271
|
*/
|
|
262
272
|
declare function useApi<T = unknown>(key: string | null, fetcher: (client: AgentPlaneClient) => Promise<T>, options?: SWRConfiguration<T>): SWRResponse<T>;
|
|
263
273
|
|
|
274
|
+
interface UseRunStreamResult {
|
|
275
|
+
/** Accumulated stream events (grows during streaming). */
|
|
276
|
+
events: StreamEventLike[];
|
|
277
|
+
/** Whether the stream is currently active. */
|
|
278
|
+
isStreaming: boolean;
|
|
279
|
+
/** The terminal event (result or error) if the stream has ended. */
|
|
280
|
+
terminalEvent: StreamEventLike | null;
|
|
281
|
+
/** Accumulated text from text_delta events (cleared when assistant event arrives). */
|
|
282
|
+
streamingText: string;
|
|
283
|
+
/** Stream error, if any. */
|
|
284
|
+
error: Error | null;
|
|
285
|
+
}
|
|
286
|
+
/**
|
|
287
|
+
* React hook that streams events from an in-progress run using the SDK client.
|
|
288
|
+
*
|
|
289
|
+
* - Only streams when `status` is "running" or "pending"
|
|
290
|
+
* - Returns accumulated events, streaming state, and terminal event
|
|
291
|
+
* - Handles cleanup on unmount or when runId/status changes
|
|
292
|
+
* - Accumulates text_delta events into streamingText
|
|
293
|
+
*/
|
|
294
|
+
declare function useRunStream(runId: string | null, status: string): UseRunStreamResult;
|
|
295
|
+
|
|
264
296
|
declare function cn(...inputs: ClassValue[]): string;
|
|
265
297
|
|
|
266
298
|
declare const buttonVariants: (props?: ({
|
|
@@ -522,9 +554,10 @@ interface TranscriptEvent {
|
|
|
522
554
|
type: string;
|
|
523
555
|
[key: string]: unknown;
|
|
524
556
|
}
|
|
525
|
-
declare function TranscriptViewer({ transcript, prompt }: {
|
|
557
|
+
declare function TranscriptViewer({ transcript, prompt, isStreaming }: {
|
|
526
558
|
transcript: TranscriptEvent[];
|
|
527
559
|
prompt?: string;
|
|
560
|
+
isStreaming?: boolean;
|
|
528
561
|
}): react_jsx_runtime.JSX.Element;
|
|
529
562
|
|
|
530
563
|
interface McpServer {
|
|
@@ -739,4 +772,44 @@ interface Props {
|
|
|
739
772
|
}
|
|
740
773
|
declare function ToolkitMultiselect({ value, onChange }: Props): react_jsx_runtime.JSX.Element;
|
|
741
774
|
|
|
742
|
-
|
|
775
|
+
declare function Toaster(): react_jsx_runtime.JSX.Element;
|
|
776
|
+
|
|
777
|
+
type ToastVariant = "default" | "success" | "destructive";
|
|
778
|
+
type ToasterToast = {
|
|
779
|
+
id: string;
|
|
780
|
+
title?: string;
|
|
781
|
+
description?: string;
|
|
782
|
+
variant?: ToastVariant;
|
|
783
|
+
action?: React$1.ReactNode;
|
|
784
|
+
open?: boolean;
|
|
785
|
+
onOpenChange?: (open: boolean) => void;
|
|
786
|
+
};
|
|
787
|
+
type ToastInput = Omit<ToasterToast, "id" | "open" | "onOpenChange">;
|
|
788
|
+
declare function toast(props: ToastInput): {
|
|
789
|
+
id: string;
|
|
790
|
+
dismiss: () => void;
|
|
791
|
+
update: (updateProps: Partial<ToasterToast>) => void;
|
|
792
|
+
};
|
|
793
|
+
declare function dismiss(toastId?: string): void;
|
|
794
|
+
declare function useToast(): {
|
|
795
|
+
toast: typeof toast;
|
|
796
|
+
dismiss: typeof dismiss;
|
|
797
|
+
toasts: ToasterToast[];
|
|
798
|
+
};
|
|
799
|
+
|
|
800
|
+
declare const ToastProvider: React$1.FC<ToastPrimitives.ToastProviderProps>;
|
|
801
|
+
declare const ToastViewport: React$1.ForwardRefExoticComponent<Omit<ToastPrimitives.ToastViewportProps & React$1.RefAttributes<HTMLOListElement>, "ref"> & React$1.RefAttributes<HTMLOListElement>>;
|
|
802
|
+
declare const toastVariants: (props?: ({
|
|
803
|
+
variant?: "default" | "destructive" | "success" | null | undefined;
|
|
804
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
805
|
+
declare const Toast: React$1.ForwardRefExoticComponent<Omit<ToastPrimitives.ToastProps & React$1.RefAttributes<HTMLLIElement>, "ref"> & VariantProps<(props?: ({
|
|
806
|
+
variant?: "default" | "destructive" | "success" | null | undefined;
|
|
807
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string> & React$1.RefAttributes<HTMLLIElement>>;
|
|
808
|
+
declare const ToastAction: React$1.ForwardRefExoticComponent<Omit<ToastPrimitives.ToastActionProps & React$1.RefAttributes<HTMLButtonElement>, "ref"> & React$1.RefAttributes<HTMLButtonElement>>;
|
|
809
|
+
declare const ToastClose: React$1.ForwardRefExoticComponent<Omit<ToastPrimitives.ToastCloseProps & React$1.RefAttributes<HTMLButtonElement>, "ref"> & React$1.RefAttributes<HTMLButtonElement>>;
|
|
810
|
+
declare const ToastTitle: React$1.ForwardRefExoticComponent<Omit<ToastPrimitives.ToastTitleProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
811
|
+
declare const ToastDescription: React$1.ForwardRefExoticComponent<Omit<ToastPrimitives.ToastDescriptionProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
812
|
+
type ToastProps = React$1.ComponentPropsWithoutRef<typeof Toast>;
|
|
813
|
+
type ToastActionElement = React$1.ReactElement<typeof ToastAction>;
|
|
814
|
+
|
|
815
|
+
export { AdminTable, AdminTableHead, AdminTableRow, AgentA2aInfo, AgentConnectorsManager, AgentDetailPage, AgentEditForm, AgentListPage, type AgentPlaneClient, AgentPlaneProvider, type AgentPlaneProviderProps, AgentPluginManager, AgentRuns, AgentScheduleForm, AgentSkillManager, Badge, type BadgeProps, Button, type ButtonProps, Card, CardContent, CardDescription, CardHeader, CardTitle, ConfirmDialog, CopyButton, DashboardPage, type DashboardPageProps, DetailPageHeader, Dialog, DialogBody, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, EmptyRow, FormError, FormField, Input, type LinkComponentProps, LocalDate, McpServerListPage, type McpServerListPageProps, MetricCard, ModelSelector, type NavigationProps, PaginationBar, PlaygroundPage, type PlaygroundPageProps, type PlaygroundStream, type PlaygroundStreamEvent, PluginDetailPage, type PluginDetailPageProps, PluginMarketplaceDetailPage, type PluginMarketplaceDetailPageProps, PluginMarketplaceListPage, type PluginMarketplaceListPageProps, RunDetailPage, type RunDetailPageProps, RunListPage, type RunListPageProps, RunSourceBadge, RunStatusBadge, SectionHeader, Select, SettingsPage, type SettingsPageProps, Skeleton, type StreamEventLike, Tabs, Textarea, type TextareaProps, Th, Toast, ToastAction, type ToastActionElement, ToastClose, ToastDescription, type ToastProps, ToastProvider, ToastTitle, type ToastVariant, ToastViewport, Toaster, type ToasterToast, ToolkitMultiselect, TranscriptViewer, badgeVariants, buttonVariants, cn, parsePaginationParams, toast, toastVariants, useAgentPlaneClient, useApi, useAuthError, useNavigation, useRunStream, useToast };
|
package/dist/index.d.ts
CHANGED
|
@@ -6,6 +6,7 @@ import { ClassValue } from 'clsx';
|
|
|
6
6
|
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
7
7
|
import { VariantProps } from 'class-variance-authority';
|
|
8
8
|
import { DailyAgentStat } from './charts.js';
|
|
9
|
+
import * as ToastPrimitives from '@radix-ui/react-toast';
|
|
9
10
|
|
|
10
11
|
/** Skills directory types. */
|
|
11
12
|
interface SkillDirectoryEntry {
|
|
@@ -64,6 +65,11 @@ type PlaygroundStreamEvent = PlaygroundTextDeltaEvent | PlaygroundRunStartedEven
|
|
|
64
65
|
type: string;
|
|
65
66
|
[key: string]: unknown;
|
|
66
67
|
};
|
|
68
|
+
/** Minimal stream event type for run streaming (compatible with SDK StreamEvent). */
|
|
69
|
+
interface StreamEventLike {
|
|
70
|
+
type: string;
|
|
71
|
+
[key: string]: unknown;
|
|
72
|
+
}
|
|
67
73
|
/** Async iterable stream of events (compatible with SDK RunStream). */
|
|
68
74
|
interface PlaygroundStream extends AsyncIterable<PlaygroundStreamEvent> {
|
|
69
75
|
run_id: string | null;
|
|
@@ -104,6 +110,10 @@ interface AgentPlaneClient {
|
|
|
104
110
|
cancel(runId: string): Promise<unknown>;
|
|
105
111
|
transcript(runId: string): Promise<unknown>;
|
|
106
112
|
transcriptArray(runId: string): Promise<unknown[]>;
|
|
113
|
+
stream(runId: string, options?: {
|
|
114
|
+
offset?: number;
|
|
115
|
+
signal?: AbortSignal;
|
|
116
|
+
}): Promise<AsyncIterable<StreamEventLike>>;
|
|
107
117
|
};
|
|
108
118
|
sessions: {
|
|
109
119
|
list(params?: Record<string, unknown>): Promise<unknown>;
|
|
@@ -261,6 +271,28 @@ declare function useNavigation(): NavigationContextValue;
|
|
|
261
271
|
*/
|
|
262
272
|
declare function useApi<T = unknown>(key: string | null, fetcher: (client: AgentPlaneClient) => Promise<T>, options?: SWRConfiguration<T>): SWRResponse<T>;
|
|
263
273
|
|
|
274
|
+
interface UseRunStreamResult {
|
|
275
|
+
/** Accumulated stream events (grows during streaming). */
|
|
276
|
+
events: StreamEventLike[];
|
|
277
|
+
/** Whether the stream is currently active. */
|
|
278
|
+
isStreaming: boolean;
|
|
279
|
+
/** The terminal event (result or error) if the stream has ended. */
|
|
280
|
+
terminalEvent: StreamEventLike | null;
|
|
281
|
+
/** Accumulated text from text_delta events (cleared when assistant event arrives). */
|
|
282
|
+
streamingText: string;
|
|
283
|
+
/** Stream error, if any. */
|
|
284
|
+
error: Error | null;
|
|
285
|
+
}
|
|
286
|
+
/**
|
|
287
|
+
* React hook that streams events from an in-progress run using the SDK client.
|
|
288
|
+
*
|
|
289
|
+
* - Only streams when `status` is "running" or "pending"
|
|
290
|
+
* - Returns accumulated events, streaming state, and terminal event
|
|
291
|
+
* - Handles cleanup on unmount or when runId/status changes
|
|
292
|
+
* - Accumulates text_delta events into streamingText
|
|
293
|
+
*/
|
|
294
|
+
declare function useRunStream(runId: string | null, status: string): UseRunStreamResult;
|
|
295
|
+
|
|
264
296
|
declare function cn(...inputs: ClassValue[]): string;
|
|
265
297
|
|
|
266
298
|
declare const buttonVariants: (props?: ({
|
|
@@ -522,9 +554,10 @@ interface TranscriptEvent {
|
|
|
522
554
|
type: string;
|
|
523
555
|
[key: string]: unknown;
|
|
524
556
|
}
|
|
525
|
-
declare function TranscriptViewer({ transcript, prompt }: {
|
|
557
|
+
declare function TranscriptViewer({ transcript, prompt, isStreaming }: {
|
|
526
558
|
transcript: TranscriptEvent[];
|
|
527
559
|
prompt?: string;
|
|
560
|
+
isStreaming?: boolean;
|
|
528
561
|
}): react_jsx_runtime.JSX.Element;
|
|
529
562
|
|
|
530
563
|
interface McpServer {
|
|
@@ -739,4 +772,44 @@ interface Props {
|
|
|
739
772
|
}
|
|
740
773
|
declare function ToolkitMultiselect({ value, onChange }: Props): react_jsx_runtime.JSX.Element;
|
|
741
774
|
|
|
742
|
-
|
|
775
|
+
declare function Toaster(): react_jsx_runtime.JSX.Element;
|
|
776
|
+
|
|
777
|
+
type ToastVariant = "default" | "success" | "destructive";
|
|
778
|
+
type ToasterToast = {
|
|
779
|
+
id: string;
|
|
780
|
+
title?: string;
|
|
781
|
+
description?: string;
|
|
782
|
+
variant?: ToastVariant;
|
|
783
|
+
action?: React$1.ReactNode;
|
|
784
|
+
open?: boolean;
|
|
785
|
+
onOpenChange?: (open: boolean) => void;
|
|
786
|
+
};
|
|
787
|
+
type ToastInput = Omit<ToasterToast, "id" | "open" | "onOpenChange">;
|
|
788
|
+
declare function toast(props: ToastInput): {
|
|
789
|
+
id: string;
|
|
790
|
+
dismiss: () => void;
|
|
791
|
+
update: (updateProps: Partial<ToasterToast>) => void;
|
|
792
|
+
};
|
|
793
|
+
declare function dismiss(toastId?: string): void;
|
|
794
|
+
declare function useToast(): {
|
|
795
|
+
toast: typeof toast;
|
|
796
|
+
dismiss: typeof dismiss;
|
|
797
|
+
toasts: ToasterToast[];
|
|
798
|
+
};
|
|
799
|
+
|
|
800
|
+
declare const ToastProvider: React$1.FC<ToastPrimitives.ToastProviderProps>;
|
|
801
|
+
declare const ToastViewport: React$1.ForwardRefExoticComponent<Omit<ToastPrimitives.ToastViewportProps & React$1.RefAttributes<HTMLOListElement>, "ref"> & React$1.RefAttributes<HTMLOListElement>>;
|
|
802
|
+
declare const toastVariants: (props?: ({
|
|
803
|
+
variant?: "default" | "destructive" | "success" | null | undefined;
|
|
804
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
805
|
+
declare const Toast: React$1.ForwardRefExoticComponent<Omit<ToastPrimitives.ToastProps & React$1.RefAttributes<HTMLLIElement>, "ref"> & VariantProps<(props?: ({
|
|
806
|
+
variant?: "default" | "destructive" | "success" | null | undefined;
|
|
807
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string> & React$1.RefAttributes<HTMLLIElement>>;
|
|
808
|
+
declare const ToastAction: React$1.ForwardRefExoticComponent<Omit<ToastPrimitives.ToastActionProps & React$1.RefAttributes<HTMLButtonElement>, "ref"> & React$1.RefAttributes<HTMLButtonElement>>;
|
|
809
|
+
declare const ToastClose: React$1.ForwardRefExoticComponent<Omit<ToastPrimitives.ToastCloseProps & React$1.RefAttributes<HTMLButtonElement>, "ref"> & React$1.RefAttributes<HTMLButtonElement>>;
|
|
810
|
+
declare const ToastTitle: React$1.ForwardRefExoticComponent<Omit<ToastPrimitives.ToastTitleProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
811
|
+
declare const ToastDescription: React$1.ForwardRefExoticComponent<Omit<ToastPrimitives.ToastDescriptionProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
812
|
+
type ToastProps = React$1.ComponentPropsWithoutRef<typeof Toast>;
|
|
813
|
+
type ToastActionElement = React$1.ReactElement<typeof ToastAction>;
|
|
814
|
+
|
|
815
|
+
export { AdminTable, AdminTableHead, AdminTableRow, AgentA2aInfo, AgentConnectorsManager, AgentDetailPage, AgentEditForm, AgentListPage, type AgentPlaneClient, AgentPlaneProvider, type AgentPlaneProviderProps, AgentPluginManager, AgentRuns, AgentScheduleForm, AgentSkillManager, Badge, type BadgeProps, Button, type ButtonProps, Card, CardContent, CardDescription, CardHeader, CardTitle, ConfirmDialog, CopyButton, DashboardPage, type DashboardPageProps, DetailPageHeader, Dialog, DialogBody, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, EmptyRow, FormError, FormField, Input, type LinkComponentProps, LocalDate, McpServerListPage, type McpServerListPageProps, MetricCard, ModelSelector, type NavigationProps, PaginationBar, PlaygroundPage, type PlaygroundPageProps, type PlaygroundStream, type PlaygroundStreamEvent, PluginDetailPage, type PluginDetailPageProps, PluginMarketplaceDetailPage, type PluginMarketplaceDetailPageProps, PluginMarketplaceListPage, type PluginMarketplaceListPageProps, RunDetailPage, type RunDetailPageProps, RunListPage, type RunListPageProps, RunSourceBadge, RunStatusBadge, SectionHeader, Select, SettingsPage, type SettingsPageProps, Skeleton, type StreamEventLike, Tabs, Textarea, type TextareaProps, Th, Toast, ToastAction, type ToastActionElement, ToastClose, ToastDescription, type ToastProps, ToastProvider, ToastTitle, type ToastVariant, ToastViewport, Toaster, type ToasterToast, ToolkitMultiselect, TranscriptViewer, badgeVariants, buttonVariants, cn, parsePaginationParams, toast, toastVariants, useAgentPlaneClient, useApi, useAuthError, useNavigation, useRunStream, useToast };
|