@elizaos/client 1.6.1-alpha.4 → 1.6.1-alpha.5
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/assets/{main-C4q5_rtN.js → main-4tyUgNqd.js} +3 -3
- package/dist/assets/{main-C4q5_rtN.js.map → main-4tyUgNqd.js.map} +1 -1
- package/dist/assets/{main-BNtEiK3o.js → main-Bbs84AcL.js} +77 -63
- package/dist/assets/main-Bbs84AcL.js.map +1 -0
- package/dist/assets/{main-BOBWcKWW.css → main-CNv6B3RZ.css} +597 -71
- package/dist/assets/react-vendor-DxnAFk-d.js +611 -0
- package/dist/assets/react-vendor-DxnAFk-d.js.map +1 -0
- package/dist/index.html +1 -1
- package/package.json +8 -4
- package/src/components/agent-prism/Avatar.tsx +164 -0
- package/src/components/agent-prism/Badge.tsx +109 -0
- package/src/components/agent-prism/Button.tsx +138 -0
- package/src/components/agent-prism/CollapseAndExpandControls.tsx +45 -0
- package/src/components/agent-prism/CollapsibleSection.tsx +121 -0
- package/src/components/agent-prism/DetailsView/DetailsView.tsx +141 -0
- package/src/components/agent-prism/DetailsView/DetailsViewAttributesTab.tsx +45 -0
- package/src/components/agent-prism/DetailsView/DetailsViewHeader.tsx +77 -0
- package/src/components/agent-prism/DetailsView/DetailsViewHeaderActions.tsx +21 -0
- package/src/components/agent-prism/DetailsView/DetailsViewInputOutputTab.tsx +210 -0
- package/src/components/agent-prism/DetailsView/DetailsViewMetrics.tsx +53 -0
- package/src/components/agent-prism/DetailsView/DetailsViewRawDataTab.tsx +24 -0
- package/src/components/agent-prism/IconButton.tsx +75 -0
- package/src/components/agent-prism/PriceBadge.tsx +12 -0
- package/src/components/agent-prism/SearchInput.tsx +17 -0
- package/src/components/agent-prism/SpanCard/SpanCard.tsx +467 -0
- package/src/components/agent-prism/SpanCard/SpanCardBadges.tsx +35 -0
- package/src/components/agent-prism/SpanCard/SpanCardConnector.tsx +36 -0
- package/src/components/agent-prism/SpanCard/SpanCardTimeline.tsx +60 -0
- package/src/components/agent-prism/SpanCard/SpanCardToggle.tsx +32 -0
- package/src/components/agent-prism/SpanStatus.tsx +79 -0
- package/src/components/agent-prism/Tabs.tsx +141 -0
- package/src/components/agent-prism/TextInput.tsx +142 -0
- package/src/components/agent-prism/TimestampBadge.tsx +28 -0
- package/src/components/agent-prism/TokensBadge.tsx +26 -0
- package/src/components/agent-prism/TraceList/TraceList.tsx +80 -0
- package/src/components/agent-prism/TraceList/TraceListItem.tsx +79 -0
- package/src/components/agent-prism/TraceList/TraceListItemHeader.tsx +46 -0
- package/src/components/agent-prism/TraceViewer.tsx +476 -0
- package/src/components/agent-prism/TreeView.tsx +57 -0
- package/src/components/agent-prism/shared.ts +210 -0
- package/src/components/agent-runs/AgentRunTimeline.tsx +64 -673
- package/src/components/agent-sidebar.tsx +2 -2
- package/src/components/chat.tsx +8 -8
- package/src/lib/agent-prism-utils.ts +46 -0
- package/src/lib/eliza-span-adapter.ts +487 -0
- package/dist/assets/main-BNtEiK3o.js.map +0 -1
- package/dist/assets/react-vendor-pe76PXQl.js +0 -546
- package/dist/assets/react-vendor-pe76PXQl.js.map +0 -1
|
@@ -0,0 +1,210 @@
|
|
|
1
|
+
import type { TraceSpanCategory } from "@evilmartians/agent-prism-types";
|
|
2
|
+
|
|
3
|
+
import {
|
|
4
|
+
Zap,
|
|
5
|
+
Wrench,
|
|
6
|
+
Bot,
|
|
7
|
+
Link,
|
|
8
|
+
Search,
|
|
9
|
+
BarChart2,
|
|
10
|
+
Plus,
|
|
11
|
+
HelpCircle,
|
|
12
|
+
MoveHorizontal,
|
|
13
|
+
type LucideIcon,
|
|
14
|
+
CircleDot,
|
|
15
|
+
ShieldCheck,
|
|
16
|
+
} from "lucide-react";
|
|
17
|
+
|
|
18
|
+
// TYPES
|
|
19
|
+
|
|
20
|
+
export type ColorVariant =
|
|
21
|
+
| "purple"
|
|
22
|
+
| "indigo"
|
|
23
|
+
| "orange"
|
|
24
|
+
| "teal"
|
|
25
|
+
| "cyan"
|
|
26
|
+
| "sky"
|
|
27
|
+
| "yellow"
|
|
28
|
+
| "emerald"
|
|
29
|
+
| "red"
|
|
30
|
+
| "gray";
|
|
31
|
+
|
|
32
|
+
export type ComponentSize =
|
|
33
|
+
| "4"
|
|
34
|
+
| "5"
|
|
35
|
+
| "6"
|
|
36
|
+
| "7"
|
|
37
|
+
| "8"
|
|
38
|
+
| "9"
|
|
39
|
+
| "10"
|
|
40
|
+
| "11"
|
|
41
|
+
| "12"
|
|
42
|
+
| "16";
|
|
43
|
+
|
|
44
|
+
// CONSTANTS
|
|
45
|
+
|
|
46
|
+
export const ROUNDED_CLASSES = {
|
|
47
|
+
none: "rounded-none",
|
|
48
|
+
sm: "rounded-sm",
|
|
49
|
+
md: "rounded-md",
|
|
50
|
+
lg: "rounded-lg",
|
|
51
|
+
full: "rounded-full",
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Unified color theme classes for consistent styling across components
|
|
56
|
+
*/
|
|
57
|
+
export const COLOR_THEME_CLASSES: Record<
|
|
58
|
+
ColorVariant,
|
|
59
|
+
{
|
|
60
|
+
bg: string;
|
|
61
|
+
darkBg: string;
|
|
62
|
+
text: string;
|
|
63
|
+
darkText: string;
|
|
64
|
+
}
|
|
65
|
+
> = {
|
|
66
|
+
purple: {
|
|
67
|
+
bg: "bg-purple-100",
|
|
68
|
+
darkBg: "dark:bg-purple-950/60",
|
|
69
|
+
text: "text-purple-500",
|
|
70
|
+
darkText: "dark:text-purple-300",
|
|
71
|
+
},
|
|
72
|
+
indigo: {
|
|
73
|
+
bg: "bg-indigo-100",
|
|
74
|
+
darkBg: "dark:bg-indigo-950/60",
|
|
75
|
+
text: "text-indigo-500",
|
|
76
|
+
darkText: "dark:text-indigo-300",
|
|
77
|
+
},
|
|
78
|
+
orange: {
|
|
79
|
+
bg: "bg-orange-100",
|
|
80
|
+
darkBg: "dark:bg-orange-950/60",
|
|
81
|
+
text: "text-orange-600",
|
|
82
|
+
darkText: "dark:text-orange-300",
|
|
83
|
+
},
|
|
84
|
+
teal: {
|
|
85
|
+
bg: "bg-teal-100",
|
|
86
|
+
darkBg: "dark:bg-teal-950/60",
|
|
87
|
+
text: "text-teal-600",
|
|
88
|
+
darkText: "dark:text-teal-300",
|
|
89
|
+
},
|
|
90
|
+
cyan: {
|
|
91
|
+
bg: "bg-cyan-100",
|
|
92
|
+
darkBg: "dark:bg-cyan-950/60",
|
|
93
|
+
text: "text-cyan-600",
|
|
94
|
+
darkText: "dark:text-cyan-300",
|
|
95
|
+
},
|
|
96
|
+
sky: {
|
|
97
|
+
bg: "bg-sky-100",
|
|
98
|
+
darkBg: "dark:bg-sky-950/60",
|
|
99
|
+
text: "text-sky-600",
|
|
100
|
+
darkText: "dark:text-sky-300",
|
|
101
|
+
},
|
|
102
|
+
yellow: {
|
|
103
|
+
bg: "bg-yellow-100",
|
|
104
|
+
darkBg: "dark:bg-yellow-950/60",
|
|
105
|
+
text: "text-yellow-700",
|
|
106
|
+
darkText: "dark:text-yellow-300",
|
|
107
|
+
},
|
|
108
|
+
emerald: {
|
|
109
|
+
bg: "bg-emerald-100",
|
|
110
|
+
darkBg: "dark:bg-emerald-950/60",
|
|
111
|
+
text: "text-emerald-600",
|
|
112
|
+
darkText: "dark:text-emerald-300",
|
|
113
|
+
},
|
|
114
|
+
red: {
|
|
115
|
+
bg: "bg-red-100",
|
|
116
|
+
darkBg: "dark:bg-red-950/60",
|
|
117
|
+
text: "text-red-600",
|
|
118
|
+
darkText: "dark:text-red-300",
|
|
119
|
+
},
|
|
120
|
+
gray: {
|
|
121
|
+
bg: "bg-gray-100",
|
|
122
|
+
darkBg: "dark:bg-gray-900",
|
|
123
|
+
text: "text-gray-600",
|
|
124
|
+
darkText: "dark:text-gray-300",
|
|
125
|
+
},
|
|
126
|
+
};
|
|
127
|
+
|
|
128
|
+
/**
|
|
129
|
+
* Shared configuration for span categories containing label, theme, and icon
|
|
130
|
+
*/
|
|
131
|
+
export const SPAN_CATEGORY_CONFIG: Record<
|
|
132
|
+
TraceSpanCategory,
|
|
133
|
+
{
|
|
134
|
+
label: string;
|
|
135
|
+
theme: ColorVariant;
|
|
136
|
+
icon: LucideIcon;
|
|
137
|
+
}
|
|
138
|
+
> = {
|
|
139
|
+
llm_call: {
|
|
140
|
+
label: "LLM",
|
|
141
|
+
theme: "purple",
|
|
142
|
+
icon: Zap,
|
|
143
|
+
},
|
|
144
|
+
tool_execution: {
|
|
145
|
+
label: "TOOL",
|
|
146
|
+
theme: "orange",
|
|
147
|
+
icon: Wrench,
|
|
148
|
+
},
|
|
149
|
+
agent_invocation: {
|
|
150
|
+
label: "AGENT INVOCATION",
|
|
151
|
+
theme: "indigo",
|
|
152
|
+
icon: Bot,
|
|
153
|
+
},
|
|
154
|
+
chain_operation: {
|
|
155
|
+
label: "CHAIN",
|
|
156
|
+
theme: "teal",
|
|
157
|
+
icon: Link,
|
|
158
|
+
},
|
|
159
|
+
retrieval: {
|
|
160
|
+
label: "RETRIEVAL",
|
|
161
|
+
theme: "cyan",
|
|
162
|
+
icon: Search,
|
|
163
|
+
},
|
|
164
|
+
embedding: {
|
|
165
|
+
label: "EMBEDDING",
|
|
166
|
+
theme: "emerald",
|
|
167
|
+
icon: BarChart2,
|
|
168
|
+
},
|
|
169
|
+
create_agent: {
|
|
170
|
+
label: "CREATE AGENT",
|
|
171
|
+
theme: "sky",
|
|
172
|
+
icon: Plus,
|
|
173
|
+
},
|
|
174
|
+
span: {
|
|
175
|
+
label: "SPAN",
|
|
176
|
+
theme: "cyan",
|
|
177
|
+
icon: MoveHorizontal,
|
|
178
|
+
},
|
|
179
|
+
event: {
|
|
180
|
+
label: "EVENT",
|
|
181
|
+
theme: "emerald",
|
|
182
|
+
icon: CircleDot,
|
|
183
|
+
},
|
|
184
|
+
guardrail: {
|
|
185
|
+
label: "GUARDRAIL",
|
|
186
|
+
theme: "red",
|
|
187
|
+
icon: ShieldCheck,
|
|
188
|
+
},
|
|
189
|
+
unknown: {
|
|
190
|
+
label: "UNKNOWN",
|
|
191
|
+
theme: "gray",
|
|
192
|
+
icon: HelpCircle,
|
|
193
|
+
},
|
|
194
|
+
};
|
|
195
|
+
|
|
196
|
+
// UTILS
|
|
197
|
+
|
|
198
|
+
export function getSpanCategoryTheme(
|
|
199
|
+
category: TraceSpanCategory,
|
|
200
|
+
): ColorVariant {
|
|
201
|
+
return SPAN_CATEGORY_CONFIG[category].theme;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
export function getSpanCategoryLabel(category: TraceSpanCategory): string {
|
|
205
|
+
return SPAN_CATEGORY_CONFIG[category].label;
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
export function getSpanCategoryIcon(category: TraceSpanCategory): LucideIcon {
|
|
209
|
+
return SPAN_CATEGORY_CONFIG[category].icon;
|
|
210
|
+
}
|