@meridianlabs/inspect-scout-viewer 0.4.38 → 0.4.39

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (238) hide show
  1. package/lib/AsciinemaPlayerImpl-6ZAkt1g5.js +5854 -0
  2. package/lib/AsciinemaPlayerImpl-6ZAkt1g5.js.map +1 -0
  3. package/lib/e2e/app-navigation.spec.d.ts +1 -0
  4. package/lib/e2e/chat-components.spec.d.ts +1 -0
  5. package/lib/e2e/fixtures/app.d.ts +7 -0
  6. package/lib/e2e/fixtures/handlers.d.ts +2 -0
  7. package/lib/e2e/fixtures/test-data.d.ts +42 -0
  8. package/lib/e2e/scan.spec.d.ts +1 -0
  9. package/lib/e2e/scans.spec.d.ts +1 -0
  10. package/lib/e2e/shared-components.spec.d.ts +1 -0
  11. package/lib/e2e/timeline-migration-baseline.spec.d.ts +8 -0
  12. package/lib/e2e/timeline.spec.d.ts +1 -0
  13. package/lib/e2e/transcript-events.spec.d.ts +1 -0
  14. package/lib/e2e/transcript.spec.d.ts +1 -0
  15. package/lib/e2e/transcripts.spec.d.ts +1 -0
  16. package/lib/index.d.ts +2 -0
  17. package/lib/index.js +128052 -0
  18. package/lib/index.js.map +1 -0
  19. package/lib/src/App.d.ts +6 -0
  20. package/lib/src/AppRouter.d.ts +6 -0
  21. package/lib/src/api/api-scout-server.d.ts +8 -0
  22. package/lib/src/api/api-vscode.d.ts +3 -0
  23. package/lib/src/api/api.d.ts +56 -0
  24. package/lib/src/api/attachmentsHelpers.d.ts +1 -0
  25. package/lib/src/api/expandInputEvents.d.ts +6 -0
  26. package/lib/src/api/jsonrpc-fetch.d.ts +20 -0
  27. package/lib/src/api/jsonrpc.d.ts +50 -0
  28. package/lib/src/api/request.d.ts +30 -0
  29. package/lib/src/api/vscode-storage.d.ts +3 -0
  30. package/lib/src/app/components/ActivityBar.d.ts +23 -0
  31. package/lib/src/app/components/ActivityBarLayout.d.ts +11 -0
  32. package/lib/src/app/components/AddFilterButton.d.ts +37 -0
  33. package/lib/src/app/components/BreadCrumbs.d.ts +10 -0
  34. package/lib/src/app/components/Chip.d.ts +12 -0
  35. package/lib/src/app/components/ChipGroup.d.ts +7 -0
  36. package/lib/src/app/components/ColumnHeader.d.ts +11 -0
  37. package/lib/src/app/components/ColumnPickerButton.d.ts +19 -0
  38. package/lib/src/app/components/ColumnsPopover.d.ts +25 -0
  39. package/lib/src/app/components/DataframeView.d.ts +17 -0
  40. package/lib/src/app/components/DownloadScanButton.d.ts +9 -0
  41. package/lib/src/app/components/EditablePath.d.ts +15 -0
  42. package/lib/src/app/components/EditableText.d.ts +16 -0
  43. package/lib/src/app/components/Error.d.ts +7 -0
  44. package/lib/src/app/components/FilterBar.d.ts +35 -0
  45. package/lib/src/app/components/FindBand.d.ts +6 -0
  46. package/lib/src/app/components/Footer.d.ts +21 -0
  47. package/lib/src/app/components/HeadingGrid.d.ts +15 -0
  48. package/lib/src/app/components/Identifier.d.ts +7 -0
  49. package/lib/src/app/components/NavButtons.d.ts +12 -0
  50. package/lib/src/app/components/Navbar.d.ts +11 -0
  51. package/lib/src/app/components/NextPreviousNav.d.ts +11 -0
  52. package/lib/src/app/components/Pager.d.ts +9 -0
  53. package/lib/src/app/components/ProjectBar.d.ts +7 -0
  54. package/lib/src/app/components/ScansNavbar.d.ts +10 -0
  55. package/lib/src/app/components/ScoreValue.d.ts +12 -0
  56. package/lib/src/app/components/TaskName.d.ts +8 -0
  57. package/lib/src/app/components/TranscriptsNavbar.d.ts +11 -0
  58. package/lib/src/app/components/agGridSetup.d.ts +1 -0
  59. package/lib/src/app/components/columnFilter/ColumnFilterButton.d.ts +6 -0
  60. package/lib/src/app/components/columnFilter/ColumnFilterControl.d.ts +16 -0
  61. package/lib/src/app/components/columnFilter/ColumnFilterEditor.d.ts +32 -0
  62. package/lib/src/app/components/columnFilter/DurationInput.d.ts +9 -0
  63. package/lib/src/app/components/columnFilter/index.d.ts +12 -0
  64. package/lib/src/app/components/columnFilter/useAddFilterPopover.d.ts +35 -0
  65. package/lib/src/app/components/columnFilter/useColumnFilter.d.ts +27 -0
  66. package/lib/src/app/components/columnFilter/useColumnFilterPopover.d.ts +25 -0
  67. package/lib/src/app/components/columnSizing/defaultStrategy.d.ts +2 -0
  68. package/lib/src/app/components/columnSizing/fitContentStrategy.d.ts +2 -0
  69. package/lib/src/app/components/columnSizing/index.d.ts +5 -0
  70. package/lib/src/app/components/columnSizing/strategies.d.ts +10 -0
  71. package/lib/src/app/components/columnSizing/types.d.ts +60 -0
  72. package/lib/src/app/components/columnTypes.d.ts +46 -0
  73. package/lib/src/app/components/dataGrid/DataGrid.d.ts +8 -0
  74. package/lib/src/app/components/dataGrid/index.d.ts +2 -0
  75. package/lib/src/app/components/dataGrid/types.d.ts +70 -0
  76. package/lib/src/app/components/useFilterBarHandlers.d.ts +41 -0
  77. package/lib/src/app/hooks/useFilterConditions.d.ts +6 -0
  78. package/lib/src/app/hooks/useScanFilterConditions.d.ts +6 -0
  79. package/lib/src/app/hooks/useScanResultSummaries.d.ts +6 -0
  80. package/lib/src/app/hooks/useScanRoute.d.ts +8 -0
  81. package/lib/src/app/hooks/useScansFilterBarProps.d.ts +13 -0
  82. package/lib/src/app/hooks/useSelectedScan.d.ts +3 -0
  83. package/lib/src/app/hooks/useSelectedScanDataframe.d.ts +3 -0
  84. package/lib/src/app/hooks/useSelectedScanResultData.d.ts +3 -0
  85. package/lib/src/app/hooks/useSelectedScanResultDetail.d.ts +3 -0
  86. package/lib/src/app/hooks/useSelectedScanner.d.ts +2 -0
  87. package/lib/src/app/hooks/useTranscriptsFilterBarProps.d.ts +18 -0
  88. package/lib/src/app/hooks/useWindowMessaging.d.ts +19 -0
  89. package/lib/src/app/project/ProjectPanel.d.ts +7 -0
  90. package/lib/src/app/project/SettingsContent.d.ts +7 -0
  91. package/lib/src/app/project/components/FormFields.d.ts +73 -0
  92. package/lib/src/app/project/configUtils.d.ts +30 -0
  93. package/lib/src/app/project/hooks/useNestedConfig.d.ts +28 -0
  94. package/lib/src/app/runScan/ActiveScanView.d.ts +6 -0
  95. package/lib/src/app/runScan/DefineScannerSection.d.ts +6 -0
  96. package/lib/src/app/runScan/LlmScannerParams.d.ts +14 -0
  97. package/lib/src/app/runScan/RunScanPanel.d.ts +2 -0
  98. package/lib/src/app/runScan/ScannerParamsPlaceholder.d.ts +6 -0
  99. package/lib/src/app/scan/ScanPanel.d.ts +2 -0
  100. package/lib/src/app/scan/ScanPanelBody.d.ts +6 -0
  101. package/lib/src/app/scan/ScanPanelTitle.d.ts +6 -0
  102. package/lib/src/app/scan/info/ScanInfo.d.ts +5 -0
  103. package/lib/src/app/scan/scanners/ScannerPanel.d.ts +5 -0
  104. package/lib/src/app/scan/scanners/ScannerSidebar.d.ts +5 -0
  105. package/lib/src/app/scan/scanners/dataframe/DataframeGridApiContext.d.ts +7 -0
  106. package/lib/src/app/scan/scanners/dataframe/ScannerDataframeCSVButtons.d.ts +11 -0
  107. package/lib/src/app/scan/scanners/dataframe/ScannerDataframeClearFiltersButton.d.ts +2 -0
  108. package/lib/src/app/scan/scanners/dataframe/ScannerDataframeColumnsPopover.d.ts +5 -0
  109. package/lib/src/app/scan/scanners/dataframe/ScannerDataframeFilterColumnsButton.d.ts +1 -0
  110. package/lib/src/app/scan/scanners/dataframe/ScannerDataframeWrapTextButton.d.ts +2 -0
  111. package/lib/src/app/scan/scanners/dataframe/useOperationStatus.d.ts +7 -0
  112. package/lib/src/app/scan/scanners/list/ScannerResultsGroup.d.ts +6 -0
  113. package/lib/src/app/scan/scanners/list/ScannerResultsHeader.d.ts +7 -0
  114. package/lib/src/app/scan/scanners/list/ScannerResultsList.d.ts +14 -0
  115. package/lib/src/app/scan/scanners/list/ScannerResultsRow.d.ts +9 -0
  116. package/lib/src/app/scan/scanners/results/ScannerResultsBody.d.ts +12 -0
  117. package/lib/src/app/scan/scanners/results/ScannerResultsFilter.d.ts +5 -0
  118. package/lib/src/app/scan/scanners/results/ScannerResultsGroup.d.ts +7 -0
  119. package/lib/src/app/scan/scanners/results/ScannerResultsSearch.d.ts +2 -0
  120. package/lib/src/app/scan/scanners/types.d.ts +1 -0
  121. package/lib/src/app/scannerResult/AllScoresDialog.d.ts +9 -0
  122. package/lib/src/app/scannerResult/ScannerResultHeader.d.ts +13 -0
  123. package/lib/src/app/scannerResult/ScannerResultNav.d.ts +2 -0
  124. package/lib/src/app/scannerResult/ScannerResultPanel.d.ts +2 -0
  125. package/lib/src/app/scannerResult/ScoreColumn.d.ts +15 -0
  126. package/lib/src/app/scannerResult/SourcePath.d.ts +9 -0
  127. package/lib/src/app/scannerResult/error/ErrorPanel.d.ts +7 -0
  128. package/lib/src/app/scannerResult/info/InfoPanel.d.ts +9 -0
  129. package/lib/src/app/scannerResult/metadata/MetadataPanel.d.ts +7 -0
  130. package/lib/src/app/scannerResult/result/ResultBody.d.ts +8 -0
  131. package/lib/src/app/scannerResult/result/ResultPanel.d.ts +9 -0
  132. package/lib/src/app/scannerResult/result/ResultSidebar.d.ts +9 -0
  133. package/lib/src/app/scannerResult/transcript/TranscriptPanel.d.ts +15 -0
  134. package/lib/src/app/scans/ScansFilterBar.d.ts +7 -0
  135. package/lib/src/app/scans/ScansGrid.d.ts +21 -0
  136. package/lib/src/app/scans/ScansPanel.d.ts +2 -0
  137. package/lib/src/app/scans/columnSizing/index.d.ts +3 -0
  138. package/lib/src/app/scans/columnSizing/useColumnSizing.d.ts +33 -0
  139. package/lib/src/app/scans/columns.d.ts +25 -0
  140. package/lib/src/app/scans/constants.d.ts +35 -0
  141. package/lib/src/app/server/index.d.ts +6 -0
  142. package/lib/src/app/server/useActiveScan.d.ts +3 -0
  143. package/lib/src/app/server/useActiveScans.d.ts +3 -0
  144. package/lib/src/app/server/useAdjacentTranscriptIds.d.ts +10 -0
  145. package/lib/src/app/server/useAppConfig.d.ts +20 -0
  146. package/lib/src/app/server/useCode.d.ts +4 -0
  147. package/lib/src/app/server/useHasTranscript.d.ts +8 -0
  148. package/lib/src/app/server/useProjectConfig.d.ts +30 -0
  149. package/lib/src/app/server/useScan.d.ts +9 -0
  150. package/lib/src/app/server/useScanDataframe.d.ts +11 -0
  151. package/lib/src/app/server/useScanDataframeDetail.d.ts +11 -0
  152. package/lib/src/app/server/useScanners.d.ts +3 -0
  153. package/lib/src/app/server/useScansColumnValues.d.ts +11 -0
  154. package/lib/src/app/server/useScansInfinite.d.ts +6 -0
  155. package/lib/src/app/server/useSearches.d.ts +43 -0
  156. package/lib/src/app/server/useServerTranscripts.d.ts +5 -0
  157. package/lib/src/app/server/useServerTranscriptsInfinite.d.ts +13 -0
  158. package/lib/src/app/server/useStartScan.d.ts +3 -0
  159. package/lib/src/app/server/useTopicInvalidation.d.ts +11 -0
  160. package/lib/src/app/server/useTranscript.d.ts +9 -0
  161. package/lib/src/app/server/useTranscriptsColumnValues.d.ts +11 -0
  162. package/lib/src/app/server/useValidations.d.ts +87 -0
  163. package/lib/src/app/settings/SettingsPanel.d.ts +2 -0
  164. package/lib/src/app/timeline/components/TimelineEventsView.d.ts +50 -0
  165. package/lib/src/app/timeline/hooks/useActiveTimeline.d.ts +5 -0
  166. package/lib/src/app/timeline/hooks/useTimeline.d.ts +6 -0
  167. package/lib/src/app/timeline/hooks/useTimelineConfig.d.ts +7 -0
  168. package/lib/src/app/timeline/hooks/useTranscriptTimeline.d.ts +6 -0
  169. package/lib/src/app/transcript/SearchPanel.d.ts +9 -0
  170. package/lib/src/app/transcript/TranscriptBody.d.ts +17 -0
  171. package/lib/src/app/transcript/TranscriptFilterPopover.d.ts +7 -0
  172. package/lib/src/app/transcript/TranscriptNav.d.ts +10 -0
  173. package/lib/src/app/transcript/TranscriptPanel.d.ts +2 -0
  174. package/lib/src/app/transcript/TranscriptTitle.d.ts +7 -0
  175. package/lib/src/app/transcript/debugEventTree.d.ts +4 -0
  176. package/lib/src/app/transcript/hooks/useSearchReferenceLabels.d.ts +12 -0
  177. package/lib/src/app/transcript/hooks/useTranscriptColumnFilter.d.ts +11 -0
  178. package/lib/src/app/transcript/hooks/useTranscriptNavigation.d.ts +14 -0
  179. package/lib/src/app/transcript/hooks/useTranscriptTimeline.d.ts +1 -0
  180. package/lib/src/app/transcript/searchPanelState.d.ts +35 -0
  181. package/lib/src/app/transcript/searchRequest.d.ts +22 -0
  182. package/lib/src/app/transcripts/TranscriptFilterBar.d.ts +8 -0
  183. package/lib/src/app/transcripts/TranscriptsGrid.d.ts +21 -0
  184. package/lib/src/app/transcripts/TranscriptsPanel.d.ts +2 -0
  185. package/lib/src/app/transcripts/columnSizing/index.d.ts +3 -0
  186. package/lib/src/app/transcripts/columnSizing/types.d.ts +22 -0
  187. package/lib/src/app/transcripts/columnSizing/useColumnSizing.d.ts +34 -0
  188. package/lib/src/app/transcripts/columns.d.ts +37 -0
  189. package/lib/src/app/transcripts/constants.d.ts +35 -0
  190. package/lib/src/app/types.d.ts +111 -0
  191. package/lib/src/app/utils/arrow.d.ts +2 -0
  192. package/lib/src/app/utils/arrowHelpers.d.ts +4 -0
  193. package/lib/src/app/utils/autosizeTextarea.d.ts +5 -0
  194. package/lib/src/app/utils/refs.d.ts +6 -0
  195. package/lib/src/app/utils/results.d.ts +17 -0
  196. package/lib/src/app/utils/router.d.ts +1 -0
  197. package/lib/src/app/utils/scan.d.ts +12 -0
  198. package/lib/src/app/utils/transcript.d.ts +29 -0
  199. package/lib/src/app/utils/useScansDir.d.ts +8 -0
  200. package/lib/src/app/utils/useTranscriptsDir.d.ts +8 -0
  201. package/lib/src/app/validation/ValidationPanel.d.ts +2 -0
  202. package/lib/src/app/validation/components/CopyMoveCasesModal.d.ts +24 -0
  203. package/lib/src/app/validation/components/ValidationBulkActions.d.ts +16 -0
  204. package/lib/src/app/validation/components/ValidationCaseCard.d.ts +23 -0
  205. package/lib/src/app/validation/components/ValidationCaseEditor.d.ts +25 -0
  206. package/lib/src/app/validation/components/ValidationCaseLabelsEditor.d.ts +20 -0
  207. package/lib/src/app/validation/components/ValidationCasePredicateSelector.d.ts +19 -0
  208. package/lib/src/app/validation/components/ValidationCaseTargetEditor.d.ts +13 -0
  209. package/lib/src/app/validation/components/ValidationCasesList.d.ts +19 -0
  210. package/lib/src/app/validation/components/ValidationFilterBar.d.ts +14 -0
  211. package/lib/src/app/validation/components/ValidationSetSelector.d.ts +23 -0
  212. package/lib/src/app/validation/components/ValidationSplitSelector.d.ts +23 -0
  213. package/lib/src/app/validation/components/ValidationSummary.d.ts +11 -0
  214. package/lib/src/app/validation/hooks/useTranscriptsByIds.d.ts +13 -0
  215. package/lib/src/app/validation/utils.d.ts +55 -0
  216. package/lib/src/debugging/navigationDebugging.d.ts +8 -0
  217. package/lib/src/icons.d.ts +153 -0
  218. package/lib/src/index.d.ts +5 -0
  219. package/lib/src/main.d.ts +6 -0
  220. package/lib/src/query/column.d.ts +23 -0
  221. package/lib/src/query/conditionBuilder.d.ts +29 -0
  222. package/lib/src/query/index.d.ts +96 -0
  223. package/lib/src/query/transcriptColumns.d.ts +32 -0
  224. package/lib/src/query/types.d.ts +62 -0
  225. package/lib/src/router/activities.d.ts +11 -0
  226. package/lib/src/router/url.d.ts +80 -0
  227. package/lib/src/state/componentStateAdapter.d.ts +2 -0
  228. package/lib/src/state/userSettings.d.ts +28 -0
  229. package/lib/src/test/objectFactories.d.ts +4 -0
  230. package/lib/src/test/setup-msw.d.ts +1 -0
  231. package/lib/src/test/test-utils.d.ts +7 -0
  232. package/lib/src/theme/bootstrap.d.ts +6 -0
  233. package/lib/src/theme/resolveTheme.d.ts +19 -0
  234. package/lib/src/types/api-types.d.ts +50 -0
  235. package/lib/src/types/generated.d.ts +5182 -0
  236. package/lib/src/types/json-value.d.ts +12 -0
  237. package/lib/styles/index.css +10953 -0
  238. package/package.json +2 -1
@@ -0,0 +1,34 @@
1
+ import { ColumnSizingState, OnChangeFn } from '@tanstack/react-table';
2
+ import { TranscriptInfo } from '../../../types/api-types';
3
+ import { ColumnSizingStrategyKey } from '../../components/columnSizing';
4
+ import { TranscriptColumn } from '../columns';
5
+ interface UseColumnSizingOptions {
6
+ /** Column definitions */
7
+ columns: TranscriptColumn[];
8
+ /** Reference to the table element for DOM measurement */
9
+ tableRef: React.RefObject<HTMLTableElement | null>;
10
+ /** Current data for content measurement */
11
+ data: TranscriptInfo[];
12
+ }
13
+ interface UseColumnSizingResult {
14
+ /** Current column sizing state */
15
+ columnSizing: ColumnSizingState;
16
+ /** Handler for column sizing changes with min/max enforcement */
17
+ handleColumnSizingChange: OnChangeFn<ColumnSizingState>;
18
+ /** Current sizing strategy key */
19
+ sizingStrategy: ColumnSizingStrategyKey;
20
+ /** Set the sizing strategy */
21
+ setSizingStrategy: (strategy: ColumnSizingStrategyKey) => void;
22
+ /** Apply auto-sizing based on current strategy (preserves manually resized columns) */
23
+ applyAutoSizing: () => void;
24
+ /** Reset a single column to its auto-calculated size */
25
+ resetColumnSize: (columnId: string) => void;
26
+ /** Reset all column sizing and clear manual resize tracking */
27
+ clearColumnSizing: () => void;
28
+ }
29
+ /**
30
+ * Hook for managing column sizing with min/max constraints and auto-sizing.
31
+ * Manually resized columns are preserved during auto-sizing operations.
32
+ */
33
+ export declare function useColumnSizing({ columns, tableRef, data, }: UseColumnSizingOptions): UseColumnSizingResult;
34
+ export {};
@@ -0,0 +1,37 @@
1
+ import { ColumnDef } from '@tanstack/react-table';
2
+ import { FilterType } from '../../state/store';
3
+ import { TranscriptInfo } from '../../types/api-types';
4
+ import { AvailableColumn } from '../components/columnFilter';
5
+ export declare const COLUMN_LABELS: Record<keyof TranscriptInfo, string>;
6
+ export declare const COLUMN_HEADER_TITLES: Record<keyof TranscriptInfo, string>;
7
+ export type TranscriptColumn = ColumnDef<TranscriptInfo> & {
8
+ meta?: {
9
+ align?: "left" | "center" | "right";
10
+ filterable?: boolean;
11
+ filterType?: FilterType;
12
+ };
13
+ /** Returns string for tooltip display */
14
+ titleValue?: (value: unknown) => string;
15
+ /** Returns string representation for column width measurement. Return null to skip content measurement. */
16
+ textValue?: (value: unknown) => string | null;
17
+ /** Minimum column width in pixels */
18
+ minSize?: number;
19
+ /** Maximum column width in pixels */
20
+ maxSize?: number;
21
+ /** Tooltip text for the column header */
22
+ headerTitle?: string;
23
+ };
24
+ export declare const ALL_COLUMNS: Record<keyof TranscriptInfo, TranscriptColumn>;
25
+ export declare const DEFAULT_COLUMN_ORDER: Array<keyof TranscriptInfo>;
26
+ export declare const DEFAULT_VISIBLE_COLUMNS: Array<keyof TranscriptInfo>;
27
+ /**
28
+ * Get columns for the TranscriptsGrid.
29
+ * @param visibleColumnKeys - Optional list of column keys to display. If not provided, returns all columns in default order.
30
+ * @returns Array of column definitions in the order specified or default order.
31
+ */
32
+ export declare function getTranscriptColumns(visibleColumnKeys?: Array<keyof TranscriptInfo>): TranscriptColumn[];
33
+ /**
34
+ * Extract title value for tooltip from a cell.
35
+ */
36
+ export declare function getCellTitleValue(cell: any, columnDef: TranscriptColumn): string;
37
+ export declare const FILTER_COLUMNS: AvailableColumn[];
@@ -0,0 +1,35 @@
1
+ /**
2
+ * Infinite Scroll Tuning
3
+ *
4
+ * Goal: user never hits bottom while waiting for next page.
5
+ *
6
+ * Formula: threshold >= scroll_speed × fetch_duration
7
+ *
8
+ * Assumptions:
9
+ * row_height = 29px
10
+ * fetch_duration = 300-1000ms (variable with fixed overhead)
11
+ * max_scroll_speed = 1500px/s (typical fast scroller)
12
+ *
13
+ * Check at typical speed (1500px/s):
14
+ * runway_time = 2000px / 1500px/s = 1333ms
15
+ * worst_case_fetch = 1000ms
16
+ * margin = 333ms ✓
17
+ *
18
+ * Check at extreme speed (5000px/s):
19
+ * runway_time = 2000px / 5000px/s = 400ms
20
+ * median_fetch = ~350ms
21
+ * margin = 50ms (tight but ok) ✓
22
+ *
23
+ * Why large pageSize? Fetch duration is mostly fixed overhead, so larger
24
+ * pages = fewer fetches = fewer stall opportunities. 500 rows gives ~9.7s
25
+ * of scrolling per page at 1500px/s.
26
+ *
27
+ * Note: If threshold > pageSize_px, the next page is prefetched immediately
28
+ * after the current page loads. This is fine for maximum smoothness.
29
+ */
30
+ export declare const TRANSCRIPTS_INFINITE_SCROLL_CONFIG: {
31
+ /** Number of rows to fetch per page (500 rows = 14,500px at 29px/row) */
32
+ readonly pageSize: 500;
33
+ /** Distance from bottom (in px) at which to trigger fetch (~69 rows) */
34
+ readonly threshold: 2000;
35
+ };
@@ -0,0 +1,111 @@
1
+ import { ChatMessage, Event, JsonValue, ModelUsage } from '@tsmono/inspect-common/types';
2
+ import { EventType } from '@tsmono/inspect-components/transcript';
3
+ import { ScannerInput, ScannerInputResponse, Transcript } from '../types/api-types';
4
+ export interface ScanResultSummary {
5
+ identifier: string;
6
+ uuid?: string;
7
+ explanation?: string;
8
+ label?: string;
9
+ timestamp?: string;
10
+ inputType: ScannerInputResponse["input_type"];
11
+ eventReferences: ScanResultReference[];
12
+ messageReferences: ScanResultReference[];
13
+ validationResult: boolean | Record<string, boolean>;
14
+ validationTarget: JsonValue;
15
+ value: string | boolean | number | null | unknown[] | object;
16
+ valueType: ScanResultValueType;
17
+ scanError?: string;
18
+ scanErrorRefusal?: boolean;
19
+ transcriptSourceId: string;
20
+ transcriptTaskSet?: string;
21
+ transcriptTaskId?: string | number;
22
+ transcriptTaskRepeat?: number;
23
+ transcriptModel?: string;
24
+ transcriptMetadata: Record<string, JsonValue>;
25
+ }
26
+ export interface ScanResultData extends ScanResultSummary {
27
+ answer?: string;
28
+ inputIds: string[];
29
+ metadata: Record<string, JsonValue>;
30
+ scanError?: string;
31
+ scanErrorTraceback?: string;
32
+ scanErrorRefusal?: boolean;
33
+ scanEvents?: Event[];
34
+ scanId: string;
35
+ scanMetadata: Record<string, JsonValue>;
36
+ scanModelUsage: Record<string, ModelUsage>;
37
+ scanTags: string[];
38
+ scanTotalTokens: number;
39
+ scannerFile: string;
40
+ scannerKey: string;
41
+ scannerName: string;
42
+ scannerParams: Record<string, JsonValue>;
43
+ transcriptId: string;
44
+ transcriptSourceUri: string;
45
+ transcriptDate?: string;
46
+ transcriptAgent?: string;
47
+ transcriptAgentArgs?: Record<string, unknown>;
48
+ transcriptScore?: JsonValue;
49
+ transcriptSuccess?: boolean;
50
+ transcriptMessageCount?: number;
51
+ transcriptTotalTime?: number;
52
+ transcriptTotalTokens?: number;
53
+ transcriptError?: string;
54
+ transcriptLimit?: string;
55
+ }
56
+ export interface ScanResultReference {
57
+ type: "message" | "event";
58
+ id: string;
59
+ cite?: string;
60
+ }
61
+ export interface SortColumn {
62
+ column: string;
63
+ direction: "asc" | "desc";
64
+ }
65
+ export type ErrorScope = "scans" | "scanner" | "dataframe" | "dataframe_input" | "transcripts";
66
+ export type ResultGroup = "source" | "label" | "id" | "epoch" | "model" | "none";
67
+ export type ScanResultValueType = "boolean" | "number" | "string" | "array" | "object" | "null";
68
+ export declare function isStringValue(result: ScanResultSummary): result is ScanResultSummary & {
69
+ valueType: "string";
70
+ value: string;
71
+ };
72
+ export declare function isNumberValue(result: ScanResultSummary): result is ScanResultSummary & {
73
+ valueType: "number";
74
+ value: number;
75
+ };
76
+ export declare function isBooleanValue(result: ScanResultSummary): result is ScanResultSummary & {
77
+ valueType: "boolean";
78
+ value: boolean;
79
+ };
80
+ export declare function isNullValue(result: ScanResultSummary): result is ScanResultSummary & {
81
+ valueType: "null";
82
+ value: null;
83
+ };
84
+ export declare function isArrayValue(result: ScanResultSummary): result is ScanResultSummary & {
85
+ valueType: "array";
86
+ value: unknown[];
87
+ };
88
+ export declare function isObjectValue(result: ScanResultSummary): result is ScanResultSummary & {
89
+ valueType: "object";
90
+ value: Record<string, unknown>;
91
+ };
92
+ export declare function isTranscriptInput(input: ScannerInput): input is ScannerInput & {
93
+ input_type: "transcript";
94
+ input: Transcript;
95
+ };
96
+ export declare function isMessageInput(input: ScannerInput): input is ScannerInput & {
97
+ input_type: "message";
98
+ input: ChatMessage;
99
+ };
100
+ export declare function isMessagesInput(input: ScannerInput): input is ScannerInput & {
101
+ input_type: "messages";
102
+ input: ChatMessage[];
103
+ };
104
+ export declare function isEventInput(input: ScannerInput): input is ScannerInput & {
105
+ input_type: "event";
106
+ input: EventType;
107
+ };
108
+ export declare function isEventsInput(input: ScannerInput): input is ScannerInput & {
109
+ input_type: "events";
110
+ input: Event[];
111
+ };
@@ -0,0 +1,2 @@
1
+ import { ColumnTable } from 'arquero';
2
+ export declare function expandResultsetRows(columnTable: ColumnTable): Promise<ColumnTable>;
@@ -0,0 +1,4 @@
1
+ import { ColumnTable } from 'arquero';
2
+ import { ScanResultData, ScanResultSummary } from '../types';
3
+ export declare const parseScanResultData: (filtered: ColumnTable) => Promise<ScanResultData>;
4
+ export declare const parseScanResultSummaries: (rowData: object[]) => Promise<ScanResultSummary[]>;
@@ -0,0 +1,5 @@
1
+ export type AutosizeTextareaConfig = {
2
+ minRows: number;
3
+ maxRows: number;
4
+ };
5
+ export declare function autosizeTextarea(el: HTMLElement, config: AutosizeTextareaConfig): void;
@@ -0,0 +1,6 @@
1
+ import { MarkdownReference } from '@tsmono/react/components';
2
+ import { ScannerInput } from '../../types/api-types';
3
+ import { ScanResultSummary } from '../types';
4
+ export type MakeReferenceUrl = (ref: string, type: "message" | "event") => string | undefined;
5
+ export declare const useMarkdownRefs: (summary?: ScanResultSummary, inputData?: ScannerInput) => MarkdownReference[];
6
+ export declare const toMarkdownRefs: (summary: ScanResultSummary, makeReferenceUrl: MakeReferenceUrl, inputData?: ScannerInput) => MarkdownReference[];
@@ -0,0 +1,17 @@
1
+ import { ScanResultSummary, SortColumn } from '../types';
2
+ export interface IdentifierInfo {
3
+ taskSet?: string;
4
+ id: string | number;
5
+ secondaryId?: string | number;
6
+ epoch?: number;
7
+ }
8
+ export declare const resultIdentifierStr: (summary?: ScanResultSummary) => string | undefined;
9
+ export declare const resultIdentifier: (summary?: ScanResultSummary) => IdentifierInfo;
10
+ export declare const resultLog: (summary: ScanResultSummary) => string | undefined;
11
+ /**
12
+ * Stringify a ScanResultSummary value for text search.
13
+ * Handles all valueType variants so search covers the displayed result content.
14
+ */
15
+ export declare const stringifyValue: (s: ScanResultSummary) => string;
16
+ export declare const sortValue: (a: ScanResultSummary, b: ScanResultSummary) => number;
17
+ export declare const sortByColumns: (a: ScanResultSummary, b: ScanResultSummary, sortColumns: SortColumn[]) => number;
@@ -0,0 +1 @@
1
+ export declare const useTranscriptDirParams: () => string | undefined;
@@ -0,0 +1,12 @@
1
+ import { Status } from '../../types/api-types';
2
+ /**
3
+ * Gets the display name for a scan.
4
+ *
5
+ * Uses the relative path from the scans directory when available,
6
+ * providing a more informative title that includes the directory structure.
7
+ *
8
+ * @param scan - The scan status object, or undefined if loading
9
+ * @param scansDir - The base scans directory for computing relative paths
10
+ * @returns The scan display name, or undefined if scan is undefined
11
+ */
12
+ export declare function getScanDisplayName(scan: Status | undefined, scansDir: string | undefined): string | undefined;
@@ -0,0 +1,29 @@
1
+ import { Transcript } from '../../types/api-types';
2
+ interface TaskNameParts {
3
+ taskSet?: string | null;
4
+ taskId?: string | number | null;
5
+ taskRepeat?: number | null;
6
+ }
7
+ /**
8
+ * Formats task name parts into a display string.
9
+ *
10
+ * Produces a string like "taskSet/taskId (taskRepeat)" with optional parts:
11
+ * - If only taskSet: "taskSet"
12
+ * - If only taskId: "taskId"
13
+ * - If both: "taskSet/taskId"
14
+ * - With repeat: "taskSet/taskId (1)"
15
+ *
16
+ * @param parts - Object containing taskSet, taskId, and taskRepeat
17
+ * @returns Formatted task name string, or undefined if no parts are available
18
+ */
19
+ export declare function formatTaskName(parts: TaskNameParts): string | undefined;
20
+ /**
21
+ * Gets the display name for a transcript.
22
+ *
23
+ * Uses taskSet/taskId/taskRepeat when available, falls back to task_id.
24
+ *
25
+ * @param transcript - The transcript object, or undefined if loading
26
+ * @returns The transcript display name, or undefined if transcript is undefined
27
+ */
28
+ export declare function getTranscriptDisplayName(transcript: Transcript | undefined): string | undefined;
29
+ export {};
@@ -0,0 +1,8 @@
1
+ interface UseScansDirResult {
2
+ displayScansDir: string;
3
+ resolvedScansDir: string;
4
+ resolvedScansDirSource: "route" | "user" | "project" | "cli";
5
+ setScansDir: (path: string) => void;
6
+ }
7
+ export declare function useScansDir(useRouteParam?: boolean): UseScansDirResult;
8
+ export {};
@@ -0,0 +1,8 @@
1
+ interface UseTranscriptsDirResult {
2
+ displayTranscriptsDir: string;
3
+ resolvedTranscriptsDir: string;
4
+ resolvedTranscriptsDirSource: "route" | "user" | "project" | "cli";
5
+ setTranscriptsDir: (path: string) => void;
6
+ }
7
+ export declare function useTranscriptsDir(useRouteParam?: boolean): UseTranscriptsDirResult;
8
+ export {};
@@ -0,0 +1,2 @@
1
+ import { FC } from 'react';
2
+ export declare const ValidationPanel: FC;
@@ -0,0 +1,24 @@
1
+ import { FC } from 'react';
2
+ import { ValidationCase } from '../../../types/api-types';
3
+ interface CopyMoveCasesModalProps {
4
+ /** Whether to show the modal */
5
+ show: boolean;
6
+ /** Copy or move mode */
7
+ mode: "copy" | "move";
8
+ /** Source validation set URI */
9
+ sourceUri: string;
10
+ /** Selected case IDs */
11
+ selectedIds: string[];
12
+ /** Full case data for selected cases */
13
+ selectedCases: ValidationCase[];
14
+ /** Callback when modal is closed */
15
+ onHide: () => void;
16
+ /** Callback on successful operation (used to clear selection) */
17
+ onSuccess: () => void;
18
+ }
19
+ /**
20
+ * Modal for copying or moving validation cases to another validation set.
21
+ * Supports selecting an existing set or creating a new one.
22
+ */
23
+ export declare const CopyMoveCasesModal: FC<CopyMoveCasesModalProps>;
24
+ export {};
@@ -0,0 +1,16 @@
1
+ import { FC } from 'react';
2
+ import { ValidationCase } from '../../../types/api-types';
3
+ interface ValidationBulkActionsProps {
4
+ cases: ValidationCase[];
5
+ selectedIds: string[];
6
+ onBulkSplitChange: (ids: string[], split: string | null) => void;
7
+ onBulkDelete: (ids: string[]) => void;
8
+ isUpdating?: boolean;
9
+ isDeleting?: boolean;
10
+ }
11
+ /**
12
+ * Bulk actions for selected validation cases.
13
+ * Includes split assignment and delete functionality.
14
+ */
15
+ export declare const ValidationBulkActions: FC<ValidationBulkActionsProps>;
16
+ export {};
@@ -0,0 +1,23 @@
1
+ import { CSSProperties, FC } from 'react';
2
+ import { TranscriptInfo, ValidationCase } from '../../../types/api-types';
3
+ interface ValidationCaseCardProps {
4
+ validationCase: ValidationCase;
5
+ transcript?: TranscriptInfo;
6
+ transcriptsDir: string | undefined;
7
+ validationSetUri?: string;
8
+ isSelected: boolean;
9
+ onSelectionChange: (selected: boolean) => void;
10
+ existingSplits: string[];
11
+ onSplitChange?: (split: string | null) => void;
12
+ onDelete?: () => void;
13
+ isUpdating?: boolean;
14
+ isDeleting?: boolean;
15
+ showLabels?: boolean;
16
+ showTarget?: boolean;
17
+ gridStyle?: CSSProperties;
18
+ }
19
+ /**
20
+ * Card component for displaying a single validation case.
21
+ */
22
+ export declare const ValidationCaseCard: FC<ValidationCaseCardProps>;
23
+ export {};
@@ -0,0 +1,25 @@
1
+ import { default as React, FC } from 'react';
2
+ interface ValidationCaseEditorProps {
3
+ transcriptId: string;
4
+ taskId?: string | null;
5
+ taskRepeat?: number | null;
6
+ className?: string | string[];
7
+ }
8
+ export declare const ValidationCaseEditor: FC<ValidationCaseEditorProps>;
9
+ interface SidebarPanelProps {
10
+ children: React.ReactNode;
11
+ }
12
+ export declare const SidebarPanel: FC<SidebarPanelProps>;
13
+ interface SidebarHeaderProps {
14
+ icon?: string;
15
+ title?: string;
16
+ secondary?: string;
17
+ actions?: React.ReactNode;
18
+ onClose?: () => void;
19
+ }
20
+ export declare const SidebarHeader: FC<SidebarHeaderProps>;
21
+ export declare const SecondaryDisplayValue: FC<{
22
+ label: string;
23
+ value: string;
24
+ }>;
25
+ export {};
@@ -0,0 +1,20 @@
1
+ import { FC } from 'react';
2
+ interface ValidationCaseLabelsEditorProps {
3
+ /** Current labels for the validation case (null means no labels set) */
4
+ labels: {
5
+ [key: string]: boolean;
6
+ } | null;
7
+ /** Unique label keys from other cases for autocomplete suggestions */
8
+ availableLabels: string[];
9
+ /** Callback when labels change */
10
+ onChange: (labels: {
11
+ [key: string]: boolean;
12
+ } | null) => void;
13
+ }
14
+ /**
15
+ * Editor component for managing labels on a validation case.
16
+ * Displays existing labels as chips with remove buttons,
17
+ * and provides an "Add" chip to add new labels via popover.
18
+ */
19
+ export declare const ValidationCaseLabelsEditor: FC<ValidationCaseLabelsEditorProps>;
20
+ export {};
@@ -0,0 +1,19 @@
1
+ import { FC } from 'react';
2
+ import { ValidationCase } from '../../../types/api-types';
3
+ type Predicate = "gt" | "gte" | "lt" | "lte" | "eq" | "ne" | "contains" | "startswith" | "endswith" | "icontains" | "iequals";
4
+ interface ValidationCasePredicateSelectorProps {
5
+ value: Predicate | null;
6
+ onChange: (predicate: Predicate) => void;
7
+ disabled?: boolean;
8
+ existingPredicates?: Predicate[];
9
+ }
10
+ /**
11
+ * Dropdown component for selecting a validation case predicate.
12
+ */
13
+ export declare const ValidationCasePredicateSelector: FC<ValidationCasePredicateSelectorProps>;
14
+ /**
15
+ * Extracts unique predicate values from a list of validation cases.
16
+ * Returns sorted array of non-empty split values.
17
+ */
18
+ export declare const extractUniquePredicates: (cases: ValidationCase[]) => Predicate[];
19
+ export {};
@@ -0,0 +1,13 @@
1
+ import { FC } from 'react';
2
+ import { JsonValue } from '@tsmono/inspect-common/types';
3
+ interface ValidationCaseTargetEditorProps {
4
+ target?: JsonValue;
5
+ onChange: (newTarget: string) => void;
6
+ /** Called when the mode changes (e.g., user selects "other" radio) */
7
+ onModeChange?: (isOtherMode: boolean) => void;
8
+ }
9
+ /**
10
+ * Editor component for modifying the target of a validation case.
11
+ */
12
+ export declare const ValidationCaseTargetEditor: FC<ValidationCaseTargetEditorProps>;
13
+ export {};
@@ -0,0 +1,19 @@
1
+ import { FC } from 'react';
2
+ import { ValidationCase } from '../../../types/api-types';
3
+ interface ValidationCasesListProps {
4
+ cases: ValidationCase[];
5
+ transcriptsDir: string | undefined;
6
+ sourceUri: string | undefined;
7
+ onBulkSplitChange?: (ids: string[], split: string | null) => void;
8
+ onBulkDelete?: (ids: string[]) => void;
9
+ onSingleSplitChange?: (caseId: string, split: string | null) => void;
10
+ onSingleDelete?: (caseId: string) => void;
11
+ isUpdating?: boolean;
12
+ isDeleting?: boolean;
13
+ }
14
+ /**
15
+ * List component for displaying and managing validation cases.
16
+ * Includes filtering, selection, and individual case cards.
17
+ */
18
+ export declare const ValidationCasesList: FC<ValidationCasesListProps>;
19
+ export {};
@@ -0,0 +1,14 @@
1
+ import { FC } from 'react';
2
+ import { ValidationCase } from '../../../types/api-types';
3
+ interface ValidationFilterBarProps {
4
+ cases: ValidationCase[];
5
+ splitFilter: string | undefined;
6
+ onSplitFilterChange: (split: string | undefined) => void;
7
+ searchText: string | undefined;
8
+ onSearchTextChange: (text: string | undefined) => void;
9
+ }
10
+ /**
11
+ * Filter bar with split dropdown and ID search.
12
+ */
13
+ export declare const ValidationFilterBar: FC<ValidationFilterBarProps>;
14
+ export {};
@@ -0,0 +1,23 @@
1
+ import { FC } from 'react';
2
+ import { AppConfig } from '../../../types/api-types';
3
+ interface ValidationSetSelectorProps {
4
+ validationSets: string[];
5
+ selectedUri: string | undefined;
6
+ onSelect: (uri: string | undefined) => void;
7
+ /** Size trigger to fit longest option (default: false) */
8
+ autoSize?: boolean;
9
+ /** Adds a create new option the dropown */
10
+ allowCreate?: boolean;
11
+ onCreate?: (name: string) => void;
12
+ /** Whether a create operation is currently in progress */
13
+ createPending?: boolean;
14
+ /** Project directory path for displaying full file path in create modal */
15
+ appConfig?: AppConfig;
16
+ }
17
+ /**
18
+ * Select-box component for selecting validation sets.
19
+ * Shows collapsed trigger with 2-line display (filename + path).
20
+ * Opens dropdown on click with keyboard navigation support.
21
+ */
22
+ export declare const ValidationSetSelector: FC<ValidationSetSelectorProps>;
23
+ export {};
@@ -0,0 +1,23 @@
1
+ import { FC } from 'react';
2
+ interface ValidationSplitSelectorProps {
3
+ /** Current split value (null means no split) */
4
+ value: string | null;
5
+ /** Available splits for the dropdown */
6
+ existingSplits: string[];
7
+ /** Callback when split changes */
8
+ onChange: (split: string | null) => void;
9
+ /** Disable the selector */
10
+ disabled?: boolean;
11
+ /** Additional className for the select element */
12
+ className?: string;
13
+ /** Label for "no split" option */
14
+ noSplitLabel?: string;
15
+ /** Label for "new split" option */
16
+ newSplitLabel?: string;
17
+ }
18
+ /**
19
+ * Reusable split selector component with built-in "New Split" modal.
20
+ * Style-agnostic: consumers control styling via className prop.
21
+ */
22
+ export declare const ValidationSplitSelector: FC<ValidationSplitSelectorProps>;
23
+ export {};
@@ -0,0 +1,11 @@
1
+ import { FC } from 'react';
2
+ import { ValidationCase } from '../../../types/api-types';
3
+ interface ValidationSummaryProps {
4
+ cases: ValidationCase[];
5
+ }
6
+ /**
7
+ * Displays summary statistics for a validation set in a compact inline format:
8
+ * N cases | splits: [badge] [badge]
9
+ */
10
+ export declare const ValidationSummary: FC<ValidationSummaryProps>;
11
+ export {};
@@ -0,0 +1,13 @@
1
+ import { TranscriptInfo } from '../../../types/api-types';
2
+ /**
3
+ * Hook to fetch transcripts by their IDs using an IN query.
4
+ * Returns a map of transcript_id -> TranscriptInfo for quick lookups.
5
+ * Also returns sourceIds for staleness detection - consumers should only
6
+ * trust lookups when the requested ID was in the sourceIds set.
7
+ */
8
+ export declare const useTranscriptsByIds: (transcriptsDir: string | undefined, ids: string[]) => {
9
+ data: Map<string, TranscriptInfo> | undefined;
10
+ sourceIds: Set<string> | undefined;
11
+ loading: boolean;
12
+ error: Error | null;
13
+ };
@@ -0,0 +1,55 @@
1
+ import { ValidationCase } from '../../types/api-types';
2
+ /** Valid file extensions for validation set files */
3
+ export declare const VALIDATION_SET_EXTENSIONS: string[];
4
+ /**
5
+ * Check if a filename has a valid validation set extension.
6
+ */
7
+ export declare const hasValidationSetExtension: (name: string) => boolean;
8
+ /**
9
+ * Converts a validation case ID to a display string.
10
+ * Handles both single string IDs and composite (array) IDs.
11
+ */
12
+ export declare const getIdText: (id: string | string[]) => string;
13
+ /**
14
+ * Converts a validation case ID to a unique key for use in Maps/Sets.
15
+ * Uses "|" as separator for composite IDs.
16
+ */
17
+ export declare const getCaseKey: (id: string | string[]) => string;
18
+ /**
19
+ * Extracts unique label keys from a list of validation cases.
20
+ * Returns sorted array of label key names.
21
+ */
22
+ export declare const extractUniqueLabels: (cases: ValidationCase[]) => string[];
23
+ /**
24
+ * Extracts unique split values from a list of validation cases.
25
+ * Returns sorted array of non-empty split values.
26
+ */
27
+ export declare const extractUniqueSplits: (cases: ValidationCase[]) => string[];
28
+ /**
29
+ * Extracts the filename from a URI/path.
30
+ * @param uri - The full URI or path
31
+ * @param stripExtension - If true, removes common validation file extensions
32
+ */
33
+ export declare const getFilenameFromUri: (uri: string, stripExtension?: boolean) => string;
34
+ /**
35
+ * Extracts the directory portion of a URI (everything before the filename).
36
+ * @param uri - The full URI (e.g., "file:///path/to/file.csv")
37
+ * @returns The directory URI without trailing slash
38
+ */
39
+ export declare const getDirFromUri: (uri: string) => string;
40
+ /**
41
+ * Generates a new file URI in the same directory as the source with given name.
42
+ * @param sourceUri - The source file URI
43
+ * @param newName - The new filename (without extension)
44
+ * @returns New file URI with .csv extension
45
+ */
46
+ export declare const generateNewSetUri: (sourceUri: string, newName: string) => string;
47
+ /**
48
+ * Validates a filename for invalid characters.
49
+ * @param name - The filename to validate (without extension)
50
+ * @returns Object with isValid and optional error message
51
+ */
52
+ export declare const isValidFilename: (name: string) => {
53
+ isValid: boolean;
54
+ error?: string;
55
+ };