@meridianlabs/inspect-scout-viewer 0.4.7 → 0.4.8
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/lib/app/components/ScoreValue.d.ts +9 -0
- package/lib/app/scan/scanners/dataframe/DataframeGridApiContext.d.ts +7 -0
- package/lib/app/scan/scanners/dataframe/ScannerDataframeCSVButtons.d.ts +9 -0
- package/lib/app/transcript/TranscriptBody.d.ts +4 -0
- package/lib/app/transcript/TranscriptFilterPopover.d.ts +7 -0
- package/lib/app/transcript/hooks/useTranscriptColumnFilter.d.ts +11 -0
- package/lib/app/transcript/hooks/useTranscriptNavigation.d.ts +12 -0
- package/lib/app/transcripts/columnFilter/ColumnFilterEditor.d.ts +13 -0
- package/lib/app/transcripts/columnFilter/DurationInput.d.ts +9 -0
- package/lib/app/transcripts/columnFilter/useAddFilterPopover.d.ts +34 -0
- package/lib/app/transcripts/columnFilter/useColumnFilter.d.ts +9 -1
- package/lib/app/transcripts/columnFilter/useColumnFilterPopover.d.ts +3 -0
- package/lib/app/transcripts/columns.d.ts +7 -0
- package/lib/app/types.d.ts +1 -0
- package/lib/components/AutocompleteInput.d.ts +2 -0
- package/lib/components/FindBand.d.ts +6 -0
- package/lib/components/ToolButton.d.ts +1 -0
- package/lib/components/content/DisplayModeContext.d.ts +9 -0
- package/lib/components/icons.d.ts +1 -0
- package/lib/components/transcript/ScoreEventView.d.ts +0 -1
- package/lib/components/transcript/outline/OutlineRow.d.ts +1 -0
- package/lib/components/transcript/types.d.ts +2 -0
- package/lib/index.js +3533 -1917
- package/lib/index.js.map +1 -1
- package/lib/query/transcriptColumns.d.ts +1 -0
- package/lib/router/url.d.ts +1 -0
- package/lib/state/store.d.ts +11 -1
- package/lib/styles/index.css +375 -212
- package/lib/types/generated.d.ts +294 -0
- package/package.json +1 -1
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { JsonValue } from '../../types/api-types';
|
|
3
|
+
interface ScoreProps {
|
|
4
|
+
score: JsonValue;
|
|
5
|
+
className?: string | string[];
|
|
6
|
+
}
|
|
7
|
+
export declare const ScoreValue: FC<ScoreProps>;
|
|
8
|
+
export declare const renderScore: (value: JsonValue) => string | import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { GridApi } from 'ag-grid-community';
|
|
2
|
+
import { FC, ReactNode } from 'react';
|
|
3
|
+
export declare const DataframeGridApiProvider: FC<{
|
|
4
|
+
children: ReactNode;
|
|
5
|
+
}>;
|
|
6
|
+
export declare const useDataframeGridApi: () => GridApi | null;
|
|
7
|
+
export declare const useSetDataframeGridApi: () => ((api: GridApi | null) => void);
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Button to copy filtered dataframe data as CSV to clipboard.
|
|
4
|
+
*/
|
|
5
|
+
export declare const ScannerDataframeCopyCSVButton: FC;
|
|
6
|
+
/**
|
|
7
|
+
* Button to download filtered dataframe data as a CSV file.
|
|
8
|
+
*/
|
|
9
|
+
export declare const ScannerDataframeDownloadCSVButton: FC;
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import { FC, RefObject } from 'react';
|
|
2
2
|
import { Transcript } from '../../types/api-types';
|
|
3
|
+
export declare const kTranscriptMessagesTabId = "transcript-messages";
|
|
4
|
+
export declare const kTranscriptEventsTabId = "transcript-events";
|
|
5
|
+
export declare const kTranscriptMetadataTabId = "transcript-metadata";
|
|
6
|
+
export declare const kTranscriptInfoTabId = "transcript-info";
|
|
3
7
|
interface TranscriptBodyProps {
|
|
4
8
|
transcript: Transcript;
|
|
5
9
|
scrollRef: RefObject<HTMLDivElement | null>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { EventTypeValue } from '../../../components/transcript/types';
|
|
2
|
+
export declare const kDefaultExcludedEventTypes: EventTypeValue[];
|
|
3
|
+
export declare const useTranscriptColumnFilter: () => {
|
|
4
|
+
excludedEventTypes: string[];
|
|
5
|
+
isDefaultFilter: boolean;
|
|
6
|
+
isDebugFilter: boolean;
|
|
7
|
+
setDefaultFilter: () => void;
|
|
8
|
+
setDebugFilter: () => void;
|
|
9
|
+
toggleEventType: (type: EventTypeValue, isCurrentlyExcluded: boolean) => void;
|
|
10
|
+
arrangedEventTypes: (columns?: number) => ("approval" | "input" | "tool" | "error" | "info" | "logger" | "sandbox" | "model" | "sample_init" | "sample_limit" | "score_edit" | "score" | "span_begin" | "span_end" | "state" | "step" | "store" | "subtask")[];
|
|
11
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Hook for generating deep link URLs to specific events or messages
|
|
3
|
+
* within a transcript.
|
|
4
|
+
*
|
|
5
|
+
* @returns Functions to generate URLs for event and message deep links
|
|
6
|
+
*/
|
|
7
|
+
export declare const useTranscriptNavigation: () => {
|
|
8
|
+
getEventUrl: (eventId: string) => string | undefined;
|
|
9
|
+
getMessageUrl: (messageId: string) => string | undefined;
|
|
10
|
+
getFullEventUrl: (eventId: string) => string | undefined;
|
|
11
|
+
getFullMessageUrl: (messageId: string) => string | undefined;
|
|
12
|
+
};
|
|
@@ -2,17 +2,30 @@ import { FC } from 'react';
|
|
|
2
2
|
import { ScalarValue } from '../../../api/api';
|
|
3
3
|
import { OperatorModel } from '../../../query';
|
|
4
4
|
import { FilterType } from '../../../state/store';
|
|
5
|
+
export interface AvailableColumn {
|
|
6
|
+
id: string;
|
|
7
|
+
label: string;
|
|
8
|
+
}
|
|
5
9
|
export interface ColumnFilterEditorProps {
|
|
6
10
|
columnId: string;
|
|
7
11
|
filterType: FilterType;
|
|
8
12
|
operator: OperatorModel;
|
|
9
13
|
operatorOptions: OperatorModel[];
|
|
10
14
|
rawValue: string;
|
|
15
|
+
/** Second value for BETWEEN/NOT BETWEEN operators */
|
|
16
|
+
rawValue2?: string;
|
|
11
17
|
isValueDisabled: boolean;
|
|
18
|
+
/** True if operator expects a range with two values (BETWEEN, NOT BETWEEN) */
|
|
19
|
+
isRangeOperator?: boolean;
|
|
12
20
|
onOperatorChange: (operator: OperatorModel) => void;
|
|
13
21
|
onValueChange: (value: string) => void;
|
|
22
|
+
/** Handler for second value changes (BETWEEN operators) */
|
|
23
|
+
onValue2Change?: (value: string) => void;
|
|
14
24
|
onCommit?: () => void;
|
|
15
25
|
onCancel?: () => void;
|
|
16
26
|
suggestions?: ScalarValue[];
|
|
27
|
+
mode?: "add" | "edit";
|
|
28
|
+
availableColumns?: AvailableColumn[];
|
|
29
|
+
onColumnChange?: (columnId: string) => void;
|
|
17
30
|
}
|
|
18
31
|
export declare const ColumnFilterEditor: FC<ColumnFilterEditorProps>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ChangeEvent, FC } from 'react';
|
|
2
|
+
export interface DurationInputProps {
|
|
3
|
+
id: string;
|
|
4
|
+
value: string;
|
|
5
|
+
onChange: (event: ChangeEvent<HTMLInputElement>) => void;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
autoFocus?: boolean;
|
|
8
|
+
}
|
|
9
|
+
export declare const DurationInput: FC<DurationInputProps>;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { OperatorModel } from '../../../query';
|
|
2
|
+
import { ColumnFilter } from '../../../state/store';
|
|
3
|
+
export interface AvailableColumn {
|
|
4
|
+
id: string;
|
|
5
|
+
label: string;
|
|
6
|
+
}
|
|
7
|
+
interface UseAddFilterPopoverParams {
|
|
8
|
+
filters: Record<string, ColumnFilter>;
|
|
9
|
+
onAddFilter: (filter: ColumnFilter) => void;
|
|
10
|
+
onFilterColumnChange?: (columnId: string | null) => void;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Hook for managing the "Add Filter" popover state.
|
|
14
|
+
* Wraps useColumnFilter with column selection and open/close logic.
|
|
15
|
+
*/
|
|
16
|
+
export declare function useAddFilterPopover({ filters, onAddFilter, onFilterColumnChange, }: UseAddFilterPopoverParams): {
|
|
17
|
+
isOpen: boolean;
|
|
18
|
+
setIsOpen: import('react').Dispatch<import('react').SetStateAction<boolean>>;
|
|
19
|
+
selectedColumnId: string | null;
|
|
20
|
+
availableColumns: AvailableColumn[];
|
|
21
|
+
operator: "=" | "!=" | "<" | "<=" | ">" | ">=" | "IN" | "NOT IN" | "LIKE" | "NOT LIKE" | "ILIKE" | "NOT ILIKE" | "IS NULL" | "IS NOT NULL" | "BETWEEN" | "NOT BETWEEN";
|
|
22
|
+
setOperator: (op: OperatorModel) => void;
|
|
23
|
+
operatorOptions: ("=" | "!=" | "<" | "<=" | ">" | ">=" | "IN" | "NOT IN" | "LIKE" | "NOT LIKE" | "ILIKE" | "NOT ILIKE" | "IS NULL" | "IS NOT NULL" | "BETWEEN" | "NOT BETWEEN")[];
|
|
24
|
+
value: string;
|
|
25
|
+
setValue: (value: string) => void;
|
|
26
|
+
value2: string;
|
|
27
|
+
setValue2: (value: string) => void;
|
|
28
|
+
isValueDisabled: boolean;
|
|
29
|
+
isRangeOperator: boolean;
|
|
30
|
+
handleColumnChange: (newColumnId: string) => void;
|
|
31
|
+
commitAndClose: () => void;
|
|
32
|
+
cancelAndClose: () => void;
|
|
33
|
+
};
|
|
34
|
+
export {};
|
|
@@ -13,7 +13,15 @@ export interface UseColumnFilterReturn {
|
|
|
13
13
|
operatorOptions: OperatorModel[];
|
|
14
14
|
value: string;
|
|
15
15
|
setValue: (value: string) => void;
|
|
16
|
+
/** Second value for BETWEEN/NOT BETWEEN operators */
|
|
17
|
+
value2: string;
|
|
18
|
+
setValue2: (value: string) => void;
|
|
19
|
+
/** True if operator requires no value (IS NULL, IS NOT NULL) */
|
|
16
20
|
usesValue: boolean;
|
|
17
|
-
|
|
21
|
+
/** True if operator expects a list of values (IN, NOT IN) */
|
|
22
|
+
usesListValue: boolean;
|
|
23
|
+
/** True if operator expects a range with two values (BETWEEN, NOT BETWEEN) */
|
|
24
|
+
usesRangeValue: boolean;
|
|
25
|
+
buildCondition: (operator: OperatorModel, value: string, value2?: string) => SimpleCondition | null | undefined;
|
|
18
26
|
}
|
|
19
27
|
export declare function useColumnFilter({ columnId, filterType, condition, isOpen, }: UseColumnFilterParams): UseColumnFilterReturn;
|
|
@@ -15,7 +15,10 @@ export interface UseColumnFilterPopoverReturn {
|
|
|
15
15
|
operatorOptions: ReturnType<typeof useColumnFilter>["operatorOptions"];
|
|
16
16
|
value: ReturnType<typeof useColumnFilter>["value"];
|
|
17
17
|
setValue: ReturnType<typeof useColumnFilter>["setValue"];
|
|
18
|
+
value2: ReturnType<typeof useColumnFilter>["value2"];
|
|
19
|
+
setValue2: ReturnType<typeof useColumnFilter>["setValue2"];
|
|
18
20
|
isValueDisabled: ReturnType<typeof useColumnFilter>["usesValue"];
|
|
21
|
+
isRangeOperator: ReturnType<typeof useColumnFilter>["usesRangeValue"];
|
|
19
22
|
commitAndClose: () => void;
|
|
20
23
|
cancelAndClose: () => void;
|
|
21
24
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ColumnDef } from '@tanstack/react-table';
|
|
2
2
|
import { FilterType } from '../../state/store';
|
|
3
3
|
import { TranscriptInfo } from '../../types/api-types';
|
|
4
|
+
export declare const COLUMN_LABELS: Record<keyof TranscriptInfo, string>;
|
|
4
5
|
export type TranscriptColumn = ColumnDef<TranscriptInfo> & {
|
|
5
6
|
meta?: {
|
|
6
7
|
align?: "left" | "center" | "right";
|
|
@@ -28,3 +29,9 @@ export declare function getTranscriptColumns(visibleColumnKeys?: Array<keyof Tra
|
|
|
28
29
|
* Extract title value for tooltip from a cell.
|
|
29
30
|
*/
|
|
30
31
|
export declare function getCellTitleValue(cell: any, columnDef: TranscriptColumn): string;
|
|
32
|
+
/**
|
|
33
|
+
* Get the filter type for a given column ID.
|
|
34
|
+
* @param columnId - The column ID to look up
|
|
35
|
+
* @returns The filter type for the column, or "string" as default
|
|
36
|
+
*/
|
|
37
|
+
export declare function getFilterTypeForColumn(columnId: string): FilterType;
|
package/lib/app/types.d.ts
CHANGED
|
@@ -51,6 +51,7 @@ export interface ScanResultData extends ScanResultSummary {
|
|
|
51
51
|
transcriptAgentArgs?: Record<string, unknown>;
|
|
52
52
|
transcriptScore?: JsonValue;
|
|
53
53
|
transcriptSuccess?: boolean;
|
|
54
|
+
transcriptMessageCount?: number;
|
|
54
55
|
transcriptTotalTime?: number;
|
|
55
56
|
transcriptTotalTokens?: number;
|
|
56
57
|
transcriptError?: string;
|
|
@@ -13,5 +13,7 @@ export interface AutocompleteInputProps {
|
|
|
13
13
|
charactersBeforeSuggesting?: number;
|
|
14
14
|
maxSuggestionWidth?: number;
|
|
15
15
|
className?: string;
|
|
16
|
+
/** When true, shows a dropdown toggle icon to browse all options */
|
|
17
|
+
allowBrowse?: boolean;
|
|
16
18
|
}
|
|
17
19
|
export declare const AutocompleteInput: FC<AutocompleteInputProps>;
|
|
@@ -4,6 +4,7 @@ interface ToolButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
|
4
4
|
classes?: string;
|
|
5
5
|
icon?: string;
|
|
6
6
|
latched?: boolean;
|
|
7
|
+
subtle?: boolean;
|
|
7
8
|
}
|
|
8
9
|
export declare const ToolButton: import('react').ForwardRefExoticComponent<ToolButtonProps & import('react').RefAttributes<HTMLButtonElement>>;
|
|
9
10
|
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export type DisplayMode = "rendered" | "raw";
|
|
2
|
+
export interface DisplayModeContextType {
|
|
3
|
+
displayMode: DisplayMode;
|
|
4
|
+
}
|
|
5
|
+
export declare const DisplayModeContext: import('react').Context<DisplayModeContextType | null>;
|
|
6
|
+
/**
|
|
7
|
+
* Hook to access display mode. Returns default "rendered" if no provider exists.
|
|
8
|
+
*/
|
|
9
|
+
export declare const useDisplayMode: () => DisplayMode;
|
|
@@ -5,6 +5,7 @@ export interface OutlineRowProps {
|
|
|
5
5
|
collapseScope: string;
|
|
6
6
|
running?: boolean;
|
|
7
7
|
selected?: boolean;
|
|
8
|
+
getEventUrl?: (eventId: string) => string | undefined;
|
|
8
9
|
}
|
|
9
10
|
export declare const OutlineRow: FC<OutlineRowProps>;
|
|
10
11
|
export declare const summarizeNode: (node: EventNode) => ReactNode;
|
|
@@ -9,6 +9,8 @@ export declare const kTranscriptCollapseScope = "transcript-collapse";
|
|
|
9
9
|
export declare const kTranscriptOutlineCollapseScope = "transcript-outline";
|
|
10
10
|
export declare const kCollapsibleEventTypes: string[];
|
|
11
11
|
export type EventType = SampleInitEvent | SampleLimitEvent | StateEvent | StoreEvent | ModelEvent | LoggerEvent | InfoEvent | StepEvent | SubtaskEvent | ScoreEvent | ScoreEditEvent | ToolEvent | InputEvent | ErrorEvent | ApprovalEvent | SandboxEvent | SpanBeginEvent | SpanEndEvent;
|
|
12
|
+
export declare const eventTypeValues: readonly ["sample_init", "sample_limit", "state", "store", "model", "logger", "info", "step", "subtask", "score", "score_edit", "tool", "input", "error", "approval", "sandbox", "span_begin", "span_end"];
|
|
13
|
+
export type EventTypeValue = (typeof eventTypeValues)[number];
|
|
12
14
|
export declare class EventNode<T extends EventType = EventType> {
|
|
13
15
|
id: string;
|
|
14
16
|
event: T;
|