@datalayer/agent-runtimes 1.6.28 → 1.6.32
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-embed/chunks/AgentInspector-C66D0b0W.js +1 -0
- package/dist-embed/chunks/{AgentInspectorDialog-DTQHUrHA.js → AgentInspectorDialog-DeK96QG1.js} +1 -1
- package/dist-embed/datalayer-app-main.js +12 -12
- package/lib/apps/apps/appspec.d.ts +3 -2
- package/lib/apps/apps/appspec.js +3 -2
- package/lib/examples/pap/traces/account-tokens.json +6 -8
- package/lib/examples/pap/traces/conversation-control.json +16 -18
- package/lib/examples/pap/traces/conversation-streaming.json +10 -12
- package/lib/examples/pap/traces/mediated-sign-in.json +6 -8
- package/lib/examples/pap/traces/operations.json +38 -32
- package/lib/examples/pap/traces/two-companies.json +40 -37
- package/lib/examples/pap/traces/user-with-a-company.json +22 -22
- package/lib/hooks/index.d.ts +1 -1
- package/lib/hooks/index.js +1 -1
- package/lib/hooks/useMonitoring.d.ts +0 -10
- package/lib/hooks/useMonitoring.js +6 -72
- package/lib/portable/displays.d.ts +8 -1
- package/lib/portable/displays.js +46 -3
- package/lib/protocols/pap/index.d.ts +1 -1
- package/lib/protocols/pap/index.js +2 -2
- package/lib/specs/actions.js +2 -2
- package/lib/specs/apps.d.ts +1 -1
- package/lib/specs/apps.js +386 -384
- package/lib/specs/skills.js +23 -23
- package/package.json +2 -2
- package/scripts/codegen/generate_apps.py +9 -2
- package/scripts/codegen/generate_frontend_tools.py +10 -2
- package/scripts/codegen/generate_ops.py +9 -3
- package/dist-embed/chunks/AgentInspector-CPJcLyP9.js +0 -1
package/lib/specs/skills.js
CHANGED
|
@@ -10,7 +10,7 @@ export const ACCOUNTING_SKILL_SPEC_0_0_1 = {
|
|
|
10
10
|
version: '0.0.1',
|
|
11
11
|
name: 'Accounting Skill',
|
|
12
12
|
description: 'Accounting analysis workflows for reconciliation, close, variance, and audit-ready summaries',
|
|
13
|
-
module: '
|
|
13
|
+
module: 'datalayer_skills.skills.accounting',
|
|
14
14
|
package: undefined,
|
|
15
15
|
method: undefined,
|
|
16
16
|
path: undefined,
|
|
@@ -19,8 +19,8 @@ export const ACCOUNTING_SKILL_SPEC_0_0_1 = {
|
|
|
19
19
|
dependencies: ['pandas>=2.0.0'],
|
|
20
20
|
install: {
|
|
21
21
|
type: 'python',
|
|
22
|
-
command: 'pip install "
|
|
23
|
-
note: "
|
|
22
|
+
command: 'pip install "datalayer-skills[skills]"',
|
|
23
|
+
note: "datalayer-skills with every skill's dependencies; the runtime image installs it the same way.",
|
|
24
24
|
},
|
|
25
25
|
tags: ['accounting', 'finance', 'reconciliation', 'close'],
|
|
26
26
|
icon: '@primer/octicons-react:book',
|
|
@@ -32,7 +32,7 @@ export const CRAWL_SKILL_SPEC_0_0_1 = {
|
|
|
32
32
|
version: '0.0.1',
|
|
33
33
|
name: 'Web Crawl Skill',
|
|
34
34
|
description: 'Web crawling and content extraction capabilities',
|
|
35
|
-
module: '
|
|
35
|
+
module: 'datalayer_skills.skills.crawl',
|
|
36
36
|
package: undefined,
|
|
37
37
|
method: undefined,
|
|
38
38
|
path: undefined,
|
|
@@ -41,8 +41,8 @@ export const CRAWL_SKILL_SPEC_0_0_1 = {
|
|
|
41
41
|
dependencies: ['requests>=2.31.0', 'beautifulsoup4>=4.12.0'],
|
|
42
42
|
install: {
|
|
43
43
|
type: 'python',
|
|
44
|
-
command: 'pip install "
|
|
45
|
-
note: "
|
|
44
|
+
command: 'pip install "datalayer-skills[skills]"',
|
|
45
|
+
note: "datalayer-skills with every skill's dependencies; the runtime image installs it the same way.",
|
|
46
46
|
},
|
|
47
47
|
tags: ['web', 'crawl', 'scraping'],
|
|
48
48
|
icon: '@primer/octicons-react:globe',
|
|
@@ -54,7 +54,7 @@ export const EVENTS_SKILL_SPEC_0_0_1 = {
|
|
|
54
54
|
version: '0.0.1',
|
|
55
55
|
name: 'Events Skill',
|
|
56
56
|
description: 'Event generation, enrichment, and lifecycle orchestration',
|
|
57
|
-
module: '
|
|
57
|
+
module: 'datalayer_skills.skills.events',
|
|
58
58
|
package: undefined,
|
|
59
59
|
method: undefined,
|
|
60
60
|
path: undefined,
|
|
@@ -63,8 +63,8 @@ export const EVENTS_SKILL_SPEC_0_0_1 = {
|
|
|
63
63
|
dependencies: ['httpx>=0.27.0'],
|
|
64
64
|
install: {
|
|
65
65
|
type: 'python',
|
|
66
|
-
command: 'pip install "
|
|
67
|
-
note: "
|
|
66
|
+
command: 'pip install "datalayer-skills[skills]"',
|
|
67
|
+
note: "datalayer-skills with every skill's dependencies; the runtime image installs it the same way.",
|
|
68
68
|
},
|
|
69
69
|
tags: ['events', 'orchestration', 'automation'],
|
|
70
70
|
icon: '@primer/octicons-react:calendar',
|
|
@@ -76,7 +76,7 @@ export const GITHUB_SKILL_SPEC_0_0_1 = {
|
|
|
76
76
|
version: '0.0.1',
|
|
77
77
|
name: 'GitHub Skill',
|
|
78
78
|
description: 'GitHub repository management and code operations',
|
|
79
|
-
module: '
|
|
79
|
+
module: 'datalayer_skills.skills.github',
|
|
80
80
|
package: undefined,
|
|
81
81
|
method: undefined,
|
|
82
82
|
path: undefined,
|
|
@@ -85,8 +85,8 @@ export const GITHUB_SKILL_SPEC_0_0_1 = {
|
|
|
85
85
|
dependencies: ['PyGithub>=2.1.0'],
|
|
86
86
|
install: {
|
|
87
87
|
type: 'python',
|
|
88
|
-
command: 'pip install "
|
|
89
|
-
note: "
|
|
88
|
+
command: 'pip install "datalayer-skills[skills]"',
|
|
89
|
+
note: "datalayer-skills with every skill's dependencies; the runtime image installs it the same way.",
|
|
90
90
|
},
|
|
91
91
|
tags: ['github', 'git', 'code'],
|
|
92
92
|
icon: '@datalayer/icons-react:github-mark',
|
|
@@ -98,7 +98,7 @@ export const IMAGE_SKILL_SPEC_0_0_1 = {
|
|
|
98
98
|
version: '0.0.1',
|
|
99
99
|
name: 'Image Skills',
|
|
100
100
|
description: 'Snapshots of web pages and video frames; images read, resized, cropped, converted, optimized and thumbnailed',
|
|
101
|
-
module: '
|
|
101
|
+
module: 'datalayer_skills.skills.image',
|
|
102
102
|
package: undefined,
|
|
103
103
|
method: undefined,
|
|
104
104
|
path: undefined,
|
|
@@ -107,7 +107,7 @@ export const IMAGE_SKILL_SPEC_0_0_1 = {
|
|
|
107
107
|
dependencies: ['Pillow>=10.0', 'playwright>=1.45'],
|
|
108
108
|
install: {
|
|
109
109
|
type: 'python',
|
|
110
|
-
command: 'pip install "
|
|
110
|
+
command: 'pip install "datalayer-skills[skills]" && python -m playwright install chromium',
|
|
111
111
|
note: 'Chromium for its page snapshots; the runtime image carries it.',
|
|
112
112
|
},
|
|
113
113
|
tags: ['image', 'snapshot', 'media'],
|
|
@@ -142,7 +142,7 @@ export const PDF_SKILL_SPEC_0_0_1 = {
|
|
|
142
142
|
version: '0.0.1',
|
|
143
143
|
name: 'PDF Processing Skill',
|
|
144
144
|
description: 'PDF document reading, parsing, and extraction',
|
|
145
|
-
module: '
|
|
145
|
+
module: 'datalayer_skills.skills.pdf',
|
|
146
146
|
package: undefined,
|
|
147
147
|
method: undefined,
|
|
148
148
|
path: undefined,
|
|
@@ -151,8 +151,8 @@ export const PDF_SKILL_SPEC_0_0_1 = {
|
|
|
151
151
|
dependencies: ['pypdf>=4.0', 'pdf2image>=1.17', 'Pillow>=10.0'],
|
|
152
152
|
install: {
|
|
153
153
|
type: 'python',
|
|
154
|
-
command: 'pip install "
|
|
155
|
-
note: "
|
|
154
|
+
command: 'pip install "datalayer-skills[skills]"',
|
|
155
|
+
note: "datalayer-skills with every skill's dependencies; the runtime image installs it the same way.",
|
|
156
156
|
},
|
|
157
157
|
tags: ['pdf', 'documents', 'extraction'],
|
|
158
158
|
icon: '@primer/octicons-react:file',
|
|
@@ -165,15 +165,15 @@ export const TEXT_SUMMARIZER_SKILL_SPEC_0_0_1 = {
|
|
|
165
165
|
name: 'Text Summarizer Skill',
|
|
166
166
|
description: 'Summarize text content using extractive and abstractive techniques. Use when the user asks for summaries, key points, or condensed versions of documents.',
|
|
167
167
|
module: undefined,
|
|
168
|
-
package: '
|
|
168
|
+
package: 'datalayer_skills.skills.text_summarizer',
|
|
169
169
|
method: 'summarize_text',
|
|
170
170
|
path: undefined,
|
|
171
171
|
requiredEnvVars: [],
|
|
172
172
|
optionalEnvVars: [],
|
|
173
|
-
dependencies: ['
|
|
173
|
+
dependencies: ['datalayer-skills>=0.3.0'],
|
|
174
174
|
install: {
|
|
175
175
|
type: 'python',
|
|
176
|
-
command: 'pip install
|
|
176
|
+
command: 'pip install datalayer-skills',
|
|
177
177
|
note: 'No dependencies of its own.',
|
|
178
178
|
},
|
|
179
179
|
tags: ['nlp', 'summarization', 'text-processing'],
|
|
@@ -185,8 +185,8 @@ export const VIDEO_SKILL_SPEC_0_0_1 = {
|
|
|
185
185
|
id: 'video',
|
|
186
186
|
version: '0.0.1',
|
|
187
187
|
name: 'Video Skills',
|
|
188
|
-
description: 'Recordings of web pages; videos read, trimmed, transcoded, optimized, framed and turned to GIF',
|
|
189
|
-
module: '
|
|
188
|
+
description: 'Recordings of web pages; videos read, trimmed, zoomed in and out on a point, transcoded, optimized, framed and turned to GIF',
|
|
189
|
+
module: 'datalayer_skills.skills.video',
|
|
190
190
|
package: undefined,
|
|
191
191
|
method: undefined,
|
|
192
192
|
path: undefined,
|
|
@@ -195,7 +195,7 @@ export const VIDEO_SKILL_SPEC_0_0_1 = {
|
|
|
195
195
|
dependencies: ['imageio-ffmpeg>=0.5', 'playwright>=1.45'],
|
|
196
196
|
install: {
|
|
197
197
|
type: 'python',
|
|
198
|
-
command: 'pip install "
|
|
198
|
+
command: 'pip install "datalayer-skills[skills]" && python -m playwright install chromium',
|
|
199
199
|
note: 'Chromium for its recordings, and ffmpeg (imageio-ffmpeg brings one); the runtime image carries both.',
|
|
200
200
|
},
|
|
201
201
|
tags: ['video', 'recording', 'media'],
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@datalayer/agent-runtimes",
|
|
3
|
-
"version": "1.6.
|
|
3
|
+
"version": "1.6.32",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"workspaces": [
|
|
6
6
|
".",
|
|
@@ -164,7 +164,7 @@
|
|
|
164
164
|
"@datalayer/lexical-loro": "^1.0.6",
|
|
165
165
|
"@datalayer/primer-addons": "^1.0.46",
|
|
166
166
|
"@datalayer/primer-rjsf": "^1.0.3",
|
|
167
|
-
"@datalayer/personal-agent-protocol": "
|
|
167
|
+
"@datalayer/personal-agent-protocol": ">=0.33.0 <0.35",
|
|
168
168
|
"@datalayer/reactor": "^1.3.5",
|
|
169
169
|
"@datalayer/reactor-commands": "^1.0.4",
|
|
170
170
|
"@datalayer/reactor-manager": "^1.0.4",
|
|
@@ -76,6 +76,11 @@ CAMEL = {
|
|
|
76
76
|
#: and a sample's metrics by name.
|
|
77
77
|
VERBATIM = ("components", "weights", "metrics")
|
|
78
78
|
|
|
79
|
+
#: The keys whose value is a JSON Schema, kept whole as the Appspec's readers
|
|
80
|
+
#: keep it: its keys as written and its nulls too (`default: null` says
|
|
81
|
+
#: something there).
|
|
82
|
+
WHOLE = ("settings", "settings_ui")
|
|
83
|
+
|
|
79
84
|
|
|
80
85
|
def _flat(text: Any) -> str:
|
|
81
86
|
"""A text on one line."""
|
|
@@ -271,8 +276,10 @@ def _typescript_value(value: Any, verbatim: bool = False) -> Any:
|
|
|
271
276
|
"""An application as the TypeScript interfaces read it; nulls left out."""
|
|
272
277
|
if isinstance(value, dict):
|
|
273
278
|
return {
|
|
274
|
-
(key if verbatim else CAMEL.get(key, key)):
|
|
275
|
-
item
|
|
279
|
+
(key if verbatim else CAMEL.get(key, key)): (
|
|
280
|
+
item
|
|
281
|
+
if key in WHOLE and not verbatim
|
|
282
|
+
else _typescript_value(item, verbatim or key in VERBATIM)
|
|
276
283
|
)
|
|
277
284
|
for key, item in value.items()
|
|
278
285
|
if item is not None
|
|
@@ -101,7 +101,11 @@ def generate_python_code(specs: list[dict[str, Any]]) -> str:
|
|
|
101
101
|
f" tags={_fmt_list(spec.get('tags', []))},",
|
|
102
102
|
f" enabled={spec.get('enabled', True)},",
|
|
103
103
|
f" toolset={_fmt_toolset(spec.get('toolset', 'all'))},",
|
|
104
|
-
*(
|
|
104
|
+
*(
|
|
105
|
+
[f" streams={_fmt_list(spec['streams'])},"]
|
|
106
|
+
if spec.get("streams")
|
|
107
|
+
else []
|
|
108
|
+
),
|
|
105
109
|
f" icon={icon},",
|
|
106
110
|
f" emoji={emoji},",
|
|
107
111
|
")",
|
|
@@ -194,7 +198,11 @@ def generate_typescript_code(specs: list[dict[str, Any]]) -> str:
|
|
|
194
198
|
f" tags: {tags_json},",
|
|
195
199
|
f" enabled: {str(spec.get('enabled', True)).lower()},",
|
|
196
200
|
f" toolset: {_fmt_toolset_ts(spec.get('toolset', 'all'))},",
|
|
197
|
-
*(
|
|
201
|
+
*(
|
|
202
|
+
[f" streams: {_fmt_toolset_ts(spec['streams'])},"]
|
|
203
|
+
if spec.get("streams")
|
|
204
|
+
else []
|
|
205
|
+
),
|
|
198
206
|
f" icon: {icon},",
|
|
199
207
|
f" emoji: {emoji},",
|
|
200
208
|
"};",
|
|
@@ -117,6 +117,7 @@ CAMEL = {
|
|
|
117
117
|
"client_id_per_application": "clientIdPerApplication",
|
|
118
118
|
}
|
|
119
119
|
|
|
120
|
+
|
|
120
121
|
def _flat(text: Any) -> str:
|
|
121
122
|
return " ".join(str(text or "").split())
|
|
122
123
|
|
|
@@ -164,14 +165,19 @@ def load_specs(kind: str, specs_dir: Path) -> list[dict[str, Any]]:
|
|
|
164
165
|
]
|
|
165
166
|
elif kind == "battles":
|
|
166
167
|
battles = module.load_battles(specs_dir)
|
|
167
|
-
specs = [
|
|
168
|
+
specs = [
|
|
169
|
+
battles[identity].model_dump(mode="json") for identity in sorted(battles)
|
|
170
|
+
]
|
|
168
171
|
elif kind == "stages":
|
|
169
172
|
stages = module.load_stages(specs_dir)
|
|
170
|
-
specs = [
|
|
173
|
+
specs = [
|
|
174
|
+
stages[identity].model_dump(mode="json") for identity in sorted(stages)
|
|
175
|
+
]
|
|
171
176
|
elif kind == "identities":
|
|
172
177
|
identities = module.load_identities(specs_dir)
|
|
173
178
|
specs = [
|
|
174
|
-
identities[identity].model_dump(mode="json")
|
|
179
|
+
identities[identity].model_dump(mode="json")
|
|
180
|
+
for identity in sorted(identities)
|
|
175
181
|
]
|
|
176
182
|
elif kind == "tracks":
|
|
177
183
|
tracks = module.load_tracks(specs_dir)
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as e,B as s,I as te,T as f,r as m,ds as ce,f2 as ue,bB as P,dr as H,L as W,f3 as fe,f4 as J,v as V,P as xe,f5 as he,V as pe,f6 as me,e6 as G,bs as M,f7 as ge,f8 as be,f9 as X,fa as je,fb as Se}from"../datalayer-app-main.js";import{B,U as L}from"./index-BbcMy3Al.js";const we={default:{bg:"canvas.default",borderColor:"border.default"},subtle:{bg:"canvas.subtle",borderColor:"border.default"},inset:{bg:"canvas.inset",borderColor:"border.default"},accent:{bg:"accent.subtle",borderColor:"accent.muted"},success:{bg:"success.subtle",borderColor:"success.muted"},attention:{bg:"attention.subtle",borderColor:"attention.muted"},danger:{bg:"danger.subtle",borderColor:"danger.muted"}},_e="card",ne={none:"none",small:"shadow.small",medium:"shadow.medium",large:"shadow.large",extraLarge:"shadow.extraLarge"},ye={cursor:"pointer",textAlign:"left",font:"inherit",transition:"border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease",hover:{borderColor:"accent.emphasis",boxShadow:ne.medium},focusVisible:{outline:"2px solid",outlineColor:"accent.emphasis",outlineOffset:"2px"},reducedMotion:{transition:"none"}},O="cubic-bezier(0.22, 1, 0.36, 1)",re="data-card-icon",K=`[${re}]`,ve=["&:hover","&:focus-visible","&:has(:focus-visible)"];function ke(t){const n={boxShadow:"shadow.large",transform:"translateY(-3px)",borderColor:t},r={transition:`box-shadow 260ms ${O}, transform 260ms ${O}, border-color 260ms ${O}`,"&::after":{content:'""',position:"absolute",top:0,left:0,right:0,height:"2px",background:"linear-gradient(90deg, transparent, var(--fgColor-accent), transparent)",opacity:0,pointerEvents:"none",transition:`opacity 260ms ${O}`}},o={transition:`box-shadow 260ms ${O}, border-color 260ms ${O}`,[`& ${K}`]:{transition:"none"}};for(const a of ve)r[a]=n,r[`${a}::after`]={opacity:1},r[`${a} ${K}`]={transform:"scale(1.06) rotate(-3deg)"},o[a]={transform:"none"},o[`${a} ${K}`]={transform:"none"};return r["@media (prefers-reduced-motion: reduce)"]=o,r}const Ce={cursor:"not-allowed",opacity:.6,hover:{}},v=t=>{const{rounded:n,border:r,shadow:o="small",variant:a="default",interactive:i,selected:d,dashed:x,disabled:u,accent:h,hoverEffect:c,sx:g,children:j,...S}=t,p=c==="lift"&&!u,A=r||i||d||x||p,l=we[a],w=p?ke(i?"accent.emphasis":"border.muted"):void 0,b=w?{...w,...g}:g;return e.jsx(s,{display:"flex",flexDirection:"column",bg:d?"accent.subtle":l.bg,color:"fg.default",borderRadius:n??_e,boxShadow:ne[o],...A?{border:"1px solid",borderColor:d?"accent.emphasis":l.borderColor}:void 0,...x?{borderStyle:"dashed"}:void 0,...h?{borderTop:"3px solid",borderTopColor:h}:void 0,...i?ye:void 0,...u?Ce:void 0,...i&&u?{"aria-disabled":!0}:void 0,...p?{position:"relative",overflow:"hidden"}:void 0,...S,sx:b,children:j})};v.Header=t=>{const{title:n,description:r,leadingVisual:o,action:a}=t;return e.jsxs(s,{display:"flex",alignItems:"center",p:3,children:[o&&e.jsx(s,{mr:3,children:e.jsx(te,{size:"medium",icon:o,"aria-label":""})}),e.jsxs(s,{flexGrow:1,children:[e.jsx(f,{as:"div",display:"block",children:n}),e.jsx(f,{display:"block",color:"fg.muted",children:r})]}),a&&e.jsx(s,{children:a})]})};v.Image=({url:t,image:n,svg:r,height:o})=>e.jsxs(s,{display:"block",width:"100%",height:`${o}px`,backgroundImage:t?`url(${t})`:void 0,backgroundSize:"cover",backgroundRepeat:"no-repeat",backgroundPosition:"center",objectFit:"cover",children:[n&&e.jsx("img",{src:n,style:{maxHeight:`${o}px`}}),r&&e.jsx("img",{src:`data:image/svg+xml;utf8,${r}`,style:{maxHeight:o}})]});v.Cover=({height:t=110,image:n,gradient:r,color:o="neutral.emphasis",accessory:a,children:i,...d})=>e.jsxs(s,{position:"relative",width:"100%",height:`${t}px`,flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center",bg:o,backgroundImage:n?`url(${n})`:r?`linear-gradient(135deg, ${r.from} 0%, ${r.to} 100%)`:void 0,backgroundSize:"cover",backgroundPosition:"center",color:"fg.onEmphasis",fontSize:4,fontWeight:"semibold",...d,children:[i,a&&e.jsx(s,{position:"absolute",top:2,right:2,display:"flex",alignItems:"center",gap:1,children:a})]});v.Content=({children:t,...n})=>e.jsx(s,{display:"block",p:3,...n,children:t});v.Footer=({children:t,...n})=>e.jsx(s,{display:"flex",alignItems:"center",gap:2,flexWrap:"wrap",mt:"auto",px:3,py:2,borderTop:"1px solid",borderColor:"border.muted",...n,children:t});v.Icon=({icon:t,color:n="accent.fg",bg:r="accent.subtle",size:o=46,...a})=>e.jsx(s,{[re]:"",display:"inline-flex",alignItems:"center",justifyContent:"center",flexShrink:0,width:o,height:o,borderRadius:`${Math.round(o*13/46)}px`,color:n,bg:r,mb:3,boxShadow:"inset 0 0 0 1px currentColor",transition:`transform 320ms ${O}`,...a,children:e.jsx(t,{size:Math.round(o*22/46),fill:"currentColor"})});v.Actions=({children:t})=>e.jsx(s,{display:"block",p:3,mt:"auto",children:t});function D(t){const n=Number(t);return!isNaN(n)&&n>1e15?n/1e6:!isNaN(n)&&n>1e12?n/1e3:isNaN(n)?new Date(String(t)).getTime():n}function Y(t){return t==null?"—":t<.001?"<1µs":t<1?`${(t*1e3).toFixed(0)}µs`:t<1e3?`${t.toFixed(1)}ms`:t<6e4?`${(t/1e3).toFixed(2)}s`:`${(t/6e4).toFixed(1)}m`}function Ie(t){if(t==null||t==="")return"—";try{const n=D(t),r=new Date(n);return isNaN(r.getTime())?String(t):r.toLocaleTimeString(void 0,{hour:"2-digit",minute:"2-digit",second:"2-digit",fractionalSecondDigits:3})}catch{return String(t)}}const Q=["#0969da","#1a7f37","#cf222e","#8250df","#bf8700","#0550ae","#116329","#a40e26","#6639ba","#953800","#0e8a16","#e36209"];function Te(t){let n=0;for(let r=0;r<t.length;r++)n=n*31+t.charCodeAt(r)|0;return Q[Math.abs(n)%Q.length]}function oe(t){const n=new Map,r=t.map(i=>({...i,children:[],depth:0}));for(const i of r)n.set(i.span_id,i);const o=[];for(const i of r)if(i.parent_span_id&&n.has(i.parent_span_id)){const d=n.get(i.parent_span_id);d.children=d.children??[],d.children.push(i)}else o.push(i);function a(i,d){i.depth=d;for(const x of i.children??[])a(x,d+1)}for(const i of o)a(i,0);return o}const Ae="peer.service";function ze(t,n){return t.service_name===n||t.attributes?.[Ae]===n}function $e(t,n){return n?t.filter(r=>ze(r,n)):[...t]}const Z=[],Oe=()=>()=>{};function Ee(t){return m.useSyncExternalStore(t?t.subscribe:Oe,()=>t?t.spans():Z,()=>t?t.spans():Z)}const Re="140px 1fr 160px 90px",Ne="96px minmax(0, 1fr) 96px 64px";function De(t){const n=t.attributes;if(!n)return null;const r=n["gen_ai.usage.input_tokens"]!=null?Number(n["gen_ai.usage.input_tokens"]):void 0,o=n["gen_ai.usage.output_tokens"]!=null?Number(n["gen_ai.usage.output_tokens"]):void 0;return r==null&&o==null?null:{input:r,output:o}}const Me=({spans:t,loading:n,selectedSpanId:r,onSelectSpan:o,emptyText:a,compact:i=!1,defaultExpanded:d=!1,renderSpanMark:x,describeSpan:u})=>{const[h,c]=m.useState(new Set),g=m.useMemo(()=>({has:l=>d?!h.has(l):h.has(l)}),[h,d]),j=i?Ne:Re,S=m.useMemo(()=>oe(t),[t]),p=m.useMemo(()=>{const l=[];function w(b,E){const k=b.children??[];if(l.push({span:b,depth:E,hasChildren:k.length>0}),g.has(b.span_id))for(const $ of k)w($,E+1)}for(const b of S)w(b,0);return l},[S,g]),A=m.useCallback(l=>{c(w=>{const b=new Set(w);return b.has(l)?b.delete(l):b.add(l),b})},[]);return n?e.jsx(s,{display:"flex",justifyContent:"center",p:5,children:e.jsx(ce,{size:"medium"})}):t.length===0?e.jsxs(B,{children:[e.jsx(B.Visual,{children:e.jsx(ue,{size:24})}),e.jsx(B.Heading,{children:"No traces found"}),e.jsx(B.Description,{children:a??"Send some telemetry data first."})]}):e.jsxs(s,{width:"100%",flex:1,minHeight:0,overflow:"auto",children:[e.jsx(s,{display:"grid",gridTemplateColumns:j,gap:2,px:3,position:"sticky",top:0,bg:"canvas.subtle",zIndex:1,borderBottom:"2px solid",borderColor:"border.default",children:["Time","Message","Scope","Duration"].map(l=>e.jsx(f,{sx:{fontWeight:"bold",fontSize:0,color:"fg.muted",textTransform:"uppercase",letterSpacing:"0.05em",py:2,...l==="Duration"?{textAlign:"right"}:{}},children:l},l))}),p.map(({span:l,depth:w,hasChildren:b},E)=>{const k=r===l.span_id,$=g.has(l.span_id),I=w*(i?12:20),C=u?.(l);return e.jsxs(s,{"data-otel-span":l.span_id,"data-otel-span-name":l.span_name,onClick:()=>{b&&A(l.span_id),o?.(l)},display:"grid",gridTemplateColumns:j,gap:2,px:3,py:"5px",cursor:"pointer",bg:k?"accent.subtle":w>0?"canvas.inset":"canvas.default",borderBottom:"1px solid",borderColor:"border.muted",hover:{bg:k?"accent.subtle":"canvas.subtle"},children:[e.jsx(f,{sx:{fontSize:i?0:1,fontFamily:"mono",color:"fg.muted",whiteSpace:"nowrap",lineHeight:"22px"},children:Ie(l.start_time)}),e.jsxs(s,{display:"flex",alignItems:"center",gap:1,overflow:"hidden",lineHeight:"22px",pl:`${I}px`,children:[b?e.jsx(s,{flexShrink:0,color:"fg.muted",display:"flex",alignItems:"center",children:$?e.jsx(P,{size:14}):e.jsx(H,{size:14})}):w>0?e.jsx(s,{flexShrink:0,width:"14px",display:"flex",alignItems:"center",justifyContent:"center",color:"fg.subtle",fontSize:0,children:"─"}):null,x?.(l),e.jsx(f,{sx:{fontSize:1,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",flexShrink:C?0:1,maxWidth:C?"60%":void 0},title:l.span_name,children:l.span_name}),l.in_progress&&e.jsx(W,{variant:"attention",size:"small",children:"running"}),l.status_code==="ERROR"&&e.jsx(W,{variant:"danger",size:"small",children:"ERROR"}),(()=>{const z=De(l);return z?e.jsxs(v,{border:!0,shadow:"none",display:"inline-flex",alignItems:"center",gap:"2px",px:1,fontSize:"10px",fontFamily:"mono",color:"fg.muted",flexShrink:0,lineHeight:"16px",children:[z.input!=null&&e.jsxs(s,{display:"inline-flex",alignItems:"center",gap:"1px",children:[e.jsx(f,{sx:{fontSize:"9px",color:"fg.subtle"},children:"↗"}),e.jsx(f,{children:z.input})]}),z.output!=null&&e.jsxs(s,{display:"inline-flex",alignItems:"center",gap:"1px",children:[e.jsx(f,{sx:{fontSize:"9px",color:"fg.subtle"},children:"↙"}),e.jsx(f,{children:z.output})]})]}):null})(),C&&e.jsx(f,{sx:{fontSize:1,color:"fg.muted",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",minWidth:0},title:C,"data-otel-span-description":"",children:C}),l.otel_scope_name&&!i&&e.jsx(W,{size:"small",variant:"secondary",sx:{flexShrink:0,fontSize:"10px"},children:l.otel_scope_name})]}),e.jsx(f,{sx:{fontSize:1,color:"fg.muted",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",lineHeight:"22px"},title:`${l.service_name} / ${l.otel_scope_name??""}`,children:l.service_name}),e.jsx(f,{sx:{fontSize:1,fontFamily:"mono",textAlign:"right",lineHeight:"22px",color:l.duration_ms!=null&&l.duration_ms>1e3?"danger.fg":"fg.default"},children:l.in_progress?"…":Y(l.duration_ms)})]},`${l.trace_id}-${l.span_id}-${E}`)})]})},Be=20,se=({span:t,depth:n,selectedSpanId:r,onSelectSpan:o,expandedIds:a,toggleExpanded:i,traceMinTime:d,traceDuration:x})=>{const u=(t.children?.length??0)>0,h=a.has(t.span_id),c=r===t.span_id,g=Te(t.service_name),j=(D(t.start_time)-d)/x*100,S=Math.max((t.duration_ms||0)/x*100,.5);return e.jsxs(e.Fragment,{children:[e.jsxs(s,{display:"flex",alignItems:"center",height:28,pl:`${n*Be}px`,pr:2,cursor:"pointer",bg:c?"accent.subtle":"canvas.default",borderBottom:"1px solid",borderColor:"border.muted",hover:{bg:c?"accent.subtle":"canvas.subtle"},onClick:()=>o?.(t),children:[e.jsx(s,{width:20,textAlign:"center",color:"fg.muted",userSelect:"none",flexShrink:0,cursor:u?"pointer":"default",onClick:p=>{p.stopPropagation(),u&&i(t.span_id)},children:u?h?e.jsx(P,{size:12}):e.jsx(H,{size:12}):e.jsx(f,{sx:{color:"fg.subtle",fontSize:0},children:"·"})}),e.jsx(s,{width:8,height:8,borderRadius:"50%",bg:g,flexShrink:0,mr:1}),e.jsx(f,{sx:{flex:"0 0 200px",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",fontSize:1,fontWeight:c?"bold":"normal"},title:`${t.service_name} / ${t.span_name}`,children:t.span_name}),e.jsx(s,{flex:1,position:"relative",height:12,bg:"canvas.subtle",borderRadius:1,mx:2,overflow:"hidden",children:e.jsx(s,{position:"absolute",left:`${j}%`,width:`${S}%`,height:"100%",bg:g,borderRadius:1,opacity:c?1:.7})}),e.jsx(f,{sx:{minWidth:60,textAlign:"right",fontSize:0,fontFamily:"mono",color:"fg.muted",flexShrink:0},children:Y(t.duration_ms)})]}),u&&h&&t.children.map(p=>e.jsx(se,{span:p,depth:n+1,selectedSpanId:r,onSelectSpan:o,expandedIds:a,toggleExpanded:i,traceMinTime:d,traceDuration:x},p.span_id))]})},Le=({spans:t,selectedSpanId:n,onSelectSpan:r,defaultExpandDepth:o=2})=>{const a=m.useMemo(()=>{const c=new Set;function g(j,S){for(const p of j)S<o&&c.add(p.span_id),p.children&&g(p.children,S+1)}return g(t,0),c},[t,o]),[i,d]=m.useState(a),x=m.useCallback(c=>{d(g=>{const j=new Set(g);return j.has(c)?j.delete(c):j.add(c),j})},[]),{traceMinTime:u,traceDuration:h}=m.useMemo(()=>{let c=1/0,g=-1/0;function j(S){for(const p of S){const A=D(p.start_time),l=D(p.end_time);A<c&&(c=A),l>g&&(g=l),p.children&&j(p.children)}}return j(t),c===1/0?{traceMinTime:0,traceDuration:1}:{traceMinTime:c,traceDuration:g-c||1}},[t]);return t.length===0?e.jsx(s,{p:3,color:"fg.muted",textAlign:"center",children:e.jsx(f,{children:"No span tree to display."})}):e.jsxs(s,{width:"100%",overflow:"auto",children:[e.jsxs(s,{display:"flex",alignItems:"center",height:28,px:2,borderBottom:"2px solid",borderColor:"border.default",bg:"canvas.subtle",children:[e.jsx(s,{width:20}),e.jsx(s,{width:8,mr:1}),e.jsx(f,{sx:{flex:"0 0 200px",fontSize:0,fontWeight:"bold",color:"fg.muted",textTransform:"uppercase",letterSpacing:"0.05em"},children:"Span"}),e.jsx(f,{sx:{flex:1,mx:2,fontSize:0,fontWeight:"bold",color:"fg.muted",textTransform:"uppercase",letterSpacing:"0.05em"},children:"Timeline"}),e.jsx(f,{sx:{minWidth:60,textAlign:"right",fontSize:0,fontWeight:"bold",color:"fg.muted",textTransform:"uppercase",letterSpacing:"0.05em"},children:"Duration"})]}),t.map(c=>e.jsx(se,{span:c,depth:0,selectedSpanId:n,onSelectSpan:r,expandedIds:i,toggleExpanded:x,traceMinTime:u,traceDuration:h},c.span_id))]})},y=({label:t,value:n,mono:r=!1})=>n==null||n===""?null:e.jsxs(s,{display:"flex",py:1,borderBottom:"1px solid",borderColor:"border.muted",gap:2,children:[e.jsx(f,{sx:{width:140,minWidth:140,color:"fg.muted",fontSize:1,fontWeight:"bold"},children:t}),e.jsx(f,{sx:{fontSize:1,fontFamily:r?"mono":"normal",wordBreak:"break-all"},children:String(n)})]}),ee=({title:t,data:n,defaultOpen:r=!1})=>{const[o,a]=m.useState(r);return!n||Object.keys(n).length===0?null:e.jsxs(s,{mt:3,children:[e.jsxs(s,{display:"flex",alignItems:"center",gap:1,cursor:"pointer",py:1,userSelect:"none",onClick:()=>a(!o),children:[o?e.jsx(P,{size:16}):e.jsx(H,{size:16}),e.jsx(f,{sx:{fontSize:1,fontWeight:"bold"},children:t}),e.jsx(J,{children:Object.keys(n).length})]}),o&&e.jsx(v,{border:!0,shadow:"none",variant:"subtle",display:"block",p:2,mt:1,overflowX:"auto",children:Object.entries(n).map(([i,d])=>e.jsx(F,{attrKey:i,value:d,depth:0},i))})]})};function We(t){if(typeof t!="string")return t;const n=t.trim();if(!/^[[{]/.test(n))return t;try{const r=JSON.parse(n);return typeof r=="object"&&r!==null?r:t}catch{return t}}const F=({attrKey:t,value:n,depth:r})=>{const o=m.useMemo(()=>We(n),[n]),[a,i]=m.useState(r<1),d=typeof o=="object"&&o!==null&&!Array.isArray(o),x=Array.isArray(o),u=d||x;return e.jsxs(s,{borderBottom:r===0?"1px solid":"none",borderColor:"border.muted",pb:r===0?1:0,mb:r===0?1:0,children:[e.jsxs(s,{display:"flex",gap:2,py:1,pl:r*16+"px",alignItems:"flex-start",children:[u?e.jsx(s,{cursor:"pointer",color:"fg.muted",userSelect:"none",width:16,flexShrink:0,onClick:()=>i(!a),children:a?e.jsx(P,{size:12}):e.jsx(H,{size:12})}):e.jsx(s,{width:16,flexShrink:0}),e.jsx(f,{sx:{color:"accent.fg",fontSize:1,fontFamily:"mono",minWidth:180,wordBreak:"break-all",flexShrink:0},children:t}),!u&&e.jsx(f,{sx:{fontSize:1,fontFamily:"mono",whiteSpace:"pre-wrap",wordBreak:"break-word",color:typeof o=="string"?"accent.emphasis":"attention.fg"},children:typeof o=="string"?o:JSON.stringify(o)}),u&&!a&&e.jsx(f,{sx:{fontSize:0,color:"fg.muted",fontFamily:"mono"},children:x?`[${o.length} items]`:`{${Object.keys(o).length} keys}`})]}),u&&a&&e.jsx(s,{children:x?o.map((h,c)=>e.jsx(F,{attrKey:`[${c}]`,value:h,depth:r+1},c)):Object.entries(o).map(([h,c])=>e.jsx(F,{attrKey:h,value:c,depth:r+1},h))})]})},Fe=({span:t,traceSpans:n,onClose:r})=>{const[o,a]=m.useState("details");if(!t)return e.jsx(s,{p:5,color:"fg.muted",textAlign:"center",children:e.jsx(f,{children:"Select a span to view details."})});const i={},d={};if(t.attributes)for(const[u,h]of Object.entries(t.attributes))u.startsWith("gen_ai.")||u.startsWith("model_request")?i[u]=h:d[u]=h;const x=n&&n.length>0?oe(n):void 0;return e.jsxs(s,{height:"100%",overflow:"auto",borderLeft:"1px solid",borderColor:"border.default",bg:"canvas.default",display:"flex",flexDirection:"column",children:[e.jsxs(s,{px:3,py:2,borderBottom:"1px solid",borderColor:"border.default",display:"flex",justifyContent:"space-between",alignItems:"center",bg:"canvas.subtle",flexShrink:0,children:[e.jsx(f,{sx:{fontSize:2,fontWeight:"bold"},children:t.span_name}),r&&e.jsx(te,{icon:fe,"aria-label":"Close detail panel",variant:"invisible",size:"small",onClick:r})]}),e.jsxs(L,{"aria-label":"Span detail tabs",children:[e.jsx(L.Item,{"aria-current":o==="details"?"page":void 0,onClick:()=>a("details"),children:"Details"}),x&&e.jsx(L.Item,{"aria-current":o==="tree"?"page":void 0,onClick:()=>a("tree"),children:"Trace Tree"}),e.jsx(L.Item,{"aria-current":o==="raw"?"page":void 0,onClick:()=>a("raw"),children:"Raw Data"})]}),e.jsxs(s,{flex:1,overflow:"auto",children:[o==="details"&&e.jsxs(s,{p:3,children:[e.jsx(y,{label:"span_name",value:t.span_name}),e.jsx(y,{label:"service_name",value:t.service_name}),e.jsx(y,{label:"otel_scope_name",value:t.otel_scope_name}),e.jsx(y,{label:"kind",value:t.kind}),e.jsx(y,{label:"trace_id",value:t.trace_id,mono:!0}),e.jsx(y,{label:"span_id",value:t.span_id,mono:!0}),e.jsx(y,{label:"parent_span_id",value:t.parent_span_id,mono:!0}),e.jsx(y,{label:"duration",value:Y(t.duration_ms)}),e.jsx(y,{label:"start_time",value:t.start_time,mono:!0}),e.jsx(y,{label:"end_time",value:t.end_time,mono:!0}),e.jsx(y,{label:"status_code",value:t.status_code}),e.jsx(y,{label:"status_message",value:t.status_message}),e.jsx(ee,{title:"Arguments",data:i,defaultOpen:Object.keys(i).length>0}),e.jsx(ee,{title:"Attributes",data:d}),t.events&&t.events.length>0&&e.jsxs(s,{mt:3,children:[e.jsxs(s,{display:"flex",alignItems:"center",gap:1,children:[e.jsx(f,{sx:{fontWeight:"bold",fontSize:1},children:"Events"}),e.jsx(J,{children:t.events.length})]}),t.events.map((u,h)=>e.jsxs(v,{border:!0,shadow:"none",variant:"subtle",display:"block",p:2,mt:2,children:[e.jsxs(s,{display:"flex",gap:2,children:[e.jsx(W,{children:u.name}),e.jsx(f,{sx:{fontSize:0,color:"fg.muted",fontFamily:"mono"},children:u.timestamp})]}),u.attributes&&Object.keys(u.attributes).length>0&&e.jsx(s,{mt:1,children:Object.entries(u.attributes).map(([c,g])=>e.jsx(F,{attrKey:c,value:g,depth:0},c))})]},h))]}),t.links&&t.links.length>0&&e.jsxs(s,{mt:3,children:[e.jsxs(s,{display:"flex",alignItems:"center",gap:1,children:[e.jsx(f,{sx:{fontWeight:"bold",fontSize:1},children:"Links"}),e.jsx(J,{children:t.links.length})]}),t.links.map((u,h)=>e.jsxs(f,{sx:{display:"block",fontSize:1,fontFamily:"mono",py:1,borderBottom:"1px solid",borderColor:"border.muted"},children:["trace: ",u.trace_id," → span: ",u.span_id]},h))]})]}),o==="tree"&&x&&e.jsx(Le,{spans:x,selectedSpanId:t.span_id,defaultExpandDepth:4}),o==="raw"&&e.jsx(s,{as:"pre",p:3,fontSize:0,fontFamily:"mono",whiteSpace:"pre-wrap",wordBreak:"break-word",m:0,bg:"canvas.subtle",children:JSON.stringify(t,null,2)})]})]})},Pe=[{label:"Service",value:t=>t.service_name},{label:"Kind",value:t=>t.kind}];function He(t,n,r){return t.filter(o=>n.every((a,i)=>{const d=r[i];if(!d?.size)return!0;const x=a.value(o);return x!==void 0&&d.has(x)}))}function Ue(t,n){const r=new Set(t);return r.has(n)?r.delete(n):r.add(n),r}function Ve({facet:t,options:n,selected:r,onChange:o}){const a=t.name??(i=>i);return e.jsxs(G,{children:[e.jsxs(G.Button,{size:"small","data-otel-facet":t.label.toLowerCase(),children:[t.label,r.size?` · ${r.size}`:""]}),e.jsx(G.Overlay,{width:"auto",children:e.jsxs(M,{selectionVariant:"multiple","aria-label":t.label,children:[e.jsx(M.Item,{selected:!r.size,onSelect:()=>o(new Set),children:"All"}),e.jsx(M.Divider,{}),n.map(i=>e.jsx(M.Item,{selected:r.has(i),onSelect:()=>o(Ue(r,i)),children:a(i)},i))]})})]})}function Ge(t,n){const r=new Blob([JSON.stringify(n,null,2)],{type:"application/json"}),o=URL.createObjectURL(r),a=document.createElement("a");a.href=o,a.download=`${t}.json`,a.click(),setTimeout(()=>URL.revokeObjectURL(o),1e3)}const Ke=({tracer:t,spans:n,service:r,facets:o=Pe,compact:a=!1,maxHeight:i=420,detailPlacement:d="below",emptyText:x="Nothing recorded yet.",exportName:u="otel-spans",label:h="Spans",renderSpanMark:c,describeSpan:g})=>{const j=Ee(n?null:t),S=n??j,[p,A]=m.useState(0),[l,w]=m.useState(null),[b,E]=m.useState(()=>o.map(()=>new Set)),[k,$]=m.useState(null),I=m.useMemo(()=>{const _=$e(S,r);return p?_.filter(T=>D(T.start_time)>=p):_},[S,r,p]),C=l??I,z=l?I.length-l.length:0,ie=m.useMemo(()=>o.map(_=>[...new Set(I.map(T=>_.value(T)).filter(T=>T!==void 0))].sort()),[o,I]),R=m.useMemo(()=>He(C,o,b),[C,o,b]),N=m.useMemo(()=>k?S.find(_=>_.span_id===k)??null:null,[S,k]),le=m.useMemo(()=>N?S.filter(_=>_.trace_id===N.trace_id):[],[S,N]),U=d==="side"&&!a;return e.jsxs(v,{border:!0,shadow:"none",display:"block","data-otel-live-spans":"",color:"fg.default",minWidth:0,children:[e.jsxs(s,{role:"toolbar","aria-label":h,display:"flex",flexWrap:"wrap",gap:2,alignItems:"center",p:2,borderBottom:"1px solid",borderColor:"border.default",children:[o.map((_,T)=>e.jsx(Ve,{facet:_,options:ie[T]??[],selected:b[T]??new Set,onChange:ae=>E(de=>o.map((Ye,q)=>q===T?ae:de[q]??new Set))},_.label)),e.jsx(s,{flex:1}),e.jsxs(f,{sx:{fontSize:0,color:"fg.muted"},"data-otel-span-count":"",children:[R.length===C.length?`${R.length} ${R.length===1?"span":"spans"}`:`${R.length} of ${C.length}`,z>0?` · ${z} new`:""]}),e.jsx(V,{size:"small",leadingVisual:l?xe:he,"aria-pressed":l!==null,onClick:()=>w(l?null:I),"data-otel-pause":"",children:l?"Resume":"Pause"}),e.jsx(V,{size:"small",leadingVisual:pe,onClick:()=>{w(null),$(null),t&&!n&&!r?t.clear():A(Date.now())},"data-otel-clear":"",children:"Clear"}),e.jsx(V,{size:"small",leadingVisual:me,disabled:!I.length,onClick:()=>Ge(u,{exportedAt:new Date().toISOString(),spans:[...I]}),"data-otel-export":"",children:"Export"})]}),e.jsxs(s,{display:U?"grid":"block",gridTemplateColumns:U?"minmax(0, 3fr) minmax(0, 2fr)":void 0,children:[e.jsx(s,{maxHeight:i,overflowY:"auto",minWidth:0,children:e.jsx(Me,{spans:R,selectedSpanId:k,onSelectSpan:_=>$(_.span_id),emptyText:x,compact:a,defaultExpanded:!0,renderSpanMark:c,describeSpan:g})}),N&&e.jsx(s,{"data-otel-live-detail":"",maxHeight:i,overflowY:"auto",minWidth:0,borderTop:U?"none":"1px solid",borderColor:"border.default",children:e.jsx(Fe,{span:N,traceSpans:le,onClose:()=>$(null)})})]})]})},Je=[{label:"Source",value:be,name:t=>ge[t]??t},{label:"Operation",value:t=>{const n=t.attributes??{},r=n[X.operation]??n["rpc.method"];return r===void 0?void 0:String(r)}},{label:"Agent",value:t=>t.service_name}];function Xe(t){const n=t.attributes?.[X.markIcon],r=t.attributes?.[X.markEmoji];return n||r?e.jsx(Se,{icon:typeof n=="string"?n:void 0,emoji:typeof r=="string"?r:void 0,size:14}):null}function Ze({tracer:t,spans:n,agent:r,maxHeight:o=420,compact:a=!1,emptyText:i="Nothing recorded yet.",exportName:d="agent-inspector"}){return e.jsx("div",{"data-agent-inspector":r??"",children:e.jsx(Ke,{tracer:t,spans:n,service:r,facets:Je,compact:a,maxHeight:o,detailPlacement:"side",emptyText:i,exportName:d,label:r?`${r}'s Agent Inspector`:"Agent Inspector",renderSpanMark:Xe,describeSpan:je})})}export{Je as AGENT_INSPECTOR_FACETS,Ze as AgentInspector,Ze as default};
|