@qontinui/navigation 0.1.1
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/LICENSE +661 -0
- package/README.md +179 -0
- package/dist/index.cjs +1365 -0
- package/dist/index.d.cts +417 -0
- package/dist/index.d.ts +417 -0
- package/dist/index.js +1276 -0
- package/package.json +60 -0
package/dist/index.js
ADDED
|
@@ -0,0 +1,1276 @@
|
|
|
1
|
+
// src/groups.ts
|
|
2
|
+
var TOP_LEVEL_ITEMS = [
|
|
3
|
+
{
|
|
4
|
+
id: "visual-dashboard",
|
|
5
|
+
label: "Dashboard",
|
|
6
|
+
icon: "LayoutDashboard",
|
|
7
|
+
description: "Visual automation dashboard",
|
|
8
|
+
route: "/tools/visual-automation",
|
|
9
|
+
color: "#10B981",
|
|
10
|
+
productMode: "visual"
|
|
11
|
+
}
|
|
12
|
+
];
|
|
13
|
+
var TOP_LEVEL_GROUP = {
|
|
14
|
+
id: "top-level",
|
|
15
|
+
label: "",
|
|
16
|
+
items: TOP_LEVEL_ITEMS,
|
|
17
|
+
defaultExpanded: true
|
|
18
|
+
};
|
|
19
|
+
var RUN_ITEMS = [
|
|
20
|
+
{
|
|
21
|
+
id: "prompt-home",
|
|
22
|
+
label: "Home",
|
|
23
|
+
icon: "Sparkles",
|
|
24
|
+
description: "Tell the runner what to do in plain English",
|
|
25
|
+
route: "/prompt-home",
|
|
26
|
+
color: "#8B5CF6",
|
|
27
|
+
productMode: "ai"
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
id: "gui-automation",
|
|
31
|
+
label: "Execute",
|
|
32
|
+
icon: "Play",
|
|
33
|
+
description: "Run and schedule workflows",
|
|
34
|
+
route: "/execute",
|
|
35
|
+
color: "#10B981",
|
|
36
|
+
productMode: "visual"
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
id: "active",
|
|
40
|
+
label: "Active",
|
|
41
|
+
icon: "Activity",
|
|
42
|
+
description: "Monitor active executions",
|
|
43
|
+
route: "/runs/active",
|
|
44
|
+
color: "#4A90D9",
|
|
45
|
+
productMode: "ai"
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
id: "terminal",
|
|
49
|
+
label: "Terminal",
|
|
50
|
+
icon: "Terminal",
|
|
51
|
+
description: "Terminal, Claude Code sessions, and workflow generation",
|
|
52
|
+
route: "/terminal",
|
|
53
|
+
color: "#9CA3AF",
|
|
54
|
+
productMode: "ai",
|
|
55
|
+
platforms: ["runner"]
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
id: "orchestration-loop",
|
|
59
|
+
label: "Orchestration",
|
|
60
|
+
icon: "Repeat",
|
|
61
|
+
description: "Iterative workflow loop with pipeline mode (build/reflect/fix)",
|
|
62
|
+
route: "/orchestration-loop",
|
|
63
|
+
color: "#8B5CF6",
|
|
64
|
+
platforms: ["runner"]
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
id: "productivity",
|
|
68
|
+
label: "Productivity",
|
|
69
|
+
icon: "ClipboardList",
|
|
70
|
+
description: "Plan/task board, coordinator dashboard, and knowledge browser",
|
|
71
|
+
route: "/productivity",
|
|
72
|
+
color: "#F59E0B",
|
|
73
|
+
platforms: ["runner"]
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
id: "wrappers",
|
|
77
|
+
label: "Wrappers",
|
|
78
|
+
icon: "Package",
|
|
79
|
+
description: "Wrapper configurations and manifest management",
|
|
80
|
+
route: "/wrappers",
|
|
81
|
+
color: "#F59E0B",
|
|
82
|
+
platforms: ["runner"]
|
|
83
|
+
}
|
|
84
|
+
];
|
|
85
|
+
var RUN_GROUP = {
|
|
86
|
+
id: "run",
|
|
87
|
+
label: "RUN",
|
|
88
|
+
items: RUN_ITEMS,
|
|
89
|
+
defaultExpanded: true
|
|
90
|
+
};
|
|
91
|
+
var SESSION_ITEMS = [
|
|
92
|
+
{
|
|
93
|
+
id: "run-recap",
|
|
94
|
+
label: "Summary",
|
|
95
|
+
icon: "ClipboardCheck",
|
|
96
|
+
description: "Overview, AI summary, and run details",
|
|
97
|
+
route: "/runs/summary",
|
|
98
|
+
color: "#4A90D9"
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
id: "run-actions",
|
|
102
|
+
label: "Actions",
|
|
103
|
+
icon: "Zap",
|
|
104
|
+
description: "Action execution log",
|
|
105
|
+
route: "/runs/actions",
|
|
106
|
+
color: "#4A90D9"
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
id: "run-image",
|
|
110
|
+
label: "Image Recognition",
|
|
111
|
+
icon: "Image",
|
|
112
|
+
description: "Visual recognition results",
|
|
113
|
+
route: "/runs/image-recognition",
|
|
114
|
+
color: "#4A90D9"
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
id: "run-findings",
|
|
118
|
+
label: "Findings",
|
|
119
|
+
icon: "FileText",
|
|
120
|
+
description: "Detected findings and issues",
|
|
121
|
+
route: "/runs/findings",
|
|
122
|
+
color: "#4A90D9"
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
id: "run-state-explorer",
|
|
126
|
+
label: "State Explorer",
|
|
127
|
+
icon: "FileSearch",
|
|
128
|
+
description: "State exploration results",
|
|
129
|
+
route: "/runs/state-exploration",
|
|
130
|
+
color: "#4A90D9"
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
id: "run-tests",
|
|
134
|
+
label: "Test Results",
|
|
135
|
+
icon: "TestTube",
|
|
136
|
+
description: "Playwright test results",
|
|
137
|
+
route: "/runs/test-results",
|
|
138
|
+
color: "#4A90D9"
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
id: "run-ai-output",
|
|
142
|
+
label: "AI Output",
|
|
143
|
+
icon: "Bot",
|
|
144
|
+
description: "AI conversation and responses",
|
|
145
|
+
route: "/runs/ai-output",
|
|
146
|
+
color: "#4A90D9"
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
id: "run-statistics",
|
|
150
|
+
label: "Statistics",
|
|
151
|
+
icon: "BarChart3",
|
|
152
|
+
description: "Performance metrics",
|
|
153
|
+
route: "/runs/statistics",
|
|
154
|
+
color: "#4A90D9"
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
id: "run-ai-data",
|
|
158
|
+
label: "AI Data View",
|
|
159
|
+
icon: "Database",
|
|
160
|
+
description: "Structured AI data",
|
|
161
|
+
route: "/runs/ai-data",
|
|
162
|
+
color: "#4A90D9"
|
|
163
|
+
}
|
|
164
|
+
];
|
|
165
|
+
var RUNS_ITEMS = [
|
|
166
|
+
{
|
|
167
|
+
id: "runs-history",
|
|
168
|
+
label: "History",
|
|
169
|
+
icon: "History",
|
|
170
|
+
description: "Run history browser",
|
|
171
|
+
route: "/runs",
|
|
172
|
+
color: "#4A90D9",
|
|
173
|
+
platforms: ["web"]
|
|
174
|
+
}
|
|
175
|
+
];
|
|
176
|
+
var OBSERVE_ITEMS = [
|
|
177
|
+
{
|
|
178
|
+
id: "runs",
|
|
179
|
+
label: "Runs",
|
|
180
|
+
icon: "History",
|
|
181
|
+
description: "Browse and manage all runs",
|
|
182
|
+
hasChildren: true,
|
|
183
|
+
selectsFirstChild: false,
|
|
184
|
+
route: "/runs",
|
|
185
|
+
color: "#4A90D9",
|
|
186
|
+
productMode: "ai"
|
|
187
|
+
},
|
|
188
|
+
{
|
|
189
|
+
id: "run-findings",
|
|
190
|
+
label: "Findings",
|
|
191
|
+
icon: "FileText",
|
|
192
|
+
description: "Review findings and HITL questions across runs",
|
|
193
|
+
route: "/runs/findings",
|
|
194
|
+
color: "#4A90D9",
|
|
195
|
+
productMode: "ai"
|
|
196
|
+
},
|
|
197
|
+
{
|
|
198
|
+
id: "error-monitor",
|
|
199
|
+
label: "Error Monitor",
|
|
200
|
+
icon: "AlertCircle",
|
|
201
|
+
description: "Monitor and fix application errors from log sources",
|
|
202
|
+
route: "/tools/error-monitor",
|
|
203
|
+
color: "#4A90D9",
|
|
204
|
+
productMode: "ai"
|
|
205
|
+
},
|
|
206
|
+
{
|
|
207
|
+
id: "processes",
|
|
208
|
+
label: "Processes",
|
|
209
|
+
icon: "Cpu",
|
|
210
|
+
description: "Manage and monitor spawned child processes",
|
|
211
|
+
color: "#06B6D4",
|
|
212
|
+
productMode: "ai"
|
|
213
|
+
},
|
|
214
|
+
{
|
|
215
|
+
id: "activity-timeline",
|
|
216
|
+
label: "Activity Timeline",
|
|
217
|
+
icon: "Activity",
|
|
218
|
+
description: "Searchable capture history \u2014 everything seen on screen during automation",
|
|
219
|
+
route: "/observe/activity-timeline",
|
|
220
|
+
color: "#06B6D4",
|
|
221
|
+
platforms: ["runner"]
|
|
222
|
+
},
|
|
223
|
+
{
|
|
224
|
+
id: "automation-health",
|
|
225
|
+
label: "Automation Health",
|
|
226
|
+
icon: "Activity",
|
|
227
|
+
description: "UI Bridge automation quality, selector reliability, and improvement recommendations",
|
|
228
|
+
color: "#10B981",
|
|
229
|
+
platforms: ["runner"],
|
|
230
|
+
productMode: "ai"
|
|
231
|
+
},
|
|
232
|
+
{
|
|
233
|
+
id: "llm-analytics",
|
|
234
|
+
label: "LLM Analytics",
|
|
235
|
+
icon: "CreditCard",
|
|
236
|
+
description: "Token usage, cost breakdown, and provider latency analytics",
|
|
237
|
+
color: "#D97706",
|
|
238
|
+
platforms: ["runner"],
|
|
239
|
+
productMode: "ai"
|
|
240
|
+
},
|
|
241
|
+
{
|
|
242
|
+
id: "cost-control",
|
|
243
|
+
label: "Cost Control",
|
|
244
|
+
icon: "ShieldAlert",
|
|
245
|
+
description: "Real-time budget tracking, circuit breakers, and cost anomaly detection",
|
|
246
|
+
color: "#EF4444",
|
|
247
|
+
platforms: ["runner"],
|
|
248
|
+
productMode: "ai"
|
|
249
|
+
}
|
|
250
|
+
];
|
|
251
|
+
var OBSERVE_GROUP = {
|
|
252
|
+
id: "observe",
|
|
253
|
+
label: "OBSERVE",
|
|
254
|
+
items: OBSERVE_ITEMS,
|
|
255
|
+
defaultExpanded: false
|
|
256
|
+
};
|
|
257
|
+
var LEARN_ITEMS = [
|
|
258
|
+
{
|
|
259
|
+
id: "memory",
|
|
260
|
+
label: "Memory",
|
|
261
|
+
icon: "Brain",
|
|
262
|
+
description: "Cross-session observation memory from past runs",
|
|
263
|
+
route: "/observe/memory",
|
|
264
|
+
color: "#8B5CF6",
|
|
265
|
+
productMode: "ai"
|
|
266
|
+
},
|
|
267
|
+
{
|
|
268
|
+
id: "knowledge-explorer",
|
|
269
|
+
label: "Knowledge",
|
|
270
|
+
icon: "Globe",
|
|
271
|
+
description: "Search external knowledge sources and view acquisition stats \u2014 web search, vulnerability intelligence, API docs",
|
|
272
|
+
route: "/observe/knowledge",
|
|
273
|
+
color: "#F97316",
|
|
274
|
+
platforms: ["runner"],
|
|
275
|
+
productMode: "ai"
|
|
276
|
+
},
|
|
277
|
+
{
|
|
278
|
+
id: "decision-trail",
|
|
279
|
+
label: "Decision Trail",
|
|
280
|
+
icon: "ListChecks",
|
|
281
|
+
description: "Architectural decision history \u2014 what was decided, why, and what alternatives were considered",
|
|
282
|
+
route: "/observe/decision-trail",
|
|
283
|
+
color: "#8B5CF6",
|
|
284
|
+
productMode: "ai",
|
|
285
|
+
platforms: ["runner"]
|
|
286
|
+
},
|
|
287
|
+
{
|
|
288
|
+
id: "session-recap",
|
|
289
|
+
label: "Session Recap",
|
|
290
|
+
icon: "GitBranch",
|
|
291
|
+
description: "Semantic dependency map of what was built \u2014 files, types, endpoints, and how they connect",
|
|
292
|
+
route: "/observe/session-recap",
|
|
293
|
+
color: "#8B5CF6",
|
|
294
|
+
platforms: ["runner"],
|
|
295
|
+
productMode: "ai"
|
|
296
|
+
},
|
|
297
|
+
{
|
|
298
|
+
id: "reflection",
|
|
299
|
+
label: "Reflection",
|
|
300
|
+
icon: "RotateCcw",
|
|
301
|
+
description: "Reflection fix effectiveness and history",
|
|
302
|
+
productMode: "ai"
|
|
303
|
+
},
|
|
304
|
+
{
|
|
305
|
+
id: "architecture",
|
|
306
|
+
label: "Architecture",
|
|
307
|
+
icon: "GitBranch",
|
|
308
|
+
description: "Component dependency graph and SDK project architecture",
|
|
309
|
+
productMode: "ai"
|
|
310
|
+
},
|
|
311
|
+
{
|
|
312
|
+
id: "api-surface",
|
|
313
|
+
label: "API Surface",
|
|
314
|
+
icon: "Network",
|
|
315
|
+
description: "Interactive map of every endpoint, command, query, and their connections",
|
|
316
|
+
color: "#06B6D4",
|
|
317
|
+
platforms: ["runner"]
|
|
318
|
+
},
|
|
319
|
+
{
|
|
320
|
+
id: "development-intelligence",
|
|
321
|
+
label: "Dev Intelligence",
|
|
322
|
+
icon: "Brain",
|
|
323
|
+
description: "Coverage gap analysis, complexity scoring, drift detection, and dead feature identification",
|
|
324
|
+
route: "/observe/development-intelligence",
|
|
325
|
+
color: "#8B5CF6",
|
|
326
|
+
platforms: ["runner"],
|
|
327
|
+
productMode: "ai"
|
|
328
|
+
},
|
|
329
|
+
{
|
|
330
|
+
id: "project-explainer",
|
|
331
|
+
label: "Explainer",
|
|
332
|
+
icon: "BookOpen",
|
|
333
|
+
description: "Hierarchical explainer for any project: overview, per-cluster narratives, and per-page deep dives with embedded architecture diagrams. AI side panel for asking questions while reading.",
|
|
334
|
+
route: "/observe/explainer",
|
|
335
|
+
color: "#06B6D4",
|
|
336
|
+
platforms: ["runner"]
|
|
337
|
+
}
|
|
338
|
+
];
|
|
339
|
+
var LEARN_GROUP = {
|
|
340
|
+
id: "learn",
|
|
341
|
+
label: "LEARN",
|
|
342
|
+
items: LEARN_ITEMS,
|
|
343
|
+
defaultExpanded: false
|
|
344
|
+
};
|
|
345
|
+
var BUILD_ITEMS = [
|
|
346
|
+
{
|
|
347
|
+
id: "unified-workflow-builder",
|
|
348
|
+
label: "Workflows",
|
|
349
|
+
icon: "Sparkles",
|
|
350
|
+
description: "Build phase-based automation workflows",
|
|
351
|
+
route: "/build/workflows",
|
|
352
|
+
color: "var(--brand-secondary)",
|
|
353
|
+
productMode: "ai"
|
|
354
|
+
},
|
|
355
|
+
{
|
|
356
|
+
id: "dag-workflow-editor",
|
|
357
|
+
label: "DAG Editor",
|
|
358
|
+
icon: "GitBranch",
|
|
359
|
+
description: "Visual DAG workflow editor with YAML syntax and graph visualization",
|
|
360
|
+
route: "/build/dag-editor",
|
|
361
|
+
color: "#6366f1",
|
|
362
|
+
platforms: ["runner"],
|
|
363
|
+
productMode: "ai"
|
|
364
|
+
},
|
|
365
|
+
{
|
|
366
|
+
id: "step-builders",
|
|
367
|
+
label: "Step Builders",
|
|
368
|
+
icon: "Layers",
|
|
369
|
+
description: "Build and browse step templates",
|
|
370
|
+
route: "/build/templates",
|
|
371
|
+
color: "var(--brand-secondary)",
|
|
372
|
+
productMode: "ai"
|
|
373
|
+
},
|
|
374
|
+
{
|
|
375
|
+
id: "library",
|
|
376
|
+
label: "Library",
|
|
377
|
+
icon: "BookOpen",
|
|
378
|
+
description: "Browse saved automation assets",
|
|
379
|
+
route: "/library",
|
|
380
|
+
color: "var(--brand-secondary)",
|
|
381
|
+
productMode: "ai"
|
|
382
|
+
},
|
|
383
|
+
{
|
|
384
|
+
id: "state-machine",
|
|
385
|
+
label: "UI Bridge States",
|
|
386
|
+
icon: "Network",
|
|
387
|
+
description: "Build state machines from UI Bridge SDK apps",
|
|
388
|
+
route: "/automation-builder/ui-bridge-states",
|
|
389
|
+
color: "var(--brand-secondary)",
|
|
390
|
+
productMode: "ai"
|
|
391
|
+
},
|
|
392
|
+
{
|
|
393
|
+
id: "specs",
|
|
394
|
+
label: "Specs",
|
|
395
|
+
icon: "ClipboardCheck",
|
|
396
|
+
description: "Manage and generate UI Bridge page specs for testing and automation",
|
|
397
|
+
route: "/build/specs",
|
|
398
|
+
color: "var(--brand-secondary)",
|
|
399
|
+
productMode: "ai"
|
|
400
|
+
},
|
|
401
|
+
{
|
|
402
|
+
id: "vga",
|
|
403
|
+
label: "Visual GUI",
|
|
404
|
+
icon: "Target",
|
|
405
|
+
description: "Visual GUI automation \u2014 build state machines and inspect runs",
|
|
406
|
+
route: "/vga",
|
|
407
|
+
color: "var(--brand-secondary)",
|
|
408
|
+
productMode: "both"
|
|
409
|
+
},
|
|
410
|
+
{
|
|
411
|
+
id: "demo-video",
|
|
412
|
+
label: "Demo Videos",
|
|
413
|
+
icon: "Video",
|
|
414
|
+
description: "Generate demo videos from UI Bridge page specs with AI narration",
|
|
415
|
+
route: "/build/demo-videos",
|
|
416
|
+
color: "var(--brand-secondary)",
|
|
417
|
+
platforms: ["runner"],
|
|
418
|
+
productMode: "ai"
|
|
419
|
+
},
|
|
420
|
+
{
|
|
421
|
+
id: "product-tours",
|
|
422
|
+
label: "Product Tours",
|
|
423
|
+
icon: "MousePointer2",
|
|
424
|
+
description: "Generate interactive product tours that auto-demonstrate features",
|
|
425
|
+
route: "/build/product-tours",
|
|
426
|
+
color: "var(--brand-secondary)",
|
|
427
|
+
platforms: ["runner"],
|
|
428
|
+
productMode: "ai"
|
|
429
|
+
}
|
|
430
|
+
];
|
|
431
|
+
var BUILD_GROUP = {
|
|
432
|
+
id: "build",
|
|
433
|
+
label: "BUILD",
|
|
434
|
+
items: BUILD_ITEMS,
|
|
435
|
+
defaultExpanded: false
|
|
436
|
+
};
|
|
437
|
+
var WRAPPERS_ITEMS = [
|
|
438
|
+
{
|
|
439
|
+
id: "wrappers",
|
|
440
|
+
label: "Wrappers",
|
|
441
|
+
icon: "Package",
|
|
442
|
+
description: "Install and manage wrapper extensions",
|
|
443
|
+
route: "/wrappers",
|
|
444
|
+
color: "#06B6D4",
|
|
445
|
+
platforms: ["runner"]
|
|
446
|
+
}
|
|
447
|
+
];
|
|
448
|
+
var WRAPPERS_GROUP = {
|
|
449
|
+
id: "wrappers",
|
|
450
|
+
label: "WRAPPERS",
|
|
451
|
+
items: WRAPPERS_ITEMS,
|
|
452
|
+
defaultExpanded: true
|
|
453
|
+
};
|
|
454
|
+
var CONFIGURE_ITEMS = [
|
|
455
|
+
{
|
|
456
|
+
id: "config-findings",
|
|
457
|
+
label: "Findings",
|
|
458
|
+
icon: "Tag",
|
|
459
|
+
description: "Configure finding patterns",
|
|
460
|
+
route: "/configure/finding-rules",
|
|
461
|
+
color: "#FFD700",
|
|
462
|
+
productMode: "ai"
|
|
463
|
+
},
|
|
464
|
+
{
|
|
465
|
+
id: "config-hooks",
|
|
466
|
+
label: "Lifecycle Hooks",
|
|
467
|
+
icon: "Webhook",
|
|
468
|
+
description: "Configure execution event triggers",
|
|
469
|
+
productMode: "ai"
|
|
470
|
+
},
|
|
471
|
+
{
|
|
472
|
+
id: "config-ui-bridge",
|
|
473
|
+
label: "UI Bridge",
|
|
474
|
+
icon: "Plug",
|
|
475
|
+
description: "Manage UI Bridge integrations for external apps",
|
|
476
|
+
productMode: "ai"
|
|
477
|
+
}
|
|
478
|
+
];
|
|
479
|
+
var CONFIGURE_GROUP = {
|
|
480
|
+
id: "configure",
|
|
481
|
+
label: "CONFIGURE",
|
|
482
|
+
items: CONFIGURE_ITEMS,
|
|
483
|
+
defaultExpanded: false
|
|
484
|
+
};
|
|
485
|
+
var SCHEDULE_ITEMS = [
|
|
486
|
+
{
|
|
487
|
+
id: "triggers",
|
|
488
|
+
label: "Triggers",
|
|
489
|
+
icon: "Zap",
|
|
490
|
+
description: "Event-driven workflow automation",
|
|
491
|
+
productMode: "ai"
|
|
492
|
+
},
|
|
493
|
+
{
|
|
494
|
+
id: "tasks",
|
|
495
|
+
label: "Scheduled Tasks",
|
|
496
|
+
icon: "Calendar",
|
|
497
|
+
description: "Manage scheduled automation",
|
|
498
|
+
productMode: "ai"
|
|
499
|
+
},
|
|
500
|
+
{
|
|
501
|
+
id: "watchers",
|
|
502
|
+
label: "Watchers",
|
|
503
|
+
icon: "Eye",
|
|
504
|
+
description: "Scheduled reactive agents that monitor the activity timeline",
|
|
505
|
+
route: "/observe/watchers",
|
|
506
|
+
color: "#06B6D4",
|
|
507
|
+
platforms: ["runner"]
|
|
508
|
+
},
|
|
509
|
+
{
|
|
510
|
+
id: "event-history",
|
|
511
|
+
label: "Event History",
|
|
512
|
+
icon: "Radio",
|
|
513
|
+
description: "Workflow event bus, queue status, circuit breaker",
|
|
514
|
+
hiddenInProd: true,
|
|
515
|
+
productMode: "ai"
|
|
516
|
+
}
|
|
517
|
+
];
|
|
518
|
+
var SCHEDULE_GROUP = {
|
|
519
|
+
id: "schedule",
|
|
520
|
+
label: "SCHEDULE",
|
|
521
|
+
items: SCHEDULE_ITEMS,
|
|
522
|
+
defaultExpanded: false
|
|
523
|
+
};
|
|
524
|
+
var DEV_ITEMS = [
|
|
525
|
+
{
|
|
526
|
+
id: "generator-eval",
|
|
527
|
+
label: "Generator Eval",
|
|
528
|
+
icon: "FlaskConical",
|
|
529
|
+
description: "Evaluate and improve workflow generation accuracy",
|
|
530
|
+
hiddenInProd: true,
|
|
531
|
+
color: "#8B5CF6",
|
|
532
|
+
productMode: "ai"
|
|
533
|
+
},
|
|
534
|
+
{
|
|
535
|
+
id: "autoresearch",
|
|
536
|
+
label: "Autoresearch",
|
|
537
|
+
icon: "FlaskConical",
|
|
538
|
+
description: "Compare workflow architectures with statistical A/B testing",
|
|
539
|
+
hiddenInProd: true,
|
|
540
|
+
color: "#8B5CF6",
|
|
541
|
+
productMode: "ai",
|
|
542
|
+
platforms: ["runner"]
|
|
543
|
+
},
|
|
544
|
+
{
|
|
545
|
+
id: "meta-optimizer",
|
|
546
|
+
label: "Meta-Optimizer",
|
|
547
|
+
icon: "Sparkles",
|
|
548
|
+
description: "Review and apply AI-generated recommendations to improve prompts, architecture, and generation rules",
|
|
549
|
+
hiddenInProd: true,
|
|
550
|
+
color: "#D97706",
|
|
551
|
+
productMode: "ai",
|
|
552
|
+
platforms: ["runner"]
|
|
553
|
+
},
|
|
554
|
+
{
|
|
555
|
+
id: "online-learning",
|
|
556
|
+
label: "Online Learning",
|
|
557
|
+
icon: "Brain",
|
|
558
|
+
description: "Monitor bandit model routing, drift detection, step credit attribution, and strategy evolution",
|
|
559
|
+
hiddenInProd: true,
|
|
560
|
+
color: "#06B6D4",
|
|
561
|
+
productMode: "ai",
|
|
562
|
+
platforms: ["runner"]
|
|
563
|
+
},
|
|
564
|
+
{
|
|
565
|
+
id: "skills",
|
|
566
|
+
label: "Skills",
|
|
567
|
+
icon: "Zap",
|
|
568
|
+
description: "Review and approve auto-extracted procedural skills learned from successful workflow runs",
|
|
569
|
+
hiddenInProd: true,
|
|
570
|
+
color: "#F59E0B",
|
|
571
|
+
productMode: "ai",
|
|
572
|
+
platforms: ["runner"]
|
|
573
|
+
},
|
|
574
|
+
{
|
|
575
|
+
id: "image-quality-tests",
|
|
576
|
+
label: "Image Quality",
|
|
577
|
+
icon: "Image",
|
|
578
|
+
description: "View and manage image quality test images",
|
|
579
|
+
hiddenInProd: true,
|
|
580
|
+
color: "#8B5CF6",
|
|
581
|
+
platforms: ["runner"],
|
|
582
|
+
productMode: "ai"
|
|
583
|
+
},
|
|
584
|
+
{
|
|
585
|
+
id: "accessibility-explorer",
|
|
586
|
+
label: "Accessibility",
|
|
587
|
+
icon: "Accessibility",
|
|
588
|
+
description: "Inspect and interact with native desktop accessibility trees via UIA, AT-SPI, or AX APIs",
|
|
589
|
+
color: "#06B6D4",
|
|
590
|
+
platforms: ["runner"]
|
|
591
|
+
}
|
|
592
|
+
];
|
|
593
|
+
var DEV_GROUP = {
|
|
594
|
+
id: "dev",
|
|
595
|
+
label: "DEV",
|
|
596
|
+
items: DEV_ITEMS,
|
|
597
|
+
defaultExpanded: false
|
|
598
|
+
};
|
|
599
|
+
var SETTINGS_ITEMS = [
|
|
600
|
+
{
|
|
601
|
+
id: "settings-account",
|
|
602
|
+
label: "Account",
|
|
603
|
+
icon: "User",
|
|
604
|
+
description: "User account settings",
|
|
605
|
+
route: "/settings/account",
|
|
606
|
+
color: "#FFD700"
|
|
607
|
+
},
|
|
608
|
+
{
|
|
609
|
+
id: "settings-ai",
|
|
610
|
+
label: "AI Providers",
|
|
611
|
+
icon: "Bot",
|
|
612
|
+
description: "Configure AI providers and models",
|
|
613
|
+
route: "/settings/ai",
|
|
614
|
+
color: "#FFD700"
|
|
615
|
+
},
|
|
616
|
+
{
|
|
617
|
+
id: "settings-agentic",
|
|
618
|
+
label: "Advanced AI",
|
|
619
|
+
icon: "Brain",
|
|
620
|
+
description: "Memory compression, retry, and task routing",
|
|
621
|
+
route: "/settings/agentic",
|
|
622
|
+
color: "#FFD700"
|
|
623
|
+
},
|
|
624
|
+
{
|
|
625
|
+
id: "settings-self-healing",
|
|
626
|
+
label: "Self-Healing",
|
|
627
|
+
icon: "ShieldCheck",
|
|
628
|
+
description: "Self-healing automation settings",
|
|
629
|
+
route: "/settings/self-healing",
|
|
630
|
+
color: "#FFD700"
|
|
631
|
+
},
|
|
632
|
+
{
|
|
633
|
+
id: "settings-world-state-verifier",
|
|
634
|
+
label: "World State Verifier",
|
|
635
|
+
icon: "Eye",
|
|
636
|
+
description: "VLM judge for agentic action verification (CUA-WSM)",
|
|
637
|
+
route: "/settings/world-state-verifier",
|
|
638
|
+
color: "#FFD700"
|
|
639
|
+
},
|
|
640
|
+
{
|
|
641
|
+
id: "settings-playwright",
|
|
642
|
+
label: "Playwright",
|
|
643
|
+
icon: "FlaskConical",
|
|
644
|
+
description: "Playwright configuration",
|
|
645
|
+
route: "/settings/playwright",
|
|
646
|
+
color: "#FFD700"
|
|
647
|
+
},
|
|
648
|
+
{
|
|
649
|
+
id: "settings-mobile",
|
|
650
|
+
label: "Mobile",
|
|
651
|
+
icon: "Monitor",
|
|
652
|
+
description: "Mobile device (ADB) settings",
|
|
653
|
+
route: "/settings/mobile",
|
|
654
|
+
color: "#FFD700"
|
|
655
|
+
},
|
|
656
|
+
{
|
|
657
|
+
id: "settings-discovery",
|
|
658
|
+
label: "App Discovery",
|
|
659
|
+
icon: "Radar",
|
|
660
|
+
description: "Custom ports for the UI Bridge app scanner",
|
|
661
|
+
route: "/settings/discovery",
|
|
662
|
+
color: "#FFD700"
|
|
663
|
+
},
|
|
664
|
+
{
|
|
665
|
+
id: "settings-mcp",
|
|
666
|
+
label: "MCP Servers",
|
|
667
|
+
icon: "Wifi",
|
|
668
|
+
description: "Model Context Protocol server configuration",
|
|
669
|
+
route: "/settings/mcp",
|
|
670
|
+
color: "#FFD700"
|
|
671
|
+
},
|
|
672
|
+
{
|
|
673
|
+
id: "settings-log-sources",
|
|
674
|
+
label: "Log Sources",
|
|
675
|
+
icon: "FolderOpen",
|
|
676
|
+
description: "Global log source configuration with AI selection",
|
|
677
|
+
route: "/settings/log-sources",
|
|
678
|
+
color: "#FFD700"
|
|
679
|
+
},
|
|
680
|
+
{
|
|
681
|
+
id: "settings-general",
|
|
682
|
+
label: "General",
|
|
683
|
+
icon: "Wrench",
|
|
684
|
+
description: "General application settings",
|
|
685
|
+
route: "/settings/general",
|
|
686
|
+
color: "#FFD700"
|
|
687
|
+
},
|
|
688
|
+
{
|
|
689
|
+
id: "settings-storage",
|
|
690
|
+
label: "Storage",
|
|
691
|
+
icon: "HardDrive",
|
|
692
|
+
description: "Data storage settings",
|
|
693
|
+
route: "/settings/storage",
|
|
694
|
+
color: "#FFD700"
|
|
695
|
+
},
|
|
696
|
+
{
|
|
697
|
+
id: "settings-backup",
|
|
698
|
+
label: "Backup",
|
|
699
|
+
icon: "Archive",
|
|
700
|
+
description: "Backup and restore",
|
|
701
|
+
route: "/settings/backup",
|
|
702
|
+
color: "#FFD700"
|
|
703
|
+
},
|
|
704
|
+
{
|
|
705
|
+
id: "settings-instances",
|
|
706
|
+
label: "Runner Instances",
|
|
707
|
+
icon: "Server",
|
|
708
|
+
description: "Spawn placement and per-instance configs",
|
|
709
|
+
route: "/settings/instances",
|
|
710
|
+
color: "#FFD700",
|
|
711
|
+
platforms: ["runner"]
|
|
712
|
+
},
|
|
713
|
+
{
|
|
714
|
+
id: "settings-updates",
|
|
715
|
+
label: "Updates",
|
|
716
|
+
icon: "Download",
|
|
717
|
+
description: "Check for updates",
|
|
718
|
+
route: "/settings/updates",
|
|
719
|
+
color: "#FFD700"
|
|
720
|
+
},
|
|
721
|
+
{
|
|
722
|
+
id: "settings-security",
|
|
723
|
+
label: "Security",
|
|
724
|
+
icon: "ShieldAlert",
|
|
725
|
+
description: "Sandboxing, policies, and audit",
|
|
726
|
+
route: "/settings/security",
|
|
727
|
+
color: "#FFD700",
|
|
728
|
+
platforms: ["runner"]
|
|
729
|
+
},
|
|
730
|
+
{
|
|
731
|
+
id: "settings-debug",
|
|
732
|
+
label: "Debug",
|
|
733
|
+
icon: "FlaskConical",
|
|
734
|
+
description: "Debug and diagnostics",
|
|
735
|
+
route: "/settings/debug",
|
|
736
|
+
color: "#FFD700"
|
|
737
|
+
}
|
|
738
|
+
];
|
|
739
|
+
var SYSTEM_ITEMS = [
|
|
740
|
+
{
|
|
741
|
+
id: "runners",
|
|
742
|
+
label: "Runners",
|
|
743
|
+
icon: "Server",
|
|
744
|
+
description: "Connected desktop runners",
|
|
745
|
+
platforms: ["web"],
|
|
746
|
+
route: "/runners",
|
|
747
|
+
color: "#10B981"
|
|
748
|
+
},
|
|
749
|
+
{
|
|
750
|
+
id: "settings",
|
|
751
|
+
label: "Settings",
|
|
752
|
+
icon: "Settings",
|
|
753
|
+
hasChildren: true,
|
|
754
|
+
selectsFirstChild: true,
|
|
755
|
+
description: "Application settings",
|
|
756
|
+
route: "/settings",
|
|
757
|
+
color: "#FFD700"
|
|
758
|
+
},
|
|
759
|
+
{
|
|
760
|
+
id: "help",
|
|
761
|
+
label: "Help",
|
|
762
|
+
icon: "HelpCircle",
|
|
763
|
+
description: "Documentation and support",
|
|
764
|
+
route: "/help",
|
|
765
|
+
color: "#9CA3AF"
|
|
766
|
+
}
|
|
767
|
+
];
|
|
768
|
+
var SYSTEM_GROUP = {
|
|
769
|
+
id: "system",
|
|
770
|
+
label: "SYSTEM",
|
|
771
|
+
items: SYSTEM_ITEMS,
|
|
772
|
+
defaultExpanded: true
|
|
773
|
+
};
|
|
774
|
+
var NAVIGATION_GROUPS = [
|
|
775
|
+
TOP_LEVEL_GROUP,
|
|
776
|
+
RUN_GROUP,
|
|
777
|
+
OBSERVE_GROUP,
|
|
778
|
+
LEARN_GROUP,
|
|
779
|
+
BUILD_GROUP,
|
|
780
|
+
WRAPPERS_GROUP,
|
|
781
|
+
CONFIGURE_GROUP,
|
|
782
|
+
SCHEDULE_GROUP,
|
|
783
|
+
DEV_GROUP,
|
|
784
|
+
SYSTEM_GROUP
|
|
785
|
+
];
|
|
786
|
+
var CHILDREN_MAP = {
|
|
787
|
+
runs: [...SESSION_ITEMS, ...RUNS_ITEMS],
|
|
788
|
+
settings: SETTINGS_ITEMS
|
|
789
|
+
};
|
|
790
|
+
function getChildrenItems(parentId) {
|
|
791
|
+
return CHILDREN_MAP[parentId] || [];
|
|
792
|
+
}
|
|
793
|
+
function getAllItems() {
|
|
794
|
+
const items = [];
|
|
795
|
+
for (const group of NAVIGATION_GROUPS) {
|
|
796
|
+
items.push(...group.items);
|
|
797
|
+
}
|
|
798
|
+
for (const children of Object.values(CHILDREN_MAP)) {
|
|
799
|
+
items.push(...children);
|
|
800
|
+
}
|
|
801
|
+
return items;
|
|
802
|
+
}
|
|
803
|
+
function findItemById(id) {
|
|
804
|
+
return getAllItems().find((item) => item.id === id);
|
|
805
|
+
}
|
|
806
|
+
function getItemGroup(itemId) {
|
|
807
|
+
for (const group of NAVIGATION_GROUPS) {
|
|
808
|
+
if (group.items.some((item) => item.id === itemId)) {
|
|
809
|
+
return group;
|
|
810
|
+
}
|
|
811
|
+
}
|
|
812
|
+
for (const [parentId, children] of Object.entries(CHILDREN_MAP)) {
|
|
813
|
+
if (children.some((item) => item.id === itemId)) {
|
|
814
|
+
for (const group of NAVIGATION_GROUPS) {
|
|
815
|
+
if (group.items.some((item) => item.id === parentId)) {
|
|
816
|
+
return group;
|
|
817
|
+
}
|
|
818
|
+
}
|
|
819
|
+
}
|
|
820
|
+
}
|
|
821
|
+
return void 0;
|
|
822
|
+
}
|
|
823
|
+
|
|
824
|
+
// src/icons.ts
|
|
825
|
+
var ICON_NAMES = [
|
|
826
|
+
// Common
|
|
827
|
+
"Video",
|
|
828
|
+
"Play",
|
|
829
|
+
"Activity",
|
|
830
|
+
"History",
|
|
831
|
+
"Bot",
|
|
832
|
+
"Settings",
|
|
833
|
+
"HelpCircle",
|
|
834
|
+
"ChevronDown",
|
|
835
|
+
"ChevronRight",
|
|
836
|
+
"AlertCircle",
|
|
837
|
+
"Bug",
|
|
838
|
+
// Observe/Session
|
|
839
|
+
"ScrollText",
|
|
840
|
+
"LayoutDashboard",
|
|
841
|
+
"ClipboardCheck",
|
|
842
|
+
"Zap",
|
|
843
|
+
"Radio",
|
|
844
|
+
"Radar",
|
|
845
|
+
"Image",
|
|
846
|
+
"ClipboardList",
|
|
847
|
+
"FileText",
|
|
848
|
+
"FileSearch",
|
|
849
|
+
"TestTube",
|
|
850
|
+
"BarChart3",
|
|
851
|
+
"Database",
|
|
852
|
+
"Cloud",
|
|
853
|
+
"Accessibility",
|
|
854
|
+
// Build
|
|
855
|
+
"BookOpen",
|
|
856
|
+
"BookText",
|
|
857
|
+
"CheckCircle2",
|
|
858
|
+
"Sparkles",
|
|
859
|
+
"MousePointer2",
|
|
860
|
+
"Layers",
|
|
861
|
+
"FlaskConical",
|
|
862
|
+
"Camera",
|
|
863
|
+
"GitBranch",
|
|
864
|
+
"Network",
|
|
865
|
+
"Globe",
|
|
866
|
+
"Code",
|
|
867
|
+
"Puzzle",
|
|
868
|
+
"ShieldCheck",
|
|
869
|
+
"Wifi",
|
|
870
|
+
"Terminal",
|
|
871
|
+
"ListChecks",
|
|
872
|
+
// Configure
|
|
873
|
+
"FolderOpen",
|
|
874
|
+
"Tag",
|
|
875
|
+
"Plug",
|
|
876
|
+
// Schedule
|
|
877
|
+
"Calendar",
|
|
878
|
+
// System/Settings
|
|
879
|
+
"User",
|
|
880
|
+
"HardDrive",
|
|
881
|
+
"Wrench",
|
|
882
|
+
"Download",
|
|
883
|
+
"Archive",
|
|
884
|
+
"Monitor",
|
|
885
|
+
"Palette",
|
|
886
|
+
"Bell",
|
|
887
|
+
"Key",
|
|
888
|
+
"CreditCard",
|
|
889
|
+
"Brain",
|
|
890
|
+
"Eye",
|
|
891
|
+
"Webhook",
|
|
892
|
+
"RotateCcw",
|
|
893
|
+
"Cpu",
|
|
894
|
+
"Target",
|
|
895
|
+
"Repeat",
|
|
896
|
+
"ShieldAlert",
|
|
897
|
+
// Web / shared
|
|
898
|
+
"MessageSquare",
|
|
899
|
+
"Server",
|
|
900
|
+
"Workflow",
|
|
901
|
+
"Package"
|
|
902
|
+
];
|
|
903
|
+
function isValidIconName(name) {
|
|
904
|
+
return ICON_NAMES.includes(name);
|
|
905
|
+
}
|
|
906
|
+
|
|
907
|
+
// src/platform.ts
|
|
908
|
+
var _isDevelopmentMode = false;
|
|
909
|
+
function setDevelopmentMode(isDev) {
|
|
910
|
+
_isDevelopmentMode = isDev;
|
|
911
|
+
}
|
|
912
|
+
function isDevelopmentMode() {
|
|
913
|
+
return _isDevelopmentMode;
|
|
914
|
+
}
|
|
915
|
+
var _productMode = null;
|
|
916
|
+
function setProductMode(mode) {
|
|
917
|
+
_productMode = mode;
|
|
918
|
+
}
|
|
919
|
+
function getProductMode() {
|
|
920
|
+
return _productMode;
|
|
921
|
+
}
|
|
922
|
+
function isItemAvailable(item, platform) {
|
|
923
|
+
if (item.hiddenInProd && !isDevelopmentMode()) {
|
|
924
|
+
return false;
|
|
925
|
+
}
|
|
926
|
+
if (_productMode && item.productMode && item.productMode !== "both" && item.productMode !== _productMode) {
|
|
927
|
+
return false;
|
|
928
|
+
}
|
|
929
|
+
if (!item.platforms || item.platforms.length === 0) {
|
|
930
|
+
return true;
|
|
931
|
+
}
|
|
932
|
+
return item.platforms.includes(platform);
|
|
933
|
+
}
|
|
934
|
+
function filterItemsForPlatform(items, platform) {
|
|
935
|
+
return items.filter((item) => isItemAvailable(item, platform));
|
|
936
|
+
}
|
|
937
|
+
function filterGroupForPlatform(group, platform) {
|
|
938
|
+
if (group.platforms && !group.platforms.includes(platform)) {
|
|
939
|
+
return { ...group, items: [] };
|
|
940
|
+
}
|
|
941
|
+
return {
|
|
942
|
+
...group,
|
|
943
|
+
items: filterItemsForPlatform(group.items, platform)
|
|
944
|
+
};
|
|
945
|
+
}
|
|
946
|
+
function filterGroupsForPlatform(groups, platform) {
|
|
947
|
+
return groups.map((group) => filterGroupForPlatform(group, platform)).filter((group) => group.items.length > 0);
|
|
948
|
+
}
|
|
949
|
+
function getNavigationGroups(platform) {
|
|
950
|
+
return filterGroupsForPlatform(NAVIGATION_GROUPS, platform);
|
|
951
|
+
}
|
|
952
|
+
function getChildrenForPlatform(parentId, platform) {
|
|
953
|
+
const children = CHILDREN_MAP[parentId] || [];
|
|
954
|
+
return filterItemsForPlatform(children, platform);
|
|
955
|
+
}
|
|
956
|
+
function getRunnerNavigation() {
|
|
957
|
+
return getNavigationGroups("runner");
|
|
958
|
+
}
|
|
959
|
+
function getWebNavigation() {
|
|
960
|
+
return getNavigationGroups("web");
|
|
961
|
+
}
|
|
962
|
+
|
|
963
|
+
// src/state.ts
|
|
964
|
+
function createInitialState(options) {
|
|
965
|
+
return {
|
|
966
|
+
activeItemId: options?.activeItemId ?? null,
|
|
967
|
+
expandedGroups: new Set(options?.expandedGroups ?? ["run", "observe", "learn", "build", "configure", "system"]),
|
|
968
|
+
expandedItems: new Set(options?.expandedItems ?? []),
|
|
969
|
+
secondarySidebar: {
|
|
970
|
+
isOpen: false,
|
|
971
|
+
parentId: null,
|
|
972
|
+
items: []
|
|
973
|
+
},
|
|
974
|
+
isCollapsed: options?.isCollapsed ?? false
|
|
975
|
+
};
|
|
976
|
+
}
|
|
977
|
+
function navigationReducer(state, action) {
|
|
978
|
+
switch (action.type) {
|
|
979
|
+
case "SET_ACTIVE":
|
|
980
|
+
return {
|
|
981
|
+
...state,
|
|
982
|
+
activeItemId: action.itemId
|
|
983
|
+
};
|
|
984
|
+
case "TOGGLE_GROUP": {
|
|
985
|
+
const newExpandedGroups = new Set(state.expandedGroups);
|
|
986
|
+
if (newExpandedGroups.has(action.groupId)) {
|
|
987
|
+
newExpandedGroups.delete(action.groupId);
|
|
988
|
+
} else {
|
|
989
|
+
newExpandedGroups.add(action.groupId);
|
|
990
|
+
}
|
|
991
|
+
return {
|
|
992
|
+
...state,
|
|
993
|
+
expandedGroups: newExpandedGroups
|
|
994
|
+
};
|
|
995
|
+
}
|
|
996
|
+
case "TOGGLE_ITEM": {
|
|
997
|
+
const newExpandedItems = new Set(state.expandedItems);
|
|
998
|
+
if (newExpandedItems.has(action.itemId)) {
|
|
999
|
+
newExpandedItems.delete(action.itemId);
|
|
1000
|
+
} else {
|
|
1001
|
+
newExpandedItems.add(action.itemId);
|
|
1002
|
+
}
|
|
1003
|
+
return {
|
|
1004
|
+
...state,
|
|
1005
|
+
expandedItems: newExpandedItems
|
|
1006
|
+
};
|
|
1007
|
+
}
|
|
1008
|
+
case "EXPAND_GROUP": {
|
|
1009
|
+
const newExpandedGroups = new Set(state.expandedGroups);
|
|
1010
|
+
newExpandedGroups.add(action.groupId);
|
|
1011
|
+
return {
|
|
1012
|
+
...state,
|
|
1013
|
+
expandedGroups: newExpandedGroups
|
|
1014
|
+
};
|
|
1015
|
+
}
|
|
1016
|
+
case "COLLAPSE_GROUP": {
|
|
1017
|
+
const newExpandedGroups = new Set(state.expandedGroups);
|
|
1018
|
+
newExpandedGroups.delete(action.groupId);
|
|
1019
|
+
return {
|
|
1020
|
+
...state,
|
|
1021
|
+
expandedGroups: newExpandedGroups
|
|
1022
|
+
};
|
|
1023
|
+
}
|
|
1024
|
+
case "OPEN_SECONDARY":
|
|
1025
|
+
return {
|
|
1026
|
+
...state,
|
|
1027
|
+
secondarySidebar: {
|
|
1028
|
+
isOpen: true,
|
|
1029
|
+
parentId: action.parentId,
|
|
1030
|
+
items: action.items
|
|
1031
|
+
}
|
|
1032
|
+
};
|
|
1033
|
+
case "CLOSE_SECONDARY":
|
|
1034
|
+
return {
|
|
1035
|
+
...state,
|
|
1036
|
+
secondarySidebar: {
|
|
1037
|
+
isOpen: false,
|
|
1038
|
+
parentId: null,
|
|
1039
|
+
items: []
|
|
1040
|
+
}
|
|
1041
|
+
};
|
|
1042
|
+
case "TOGGLE_SIDEBAR_COLLAPSE":
|
|
1043
|
+
return {
|
|
1044
|
+
...state,
|
|
1045
|
+
isCollapsed: !state.isCollapsed
|
|
1046
|
+
};
|
|
1047
|
+
case "SET_SIDEBAR_COLLAPSED":
|
|
1048
|
+
return {
|
|
1049
|
+
...state,
|
|
1050
|
+
isCollapsed: action.collapsed
|
|
1051
|
+
};
|
|
1052
|
+
default:
|
|
1053
|
+
return state;
|
|
1054
|
+
}
|
|
1055
|
+
}
|
|
1056
|
+
var navigationActions = {
|
|
1057
|
+
setActive: (itemId) => ({
|
|
1058
|
+
type: "SET_ACTIVE",
|
|
1059
|
+
itemId
|
|
1060
|
+
}),
|
|
1061
|
+
toggleGroup: (groupId) => ({
|
|
1062
|
+
type: "TOGGLE_GROUP",
|
|
1063
|
+
groupId
|
|
1064
|
+
}),
|
|
1065
|
+
toggleItem: (itemId) => ({
|
|
1066
|
+
type: "TOGGLE_ITEM",
|
|
1067
|
+
itemId
|
|
1068
|
+
}),
|
|
1069
|
+
expandGroup: (groupId) => ({
|
|
1070
|
+
type: "EXPAND_GROUP",
|
|
1071
|
+
groupId
|
|
1072
|
+
}),
|
|
1073
|
+
collapseGroup: (groupId) => ({
|
|
1074
|
+
type: "COLLAPSE_GROUP",
|
|
1075
|
+
groupId
|
|
1076
|
+
}),
|
|
1077
|
+
openSecondary: (parentId, items) => ({
|
|
1078
|
+
type: "OPEN_SECONDARY",
|
|
1079
|
+
parentId,
|
|
1080
|
+
items
|
|
1081
|
+
}),
|
|
1082
|
+
closeSecondary: () => ({
|
|
1083
|
+
type: "CLOSE_SECONDARY"
|
|
1084
|
+
}),
|
|
1085
|
+
toggleSidebarCollapse: () => ({
|
|
1086
|
+
type: "TOGGLE_SIDEBAR_COLLAPSE"
|
|
1087
|
+
}),
|
|
1088
|
+
setSidebarCollapsed: (collapsed) => ({
|
|
1089
|
+
type: "SET_SIDEBAR_COLLAPSED",
|
|
1090
|
+
collapsed
|
|
1091
|
+
})
|
|
1092
|
+
};
|
|
1093
|
+
function isGroupExpanded(state, groupId) {
|
|
1094
|
+
return state.expandedGroups.has(groupId);
|
|
1095
|
+
}
|
|
1096
|
+
function isItemExpanded(state, itemId) {
|
|
1097
|
+
return state.expandedItems.has(itemId);
|
|
1098
|
+
}
|
|
1099
|
+
function isItemActive(state, itemId) {
|
|
1100
|
+
return state.activeItemId === itemId;
|
|
1101
|
+
}
|
|
1102
|
+
function isSecondaryOpenFor(state, parentId) {
|
|
1103
|
+
return state.secondarySidebar.isOpen && state.secondarySidebar.parentId === parentId;
|
|
1104
|
+
}
|
|
1105
|
+
function serializeState(state) {
|
|
1106
|
+
return JSON.stringify({
|
|
1107
|
+
activeItemId: state.activeItemId,
|
|
1108
|
+
expandedGroups: Array.from(state.expandedGroups),
|
|
1109
|
+
expandedItems: Array.from(state.expandedItems),
|
|
1110
|
+
isCollapsed: state.isCollapsed
|
|
1111
|
+
});
|
|
1112
|
+
}
|
|
1113
|
+
function deserializeState(json) {
|
|
1114
|
+
try {
|
|
1115
|
+
const data = JSON.parse(json);
|
|
1116
|
+
return {
|
|
1117
|
+
activeItemId: data.activeItemId ?? null,
|
|
1118
|
+
expandedGroups: new Set(data.expandedGroups ?? []),
|
|
1119
|
+
expandedItems: new Set(data.expandedItems ?? []),
|
|
1120
|
+
isCollapsed: data.isCollapsed ?? false
|
|
1121
|
+
};
|
|
1122
|
+
} catch {
|
|
1123
|
+
return null;
|
|
1124
|
+
}
|
|
1125
|
+
}
|
|
1126
|
+
var STORAGE_KEYS = {
|
|
1127
|
+
state: "qontinui-navigation-state",
|
|
1128
|
+
collapsed: "qontinui-sidebar-collapsed",
|
|
1129
|
+
expandedGroups: "qontinui-sidebar-groups",
|
|
1130
|
+
activeTab: "qontinui-active-tab"
|
|
1131
|
+
};
|
|
1132
|
+
|
|
1133
|
+
// src/react.tsx
|
|
1134
|
+
import * as React from "react";
|
|
1135
|
+
import { Fragment, jsx } from "react/jsx-runtime";
|
|
1136
|
+
var cachedUseUIElement = void 0;
|
|
1137
|
+
function resolveUseUIElement() {
|
|
1138
|
+
if (cachedUseUIElement !== void 0) return cachedUseUIElement;
|
|
1139
|
+
try {
|
|
1140
|
+
const g = globalThis;
|
|
1141
|
+
const maybeRequire = g.require;
|
|
1142
|
+
const dynamicRequire = typeof maybeRequire === "function" ? maybeRequire : (
|
|
1143
|
+
// Last-resort: build a require via Function. Works in classic Node
|
|
1144
|
+
// CJS contexts; throws in bare-ESM, caught below.
|
|
1145
|
+
(() => {
|
|
1146
|
+
try {
|
|
1147
|
+
return new Function("m", "return require(m)");
|
|
1148
|
+
} catch {
|
|
1149
|
+
return null;
|
|
1150
|
+
}
|
|
1151
|
+
})()
|
|
1152
|
+
);
|
|
1153
|
+
if (!dynamicRequire) {
|
|
1154
|
+
cachedUseUIElement = null;
|
|
1155
|
+
return null;
|
|
1156
|
+
}
|
|
1157
|
+
let mod;
|
|
1158
|
+
try {
|
|
1159
|
+
mod = dynamicRequire("@qontinui/ui-bridge/react");
|
|
1160
|
+
} catch {
|
|
1161
|
+
mod = dynamicRequire("@qontinui/ui-bridge");
|
|
1162
|
+
}
|
|
1163
|
+
const m = mod;
|
|
1164
|
+
const fn = m && m.useUIElement || m && m.default && m.default.useUIElement || null;
|
|
1165
|
+
cachedUseUIElement = typeof fn === "function" ? fn : null;
|
|
1166
|
+
} catch {
|
|
1167
|
+
cachedUseUIElement = null;
|
|
1168
|
+
}
|
|
1169
|
+
return cachedUseUIElement;
|
|
1170
|
+
}
|
|
1171
|
+
function useNavigationItem(item, onActivate) {
|
|
1172
|
+
const activateRef = React.useRef(onActivate);
|
|
1173
|
+
React.useEffect(() => {
|
|
1174
|
+
activateRef.current = onActivate;
|
|
1175
|
+
}, [onActivate]);
|
|
1176
|
+
const useUIElementFn = resolveUseUIElement();
|
|
1177
|
+
const hookFn = useUIElementFn ?? (() => void 0);
|
|
1178
|
+
const handleClick = React.useCallback(() => {
|
|
1179
|
+
activateRef.current();
|
|
1180
|
+
}, []);
|
|
1181
|
+
const options = React.useMemo(
|
|
1182
|
+
() => ({
|
|
1183
|
+
id: `nav:${item.id}`,
|
|
1184
|
+
type: "menuitem",
|
|
1185
|
+
label: item.label,
|
|
1186
|
+
// Standard click action — the registry and control executor both
|
|
1187
|
+
// understand this keyword. The actual handler lives in customActions
|
|
1188
|
+
// so the executor can dispatch it without a DOM element reference.
|
|
1189
|
+
actions: ["click"],
|
|
1190
|
+
customActions: {
|
|
1191
|
+
click: {
|
|
1192
|
+
id: "click",
|
|
1193
|
+
label: `Activate ${item.label}`,
|
|
1194
|
+
description: item.description,
|
|
1195
|
+
handler: handleClick
|
|
1196
|
+
}
|
|
1197
|
+
},
|
|
1198
|
+
// Semantic hint for the Phase 1 content-element discovery pass.
|
|
1199
|
+
// The registry carries this verbatim; snapshots expose it to UI
|
|
1200
|
+
// Bridge clients.
|
|
1201
|
+
variant: "navigation-item",
|
|
1202
|
+
// Richer disambiguation hints — harmless for apps that don't use
|
|
1203
|
+
// them, valuable for NL-based agents.
|
|
1204
|
+
contextPath: item.description ? `navigation > ${item.label}` : void 0,
|
|
1205
|
+
// Don't attempt auto-register via a ref (we don't have one here);
|
|
1206
|
+
// the hook falls back to data-ui-bridge-id polling which is what the
|
|
1207
|
+
// existing nav buttons already stamp.
|
|
1208
|
+
autoRegister: true
|
|
1209
|
+
}),
|
|
1210
|
+
[item.id, item.label, item.description, handleClick]
|
|
1211
|
+
);
|
|
1212
|
+
hookFn(options);
|
|
1213
|
+
}
|
|
1214
|
+
function NavigationItemShell({
|
|
1215
|
+
item,
|
|
1216
|
+
onActivate,
|
|
1217
|
+
children
|
|
1218
|
+
}) {
|
|
1219
|
+
useNavigationItem(item, onActivate);
|
|
1220
|
+
return /* @__PURE__ */ jsx(Fragment, { children });
|
|
1221
|
+
}
|
|
1222
|
+
export {
|
|
1223
|
+
BUILD_GROUP,
|
|
1224
|
+
BUILD_ITEMS,
|
|
1225
|
+
CHILDREN_MAP,
|
|
1226
|
+
CONFIGURE_GROUP,
|
|
1227
|
+
CONFIGURE_ITEMS,
|
|
1228
|
+
DEV_GROUP,
|
|
1229
|
+
DEV_ITEMS,
|
|
1230
|
+
ICON_NAMES,
|
|
1231
|
+
LEARN_GROUP,
|
|
1232
|
+
LEARN_ITEMS,
|
|
1233
|
+
NAVIGATION_GROUPS,
|
|
1234
|
+
NavigationItemShell,
|
|
1235
|
+
OBSERVE_GROUP,
|
|
1236
|
+
OBSERVE_ITEMS,
|
|
1237
|
+
RUNS_ITEMS,
|
|
1238
|
+
RUN_GROUP,
|
|
1239
|
+
RUN_ITEMS,
|
|
1240
|
+
SCHEDULE_GROUP,
|
|
1241
|
+
SCHEDULE_ITEMS,
|
|
1242
|
+
SESSION_ITEMS,
|
|
1243
|
+
SETTINGS_ITEMS,
|
|
1244
|
+
STORAGE_KEYS,
|
|
1245
|
+
SYSTEM_GROUP,
|
|
1246
|
+
SYSTEM_ITEMS,
|
|
1247
|
+
WRAPPERS_GROUP,
|
|
1248
|
+
WRAPPERS_ITEMS,
|
|
1249
|
+
createInitialState,
|
|
1250
|
+
deserializeState,
|
|
1251
|
+
filterGroupForPlatform,
|
|
1252
|
+
filterGroupsForPlatform,
|
|
1253
|
+
filterItemsForPlatform,
|
|
1254
|
+
findItemById,
|
|
1255
|
+
getAllItems,
|
|
1256
|
+
getChildrenForPlatform,
|
|
1257
|
+
getChildrenItems,
|
|
1258
|
+
getItemGroup,
|
|
1259
|
+
getNavigationGroups,
|
|
1260
|
+
getProductMode,
|
|
1261
|
+
getRunnerNavigation,
|
|
1262
|
+
getWebNavigation,
|
|
1263
|
+
isDevelopmentMode,
|
|
1264
|
+
isGroupExpanded,
|
|
1265
|
+
isItemActive,
|
|
1266
|
+
isItemAvailable,
|
|
1267
|
+
isItemExpanded,
|
|
1268
|
+
isSecondaryOpenFor,
|
|
1269
|
+
isValidIconName,
|
|
1270
|
+
navigationActions,
|
|
1271
|
+
navigationReducer,
|
|
1272
|
+
serializeState,
|
|
1273
|
+
setDevelopmentMode,
|
|
1274
|
+
setProductMode,
|
|
1275
|
+
useNavigationItem
|
|
1276
|
+
};
|