@hazeljs/inspector 0.8.7 → 1.0.0
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hazeljs/inspector",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "1.0.0",
|
|
4
4
|
"description": "Framework-aware runtime inspector for HazelJS - metadata explorer and DevTools UI",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -22,22 +22,22 @@
|
|
|
22
22
|
"reflect-metadata": "^0.2.2"
|
|
23
23
|
},
|
|
24
24
|
"peerDependencies": {
|
|
25
|
-
"@hazeljs/agent": "^0.
|
|
26
|
-
"@hazeljs/ai": "^0.
|
|
27
|
-
"@hazeljs/core": "^0.
|
|
28
|
-
"@hazeljs/cron": "^0.
|
|
29
|
-
"@hazeljs/data": "^0.
|
|
30
|
-
"@hazeljs/event-emitter": "^0.
|
|
31
|
-
"@hazeljs/flow": "^0.
|
|
32
|
-
"@hazeljs/graphql": "^0.
|
|
33
|
-
"@hazeljs/grpc": "^0.
|
|
34
|
-
"@hazeljs/kafka": "^0.
|
|
35
|
-
"@hazeljs/ml": "^0.
|
|
36
|
-
"@hazeljs/prompts": "^0.
|
|
37
|
-
"@hazeljs/queue": "^0.
|
|
38
|
-
"@hazeljs/rag": "^0.
|
|
39
|
-
"@hazeljs/serverless": "^0.
|
|
40
|
-
"@hazeljs/websocket": "^0.
|
|
25
|
+
"@hazeljs/agent": "^1.0.0",
|
|
26
|
+
"@hazeljs/ai": "^1.0.0",
|
|
27
|
+
"@hazeljs/core": "^1.0.0",
|
|
28
|
+
"@hazeljs/cron": "^1.0.0",
|
|
29
|
+
"@hazeljs/data": "^1.0.0",
|
|
30
|
+
"@hazeljs/event-emitter": "^1.0.0",
|
|
31
|
+
"@hazeljs/flow": "^1.0.0",
|
|
32
|
+
"@hazeljs/graphql": "^1.0.0",
|
|
33
|
+
"@hazeljs/grpc": "^1.0.0",
|
|
34
|
+
"@hazeljs/kafka": "^1.0.0",
|
|
35
|
+
"@hazeljs/ml": "^1.0.0",
|
|
36
|
+
"@hazeljs/prompts": "^1.0.0",
|
|
37
|
+
"@hazeljs/queue": "^1.0.0",
|
|
38
|
+
"@hazeljs/rag": "^1.0.0",
|
|
39
|
+
"@hazeljs/serverless": "^1.0.0",
|
|
40
|
+
"@hazeljs/websocket": "^1.0.0"
|
|
41
41
|
},
|
|
42
42
|
"peerDependenciesMeta": {
|
|
43
43
|
"@hazeljs/cron": {
|
|
@@ -87,7 +87,7 @@
|
|
|
87
87
|
}
|
|
88
88
|
},
|
|
89
89
|
"devDependencies": {
|
|
90
|
-
"@hazeljs/core": "^0.
|
|
90
|
+
"@hazeljs/core": "^1.0.0",
|
|
91
91
|
"@types/jest": "^29.5.14",
|
|
92
92
|
"@types/node": "^20.19.39",
|
|
93
93
|
"@typescript-eslint/eslint-plugin": "^8.58.0",
|
|
@@ -97,7 +97,7 @@
|
|
|
97
97
|
"preact": "^10.29.1",
|
|
98
98
|
"ts-jest": "^29.4.9",
|
|
99
99
|
"typescript": "^5.9.3",
|
|
100
|
-
"vite": "^
|
|
100
|
+
"vite": "^8.0.16"
|
|
101
101
|
},
|
|
102
102
|
"publishConfig": {
|
|
103
103
|
"access": "public"
|
|
@@ -117,8 +117,8 @@
|
|
|
117
117
|
"author": "Muhammad Arslan <muhammad.arslan@hazeljs.ai>",
|
|
118
118
|
"license": "Apache-2.0",
|
|
119
119
|
"bugs": {
|
|
120
|
-
"url": "https://github.com/
|
|
120
|
+
"url": "https://github.com/hazel-js/hazeljs/issues"
|
|
121
121
|
},
|
|
122
122
|
"homepage": "https://hazeljs.ai",
|
|
123
|
-
"gitHead": "
|
|
123
|
+
"gitHead": "083b94562940a86c8e0a8cd81988d04b541608ac"
|
|
124
124
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@import "https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600&family=DM+Sans:wght@400;500;600;700&display=swap";:root{--hazel-primary:#1a365d;--hazel-primary-hover:#2c5282;--hazel-accent:#1a365d;--hazel-accent-hover:#2c5282;--hazel-primary-muted:#1a365d40;--hazel-accent-muted:#1a365d40;--bg-primary:#0c0e12;--bg-secondary:#14171d;--bg-tertiary:#1a1e26;--bg-elevated:#1f242b;--bg-hover:#252a33;--border:#2d333b;--border-subtle:#21262d;--text-primary:#e6edf3;--text-secondary:#8b949e;--text-muted:#6e7681;--accent:var(--hazel-accent);--accent-hover:var(--hazel-accent-hover);--accent-muted:var(--hazel-accent-muted);--success:#3fb950;--warning:#d29922;--error:#f85149;--radius-sm:6px;--radius-md:8px;--radius-lg:12px;--radius-xl:16px;--shadow-sm:0 1px 2px #0000004d;--shadow-md:0 4px 12px #0006;--shadow-lg:0 8px 24px #00000080;--shadow-glow:0 0 24px #1a365d33;--transition:.2s cubic-bezier(.4, 0, .2, 1)}*{box-sizing:border-box}body{background:var(--bg-primary);color:var(--text-primary);-webkit-font-smoothing:antialiased;margin:0;font-family:DM Sans,-apple-system,BlinkMacSystemFont,sans-serif;font-size:14px;line-height:1.5}#app{min-height:100vh;display:flex}.sidebar{background:var(--bg-secondary);border-right:1px solid var(--border-subtle);flex-direction:column;width:240px;min-width:240px;padding:0;display:flex}.logo{letter-spacing:.02em;color:var(--text-primary);border-bottom:1px solid var(--border-subtle);align-items:center;gap:.625rem;margin:0;padding:1.25rem 1.25rem 1rem;font-size:13px;font-weight:600;display:flex}.logo-img{object-fit:contain;flex-shrink:0;width:24px;height:24px}.logo-svg{width:24px;height:24px;color:var(--accent);flex-shrink:0}.logo-fallback{align-items:center;display:flex}.logo-text{color:var(--text-primary);font-weight:700}.sidebar nav{flex-direction:column;flex:1;gap:.25rem;min-height:0;padding:.75rem 0;display:flex;overflow-y:auto}.nav-section{flex-direction:column;gap:.125rem;display:flex}.nav-section-title{color:var(--text-muted);text-transform:uppercase;letter-spacing:.08em;border-top:1px solid var(--border-subtle);margin:.25rem .5rem 0 0;padding:.5rem 1.25rem .25rem;font-size:10px;font-weight:600}.sidebar nav a{color:var(--text-secondary);border-radius:var(--radius-sm);transition:color var(--transition), background var(--transition);align-items:center;gap:.625rem;margin:0 .5rem;padding:.5rem 1.25rem;font-weight:500;text-decoration:none;display:flex}.sidebar nav a:hover{color:var(--text-primary);background:var(--bg-hover)}.sidebar nav a.active{color:#60a5fa;background:#3b82f633}.sidebar nav a .nav-icon{background:var(--text-muted);border-radius:2px;flex-shrink:0;width:3px;height:14px}.sidebar nav a:hover .nav-icon{background:var(--text-secondary)}.sidebar nav a.active .nav-icon{background:#60a5fa}.sidebar-footer{border-top:1px solid var(--border-subtle);padding:1rem 1.25rem}.btn{background:var(--bg-tertiary);width:100%;color:var(--text-primary);border:1px solid var(--border);border-radius:var(--radius-sm);cursor:pointer;transition:background var(--transition), border-color var(--transition);padding:.5rem 1rem;font-family:inherit;font-size:13px;font-weight:500}.btn:hover{background:var(--bg-hover);border-color:var(--text-muted)}.btn-primary{background:var(--accent);border-color:var(--accent);color:#fff}.btn-primary:hover{background:var(--accent-hover);border-color:var(--accent-hover);color:#fff}.content{background:var(--bg-primary);isolation:isolate;flex:1;padding:1rem 1.5rem;position:relative;overflow:auto}.content:before{content:"";pointer-events:none;z-index:0;background:radial-gradient(80% 50% at 50% -20%,#1a365d59,#0000),radial-gradient(60% 40% at 100%,#1a365d14,#0000),radial-gradient(40% 30% at 0 80%,#1a365d26,#0000);position:absolute;inset:0}.content>*{z-index:1;position:relative}.toolbar{background:var(--bg-secondary);border:1px solid var(--border-subtle);border-radius:var(--radius-md);flex-wrap:wrap;align-items:center;gap:.75rem;margin-bottom:1rem;padding:.5rem .75rem;display:flex}.toolbar-actions{align-items:center;gap:.75rem;display:flex}.toolbar-toggle{color:var(--text-secondary);cursor:pointer;align-items:center;gap:.5rem;font-size:13px;display:flex}.toolbar-toggle input{accent-color:var(--accent)}.btn-sm{width:auto;padding:.4rem .75rem}.overview-status-bar{background:var(--bg-secondary);border:1px solid var(--border-subtle);border-radius:var(--radius-md);flex-wrap:wrap;justify-content:space-between;align-items:center;gap:.75rem;margin-bottom:1rem;padding:.75rem 1rem;display:flex}.status-bar-left{align-items:center;gap:.75rem;display:flex}.status-dot{background:var(--text-muted);border-radius:50%;width:8px;height:8px;animation:2s ease-in-out infinite pulse-dot}.status-dot.healthy{background:var(--success);box-shadow:0 0 8px #3fb95080}.status-dot.unhealthy{background:var(--error);box-shadow:0 0 8px #f8514980}.status-text{color:var(--text-primary);font-size:14px;font-weight:600}.status-uptime{font-family:JetBrains Mono,monospace;font-size:12px}.quick-stats{color:var(--text-secondary);align-items:center;gap:1.5rem;font-size:12px;display:flex}.quick-stat{align-items:center;gap:.375rem;display:flex}.quick-stat strong{color:var(--accent);font-weight:600}.quick-stat.muted{color:var(--text-muted)}@keyframes pulse-dot{0%,to{opacity:1}50%{opacity:.6}}.loading-overlay{-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px);z-index:1000;color:var(--text-secondary);background:#0c0e12e6;flex-direction:column;justify-content:center;align-items:center;gap:1.25rem;display:flex;position:fixed;inset:0}.loading-spinner{border:3px solid var(--border-subtle);border-top-color:var(--accent);border-radius:50%;width:44px;height:44px;animation:.7s cubic-bezier(.5,0,.5,1) infinite spin}@keyframes spin{to{transform:rotate(360deg)}}.health-container{grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:1rem;margin-bottom:1.5rem;display:grid}.health-card{background:var(--bg-secondary);border:1px solid var(--border-subtle);border-radius:var(--radius-md);padding:1rem 1.25rem}.health-card.healthy{border-left:4px solid var(--success);background:linear-gradient(90deg,#3fb9500f 0%,#0000 100%)}.health-card.unhealthy{border-left:4px solid var(--error);background:linear-gradient(90deg,#f851490f 0%,#0000 100%)}.health-card.unknown{border-left:4px solid var(--warning);background:linear-gradient(90deg,#d299220f 0%,#0000 100%)}.health-card h3{margin:0 0 .5rem;font-size:14px}.health-card .status{font-weight:600}.health-card.healthy .status{color:var(--success)}.health-card.unhealthy .status{color:var(--error)}.health-card.unknown .status{color:var(--warning)}.health-card .endpoint{color:var(--text-muted);margin-top:.375rem;font-family:JetBrains Mono,monospace;font-size:10px}.overview-grid{grid-template-rows:repeat(2,minmax(0,1fr));grid-template-columns:repeat(3,minmax(0,1fr));align-items:stretch;gap:1rem;min-height:340px;margin-bottom:1.5rem;display:grid}@media (width<=900px){.overview-grid{grid-template-rows:repeat(3,minmax(0,1fr));grid-template-columns:repeat(2,minmax(0,1fr));min-height:510px}}@media (width<=600px){.overview-grid{grid-template-rows:repeat(6,minmax(0,1fr));grid-template-columns:1fr;min-height:720px}}.overview-block{background:var(--bg-secondary);border:1px solid var(--border-subtle);border-radius:var(--radius-md);min-width:0;min-height:0;transition:border-color var(--transition), box-shadow var(--transition);flex-direction:column;padding:1rem 1.25rem;display:flex;position:relative;overflow-y:auto}.overview-block:before{content:"";background:linear-gradient(90deg, var(--accent) 0%, transparent 70%);opacity:.5;height:2px;position:absolute;top:0;left:0;right:0}.overview-block:hover{border-color:var(--border);box-shadow:var(--shadow-sm)}.overview-block-title{color:var(--text-muted);text-transform:uppercase;letter-spacing:.1em;margin:0 0 .75rem;font-size:10px;font-weight:700}.overview-env .overview-block-title,.overview-health .overview-block-title,.overview-runtime .overview-block-title,.overview-gateway .overview-block-title,.overview-discovery .overview-block-title,.overview-resilience .overview-block-title{color:var(--text-secondary)}.env-info{grid-template-columns:repeat(auto-fill,minmax(140px,1fr));gap:1rem;margin-bottom:1.5rem;display:grid}.env-info-compact{gap:.5rem;margin-bottom:0}.env-info .env-item{color:var(--text-secondary);border-bottom:1px solid var(--border-subtle);padding:.35rem 0;font-size:12px}.env-info .env-item:last-child{border-bottom:none}.env-info .env-item strong{color:var(--text-primary);margin-bottom:.125rem;font-weight:600;display:block}.health-cards-inline{flex-wrap:wrap;gap:.5rem;display:flex}.health-cards-inline .health-card{border-radius:var(--radius-sm);min-width:0;transition:box-shadow var(--transition);flex:1;padding:.75rem 1rem}.health-cards-inline .health-card:hover{box-shadow:var(--shadow-sm)}.health-cards-inline .health-card h3{color:var(--text-secondary);margin-bottom:.375rem;font-size:11px;font-weight:600}.health-cards-inline .health-card .status{font-size:13px;font-weight:700}.runtime-cards-inline{grid-template-columns:repeat(3,minmax(0,1fr));gap:.75rem;display:grid}.runtime-cards-inline .card{background:var(--bg-tertiary);border-radius:var(--radius-sm);border:1px solid var(--border-subtle);min-width:0;transition:border-color var(--transition), background var(--transition);padding:.75rem 1rem}.runtime-cards-inline .card:hover{background:var(--bg-elevated);border-color:var(--border)}.runtime-cards-inline .card .card-icon{width:22px;height:22px;color:var(--accent);margin-bottom:.35rem}.runtime-cards-inline .card .card-label{text-transform:uppercase;letter-spacing:.05em;color:var(--text-muted);margin-bottom:.2rem;font-size:9px;font-weight:600}.runtime-cards-inline .card .card-value{font-family:JetBrains Mono,monospace;font-size:1.1rem;font-weight:600}.runtime-cards-inline .card .card-value.highlight{color:var(--accent)}.chart-inline{height:120px;margin-bottom:1rem}.overview-gateway-stats,.overview-discovery-stats,.overview-resilience-stats{flex-wrap:wrap;gap:.75rem;margin-bottom:.75rem;display:flex}.overview-stat{background:var(--bg-tertiary);border-radius:var(--radius-sm);border:1px solid var(--border-subtle);flex-direction:column;gap:.125rem;min-width:0;padding:.4rem .6rem;display:flex}.overview-stat .stat-value{color:var(--accent);font-family:JetBrains Mono,monospace;font-size:1.1rem;font-weight:700}.overview-stat .stat-label{color:var(--text-muted);text-transform:uppercase;letter-spacing:.05em;font-size:9px;font-weight:600}.overview-gateway-routes,.overview-discovery-services,.overview-resilience-states{color:var(--text-secondary);overflow-wrap:break-word;word-break:break-word;min-width:0;font-size:11px;line-height:1.5}.overview-resilience-states{flex-wrap:wrap;gap:.375rem;display:flex}.overview-gateway-routes code,.overview-discovery-services code,.overview-resilience-states code{background:var(--bg-tertiary);border:1px solid var(--border-subtle);border-radius:4px;padding:.15rem .35rem;font-family:JetBrains Mono,monospace;font-size:10px}.discovery-service{margin-right:.5rem}.cb-state{border-radius:4px;padding:.15rem .4rem;font-size:11px;font-weight:600;display:inline-block}.cb-state.closed{color:var(--success);background:#3fb9501f}.cb-state.open{color:var(--error);background:#f851491f}.cb-state.half-open{color:var(--warning);background:#d299221f}.muted{color:var(--text-muted);font-size:11px}.detail-actions{gap:.5rem;display:flex}.modal{z-index:200;background:#0009;justify-content:center;align-items:center;display:flex;position:fixed;inset:0}.modal-content{background:var(--bg-secondary);border:1px solid var(--border);border-radius:var(--radius-lg);width:90%;max-width:480px;padding:1.5rem}.modal-content.modal-wide{max-width:720px}.playground-output{background:var(--bg-tertiary);border:1px solid var(--border);border-radius:var(--radius-sm);white-space:pre-wrap;word-break:break-word;max-height:200px;padding:1rem;font-size:12px;overflow:auto}.playground-meta{color:var(--text-muted);margin-top:.5rem;font-size:12px}.playground-actions{margin:.5rem 0}.diff-sources{grid-template-columns:1fr 1fr;gap:1rem;margin-bottom:1rem;display:grid}.diff-hint{color:var(--text-muted);margin:.25rem 0;font-size:12px}.diff-result{background:var(--bg-tertiary);border-radius:var(--radius-sm);max-height:300px;margin-top:1rem;padding:1rem;overflow:auto}.diff-result .added{color:var(--success)}.diff-result .removed{color:var(--error)}.diff-result .changed{color:var(--warning)}.module-graph-container{background:var(--bg-secondary);border:1px solid var(--border-subtle);border-radius:var(--radius-md);min-height:200px;margin-bottom:1rem;padding:1rem}.module-graph-svg{width:100%;height:300px}.rag-explorer{background:var(--bg-secondary);border:1px solid var(--border-subtle);border-radius:var(--radius-md);margin-bottom:1rem;padding:1rem}.rag-search-row{gap:.5rem;margin-top:.5rem;display:flex}.rag-search-row input{flex:1}.rag-results{max-height:300px;margin-top:1rem;overflow:auto}.rag-result-item{border-bottom:1px solid var(--border-subtle);padding:.75rem;font-size:12px}.rag-result-item .score{color:var(--accent);font-weight:600}.modal-content h3{margin:0 0 1rem;font-size:16px}.modal-body,.form-group{margin-bottom:1rem}.form-group label{color:var(--text-muted);margin-bottom:.5rem;font-size:12px;font-weight:600;display:block}.form-group input,.form-group select,.form-group textarea{border:1px solid var(--border);border-radius:var(--radius-sm);background:var(--bg-tertiary);width:100%;color:var(--text-primary);padding:.5rem;font-family:JetBrains Mono,monospace}.modal-footer{justify-content:flex-end;gap:.5rem;display:flex}.test-result{border-radius:var(--radius-sm);max-height:200px;margin-top:1rem;padding:1rem;font-family:JetBrains Mono,monospace;font-size:12px;overflow:auto}.test-result.success{color:var(--success);background:#3fb95026}.test-result.error{color:var(--error);background:#f8514926}.chart-container{background:var(--bg-secondary);border:1px solid var(--border-subtle);border-radius:var(--radius-md);height:200px;margin-bottom:1.5rem;padding:1rem}.flow-diagram{--flow-edge:var(--text-muted);background:var(--bg-secondary);border:1px solid var(--border-subtle);border-radius:var(--radius-md);flex-direction:column;gap:.5rem;margin-bottom:.5rem;padding:.5rem;display:flex}.flow-diagram-card{background:var(--bg-tertiary);border:1px solid var(--border-subtle);border-radius:var(--radius-sm);flex-direction:column;gap:.35rem;padding:.35rem .5rem;display:flex;overflow:hidden}.flow-diagram-badge{color:var(--text-secondary);text-transform:uppercase;letter-spacing:.04em;align-items:center;font-size:.65rem;font-weight:600;display:inline-flex}.flow-diagram-svg-wrap{border-radius:var(--radius-sm);background:var(--bg-primary);height:64px;overflow:hidden}.flow-diagram-svg{object-fit:contain;object-position:left center;width:100%;height:100%;display:block}.flow-runtime-hint{color:var(--text-muted);background:var(--bg-secondary);border:1px solid var(--border-subtle);border-radius:var(--radius-sm);flex-wrap:wrap;align-items:center;gap:.35rem .5rem;margin-bottom:.5rem;padding:.4rem .6rem;font-size:11px;display:flex}.flow-runtime-label{color:var(--text-secondary);font-weight:500}.flow-runtime-hint code{background:var(--bg-tertiary);border-radius:4px;padding:.1rem .3rem;font-family:JetBrains Mono,monospace;font-size:10px}.flow-runtime-sep{color:var(--border);font-weight:300}#flows .section-title{margin-bottom:.5rem}.flow-diagram-card .flow-node-group{cursor:default}.flow-diagram-card .flow-node-group:hover .flow-diagram-node{filter:brightness(1.08)}.flow-diagram-node{fill:var(--bg-elevated);stroke:var(--border-subtle);stroke-width:1px;transition:filter .15s}.flow-diagram-node.entry{fill:var(--accent-muted);stroke:var(--accent)}.flow-group{flex-wrap:wrap;align-items:center;gap:.5rem;display:flex}.flow-node{background:var(--bg-tertiary);border:1px solid var(--border);border-radius:var(--radius-sm);padding:.5rem 1rem;font-family:JetBrains Mono,monospace;font-size:12px}.flow-node.entry{border-color:var(--accent);background:var(--accent-muted)}.offline-banner{background:var(--error);color:#fff;border-radius:var(--radius-md);justify-content:space-between;align-items:center;gap:1rem;margin-bottom:1rem;padding:1rem 1.5rem;display:flex}.offline-banner button{border-radius:var(--radius-sm);color:#fff;cursor:pointer;background:#fff3;border:none;padding:.5rem 1rem;font-weight:600}.offline-banner button:hover{background:#ffffff4d}th.sortable{cursor:pointer;-webkit-user-select:none;user-select:none}th.sortable:hover{color:var(--accent)}th.sortable:after{content:" ▾";opacity:.5;font-size:10px}th.sortable.asc:after{content:" ▴";opacity:1}th.sortable.desc:after{content:" ▾";opacity:1}.search{border:1px solid var(--border);border-radius:var(--radius-md);background:var(--bg-secondary);max-width:360px;color:var(--text-primary);transition:border-color var(--transition), box-shadow var(--transition);flex:1;padding:.5rem 1rem .5rem 2.5rem;font-family:JetBrains Mono,monospace;font-size:13px}.search::placeholder{color:var(--text-muted)}.search:focus{border-color:var(--accent);box-shadow:0 0 0 2px var(--accent-muted);outline:none}.search-wrapper{position:relative}.search-wrapper:before{content:"⌕";color:var(--text-muted);pointer-events:none;font-size:14px;position:absolute;top:50%;left:.875rem;transform:translateY(-50%)}.search-wrapper .search{padding-left:2.25rem}.tab-panel{animation:.2s fadeIn;display:none}.tab-panel.active{display:block}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}#summary-cards{flex-direction:column;gap:2rem;margin-top:.5rem;display:flex}#summary-cards:before{content:"Application Summary";color:var(--text-muted);text-transform:uppercase;letter-spacing:.12em;border-bottom:1px solid var(--border-subtle);margin-bottom:1rem;padding-bottom:.75rem;font-size:10px;font-weight:700;display:block}.overview-section{flex-direction:column;gap:1rem;display:flex}.overview-section-title{color:var(--text-muted);text-transform:uppercase;letter-spacing:.08em;border-bottom:1px solid var(--border-subtle);margin:0;padding-bottom:.5rem;font-size:12px;font-weight:600}.overview-section-cards{grid-template-columns:repeat(auto-fill,minmax(120px,1fr));gap:1rem;display:grid}.cards{grid-template-columns:repeat(auto-fill,minmax(160px,1fr));gap:1rem;display:grid}.overview-section .card{cursor:pointer;transition:border-color var(--transition), box-shadow var(--transition), transform var(--transition), background var(--transition);background:#14171d99}.overview-section .card:hover{border-color:var(--accent);box-shadow:0 0 0 1px var(--accent-muted);background:#1f242bcc;transform:translate(4px)}.overview-section .card .card-icon{color:var(--text-muted);transition:color var(--transition)}.overview-section .card:hover .card-icon{color:var(--accent)}.card{background:var(--bg-secondary);border:1px solid var(--border-subtle);border-radius:var(--radius-md);transition:border-color var(--transition), box-shadow var(--transition);cursor:default;flex-direction:column;gap:.5rem;padding:1.25rem;display:flex}.card:hover{border-color:var(--border);box-shadow:var(--shadow-sm)}.card .card-icon{background:var(--accent-muted);width:36px;height:36px;color:var(--accent);border-radius:var(--radius-sm);flex-shrink:0;justify-content:center;align-items:center;display:flex}.card .card-icon svg{flex-shrink:0}.card .card-label{color:var(--text-muted);text-transform:uppercase;letter-spacing:.06em;margin-bottom:0;font-size:11px;font-weight:600}.card .card-value{color:var(--text-primary);font-family:JetBrains Mono,monospace;font-size:1.75rem;font-weight:600}.card .card-value.highlight{color:var(--accent)}.table-container{border:1px solid var(--border-subtle);border-radius:var(--radius-md);background:var(--bg-secondary);overflow-x:auto}table{border-collapse:collapse;width:100%;font-size:13px}th,td{text-align:left;border-bottom:1px solid var(--border-subtle);padding:.75rem 1rem}th{background:var(--bg-tertiary);color:var(--text-muted);text-transform:uppercase;letter-spacing:.05em;font-size:11px;font-weight:600}tr{transition:background var(--transition)}tr:hover{background:var(--bg-hover)}tr:last-child td{border-bottom:none}tr[data-id]{cursor:pointer}td{font-family:JetBrains Mono,monospace;font-size:12px}.badge{text-transform:uppercase;border-radius:4px;padding:.2rem .5rem;font-size:10px;font-weight:600;display:inline-block}.badge-get{color:var(--success);background:#3fb95033}.badge-post{color:var(--warning);background:#d2992233}.badge-put{color:#389bfd;background:#388bfd33}.badge-patch{color:#a371f7;background:#a371f733}.badge-delete{color:var(--error);background:#f8514933}.badge-default{background:var(--bg-tertiary);color:var(--text-muted)}.detail-panel{background:var(--bg-secondary);border-left:1px solid var(--border);z-index:100;flex-direction:column;width:420px;max-width:90vw;height:100%;padding:0;animation:.2s slideIn;display:flex;position:fixed;top:0;right:0;overflow:hidden;box-shadow:-8px 0 24px #0006}.hidden{display:none!important}.info-card{background:var(--bg-secondary);border:1px solid var(--border);border-radius:var(--radius-md);margin-bottom:1rem;padding:1rem 1.25rem}.info-card-title{color:var(--text-primary);margin:0 0 .5rem;font-size:14px;font-weight:600}.info-card-text{color:var(--text-secondary);margin:.25rem 0;font-size:13px;line-height:1.5}.info-card code{background:var(--bg-tertiary);border-radius:4px;padding:.15rem .4rem;font-family:JetBrains Mono,monospace;font-size:12px}.overview-error{background:var(--bg-secondary);border:1px solid var(--error);border-radius:var(--radius-md);color:var(--text-secondary);padding:1.5rem}.overview-error a{color:var(--accent)}@keyframes slideIn{0%{transform:translate(100%)}to{transform:translate(0)}}.detail-header{border-bottom:1px solid var(--border-subtle);background:var(--bg-tertiary);justify-content:space-between;align-items:center;padding:1rem 1.25rem;display:flex}.detail-header h2{color:var(--text-primary);margin:0;font-size:14px;font-weight:600}#detail-content{white-space:pre-wrap;word-break:break-word;color:var(--text-secondary);flex:1;margin:0;padding:1.25rem;font-family:JetBrains Mono,monospace;font-size:12px;line-height:1.6;overflow:auto}#detail-content .json-key{color:#7ee787}#detail-content .json-string{color:#a5d6ff}#detail-content .json-number{color:#79c0ff}#detail-content .json-boolean{color:#ff7b72}#detail-content .json-null{color:var(--text-muted)}td.empty-state{text-align:center;color:var(--text-muted);padding:3rem 2rem!important}.empty-state p{margin:.5rem 0;font-size:14px}.content a{color:var(--accent);text-decoration:none}.content a:hover{text-decoration:underline}.section-title{color:var(--text-primary);margin:0 0 1rem;font-size:16px;font-weight:600}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var e=(()=>{let e=window.location.pathname.match(/^\/[^/]+/);return e?e[0]:`/__hazel`})(),t=window.location.origin,n=null,r=!1,i=[],a=60;async function o(t=!1){let n=`${e}/inspect${t?`?refresh=1`:``}`,r=await fetch(n);if(!r.ok)throw Error(`Failed to fetch: ${r.status}`);return r.json()}async function s(){let t=await fetch(`${e}/stats`);return t.ok?t.json():{}}async function c(){let t=await fetch(`${e}/env`);return t.ok?t.json():{}}async function l(e){try{let n=await fetch(`${t}${e}`),r=n.ok,i;return i=n.headers.get(`content-type`)?.includes(`application/json`)?await n.json():await n.text(),{status:r?`up`:`down`,ok:r,data:i}}catch{return{status:`down`,ok:!1}}}function u(e){let t=document.getElementById(`loading-overlay`);t&&t.classList.toggle(`hidden`,!e)}function d(e,t){let n=document.getElementById(`status-dot`),r=document.getElementById(`status-text`),i=document.getElementById(`status-uptime`);if(!n||!r||!i)return;let a=e?.health?.ok&&e?.ready?.ok&&e?.startup?.ok,o=e?.health?.ok||e?.ready?.ok||e?.startup?.ok;n.className=`status-dot`+(a?` healthy`:o?``:` unhealthy`),r.textContent=a?`All systems operational`:o?`Degraded`:`Offline`,i.textContent=t.uptimeSeconds==null?``:`Uptime: ${m(t.uptimeSeconds)}`}function f(e){let t=document.getElementById(`quick-stats`);if(!t)return;let n=e&&typeof e==`object`?e:{},r=[];(n.route??0)>0&&r.push(`<span class="quick-stat"><strong>${n.route}</strong> routes</span>`),(n.module??0)>0&&r.push(`<span class="quick-stat"><strong>${n.module}</strong> modules</span>`),(n.provider??0)>0&&r.push(`<span class="quick-stat"><strong>${n.provider}</strong> providers</span>`),(n.cron??0)>0&&r.push(`<span class="quick-stat"><strong>${n.cron}</strong> jobs</span>`),t.innerHTML=r.join(``)||`<span class="quick-stat muted">No data</span>`}function p(e){let t=document.getElementById(`offline-banner`);e&&!t&&(t=document.createElement(`div`),t.id=`offline-banner`,t.className=`offline-banner`,t.innerHTML=`<span>App not running. Check that your server is started.</span><button id="retry-btn">Retry</button>`,document.querySelector(`.content`)?.insertBefore(t,document.querySelector(`.toolbar`)),t.querySelector(`#retry-btn`)?.addEventListener(`click`,()=>Y(!0))),t&&t.classList.toggle(`hidden`,!e)}function m(e){return e<60?`${Math.floor(e)}s`:e<3600?`${Math.floor(e/60)}m ${e%60}s`:`${Math.floor(e/3600)}h ${Math.floor(e%3600/60)}m`}function h(e){let t=String(e||``).toUpperCase();return`<span class="badge badge-${t===`GET`?`get`:t===`POST`?`post`:t===`PUT`?`put`:t===`PATCH`?`patch`:t===`DELETE`?`delete`:`default`}">${t||`?`}</span>`}function g(e){return JSON.stringify(e,null,2).replace(/("(\\u[a-zA-Z0-9]{4}|\\[^u]|[^\\"])*"(\s*:)?|\b(true|false|null)\b|-?\d+(?:\.\d*)?(?:[eE][+-]?\d+)?)/g,e=>{let t=`json-number`;return/^"/.test(e)?t=e.endsWith(`:`)?`json-key`:`json-string`:/true|false/.test(e)?t=`json-boolean`:/null/.test(e)&&(t=`json-null`),`<span class="${t}">${_(e)}</span>`})}function _(e){let t=document.createElement(`div`);return t.textContent=e,t.innerHTML}var v={route:`<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"/><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"/></svg>`,module:`<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z"/><polyline points="3.27 6.96 12 12.01 20.73 6.96"/><line x1="12" y1="22.08" x2="12" y2="12"/></svg>`,provider:`<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><ellipse cx="12" cy="5" rx="9" ry="3"/><path d="M21 12c0 1.66-4 3-9 3s-9-1.34-9-3"/><path d="M3 5v14c0 1.66 4 3 9 3s9-1.34 9-3V5"/></svg>`,cron:`<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"/><polyline points="12 6 12 12 16 14"/></svg>`,queue:`<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><line x1="8" y1="6" x2="21" y2="6"/><line x1="8" y1="12" x2="21" y2="12"/><line x1="8" y1="18" x2="21" y2="18"/><line x1="3" y1="6" x2="3.01" y2="6"/><line x1="3" y1="12" x2="3.01" y2="12"/><line x1="3" y1="18" x2="3.01" y2="18"/></svg>`,websocket:`<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polygon points="13 2 3 14 12 14 11 22 21 10 12 10 13 2"/></svg>`,agent:`<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="11" width="18" height="10" rx="2"/><circle cx="12" cy="5" r="2"/><path d="M12 7v4"/></svg>`,rag:`<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M4 19.5A2.5 2.5 0 0 1 6.5 17H20"/><path d="M6.5 2H20v20H6.5A2.5 2.5 0 0 1 4 19.5v-15A2.5 2.5 0 0 1 6.5 2z"/><path d="M8 7h8"/><path d="M8 11h8"/></svg>`,prompt:`<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"/></svg>`,aifunction:`<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M9.663 17h4.673M12 3v1m6.364 1.636l-.707.707M21 12h-1M4 12H3m3.343-5.657l-.707-.707m2.828 9.9a5 5 0 117.072 0l-.548.547A3.374 3.374 0 0014 18.469V19a2 2 0 11-4 0v-.531c0-.895-.356-1.754-.988-2.386l-.548-.547z"/></svg>`,event:`<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M8 2v4"/><path d="M16 2v4"/><rect x="3" y="4" width="18" height="18" rx="2"/><path d="M3 10h18"/><path d="M8 14h.01"/><path d="M12 14h.01"/><path d="M16 14h.01"/></svg>`,graphql:`<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M12 3v18"/><path d="M5 12h14"/><path d="M3 8l9-5 9 5"/><path d="M3 16l9 5 9-5"/></svg>`,grpc:`<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M5 12h14"/><path d="M12 5l7 7-7 7"/></svg>`,kafka:`<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z"/><path d="M9 9h6"/><path d="M9 13h6"/><path d="M9 17h4"/></svg>`,flow:`<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="22 12 18 12 15 21 9 3 6 12 2 12"/></svg>`,data:`<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><line x1="18" y1="20" x2="18" y2="10"/><line x1="12" y1="20" x2="12" y2="4"/><line x1="6" y1="20" x2="6" y2="14"/></svg>`,serverless:`<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M18 10h-1.26A8 8 0 1 0 9 20h9a5 5 0 0 0 0-10z"/></svg>`,ml:`<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M12 2v4"/><path d="M12 18v4"/><path d="m4.93 4.93 2.83 2.83"/><path d="m16.24 16.24 2.83 2.83"/><path d="M2 12h4"/><path d="M18 12h4"/><path d="m4.93 19.07 2.83-2.83"/><path d="m16.24 7.76 2.83-2.83"/><circle cx="12" cy="12" r="4"/></svg>`,decorator:`<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M20.59 13.41l-7.17 7.17a2 2 0 0 1-2.83 0L2 12V2h10l8.59 8.59a2 2 0 0 1 0 2.82z"/><line x1="7" y1="7" x2="7.01" y2="7"/></svg>`},y=[{title:`Framework`,items:[{key:`route`,label:`Routes`},{key:`module`,label:`Modules`},{key:`provider`,label:`Providers`},{key:`decorator`,label:`Decorators`}]},{title:`Scheduled & Async`,items:[{key:`cron`,label:`Cron Jobs`},{key:`queue`,label:`Queues`}]},{title:`AI & Intelligence`,items:[{key:`agent`,label:`Agents`},{key:`aifunction`,label:`AI Functions`},{key:`rag`,label:`RAG`},{key:`prompt`,label:`Prompts`},{key:`ml`,label:`ML`}]},{title:`APIs & Messaging`,items:[{key:`graphql`,label:`GraphQL`},{key:`grpc`,label:`gRPC`},{key:`kafka`,label:`Kafka`},{key:`websocket`,label:`WebSockets`},{key:`event`,label:`Events`}]},{title:`Workflows & Data`,items:[{key:`flow`,label:`Flows`},{key:`data`,label:`Data`},{key:`serverless`,label:`Serverless`}]}];function b(e){let t=document.getElementById(`summary-cards`),n=e&&typeof e==`object`?e:{};t.innerHTML=y.map(e=>`
|
|
2
|
+
<section class="overview-section">
|
|
3
|
+
<h3 class="overview-section-title">${_(e.title)}</h3>
|
|
4
|
+
<div class="overview-section-cards">
|
|
5
|
+
${(Array.isArray(e.items)?e.items:[]).map(e=>`<div class="card" data-kind="${_(e.key)}">
|
|
6
|
+
<div class="card-icon">${v[e.key]??``}</div>
|
|
7
|
+
<div class="card-label">${_(e.label)}</div>
|
|
8
|
+
<div class="card-value">${n[e.key]??0}</div>
|
|
9
|
+
</div>`).join(``)}
|
|
10
|
+
</div>
|
|
11
|
+
</section>
|
|
12
|
+
`).join(``)}var x={heap:`<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M12 2v4"/><path d="M12 18v4"/><path d="m4.93 4.93 2.83 2.83"/><path d="m16.24 16.24 2.83 2.83"/><path d="M2 12h4"/><path d="M18 12h4"/><path d="m4.93 19.07 2.83-2.83"/><path d="m16.24 7.76 2.83-2.83"/><circle cx="12" cy="12" r="4"/></svg>`,rss:`<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><rect x="2" y="3" width="20" height="14" rx="2"/><path d="M8 21h8"/><path d="M12 17v4"/></svg>`,uptime:`<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><circle cx="12" cy="12" r="10"/><polyline points="12 6 12 12 16 14"/></svg>`};function S(e){let t=document.getElementById(`env-info`);t&&(t.innerHTML=`
|
|
13
|
+
<div class="env-item"><strong>Node</strong> ${_(e.nodeVersion??`—`)}</div>
|
|
14
|
+
<div class="env-item"><strong>NODE_ENV</strong> ${_(e.nodeEnv??`—`)}</div>
|
|
15
|
+
<div class="env-item"><strong>Inspector</strong> ${_(e.inspectorVersion??`—`)}</div>
|
|
16
|
+
<div class="env-item"><strong>Platform</strong> ${_(e.platform??`—`)}</div>
|
|
17
|
+
<div class="env-item"><strong>Arch</strong> ${_(e.arch??`—`)}</div>
|
|
18
|
+
`)}function C(e){let t=document.getElementById(`overview-gateway`);if(!t)return;let n=Array.isArray(e.routes)?e.routes:[],r=e.metrics;t.innerHTML=`
|
|
19
|
+
<h3 class="overview-block-title">Gateway</h3>
|
|
20
|
+
<div class="overview-gateway-stats">
|
|
21
|
+
<div class="overview-stat"><span class="stat-value">${n.length}</span><span class="stat-label">Routes</span></div>
|
|
22
|
+
${r?`
|
|
23
|
+
<div class="overview-stat"><span class="stat-value">${r.totalCalls}</span><span class="stat-label">Total Calls</span></div>
|
|
24
|
+
<div class="overview-stat"><span class="stat-value">${r.successCalls}</span><span class="stat-label">Success</span></div>
|
|
25
|
+
<div class="overview-stat"><span class="stat-value">${(r.failureRate??0).toFixed(1)}%</span><span class="stat-label">Failure Rate</span></div>
|
|
26
|
+
<div class="overview-stat"><span class="stat-value">${(r.averageResponseTime??0).toFixed(0)}ms</span><span class="stat-label">Avg Latency</span></div>
|
|
27
|
+
`:``}
|
|
28
|
+
</div>
|
|
29
|
+
${n.length?`<div class="overview-gateway-routes"><strong>Routes:</strong> ${n.slice(0,8).map(e=>`<code>${_(e)}</code>`).join(`, `)}${n.length>8?` <span class="muted">+${n.length-8} more</span>`:``}</div>`:``}
|
|
30
|
+
`,t.classList.remove(`hidden`)}function w(e){let t=document.getElementById(`overview-discovery`);if(!t)return;let n=Array.isArray(e.services)?e.services:[],r=e.instancesByService&&typeof e.instancesByService==`object`?e.instancesByService:{},i=n.slice(0,6).map(e=>`<span class="discovery-service"><code>${_(e)}</code>: ${r[e]??0} instance(s)</span>`).join(`, `);t.innerHTML=`
|
|
31
|
+
<h3 class="overview-block-title">Discovery</h3>
|
|
32
|
+
<div class="overview-discovery-stats">
|
|
33
|
+
<div class="overview-stat"><span class="stat-value">${e.totalServices??0}</span><span class="stat-label">Services</span></div>
|
|
34
|
+
<div class="overview-stat"><span class="stat-value">${e.totalInstances??0}</span><span class="stat-label">Connected Instances</span></div>
|
|
35
|
+
</div>
|
|
36
|
+
${n.length?`<div class="overview-discovery-services">${i}${n.length>6?` <span class="muted">+${n.length-6} more</span>`:``}</div>`:`<p class="muted">No services registered</p>`}
|
|
37
|
+
`,t.classList.remove(`hidden`)}function ee(e){let t=document.getElementById(`overview-resilience`);if(!t)return;let n=Array.isArray(e.circuitBreakerStates)?e.circuitBreakerStates:[],r=n.map(e=>`<span class="cb-state ${(e.state||``).toLowerCase()}"><code>${_(e.name)}</code>: ${_(e.state)}</span>`).join(`, `);t.innerHTML=`
|
|
38
|
+
<h3 class="overview-block-title">Resilience</h3>
|
|
39
|
+
<div class="overview-resilience-stats">
|
|
40
|
+
<div class="overview-stat"><span class="stat-value">${e.circuitBreakers??0}</span><span class="stat-label">Circuit Breakers</span></div>
|
|
41
|
+
</div>
|
|
42
|
+
${n.length?`<div class="overview-resilience-states">${r}</div>`:``}
|
|
43
|
+
`,t.classList.remove(`hidden`)}function te(e){let t=document.getElementById(`health-cards`);t&&(t.innerHTML=[{key:`health`,endpoint:`/health`,label:`Health`,data:e.health},{key:`ready`,endpoint:`/ready`,label:`Ready`,data:e.ready},{key:`startup`,endpoint:`/startup`,label:`Startup`,data:e.startup}].map(e=>{let t=e.data??{status:`unknown`,ok:!1};return`
|
|
44
|
+
<div class="health-card ${t.ok?`healthy`:t.status===`unknown`?`unknown`:`unhealthy`}">
|
|
45
|
+
<h3>${_(e.label)}</h3>
|
|
46
|
+
<div class="status">${t.ok?`Up`:t.status===`unknown`?`Unknown`:`Down`}</div>
|
|
47
|
+
<div class="endpoint">${_(e.endpoint)}</div>
|
|
48
|
+
</div>
|
|
49
|
+
`}).join(``))}function ne(e){let t=document.getElementById(`runtime-cards`),n=e=>(e/1024/1024).toFixed(2);e.memory&&(i.push({heap:e.memory.heapUsed,rss:e.memory.rss,t:Date.now()}),i.length>a&&i.shift()),t.innerHTML=`
|
|
50
|
+
<div class="card">
|
|
51
|
+
<div class="card-icon">${x.heap}</div>
|
|
52
|
+
<div class="card-label">Heap Used</div>
|
|
53
|
+
<div class="card-value">${e.memory?.heapUsed?n(e.memory.heapUsed)+` MB`:`—`}</div>
|
|
54
|
+
</div>
|
|
55
|
+
<div class="card">
|
|
56
|
+
<div class="card-icon">${x.rss}</div>
|
|
57
|
+
<div class="card-label">RSS Memory</div>
|
|
58
|
+
<div class="card-value">${e.memory?.rss?n(e.memory.rss)+` MB`:`—`}</div>
|
|
59
|
+
</div>
|
|
60
|
+
<div class="card">
|
|
61
|
+
<div class="card-icon">${x.uptime}</div>
|
|
62
|
+
<div class="card-label">Uptime</div>
|
|
63
|
+
<div class="card-value highlight">${e.uptimeSeconds==null?`—`:m(e.uptimeSeconds)}</div>
|
|
64
|
+
</div>
|
|
65
|
+
`,T()}function T(){let e=document.getElementById(`memory-chart-container`);if(!e||i.length<2){e?.classList.add(`hidden`);return}e.classList.remove(`hidden`);let t=Math.max(...i.map(e=>e.heap)),n=Math.max(...i.map(e=>e.rss)),r=Math.max(t,n,1),a=e=>e/1024/1024/r*100;e.innerHTML=`
|
|
66
|
+
<svg width="100%" height="100%" viewBox="0 0 400 180" preserveAspectRatio="none">
|
|
67
|
+
<polyline fill="none" stroke="var(--accent)" stroke-width="2" points="${i.map((e,t)=>`${t/(i.length-1)*100},${100-a(e.heap)}`).join(` `)}"/>
|
|
68
|
+
</svg>
|
|
69
|
+
<div style="font-size:11px;color:var(--text-muted);margin-top:0.5rem">Heap over time (last ${i.length} samples)</div>
|
|
70
|
+
`}var E={},D=50;function O(e){let t=new Map;for(let n of e){let e=String(n.flowId??``);t.has(e)||t.set(e,[]),t.get(e).push(n)}let n=new Map;for(let[e,r]of t){let t=r.find(e=>!!String(e.nodes??``).trim())??r[0],i=(t.nodes??``).split(/[,]/).map(e=>e.trim()).filter(Boolean);i.length===0&&(i=r.map(e=>e.nodeName).filter(e=>!!e));let a=(t.edges??``).toString().split(/[;,]/).map(e=>e.trim()).filter(Boolean).map(e=>{let t=e.indexOf(`→`);if(t<0)return null;let n=e.slice(0,t).trim(),r=e.slice(t+1).trim();return n&&r?{from:n,to:r}:null}).filter(e=>e!=null);for(let e of r){let t=(e.edges??``).toString().split(/[;,]/);for(let e of t){let t=e.indexOf(`→`);if(t>=0){let n=e.slice(0,t).trim(),r=e.slice(t+1).trim();n&&r&&!a.some(e=>e.from===n&&e.to===r)&&a.push({from:n,to:r})}}}let o=String(t.entryNode??i[0]??``);n.set(e,{nodes:[...new Set(i)],edges:a,entryNode:o})}return n}var k=48,A=24,j=6;function M(e){let t=new Map,n=new Map,r=e.entryNode||e.nodes[0];if(!r)return t;n.set(r,0);let i=[r],a=new Set([r]);for(;i.length>0;){let t=i.shift(),r=n.get(t)??0;for(let o of e.edges)if(o.from===t)if(!a.has(o.to))a.add(o.to),n.set(o.to,r+1),i.push(o.to);else{let e=n.get(o.to)??0;r+1>e&&n.set(o.to,r+1)}}let o=Math.max(0,...Array.from(n.values()));for(let t of e.nodes)n.has(t)||n.set(t,o+1);let s=new Map;for(let[e,t]of n)s.has(t)||s.set(t,[]),s.get(t).push(e);let c=[...s.keys()].sort((e,t)=>e-t);for(let e=0;e<c.length;e++){let n=c[e],r=s.get(n)??[];for(let n=0;n<r.length;n++){let i=r[n],a=j+e*54,o=j+n*28;t.set(i,{x:a,y:o})}}return t}function re(e){let t=document.getElementById(`flow-diagram`),n=Array.isArray(e)?e:[];if(!t||!n.length){t?.classList.add(`hidden`);return}let r=O(n);if(r.size===0){t?.classList.add(`hidden`);return}let i=k,a=A,o=``;for(let[e,t]of r){let n=M(t);if(n.size===0)continue;let r=Math.max(...Array.from(n.values()).map(e=>e.x))+i+j*2,s=Math.max(...Array.from(n.values()).map(e=>e.y))+a+j*2,c=`<svg class="flow-diagram-svg" viewBox="0 0 ${Math.max(240,r)} ${Math.max(48,s)}" xmlns="http://www.w3.org/2000/svg">`;for(let{from:e,to:r}of t.edges){let t=n.get(e),o=n.get(r);if(t&&o){let e=t.x+i,n=t.y+a/2,r=o.x,s=o.y+a/2,l=(e+r)/2;c+=`<path d="M ${e} ${n} C ${l} ${n} ${l} ${s} ${r} ${s}" fill="none" stroke="var(--flow-edge)" stroke-width="1" class="flow-edge"/>`;let u=r-4*Math.cos(Math.PI/6),d=s-4*Math.sin(Math.PI/6),f=r-4*Math.cos(-Math.PI/6),p=s-4*Math.sin(-Math.PI/6);c+=`<polygon points="${r},${s} ${u},${d} ${f},${p}" fill="var(--flow-edge)" class="flow-arrow"/>`}}for(let[e,r]of n){let n=e===t.entryNode?`flow-diagram-node entry`:`flow-diagram-node`,o=e.length>10?e.slice(0,8)+`…`:e;c+=`<g class="flow-node-group"><rect class="${n}" x="${r.x}" y="${r.y}" width="${i}" height="${a}" rx="4"/><text x="${r.x+i/2}" y="${r.y+a/2+3}" text-anchor="middle" font-size="9" fill="var(--text-primary)" class="flow-node-label">${_(o)}</text></g>`}c+=`</svg>`,o+=`<div class="flow-diagram-card"><span class="flow-diagram-badge" title="${_(e)}">${_(e)}</span><div class="flow-diagram-svg-wrap">${c}</div></div>`}t.innerHTML=o,t.classList.remove(`hidden`)}function N(e){let t=document.getElementById(`rag-explorer`),n=document.getElementById(`rag-pipeline-select`),r=document.getElementById(`rag-results`);if(!t||!n||!r)return;let i=Array.isArray(e)?e:[];if(!i.length){t.classList.add(`hidden`);return}t.classList.remove(`hidden`),n.innerHTML=i.map(e=>`<option value="${_(String(e.pipelineName??``))}">${_(String(e.pipelineName??``))}</option>`).join(``),r.innerHTML=``}async function P(){let t=document.getElementById(`rag-pipeline-select`),n=document.getElementById(`rag-search-input`),r=document.getElementById(`rag-results`);if(!t||!n||!r)return;let i=t.value,a=n.value.trim();if(a){r.innerHTML=`<p>Searching...</p>`;try{let t=await fetch(`${e}/rag/${encodeURIComponent(i)}/search?q=${encodeURIComponent(a)}`),n=await t.json();if(!t.ok){r.innerHTML=`<p class="error">${_(n.error??`Search failed`)}</p>`;return}let o=n.results??[];if(!o.length){r.innerHTML=`<p>No results found.</p>`;return}r.innerHTML=o.map(e=>`<div class="rag-result-item"><span class="score">${e.score==null?`—`:(e.score*100).toFixed(1)+`%`}</span> ${_(String(e.content??``).slice(0,200))}${String(e.content??``).length>200?`...`:``}</div>`).join(``)}catch(e){r.innerHTML=`<p class="error">${_(String(e))}</p>`}}}function F(e){let t=document.getElementById(`module-graph-container`),n=Array.isArray(e)?e:[];if(!t||!n.length){t?.classList.add(`hidden`);return}let r=new Map,i=[],a=n.map(e=>String(e.moduleName??``)).filter(Boolean),o=[...new Set(a)];o.forEach((e,t)=>{let n=Math.floor(t/4),i=t%4;r.set(e,{x:80+i*120,y:40+n*60})});for(let e of n){let t=String(e.moduleName??``),n=e.imports,a=Array.isArray(n)?n:typeof n==`string`?n.split(/[,;]/).map(e=>e.trim()):[];for(let e of a){let n=String(e).trim();n&&(o.includes(n)||r.has(n))&&(i.push({from:t,to:n}),r.has(n)||r.set(n,{x:80+r.size%4*120,y:40+Math.floor(r.size/4)*60}))}}let s=`<svg class="module-graph-svg" viewBox="0 0 500 ${Math.max(200,Math.ceil(o.length/4)*70)}" xmlns="http://www.w3.org/2000/svg">`;for(let{from:e,to:t}of i){let n=r.get(e),i=r.get(t);n&&i&&(s+=`<line x1="${n.x+50}" y1="${n.y+15}" x2="${i.x+50}" y2="${i.y+15}" stroke="var(--border)" stroke-width="1"/>`)}for(let[e,t]of r)s+=`<rect x="${t.x}" y="${t.y}" width="100" height="30" rx="4" fill="var(--bg-tertiary)" stroke="var(--border)"/>`,s+=`<text x="${t.x+50}" y="${t.y+20}" text-anchor="middle" font-size="11" fill="var(--text-primary)">${_(e.length>12?e.slice(0,10)+`..`:e)}</text>`;s+=`</svg>`,t.innerHTML=s,t.classList.remove(`hidden`)}function I(e,t,n,r,i,a){let o=document.getElementById(e),s=E[e]??{col:n[0],dir:`asc`},c=[...t];a?.sortable&&c.length>0&&c.sort((e,t)=>{let n=e[s.col],r=t[s.col],i=String(n??``).localeCompare(String(r??``),void 0,{numeric:!0});return s.dir===`asc`?i:-i});let l=c.length>D?c.slice(0,D):c,u=c.length>D;if(!t.length){o.innerHTML=`<thead></thead><tbody><tr><td colspan="${n.length+(a?.tryRoute||a?.runAgent?1:0)}" class="empty-state"><p>No entries found</p></td></tr></tbody>`;return}let d=i??{},f=n.map(e=>{let t=e.replace(/([A-Z])/g,` $1`).trim();return`<th class="${a?.sortable?` sortable ${s.col===e?s.dir:``}`:``}" data-col="${e}">${t}</th>`});if(a?.tryRoute&&f.push(`<th>Actions</th>`),a?.runAgent&&f.push(`<th>Actions</th>`),a?.previewPrompt&&f.push(`<th>Actions</th>`),o.innerHTML=`
|
|
71
|
+
<thead><tr>${f.join(``)}</tr></thead>
|
|
72
|
+
<tbody>
|
|
73
|
+
${l.map(e=>{let t=``;if(a?.tryRoute&&e.fullPath!=null){let n=String(e.fullPath);t=`<td><button class="btn btn-sm try-route" data-method="${String(e.httpMethod??`GET`).toUpperCase()}" data-path="${_(n)}">Try</button></td>`}else a?.runAgent&&e.agentName!=null?t=`<td><button class="btn btn-sm run-agent" data-name="${_(String(e.agentName))}">Run</button></td>`:a?.previewPrompt&&e.promptKey!=null?t=`<td><button class="btn btn-sm preview-prompt" data-key="${_(String(e.promptKey))}">Preview</button></td>`:(a?.tryRoute||a?.runAgent||a?.previewPrompt)&&(t=`<td></td>`);return`<tr data-id="${e.id??``}" data-json='${JSON.stringify(e).replace(/'/g,`\\'`)}'>
|
|
74
|
+
${n.map(t=>{let n=e[t],r=d[t];return`<td>${r?r(n,e):String(n??`—`)}</td>`}).join(``)}
|
|
75
|
+
${t}
|
|
76
|
+
</tr>`}).join(``)}
|
|
77
|
+
</tbody>
|
|
78
|
+
`,u){let e=document.createElement(`tr`);e.innerHTML=`<td colspan="${n.length+(a?.tryRoute||a?.runAgent?1:0)}" class="empty-state"><p>Showing ${D} of ${c.length}. Use search to filter.</p></td>`,o.querySelector(`tbody`).appendChild(e)}o.querySelectorAll(`tbody tr[data-json]`).forEach(e=>{e.addEventListener(`click`,t=>{if(t.target.closest(`button`))return;let n=e.dataset.json;n&&H(JSON.parse(n))})}),o.querySelectorAll(`th.sortable`).forEach(o=>{o.addEventListener(`click`,()=>{let c=o.dataset.col;E[e]={col:c,dir:s.col===c&&s.dir===`asc`?`desc`:`asc`},I(e,t,n,r,i,a)})}),o.querySelectorAll(`.try-route`).forEach(e=>{e.addEventListener(`click`,t=>{t.stopPropagation(),L(e.dataset.method??`GET`,e.dataset.path??`/`)})}),o.querySelectorAll(`.run-agent`).forEach(e=>{e.addEventListener(`click`,t=>{t.stopPropagation(),R(e.dataset.name??``)})}),o.querySelectorAll(`.preview-prompt`).forEach(e=>{e.addEventListener(`click`,t=>{t.stopPropagation(),ie(e.dataset.key??``)})})}function L(e,n){let r=document.getElementById(`route-test-modal`),i=document.getElementById(`test-url`),a=document.getElementById(`test-method`),o=document.getElementById(`test-body-group`),s=document.getElementById(`test-result`);i.value=`${t}${n}`,a.value=e,o.classList.toggle(`hidden`,e===`GET`),s.classList.add(`hidden`),r.classList.remove(`hidden`)}async function R(t){let n=prompt(`Enter input for agent (or leave empty for empty string):`)??``;try{let r=await fetch(`${e}/agents/${encodeURIComponent(t)}/run`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({input:n})}),i=await r.json();if(!r.ok){H({error:i.error??`Agent run failed`,status:r.status});return}H({agentName:t,result:i.result})}catch(e){H({error:String(e),agentName:t})}}function z(e){let t=document.getElementById(`prompt-playground-modal`),n=document.getElementById(`playground-key`),r=document.getElementById(`playground-vars`),i=document.getElementById(`playground-output`),a=document.getElementById(`playground-tokens`);n.value=e,r.value=`{}`,i.textContent=``,a.textContent=`—`,t.classList.remove(`hidden`)}async function B(t,n){let r=await fetch(`${e}/prompts/render`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({key:t,variables:n})});if(!r.ok){let e=await r.json().catch(()=>({error:r.statusText}));throw Error(e.error??`Failed to render`)}return r.json()}function ie(e){z(e)}var V=null;function H(e){V=e;let t=document.getElementById(`detail-panel`),n=document.getElementById(`detail-title`),r=document.getElementById(`detail-content`);n.textContent=String(e.kind??`Entry`),r.innerHTML=g(e),t.classList.remove(`hidden`)}function ae(){V=null,document.getElementById(`detail-panel`).classList.add(`hidden`)}function oe(){if(!V)return;let e=JSON.stringify(V,null,2);navigator.clipboard.writeText(e).then(()=>{let e=document.getElementById(`detail-copy`);if(e){let t=e.textContent;e.textContent=`Copied!`,setTimeout(()=>{e.textContent=t},1500)}})}function se(e,t){let n=Array.isArray(e)?e:[];if(!t.trim())return n;let r=t.toLowerCase();return n.filter(e=>JSON.stringify(e).toLowerCase().includes(r))}var U={httpMethod:e=>h(String(e??``))},W={enabled:e=>`<span class="badge ${e?`badge-get`:`badge-default`}">${e?`Enabled`:`Disabled`}</span>`,nextRuns:(e,t)=>{let n=Array.isArray(e)?e:[];return n.length?n.slice(0,3).map(e=>{try{return new Date(e).toLocaleString(void 0,{month:`short`,day:`numeric`,hour:`2-digit`,minute:`2-digit`})}catch{return e}}).join(`, `)+(n.length>3?`...`:``):`—`}},G={moduleName:e=>String(e??`—`),scope:e=>{let t=String(e??`singleton`);return`<span class="badge ${t===`singleton`?`badge-get`:t===`request`?`badge-post`:`badge-default`}">${t}</span>`}},K={tools:e=>Array.isArray(e)?e.join(`, `):String(e??`—`)},q={streaming:e=>`<span class="badge ${e?`badge-get`:`badge-default`}">${e?`Yes`:`No`}</span>`};function J(e,t){try{t()}catch(t){console.error(`[Inspector] ${e} failed:`,t)}}async function Y(e=!1){if(!r){r=!0,u(!0),p(!1);try{let t=await o(e),r=Array.isArray(t?.entries)?t.entries:[],i=t?.summary&&typeof t.summary==`object`?t.summary:{},a=t?.overview&&typeof t.overview==`object`?t.overview:{};n={entries:r,summary:i,overview:a},J(`overview`,()=>b(i)),a.gateway&&J(`gatewayOverview`,()=>C(a.gateway)),a.discovery&&J(`discoveryOverview`,()=>w(a.discovery)),a.resilience&&J(`resilienceOverview`,()=>ee(a.resilience)),[`overview-gateway`,`overview-discovery`,`overview-resilience`].forEach(e=>{let t=document.getElementById(e);t&&!a[e.replace(`overview-`,``)]&&t.classList.add(`hidden`)});let[u,p,m]=await Promise.all([c(),Promise.all([l(`/health`),l(`/ready`),l(`/startup`)]).then(([e,t,n])=>({health:e,ready:t,startup:n})),s()]);S(u),te(p),ne(m),d(p,m),f(i);let h=n.entries.filter(e=>e.kind===`route`),g=n.entries.filter(e=>e.kind===`module`),_=n.entries.filter(e=>e.kind===`provider`),v=n.entries.filter(e=>e.kind===`cron`),y=n.entries.filter(e=>e.kind===`queue`),x=n.entries.filter(e=>e.kind===`websocket`),T=n.entries.filter(e=>e.kind===`agent`),E=n.entries.filter(e=>e.kind===`rag`),D=n.entries.filter(e=>e.kind===`prompt`),O=n.entries.filter(e=>e.kind===`aifunction`),k=n.entries.filter(e=>e.kind===`event`),A=n.entries.filter(e=>e.kind===`graphql`),j=n.entries.filter(e=>e.kind===`grpc`),M=n.entries.filter(e=>e.kind===`kafka`),P=n.entries.filter(e=>e.kind===`flow`),L=n.entries.filter(e=>e.kind===`data`),R=n.entries.filter(e=>e.kind===`serverless`),z=n.entries.filter(e=>e.kind===`ml`);I(`routes-table`,h,[`httpMethod`,`fullPath`,`controllerPath`,`className`],`route`,U,{sortable:!0,tryRoute:!0}),J(`moduleGraph`,()=>F(g)),I(X.modules,g,[`moduleName`,`dynamicModule`,`imports`],`module`,void 0,{sortable:!0}),I(X.providers,_,[`providerName`,`moduleName`,`scope`],`provider`,G,{sortable:!0}),I(X.jobs,v,[`jobName`,`cronExpression`,`enabled`,`nextRuns`],`cron`,W),I(X.queues,y,[`queueName`,`consumerName`,`className`],`queue`),I(X.websocket,x,[`gatewayName`,`eventName`,`namespace`],`websocket`),I(X.agents,T,[`agentName`,`className`,`model`,`tools`],`agent`,K,{sortable:!0,runAgent:!0}),I(X.ai,O,[`className`,`methodName`,`provider`,`model`,`streaming`],`aifunction`,q),J(`ragExplorer`,()=>N(E)),I(X.rag,E,[`pipelineName`,`vectorStore`,`embeddingProvider`,`chunkingStrategy`],`rag`,void 0,{sortable:!0}),I(X.prompts,D,[`promptKey`,`scope`],`prompt`,void 0,{sortable:!0,previewPrompt:!0}),I(X.events,k,[`eventName`,`className`,`methodName`],`event`),I(X.graphql,A,[`operationType`,`operationName`,`resolverName`,`className`],`graphql`),I(X.grpc,j,[`serviceName`,`methodName`,`className`],`grpc`),I(X.kafka,M,[`consumerName`,`topic`,`groupId`,`methodName`],`kafka`);let B=document.getElementById(`flow-runtime-info`);B&&B.classList.toggle(`hidden`,P.length===0),J(`flowDiagram`,()=>re(P)),I(X.flows,P,[`flowId`,`version`,`sourceType`,`nodeName`,`entryNode`,`edges`,`className`],`flow`),I(X.data,L,[`pipelineName`,`className`],`data`),I(X.serverless,R,[`controllerName`,`runtime`,`memory`,`timeout`],`serverless`),I(X.ml,z,[`modelName`,`version`,`className`],`ml`)}catch(e){let t=String(e),n=t.includes(`Failed to fetch`)||t.includes(`NetworkError`)||t.includes(`Load failed`);p(n),d({health:{ok:!1},ready:{ok:!1},startup:{ok:!1}},{}),f({});let r=document.getElementById(`summary-cards`);if(r){let t=n?`Is the app running?`:`A rendering error occurred. Check the console for details.`;r.innerHTML=`<div class="overview-error"><p>Error: ${_(String(e))}</p><p>${_(t)} <button class="btn btn-sm btn-primary" id="retry-load">Retry</button></p></div>`,document.getElementById(`retry-load`)?.addEventListener(`click`,()=>Y(!0))}}finally{r=!1,u(!1)}}}var X={routes:`routes-table`,modules:`modules-table`,providers:`providers-table`,jobs:`jobs-table`,queues:`queues-table`,websocket:`websocket-table`,agents:`agents-table`,ai:`ai-table`,rag:`rag-table`,prompts:`prompts-table`,events:`events-table`,graphql:`graphql-table`,grpc:`grpc-table`,kafka:`kafka-table`,flows:`flows-table`,data:`data-table`,serverless:`serverless-table`,ml:`ml-table`},ce={route:`routes`,module:`modules`,provider:`providers`,cron:`jobs`,queue:`queues`,websocket:`websocket`,agent:`agents`,aifunction:`ai`,rag:`rag`,prompt:`prompts`,event:`events`,graphql:`graphql`,grpc:`grpc`,kafka:`kafka`,flow:`flows`,data:`data`,serverless:`serverless`,ml:`ml`};function Z(e){let t=document.querySelector(`.sidebar nav a[data-tab="${e}"]`);if(t){document.querySelectorAll(`.sidebar nav a`).forEach(e=>e.classList.remove(`active`)),document.querySelectorAll(`.tab-panel`).forEach(e=>e.classList.remove(`active`)),t.classList.add(`active`),document.getElementById(e)?.classList.add(`active`);let n=new URLSearchParams(window.location.search);n.set(`tab`,e),window.history.replaceState({},``,`${window.location.pathname}?${n}`)}}document.querySelectorAll(`.sidebar nav a`).forEach(e=>{e.addEventListener(`click`,t=>{t.preventDefault();let n=e.dataset.tab;Z(n)})}),document.getElementById(`summary-cards`)?.addEventListener(`click`,e=>{let t=e.target.closest(`.card[data-kind]`);if(t){let e=t.dataset.kind,n=e?ce[e]:null;n&&Z(n)}});function Q(){Y(!0)}document.getElementById(`refresh`)?.addEventListener(`click`,Q),document.getElementById(`refresh-sidebar`)?.addEventListener(`click`,Q),document.getElementById(`detail-close`).addEventListener(`click`,ae),document.getElementById(`detail-copy`)?.addEventListener(`click`,oe),document.getElementById(`export-btn`)?.addEventListener(`click`,()=>{if(!n)return;let e=new Blob([JSON.stringify(n,null,2)],{type:`application/json`}),t=document.createElement(`a`);t.href=URL.createObjectURL(e),t.download=`inspector-snapshot-${new Date().toISOString().slice(0,19).replace(/[T:]/g,`-`)}.json`,t.click(),URL.revokeObjectURL(t.href)});var le=document.getElementById(`auto-refresh`),$=null;le?.addEventListener(`change`,()=>{$&&clearInterval($),$=null,le?.checked&&($=setInterval(()=>Y(!1),15e3))}),document.getElementById(`test-route-btn`)?.addEventListener(`click`,async()=>{let e=document.getElementById(`test-url`).value,t=document.getElementById(`test-method`).value,n=document.getElementById(`test-body`),r=document.getElementById(`test-result`);r.classList.remove(`hidden`),r.className=`test-result`,r.textContent=`Sending...`;try{let i={method:t};if(t!==`GET`&&n?.value)try{JSON.parse(n.value),i.body=n.value,i.headers={"Content-Type":`application/json`}}catch{r.className=`test-result error`,r.textContent=`Invalid JSON body`;return}let a=await fetch(e,i),o=await a.text();r.className=`test-result ${a.ok?`success`:`error`}`,r.textContent=`Status: ${a.status}\n\n${o.slice(0,500)}${o.length>500?`...`:``}`}catch(e){r.className=`test-result error`,r.textContent=String(e)}}),document.getElementById(`test-route-cancel`)?.addEventListener(`click`,()=>{document.getElementById(`route-test-modal`).classList.add(`hidden`)}),document.getElementById(`test-method`)?.addEventListener(`change`,e=>{let t=e.target.value;document.getElementById(`test-body-group`).classList.toggle(`hidden`,t===`GET`)}),document.getElementById(`playground-render`)?.addEventListener(`click`,async()=>{let e=document.getElementById(`playground-key`).value,t=document.getElementById(`playground-vars`).value,n=document.getElementById(`playground-output`),r=document.getElementById(`playground-tokens`),i={};try{i=t.trim()?JSON.parse(t):{}}catch{n.textContent=`Invalid JSON in variables`,r.textContent=`—`;return}try{let{rendered:t,tokenEstimate:a}=await B(e,i);n.textContent=t,r.textContent=String(a)}catch(e){n.textContent=String(e),r.textContent=`—`}}),document.getElementById(`playground-close`)?.addEventListener(`click`,()=>{document.getElementById(`prompt-playground-modal`).classList.add(`hidden`)}),document.getElementById(`diff-btn`)?.addEventListener(`click`,()=>{document.getElementById(`diff-modal`).classList.remove(`hidden`)}),document.getElementById(`diff-close`)?.addEventListener(`click`,()=>{document.getElementById(`diff-modal`).classList.add(`hidden`)}),document.getElementById(`diff-load-file`)?.addEventListener(`click`,()=>{document.getElementById(`diff-file`).click()}),document.getElementById(`diff-file`)?.addEventListener(`change`,e=>{let t=e.target.files?.[0];if(!t)return;let n=new FileReader;n.onload=()=>{document.getElementById(`diff-snapshot-b`).value=String(n.result)},n.readAsText(t)}),document.getElementById(`rag-search-btn`)?.addEventListener(`click`,P),document.getElementById(`diff-compare-btn`)?.addEventListener(`click`,()=>{let e=document.getElementById(`diff-snapshot-b`).value.trim(),t=document.getElementById(`diff-result`);if(!n){t.innerHTML=`<p class="error">No current snapshot. Refresh first.</p>`,t.classList.remove(`hidden`);return}let r;try{r=e?JSON.parse(e):{entries:[],summary:{}}}catch{t.innerHTML=`<p class="error">Invalid JSON in Snapshot B.</p>`,t.classList.remove(`hidden`);return}let i=n.entries??[],a=r.entries??[],o=new Set(i.map(e=>e.id)),s=new Set(a.map(e=>e.id)),c=a.filter(e=>!o.has(e.id)),l=i.filter(e=>!s.has(e.id)),u=i.filter(e=>{let t=a.find(t=>t.id===e.id);return t&&JSON.stringify(e)!==JSON.stringify(t)}),d=``;c.length&&(d+=`<p class="added">+ ${c.length} added</p><ul>${c.map(e=>`<li>${_(String(e.kind))}: ${_(String(e.id??``))}</li>`).join(``)}</ul>`),l.length&&(d+=`<p class="removed">− ${l.length} removed</p><ul>${l.map(e=>`<li>${_(String(e.kind))}: ${_(String(e.id??``))}</li>`).join(``)}</ul>`),u.length&&(d+=`<p class="changed">~ ${u.length} changed</p><ul>${u.map(e=>`<li>${_(String(e.kind))}: ${_(String(e.id??``))}</li>`).join(``)}</ul>`),d||=`<p>No differences.</p>`,t.innerHTML=d,t.classList.remove(`hidden`)}),document.getElementById(`search`).addEventListener(`input`,e=>{let t=e.target.value;if(!n)return;let r=se(n.entries,t),i=n.summary&&typeof n.summary==`object`?n.summary:{};b(Object.fromEntries(Object.entries(i).map(([e])=>[e,r.filter(t=>t.kind===e).length])));let a=r.filter(e=>e.kind===`route`),o=r.filter(e=>e.kind===`module`),s=r.filter(e=>e.kind===`provider`),c=r.filter(e=>e.kind===`cron`),l=r.filter(e=>e.kind===`queue`),u=r.filter(e=>e.kind===`websocket`),d=r.filter(e=>e.kind===`agent`),f=r.filter(e=>e.kind===`rag`),p=r.filter(e=>e.kind===`prompt`),m=r.filter(e=>e.kind===`aifunction`),h=r.filter(e=>e.kind===`event`),g=r.filter(e=>e.kind===`graphql`),_=r.filter(e=>e.kind===`grpc`),v=r.filter(e=>e.kind===`kafka`),y=r.filter(e=>e.kind===`flow`),x=r.filter(e=>e.kind===`data`),S=r.filter(e=>e.kind===`serverless`),C=r.filter(e=>e.kind===`ml`);I(`routes-table`,a,[`httpMethod`,`fullPath`,`controllerPath`,`className`],`route`,U,{sortable:!0,tryRoute:!0}),F(o),I(`modules-table`,o,[`moduleName`,`dynamicModule`,`imports`],`module`,void 0,{sortable:!0}),I(`providers-table`,s,[`providerName`,`moduleName`,`scope`],`provider`,G,{sortable:!0}),I(`jobs-table`,c,[`jobName`,`cronExpression`,`enabled`,`nextRuns`],`cron`,W),I(`queues-table`,l,[`queueName`,`consumerName`,`className`],`queue`),I(`websocket-table`,u,[`gatewayName`,`eventName`,`namespace`],`websocket`),I(`agents-table`,d,[`agentName`,`className`,`model`,`tools`],`agent`,K,{sortable:!0,runAgent:!0}),I(`ai-table`,m,[`className`,`methodName`,`provider`,`model`,`streaming`],`aifunction`,q),N(f),I(`rag-table`,f,[`pipelineName`,`vectorStore`,`embeddingProvider`,`chunkingStrategy`],`rag`,void 0,{sortable:!0}),I(`prompts-table`,p,[`promptKey`,`scope`],`prompt`,void 0,{sortable:!0,previewPrompt:!0}),I(`events-table`,h,[`eventName`,`className`,`methodName`],`event`),I(`graphql-table`,g,[`operationType`,`operationName`,`resolverName`,`className`],`graphql`),I(`grpc-table`,_,[`serviceName`,`methodName`,`className`],`grpc`),I(`kafka-table`,v,[`consumerName`,`topic`,`groupId`,`methodName`],`kafka`);let w=document.getElementById(`flow-runtime-info`);w&&w.classList.toggle(`hidden`,y.length===0),re(y),I(`flows-table`,y,[`flowId`,`version`,`sourceType`,`nodeName`,`entryNode`,`edges`,`className`],`flow`,void 0,{sortable:!0}),I(`data-table`,x,[`pipelineName`,`className`],`data`),I(`serverless-table`,S,[`controllerName`,`runtime`,`memory`,`timeout`],`serverless`),I(`ml-table`,C,[`modelName`,`version`,`className`],`ml`)}),Y().then(()=>{let e=new URLSearchParams(window.location.search).get(`tab`);e&&Z(e)});
|
package/ui-dist/index.html
CHANGED
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
<meta charset="UTF-8" />
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
6
6
|
<title>HazelJS Inspector</title>
|
|
7
|
-
<script type="module" crossorigin src="/__hazel/assets/index-
|
|
8
|
-
<link rel="stylesheet" crossorigin href="/__hazel/assets/index-
|
|
7
|
+
<script type="module" crossorigin src="/__hazel/assets/index-D_9_tm9C.js"></script>
|
|
8
|
+
<link rel="stylesheet" crossorigin href="/__hazel/assets/index-DAgTJLTc.css">
|
|
9
9
|
</head>
|
|
10
10
|
<body>
|
|
11
11
|
<div id="app">
|
package/LICENSE
DELETED
|
@@ -1,192 +0,0 @@
|
|
|
1
|
-
Apache License
|
|
2
|
-
Version 2.0, January 2004
|
|
3
|
-
http://www.apache.org/licenses/
|
|
4
|
-
|
|
5
|
-
Copyright 2024 HazelJS Team
|
|
6
|
-
|
|
7
|
-
Licensed under the Apache License, Version 2.0 (the "License");
|
|
8
|
-
you may not use this file except in compliance with the License.
|
|
9
|
-
You may obtain a copy of the License at
|
|
10
|
-
|
|
11
|
-
http://www.apache.org/licenses/LICENSE-2.0
|
|
12
|
-
|
|
13
|
-
Unless required by applicable law or agreed to in writing, software
|
|
14
|
-
distributed under the License is distributed on an "AS IS" BASIS,
|
|
15
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
16
|
-
See the License for the specific language governing permissions and
|
|
17
|
-
limitations under the License.
|
|
18
|
-
|
|
19
|
-
---
|
|
20
|
-
|
|
21
|
-
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
22
|
-
|
|
23
|
-
1. Definitions.
|
|
24
|
-
|
|
25
|
-
"License" shall mean the terms and conditions for use, reproduction,
|
|
26
|
-
and distribution as defined by Sections 1 through 9 of this document.
|
|
27
|
-
|
|
28
|
-
"Licensor" shall mean the copyright owner or entity authorized by
|
|
29
|
-
the copyright owner that is granting the License.
|
|
30
|
-
|
|
31
|
-
"Legal Entity" shall mean the union of the acting entity and all
|
|
32
|
-
other entities that control, are controlled by, or are under common
|
|
33
|
-
control with that entity. For the purposes of this definition,
|
|
34
|
-
"control" means (i) the power, direct or indirect, to cause the
|
|
35
|
-
direction or management of such entity, whether by contract or
|
|
36
|
-
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
37
|
-
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
38
|
-
|
|
39
|
-
"You" (or "Your") shall mean an individual or Legal Entity
|
|
40
|
-
exercising permissions granted by this License.
|
|
41
|
-
|
|
42
|
-
"Source" form shall mean the preferred form for making modifications,
|
|
43
|
-
including but not limited to software source code, documentation
|
|
44
|
-
source, and configuration files.
|
|
45
|
-
|
|
46
|
-
"Object" form shall mean any form resulting from mechanical
|
|
47
|
-
transformation or translation of a Source form, including but
|
|
48
|
-
not limited to compiled object code, generated documentation,
|
|
49
|
-
and conversions to other media types.
|
|
50
|
-
|
|
51
|
-
"Work" shall mean the work of authorship, whether in Source or
|
|
52
|
-
Object form, made available under the License, as indicated by a
|
|
53
|
-
copyright notice that is included in or attached to the work
|
|
54
|
-
(an example is provided in the Appendix below).
|
|
55
|
-
|
|
56
|
-
"Derivative Works" shall mean any work, whether in Source or Object
|
|
57
|
-
form, that is based on (or derived from) the Work and for which the
|
|
58
|
-
editorial revisions, annotations, elaborations, or other modifications
|
|
59
|
-
represent, as a whole, an original work of authorship. For the purposes
|
|
60
|
-
of this License, Derivative Works shall not include works that remain
|
|
61
|
-
separable from, or merely link (or bind by name) to the interfaces of,
|
|
62
|
-
the Work and Derivative Works thereof.
|
|
63
|
-
|
|
64
|
-
"Contribution" shall mean any work of authorship, including
|
|
65
|
-
the original version of the Work and any modifications or additions
|
|
66
|
-
to that Work or Derivative Works thereof, that is intentionally
|
|
67
|
-
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
68
|
-
or by an individual or Legal Entity authorized to submit on behalf of
|
|
69
|
-
the copyright owner. For the purposes of this definition, "submitted"
|
|
70
|
-
means any form of electronic, verbal, or written communication sent
|
|
71
|
-
to the Licensor or its representatives, including but not limited to
|
|
72
|
-
communication on electronic mailing lists, source code control systems,
|
|
73
|
-
and issue tracking systems that are managed by, or on behalf of, the
|
|
74
|
-
Licensor for the purpose of discussing and improving the Work, but
|
|
75
|
-
excluding communication that is conspicuously marked or otherwise
|
|
76
|
-
designated in writing by the copyright owner as "Not a Contribution."
|
|
77
|
-
|
|
78
|
-
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
79
|
-
on behalf of whom a Contribution has been received by Licensor and
|
|
80
|
-
subsequently incorporated within the Work.
|
|
81
|
-
|
|
82
|
-
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
83
|
-
this License, each Contributor hereby grants to You a perpetual,
|
|
84
|
-
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
85
|
-
copyright license to reproduce, prepare Derivative Works of,
|
|
86
|
-
publicly display, publicly perform, sublicense, and distribute the
|
|
87
|
-
Work and such Derivative Works in Source or Object form.
|
|
88
|
-
|
|
89
|
-
3. Grant of Patent License. Subject to the terms and conditions of
|
|
90
|
-
this License, each Contributor hereby grants to You a perpetual,
|
|
91
|
-
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
92
|
-
(except as stated in this section) patent license to make, have made,
|
|
93
|
-
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
94
|
-
where such license applies only to those patent claims licensable
|
|
95
|
-
by such Contributor that are necessarily infringed by their
|
|
96
|
-
Contribution(s) alone or by combination of their Contribution(s)
|
|
97
|
-
with the Work to which such Contribution(s) was submitted. If You
|
|
98
|
-
institute patent litigation against any entity (including a
|
|
99
|
-
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
100
|
-
or a Contribution incorporated within the Work constitutes direct
|
|
101
|
-
or contributory patent infringement, then any patent licenses
|
|
102
|
-
granted to You under this License for that Work shall terminate
|
|
103
|
-
as of the date such litigation is filed.
|
|
104
|
-
|
|
105
|
-
4. Redistribution. You may reproduce and distribute copies of the
|
|
106
|
-
Work or Derivative Works thereof in any medium, with or without
|
|
107
|
-
modifications, and in Source or Object form, provided that You
|
|
108
|
-
meet the following conditions:
|
|
109
|
-
|
|
110
|
-
(a) You must give any other recipients of the Work or
|
|
111
|
-
Derivative Works a copy of this License; and
|
|
112
|
-
|
|
113
|
-
(b) You must cause any modified files to carry prominent notices
|
|
114
|
-
stating that You changed the files; and
|
|
115
|
-
|
|
116
|
-
(c) You must retain, in the Source form of any Derivative Works
|
|
117
|
-
that You distribute, all copyright, patent, trademark, and
|
|
118
|
-
attribution notices from the Source form of the Work,
|
|
119
|
-
excluding those notices that do not pertain to any part of
|
|
120
|
-
the Derivative Works; and
|
|
121
|
-
|
|
122
|
-
(d) If the Work includes a "NOTICE" text file as part of its
|
|
123
|
-
distribution, then any Derivative Works that You distribute must
|
|
124
|
-
include a readable copy of the attribution notices contained
|
|
125
|
-
within such NOTICE file, excluding those notices that do not
|
|
126
|
-
pertain to any part of the Derivative Works, in at least one
|
|
127
|
-
of the following places: within a NOTICE text file distributed
|
|
128
|
-
as part of the Derivative Works; within the Source form or
|
|
129
|
-
documentation, if provided along with the Derivative Works; or,
|
|
130
|
-
within a display generated by the Derivative Works, if and
|
|
131
|
-
wherever such third-party notices normally appear. The contents
|
|
132
|
-
of the NOTICE file are for informational purposes only and
|
|
133
|
-
do not modify the License. You may add Your own attribution
|
|
134
|
-
notices within Derivative Works that You distribute, alongside
|
|
135
|
-
or as an addendum to the NOTICE text from the Work, provided
|
|
136
|
-
that such additional attribution notices cannot be construed
|
|
137
|
-
as modifying the License.
|
|
138
|
-
|
|
139
|
-
You may add Your own copyright statement to Your modifications and
|
|
140
|
-
may provide additional or different license terms and conditions
|
|
141
|
-
for use, reproduction, or distribution of Your modifications, or
|
|
142
|
-
for any such Derivative Works as a whole, provided Your use,
|
|
143
|
-
reproduction, and distribution of the Work otherwise complies with
|
|
144
|
-
the conditions stated in this License.
|
|
145
|
-
|
|
146
|
-
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
147
|
-
any Contribution intentionally submitted for inclusion in the Work
|
|
148
|
-
by You to the Licensor shall be under the terms and conditions of
|
|
149
|
-
this License, without any additional terms or conditions.
|
|
150
|
-
Notwithstanding the above, nothing herein shall supersede or modify
|
|
151
|
-
the terms of any separate license agreement you may have executed
|
|
152
|
-
with Licensor regarding such Contributions.
|
|
153
|
-
|
|
154
|
-
6. Trademarks. This License does not grant permission to use the trade
|
|
155
|
-
names, trademarks, service marks, or product names of the Licensor,
|
|
156
|
-
except as required for reasonable and customary use in describing the
|
|
157
|
-
origin of the Work and reproducing the content of the NOTICE file.
|
|
158
|
-
|
|
159
|
-
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
160
|
-
agreed to in writing, Licensor provides the Work (and each
|
|
161
|
-
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
162
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
163
|
-
implied, including, without limitation, any warranties or conditions
|
|
164
|
-
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
165
|
-
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
166
|
-
appropriateness of using or redistributing the Work and assume any
|
|
167
|
-
risks associated with Your exercise of permissions under this License.
|
|
168
|
-
|
|
169
|
-
8. Limitation of Liability. In no event and under no legal theory,
|
|
170
|
-
whether in tort (including negligence), contract, or otherwise,
|
|
171
|
-
unless required by applicable law (such as deliberate and grossly
|
|
172
|
-
negligent acts) or agreed to in writing, shall any Contributor be
|
|
173
|
-
liable to You for damages, including any direct, indirect, special,
|
|
174
|
-
incidental, or consequential damages of any character arising as a
|
|
175
|
-
result of this License or out of the use or inability to use the
|
|
176
|
-
Work (including but not limited to damages for loss of goodwill,
|
|
177
|
-
work stoppage, computer failure or malfunction, or any and all
|
|
178
|
-
other commercial damages or losses), even if such Contributor
|
|
179
|
-
has been advised of the possibility of such damages.
|
|
180
|
-
|
|
181
|
-
9. Accepting Warranty or Additional Liability. While redistributing
|
|
182
|
-
the Work or Derivative Works thereof, You may choose to offer,
|
|
183
|
-
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
184
|
-
or other liability obligations and/or rights consistent with this
|
|
185
|
-
License. However, in accepting such obligations, You may act only
|
|
186
|
-
on Your own behalf and on Your sole responsibility, not on behalf
|
|
187
|
-
of any other Contributor, and only if You agree to indemnify,
|
|
188
|
-
defend, and hold each Contributor harmless for any liability
|
|
189
|
-
incurred by, or claims asserted against, such Contributor by reason
|
|
190
|
-
of your accepting any such warranty or additional liability.
|
|
191
|
-
|
|
192
|
-
END OF TERMS AND CONDITIONS
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
@import"https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600&family=DM+Sans:wght@400;500;600;700&display=swap";:root{--hazel-primary: #1a365d;--hazel-primary-hover: #2c5282;--hazel-accent: #1a365d;--hazel-accent-hover: #2c5282;--hazel-primary-muted: rgba(26, 54, 93, .25);--hazel-accent-muted: rgba(26, 54, 93, .25);--bg-primary: #0c0e12;--bg-secondary: #14171d;--bg-tertiary: #1a1e26;--bg-elevated: #1f242b;--bg-hover: #252a33;--border: #2d333b;--border-subtle: #21262d;--text-primary: #e6edf3;--text-secondary: #8b949e;--text-muted: #6e7681;--accent: var(--hazel-accent);--accent-hover: var(--hazel-accent-hover);--accent-muted: var(--hazel-accent-muted);--success: #3fb950;--warning: #d29922;--error: #f85149;--radius-sm: 6px;--radius-md: 8px;--radius-lg: 12px;--radius-xl: 16px;--shadow-sm: 0 1px 2px rgba(0, 0, 0, .3);--shadow-md: 0 4px 12px rgba(0, 0, 0, .4);--shadow-lg: 0 8px 24px rgba(0, 0, 0, .5);--shadow-glow: 0 0 24px rgba(26, 54, 93, .2);--transition: .2s cubic-bezier(.4, 0, .2, 1)}*{box-sizing:border-box}body{margin:0;font-family:DM Sans,-apple-system,BlinkMacSystemFont,sans-serif;background:var(--bg-primary);color:var(--text-primary);font-size:14px;line-height:1.5;-webkit-font-smoothing:antialiased}#app{display:flex;min-height:100vh}.sidebar{width:240px;min-width:240px;background:var(--bg-secondary);border-right:1px solid var(--border-subtle);display:flex;flex-direction:column;padding:0}.logo{font-size:13px;font-weight:600;letter-spacing:.02em;padding:1.25rem 1.25rem 1rem;margin:0;color:var(--text-primary);border-bottom:1px solid var(--border-subtle);display:flex;align-items:center;gap:.625rem}.logo-img{width:24px;height:24px;object-fit:contain;flex-shrink:0}.logo-svg{width:24px;height:24px;color:var(--accent);flex-shrink:0}.logo-fallback{display:flex;align-items:center}.logo-text{color:var(--text-primary);font-weight:700}.sidebar nav{flex:1;padding:.75rem 0;overflow-y:auto;min-height:0;display:flex;flex-direction:column;gap:.25rem}.nav-section{display:flex;flex-direction:column;gap:.125rem}.nav-section-title{font-size:10px;font-weight:600;color:var(--text-muted);text-transform:uppercase;letter-spacing:.08em;padding:.5rem 1.25rem .25rem;margin:.25rem .5rem 0 0;border-top:1px solid var(--border-subtle)}.sidebar nav a{display:flex;align-items:center;gap:.625rem;padding:.5rem 1.25rem;margin:0 .5rem;color:var(--text-secondary);text-decoration:none;border-radius:var(--radius-sm);font-weight:500;transition:color var(--transition),background var(--transition)}.sidebar nav a:hover{color:var(--text-primary);background:var(--bg-hover)}.sidebar nav a.active{color:#60a5fa;background:#3b82f633}.sidebar nav a .nav-icon{width:3px;height:14px;border-radius:2px;background:var(--text-muted);flex-shrink:0}.sidebar nav a:hover .nav-icon{background:var(--text-secondary)}.sidebar nav a.active .nav-icon{background:#60a5fa}.sidebar-footer{padding:1rem 1.25rem;border-top:1px solid var(--border-subtle)}.btn{width:100%;padding:.5rem 1rem;font-family:inherit;font-size:13px;font-weight:500;background:var(--bg-tertiary);color:var(--text-primary);border:1px solid var(--border);border-radius:var(--radius-sm);cursor:pointer;transition:background var(--transition),border-color var(--transition)}.btn:hover{background:var(--bg-hover);border-color:var(--text-muted)}.btn-primary{background:var(--accent);border-color:var(--accent);color:#fff}.btn-primary:hover{background:var(--accent-hover);border-color:var(--accent-hover);color:#fff}.content{flex:1;padding:1rem 1.5rem;overflow:auto;position:relative;background:var(--bg-primary);isolation:isolate}.content:before{content:"";position:absolute;top:0;right:0;bottom:0;left:0;background:radial-gradient(ellipse 80% 50% at 50% -20%,rgba(26,54,93,.35),transparent),radial-gradient(ellipse 60% 40% at 100% 50%,rgba(26,54,93,.08),transparent),radial-gradient(ellipse 40% 30% at 0% 80%,rgba(26,54,93,.15),transparent);pointer-events:none;z-index:0}.content>*{position:relative;z-index:1}.toolbar{margin-bottom:1rem;display:flex;align-items:center;gap:.75rem;flex-wrap:wrap;padding:.5rem .75rem;background:var(--bg-secondary);border:1px solid var(--border-subtle);border-radius:var(--radius-md)}.toolbar-actions{display:flex;align-items:center;gap:.75rem}.toolbar-toggle{display:flex;align-items:center;gap:.5rem;font-size:13px;color:var(--text-secondary);cursor:pointer}.toolbar-toggle input{accent-color:var(--accent)}.btn-sm{width:auto;padding:.4rem .75rem}.overview-status-bar{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:.75rem;padding:.75rem 1rem;margin-bottom:1rem;background:var(--bg-secondary);border:1px solid var(--border-subtle);border-radius:var(--radius-md)}.status-bar-left{display:flex;align-items:center;gap:.75rem}.status-dot{width:8px;height:8px;border-radius:50%;background:var(--text-muted);animation:pulse-dot 2s ease-in-out infinite}.status-dot.healthy{background:var(--success);box-shadow:0 0 8px #3fb95080}.status-dot.unhealthy{background:var(--error);box-shadow:0 0 8px #f8514980}.status-text{font-weight:600;font-size:14px;color:var(--text-primary)}.status-uptime{font-size:12px;font-family:JetBrains Mono,monospace}.quick-stats{display:flex;align-items:center;gap:1.5rem;font-size:12px;color:var(--text-secondary)}.quick-stat{display:flex;align-items:center;gap:.375rem}.quick-stat strong{color:var(--accent);font-weight:600}.quick-stat.muted{color:var(--text-muted)}@keyframes pulse-dot{0%,to{opacity:1}50%{opacity:.6}}.loading-overlay{position:fixed;top:0;right:0;bottom:0;left:0;background:#0c0e12e6;-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1.25rem;z-index:1000;color:var(--text-secondary)}.loading-spinner{width:44px;height:44px;border:3px solid var(--border-subtle);border-top-color:var(--accent);border-radius:50%;animation:spin .7s cubic-bezier(.5,0,.5,1) infinite}@keyframes spin{to{transform:rotate(360deg)}}.health-container{display:grid;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:1rem;margin-bottom:1.5rem}.health-card{background:var(--bg-secondary);border:1px solid var(--border-subtle);border-radius:var(--radius-md);padding:1rem 1.25rem}.health-card.healthy{border-left:4px solid var(--success);background:linear-gradient(90deg,rgba(63,185,80,.06) 0%,transparent 100%)}.health-card.unhealthy{border-left:4px solid var(--error);background:linear-gradient(90deg,rgba(248,81,73,.06) 0%,transparent 100%)}.health-card.unknown{border-left:4px solid var(--warning);background:linear-gradient(90deg,rgba(210,153,34,.06) 0%,transparent 100%)}.health-card h3{margin:0 0 .5rem;font-size:14px}.health-card .status{font-weight:600}.health-card.healthy .status{color:var(--success)}.health-card.unhealthy .status{color:var(--error)}.health-card.unknown .status{color:var(--warning)}.health-card .endpoint{font-size:10px;color:var(--text-muted);margin-top:.375rem;font-family:JetBrains Mono,monospace}.overview-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));grid-template-rows:repeat(2,minmax(0,1fr));gap:1rem;margin-bottom:1.5rem;min-height:340px;align-items:stretch}@media (max-width: 900px){.overview-grid{grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:repeat(3,minmax(0,1fr));min-height:510px}}@media (max-width: 600px){.overview-grid{grid-template-columns:1fr;grid-template-rows:repeat(6,minmax(0,1fr));min-height:720px}}.overview-block{position:relative;min-width:0;min-height:0;display:flex;flex-direction:column;background:var(--bg-secondary);border:1px solid var(--border-subtle);border-radius:var(--radius-md);padding:1rem 1.25rem;overflow-y:auto;transition:border-color var(--transition),box-shadow var(--transition)}.overview-block:before{content:"";position:absolute;top:0;left:0;right:0;height:2px;background:linear-gradient(90deg,var(--accent) 0%,transparent 70%);opacity:.5}.overview-block:hover{border-color:var(--border);box-shadow:var(--shadow-sm)}.overview-block-title{margin:0 0 .75rem;font-size:10px;font-weight:700;color:var(--text-muted);text-transform:uppercase;letter-spacing:.1em}.overview-env .overview-block-title,.overview-health .overview-block-title,.overview-runtime .overview-block-title,.overview-gateway .overview-block-title,.overview-discovery .overview-block-title,.overview-resilience .overview-block-title{color:var(--text-secondary)}.env-info{display:grid;grid-template-columns:repeat(auto-fill,minmax(140px,1fr));gap:1rem;margin-bottom:1.5rem}.env-info-compact{margin-bottom:0;gap:.5rem}.env-info .env-item{font-size:12px;color:var(--text-secondary);padding:.35rem 0;border-bottom:1px solid var(--border-subtle)}.env-info .env-item:last-child{border-bottom:none}.env-info .env-item strong{color:var(--text-primary);font-weight:600;display:block;margin-bottom:.125rem}.health-cards-inline{display:flex;flex-wrap:wrap;gap:.5rem}.health-cards-inline .health-card{flex:1;min-width:0;padding:.75rem 1rem;border-radius:var(--radius-sm);transition:box-shadow var(--transition)}.health-cards-inline .health-card:hover{box-shadow:var(--shadow-sm)}.health-cards-inline .health-card h3{font-size:11px;font-weight:600;margin-bottom:.375rem;color:var(--text-secondary)}.health-cards-inline .health-card .status{font-size:13px;font-weight:700}.runtime-cards-inline{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.75rem}.runtime-cards-inline .card{min-width:0;padding:.75rem 1rem;background:var(--bg-tertiary);border-radius:var(--radius-sm);border:1px solid var(--border-subtle);transition:border-color var(--transition),background var(--transition)}.runtime-cards-inline .card:hover{background:var(--bg-elevated);border-color:var(--border)}.runtime-cards-inline .card .card-icon{width:22px;height:22px;color:var(--accent);margin-bottom:.35rem}.runtime-cards-inline .card .card-label{font-size:9px;font-weight:600;text-transform:uppercase;letter-spacing:.05em;color:var(--text-muted);margin-bottom:.2rem}.runtime-cards-inline .card .card-value{font-size:1.1rem;font-weight:600;font-family:JetBrains Mono,monospace}.runtime-cards-inline .card .card-value.highlight{color:var(--accent)}.chart-inline{height:120px;margin-bottom:1rem}.overview-gateway-stats,.overview-discovery-stats,.overview-resilience-stats{display:flex;flex-wrap:wrap;gap:.75rem;margin-bottom:.75rem}.overview-stat{display:flex;flex-direction:column;gap:.125rem;padding:.4rem .6rem;background:var(--bg-tertiary);border-radius:var(--radius-sm);border:1px solid var(--border-subtle);min-width:0}.overview-stat .stat-value{font-size:1.1rem;font-weight:700;font-family:JetBrains Mono,monospace;color:var(--accent)}.overview-stat .stat-label{font-size:9px;font-weight:600;color:var(--text-muted);text-transform:uppercase;letter-spacing:.05em}.overview-gateway-routes,.overview-discovery-services,.overview-resilience-states{font-size:11px;color:var(--text-secondary);line-height:1.5;min-width:0;overflow-wrap:break-word;word-break:break-word}.overview-resilience-states{display:flex;flex-wrap:wrap;gap:.375rem}.overview-gateway-routes code,.overview-discovery-services code,.overview-resilience-states code{font-size:10px;padding:.15rem .35rem;background:var(--bg-tertiary);border-radius:4px;border:1px solid var(--border-subtle);font-family:JetBrains Mono,monospace}.discovery-service{margin-right:.5rem}.cb-state{display:inline-block;padding:.15rem .4rem;border-radius:4px;font-size:11px;font-weight:600}.cb-state.closed{color:var(--success);background:#3fb9501f}.cb-state.open{color:var(--error);background:#f851491f}.cb-state.half-open{color:var(--warning);background:#d299221f}.muted{color:var(--text-muted);font-size:11px}.detail-actions{display:flex;gap:.5rem}.modal{position:fixed;top:0;right:0;bottom:0;left:0;background:#0009;display:flex;align-items:center;justify-content:center;z-index:200}.modal-content{background:var(--bg-secondary);border:1px solid var(--border);border-radius:var(--radius-lg);padding:1.5rem;max-width:480px;width:90%}.modal-content.modal-wide{max-width:720px}.playground-output{background:var(--bg-tertiary);border:1px solid var(--border);border-radius:var(--radius-sm);padding:1rem;font-size:12px;max-height:200px;overflow:auto;white-space:pre-wrap;word-break:break-word}.playground-meta{font-size:12px;color:var(--text-muted);margin-top:.5rem}.playground-actions{margin:.5rem 0}.diff-sources{display:grid;grid-template-columns:1fr 1fr;gap:1rem;margin-bottom:1rem}.diff-hint{font-size:12px;color:var(--text-muted);margin:.25rem 0}.diff-result{margin-top:1rem;padding:1rem;background:var(--bg-tertiary);border-radius:var(--radius-sm);max-height:300px;overflow:auto}.diff-result .added{color:var(--success)}.diff-result .removed{color:var(--error)}.diff-result .changed{color:var(--warning)}.module-graph-container{margin-bottom:1rem;padding:1rem;background:var(--bg-secondary);border:1px solid var(--border-subtle);border-radius:var(--radius-md);min-height:200px}.module-graph-svg{width:100%;height:300px}.rag-explorer{margin-bottom:1rem;padding:1rem;background:var(--bg-secondary);border:1px solid var(--border-subtle);border-radius:var(--radius-md)}.rag-search-row{display:flex;gap:.5rem;margin-top:.5rem}.rag-search-row input{flex:1}.rag-results{margin-top:1rem;max-height:300px;overflow:auto}.rag-result-item{padding:.75rem;border-bottom:1px solid var(--border-subtle);font-size:12px}.rag-result-item .score{color:var(--accent);font-weight:600}.modal-content h3{margin:0 0 1rem;font-size:16px}.modal-body,.form-group{margin-bottom:1rem}.form-group label{display:block;font-size:12px;font-weight:600;color:var(--text-muted);margin-bottom:.5rem}.form-group input,.form-group select,.form-group textarea{width:100%;padding:.5rem;border:1px solid var(--border);border-radius:var(--radius-sm);background:var(--bg-tertiary);color:var(--text-primary);font-family:JetBrains Mono,monospace}.modal-footer{display:flex;gap:.5rem;justify-content:flex-end}.test-result{margin-top:1rem;padding:1rem;border-radius:var(--radius-sm);font-family:JetBrains Mono,monospace;font-size:12px;max-height:200px;overflow:auto}.test-result.success{background:#3fb95026;color:var(--success)}.test-result.error{background:#f8514926;color:var(--error)}.chart-container{margin-bottom:1.5rem;height:200px;background:var(--bg-secondary);border:1px solid var(--border-subtle);border-radius:var(--radius-md);padding:1rem}.flow-diagram{--flow-edge: var(--text-muted);display:flex;flex-direction:column;gap:.5rem;padding:.5rem;background:var(--bg-secondary);border:1px solid var(--border-subtle);border-radius:var(--radius-md);margin-bottom:.5rem}.flow-diagram-card{display:flex;flex-direction:column;gap:.35rem;background:var(--bg-tertiary);border:1px solid var(--border-subtle);border-radius:var(--radius-sm);padding:.35rem .5rem;overflow:hidden}.flow-diagram-badge{display:inline-flex;align-items:center;font-size:.65rem;font-weight:600;color:var(--text-secondary);text-transform:uppercase;letter-spacing:.04em}.flow-diagram-svg-wrap{height:64px;overflow:hidden;border-radius:var(--radius-sm);background:var(--bg-primary)}.flow-diagram-svg{display:block;width:100%;height:100%;object-fit:contain;object-position:left center}.flow-runtime-hint{display:flex;flex-wrap:wrap;align-items:center;gap:.35rem .5rem;font-size:11px;color:var(--text-muted);margin-bottom:.5rem;padding:.4rem .6rem;background:var(--bg-secondary);border:1px solid var(--border-subtle);border-radius:var(--radius-sm)}.flow-runtime-label{font-weight:500;color:var(--text-secondary)}.flow-runtime-hint code{font-size:10px;padding:.1rem .3rem;background:var(--bg-tertiary);border-radius:4px;font-family:JetBrains Mono,monospace}.flow-runtime-sep{color:var(--border);font-weight:300}#flows .section-title{margin-bottom:.5rem}.flow-diagram-card .flow-node-group{cursor:default}.flow-diagram-card .flow-node-group:hover .flow-diagram-node{filter:brightness(1.08)}.flow-diagram-node{fill:var(--bg-elevated);stroke:var(--border-subtle);stroke-width:1;transition:filter .15s ease}.flow-diagram-node.entry{fill:var(--accent-muted);stroke:var(--accent)}.flow-group{display:flex;flex-wrap:wrap;align-items:center;gap:.5rem}.flow-node{padding:.5rem 1rem;background:var(--bg-tertiary);border:1px solid var(--border);border-radius:var(--radius-sm);font-size:12px;font-family:JetBrains Mono,monospace}.flow-node.entry{border-color:var(--accent);background:var(--accent-muted)}.offline-banner{background:var(--error);color:#fff;padding:1rem 1.5rem;border-radius:var(--radius-md);margin-bottom:1rem;display:flex;align-items:center;justify-content:space-between;gap:1rem}.offline-banner button{padding:.5rem 1rem;background:#fff3;border:none;border-radius:var(--radius-sm);color:#fff;cursor:pointer;font-weight:600}.offline-banner button:hover{background:#ffffff4d}th.sortable{cursor:pointer;-webkit-user-select:none;user-select:none}th.sortable:hover{color:var(--accent)}th.sortable:after{content:" ▾";opacity:.5;font-size:10px}th.sortable.asc:after{content:" ▴";opacity:1}th.sortable.desc:after{content:" ▾";opacity:1}.search{flex:1;max-width:360px;padding:.5rem 1rem .5rem 2.5rem;font-family:JetBrains Mono,monospace;font-size:13px;border:1px solid var(--border);border-radius:var(--radius-md);background:var(--bg-secondary);color:var(--text-primary);transition:border-color var(--transition),box-shadow var(--transition)}.search::placeholder{color:var(--text-muted)}.search:focus{outline:none;border-color:var(--accent);box-shadow:0 0 0 2px var(--accent-muted)}.search-wrapper{position:relative}.search-wrapper:before{content:"⌕";position:absolute;left:.875rem;top:50%;transform:translateY(-50%);color:var(--text-muted);font-size:14px;pointer-events:none}.search-wrapper .search{padding-left:2.25rem}.tab-panel{display:none;animation:fadeIn .2s ease}.tab-panel.active{display:block}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}#summary-cards{display:flex;flex-direction:column;gap:2rem;margin-top:.5rem}#summary-cards:before{content:"Application Summary";display:block;font-size:10px;font-weight:700;color:var(--text-muted);text-transform:uppercase;letter-spacing:.12em;margin-bottom:1rem;padding-bottom:.75rem;border-bottom:1px solid var(--border-subtle)}.overview-section{display:flex;flex-direction:column;gap:1rem}.overview-section-title{margin:0;font-size:12px;font-weight:600;color:var(--text-muted);text-transform:uppercase;letter-spacing:.08em;padding-bottom:.5rem;border-bottom:1px solid var(--border-subtle)}.overview-section-cards{display:grid;grid-template-columns:repeat(auto-fill,minmax(120px,1fr));gap:1rem}.cards{display:grid;grid-template-columns:repeat(auto-fill,minmax(160px,1fr));gap:1rem}.overview-section .card{cursor:pointer;background:#14171d99;transition:border-color var(--transition),box-shadow var(--transition),transform var(--transition),background var(--transition)}.overview-section .card:hover{border-color:var(--accent);box-shadow:0 0 0 1px var(--accent-muted);background:#1f242bcc;transform:translate(4px)}.overview-section .card .card-icon{color:var(--text-muted);transition:color var(--transition)}.overview-section .card:hover .card-icon{color:var(--accent)}.card{background:var(--bg-secondary);border:1px solid var(--border-subtle);border-radius:var(--radius-md);padding:1.25rem;transition:border-color var(--transition),box-shadow var(--transition);display:flex;flex-direction:column;gap:.5rem;cursor:default}.card:hover{border-color:var(--border);box-shadow:var(--shadow-sm)}.card .card-icon{width:36px;height:36px;display:flex;align-items:center;justify-content:center;background:var(--accent-muted);color:var(--accent);border-radius:var(--radius-sm);flex-shrink:0}.card .card-icon svg{flex-shrink:0}.card .card-label{font-size:11px;font-weight:600;color:var(--text-muted);text-transform:uppercase;letter-spacing:.06em;margin-bottom:0}.card .card-value{font-size:1.75rem;font-weight:600;font-family:JetBrains Mono,monospace;color:var(--text-primary)}.card .card-value.highlight{color:var(--accent)}.table-container{overflow-x:auto;border:1px solid var(--border-subtle);border-radius:var(--radius-md);background:var(--bg-secondary)}table{width:100%;border-collapse:collapse;font-size:13px}th,td{padding:.75rem 1rem;text-align:left;border-bottom:1px solid var(--border-subtle)}th{background:var(--bg-tertiary);color:var(--text-muted);font-weight:600;font-size:11px;text-transform:uppercase;letter-spacing:.05em}tr{transition:background var(--transition)}tr:hover{background:var(--bg-hover)}tr:last-child td{border-bottom:none}tr[data-id]{cursor:pointer}td{font-family:JetBrains Mono,monospace;font-size:12px}.badge{display:inline-block;padding:.2rem .5rem;font-size:10px;font-weight:600;text-transform:uppercase;border-radius:4px}.badge-get{background:#3fb95033;color:var(--success)}.badge-post{background:#d2992233;color:var(--warning)}.badge-put{background:#388bfd33;color:#389bfd}.badge-patch{background:#a371f733;color:#a371f7}.badge-delete{background:#f8514933;color:var(--error)}.badge-default{background:var(--bg-tertiary);color:var(--text-muted)}.detail-panel{position:fixed;top:0;right:0;width:420px;max-width:90vw;height:100%;background:var(--bg-secondary);border-left:1px solid var(--border);box-shadow:-8px 0 24px #0006;padding:0;overflow:hidden;z-index:100;display:flex;flex-direction:column;animation:slideIn .2s ease}.hidden{display:none!important}.info-card{background:var(--bg-secondary);border:1px solid var(--border);border-radius:var(--radius-md);padding:1rem 1.25rem;margin-bottom:1rem}.info-card-title{margin:0 0 .5rem;font-size:14px;font-weight:600;color:var(--text-primary)}.info-card-text{margin:.25rem 0;font-size:13px;color:var(--text-secondary);line-height:1.5}.info-card code{background:var(--bg-tertiary);padding:.15rem .4rem;border-radius:4px;font-family:JetBrains Mono,monospace;font-size:12px}.overview-error{background:var(--bg-secondary);border:1px solid var(--error);border-radius:var(--radius-md);padding:1.5rem;color:var(--text-secondary)}.overview-error a{color:var(--accent)}@keyframes slideIn{0%{transform:translate(100%)}to{transform:translate(0)}}.detail-header{display:flex;justify-content:space-between;align-items:center;padding:1rem 1.25rem;border-bottom:1px solid var(--border-subtle);background:var(--bg-tertiary)}.detail-header h2{margin:0;font-size:14px;font-weight:600;color:var(--text-primary)}#detail-content{flex:1;padding:1.25rem;margin:0;font-family:JetBrains Mono,monospace;font-size:12px;line-height:1.6;white-space:pre-wrap;word-break:break-word;overflow:auto;color:var(--text-secondary)}#detail-content .json-key{color:#7ee787}#detail-content .json-string{color:#a5d6ff}#detail-content .json-number{color:#79c0ff}#detail-content .json-boolean{color:#ff7b72}#detail-content .json-null{color:var(--text-muted)}td.empty-state{text-align:center;padding:3rem 2rem!important;color:var(--text-muted)}.empty-state p{margin:.5rem 0;font-size:14px}.content a{color:var(--accent);text-decoration:none}.content a:hover{text-decoration:underline}.section-title{font-size:16px;font-weight:600;margin:0 0 1rem;color:var(--text-primary)}
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
(function(){const n=document.createElement("link").relList;if(n&&n.supports&&n.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))s(o);new MutationObserver(o=>{for(const r of o)if(r.type==="childList")for(const l of r.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&s(l)}).observe(document,{childList:!0,subtree:!0});function t(o){const r={};return o.integrity&&(r.integrity=o.integrity),o.referrerPolicy&&(r.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?r.credentials="include":o.crossOrigin==="anonymous"?r.credentials="omit":r.credentials="same-origin",r}function s(o){if(o.ep)return;o.ep=!0;const r=t(o);fetch(o.href,r)}})();const C=(()=>{const e=window.location.pathname.match(/^\/[^/]+/);return e?e[0]:"/__hazel"})(),ve=window.location.origin;let b=null,J=!1,B=[];const Me=60;async function Ae(e=!1){const n=`${C}/inspect${e?"?refresh=1":""}`,t=await fetch(n);if(!t.ok)throw new Error(`Failed to fetch: ${t.status}`);return t.json()}async function je(){const e=await fetch(`${C}/stats`);return e.ok?e.json():{}}async function Ce(){const e=await fetch(`${C}/env`);return e.ok?e.json():{}}async function z(e){try{const n=await fetch(`${ve}${e}`),t=n.ok;let s;const o=n.headers.get("content-type");return o!=null&&o.includes("application/json")?s=await n.json():s=await n.text(),{status:t?"up":"down",ok:t,data:s}}catch{return{status:"down",ok:!1}}}function V(e){const n=document.getElementById("loading-overlay");n&&n.classList.toggle("hidden",!e)}function K(e,n){var h,p,w,f,i,m;const t=document.getElementById("status-dot"),s=document.getElementById("status-text"),o=document.getElementById("status-uptime");if(!t||!s||!o)return;const r=((h=e==null?void 0:e.health)==null?void 0:h.ok)&&((p=e==null?void 0:e.ready)==null?void 0:p.ok)&&((w=e==null?void 0:e.startup)==null?void 0:w.ok),l=((f=e==null?void 0:e.health)==null?void 0:f.ok)||((i=e==null?void 0:e.ready)==null?void 0:i.ok)||((m=e==null?void 0:e.startup)==null?void 0:m.ok);t.className="status-dot"+(r?" healthy":l?"":" unhealthy"),s.textContent=r?"All systems operational":l?"Degraded":"Offline",o.textContent=n.uptimeSeconds!=null?`Uptime: ${he(n.uptimeSeconds)}`:""}function Y(e){const n=document.getElementById("quick-stats");if(!n)return;const t=e&&typeof e=="object"?e:{},s=[];(t.route??0)>0&&s.push(`<span class="quick-stat"><strong>${t.route}</strong> routes</span>`),(t.module??0)>0&&s.push(`<span class="quick-stat"><strong>${t.module}</strong> modules</span>`),(t.provider??0)>0&&s.push(`<span class="quick-stat"><strong>${t.provider}</strong> providers</span>`),(t.cron??0)>0&&s.push(`<span class="quick-stat"><strong>${t.cron}</strong> jobs</span>`),n.innerHTML=s.join("")||'<span class="quick-stat muted">No data</span>'}function X(e){var t,s;let n=document.getElementById("offline-banner");e&&!n&&(n=document.createElement("div"),n.id="offline-banner",n.className="offline-banner",n.innerHTML='<span>App not running. Check that your server is started.</span><button id="retry-btn">Retry</button>',(t=document.querySelector(".content"))==null||t.insertBefore(n,document.querySelector(".toolbar")),(s=n.querySelector("#retry-btn"))==null||s.addEventListener("click",()=>O(!0))),n&&n.classList.toggle("hidden",!e)}function he(e){if(e<60)return`${Math.floor(e)}s`;if(e<3600)return`${Math.floor(e/60)}m ${e%60}s`;const n=Math.floor(e/3600),t=Math.floor(e%3600/60);return`${n}h ${t}m`}function Te(e){const n=String(e||"").toUpperCase();return`<span class="badge badge-${n==="GET"?"get":n==="POST"?"post":n==="PUT"?"put":n==="PATCH"?"patch":n==="DELETE"?"delete":"default"}">${n||"?"}</span>`}function Oe(e){return JSON.stringify(e,null,2).replace(/("(\\u[a-zA-Z0-9]{4}|\\[^u]|[^\\"])*"(\s*:)?|\b(true|false|null)\b|-?\d+(?:\.\d*)?(?:[eE][+-]?\d+)?)/g,t=>{let s="json-number";return/^"/.test(t)?s=t.endsWith(":")?"json-key":"json-string":/true|false/.test(t)?s="json-boolean":/null/.test(t)&&(s="json-null"),`<span class="${s}">${y(t)}</span>`})}function y(e){const n=document.createElement("div");return n.textContent=e,n.innerHTML}const qe={route:'<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"/><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"/></svg>',module:'<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z"/><polyline points="3.27 6.96 12 12.01 20.73 6.96"/><line x1="12" y1="22.08" x2="12" y2="12"/></svg>',provider:'<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><ellipse cx="12" cy="5" rx="9" ry="3"/><path d="M21 12c0 1.66-4 3-9 3s-9-1.34-9-3"/><path d="M3 5v14c0 1.66 4 3 9 3s9-1.34 9-3V5"/></svg>',cron:'<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"/><polyline points="12 6 12 12 16 14"/></svg>',queue:'<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><line x1="8" y1="6" x2="21" y2="6"/><line x1="8" y1="12" x2="21" y2="12"/><line x1="8" y1="18" x2="21" y2="18"/><line x1="3" y1="6" x2="3.01" y2="6"/><line x1="3" y1="12" x2="3.01" y2="12"/><line x1="3" y1="18" x2="3.01" y2="18"/></svg>',websocket:'<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polygon points="13 2 3 14 12 14 11 22 21 10 12 10 13 2"/></svg>',agent:'<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="11" width="18" height="10" rx="2"/><circle cx="12" cy="5" r="2"/><path d="M12 7v4"/></svg>',rag:'<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M4 19.5A2.5 2.5 0 0 1 6.5 17H20"/><path d="M6.5 2H20v20H6.5A2.5 2.5 0 0 1 4 19.5v-15A2.5 2.5 0 0 1 6.5 2z"/><path d="M8 7h8"/><path d="M8 11h8"/></svg>',prompt:'<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"/></svg>',aifunction:'<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M9.663 17h4.673M12 3v1m6.364 1.636l-.707.707M21 12h-1M4 12H3m3.343-5.657l-.707-.707m2.828 9.9a5 5 0 117.072 0l-.548.547A3.374 3.374 0 0014 18.469V19a2 2 0 11-4 0v-.531c0-.895-.356-1.754-.988-2.386l-.548-.547z"/></svg>',event:'<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M8 2v4"/><path d="M16 2v4"/><rect x="3" y="4" width="18" height="18" rx="2"/><path d="M3 10h18"/><path d="M8 14h.01"/><path d="M12 14h.01"/><path d="M16 14h.01"/></svg>',graphql:'<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M12 3v18"/><path d="M5 12h14"/><path d="M3 8l9-5 9 5"/><path d="M3 16l9 5 9-5"/></svg>',grpc:'<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M5 12h14"/><path d="M12 5l7 7-7 7"/></svg>',kafka:'<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z"/><path d="M9 9h6"/><path d="M9 13h6"/><path d="M9 17h4"/></svg>',flow:'<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="22 12 18 12 15 21 9 3 6 12 2 12"/></svg>',data:'<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><line x1="18" y1="20" x2="18" y2="10"/><line x1="12" y1="20" x2="12" y2="4"/><line x1="6" y1="20" x2="6" y2="14"/></svg>',serverless:'<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M18 10h-1.26A8 8 0 1 0 9 20h9a5 5 0 0 0 0-10z"/></svg>',ml:'<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M12 2v4"/><path d="M12 18v4"/><path d="m4.93 4.93 2.83 2.83"/><path d="m16.24 16.24 2.83 2.83"/><path d="M2 12h4"/><path d="M18 12h4"/><path d="m4.93 19.07 2.83-2.83"/><path d="m16.24 7.76 2.83-2.83"/><circle cx="12" cy="12" r="4"/></svg>',decorator:'<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M20.59 13.41l-7.17 7.17a2 2 0 0 1-2.83 0L2 12V2h10l8.59 8.59a2 2 0 0 1 0 2.82z"/><line x1="7" y1="7" x2="7.01" y2="7"/></svg>'},Re=[{title:"Framework",items:[{key:"route",label:"Routes"},{key:"module",label:"Modules"},{key:"provider",label:"Providers"},{key:"decorator",label:"Decorators"}]},{title:"Scheduled & Async",items:[{key:"cron",label:"Cron Jobs"},{key:"queue",label:"Queues"}]},{title:"AI & Intelligence",items:[{key:"agent",label:"Agents"},{key:"aifunction",label:"AI Functions"},{key:"rag",label:"RAG"},{key:"prompt",label:"Prompts"},{key:"ml",label:"ML"}]},{title:"APIs & Messaging",items:[{key:"graphql",label:"GraphQL"},{key:"grpc",label:"gRPC"},{key:"kafka",label:"Kafka"},{key:"websocket",label:"WebSockets"},{key:"event",label:"Events"}]},{title:"Workflows & Data",items:[{key:"flow",label:"Flows"},{key:"data",label:"Data"},{key:"serverless",label:"Serverless"}]}];function fe(e){const n=document.getElementById("summary-cards"),t=e&&typeof e=="object"?e:{};n.innerHTML=Re.map(s=>`
|
|
2
|
-
<section class="overview-section">
|
|
3
|
-
<h3 class="overview-section-title">${y(s.title)}</h3>
|
|
4
|
-
<div class="overview-section-cards">
|
|
5
|
-
${(Array.isArray(s.items)?s.items:[]).map(o=>`<div class="card" data-kind="${y(o.key)}">
|
|
6
|
-
<div class="card-icon">${qe[o.key]??""}</div>
|
|
7
|
-
<div class="card-label">${y(o.label)}</div>
|
|
8
|
-
<div class="card-value">${t[o.key]??0}</div>
|
|
9
|
-
</div>`).join("")}
|
|
10
|
-
</div>
|
|
11
|
-
</section>
|
|
12
|
-
`).join("")}const G={heap:'<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M12 2v4"/><path d="M12 18v4"/><path d="m4.93 4.93 2.83 2.83"/><path d="m16.24 16.24 2.83 2.83"/><path d="M2 12h4"/><path d="M18 12h4"/><path d="m4.93 19.07 2.83-2.83"/><path d="m16.24 7.76 2.83-2.83"/><circle cx="12" cy="12" r="4"/></svg>',rss:'<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><rect x="2" y="3" width="20" height="14" rx="2"/><path d="M8 21h8"/><path d="M12 17v4"/></svg>',uptime:'<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><circle cx="12" cy="12" r="10"/><polyline points="12 6 12 12 16 14"/></svg>'};function Pe(e){const n=document.getElementById("env-info");n&&(n.innerHTML=`
|
|
13
|
-
<div class="env-item"><strong>Node</strong> ${y(e.nodeVersion??"—")}</div>
|
|
14
|
-
<div class="env-item"><strong>NODE_ENV</strong> ${y(e.nodeEnv??"—")}</div>
|
|
15
|
-
<div class="env-item"><strong>Inspector</strong> ${y(e.inspectorVersion??"—")}</div>
|
|
16
|
-
<div class="env-item"><strong>Platform</strong> ${y(e.platform??"—")}</div>
|
|
17
|
-
<div class="env-item"><strong>Arch</strong> ${y(e.arch??"—")}</div>
|
|
18
|
-
`)}function He(e){const n=document.getElementById("overview-gateway");if(!n)return;const t=Array.isArray(e.routes)?e.routes:[],s=e.metrics;n.innerHTML=`
|
|
19
|
-
<h3 class="overview-block-title">Gateway</h3>
|
|
20
|
-
<div class="overview-gateway-stats">
|
|
21
|
-
<div class="overview-stat"><span class="stat-value">${t.length}</span><span class="stat-label">Routes</span></div>
|
|
22
|
-
${s?`
|
|
23
|
-
<div class="overview-stat"><span class="stat-value">${s.totalCalls}</span><span class="stat-label">Total Calls</span></div>
|
|
24
|
-
<div class="overview-stat"><span class="stat-value">${s.successCalls}</span><span class="stat-label">Success</span></div>
|
|
25
|
-
<div class="overview-stat"><span class="stat-value">${(s.failureRate??0).toFixed(1)}%</span><span class="stat-label">Failure Rate</span></div>
|
|
26
|
-
<div class="overview-stat"><span class="stat-value">${(s.averageResponseTime??0).toFixed(0)}ms</span><span class="stat-label">Avg Latency</span></div>
|
|
27
|
-
`:""}
|
|
28
|
-
</div>
|
|
29
|
-
${t.length?`<div class="overview-gateway-routes"><strong>Routes:</strong> ${t.slice(0,8).map(o=>`<code>${y(o)}</code>`).join(", ")}${t.length>8?` <span class="muted">+${t.length-8} more</span>`:""}</div>`:""}
|
|
30
|
-
`,n.classList.remove("hidden")}function Fe(e){const n=document.getElementById("overview-discovery");if(!n)return;const t=Array.isArray(e.services)?e.services:[],s=e.instancesByService&&typeof e.instancesByService=="object"?e.instancesByService:{},o=t.slice(0,6).map(r=>`<span class="discovery-service"><code>${y(r)}</code>: ${s[r]??0} instance(s)</span>`).join(", ");n.innerHTML=`
|
|
31
|
-
<h3 class="overview-block-title">Discovery</h3>
|
|
32
|
-
<div class="overview-discovery-stats">
|
|
33
|
-
<div class="overview-stat"><span class="stat-value">${e.totalServices??0}</span><span class="stat-label">Services</span></div>
|
|
34
|
-
<div class="overview-stat"><span class="stat-value">${e.totalInstances??0}</span><span class="stat-label">Connected Instances</span></div>
|
|
35
|
-
</div>
|
|
36
|
-
${t.length?`<div class="overview-discovery-services">${o}${t.length>6?` <span class="muted">+${t.length-6} more</span>`:""}</div>`:'<p class="muted">No services registered</p>'}
|
|
37
|
-
`,n.classList.remove("hidden")}function De(e){const n=document.getElementById("overview-resilience");if(!n)return;const t=Array.isArray(e.circuitBreakerStates)?e.circuitBreakerStates:[],s=t.map(o=>`<span class="cb-state ${(o.state||"").toLowerCase()}"><code>${y(o.name)}</code>: ${y(o.state)}</span>`).join(", ");n.innerHTML=`
|
|
38
|
-
<h3 class="overview-block-title">Resilience</h3>
|
|
39
|
-
<div class="overview-resilience-stats">
|
|
40
|
-
<div class="overview-stat"><span class="stat-value">${e.circuitBreakers??0}</span><span class="stat-label">Circuit Breakers</span></div>
|
|
41
|
-
</div>
|
|
42
|
-
${t.length?`<div class="overview-resilience-states">${s}</div>`:""}
|
|
43
|
-
`,n.classList.remove("hidden")}function Ue(e){const n=document.getElementById("health-cards");if(!n)return;const t=[{key:"health",endpoint:"/health",label:"Health",data:e.health},{key:"ready",endpoint:"/ready",label:"Ready",data:e.ready},{key:"startup",endpoint:"/startup",label:"Startup",data:e.startup}];n.innerHTML=t.map(s=>{const o=s.data??{status:"unknown",ok:!1};return`
|
|
44
|
-
<div class="health-card ${o.ok?"healthy":o.status==="unknown"?"unknown":"unhealthy"}">
|
|
45
|
-
<h3>${y(s.label)}</h3>
|
|
46
|
-
<div class="status">${o.ok?"Up":o.status==="unknown"?"Unknown":"Down"}</div>
|
|
47
|
-
<div class="endpoint">${y(s.endpoint)}</div>
|
|
48
|
-
</div>
|
|
49
|
-
`}).join("")}function _e(e){var s,o;const n=document.getElementById("runtime-cards"),t=r=>(r/1024/1024).toFixed(2);e.memory&&(B.push({heap:e.memory.heapUsed,rss:e.memory.rss,t:Date.now()}),B.length>Me&&B.shift()),n.innerHTML=`
|
|
50
|
-
<div class="card">
|
|
51
|
-
<div class="card-icon">${G.heap}</div>
|
|
52
|
-
<div class="card-label">Heap Used</div>
|
|
53
|
-
<div class="card-value">${(s=e.memory)!=null&&s.heapUsed?t(e.memory.heapUsed)+" MB":"—"}</div>
|
|
54
|
-
</div>
|
|
55
|
-
<div class="card">
|
|
56
|
-
<div class="card-icon">${G.rss}</div>
|
|
57
|
-
<div class="card-label">RSS Memory</div>
|
|
58
|
-
<div class="card-value">${(o=e.memory)!=null&&o.rss?t(e.memory.rss)+" MB":"—"}</div>
|
|
59
|
-
</div>
|
|
60
|
-
<div class="card">
|
|
61
|
-
<div class="card-icon">${G.uptime}</div>
|
|
62
|
-
<div class="card-label">Uptime</div>
|
|
63
|
-
<div class="card-value highlight">${e.uptimeSeconds!=null?he(e.uptimeSeconds):"—"}</div>
|
|
64
|
-
</div>
|
|
65
|
-
`,Je()}function Je(){const e=document.getElementById("memory-chart-container");if(!e||B.length<2){e==null||e.classList.add("hidden");return}e.classList.remove("hidden");const n=Math.max(...B.map(l=>l.heap)),t=Math.max(...B.map(l=>l.rss)),s=Math.max(n,t,1),o=l=>l/1024/1024/s*100,r=B.map((l,h)=>`${h/(B.length-1)*100},${100-o(l.heap)}`).join(" ");e.innerHTML=`
|
|
66
|
-
<svg width="100%" height="100%" viewBox="0 0 400 180" preserveAspectRatio="none">
|
|
67
|
-
<polyline fill="none" stroke="var(--accent)" stroke-width="2" points="${r}"/>
|
|
68
|
-
</svg>
|
|
69
|
-
<div style="font-size:11px;color:var(--text-muted);margin-top:0.5rem">Heap over time (last ${B.length} samples)</div>
|
|
70
|
-
`}const Q={},P=50;function ze(e){const n=new Map;for(const s of e){const o=String(s.flowId??"");n.has(o)||n.set(o,[]),n.get(o).push(s)}const t=new Map;for(const[s,o]of n){const l=o.find(a=>!!String(a.nodes??"").trim())??o[0];let p=(l.nodes??"").split(/[,]/).map(a=>a.trim()).filter(Boolean);p.length===0&&(p=o.map(a=>a.nodeName).filter(a=>!!a));const i=(l.edges??"").toString().split(/[;,]/).map(a=>a.trim()).filter(Boolean).map(a=>{const c=a.indexOf("→");if(c<0)return null;const d=a.slice(0,c).trim(),k=a.slice(c+1).trim();return d&&k?{from:d,to:k}:null}).filter(a=>a!=null);for(const a of o){const c=(a.edges??"").toString().split(/[;,]/);for(const d of c){const k=d.indexOf("→");if(k>=0){const x=d.slice(0,k).trim(),$=d.slice(k+1).trim();x&&$&&!i.some(S=>S.from===x&&S.to===$)&&i.push({from:x,to:$})}}}const m=String(l.entryNode??p[0]??"");t.set(s,{nodes:[...new Set(p)],edges:i,entryNode:m})}return t}const ye=48,we=24,Ge=6,We=4,D=6;function Ve(e){const n=new Map,t=new Map,s=e.entryNode||e.nodes[0];if(!s)return n;t.set(s,0);const o=[s],r=new Set([s]);for(;o.length>0;){const i=o.shift(),m=t.get(i)??0;for(const a of e.edges)if(a.from===i)if(!r.has(a.to))r.add(a.to),t.set(a.to,m+1),o.push(a.to);else{const c=t.get(a.to)??0;m+1>c&&t.set(a.to,m+1)}}const l=Math.max(0,...Array.from(t.values()));for(const i of e.nodes)t.has(i)||t.set(i,l+1);const h=new Map;for(const[i,m]of t)h.has(m)||h.set(m,[]),h.get(m).push(i);const p=ye+Ge,w=we+We,f=[...h.keys()].sort((i,m)=>i-m);for(let i=0;i<f.length;i++){const m=f[i],a=h.get(m)??[];for(let c=0;c<a.length;c++){const d=a[c],k=D+i*p,x=D+c*w;n.set(d,{x:k,y:x})}}return n}function ke(e){const n=document.getElementById("flow-diagram"),t=Array.isArray(e)?e:[];if(!n||!t.length){n==null||n.classList.add("hidden");return}const s=ze(t);if(s.size===0){n==null||n.classList.add("hidden");return}const o=ye,r=we;let l="";for(const[h,p]of s){const w=Ve(p);if(w.size===0)continue;const f=Math.max(...Array.from(w.values()).map(d=>d.x))+o+D*2,i=Math.max(...Array.from(w.values()).map(d=>d.y))+r+D*2,m=Math.max(240,f),a=Math.max(48,i);let c=`<svg class="flow-diagram-svg" viewBox="0 0 ${m} ${a}" xmlns="http://www.w3.org/2000/svg">`;for(const{from:d,to:k}of p.edges){const x=w.get(d),$=w.get(k);if(x&&$){const S=x.x+o,A=x.y+r/2,I=$.x,L=$.y+r/2,N=(S+I)/2;c+=`<path d="M ${S} ${A} C ${N} ${A} ${N} ${L} ${I} ${L}" fill="none" stroke="var(--flow-edge)" stroke-width="1" class="flow-edge"/>`;const u=4,T=I-u*Math.cos(Math.PI/6),_=L-u*Math.sin(Math.PI/6),q=I-u*Math.cos(-Math.PI/6),g=L-u*Math.sin(-Math.PI/6);c+=`<polygon points="${I},${L} ${T},${_} ${q},${g}" fill="var(--flow-edge)" class="flow-arrow"/>`}}for(const[d,k]of w){const $=d===p.entryNode?"flow-diagram-node entry":"flow-diagram-node",S=d.length>10?d.slice(0,8)+"…":d;c+=`<g class="flow-node-group"><rect class="${$}" x="${k.x}" y="${k.y}" width="${o}" height="${r}" rx="4"/><text x="${k.x+o/2}" y="${k.y+r/2+3}" text-anchor="middle" font-size="9" fill="var(--text-primary)" class="flow-node-label">${y(S)}</text></g>`}c+="</svg>",l+=`<div class="flow-diagram-card"><span class="flow-diagram-badge" title="${y(h)}">${y(h)}</span><div class="flow-diagram-svg-wrap">${c}</div></div>`}n.innerHTML=l,n.classList.remove("hidden")}function be(e){const n=document.getElementById("rag-explorer"),t=document.getElementById("rag-pipeline-select"),s=document.getElementById("rag-results");if(!n||!t||!s)return;const o=Array.isArray(e)?e:[];if(!o.length){n.classList.add("hidden");return}n.classList.remove("hidden"),t.innerHTML=o.map(r=>`<option value="${y(String(r.pipelineName??""))}">${y(String(r.pipelineName??""))}</option>`).join(""),s.innerHTML=""}async function Ke(){const e=document.getElementById("rag-pipeline-select"),n=document.getElementById("rag-search-input"),t=document.getElementById("rag-results");if(!e||!n||!t)return;const s=e.value,o=n.value.trim();if(o){t.innerHTML="<p>Searching...</p>";try{const r=await fetch(`${C}/rag/${encodeURIComponent(s)}/search?q=${encodeURIComponent(o)}`),l=await r.json();if(!r.ok){t.innerHTML=`<p class="error">${y(l.error??"Search failed")}</p>`;return}const h=l.results??[];if(!h.length){t.innerHTML="<p>No results found.</p>";return}t.innerHTML=h.map(p=>`<div class="rag-result-item"><span class="score">${p.score!=null?(p.score*100).toFixed(1)+"%":"—"}</span> ${y(String(p.content??"").slice(0,200))}${String(p.content??"").length>200?"...":""}</div>`).join("")}catch(r){t.innerHTML=`<p class="error">${y(String(r))}</p>`}}}function xe(e){const n=document.getElementById("module-graph-container"),t=Array.isArray(e)?e:[];if(!n||!t.length){n==null||n.classList.add("hidden");return}const s=new Map,o=[],r=t.map(f=>String(f.moduleName??"")).filter(Boolean),l=[...new Set(r)];l.forEach((f,i)=>{const m=Math.floor(i/4),a=i%4;s.set(f,{x:80+a*120,y:40+m*60})});for(const f of t){const i=String(f.moduleName??""),m=f.imports,a=Array.isArray(m)?m:typeof m=="string"?m.split(/[,;]/).map(c=>c.trim()):[];for(const c of a){const d=String(c).trim();d&&(l.includes(d)||s.has(d))&&(o.push({from:i,to:d}),s.has(d)||s.set(d,{x:80+s.size%4*120,y:40+Math.floor(s.size/4)*60}))}}const h=500,p=Math.max(200,Math.ceil(l.length/4)*70);let w=`<svg class="module-graph-svg" viewBox="0 0 ${h} ${p}" xmlns="http://www.w3.org/2000/svg">`;for(const{from:f,to:i}of o){const m=s.get(f),a=s.get(i);m&&a&&(w+=`<line x1="${m.x+50}" y1="${m.y+15}" x2="${a.x+50}" y2="${a.y+15}" stroke="var(--border)" stroke-width="1"/>`)}for(const[f,i]of s)w+=`<rect x="${i.x}" y="${i.y}" width="100" height="30" rx="4" fill="var(--bg-tertiary)" stroke="var(--border)"/>`,w+=`<text x="${i.x+50}" y="${i.y+20}" text-anchor="middle" font-size="11" fill="var(--text-primary)">${y(f.length>12?f.slice(0,10)+"..":f)}</text>`;w+="</svg>",n.innerHTML=w,n.classList.remove("hidden")}function v(e,n,t,s,o,r){const l=document.getElementById(e),h=Q[e]??{col:t[0],dir:"asc"};let p=[...n];r!=null&&r.sortable&&p.length>0&&p.sort((a,c)=>{const d=a[h.col],k=c[h.col],x=String(d??"").localeCompare(String(k??""),void 0,{numeric:!0});return h.dir==="asc"?x:-x});const w=p.length>P?p.slice(0,P):p,f=p.length>P;if(!n.length){l.innerHTML=`<thead></thead><tbody><tr><td colspan="${t.length+(r!=null&&r.tryRoute||r!=null&&r.runAgent?1:0)}" class="empty-state"><p>No entries found</p></td></tr></tbody>`;return}const i=o??{},m=t.map(a=>{const c=a.replace(/([A-Z])/g," $1").trim();return`<th class="${r!=null&&r.sortable?` sortable ${h.col===a?h.dir:""}`:""}" data-col="${a}">${c}</th>`});if(r!=null&&r.tryRoute&&m.push("<th>Actions</th>"),r!=null&&r.runAgent&&m.push("<th>Actions</th>"),r!=null&&r.previewPrompt&&m.push("<th>Actions</th>"),l.innerHTML=`
|
|
71
|
-
<thead><tr>${m.join("")}</tr></thead>
|
|
72
|
-
<tbody>
|
|
73
|
-
${w.map(a=>{let c="";if(r!=null&&r.tryRoute&&a.fullPath!=null){const d=String(a.fullPath);c=`<td><button class="btn btn-sm try-route" data-method="${String(a.httpMethod??"GET").toUpperCase()}" data-path="${y(d)}">Try</button></td>`}else r!=null&&r.runAgent&&a.agentName!=null?c=`<td><button class="btn btn-sm run-agent" data-name="${y(String(a.agentName))}">Run</button></td>`:r!=null&&r.previewPrompt&&a.promptKey!=null?c=`<td><button class="btn btn-sm preview-prompt" data-key="${y(String(a.promptKey))}">Preview</button></td>`:(r!=null&&r.tryRoute||r!=null&&r.runAgent||r!=null&&r.previewPrompt)&&(c="<td></td>");return`<tr data-id="${a.id??""}" data-json='${JSON.stringify(a).replace(/'/g,"\\'")}'>
|
|
74
|
-
${t.map(d=>{const k=a[d],x=i[d];return`<td>${x?x(k,a):String(k??"—")}</td>`}).join("")}
|
|
75
|
-
${c}
|
|
76
|
-
</tr>`}).join("")}
|
|
77
|
-
</tbody>
|
|
78
|
-
`,f){const a=document.createElement("tr");a.innerHTML=`<td colspan="${t.length+(r!=null&&r.tryRoute||r!=null&&r.runAgent?1:0)}" class="empty-state"><p>Showing ${P} of ${p.length}. Use search to filter.</p></td>`,l.querySelector("tbody").appendChild(a)}l.querySelectorAll("tbody tr[data-json]").forEach(a=>{a.addEventListener("click",c=>{if(c.target.closest("button"))return;const d=a.dataset.json;d&&F(JSON.parse(d))})}),l.querySelectorAll("th.sortable").forEach(a=>{a.addEventListener("click",()=>{const c=a.dataset.col;Q[e]={col:c,dir:h.col===c&&h.dir==="asc"?"desc":"asc"},v(e,n,t,s,o,r)})}),l.querySelectorAll(".try-route").forEach(a=>{a.addEventListener("click",c=>{c.stopPropagation();const d=a.dataset.method??"GET",k=a.dataset.path??"/";Ye(d,k)})}),l.querySelectorAll(".run-agent").forEach(a=>{a.addEventListener("click",c=>{c.stopPropagation();const d=a.dataset.name??"";Xe(d)})}),l.querySelectorAll(".preview-prompt").forEach(a=>{a.addEventListener("click",c=>{c.stopPropagation();const d=a.dataset.key??"";et(d)})})}function Ye(e,n){const t=document.getElementById("route-test-modal"),s=document.getElementById("test-url"),o=document.getElementById("test-method"),r=document.getElementById("test-body-group"),l=document.getElementById("test-result");s.value=`${ve}${n}`,o.value=e,r.classList.toggle("hidden",e==="GET"),l.classList.add("hidden"),t.classList.remove("hidden")}async function Xe(e){const n=prompt("Enter input for agent (or leave empty for empty string):")??"";try{const t=await fetch(`${C}/agents/${encodeURIComponent(e)}/run`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({input:n})}),s=await t.json();if(!t.ok){F({error:s.error??"Agent run failed",status:t.status});return}F({agentName:e,result:s.result})}catch(t){F({error:String(t),agentName:e})}}function Qe(e){const n=document.getElementById("prompt-playground-modal"),t=document.getElementById("playground-key"),s=document.getElementById("playground-vars"),o=document.getElementById("playground-output"),r=document.getElementById("playground-tokens");t.value=e,s.value="{}",o.textContent="",r.textContent="—",n.classList.remove("hidden")}async function Ze(e,n){const t=await fetch(`${C}/prompts/render`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({key:e,variables:n})});if(!t.ok){const s=await t.json().catch(()=>({error:t.statusText}));throw new Error(s.error??"Failed to render")}return t.json()}function et(e){Qe(e)}let U=null;function F(e){U=e;const n=document.getElementById("detail-panel"),t=document.getElementById("detail-title"),s=document.getElementById("detail-content");t.textContent=String(e.kind??"Entry"),s.innerHTML=Oe(e),n.classList.remove("hidden")}function tt(){U=null,document.getElementById("detail-panel").classList.add("hidden")}function nt(){if(!U)return;const e=JSON.stringify(U,null,2);navigator.clipboard.writeText(e).then(()=>{const n=document.getElementById("detail-copy");if(n){const t=n.textContent;n.textContent="Copied!",setTimeout(()=>{n.textContent=t},1500)}})}function st(e,n){const t=Array.isArray(e)?e:[];if(!n.trim())return t;const s=n.toLowerCase();return t.filter(o=>JSON.stringify(o).toLowerCase().includes(s))}const Ee={httpMethod:e=>Te(String(e??""))},$e={enabled:e=>`<span class="badge ${e?"badge-get":"badge-default"}">${e?"Enabled":"Disabled"}</span>`,nextRuns:(e,n)=>{const t=Array.isArray(e)?e:[];if(!t.length)return"—";const s=o=>{try{return new Date(o).toLocaleString(void 0,{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})}catch{return o}};return t.slice(0,3).map(s).join(", ")+(t.length>3?"...":"")}},Se={moduleName:e=>String(e??"—"),scope:e=>{const n=String(e??"singleton");return`<span class="badge ${n==="singleton"?"badge-get":n==="request"?"badge-post":"badge-default"}">${n}</span>`}},Ie={tools:e=>Array.isArray(e)?e.join(", "):String(e??"—")},Le={streaming:e=>`<span class="badge ${e?"badge-get":"badge-default"}">${e?"Yes":"No"}</span>`};function M(e,n){try{n()}catch(t){console.error(`[Inspector] ${e} failed:`,t)}}async function O(e=!1){var n;if(!J){J=!0,V(!0),X(!1);try{const t=await Ae(e),s=Array.isArray(t==null?void 0:t.entries)?t.entries:[],o=t!=null&&t.summary&&typeof t.summary=="object"?t.summary:{},r=t!=null&&t.overview&&typeof t.overview=="object"?t.overview:{};b={entries:s,summary:o,overview:r},M("overview",()=>fe(o)),r.gateway&&M("gatewayOverview",()=>He(r.gateway)),r.discovery&&M("discoveryOverview",()=>Fe(r.discovery)),r.resilience&&M("resilienceOverview",()=>De(r.resilience)),["overview-gateway","overview-discovery","overview-resilience"].forEach(g=>{const R=document.getElementById(g);R&&!r[g.replace("overview-","")]&&R.classList.add("hidden")});const[l,h,p]=await Promise.all([Ce(),Promise.all([z("/health"),z("/ready"),z("/startup")]).then(([g,R,Be])=>({health:g,ready:R,startup:Be})),je()]);Pe(l),Ue(h),_e(p),K(h,p),Y(o);const w=b.entries.filter(g=>g.kind==="route"),f=b.entries.filter(g=>g.kind==="module"),i=b.entries.filter(g=>g.kind==="provider"),m=b.entries.filter(g=>g.kind==="cron"),a=b.entries.filter(g=>g.kind==="queue"),c=b.entries.filter(g=>g.kind==="websocket"),d=b.entries.filter(g=>g.kind==="agent"),k=b.entries.filter(g=>g.kind==="rag"),x=b.entries.filter(g=>g.kind==="prompt"),$=b.entries.filter(g=>g.kind==="aifunction"),S=b.entries.filter(g=>g.kind==="event"),A=b.entries.filter(g=>g.kind==="graphql"),I=b.entries.filter(g=>g.kind==="grpc"),L=b.entries.filter(g=>g.kind==="kafka"),N=b.entries.filter(g=>g.kind==="flow"),u=b.entries.filter(g=>g.kind==="data"),T=b.entries.filter(g=>g.kind==="serverless"),_=b.entries.filter(g=>g.kind==="ml");v("routes-table",w,["httpMethod","fullPath","controllerPath","className"],"route",Ee,{sortable:!0,tryRoute:!0}),M("moduleGraph",()=>xe(f)),v(E.modules,f,["moduleName","dynamicModule","imports"],"module",void 0,{sortable:!0}),v(E.providers,i,["providerName","moduleName","scope"],"provider",Se,{sortable:!0}),v(E.jobs,m,["jobName","cronExpression","enabled","nextRuns"],"cron",$e),v(E.queues,a,["queueName","consumerName","className"],"queue"),v(E.websocket,c,["gatewayName","eventName","namespace"],"websocket"),v(E.agents,d,["agentName","className","model","tools"],"agent",Ie,{sortable:!0,runAgent:!0}),v(E.ai,$,["className","methodName","provider","model","streaming"],"aifunction",Le),M("ragExplorer",()=>be(k)),v(E.rag,k,["pipelineName","vectorStore","embeddingProvider","chunkingStrategy"],"rag",void 0,{sortable:!0}),v(E.prompts,x,["promptKey","scope"],"prompt",void 0,{sortable:!0,previewPrompt:!0}),v(E.events,S,["eventName","className","methodName"],"event"),v(E.graphql,A,["operationType","operationName","resolverName","className"],"graphql"),v(E.grpc,I,["serviceName","methodName","className"],"grpc"),v(E.kafka,L,["consumerName","topic","groupId","methodName"],"kafka");const q=document.getElementById("flow-runtime-info");q&&q.classList.toggle("hidden",N.length===0),M("flowDiagram",()=>ke(N)),v(E.flows,N,["flowId","version","sourceType","nodeName","entryNode","edges","className"],"flow"),v(E.data,u,["pipelineName","className"],"data"),v(E.serverless,T,["controllerName","runtime","memory","timeout"],"serverless"),v(E.ml,_,["modelName","version","className"],"ml")}catch(t){const s=String(t),o=s.includes("Failed to fetch")||s.includes("NetworkError")||s.includes("Load failed");X(o),K({health:{ok:!1},ready:{ok:!1},startup:{ok:!1}},{}),Y({});const r=document.getElementById("summary-cards");if(r){const l=o?"Is the app running?":"A rendering error occurred. Check the console for details.";r.innerHTML=`<div class="overview-error"><p>Error: ${y(String(t))}</p><p>${y(l)} <button class="btn btn-sm btn-primary" id="retry-load">Retry</button></p></div>`,(n=document.getElementById("retry-load"))==null||n.addEventListener("click",()=>O(!0))}}finally{J=!1,V(!1)}}}const E={routes:"routes-table",modules:"modules-table",providers:"providers-table",jobs:"jobs-table",queues:"queues-table",websocket:"websocket-table",agents:"agents-table",ai:"ai-table",rag:"rag-table",prompts:"prompts-table",events:"events-table",graphql:"graphql-table",grpc:"grpc-table",kafka:"kafka-table",flows:"flows-table",data:"data-table",serverless:"serverless-table",ml:"ml-table"},rt={route:"routes",module:"modules",provider:"providers",cron:"jobs",queue:"queues",websocket:"websocket",agent:"agents",aifunction:"ai",rag:"rag",prompt:"prompts",event:"events",graphql:"graphql",grpc:"grpc",kafka:"kafka",flow:"flows",data:"data",serverless:"serverless",ml:"ml"};function W(e){var t;const n=document.querySelector(`.sidebar nav a[data-tab="${e}"]`);if(n){document.querySelectorAll(".sidebar nav a").forEach(o=>o.classList.remove("active")),document.querySelectorAll(".tab-panel").forEach(o=>o.classList.remove("active")),n.classList.add("active"),(t=document.getElementById(e))==null||t.classList.add("active");const s=new URLSearchParams(window.location.search);s.set("tab",e),window.history.replaceState({},"",`${window.location.pathname}?${s}`)}}document.querySelectorAll(".sidebar nav a").forEach(e=>{e.addEventListener("click",n=>{n.preventDefault();const t=e.dataset.tab;W(t)})});var Z;(Z=document.getElementById("summary-cards"))==null||Z.addEventListener("click",e=>{const n=e.target.closest(".card[data-kind]");if(n){const t=n.dataset.kind,s=t?rt[t]:null;s&&W(s)}});function Ne(){O(!0)}var ee;(ee=document.getElementById("refresh"))==null||ee.addEventListener("click",Ne);var te;(te=document.getElementById("refresh-sidebar"))==null||te.addEventListener("click",Ne);document.getElementById("detail-close").addEventListener("click",tt);var ne;(ne=document.getElementById("detail-copy"))==null||ne.addEventListener("click",nt);var se;(se=document.getElementById("export-btn"))==null||se.addEventListener("click",()=>{if(!b)return;const e=new Blob([JSON.stringify(b,null,2)],{type:"application/json"}),n=document.createElement("a");n.href=URL.createObjectURL(e),n.download=`inspector-snapshot-${new Date().toISOString().slice(0,19).replace(/[T:]/g,"-")}.json`,n.click(),URL.revokeObjectURL(n.href)});const j=document.getElementById("auto-refresh");let H=null;j==null||j.addEventListener("change",()=>{H&&clearInterval(H),H=null,j!=null&&j.checked&&(H=setInterval(()=>O(!1),15e3))});var re;(re=document.getElementById("test-route-btn"))==null||re.addEventListener("click",async()=>{const e=document.getElementById("test-url").value,n=document.getElementById("test-method").value,t=document.getElementById("test-body"),s=document.getElementById("test-result");s.classList.remove("hidden"),s.className="test-result",s.textContent="Sending...";try{const o={method:n};if(n!=="GET"&&(t!=null&&t.value))try{JSON.parse(t.value),o.body=t.value,o.headers={"Content-Type":"application/json"}}catch{s.className="test-result error",s.textContent="Invalid JSON body";return}const r=await fetch(e,o),l=await r.text();s.className=`test-result ${r.ok?"success":"error"}`,s.textContent=`Status: ${r.status}
|
|
79
|
-
|
|
80
|
-
${l.slice(0,500)}${l.length>500?"...":""}`}catch(o){s.className="test-result error",s.textContent=String(o)}});var oe;(oe=document.getElementById("test-route-cancel"))==null||oe.addEventListener("click",()=>{document.getElementById("route-test-modal").classList.add("hidden")});var ae;(ae=document.getElementById("test-method"))==null||ae.addEventListener("change",e=>{const n=e.target.value;document.getElementById("test-body-group").classList.toggle("hidden",n==="GET")});var ie;(ie=document.getElementById("playground-render"))==null||ie.addEventListener("click",async()=>{const e=document.getElementById("playground-key").value,n=document.getElementById("playground-vars").value,t=document.getElementById("playground-output"),s=document.getElementById("playground-tokens");let o={};try{o=n.trim()?JSON.parse(n):{}}catch{t.textContent="Invalid JSON in variables",s.textContent="—";return}try{const{rendered:r,tokenEstimate:l}=await Ze(e,o);t.textContent=r,s.textContent=String(l)}catch(r){t.textContent=String(r),s.textContent="—"}});var le;(le=document.getElementById("playground-close"))==null||le.addEventListener("click",()=>{document.getElementById("prompt-playground-modal").classList.add("hidden")});var ce;(ce=document.getElementById("diff-btn"))==null||ce.addEventListener("click",()=>{document.getElementById("diff-modal").classList.remove("hidden")});var de;(de=document.getElementById("diff-close"))==null||de.addEventListener("click",()=>{document.getElementById("diff-modal").classList.add("hidden")});var ue;(ue=document.getElementById("diff-load-file"))==null||ue.addEventListener("click",()=>{document.getElementById("diff-file").click()});var me;(me=document.getElementById("diff-file"))==null||me.addEventListener("change",e=>{var s;const n=(s=e.target.files)==null?void 0:s[0];if(!n)return;const t=new FileReader;t.onload=()=>{document.getElementById("diff-snapshot-b").value=String(t.result)},t.readAsText(n)});var ge;(ge=document.getElementById("rag-search-btn"))==null||ge.addEventListener("click",Ke);var pe;(pe=document.getElementById("diff-compare-btn"))==null||pe.addEventListener("click",()=>{const e=document.getElementById("diff-snapshot-b").value.trim(),n=document.getElementById("diff-result");if(!b){n.innerHTML='<p class="error">No current snapshot. Refresh first.</p>',n.classList.remove("hidden");return}let t;try{t=e?JSON.parse(e):{entries:[],summary:{}}}catch{n.innerHTML='<p class="error">Invalid JSON in Snapshot B.</p>',n.classList.remove("hidden");return}const s=b.entries??[],o=t.entries??[],r=new Set(s.map(i=>i.id)),l=new Set(o.map(i=>i.id)),h=o.filter(i=>!r.has(i.id)),p=s.filter(i=>!l.has(i.id)),w=s.filter(i=>{const m=o.find(a=>a.id===i.id);return m&&JSON.stringify(i)!==JSON.stringify(m)});let f="";h.length&&(f+=`<p class="added">+ ${h.length} added</p><ul>${h.map(i=>`<li>${y(String(i.kind))}: ${y(String(i.id??""))}</li>`).join("")}</ul>`),p.length&&(f+=`<p class="removed">− ${p.length} removed</p><ul>${p.map(i=>`<li>${y(String(i.kind))}: ${y(String(i.id??""))}</li>`).join("")}</ul>`),w.length&&(f+=`<p class="changed">~ ${w.length} changed</p><ul>${w.map(i=>`<li>${y(String(i.kind))}: ${y(String(i.id??""))}</li>`).join("")}</ul>`),f||(f="<p>No differences.</p>"),n.innerHTML=f,n.classList.remove("hidden")});document.getElementById("search").addEventListener("input",e=>{const n=e.target.value;if(!b)return;const t=st(b.entries,n),s=b.summary&&typeof b.summary=="object"?b.summary:{},o=Object.fromEntries(Object.entries(s).map(([u])=>[u,t.filter(T=>T.kind===u).length]));fe(o);const r=t.filter(u=>u.kind==="route"),l=t.filter(u=>u.kind==="module"),h=t.filter(u=>u.kind==="provider"),p=t.filter(u=>u.kind==="cron"),w=t.filter(u=>u.kind==="queue"),f=t.filter(u=>u.kind==="websocket"),i=t.filter(u=>u.kind==="agent"),m=t.filter(u=>u.kind==="rag"),a=t.filter(u=>u.kind==="prompt"),c=t.filter(u=>u.kind==="aifunction"),d=t.filter(u=>u.kind==="event"),k=t.filter(u=>u.kind==="graphql"),x=t.filter(u=>u.kind==="grpc"),$=t.filter(u=>u.kind==="kafka"),S=t.filter(u=>u.kind==="flow"),A=t.filter(u=>u.kind==="data"),I=t.filter(u=>u.kind==="serverless"),L=t.filter(u=>u.kind==="ml");v("routes-table",r,["httpMethod","fullPath","controllerPath","className"],"route",Ee,{sortable:!0,tryRoute:!0}),xe(l),v("modules-table",l,["moduleName","dynamicModule","imports"],"module",void 0,{sortable:!0}),v("providers-table",h,["providerName","moduleName","scope"],"provider",Se,{sortable:!0}),v("jobs-table",p,["jobName","cronExpression","enabled","nextRuns"],"cron",$e),v("queues-table",w,["queueName","consumerName","className"],"queue"),v("websocket-table",f,["gatewayName","eventName","namespace"],"websocket"),v("agents-table",i,["agentName","className","model","tools"],"agent",Ie,{sortable:!0,runAgent:!0}),v("ai-table",c,["className","methodName","provider","model","streaming"],"aifunction",Le),be(m),v("rag-table",m,["pipelineName","vectorStore","embeddingProvider","chunkingStrategy"],"rag",void 0,{sortable:!0}),v("prompts-table",a,["promptKey","scope"],"prompt",void 0,{sortable:!0,previewPrompt:!0}),v("events-table",d,["eventName","className","methodName"],"event"),v("graphql-table",k,["operationType","operationName","resolverName","className"],"graphql"),v("grpc-table",x,["serviceName","methodName","className"],"grpc"),v("kafka-table",$,["consumerName","topic","groupId","methodName"],"kafka");const N=document.getElementById("flow-runtime-info");N&&N.classList.toggle("hidden",S.length===0),ke(S),v("flows-table",S,["flowId","version","sourceType","nodeName","entryNode","edges","className"],"flow",void 0,{sortable:!0}),v("data-table",A,["pipelineName","className"],"data"),v("serverless-table",I,["controllerName","runtime","memory","timeout"],"serverless"),v("ml-table",L,["modelName","version","className"],"ml")});O().then(()=>{const n=new URLSearchParams(window.location.search).get("tab");n&&W(n)});
|