@railtownai/railtracks-visualizer 0.0.59 → 0.0.60

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.
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Renders a Tool Output in a Tree component
3
+ *
4
+ */
5
+ import React from "react";
6
+ export interface JsonValueTreeProps {
7
+ data: unknown;
8
+ className?: string;
9
+ maxHeight?: number | string;
10
+ }
11
+ export declare const JsonValueTree: React.FC<JsonValueTreeProps>;
@@ -2,6 +2,8 @@ import React from "react";
2
2
  import type { AgentRun } from "../../dto/AgentRun";
3
3
  import type { AgentRunNode } from "../../dto/AgentRunNode";
4
4
  import type { SessionListItem } from "../hooks/useSessions";
5
+ /** Tool/agent failure is carried on the incoming edge's details.status (e.g. Failed), same as flow edges and session I/O. */
6
+ export declare function isNodeFailureFromIncomingEdge(run: AgentRun, nodeId: string): boolean;
5
7
  export interface SelectedNodeInfo {
6
8
  nodeId: string;
7
9
  runId: string;
@@ -8,6 +8,8 @@ interface EdgeProps {
8
8
  targetY: number;
9
9
  sourcePosition: any;
10
10
  targetPosition: any;
11
+ /** React Flow sets this for animated edges; used for active-step stroke color without rebuilding edge data on theme change */
12
+ animated?: boolean;
11
13
  style?: React.CSSProperties;
12
14
  markerEnd?: string;
13
15
  bidirectional?: boolean;
@@ -1,5 +1,5 @@
1
1
  import React from "react";
2
- type NodeType = "Tool" | "Agent" | "Coordinator";
2
+ type NodeType = "Tool" | "Agent";
3
3
  interface NodeData {
4
4
  label: string;
5
5
  nodeType?: NodeType;
@@ -2,7 +2,7 @@ import React from "react";
2
2
  import { LLMDetails, NodeDetails } from "../../dto/AgentRunNode";
3
3
  interface NodeData {
4
4
  label: string;
5
- nodeType?: "Tool" | "Agent" | "Coordinator";
5
+ nodeType?: "Tool" | "Agent";
6
6
  details?: NodeDetails;
7
7
  id?: string;
8
8
  edges?: any[];
@@ -21,7 +21,7 @@ interface AgentNodeProps {
21
21
  defaultDrawerOpen?: boolean;
22
22
  }
23
23
  export interface GetNodeIconOptions {
24
- nodeType?: "tool" | "coordinator" | "agent";
24
+ nodeType?: "tool" | "agent";
25
25
  modelProvider?: string;
26
26
  modelName?: string;
27
27
  size?: number;
@@ -1,7 +1,7 @@
1
1
  import React from "react";
2
2
  interface NodeData {
3
3
  label: string;
4
- nodeType?: "Tool" | "Agent" | "Coordinator";
4
+ nodeType?: "Tool" | "Agent";
5
5
  details?: any;
6
6
  id?: string;
7
7
  edges?: any[];
@@ -18,5 +18,7 @@ interface NodeDetailsDrawerProps {
18
18
  onClose: () => void;
19
19
  nodeData: NodeData;
20
20
  }
21
+ /** Merged tool internals + first edge detail (same shape ToolNode used on-canvas). */
22
+ export declare function buildToolDrawerPayload(nodeData: NodeData): Record<string, unknown> | null;
21
23
  export declare const NodeDetailsDrawer: React.FC<NodeDetailsDrawerProps>;
22
24
  export {};
@@ -5,7 +5,7 @@ interface Edge {
5
5
  }
6
6
  interface NodeData {
7
7
  label: string;
8
- nodeType?: "Tool" | "Agent" | "Coordinator";
8
+ nodeType?: "Tool" | "Agent";
9
9
  details?: any;
10
10
  id?: string;
11
11
  edges?: Edge[];
@@ -1 +1,7 @@
1
+ /** Max width for rich content (drawer output blocks, etc.) */
1
2
  export declare const NODE_MAX_WIDTH = 500;
3
+ /** Compact xyflow node card width range */
4
+ export declare const FLOW_NODE_MIN_WIDTH = 176;
5
+ export declare const FLOW_NODE_MAX_WIDTH = 250;
6
+ /** Used by auto-layout horizontal spacing (~typical card width between min and max) */
7
+ export declare const LAYOUT_NODE_WIDTH: number;
@@ -1,5 +1,4 @@
1
1
  export { AgentNode } from "./AgentNode";
2
- export { CoordinatorNode } from "./CoordinatorNode";
3
2
  export { ToolNode } from "./ToolNode";
4
3
  export { NodeDetailsDrawer } from "./NodeDetailsDrawer";
5
4
  export { ExpandableTextarea } from "./ExpandableTextarea";
@@ -80,7 +80,7 @@ export interface NodeDetails {
80
80
  export interface AgentRunNode {
81
81
  /** Unique identifier for this node */
82
82
  identifier: string;
83
- /** Type of node (e.g., "Tool", "Agent", "Coordinator") */
83
+ /** Type of node (e.g., "Tool", "Agent") */
84
84
  node_type: string;
85
85
  /** Optional human-readable name for this node */
86
86
  name?: string;
@@ -51,6 +51,18 @@ export declare function formatDateFriendly(iso: string): string;
51
51
  * @returns The truncated text
52
52
  */
53
53
  export declare function truncateText(text: string, maxLength: number): string;
54
+ /**
55
+ * True for plain object literals (own enumerable keys, not arrays, Date, etc.).
56
+ */
57
+ export declare function isPlainObject(value: unknown): value is Record<string, unknown>;
58
+ /**
59
+ * Escapes `\` and `.` in a segment so dot-delimited path keys stay unambiguous (e.g. JSON tree UIs).
60
+ */
61
+ export declare function escapeDotPathSegment(segment: string): string;
62
+ /**
63
+ * Compact JSON-like string for tree / debug views: strings use JSON quoting; null and undefined as words.
64
+ */
65
+ export declare function formatJsonTreePrimitive(value: unknown): string;
54
66
  /**
55
67
  * Styled-components utility for conditional styling
56
68
  * @param condition - The condition to check
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@railtownai/railtracks-visualizer",
3
- "version": "0.0.59",
3
+ "version": "0.0.60",
4
4
  "license": "MIT",
5
5
  "author": "Railtown AI",
6
6
  "description": "A visualizer for Railtracks agentic flows",
@@ -1,22 +0,0 @@
1
- import React from "react";
2
- interface NodeData {
3
- label: string;
4
- nodeType?: "Tool" | "Agent" | "Coordinator";
5
- details?: any;
6
- id?: string;
7
- edges?: any[];
8
- edgeDetails?: {
9
- input_args?: any[];
10
- input_kwargs?: any;
11
- output?: any;
12
- state?: string;
13
- status?: string;
14
- }[];
15
- }
16
- interface CoordinatorNodeProps {
17
- data: NodeData;
18
- id: string;
19
- onInspect?: (nodeData: NodeData) => void;
20
- }
21
- export declare const CoordinatorNode: React.FC<CoordinatorNodeProps>;
22
- export {};