apteva 0.4.53 → 0.4.56

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.
Files changed (78) hide show
  1. package/dist/ActivityPage.kxzzb4yc.js +3 -0
  2. package/dist/ApiDocsPage.zq998hbm.js +4 -0
  3. package/dist/App.55rea8mn.js +61 -0
  4. package/dist/App.5ywb23z4.js +53 -0
  5. package/dist/App.6thds120.js +4 -0
  6. package/dist/{App.jhb45d7r.js → App.9tctxzqm.js} +3 -3
  7. package/dist/App.a8r8ttaz.js +4 -0
  8. package/dist/App.agsv5bje.js +4 -0
  9. package/dist/App.cepapqmx.js +4 -0
  10. package/dist/App.dp041gb3.js +221 -0
  11. package/dist/App.fds72zb5.js +4 -0
  12. package/dist/App.fg9qj2dq.js +4 -0
  13. package/dist/App.ndfejbm9.js +4 -0
  14. package/dist/App.nxmfmq1h.js +13 -0
  15. package/dist/App.qdfyt8ba.js +4 -0
  16. package/dist/{App.9sryp183.js → App.x2d0ygt6.js} +2 -2
  17. package/dist/App.yt9p4nr3.js +20 -0
  18. package/dist/{App.wghtdzsk.js → App.zn4mw16t.js} +1 -1
  19. package/dist/ConnectionsPage.8r96ryw7.js +3 -0
  20. package/dist/McpPage.3cwh0gnd.js +3 -0
  21. package/dist/SettingsPage.ykgdh5ev.js +3 -0
  22. package/dist/SkillsPage.4np1s65b.js +3 -0
  23. package/dist/TasksPage.4g08t7p6.js +3 -0
  24. package/dist/TelemetryPage.72w9pwcp.js +3 -0
  25. package/dist/TestsPage.z4fk3r7r.js +3 -0
  26. package/dist/ThreadsPage.63tcajeh.js +3 -0
  27. package/dist/apteva-kit.css +1 -1
  28. package/dist/index.html +1 -1
  29. package/dist/styles.css +1 -1
  30. package/package.json +2 -2
  31. package/src/crypto.ts +25 -4
  32. package/src/db.ts +24 -1
  33. package/src/mcp-platform.ts +273 -44
  34. package/src/providers.ts +125 -5
  35. package/src/routes/api/agent-utils.ts +105 -8
  36. package/src/routes/api/providers.ts +64 -0
  37. package/src/routes/api/telemetry.ts +0 -7
  38. package/src/routes/share.ts +3 -2
  39. package/src/server.ts +53 -7
  40. package/src/test-runner.ts +1 -1
  41. package/src/web/App.tsx +37 -22
  42. package/src/web/components/agents/AgentCard.tsx +12 -9
  43. package/src/web/components/agents/AgentPanel.tsx +126 -7
  44. package/src/web/components/agents/AgentsView.tsx +30 -8
  45. package/src/web/components/agents/CreateAgentModal.tsx +155 -5
  46. package/src/web/components/dashboard/Dashboard.tsx +9 -7
  47. package/src/web/components/layout/Sidebar.tsx +43 -32
  48. package/src/web/components/meta-agent/MetaAgent.tsx +6 -2
  49. package/src/web/components/settings/SettingsPage.tsx +172 -43
  50. package/src/web/components/telemetry/TelemetryPage.tsx +54 -46
  51. package/src/web/components/tests/TestsPage.tsx +91 -76
  52. package/src/web/context/TelemetryContext.tsx +4 -1
  53. package/src/web/context/UIModeContext.tsx +49 -0
  54. package/src/web/context/index.ts +3 -0
  55. package/src/web/types.ts +67 -3
  56. package/dist/ActivityPage.sw9p594m.js +0 -3
  57. package/dist/ApiDocsPage.90e03bz7.js +0 -4
  58. package/dist/App.3vnrera5.js +0 -4
  59. package/dist/App.94x6mh7f.js +0 -20
  60. package/dist/App.9t1zc5r7.js +0 -53
  61. package/dist/App.p7jjw1zf.js +0 -4
  62. package/dist/App.pfbdzrhh.js +0 -4
  63. package/dist/App.pse0pzar.js +0 -4
  64. package/dist/App.r43t58w6.js +0 -221
  65. package/dist/App.stgng5bx.js +0 -13
  66. package/dist/App.tm3k7h4b.js +0 -4
  67. package/dist/App.vkg121c6.js +0 -4
  68. package/dist/App.xva0tfzh.js +0 -4
  69. package/dist/App.ysxy7akk.js +0 -61
  70. package/dist/App.yzkh4gq2.js +0 -4
  71. package/dist/ConnectionsPage.q5f9fd37.js +0 -3
  72. package/dist/McpPage.f3ccrezb.js +0 -3
  73. package/dist/SettingsPage.zmzm1pp6.js +0 -3
  74. package/dist/SkillsPage.whxnez67.js +0 -3
  75. package/dist/TasksPage.zp4jfevw.js +0 -3
  76. package/dist/TelemetryPage.an0ky78c.js +0 -3
  77. package/dist/TestsPage.18krj0d1.js +0 -3
  78. package/dist/ThreadsPage.nnphgy98.js +0 -3
@@ -290,7 +290,7 @@ export function TestsPage() {
290
290
  };
291
291
 
292
292
  return (
293
- <div className="flex-1 overflow-auto p-6">
293
+ <div className="relative flex-1 overflow-auto p-6">
294
294
  {ConfirmDialog}
295
295
 
296
296
  {/* Header */}
@@ -424,91 +424,106 @@ export function TestsPage() {
424
424
  </div>
425
425
  )}
426
426
 
427
- {/* Run History Panel */}
427
+ {/* Run History Drawer - backdrop */}
428
428
  {selectedRuns && (
429
- <div className="mt-6">
430
- <div className="flex items-center justify-between mb-3">
431
- <h2 className="text-sm font-bold text-[var(--color-text-secondary)]">Run History</h2>
429
+ <div
430
+ className="absolute inset-0 bg-black/40 backdrop-blur-[2px] z-10"
431
+ onClick={() => { setSelectedRuns(null); setExpandedRun(null); }}
432
+ />
433
+ )}
434
+
435
+ {/* Run History Drawer - slides in from right */}
436
+ {selectedRuns && (
437
+ <div className="absolute right-0 top-0 bottom-0 w-full sm:w-[500px] lg:w-[600px] z-20 bg-[var(--color-bg)] border-l border-[var(--color-border)] shadow-2xl flex flex-col">
438
+ {/* Drawer Header */}
439
+ <div className="flex items-center justify-between px-4 py-3 border-b border-[var(--color-border)] bg-[var(--color-surface)] shrink-0">
440
+ <h2 className="text-sm font-bold">Run History</h2>
432
441
  <button
433
442
  onClick={() => { setSelectedRuns(null); setExpandedRun(null); }}
434
- className="text-xs text-[var(--color-text-muted)] hover:text-[var(--color-text-secondary)]"
443
+ className="p-1 text-[var(--color-text-muted)] hover:text-[var(--color-text)] rounded transition"
435
444
  >
436
- Close
445
+ <svg className="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24">
446
+ <path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M6 18L18 6M6 6l12 12" />
447
+ </svg>
437
448
  </button>
438
449
  </div>
439
- {selectedRuns.runs.length === 0 ? (
440
- <p className="text-sm text-[var(--color-text-muted)]">No runs yet</p>
441
- ) : (
442
- <div className="space-y-2">
443
- {selectedRuns.runs.map(run => (
444
- <div key={run.id} className="bg-[var(--color-bg-secondary)] border border-[var(--color-border)] rounded p-3">
445
- <div
446
- className="flex items-center justify-between cursor-pointer"
447
- onClick={() => setExpandedRun(expandedRun === run.id ? null : run.id)}
448
- >
449
- <div className="flex items-center gap-3">
450
- {statusBadge(run.status)}
451
- <span className="text-xs text-[var(--color-text-muted)]">
452
- {run.duration_ms ? `${(run.duration_ms / 1000).toFixed(1)}s` : "---"}
453
- </span>
454
- {run.score != null && (
455
- <span className="text-xs text-[var(--color-text-secondary)] font-mono">{run.score}/10</span>
456
- )}
457
- {run.selected_agent_name && (
450
+
451
+ {/* Drawer Content */}
452
+ <div className="flex-1 overflow-auto p-4">
453
+ {selectedRuns.runs.length === 0 ? (
454
+ <p className="text-sm text-[var(--color-text-muted)]">No runs yet</p>
455
+ ) : (
456
+ <div className="space-y-2">
457
+ {selectedRuns.runs.map(run => (
458
+ <div key={run.id} className="bg-[var(--color-surface)] border border-[var(--color-border)] rounded p-3">
459
+ <div
460
+ className="flex items-center justify-between cursor-pointer"
461
+ onClick={() => setExpandedRun(expandedRun === run.id ? null : run.id)}
462
+ >
463
+ <div className="flex items-center gap-3 flex-wrap">
464
+ {statusBadge(run.status)}
465
+ <span className="text-xs text-[var(--color-text-muted)]">
466
+ {run.duration_ms ? `${(run.duration_ms / 1000).toFixed(1)}s` : "---"}
467
+ </span>
468
+ {run.score != null && (
469
+ <span className="text-xs text-[var(--color-text-secondary)] font-mono">{run.score}/10</span>
470
+ )}
471
+ {run.selected_agent_name && (
472
+ <span className="text-xs text-[var(--color-text-faint)]">
473
+ Agent: {run.selected_agent_name}
474
+ </span>
475
+ )}
458
476
  <span className="text-xs text-[var(--color-text-faint)]">
459
- Agent: {run.selected_agent_name}
477
+ {new Date(run.created_at).toLocaleString()}
460
478
  </span>
461
- )}
462
- <span className="text-xs text-[var(--color-text-faint)]">
463
- {new Date(run.created_at).toLocaleString()}
464
- </span>
479
+ </div>
480
+ <span className="text-xs text-[var(--color-text-faint)] shrink-0 ml-2">{expandedRun === run.id ? "---" : "+"}</span>
465
481
  </div>
466
- <span className="text-xs text-[var(--color-text-faint)]">{expandedRun === run.id ? "---" : "+"}</span>
467
- </div>
468
- {expandedRun === run.id && (
469
- <div className="mt-3 space-y-2">
470
- {run.planner_reasoning && (
471
- <div>
472
- <div className="text-xs text-[var(--color-text-muted)] mb-1">Planner:</div>
473
- <div className="text-sm text-[var(--color-text-secondary)] bg-[var(--color-bg)] p-2 rounded">
474
- {run.selected_agent_name && <span className="text-[var(--color-accent)]">{run.selected_agent_name}</span>}
475
- {run.selected_agent_name && " --- "}
476
- {run.planner_reasoning}
482
+ {expandedRun === run.id && (
483
+ <div className="mt-3 space-y-2">
484
+ {run.planner_reasoning && (
485
+ <div>
486
+ <div className="text-xs text-[var(--color-text-muted)] mb-1">Planner:</div>
487
+ <div className="text-sm text-[var(--color-text-secondary)] bg-[var(--color-bg)] p-2 rounded">
488
+ {run.selected_agent_name && <span className="text-[var(--color-accent)]">{run.selected_agent_name}</span>}
489
+ {run.selected_agent_name && " --- "}
490
+ {run.planner_reasoning}
491
+ </div>
477
492
  </div>
478
- </div>
479
- )}
480
- {run.generated_message && (
481
- <div>
482
- <div className="text-xs text-[var(--color-text-muted)] mb-1">Generated Message:</div>
483
- <div className="text-sm text-[var(--color-text-secondary)] bg-[var(--color-bg)] p-2 rounded">"{run.generated_message}"</div>
484
- </div>
485
- )}
486
- {run.judge_reasoning && (
487
- <div>
488
- <div className="text-xs text-[var(--color-text-muted)] mb-1">Judge:</div>
489
- <div className="text-sm text-[var(--color-text-secondary)] bg-[var(--color-bg)] p-2 rounded">{run.judge_reasoning}</div>
490
- </div>
491
- )}
492
- {run.error && (
493
- <div>
494
- <div className="text-xs text-red-400 mb-1">Error:</div>
495
- <div className="text-sm text-red-300 bg-[var(--color-bg)] p-2 rounded">{run.error}</div>
496
- </div>
497
- )}
498
- {run.agent_response && (
499
- <div>
500
- <div className="text-xs text-[var(--color-text-muted)] mb-1">Agent Response (Thread):</div>
501
- <pre className="text-xs text-[var(--color-text-secondary)] bg-[var(--color-bg)] p-2 rounded overflow-auto max-h-64">
502
- {run.agent_response}
503
- </pre>
504
- </div>
505
- )}
506
- </div>
507
- )}
508
- </div>
509
- ))}
510
- </div>
511
- )}
493
+ )}
494
+ {run.generated_message && (
495
+ <div>
496
+ <div className="text-xs text-[var(--color-text-muted)] mb-1">Generated Message:</div>
497
+ <div className="text-sm text-[var(--color-text-secondary)] bg-[var(--color-bg)] p-2 rounded">"{run.generated_message}"</div>
498
+ </div>
499
+ )}
500
+ {run.judge_reasoning && (
501
+ <div>
502
+ <div className="text-xs text-[var(--color-text-muted)] mb-1">Judge:</div>
503
+ <div className="text-sm text-[var(--color-text-secondary)] bg-[var(--color-bg)] p-2 rounded">{run.judge_reasoning}</div>
504
+ </div>
505
+ )}
506
+ {run.error && (
507
+ <div>
508
+ <div className="text-xs text-red-400 mb-1">Error:</div>
509
+ <div className="text-sm text-red-300 bg-[var(--color-bg)] p-2 rounded">{run.error}</div>
510
+ </div>
511
+ )}
512
+ {run.agent_response && (
513
+ <div>
514
+ <div className="text-xs text-[var(--color-text-muted)] mb-1">Agent Response (Thread):</div>
515
+ <pre className="text-xs text-[var(--color-text-secondary)] bg-[var(--color-bg)] p-2 rounded overflow-auto max-h-64">
516
+ {run.agent_response}
517
+ </pre>
518
+ </div>
519
+ )}
520
+ </div>
521
+ )}
522
+ </div>
523
+ ))}
524
+ </div>
525
+ )}
526
+ </div>
512
527
  </div>
513
528
  )}
514
529
 
@@ -13,6 +13,7 @@ export interface TelemetryEvent {
13
13
  duration_ms?: number;
14
14
  error?: string;
15
15
  cost?: number;
16
+ _receivedAt?: number; // Client-side timestamp when event was received via SSE
16
17
  }
17
18
 
18
19
  interface TelemetryContextValue {
@@ -88,8 +89,10 @@ export function TelemetryProvider({ children }: { children: React.ReactNode }) {
88
89
 
89
90
  // Handle array of events
90
91
  if (Array.isArray(data)) {
92
+ const now = Date.now();
93
+ const stamped = data.map((e: TelemetryEvent) => ({ ...e, _receivedAt: now }));
91
94
  setEvents(prev => {
92
- const combined = [...data, ...prev];
95
+ const combined = [...stamped, ...prev];
93
96
  return combined.slice(0, MAX_EVENTS);
94
97
  });
95
98
 
@@ -0,0 +1,49 @@
1
+ import React, { createContext, useContext, useState, useCallback, useMemo, type ReactNode } from "react";
2
+
3
+ export type UIMode = "developer" | "business";
4
+
5
+ interface UIModeContextValue {
6
+ mode: UIMode;
7
+ setMode: (mode: UIMode) => void;
8
+ isDev: boolean;
9
+ isBusiness: boolean;
10
+ t: (dev: string, biz: string) => string;
11
+ }
12
+
13
+ const UIModeContext = createContext<UIModeContextValue | null>(null);
14
+
15
+ const STORAGE_KEY = "apteva_ui_mode";
16
+
17
+ export function useUIMode(): UIModeContextValue {
18
+ const context = useContext(UIModeContext);
19
+ if (!context) {
20
+ throw new Error("useUIMode must be used within a UIModeProvider");
21
+ }
22
+ return context;
23
+ }
24
+
25
+ export function UIModeProvider({ children }: { children: ReactNode }) {
26
+ const [mode, setModeState] = useState<UIMode>(() => {
27
+ if (typeof window !== "undefined") {
28
+ const stored = localStorage.getItem(STORAGE_KEY);
29
+ if (stored === "developer" || stored === "business") return stored;
30
+ }
31
+ return "developer";
32
+ });
33
+
34
+ const setMode = useCallback((newMode: UIMode) => {
35
+ setModeState(newMode);
36
+ localStorage.setItem(STORAGE_KEY, newMode);
37
+ }, []);
38
+
39
+ const isDev = mode === "developer";
40
+ const isBusiness = mode === "business";
41
+
42
+ const t = useCallback((dev: string, biz: string) => {
43
+ return mode === "developer" ? dev : biz;
44
+ }, [mode]);
45
+
46
+ const value = useMemo(() => ({ mode, setMode, isDev, isBusiness, t }), [mode, setMode, isDev, isBusiness, t]);
47
+
48
+ return <UIModeContext.Provider value={value}>{children}</UIModeContext.Provider>;
49
+ }
@@ -7,3 +7,6 @@ export { ProjectProvider, useProjects } from "./ProjectContext";
7
7
  export type { Project } from "./ProjectContext";
8
8
 
9
9
  export { ThemeProvider, useTheme } from "./ThemeContext";
10
+
11
+ export { UIModeProvider, useUIMode } from "./UIModeContext";
12
+ export type { UIMode } from "./UIModeContext";
package/src/web/types.ts CHANGED
@@ -18,13 +18,60 @@ export interface OperatorConfig {
18
18
  max_actions_per_turn?: number;
19
19
  }
20
20
 
21
+ export interface RealtimeConfig {
22
+ enabled: boolean;
23
+ provider?: "openai" | "gemini" | "standard"; // Voice mode
24
+ model?: string; // OpenAI realtime model
25
+ voice?: string; // OpenAI voice (alloy, ash, ballad, coral, sage, verse)
26
+ geminiModel?: string; // Gemini realtime model
27
+ geminiVoice?: string; // Gemini voice (Aoede, Charon, Fenrir, Kore, Puck)
28
+ vadType?: string; // "semantic_vad" | "server_vad"
29
+ googleSearch?: boolean; // Gemini: enable Google Search grounding
30
+ sttProvider?: string; // Standard mode: "elevenlabs" | "speaches" | "whisper_cpp" | etc.
31
+ sttModel?: string;
32
+ ttsProvider?: string; // Standard mode: "elevenlabs" | "kokoro" | "piper" | etc.
33
+ ttsModel?: string;
34
+ }
35
+
36
+ // Realtime (native voice-to-voice) provider models and voices
37
+ export const REALTIME_PROVIDERS = {
38
+ openai: {
39
+ models: [
40
+ { value: "gpt-realtime-1.5", label: "GPT Realtime 1.5 (Latest)", recommended: true },
41
+ { value: "gpt-realtime", label: "GPT Realtime" },
42
+ { value: "gpt-4o-realtime-preview", label: "GPT-4o Realtime Preview" },
43
+ ],
44
+ voices: [
45
+ { value: "alloy", label: "Alloy" },
46
+ { value: "ash", label: "Ash" },
47
+ { value: "ballad", label: "Ballad" },
48
+ { value: "coral", label: "Coral" },
49
+ { value: "marin", label: "Marin", recommended: true },
50
+ { value: "sage", label: "Sage" },
51
+ { value: "verse", label: "Verse" },
52
+ ],
53
+ },
54
+ gemini: {
55
+ models: [
56
+ { value: "models/gemini-2.5-flash-native-audio-preview-12-2025", label: "Gemini 2.5 Flash Audio", recommended: true },
57
+ ],
58
+ voices: [
59
+ { value: "Kore", label: "Kore", recommended: true },
60
+ { value: "Puck", label: "Puck" },
61
+ { value: "Charon", label: "Charon" },
62
+ { value: "Aoede", label: "Aoede" },
63
+ { value: "Fenrir", label: "Fenrir" },
64
+ ],
65
+ },
66
+ } as const;
67
+
21
68
  export interface AgentFeatures {
22
69
  memory: boolean;
23
70
  tasks: boolean;
24
71
  vision: boolean;
25
72
  operator: boolean | OperatorConfig; // Can be boolean for backwards compat or full config
26
73
  mcp: boolean;
27
- realtime: boolean;
74
+ realtime: boolean | RealtimeConfig; // Can be boolean for backwards compat or full config
28
75
  files: boolean;
29
76
  agents: boolean | MultiAgentConfig; // Can be boolean for backwards compat or full config
30
77
  builtinTools?: AgentBuiltinTools;
@@ -51,6 +98,21 @@ export function getOperatorConfig(features: AgentFeatures): OperatorConfig {
51
98
  return op;
52
99
  }
53
100
 
101
+ // Helper to normalize realtime feature to RealtimeConfig
102
+ export function getRealtimeConfig(features: AgentFeatures): RealtimeConfig {
103
+ const rt = features.realtime;
104
+ if (typeof rt === "boolean") {
105
+ return { enabled: rt };
106
+ }
107
+ return rt;
108
+ }
109
+
110
+ // Helper to check if realtime is enabled
111
+ export function isRealtimeEnabled(features: AgentFeatures): boolean {
112
+ if (typeof features.realtime === "boolean") return features.realtime;
113
+ return features.realtime.enabled;
114
+ }
115
+
54
116
  // Helper to normalize agents feature to MultiAgentConfig
55
117
  export function getMultiAgentConfig(features: AgentFeatures, projectId?: string | null): MultiAgentConfig {
56
118
  const agents = features.agents;
@@ -141,7 +203,7 @@ export interface ProviderModel {
141
203
  export interface Provider {
142
204
  id: string;
143
205
  name: string;
144
- type: "llm" | "integration" | "browser";
206
+ type: "llm" | "integration" | "browser" | "voice";
145
207
  docsUrl: string;
146
208
  description?: string;
147
209
  models: ProviderModel[];
@@ -149,7 +211,9 @@ export interface Provider {
149
211
  keyHint: string | null;
150
212
  isValid: boolean | null;
151
213
  configured?: boolean; // for backwards compatibility
152
- isLocal?: boolean; // Uses URL instead of API key (ollama)
214
+ isLocal?: boolean; // Uses URL instead of API key (ollama, local voice)
215
+ voiceSubtype?: "stt" | "tts" | "both"; // For voice providers
216
+ defaultBaseUrl?: string; // Default URL for local providers
153
217
  }
154
218
 
155
219
  export interface OnboardingStatus {
@@ -1,3 +0,0 @@
1
- import{U as A}from"./App.p7jjw1zf.js";import{$ as V,X as C,aa as L,ca as P,ja as S,ma as b}from"./App.94x6mh7f.js";var W=C(V(),1);var q=C(L(),1),x=new Set(["thread_activity","agent_started","agent_stopped","agent_error","task_created","task_updated","task_deleted","task_executed","llm_request","tool_invocation","mcp_request","mcp_tool_execution"]),j={CHAT:"bg-green-400",LLM:"bg-purple-400",TOOL:"bg-blue-400",TASK:"bg-yellow-400",MEMORY:"bg-cyan-400",MCP:"bg-orange-400",SYSTEM:"bg-gray-400",ERROR:"bg-red-400"};function m($,G){let U=$.data||{};switch($.type){case"thread_activity":return U.activity||"Working...";case"agent_started":return"Agent started";case"agent_stopped":return U.reason?`Agent stopped (${U.reason})`:"Agent stopped";case"agent_error":return $.error||"Agent error";case"llm_request":return"Thinking...";case"tool_invocation":{let Q=U.tool_name||"";if(!Q)return"Using tools";return`Tool: ${Q.replace(/[-_]/g," ").replace(/\b\w/g,(Z)=>Z.toUpperCase())}`}case"task_created":return U.title?`Task created: ${U.title}`:"Task created";case"task_updated":{let{status:Q,title:X}=U,Z=Q?Q.charAt(0).toUpperCase()+Q.slice(1):null;if(X&&Z)return`Task ${Z}: ${X}`;if(Z)return`Task ${Z}`;if(X)return`Task updated: ${X}`;return"Task updated"}case"task_deleted":return"Task deleted";case"task_executed":{let Q=U.title;return Q?`Task started: ${Q}`:"Task started"}case"memory_stored":return"Memory stored";case"memory_retrieved":return"Memory retrieved";case"mcp_request":return U.server?`MCP request to ${U.server}`:"MCP request";case"mcp_tool_execution":{let Q=U.tool_name||U.tool||"";if(!Q)return"MCP tool call";return`MCP: ${(Q.includes("__")?Q.split("__").slice(1).join("__"):Q).replace(/[-_]/g," ").replace(/\b\w/g,(H)=>H.toUpperCase())}`}default:return $.type.replace(/_/g," ")}}function l({agents:$,loading:G,onNavigate:U}){let{authFetch:Q}=S(),{currentProjectId:X}=b(),{events:Z,statusChangeCounter:H}=P(),[_,p]=W.useState([]),[R,I]=W.useState(""),[O]=W.useState(()=>new Set),y=W.useRef(!1),Y=W.useMemo(()=>{if(X===null)return $;if(X==="unassigned")return $.filter((z)=>!z.projectId);return $.filter((z)=>z.projectId===X)},[$,X]),N=W.useMemo(()=>new Set(Y.map((z)=>z.id)),[Y]),h=W.useMemo(()=>{let z=new Map;return Y.forEach((J)=>z.set(J.id,J.name)),z},[Y]),w=W.useCallback(async()=>{let z=X?`&project_id=${encodeURIComponent(X)}`:"";try{let J=await Q(`/api/telemetry/events?limit=200${z}`);if(J.ok){let B=await J.json();p(B.events||[])}}catch{}},[Q,X]);W.useEffect(()=>{w()},[w,H]),W.useEffect(()=>{if(_.length>0&&!y.current){for(let z of _)O.add(z.id);for(let z of Z)O.add(z.id);y.current=!0}},[_,Z,O]);let M=W.useMemo(()=>{let z=new Set,J=[],B=(K)=>{if(!x.has(K.type)||!N.has(K.agent_id)||K.data?.parent_id)return!1;if(K.type==="mcp_tool_execution"&&!K.duration_ms)return!1;return!0};for(let K of Z)if(!z.has(K.id)&&B(K))J.push(K),z.add(K.id);for(let K of _)if(!z.has(K.id)&&B(K))J.push(K),z.add(K.id);let k=J;if(R)k=k.filter((K)=>K.agent_id===R);return k.sort((K,F)=>new Date(F.timestamp).getTime()-new Date(K.timestamp).getTime()),k.slice(0,200)},[Z,_,N,R]),f=W.useMemo(()=>{let z=[],J="",B=new Date().toDateString(),k=new Date(Date.now()-86400000).toDateString();for(let K of M){let F=new Date(K.timestamp).toDateString(),T=F===B?"Today":F===k?"Yesterday":F;if(T!==J)J=T,z.push({label:T,events:[]});z[z.length-1].events.push(K)}return z},[M]);if(G)return q.jsxDEV("div",{className:"flex-1 flex items-center justify-center text-[var(--color-text-muted)]",children:"Loading..."},void 0,!1,void 0,this);let D=Y.filter((z)=>z.status==="running").length;return q.jsxDEV("div",{className:"flex-1 flex flex-col overflow-hidden",children:[q.jsxDEV("div",{className:"px-6 pt-6 pb-4 shrink-0",children:q.jsxDEV("div",{className:"flex items-center justify-between gap-4",children:[q.jsxDEV("div",{children:[q.jsxDEV("h1",{className:"text-xl font-semibold",children:"Activity"},void 0,!1,void 0,this),q.jsxDEV("p",{className:"text-sm text-[var(--color-text-muted)] mt-0.5",children:[D," of ",Y.length," agents running"]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),q.jsxDEV("div",{className:"w-48",children:q.jsxDEV(A,{value:R,onChange:I,placeholder:"All agents",options:[{value:"",label:"All agents"},...Y.map((z)=>({value:z.id,label:z.name}))]},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this),q.jsxDEV("div",{className:"flex-1 overflow-auto px-6 pb-6",children:M.length===0?q.jsxDEV("div",{className:"flex flex-col items-center justify-center py-20 text-[var(--color-text-faint)]",children:[q.jsxDEV("p",{className:"text-lg mb-2",children:"No activity yet"},void 0,!1,void 0,this),q.jsxDEV("p",{className:"text-sm",children:"Agent activity will appear here in real-time."},void 0,!1,void 0,this)]},void 0,!0,void 0,this):q.jsxDEV("div",{className:"max-w-2xl",children:f.map((z)=>q.jsxDEV("div",{children:[q.jsxDEV("div",{className:"sticky top-0 z-10 bg-[var(--color-bg)] backdrop-blur-sm py-2 mb-1",children:q.jsxDEV("span",{className:"text-xs font-semibold text-[var(--color-text-muted)] uppercase tracking-wider",children:z.label},void 0,!1,void 0,this)},void 0,!1,void 0,this),q.jsxDEV("div",{className:"relative ml-3 border-l border-[var(--color-border)]",children:z.events.map((J)=>{let B=!O.has(J.id);if(B)O.add(J.id);let k=h.get(J.agent_id)||J.agent_id.slice(0,8),K=J.level==="error"?"bg-red-400":j[J.category]||"bg-[var(--color-text-faint)]";return q.jsxDEV("div",{className:`relative pl-6 pr-3 py-2.5 hover:bg-[var(--color-surface-hover)] transition-colors ${B?"animate-slideIn":""}`,children:[q.jsxDEV("span",{className:`absolute left-[-4.5px] top-[14px] w-[9px] h-[9px] rounded-full ${K} ring-2 ring-[#0a0a0a]`},void 0,!1,void 0,this),q.jsxDEV("div",{className:"flex items-start justify-between gap-3",children:[q.jsxDEV("div",{className:"flex-1 min-w-0",children:[q.jsxDEV("p",{className:`text-sm ${J.level==="error"?"text-red-400":""}`,children:m(J,k)},void 0,!1,void 0,this),q.jsxDEV("div",{className:"flex items-center gap-2 text-[11px] text-[var(--color-text-faint)] mt-0.5",children:[q.jsxDEV("span",{className:"text-[var(--color-text-secondary)] font-medium",children:k},void 0,!1,void 0,this),q.jsxDEV("span",{className:"text-[var(--color-border-light)]",children:"·"},void 0,!1,void 0,this),q.jsxDEV("span",{className:"text-[var(--color-text-faint)]",children:J.category},void 0,!1,void 0,this),J.duration_ms!=null&&J.duration_ms>0&&q.jsxDEV(q.Fragment,{children:[q.jsxDEV("span",{className:"text-[var(--color-border-light)]",children:"·"},void 0,!1,void 0,this),q.jsxDEV("span",{children:J.duration_ms<1000?`${J.duration_ms}ms`:`${(J.duration_ms/1000).toFixed(1)}s`},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),q.jsxDEV("span",{className:"text-[11px] text-[var(--color-text-faint)] shrink-0 pt-0.5",children:g(J.timestamp)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},J.id,!0,void 0,this)})},void 0,!1,void 0,this)]},z.label,!0,void 0,this))},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}function g($){let G=Math.floor((Date.now()-new Date($).getTime())/1000);if(G<5)return"just now";if(G<60)return`${G}s ago`;let U=Math.floor(G/60);if(U<60)return`${U}m ago`;let Q=Math.floor(U/60);if(Q<24)return`${Q}h ago`;return`${Math.floor(Q/24)}d ago`}export{l as ActivityPage};
2
-
3
- //# debugId=D584AFE9ED97069764756E2164756E21
@@ -1,4 +0,0 @@
1
- import{$ as E,X as y,aa as D,ja as l}from"./App.94x6mh7f.js";var M=y(E(),1);var z=y(D(),1),V={get:"#61affe",post:"#49cc90",put:"#fca130",delete:"#f93e3e",patch:"#50e3c2"};function c({method:I,path:A,parameters:F,requestBody:L,authFetch:T}){let[U,R]=M.useState({}),[G,O]=M.useState(""),[_,k]=M.useState(null),[w,q]=M.useState(!1),[B,f]=M.useState(null);M.useEffect(()=>{if(L?.content?.["application/json"]?.schema){let W=L.content["application/json"].schema;if(W.example)O(JSON.stringify(W.example,null,2));else if(W.properties){let $={};for(let[N,Q]of Object.entries(W.properties))if(Q.example!==void 0)$[N]=Q.example;else if(Q.type==="string")$[N]="";else if(Q.type==="number"||Q.type==="integer")$[N]=0;else if(Q.type==="boolean")$[N]=!1;else if(Q.type==="array")$[N]=[];else if(Q.type==="object")$[N]={};O(JSON.stringify($,null,2))}}},[L]);let C=async()=>{q(!0),f(null),k(null);try{let W=A,$=[];for(let Z of F||[]){let H=U[Z.name]||"";if(Z.in==="path")W=W.replace(`{${Z.name}}`,encodeURIComponent(H));else if(Z.in==="query"&&H)$.push(`${Z.name}=${encodeURIComponent(H)}`)}if($.length>0)W+=`?${$.join("&")}`;let N={method:I.toUpperCase()};if(G&&["post","put","patch"].includes(I))N.headers={"Content-Type":"application/json"},N.body=G;let Q=await T(`/api${W}`,N),X;if(Q.headers.get("content-type")?.includes("application/json"))X=await Q.json();else X=await Q.text();k({status:Q.status,data:X})}catch(W){f(W.message||"Request failed")}finally{q(!1)}},b=F?.filter((W)=>W.in==="path")||[],K=F?.filter((W)=>W.in==="query")||[],S=["post","put","patch"].includes(I)&&L;return z.jsxDEV("div",{style:{marginTop:16,padding:16,background:"var(--color-bg)",borderRadius:6,border:"1px solid var(--color-border-light)"},children:[z.jsxDEV("h4",{style:{fontSize:13,color:"var(--color-accent)",marginBottom:12,fontWeight:600},children:"Try it out"},void 0,!1,void 0,this),b.length>0&&z.jsxDEV("div",{style:{marginBottom:12},children:[z.jsxDEV("div",{style:{fontSize:11,color:"var(--color-text-muted)",marginBottom:6},children:"Path Parameters"},void 0,!1,void 0,this),b.map((W)=>z.jsxDEV("div",{style:{marginBottom:8},children:[z.jsxDEV("label",{style:{fontSize:12,color:"var(--color-text-secondary)",display:"block",marginBottom:4},children:[W.name," ",W.required&&z.jsxDEV("span",{style:{color:"#f66"},children:"*"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),z.jsxDEV("input",{type:"text",value:U[W.name]||"",onChange:($)=>R({...U,[W.name]:$.target.value}),placeholder:W.schema?.type||"string",style:{width:"100%",padding:"8px 12px",background:"var(--color-surface)",border:"1px solid var(--color-border-light)",borderRadius:4,color:"var(--color-text)",fontSize:13,fontFamily:"monospace"}},void 0,!1,void 0,this)]},W.name,!0,void 0,this))]},void 0,!0,void 0,this),K.length>0&&z.jsxDEV("div",{style:{marginBottom:12},children:[z.jsxDEV("div",{style:{fontSize:11,color:"var(--color-text-muted)",marginBottom:6},children:"Query Parameters"},void 0,!1,void 0,this),K.map((W)=>z.jsxDEV("div",{style:{marginBottom:8},children:[z.jsxDEV("label",{style:{fontSize:12,color:"var(--color-text-secondary)",display:"block",marginBottom:4},children:[W.name," ",W.required&&z.jsxDEV("span",{style:{color:"#f66"},children:"*"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),z.jsxDEV("input",{type:"text",value:U[W.name]||"",onChange:($)=>R({...U,[W.name]:$.target.value}),placeholder:W.schema?.type||"string",style:{width:"100%",padding:"8px 12px",background:"var(--color-surface)",border:"1px solid var(--color-border-light)",borderRadius:4,color:"var(--color-text)",fontSize:13,fontFamily:"monospace"}},void 0,!1,void 0,this)]},W.name,!0,void 0,this))]},void 0,!0,void 0,this),S&&z.jsxDEV("div",{style:{marginBottom:12},children:[z.jsxDEV("div",{style:{fontSize:11,color:"var(--color-text-muted)",marginBottom:6},children:"Request Body (JSON)"},void 0,!1,void 0,this),z.jsxDEV("textarea",{value:G,onChange:(W)=>O(W.target.value),rows:6,style:{width:"100%",padding:"8px 12px",background:"var(--color-surface)",border:"1px solid var(--color-border-light)",borderRadius:4,color:"var(--color-text)",fontSize:12,fontFamily:"monospace",resize:"vertical"}},void 0,!1,void 0,this)]},void 0,!0,void 0,this),z.jsxDEV("button",{onClick:C,disabled:w,style:{padding:"10px 20px",background:w?"var(--color-border-light)":"var(--color-accent)",color:w?"var(--color-text-muted)":"#000",border:"none",borderRadius:4,cursor:w?"not-allowed":"pointer",fontSize:13,fontWeight:600},children:w?"Executing...":"Execute"},void 0,!1,void 0,this),B&&z.jsxDEV("div",{style:{marginTop:12,padding:12,background:"#2a1515",borderRadius:4,color:"#f66",fontSize:12},children:B},void 0,!1,void 0,this),_&&z.jsxDEV("div",{style:{marginTop:12},children:[z.jsxDEV("div",{style:{fontSize:11,color:"var(--color-text-muted)",marginBottom:6},children:["Response"," ",z.jsxDEV("span",{style:{color:_.status>=200&&_.status<300?"#49cc90":"#f66"},children:_.status},void 0,!1,void 0,this)]},void 0,!0,void 0,this),z.jsxDEV("pre",{style:{padding:12,background:"var(--color-surface)",borderRadius:4,color:"var(--color-text-secondary)",fontSize:11,fontFamily:"monospace",overflow:"auto",maxHeight:300,whiteSpace:"pre-wrap",wordBreak:"break-word"},children:typeof _.data==="string"?_.data:JSON.stringify(_.data,null,2)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}function h(){let{authFetch:I}=l(),[A,F]=M.useState(null),[L,T]=M.useState(!0),[U,R]=M.useState(new Set),[G,O]=M.useState(null),[_,k]=M.useState(!1);M.useEffect(()=>{B()},[]);async function w(){if(!A)return;try{await navigator.clipboard.writeText(JSON.stringify(A,null,2)),k(!0),setTimeout(()=>k(!1),2000)}catch(N){console.error("Failed to copy:",N)}}function q(){if(!A)return;let N=new Blob([JSON.stringify(A,null,2)],{type:"application/json"}),Q=URL.createObjectURL(N),X=document.createElement("a");X.href=Q,X.download="apteva-openapi.json",X.click(),URL.revokeObjectURL(Q)}async function B(){try{let N=await I("/api/openapi");if(N.ok){let Q=await N.json();F(Q)}}catch(N){console.error("Failed to load OpenAPI spec:",N)}finally{T(!1)}}function f(N){R((Q)=>{let X=new Set(Q);if(X.has(N))X.delete(N);else X.add(N);return X})}function C(N,Q=0){if(!N)return"{}";if(Q>2)return"...";if(N.$ref)return N.$ref.split("/").pop()||"Object";if(N.type==="array")return`${C(N.items,Q+1)}[]`;if(N.type==="object"&&N.properties){let X=Object.entries(N.properties).slice(0,3).map(([Z,H])=>`${Z}: ${H.type||"any"}`).join(", "),Y=Object.keys(N.properties).length>3?", ...":"";return`{ ${X}${Y} }`}return N.type||"any"}if(L)return z.jsxDEV("div",{style:{padding:24},children:z.jsxDEV("p",{style:{color:"var(--color-text-secondary)"},children:"Loading API documentation..."},void 0,!1,void 0,this)},void 0,!1,void 0,this);if(!A)return z.jsxDEV("div",{style:{padding:24},children:z.jsxDEV("p",{style:{color:"#f66"},children:"Failed to load API documentation"},void 0,!1,void 0,this)},void 0,!1,void 0,this);let b=A.tags||[],K=Object.entries(A.paths);function S(N){let Q=new Set;function X(Y){if(!Y)return;if(typeof Y==="object"){if(Y.$ref){let Z=Y.$ref.split("/").pop();if(Z)Q.add(Z)}for(let Z of Object.values(Y))X(Z)}}return X(N.requestBody),X(N.responses),Q}function W(){if(!G||!A.components?.schemas)return Object.keys(A.components?.schemas||{});let N=new Set;for(let[Q,X]of $)for(let[Y,Z]of Object.entries(X)){if(!["get","post","put","delete","patch"].includes(Y))continue;if(Z.tags?.includes(G))S(Z).forEach((g)=>N.add(g))}return Array.from(N)}let $=G?K.filter(([N,Q])=>Object.values(Q).some((X)=>X.tags?.includes(G))):K;return z.jsxDEV("div",{style:{padding:24,maxWidth:1000,height:"100%",overflowY:"auto"},children:[z.jsxDEV("div",{style:{marginBottom:24},children:[z.jsxDEV("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"flex-start",marginBottom:8},children:[z.jsxDEV("h1",{style:{fontSize:24,fontWeight:600},children:A.info.title},void 0,!1,void 0,this),z.jsxDEV("div",{style:{display:"flex",gap:8},children:[z.jsxDEV("button",{onClick:w,style:{padding:"8px 16px",borderRadius:4,border:"1px solid var(--color-border-light)",background:_?"#49cc90":"var(--color-surface-raised)",color:_?"#000":"var(--color-text)",cursor:"pointer",fontSize:12,fontFamily:"inherit"},children:_?"Copied!":"Copy JSON"},void 0,!1,void 0,this),z.jsxDEV("button",{onClick:q,style:{padding:"8px 16px",borderRadius:4,border:"1px solid var(--color-border-light)",background:"var(--color-surface-raised)",color:"var(--color-text)",cursor:"pointer",fontSize:12,fontFamily:"inherit"},children:"Download"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),z.jsxDEV("p",{style:{color:"var(--color-text-secondary)",marginBottom:8},children:A.info.description.split(`
2
- `)[0]},void 0,!1,void 0,this),z.jsxDEV("p",{style:{color:"var(--color-text-muted)",fontSize:12},children:["Version: ",A.info.version]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),z.jsxDEV("div",{style:{background:"var(--color-surface-raised)",padding:12,borderRadius:6,marginBottom:24,fontFamily:"monospace"},children:[z.jsxDEV("span",{style:{color:"var(--color-text-secondary)"},children:"Base URL: "},void 0,!1,void 0,this),z.jsxDEV("span",{style:{color:"#61affe"},children:[window.location.origin,"/api"]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),z.jsxDEV("div",{style:{marginBottom:24,display:"flex",flexWrap:"wrap",gap:8},children:[z.jsxDEV("button",{onClick:()=>O(null),style:{padding:"6px 12px",borderRadius:4,border:"1px solid var(--color-border-light)",background:G===null?"var(--color-border-light)":"transparent",color:G===null?"var(--color-text)":"var(--color-text-secondary)",cursor:"pointer",fontSize:12},children:"All"},void 0,!1,void 0,this),b.map((N)=>z.jsxDEV("button",{onClick:()=>O(N.name),style:{padding:"6px 12px",borderRadius:4,border:"1px solid var(--color-border-light)",background:G===N.name?"var(--color-border-light)":"transparent",color:G===N.name?"var(--color-text)":"var(--color-text-secondary)",cursor:"pointer",fontSize:12},title:N.description,children:N.name},N.name,!1,void 0,this))]},void 0,!0,void 0,this),z.jsxDEV("div",{style:{display:"flex",flexDirection:"column",gap:8},children:$.map(([N,Q])=>Object.entries(Q).filter(([X])=>["get","post","put","delete","patch"].includes(X)).map(([X,Y])=>{let Z=`${X}:${N}`,H=U.has(Z),g=X.toUpperCase(),j=V[X]||"var(--color-text-secondary)";return z.jsxDEV("div",{style:{border:"1px solid var(--color-border-light)",borderRadius:6,overflow:"hidden"},children:[z.jsxDEV("div",{onClick:()=>f(Z),style:{display:"flex",alignItems:"center",gap:12,padding:"12px 16px",background:H?"var(--color-surface-raised)":"transparent",cursor:"pointer"},children:[z.jsxDEV("span",{style:{background:j,color:"#000",padding:"4px 8px",borderRadius:4,fontSize:11,fontWeight:600,minWidth:60,textAlign:"center"},children:g},void 0,!1,void 0,this),z.jsxDEV("span",{style:{fontFamily:"monospace",color:"var(--color-text)"},children:N},void 0,!1,void 0,this),z.jsxDEV("span",{style:{color:"var(--color-text-secondary)",flex:1,fontSize:13},children:Y.summary},void 0,!1,void 0,this),z.jsxDEV("span",{style:{color:"var(--color-text-muted)",fontSize:12},children:H?"[-]":"[+]"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),H&&z.jsxDEV("div",{style:{padding:16,background:"var(--color-bg)",borderTop:"1px solid var(--color-border-light)"},children:[Y.description&&z.jsxDEV("p",{style:{color:"var(--color-text-secondary)",marginBottom:16,fontSize:13},children:Y.description},void 0,!1,void 0,this),Y.parameters&&Y.parameters.length>0&&z.jsxDEV("div",{style:{marginBottom:16},children:[z.jsxDEV("h4",{style:{fontSize:13,color:"var(--color-text-secondary)",marginBottom:8},children:"Parameters"},void 0,!1,void 0,this),z.jsxDEV("div",{style:{background:"var(--color-surface-raised)",borderRadius:4,padding:12},children:Y.parameters.map((J)=>z.jsxDEV("div",{style:{display:"flex",gap:12,marginBottom:8,fontSize:12},children:[z.jsxDEV("span",{style:{color:"#61affe",minWidth:100},children:[J.name,J.required&&z.jsxDEV("span",{style:{color:"#f66"},children:"*"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),z.jsxDEV("span",{style:{color:"var(--color-text-muted)"},children:["(",J.in,")"]},void 0,!0,void 0,this),z.jsxDEV("span",{style:{color:"var(--color-text-secondary)"},children:J.schema?.type||"string"},void 0,!1,void 0,this),J.description&&z.jsxDEV("span",{style:{color:"var(--color-text-muted)"},children:["- ",J.description]},void 0,!0,void 0,this)]},J.name,!0,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this),Y.requestBody&&z.jsxDEV("div",{style:{marginBottom:16},children:[z.jsxDEV("h4",{style:{fontSize:13,color:"var(--color-text-secondary)",marginBottom:8},children:["Request Body",Y.requestBody.required&&z.jsxDEV("span",{style:{color:"#f66"},children:" (required)"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),z.jsxDEV("div",{style:{background:"var(--color-surface-raised)",borderRadius:4,padding:12,fontFamily:"monospace",fontSize:12,color:"#49cc90"},children:Object.entries(Y.requestBody.content||{}).map(([J,P])=>z.jsxDEV("div",{children:[z.jsxDEV("span",{style:{color:"var(--color-text-muted)"},children:[J,": "]},void 0,!0,void 0,this),C(P.schema)]},J,!0,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this),Y.responses&&z.jsxDEV("div",{children:[z.jsxDEV("h4",{style:{fontSize:13,color:"var(--color-text-secondary)",marginBottom:8},children:"Responses"},void 0,!1,void 0,this),z.jsxDEV("div",{style:{background:"var(--color-surface-raised)",borderRadius:4,padding:12},children:Object.entries(Y.responses).map(([J,P])=>{let v=P.content?.["application/json"]?.schema,u=v?.$ref?.split("/").pop(),n=v?.type,i=v?.items?.$ref?.split("/").pop();return z.jsxDEV("div",{style:{marginBottom:12,fontSize:12},children:[z.jsxDEV("div",{style:{display:"flex",gap:12,marginBottom:4},children:[z.jsxDEV("span",{style:{color:J.startsWith("2")?"#49cc90":"#f66",minWidth:40},children:J},void 0,!1,void 0,this),z.jsxDEV("span",{style:{color:"var(--color-text-secondary)"},children:P.description},void 0,!1,void 0,this)]},void 0,!0,void 0,this),v&&z.jsxDEV("div",{style:{marginLeft:52,padding:"8px 12px",background:"var(--color-bg)",borderRadius:4,fontFamily:"monospace"},children:u?z.jsxDEV("span",{style:{color:"#61affe"},children:u},void 0,!1,void 0,this):n==="array"&&i?z.jsxDEV("span",{style:{color:"#61affe"},children:[i,"[]"]},void 0,!0,void 0,this):n==="array"?z.jsxDEV("span",{style:{color:"var(--color-text-secondary)"},children:"array"},void 0,!1,void 0,this):z.jsxDEV("span",{style:{color:"var(--color-text-secondary)"},children:C(v)},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},J,!0,void 0,this)})},void 0,!1,void 0,this)]},void 0,!0,void 0,this),z.jsxDEV(c,{method:X,path:N,parameters:Y.parameters,requestBody:Y.requestBody,authFetch:I},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},Z,!0,void 0,this)}))},void 0,!1,void 0,this),A.components?.schemas&&W().length>0&&z.jsxDEV("div",{style:{marginTop:32},children:[z.jsxDEV("h2",{style:{fontSize:18,fontWeight:600,marginBottom:16},children:["Schemas ",G&&z.jsxDEV("span",{style:{color:"var(--color-text-muted)",fontSize:14},children:["(",G,")"]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),z.jsxDEV("div",{style:{display:"flex",flexDirection:"column",gap:8},children:W().map((N)=>{let Q=A.components.schemas[N];if(!Q)return null;return z.jsxDEV("div",{style:{border:"1px solid var(--color-border-light)",borderRadius:6,padding:12},children:[z.jsxDEV("h3",{style:{fontSize:14,color:"#61affe",marginBottom:8},children:N},void 0,!1,void 0,this),Q.properties&&z.jsxDEV("div",{style:{fontSize:12},children:Object.entries(Q.properties).map(([X,Y])=>z.jsxDEV("div",{style:{display:"flex",gap:8,marginBottom:4,fontFamily:"monospace"},children:[z.jsxDEV("span",{style:{color:"var(--color-text)",minWidth:120},children:X},void 0,!1,void 0,this),z.jsxDEV("span",{style:{color:"var(--color-text-secondary)"},children:[Y.type||(Y.$ref?Y.$ref.split("/").pop():"any"),Y.nullable&&" | null"]},void 0,!0,void 0,this),Y.enum&&z.jsxDEV("span",{style:{color:"var(--color-text-muted)"},children:["[",Y.enum.join(" | "),"]"]},void 0,!0,void 0,this)]},X,!0,void 0,this))},void 0,!1,void 0,this)]},N,!0,void 0,this)})},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}export{h as ApiDocsPage};
3
-
4
- //# debugId=59EEC8715E10AB6E64756E2164756E21