@mastra/playground-ui 7.0.0-beta.1 → 7.0.0-beta.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.
- package/CHANGELOG.md +233 -0
- package/dist/index.cjs.js +5052 -3658
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.css +3 -0
- package/dist/index.es.js +5013 -3633
- package/dist/index.es.js.map +1 -1
- package/dist/src/components/dynamic-form/index.d.ts +2 -1
- package/dist/src/components/ui/autoform/CustomAutoForm.d.ts +2 -0
- package/dist/src/components/ui/elements/buttons/button.d.ts +1 -0
- package/dist/src/components/ui/elements/buttons/combined-buttons.d.ts +6 -0
- package/dist/src/components/ui/elements/buttons/index.d.ts +1 -0
- package/dist/src/components/ui/elements/form-fields/search-field.d.ts +4 -1
- package/dist/src/components/ui/elements/notification/notification.d.ts +3 -1
- package/dist/src/components/ui/elements/side-dialog/side-dialog-top.d.ts +1 -2
- package/dist/src/components/ui/input.d.ts +1 -1
- package/dist/src/domains/agents/components/agent-chat.d.ts +2 -1
- package/dist/src/domains/agents/components/agent-entity-header.d.ts +1 -3
- package/dist/src/domains/agents/components/agent-information/agent-information.d.ts +25 -0
- package/dist/src/domains/agents/components/agent-metadata/agent-metadata.d.ts +2 -11
- package/dist/src/domains/agents/components/agent-settings.d.ts +2 -4
- package/dist/src/domains/agents/index.d.ts +2 -0
- package/dist/src/domains/configuration/components/header-list-form.d.ts +10 -0
- package/dist/src/domains/configuration/components/playground-config-guard.d.ts +1 -0
- package/dist/src/domains/configuration/components/studio-config-form.d.ts +5 -0
- package/dist/src/domains/configuration/context/studio-config-context.d.ts +12 -0
- package/dist/src/domains/configuration/hooks/use-mastra-instance-status.d.ts +4 -0
- package/dist/src/domains/configuration/index.d.ts +4 -0
- package/dist/src/domains/configuration/types.d.ts +4 -0
- package/dist/src/domains/observability/components/helpers.d.ts +1 -3
- package/dist/src/domains/observability/components/index.d.ts +1 -1
- package/dist/src/domains/observability/components/shared.d.ts +2 -5
- package/dist/src/domains/observability/components/span-dialog.d.ts +4 -2
- package/dist/src/domains/observability/components/span-scoring.d.ts +5 -1
- package/dist/src/domains/observability/components/span-tabs.d.ts +4 -2
- package/dist/src/domains/observability/components/span-type-icon.d.ts +6 -0
- package/dist/src/domains/observability/components/timeline-expand-col.d.ts +13 -0
- package/dist/src/domains/observability/components/timeline-name-col.d.ts +16 -0
- package/dist/src/domains/observability/components/timeline-structure-sign.d.ts +7 -0
- package/dist/src/domains/observability/components/timeline-timing-col.d.ts +12 -0
- package/dist/src/domains/observability/components/trace-dialog.d.ts +4 -1
- package/dist/src/domains/observability/components/trace-timeline-span.d.ts +6 -1
- package/dist/src/domains/observability/components/trace-timeline-tools.d.ts +12 -0
- package/dist/src/domains/observability/components/trace-timeline.d.ts +5 -1
- package/dist/src/domains/observability/components/tracing-run-options.d.ts +1 -0
- package/dist/src/domains/observability/context/tracing-settings-context.d.ts +18 -0
- package/dist/src/domains/observability/hooks/use-tracing-settings-state.d.ts +10 -0
- package/dist/src/domains/observability/index.d.ts +1 -0
- package/dist/src/domains/observability/types.d.ts +13 -0
- package/dist/src/domains/observability/utils/__tests__/span-utils.test.d.ts +1 -0
- package/dist/src/domains/observability/utils/get-descendant-ids.d.ts +2 -0
- package/dist/src/domains/observability/utils/span-utils.d.ts +9 -0
- package/dist/src/domains/workflows/context/use-current-run.d.ts +2 -0
- package/dist/src/domains/workflows/context/workflow-run-context.d.ts +26 -6
- package/dist/src/domains/workflows/hooks/use-workflows-actions.d.ts +5 -0
- package/dist/src/domains/workflows/workflow/workflow-input-data.d.ts +2 -1
- package/dist/src/domains/workflows/workflow/workflow-step-action-bar.d.ts +3 -1
- package/dist/src/domains/workflows/workflow/workflow-time-travel-form.d.ts +5 -0
- package/dist/src/ds/components/Button/Button.d.ts +1 -0
- package/dist/src/ds/tokens/sizes.d.ts +1 -0
- package/dist/src/hooks/use-agent-messages.d.ts +4 -3
- package/dist/src/hooks/use-workflow-runs.d.ts +223 -2
- package/dist/src/index.d.ts +1 -0
- package/dist/src/lib/tanstack-query.d.ts +5 -2
- package/dist/src/types.d.ts +2 -2
- package/dist/tokens.cjs.js +2 -1
- package/dist/tokens.cjs.js.map +1 -1
- package/dist/tokens.es.js +2 -1
- package/dist/tokens.es.js.map +1 -1
- package/package.json +24 -20
- package/dist/src/domains/observability/components/trace-timeline-legend.d.ts +0 -6
|
@@ -7,6 +7,7 @@ interface DynamicFormProps<T extends z.ZodSchema> {
|
|
|
7
7
|
submitButtonLabel?: string;
|
|
8
8
|
className?: string;
|
|
9
9
|
readOnly?: boolean;
|
|
10
|
+
children?: React.ReactNode;
|
|
10
11
|
}
|
|
11
|
-
export declare function DynamicForm<T extends z.ZodSchema>({ schema, onSubmit, defaultValues, isSubmitLoading, submitButtonLabel, className, readOnly, }: DynamicFormProps<T>): import("react/jsx-runtime").JSX.Element | null;
|
|
12
|
+
export declare function DynamicForm<T extends z.ZodSchema>({ schema, onSubmit, defaultValues, isSubmitLoading, submitButtonLabel, className, readOnly, children, }: DynamicFormProps<T>): import("react/jsx-runtime").JSX.Element | null;
|
|
12
13
|
export {};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { AutoFormProps } from '@autoform/react';
|
|
2
|
+
export declare function CustomAutoForm<T extends Record<string, any>>({ schema, onSubmit, defaultValues, values, children, uiComponents, formComponents, withSubmit, onFormInit, formProps, }: AutoFormProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -3,5 +3,6 @@ export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElemen
|
|
|
3
3
|
className?: string;
|
|
4
4
|
children: React.ReactNode;
|
|
5
5
|
variant?: 'primary' | 'outline' | 'ghost';
|
|
6
|
+
isFaded?: boolean;
|
|
6
7
|
}
|
|
7
8
|
export declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { default as React } from '../../../../../node_modules/@types/react';
|
|
2
|
+
export interface CombinedButtonsProps {
|
|
3
|
+
className?: string;
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
}
|
|
6
|
+
export declare const CombinedButtons: ({ className, children }: CombinedButtonsProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,2 +1,5 @@
|
|
|
1
1
|
import { InputFieldProps } from '..';
|
|
2
|
-
export
|
|
2
|
+
export type SearchFieldProps = InputFieldProps & {
|
|
3
|
+
onReset?: () => void;
|
|
4
|
+
};
|
|
5
|
+
export declare function SearchField({ onReset, ...props }: SearchFieldProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -4,6 +4,8 @@ type Notification = {
|
|
|
4
4
|
isVisible?: boolean;
|
|
5
5
|
autoDismiss?: boolean;
|
|
6
6
|
dismissTime?: number;
|
|
7
|
+
dismissible?: boolean;
|
|
8
|
+
type?: 'info' | 'error';
|
|
7
9
|
};
|
|
8
|
-
export declare function Notification({ children, className, isVisible, autoDismiss, dismissTime }: Notification): import("react/jsx-runtime").JSX.Element | null;
|
|
10
|
+
export declare function Notification({ children, className, isVisible, autoDismiss, dismissTime, dismissible, type, }: Notification): import("react/jsx-runtime").JSX.Element | null;
|
|
9
11
|
export {};
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
export type SideDialogTopProps = {
|
|
2
2
|
children?: React.ReactNode;
|
|
3
|
-
withTopSeparator?: boolean;
|
|
4
3
|
className?: string;
|
|
5
4
|
};
|
|
6
|
-
export declare function SideDialogTop({ children,
|
|
5
|
+
export declare function SideDialogTop({ children, className }: SideDialogTopProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { VariantProps } from 'class-variance-authority';
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
declare const inputVariants: (props?: ({
|
|
4
|
-
variant?: "default" | "
|
|
4
|
+
variant?: "default" | "unstyled" | "filled" | null | undefined;
|
|
5
5
|
customSize?: "default" | "sm" | "lg" | null | undefined;
|
|
6
6
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
7
7
|
interface InputProps extends React.InputHTMLAttributes<HTMLInputElement>, VariantProps<typeof inputVariants> {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ChatProps } from '../../../types';
|
|
2
|
-
export declare const AgentChat: ({ agentId, agentName, threadId, memory, refreshThreadList, modelVersion, modelList, messageId, }: Omit<ChatProps, "initialMessages" | "initialLegacyMessages"> & {
|
|
2
|
+
export declare const AgentChat: ({ agentId, agentName, threadId, memory, refreshThreadList, modelVersion, modelList, messageId, isNewThread, }: Omit<ChatProps, "initialMessages" | "initialLegacyMessages"> & {
|
|
3
3
|
messageId?: string;
|
|
4
|
+
isNewThread?: boolean;
|
|
4
5
|
}) => import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
export interface AgentEntityHeaderProps {
|
|
2
2
|
agentId: string;
|
|
3
|
-
isLoading: boolean;
|
|
4
|
-
agentName: string;
|
|
5
3
|
}
|
|
6
|
-
export declare const AgentEntityHeader: ({ agentId
|
|
4
|
+
export declare const AgentEntityHeader: ({ agentId }: AgentEntityHeaderProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -3,3 +3,28 @@ export interface AgentInformationProps {
|
|
|
3
3
|
threadId: string;
|
|
4
4
|
}
|
|
5
5
|
export declare function AgentInformation({ agentId, threadId }: AgentInformationProps): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export interface UseAgentInformationTabArgs {
|
|
7
|
+
isMemoryLoading: boolean;
|
|
8
|
+
hasMemory: boolean;
|
|
9
|
+
}
|
|
10
|
+
export declare const useAgentInformationTab: ({ isMemoryLoading, hasMemory }: UseAgentInformationTabArgs) => {
|
|
11
|
+
selectedTab: string;
|
|
12
|
+
handleTabChange: (value: string) => void;
|
|
13
|
+
};
|
|
14
|
+
export interface UseAgentInformationSettingsArgs {
|
|
15
|
+
modelId: string;
|
|
16
|
+
}
|
|
17
|
+
export declare const useAgentInformationSettings: ({ modelId }: UseAgentInformationSettingsArgs) => {
|
|
18
|
+
settings: import('../../../..').AgentSettingsType | undefined;
|
|
19
|
+
setSettings: (settings: import('../../../..').AgentSettingsType) => void;
|
|
20
|
+
};
|
|
21
|
+
export interface AgentInformationLayoutProps {
|
|
22
|
+
children: React.ReactNode;
|
|
23
|
+
agentId?: string;
|
|
24
|
+
}
|
|
25
|
+
export declare const AgentInformationLayout: ({ children, agentId }: AgentInformationLayoutProps) => import("react/jsx-runtime").JSX.Element;
|
|
26
|
+
export interface AgentInformationTabLayoutProps {
|
|
27
|
+
children: React.ReactNode;
|
|
28
|
+
agentId: string;
|
|
29
|
+
}
|
|
30
|
+
export declare const AgentInformationTabLayout: ({ children, agentId }: AgentInformationTabLayoutProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,15 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { AgentMetadataModelSwitcherProps } from './agent-metadata-model-switcher';
|
|
3
|
-
import { AgentMetadataModelListProps } from './agent-metadata-model-list';
|
|
1
|
+
import { GetToolResponse, GetWorkflowResponse } from '@mastra/client-js';
|
|
4
2
|
export interface AgentMetadataProps {
|
|
5
3
|
agentId: string;
|
|
6
|
-
agent: GetAgentResponse;
|
|
7
|
-
hasMemoryEnabled: boolean;
|
|
8
|
-
modelVersion: string;
|
|
9
|
-
updateModel: AgentMetadataModelSwitcherProps['updateModel'];
|
|
10
|
-
resetModel: AgentMetadataModelSwitcherProps['resetModel'];
|
|
11
|
-
updateModelInModelList: AgentMetadataModelListProps['updateModelInModelList'];
|
|
12
|
-
reorderModelList: AgentMetadataModelListProps['reorderModelList'];
|
|
13
4
|
}
|
|
14
5
|
export interface AgentMetadataNetworkListProps {
|
|
15
6
|
agents: {
|
|
@@ -18,7 +9,7 @@ export interface AgentMetadataNetworkListProps {
|
|
|
18
9
|
}[];
|
|
19
10
|
}
|
|
20
11
|
export declare const AgentMetadataNetworkList: ({ agents }: AgentMetadataNetworkListProps) => import("react/jsx-runtime").JSX.Element;
|
|
21
|
-
export declare const AgentMetadata: ({ agentId
|
|
12
|
+
export declare const AgentMetadata: ({ agentId }: AgentMetadataProps) => import("react/jsx-runtime").JSX.Element;
|
|
22
13
|
export interface AgentMetadataToolListProps {
|
|
23
14
|
tools: GetToolResponse[];
|
|
24
15
|
agentId: string;
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
export interface AgentSettingsProps {
|
|
2
|
-
|
|
3
|
-
hasMemory?: boolean;
|
|
4
|
-
hasSubAgents?: boolean;
|
|
2
|
+
agentId: string;
|
|
5
3
|
}
|
|
6
|
-
export declare const AgentSettings: ({
|
|
4
|
+
export declare const AgentSettings: ({ agentId }: AgentSettingsProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -14,3 +14,5 @@ export * from './hooks/use-agent';
|
|
|
14
14
|
export * from './hooks/use-execute-agent-tool';
|
|
15
15
|
export * from './components/AgentToolPanel';
|
|
16
16
|
export * from './components/agent-information/agent-information';
|
|
17
|
+
export * from './components/agent-entity-header';
|
|
18
|
+
export * from './components/agent-information/agent-memory';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export type HeaderListFormItem = {
|
|
2
|
+
name: string;
|
|
3
|
+
value: string;
|
|
4
|
+
};
|
|
5
|
+
export interface HeaderListFormProps {
|
|
6
|
+
headers: Array<HeaderListFormItem>;
|
|
7
|
+
onAddHeader: (header: HeaderListFormItem) => void;
|
|
8
|
+
onRemoveHeader: (index: number) => void;
|
|
9
|
+
}
|
|
10
|
+
export declare const HeaderListForm: ({ headers, onAddHeader, onRemoveHeader }: HeaderListFormProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const PlaygroundConfigGuard: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { StudioConfig } from '../types';
|
|
2
|
+
export type StudioConfigContextType = StudioConfig & {
|
|
3
|
+
isLoading: boolean;
|
|
4
|
+
setConfig: (partialNewConfig: Partial<StudioConfig>) => void;
|
|
5
|
+
};
|
|
6
|
+
export declare const StudioConfigContext: import('../../../../node_modules/@types/react').Context<StudioConfigContextType>;
|
|
7
|
+
export declare const useStudioConfig: () => StudioConfigContextType;
|
|
8
|
+
export interface StudioConfigProviderProps {
|
|
9
|
+
children: React.ReactNode;
|
|
10
|
+
endpoint?: string;
|
|
11
|
+
}
|
|
12
|
+
export declare const StudioConfigProvider: ({ children, endpoint }: StudioConfigProviderProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -6,10 +6,8 @@ export declare function useTraceInfo(trace: SpanRecord | undefined): {
|
|
|
6
6
|
}[];
|
|
7
7
|
type getSpanInfoProps = {
|
|
8
8
|
span: SpanRecord | undefined;
|
|
9
|
-
withTraceId?: boolean;
|
|
10
|
-
withSpanId?: boolean;
|
|
11
9
|
};
|
|
12
|
-
export declare function getSpanInfo({ span
|
|
10
|
+
export declare function getSpanInfo({ span }: getSpanInfoProps): {
|
|
13
11
|
key: string;
|
|
14
12
|
label: string;
|
|
15
13
|
value: string;
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
+
import { UISpanStyle } from '../types';
|
|
1
2
|
export declare const spanTypePrefixes: string[];
|
|
2
|
-
export declare function getSpanTypeUi(type: string):
|
|
3
|
-
icon: React.ReactNode;
|
|
4
|
-
color: string;
|
|
5
|
-
label: string;
|
|
6
|
-
} | null;
|
|
3
|
+
export declare function getSpanTypeUi(type: string): UISpanStyle | null;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { KeyValueListItemData } from '../../../components/ui/elements';
|
|
2
2
|
import { SpanRecord } from '@mastra/core/storage';
|
|
3
|
-
import { ListScoresResponse } from '@mastra/client-js';
|
|
3
|
+
import { ListScoresResponse, GetScorerResponse } from '@mastra/client-js';
|
|
4
4
|
type SpanDialogProps = {
|
|
5
5
|
trace: SpanRecord;
|
|
6
6
|
span?: SpanRecord;
|
|
@@ -16,6 +16,8 @@ type SpanDialogProps = {
|
|
|
16
16
|
defaultActiveTab?: string;
|
|
17
17
|
initialScoreId?: string;
|
|
18
18
|
computeTraceLink: (traceId: string, spanId?: string) => string;
|
|
19
|
+
scorers?: Record<string, GetScorerResponse>;
|
|
20
|
+
isLoadingScorers?: boolean;
|
|
19
21
|
};
|
|
20
|
-
export declare function SpanDialog({ trace, span, spanScoresData, onSpanScoresPageChange, isLoadingSpanScoresData, isOpen, onClose, onNext, onPrevious, onViewToggle, spanInfo, defaultActiveTab, initialScoreId, computeTraceLink, }: SpanDialogProps): import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
export declare function SpanDialog({ trace, span, spanScoresData, onSpanScoresPageChange, isLoadingSpanScoresData, isOpen, onClose, onNext, onPrevious, onViewToggle, spanInfo, defaultActiveTab, initialScoreId, computeTraceLink, scorers, isLoadingScorers, }: SpanDialogProps): import("react/jsx-runtime").JSX.Element;
|
|
21
23
|
export {};
|
|
@@ -1,6 +1,10 @@
|
|
|
1
|
+
import { GetScorerResponse } from '@mastra/client-js';
|
|
1
2
|
export interface SpanScoringProps {
|
|
2
3
|
traceId?: string;
|
|
3
4
|
spanId?: string;
|
|
4
5
|
entityType?: string;
|
|
6
|
+
isTopLevelSpan?: boolean;
|
|
7
|
+
scorers?: Record<string, GetScorerResponse>;
|
|
8
|
+
isLoadingScorers?: boolean;
|
|
5
9
|
}
|
|
6
|
-
export declare const SpanScoring: ({ traceId, spanId, entityType }: SpanScoringProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export declare const SpanScoring: ({ traceId, spanId, entityType, isTopLevelSpan, scorers, isLoadingScorers, }: SpanScoringProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { KeyValueListItemData } from '../../../index';
|
|
2
|
-
import { ListScoresResponse } from '@mastra/client-js';
|
|
2
|
+
import { ListScoresResponse, GetScorerResponse } from '@mastra/client-js';
|
|
3
3
|
import { SpanRecord } from '@mastra/core/storage';
|
|
4
4
|
type SpanTabsProps = {
|
|
5
5
|
trace?: SpanRecord;
|
|
@@ -11,6 +11,8 @@ type SpanTabsProps = {
|
|
|
11
11
|
defaultActiveTab?: string;
|
|
12
12
|
initialScoreId?: string;
|
|
13
13
|
computeTraceLink: (traceId: string, spanId?: string) => string;
|
|
14
|
+
scorers?: Record<string, GetScorerResponse>;
|
|
15
|
+
isLoadingScorers?: boolean;
|
|
14
16
|
};
|
|
15
|
-
export declare function SpanTabs({ trace, span, spanScoresData, onSpanScoresPageChange, isLoadingSpanScoresData, spanInfo, defaultActiveTab, initialScoreId, computeTraceLink, }: SpanTabsProps): import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
export declare function SpanTabs({ trace, span, spanScoresData, onSpanScoresPageChange, isLoadingSpanScoresData, spanInfo, defaultActiveTab, initialScoreId, computeTraceLink, scorers, isLoadingScorers, }: SpanTabsProps): import("react/jsx-runtime").JSX.Element;
|
|
16
18
|
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
type TimelineExpandColProps = {
|
|
2
|
+
isSelected?: boolean;
|
|
3
|
+
isFaded?: boolean;
|
|
4
|
+
isExpanded?: boolean;
|
|
5
|
+
toggleChildren?: () => void;
|
|
6
|
+
expandAllDescendants?: () => void;
|
|
7
|
+
expandedSpanIds?: string[];
|
|
8
|
+
totalDescendants?: number;
|
|
9
|
+
allDescendantsExpanded?: boolean;
|
|
10
|
+
numOfChildren?: number;
|
|
11
|
+
};
|
|
12
|
+
export declare function TimelineExpandCol({ isSelected, isFaded, isExpanded, toggleChildren, expandAllDescendants, totalDescendants, allDescendantsExpanded, numOfChildren, }: TimelineExpandColProps): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { UISpan, UISpanStyle } from '../types';
|
|
2
|
+
type TimelineNameColProps = {
|
|
3
|
+
span: UISpan;
|
|
4
|
+
spanUI?: UISpanStyle | null;
|
|
5
|
+
isFaded?: boolean;
|
|
6
|
+
depth?: number;
|
|
7
|
+
onSpanClick?: (id: string) => void;
|
|
8
|
+
selectedSpanId?: string;
|
|
9
|
+
isLastChild?: boolean;
|
|
10
|
+
hasChildren?: boolean;
|
|
11
|
+
isRootSpan?: boolean;
|
|
12
|
+
isExpanded?: boolean;
|
|
13
|
+
toggleChildren?: () => void;
|
|
14
|
+
};
|
|
15
|
+
export declare function TimelineNameCol({ span, spanUI, isFaded, depth, onSpanClick, selectedSpanId, isLastChild, hasChildren, isRootSpan, isExpanded, toggleChildren, }: TimelineNameColProps): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
type TimelineStructureSignProps = {
|
|
2
|
+
isLastChild?: boolean;
|
|
3
|
+
hasChildren?: boolean;
|
|
4
|
+
expanded?: boolean;
|
|
5
|
+
};
|
|
6
|
+
export declare function TimelineStructureSign({ isLastChild, hasChildren, expanded, }: TimelineStructureSignProps): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { UISpan } from '../types';
|
|
2
|
+
type TimelineTimingColProps = {
|
|
3
|
+
span: UISpan;
|
|
4
|
+
selectedSpanId?: string;
|
|
5
|
+
isFaded?: boolean;
|
|
6
|
+
overallLatency?: number;
|
|
7
|
+
overallStartTime?: string;
|
|
8
|
+
overallEndTime?: string;
|
|
9
|
+
color?: string;
|
|
10
|
+
};
|
|
11
|
+
export declare function TimelineTimingCol({ span, selectedSpanId, isFaded, overallLatency, overallStartTime, color, }: TimelineTimingColProps): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export {};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { SpanRecord } from '@mastra/core/storage';
|
|
2
|
+
import { GetScorerResponse } from '@mastra/client-js';
|
|
2
3
|
type TraceDialogProps = {
|
|
3
4
|
traceSpans?: SpanRecord[];
|
|
4
5
|
traceId?: string;
|
|
@@ -14,6 +15,8 @@ type TraceDialogProps = {
|
|
|
14
15
|
initialSpanId?: string;
|
|
15
16
|
initialSpanTab?: string;
|
|
16
17
|
initialScoreId?: string;
|
|
18
|
+
scorers?: Record<string, GetScorerResponse>;
|
|
19
|
+
isLoadingScorers?: boolean;
|
|
17
20
|
};
|
|
18
|
-
export declare function TraceDialog({ traceId, traceSpans, traceDetails, isOpen, onClose, onNext, onPrevious, isLoadingSpans,
|
|
21
|
+
export declare function TraceDialog({ traceId, traceSpans, traceDetails, isOpen, onClose, onNext, onPrevious, isLoadingSpans, computeTraceLink, initialSpanId, initialSpanTab, initialScoreId, scorers, isLoadingScorers, }: TraceDialogProps): import("react/jsx-runtime").JSX.Element;
|
|
19
22
|
export {};
|
|
@@ -8,6 +8,11 @@ type TraceTimelineSpanProps = {
|
|
|
8
8
|
overallLatency?: number;
|
|
9
9
|
overallStartTime?: string;
|
|
10
10
|
overallEndTime?: string;
|
|
11
|
+
fadedTypes?: string[];
|
|
12
|
+
searchPhrase?: string;
|
|
13
|
+
featuredSpanIds?: string[];
|
|
14
|
+
expandedSpanIds?: string[];
|
|
15
|
+
setExpandedSpanIds?: React.Dispatch<React.SetStateAction<string[]>>;
|
|
11
16
|
};
|
|
12
|
-
export declare function TraceTimelineSpan({ span, depth, onSpanClick, selectedSpanId, isLastChild, overallLatency, overallStartTime, overallEndTime, }: TraceTimelineSpanProps): import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
export declare function TraceTimelineSpan({ span, depth, onSpanClick, selectedSpanId, isLastChild, overallLatency, overallStartTime, overallEndTime, fadedTypes, searchPhrase, featuredSpanIds, expandedSpanIds, setExpandedSpanIds, }: TraceTimelineSpanProps): import("react/jsx-runtime").JSX.Element;
|
|
13
18
|
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { SpanRecord } from '@mastra/core/storage';
|
|
2
|
+
type TraceTimelineLegendProps = {
|
|
3
|
+
spans?: SpanRecord[];
|
|
4
|
+
fadedTypes?: string[];
|
|
5
|
+
onLegendClick?: (val: string) => void;
|
|
6
|
+
onLegendReset?: () => void;
|
|
7
|
+
searchPhrase?: string;
|
|
8
|
+
onSearchPhraseChange?: (val: string) => void;
|
|
9
|
+
traceId?: string;
|
|
10
|
+
};
|
|
11
|
+
export declare function TraceTimelineTools({ spans, fadedTypes, onLegendClick, onLegendReset, onSearchPhraseChange, traceId, }: TraceTimelineLegendProps): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export {};
|
|
@@ -4,6 +4,10 @@ type TraceTimelineProps = {
|
|
|
4
4
|
onSpanClick: (id: string) => void;
|
|
5
5
|
selectedSpanId?: string;
|
|
6
6
|
isLoading?: boolean;
|
|
7
|
+
fadedTypes?: string[];
|
|
8
|
+
expandedSpanIds?: string[];
|
|
9
|
+
setExpandedSpanIds?: React.Dispatch<React.SetStateAction<string[]>>;
|
|
10
|
+
featuredSpanIds?: string[];
|
|
7
11
|
};
|
|
8
|
-
export declare function TraceTimeline({ hierarchicalSpans, onSpanClick, selectedSpanId, isLoading }: TraceTimelineProps): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export declare function TraceTimeline({ hierarchicalSpans, onSpanClick, selectedSpanId, isLoading, fadedTypes, expandedSpanIds, setExpandedSpanIds, featuredSpanIds, }: TraceTimelineProps): import("react/jsx-runtime").JSX.Element;
|
|
9
13
|
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const TracingRunOptions: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { TracingOptions } from '@mastra/core/observability';
|
|
2
|
+
import { ReactNode } from '../../../../node_modules/@types/react';
|
|
3
|
+
export type TracingSettings = {
|
|
4
|
+
tracingOptions?: TracingOptions;
|
|
5
|
+
};
|
|
6
|
+
export type TracingSettingsContextType = {
|
|
7
|
+
setSettings: (settings: TracingSettings) => void;
|
|
8
|
+
resetAll: () => void;
|
|
9
|
+
settings?: TracingSettings;
|
|
10
|
+
};
|
|
11
|
+
export declare const TracingSettingsContext: import('../../../../node_modules/@types/react').Context<TracingSettingsContextType>;
|
|
12
|
+
export interface TracingSettingsProviderProps {
|
|
13
|
+
children: ReactNode;
|
|
14
|
+
entityId: string;
|
|
15
|
+
entityType: 'workflow' | 'agent';
|
|
16
|
+
}
|
|
17
|
+
export declare const TracingSettingsProvider: ({ children, entityId, entityType }: TracingSettingsProviderProps) => import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
export declare const useTracingSettings: () => TracingSettingsContextType;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { TracingSettings } from '../context/tracing-settings-context';
|
|
2
|
+
export interface TracingSettingsStateProps {
|
|
3
|
+
entityId: string;
|
|
4
|
+
entityType: 'workflow' | 'agent';
|
|
5
|
+
}
|
|
6
|
+
export declare function useTracingSettingsState({ entityId, entityType }: TracingSettingsStateProps): {
|
|
7
|
+
settings: TracingSettings | undefined;
|
|
8
|
+
setSettings: (settingsValue: TracingSettings) => void;
|
|
9
|
+
resetAll: () => void;
|
|
10
|
+
};
|
|
@@ -6,4 +6,17 @@ export type UISpan = {
|
|
|
6
6
|
startTime: string;
|
|
7
7
|
endTime?: string;
|
|
8
8
|
spans?: UISpan[];
|
|
9
|
+
parentSpanId?: string | null;
|
|
9
10
|
};
|
|
11
|
+
export type UISpanStyle = {
|
|
12
|
+
icon?: React.ReactNode;
|
|
13
|
+
color?: string;
|
|
14
|
+
label?: string;
|
|
15
|
+
bgColor?: string;
|
|
16
|
+
typePrefix: string;
|
|
17
|
+
};
|
|
18
|
+
export type UISpanState = {
|
|
19
|
+
spanId: string;
|
|
20
|
+
expanded: boolean;
|
|
21
|
+
};
|
|
22
|
+
export type UISpanType = 'agent' | 'workflow' | 'tool' | 'model' | 'other';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { SpanRecord } from '@mastra/core/storage';
|
|
2
|
+
/**
|
|
3
|
+
* Check if a span indicates that the token limit was exceeded
|
|
4
|
+
*/
|
|
5
|
+
export declare function isTokenLimitExceeded(span?: SpanRecord): boolean;
|
|
6
|
+
/**
|
|
7
|
+
* Get a human-readable message for token limit exceeded
|
|
8
|
+
*/
|
|
9
|
+
export declare function getTokenLimitMessage(span?: SpanRecord): string;
|
|
@@ -1,18 +1,38 @@
|
|
|
1
1
|
import { WorkflowRunState, WorkflowStreamResult } from '@mastra/core/workflows';
|
|
2
|
+
import { Dispatch, SetStateAction, ReactNode } from '../../../../node_modules/@types/react';
|
|
3
|
+
import { WorkflowTriggerProps } from '../workflow/workflow-trigger';
|
|
4
|
+
import { TimeTravelParams } from '@mastra/client-js';
|
|
2
5
|
export type WorkflowRunStreamResult = WorkflowStreamResult<any, any, any, any>;
|
|
3
6
|
type WorkflowRunContextType = {
|
|
4
7
|
result: WorkflowRunStreamResult | null;
|
|
5
|
-
setResult:
|
|
8
|
+
setResult: Dispatch<SetStateAction<WorkflowRunStreamResult | null>>;
|
|
6
9
|
payload: any;
|
|
7
|
-
setPayload:
|
|
10
|
+
setPayload: Dispatch<SetStateAction<any>>;
|
|
8
11
|
clearData: () => void;
|
|
9
12
|
snapshot?: WorkflowRunState;
|
|
10
13
|
runId?: string;
|
|
11
|
-
setRunId:
|
|
12
|
-
|
|
14
|
+
setRunId: Dispatch<SetStateAction<string>>;
|
|
15
|
+
workflowError: Error | null;
|
|
16
|
+
observeWorkflowStream?: ({ workflowId, runId, storeRunResult, }: {
|
|
17
|
+
workflowId: string;
|
|
18
|
+
runId: string;
|
|
19
|
+
storeRunResult: WorkflowRunStreamResult | null;
|
|
20
|
+
}) => void;
|
|
21
|
+
closeStreamsAndReset: () => void;
|
|
22
|
+
timeTravelWorkflowStream: (params: {
|
|
23
|
+
workflowId: string;
|
|
24
|
+
requestContext: Record<string, unknown>;
|
|
25
|
+
} & Omit<TimeTravelParams, 'requestContext'>) => Promise<void>;
|
|
26
|
+
runSnapshot?: WorkflowRunState;
|
|
27
|
+
isLoadingRunExecutionResult?: boolean;
|
|
28
|
+
withoutTimeTravel?: boolean;
|
|
29
|
+
} & Omit<WorkflowTriggerProps, 'paramsRunId' | 'setRunId' | 'observeWorkflowStream'>;
|
|
13
30
|
export declare const WorkflowRunContext: import('../../../../node_modules/@types/react').Context<WorkflowRunContextType>;
|
|
14
|
-
export declare function WorkflowRunProvider({ children, snapshot, }: {
|
|
15
|
-
children:
|
|
31
|
+
export declare function WorkflowRunProvider({ children, snapshot, workflowId, initialRunId, withoutTimeTravel, }: {
|
|
32
|
+
children: ReactNode;
|
|
16
33
|
snapshot?: WorkflowRunState;
|
|
34
|
+
workflowId: string;
|
|
35
|
+
initialRunId?: string;
|
|
36
|
+
withoutTimeTravel?: boolean;
|
|
17
37
|
}): import("react/jsx-runtime").JSX.Element;
|
|
18
38
|
export {};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { TimeTravelParams } from '@mastra/client-js';
|
|
1
2
|
import { WorkflowStreamResult as CoreWorkflowStreamResult } from '@mastra/core/workflows';
|
|
2
3
|
export declare const useExecuteWorkflow: () => {
|
|
3
4
|
startWorkflowRun: import('@tanstack/react-query').UseMutationResult<void, Error, {
|
|
@@ -42,6 +43,10 @@ export declare const useStreamWorkflow: () => {
|
|
|
42
43
|
resumeData: Record<string, unknown>;
|
|
43
44
|
requestContext: Record<string, unknown>;
|
|
44
45
|
}, unknown>;
|
|
46
|
+
timeTravelWorkflowStream: import('@tanstack/react-query').UseMutationResult<void, Error, {
|
|
47
|
+
workflowId: string;
|
|
48
|
+
requestContext: Record<string, unknown>;
|
|
49
|
+
} & Omit<TimeTravelParams, "requestContext">, unknown>;
|
|
45
50
|
};
|
|
46
51
|
export declare const useCancelWorkflowRun: () => import('@tanstack/react-query').UseMutationResult<{
|
|
47
52
|
message: string;
|
|
@@ -6,5 +6,6 @@ export interface WorkflowInputDataProps {
|
|
|
6
6
|
submitButtonLabel: string;
|
|
7
7
|
onSubmit: (data: any) => void;
|
|
8
8
|
withoutSubmit?: boolean;
|
|
9
|
+
children?: React.ReactNode;
|
|
9
10
|
}
|
|
10
|
-
export declare const WorkflowInputData: ({ schema, defaultValues, withoutSubmit, isSubmitLoading, submitButtonLabel, onSubmit, }: WorkflowInputDataProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export declare const WorkflowInputData: ({ schema, defaultValues, withoutSubmit, isSubmitLoading, submitButtonLabel, onSubmit, children, }: WorkflowInputDataProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export interface WorkflowStepActionBarProps {
|
|
2
2
|
input?: any;
|
|
3
3
|
output?: any;
|
|
4
|
+
suspendOutput?: any;
|
|
4
5
|
resumeData?: any;
|
|
5
6
|
error?: any;
|
|
6
7
|
stepName: string;
|
|
@@ -8,5 +9,6 @@ export interface WorkflowStepActionBarProps {
|
|
|
8
9
|
mapConfig?: string;
|
|
9
10
|
onShowNestedGraph?: () => void;
|
|
10
11
|
status?: 'running' | 'success' | 'failed' | 'suspended' | 'waiting';
|
|
12
|
+
stepKey?: string;
|
|
11
13
|
}
|
|
12
|
-
export declare const WorkflowStepActionBar: ({ input, output, resumeData, error, mapConfig, stepName, stepId, onShowNestedGraph, status, }: WorkflowStepActionBarProps) => import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export declare const WorkflowStepActionBar: ({ input, output, resumeData, suspendOutput, error, mapConfig, stepName, stepId, onShowNestedGraph, status, stepKey, }: WorkflowStepActionBarProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -9,5 +9,6 @@ export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElemen
|
|
|
9
9
|
size?: 'md' | 'lg';
|
|
10
10
|
variant?: 'default' | 'light';
|
|
11
11
|
target?: string;
|
|
12
|
+
type?: 'button' | 'submit' | 'reset';
|
|
12
13
|
}
|
|
13
14
|
export declare const Button: ({ className, as, size, variant, ...props }: ButtonProps) => import("react/jsx-runtime").JSX.Element;
|