@railtownai/railtracks-visualizer 0.0.67 → 0.0.69
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/cjs/index.js +598 -188
- package/dist/esm/index.js +596 -190
- package/dist/types/agenthub/components/AggregateResultsTable.d.ts +3 -1
- package/dist/types/agenthub/components/JudgeAggregateView.d.ts +5 -3
- package/dist/types/agenthub/components/NodeActions.d.ts +21 -0
- package/dist/types/agenthub/pages/evaluator-result-page.d.ts +7 -2
- package/dist/types/agenthub/pages/evaluator-result.d.ts +7 -2
- package/dist/types/hooks/useApi.d.ts +2 -1
- package/dist/types/lib/ThemeProvider.d.ts +11 -0
- package/dist/types/lib/apiBase.d.ts +1 -0
- package/dist/types/lib/theme.d.ts +4 -0
- package/package.json +9 -3
|
@@ -22,7 +22,9 @@ export interface AggregateResultsTableProps {
|
|
|
22
22
|
title?: string;
|
|
23
23
|
/** Optional evaluator name hint (e.g. "ToolUseEvaluator") for default title. */
|
|
24
24
|
evaluatorName?: string;
|
|
25
|
-
/** Called when an Agent/Tool
|
|
25
|
+
/** Called when an Agent/Tool node's "Session Details" action is used. sessionId may be undefined when evaluation uses legacy agent_node_ids format. */
|
|
26
26
|
onAgentNodeClick?: (sessionId: string | undefined, nodeId: string) => void;
|
|
27
|
+
/** Called when an Agent/Tool node's "Visualizer" action is used. sessionId may be undefined when evaluation uses legacy agent_node_ids format. */
|
|
28
|
+
onOpenVisualizer?: (sessionId: string | undefined, nodeId: string) => void;
|
|
27
29
|
}
|
|
28
30
|
export declare const AggregateResultsTable: React.FC<AggregateResultsTableProps>;
|
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Judge (LLM-as-judge) evaluator view: one card per categorical metric, with
|
|
3
3
|
* collapsible accordions per category label listing the agent nodes that received
|
|
4
|
-
* that label. Each node
|
|
5
|
-
*
|
|
4
|
+
* that label. Each node exposes Session Details / Visualizer call-to-actions
|
|
5
|
+
* (see NodeActions) and an inline toggle to reveal the judge's reasoning when present.
|
|
6
6
|
*/
|
|
7
7
|
import React from "react";
|
|
8
8
|
import type { JudgeMetric } from "../utils/judgeAggregateTree";
|
|
9
9
|
export interface JudgeAggregateViewProps {
|
|
10
10
|
metrics: JudgeMetric[];
|
|
11
|
-
/** Opens the run for a judged node. sessionId may be undefined for legacy evaluations. */
|
|
11
|
+
/** Opens the run for a judged node in the Session Details drawer. sessionId may be undefined for legacy evaluations. */
|
|
12
12
|
onAgentNodeClick?: (sessionId: string | undefined, nodeId: string) => void;
|
|
13
|
+
/** Opens the run for a judged node in the full Visualizer. */
|
|
14
|
+
onOpenVisualizer?: (sessionId: string | undefined, nodeId: string) => void;
|
|
13
15
|
}
|
|
14
16
|
export declare const JudgeAggregateView: React.FC<JudgeAggregateViewProps>;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Call-to-action buttons for an evaluated agent node. Instead of surfacing a raw
|
|
3
|
+
* node id, this offers two clear actions: open the run in the Flow Details
|
|
4
|
+
* drawer, or open it in the full Visualizer. Shared by the Judge, ToolUse and
|
|
5
|
+
* LLMInference evaluator views so the affordance is consistent everywhere.
|
|
6
|
+
*
|
|
7
|
+
* Each button only renders when its handler is provided, so library consumers
|
|
8
|
+
* that pass just `onAgentNodeClick` still get a working "Flow Details" action.
|
|
9
|
+
*/
|
|
10
|
+
import React from "react";
|
|
11
|
+
export interface NodeActionsProps {
|
|
12
|
+
/** Session containing the node. May be undefined for legacy evaluations. */
|
|
13
|
+
sessionId?: string;
|
|
14
|
+
/** Identifier of the evaluated agent node. */
|
|
15
|
+
nodeId: string;
|
|
16
|
+
/** Opens the run for this node in the Session Details drawer. */
|
|
17
|
+
onAgentNodeClick?: (sessionId: string | undefined, nodeId: string) => void;
|
|
18
|
+
/** Opens the run for this node in the full Visualizer. */
|
|
19
|
+
onOpenVisualizer?: (sessionId: string | undefined, nodeId: string) => void;
|
|
20
|
+
}
|
|
21
|
+
export declare const NodeActions: React.FC<NodeActionsProps>;
|
|
@@ -3,10 +3,15 @@ export interface EvaluatorResultPageProps {
|
|
|
3
3
|
/** Optional href for back link. Pass from the host app (e.g. "#/evaluations" for HashRouter). */
|
|
4
4
|
backHref?: string;
|
|
5
5
|
/**
|
|
6
|
-
* Optional handler for
|
|
7
|
-
* legacy agent_node_ids format. Default opens a SessionDetails drawer on this page.
|
|
6
|
+
* Optional handler for a node's "Session Details" action. sessionId may be undefined when evaluation
|
|
7
|
+
* uses legacy agent_node_ids format. Default opens a SessionDetails drawer on this page.
|
|
8
8
|
*/
|
|
9
9
|
onAgentNodeClick?: (sessionId: string | undefined, nodeId: string) => void;
|
|
10
|
+
/**
|
|
11
|
+
* Optional handler for a node's "Visualizer" action. sessionId may be undefined when evaluation
|
|
12
|
+
* uses legacy agent_node_ids format. Default navigates to the full Sessions visualizer route.
|
|
13
|
+
*/
|
|
14
|
+
onOpenVisualizer?: (sessionId: string | undefined, nodeId: string) => void;
|
|
10
15
|
}
|
|
11
16
|
/**
|
|
12
17
|
* Page that resolves evaluationId and evaluatorId from the route,
|
|
@@ -12,9 +12,14 @@ export interface EvaluatorResultProps {
|
|
|
12
12
|
/** Optional href for back link. When provided, a "Back to Evaluations" control is shown. */
|
|
13
13
|
backHref?: string;
|
|
14
14
|
/**
|
|
15
|
-
* Optional handler for
|
|
16
|
-
* uses legacy agent_node_ids format. When
|
|
15
|
+
* Optional handler for a node's "Session Details" action. sessionId may be undefined when
|
|
16
|
+
* evaluation uses legacy agent_node_ids format. When omitted, the action is not shown.
|
|
17
17
|
*/
|
|
18
18
|
onAgentNodeClick?: (sessionId: string | undefined, nodeId: string) => void;
|
|
19
|
+
/**
|
|
20
|
+
* Optional handler for a node's "Visualizer" action. sessionId may be undefined when
|
|
21
|
+
* evaluation uses legacy agent_node_ids format. When omitted, the action is not shown.
|
|
22
|
+
*/
|
|
23
|
+
onOpenVisualizer?: (sessionId: string | undefined, nodeId: string) => void;
|
|
19
24
|
}
|
|
20
25
|
export declare const EvaluatorResult: React.FC<EvaluatorResultProps>;
|
|
@@ -1,9 +1,20 @@
|
|
|
1
1
|
import React, { ReactNode } from "react";
|
|
2
2
|
import { Theme } from "./theme";
|
|
3
|
+
export type ThemeMode = "light" | "dark" | "liquidGlassLight" | "liquidGlassDark";
|
|
4
|
+
export declare function themeForMode(mode: ThemeMode): Theme;
|
|
5
|
+
export declare function themeToMode(theme: Theme): ThemeMode;
|
|
3
6
|
interface ThemeContextType {
|
|
4
7
|
theme: Theme;
|
|
8
|
+
themeMode: ThemeMode;
|
|
5
9
|
setTheme: (theme: Theme) => void;
|
|
10
|
+
setThemeMode: (mode: ThemeMode) => void;
|
|
11
|
+
/** True for classic dark or dark liquid glass (graphs, muted text). */
|
|
6
12
|
isDarkMode: boolean;
|
|
13
|
+
/** True only for solid classic dark — heavy Ant Design chrome overrides. */
|
|
14
|
+
isClassicDarkTheme: boolean;
|
|
15
|
+
isLiquidGlass: boolean;
|
|
16
|
+
isLiquidGlassLight: boolean;
|
|
17
|
+
isLiquidGlassDark: boolean;
|
|
7
18
|
}
|
|
8
19
|
interface ThemeProviderProps {
|
|
9
20
|
children: ReactNode;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const API_BASE: string;
|
|
@@ -92,5 +92,9 @@ export interface Theme {
|
|
|
92
92
|
};
|
|
93
93
|
}
|
|
94
94
|
export declare const lightTheme: Theme;
|
|
95
|
+
/** Light “Liquid Glass”–inspired palette (web approximation). */
|
|
96
|
+
export declare const liquidGlassLightTheme: Theme;
|
|
97
|
+
/** Dark “Liquid Glass”–inspired palette — translucent panels on a deep mesh-like base. */
|
|
98
|
+
export declare const liquidGlassDarkTheme: Theme;
|
|
95
99
|
export declare const darkTheme: Theme;
|
|
96
100
|
export declare const defaultTheme: Theme;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@railtownai/railtracks-visualizer",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.69",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"author": "Railtown AI",
|
|
6
6
|
"description": "A visualizer for Railtracks agentic flows",
|
|
@@ -71,7 +71,10 @@
|
|
|
71
71
|
"storybook:preview": "npx http-server ./storybook-static",
|
|
72
72
|
"test:ui": "vitest --ui",
|
|
73
73
|
"test": "vitest run --silent",
|
|
74
|
-
"up": "ncu -u -x react -x react-dom -x @types/react -x @types/react-dom -x react-hotkeys-hook"
|
|
74
|
+
"up": "ncu -u -x react -x react-dom -x @types/react -x @types/react-dom -x react-hotkeys-hook",
|
|
75
|
+
"electron": "npm run electron:start",
|
|
76
|
+
"electron:dev": "cross-env ELECTRON_DEV=1 VITE_API_ORIGIN=http://localhost:3030 concurrently -k \"vite\" \"wait-on http://127.0.0.1:3001 && electron electron/main.js\"",
|
|
77
|
+
"electron:start": "cross-env VITE_API_ORIGIN=http://localhost:3030 npm run build:spa && electron electron/main.js"
|
|
75
78
|
},
|
|
76
79
|
"devDependencies": {
|
|
77
80
|
"@chromatic-com/storybook": "5.1.2",
|
|
@@ -92,7 +95,9 @@
|
|
|
92
95
|
"@types/react-dom": "18.3.7",
|
|
93
96
|
"@vitejs/plugin-react-swc": "4.3.0",
|
|
94
97
|
"clsx": "2.1.1",
|
|
98
|
+
"concurrently": "9.2.1",
|
|
95
99
|
"cross-env": "10.1.0",
|
|
100
|
+
"electron": "34.5.8",
|
|
96
101
|
"gh-pages": "6.3.0",
|
|
97
102
|
"jsdom": "29.0.2",
|
|
98
103
|
"license-checker": "25.0.1",
|
|
@@ -104,7 +109,8 @@
|
|
|
104
109
|
"typescript": "6.0.3",
|
|
105
110
|
"uuid": "13.0.0",
|
|
106
111
|
"vite": "8.0.8",
|
|
107
|
-
"vitest": "4.1.4"
|
|
112
|
+
"vitest": "4.1.4",
|
|
113
|
+
"wait-on": "8.0.5"
|
|
108
114
|
},
|
|
109
115
|
"prettier": {
|
|
110
116
|
"singleQuote": false,
|