-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapp.doql.css
More file actions
561 lines (449 loc) · 16 KB
/
Copy pathapp.doql.css
File metadata and controls
561 lines (449 loc) · 16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
app {
name: "llx";
version: "0.1.57";
}
entity[name="ItemBase"] {
}
entity[name="ProcessInfo"] {
}
entity[name="LocaleInfo"] {
}
entity[name="ShellInfo"] {
}
entity[name="NetworkContext"] {
}
entity[name="ShellContext"] {
}
entity[name="FilterReport"] {
}
entity[name="CompressedFolder"] {
}
entity[name="RuntimeContext"] {
}
entity[name="SessionSnapshot"] {
}
entity[name="BiasPattern"] {
}
entity[name="ModelConfig"] {
}
entity[name="GuardConfig"] {
}
entity[name="DomainRule"] {
}
entity[name="LLMProviderConfig"] {
}
entity[name="DecompositionPrompts"] {
}
entity[name="PreLLMConfig"] {
}
entity[name="ProcessStep"] {
}
entity[name="ProcessConfig"] {
}
entity[name="AuditEntry"] {
}
entity[name="ModelHints"] {
}
entity[name="TaskPattern"] {
}
entity[name="Sprint"] {
}
entity[name="Goal"] {
}
entity[name="QualityGate"] {
}
entity[name="Strategy"] {
}
database[name="redis"] {
type: "redis";
url: env.REDIS_URL;
}
database[name="postgres"] {
type: "postgresql";
url: env.DATABASE_URL;
}
database[name="backup"] {
type: "postgresql";
url: env.DATABASE_URL;
}
interface[type="cli"] {
framework: click;
}
interface[type="cli"] page[name="llx"] {
}
integration[name="email"] {
type: "smtp";
}
workflow[name="install"] {
trigger: "manual";
step-1: run cmd=echo "📦 Installing llx...";
step-2: run cmd=python -m venv .venv;
step-3: run cmd=.venv/bin/pip install --upgrade pip;
step-4: run cmd=.venv/bin/pip install -e .;
step-5: run cmd=.venv/bin/pip install -r requirements-dev.txt;
step-6: run cmd=echo "✅ Installation completed!";
step-7: run cmd=echo "Run 'source .venv/bin/activate' to activate the virtual environment";
}
workflow[name="install-tools"] {
trigger: "manual";
step-1: run cmd=echo "🔧 Installing local tools...";
step-2: run cmd=if command -v ollama > /dev/null 2>&1; then \;
step-3: run cmd=echo "✅ Ollama already installed"; \;
step-4: run cmd=else \;
step-5: run cmd=echo "📦 Installing Ollama..."; \;
step-6: run cmd=curl -fsSL https://ollama.ai/install.sh | sh; \;
step-7: run cmd=fi;
step-8: run cmd=if command -v redis-cli > /dev/null 2>&1; then \;
step-9: run cmd=echo "✅ Redis CLI already installed"; \;
step-10: run cmd=else \;
step-11: run cmd=echo "📦 Installing Redis CLI..."; \;
step-12: run cmd=if command -v apt-get > /dev/null 2>&1; then \;
step-13: run cmd=sudo apt-get update && sudo apt-get install -y redis-tools; \;
step-14: run cmd=elif command -v brew > /dev/null 2>&1; then \;
step-15: run cmd=brew install redis; \;
step-16: run cmd=else \;
step-17: run cmd=echo "Please install Redis CLI manually"; \;
step-18: run cmd=fi; \;
step-19: run cmd=fi;
step-20: run cmd=echo "✅ Tools installation completed!";
}
workflow[name="dev"] {
trigger: "manual";
step-1: run cmd=echo "🚀 Starting development environment...";
step-2: run cmd=./docker-manage.sh dev;
}
workflow[name="prod"] {
trigger: "manual";
step-1: run cmd=echo "🚀 Starting production environment...";
step-2: run cmd=./docker-manage.sh prod;
}
workflow[name="test"] {
trigger: "manual";
step-1: run cmd=echo "🧪 Running tests...";
step-2: run cmd=.venv/bin/python -m pytest tests/ -v --tb=short;
}
workflow[name="test-docker"] {
trigger: "manual";
step-1: run cmd=echo "🐳 Running tests in Docker...";
step-2: run cmd=docker build -t llx-test .;
step-3: run cmd=docker run --rm llx-test .venv/bin/python -m pytest tests/ -v;
}
workflow[name="lint"] {
trigger: "manual";
step-1: run cmd=echo "🔍 Running linting...";
step-2: run cmd=.venv/bin/python -m flake8 llx/ --max-line-length=100 --ignore=E203,W503;
step-3: run cmd=.venv/bin/python -m mypy llx/ --ignore-missing-imports;
step-4: run cmd=.venv/bin/python -m black --check llx/;
}
workflow[name="format"] {
trigger: "manual";
step-1: run cmd=echo "📝 Formatting code...";
step-2: run cmd=.venv/bin/python -m black llx/;
step-3: run cmd=.venv/bin/python -m isort llx/;
}
workflow[name="docker-dev"] {
trigger: "manual";
step-1: run cmd=echo "🐳 Starting development containers...";
step-2: run cmd=./docker-manage.sh dev;
}
workflow[name="docker-prod"] {
trigger: "manual";
step-1: run cmd=echo "🐳 Starting production containers...";
step-2: run cmd=./docker-manage.sh prod;
}
workflow[name="docker-stop"] {
trigger: "manual";
step-1: run cmd=echo "🛑 Stopping all containers...";
step-2: run cmd=./docker-manage.sh stop;
}
workflow[name="docker-clean"] {
trigger: "manual";
step-1: run cmd=echo "🧹 Cleaning Docker resources...";
step-2: run cmd=./docker-manage.sh clean;
}
workflow[name="docker-logs"] {
trigger: "manual";
step-1: run cmd=echo "📋 Showing logs...";
step-2: run cmd=./docker-manage.sh logs dev;
}
workflow[name="docker-status"] {
trigger: "manual";
step-1: run cmd=echo "📊 Container status...";
step-2: run cmd=./docker-manage.sh status;
}
workflow[name="examples-basic"] {
trigger: "manual";
step-1: run cmd=echo "📚 Running basic example...";
step-2: run cmd=cd examples/basic && ./run.sh;
}
workflow[name="examples-proxy"] {
trigger: "manual";
step-1: run cmd=echo "📚 Running proxy example...";
step-2: run cmd=cd examples/proxy && timeout 10s ./run.sh || echo "Proxy example completed (timeout expected)";
}
workflow[name="examples-docker"] {
trigger: "manual";
step-1: run cmd=echo "📚 Running Docker example...";
step-2: run cmd=cd examples/docker && ./run.sh;
}
workflow[name="examples-multi"] {
trigger: "manual";
step-1: run cmd=echo "📚 Running multi-provider example...";
step-2: run cmd=cd examples/multi-provider && ./run.sh;
}
workflow[name="examples-local"] {
trigger: "manual";
step-1: run cmd=echo "📚 Running local models example...";
step-2: run cmd=cd examples/local && ./run.sh;
}
workflow[name="examples-all"] {
trigger: "manual";
step-1: run cmd=echo "📚 Running all examples...";
step-2: run cmd=$(MAKE) examples-basic;
step-3: run cmd=$(MAKE) examples-multi;
step-4: run cmd=$(MAKE) examples-local;
step-5: run cmd=$(MAKE) examples-docker;
}
workflow[name="clean"] {
trigger: "manual";
step-1: run cmd=echo "🧹 Cleaning temporary files...";
step-2: run cmd=find . -type f -name "*.pyc" -delete;
step-3: run cmd=find . -type d -name "__pycache__" -delete;
step-4: run cmd=find . -type d -name "*.egg-info" -exec rm -rf {} + 2>/dev/null || true;
step-5: run cmd=rm -rf build/ dist/ .coverage htmlcov/;
step-6: run cmd=echo "✅ Clean completed!";
}
workflow[name="doctor"] {
trigger: "manual";
step-1: run cmd=echo "🔍 System health check...";
step-2: run cmd=echo "";
step-3: run cmd=echo "Python:";
step-4: run cmd=python --version || echo "❌ Python not found";
step-5: run cmd=echo "";
step-6: run cmd=echo "Docker:";
step-7: run cmd=docker --version || echo "❌ Docker not found";
step-8: run cmd=docker info > /dev/null 2>&1 && echo "✅ Docker daemon running" || echo "❌ Docker daemon not running";
step-9: run cmd=echo "";
step-10: run cmd=echo "Local Tools:";
step-11: run cmd=command -v ollama > /dev/null 2>&1 && echo "✅ Ollama installed" || echo "❌ Ollama not installed";
step-12: run cmd=ollama list > /dev/null 2>&1 && echo "✅ Ollama running" || echo "❌ Ollama not running";
step-13: run cmd=command -v redis-cli > /dev/null 2>&1 && echo "✅ Redis CLI installed" || echo "❌ Redis CLI not installed";
step-14: run cmd=echo "";
step-15: run cmd=echo "Virtual Environment:";
step-16: run cmd=test -d .venv && echo "✅ .venv exists" || echo "❌ .venv not found";
step-17: run cmd=test -f .venv/bin/python && echo "✅ Python in .venv" || echo "❌ Python not in .venv";
step-18: run cmd=echo "";
step-19: run cmd=echo "Configuration Files:";
step-20: run cmd=test -f .env && echo "✅ .env exists" || echo "❌ .env not found";
step-21: run cmd=test -f llx.yaml && echo "✅ llx.yaml exists" || echo "❌ llx.yaml not found";
step-22: run cmd=test -f litellm-config.yaml && echo "✅ litellm-config.yaml exists" || echo "❌ litellm-config.yaml not found";
step-23: run cmd=test -f docker-compose.yml && echo "✅ docker-compose.yml exists" || echo "❌ docker-compose.yml not found";
step-24: run cmd=echo "";
step-25: run cmd=echo "API Keys:";
step-26: run cmd=grep -q "ANTHROPIC_API_KEY=" .env && echo "✅ ANTHROPIC_API_KEY configured" || echo "❌ ANTHROPIC_API_KEY not configured";
step-27: run cmd=grep -q "OPENROUTER_API_KEY=" .env && echo "✅ OPENROUTER_API_KEY configured" || echo "❌ OPENROUTER_API_KEY not configured";
step-28: run cmd=echo "";
step-29: run cmd=echo "Docker Services:";
step-30: run cmd=docker ps --format "table {{.Names}}\t{{.Status}}" | grep -E "llx-|llx_" || echo "❌ No llx containers running";
step-31: run cmd=echo "";
step-32: run cmd=echo "Local Ollama Models:";
step-33: run cmd=ollama list 2>/dev/null | head -5 || echo "❌ No local models";
}
workflow[name="backup"] {
trigger: "manual";
step-1: run cmd=echo "💾 Creating backups...";
step-2: run cmd=./docker-manage.sh backup;
step-3: run cmd=echo "✅ Backup completed!";
}
workflow[name="quick-test"] {
trigger: "manual";
step-1: run cmd=echo "⚡ Quick test...";
step-2: run cmd=.venv/bin/python -c "from llx import analyze_project, select_model; print('✅ llx imports working')";
}
workflow[name="quick-start"] {
trigger: "manual";
step-1: run cmd=echo "⚡ Quick start...";
step-2: run cmd=$(MAKE) install;
step-3: run cmd=$(MAKE) install-tools;
step-4: run cmd=$(MAKE) docker-dev;
step-5: run cmd=echo "✅ Quick start completed!";
step-6: run cmd=echo "Services: http://localhost:4000 (API), http://localhost:3000 (WebUI)";
}
workflow[name="ci-install"] {
trigger: "manual";
step-1: run cmd=echo "🔧 CI installation...";
step-2: run cmd=python -m venv .venv;
step-3: run cmd=.venv/bin/pip install --upgrade pip;
step-4: run cmd=.venv/bin/pip install -e .;
step-5: run cmd=.venv/bin/pip install -r requirements-dev.txt;
}
workflow[name="ci-test"] {
trigger: "manual";
step-1: run cmd=echo "🧪 CI testing...";
step-2: run cmd=.venv/bin/python -m pytest tests/ -v --cov=llx --cov-report=xml --cov-report=html;
}
workflow[name="ci-lint"] {
trigger: "manual";
step-1: run cmd=echo "🔍 CI linting...";
step-2: run cmd=.venv/bin/python -m flake8 llx/ --max-line-length=100 --ignore=E203,W503 --output-format=github;
step-3: run cmd=.venv/bin/python -m mypy llx/ --ignore-missing-imports --junit-xml test-results.xml;
}
workflow[name="ci-build"] {
trigger: "manual";
step-1: run cmd=echo "🐳 CI build...";
step-2: run cmd=docker build -t llx:${BUILD_NUMBER:-latest} .;
step-3: run cmd=docker tag llx:${BUILD_NUMBER:-latest} llx:latest;
}
workflow[name="version"] {
trigger: "manual";
step-1: run cmd=echo "📦 Version information...";
step-2: run cmd=.venv/bin/python -c "import llx; print(f'llx version: {llx.__version__}')";
}
workflow[name="tag"] {
trigger: "manual";
step-1: run cmd=echo "🏷️ Creating git tag...";
step-2: run cmd=if [ -z "$(VERSION)" ]; then \;
step-3: run cmd=echo "Usage: make tag VERSION=v1.0.0"; \;
step-4: run cmd=exit 1; \;
step-5: run cmd=fi;
step-6: run cmd=git tag $(VERSION);
step-7: run cmd=git push origin $(VERSION);
}
workflow[name="docs"] {
trigger: "manual";
step-1: run cmd=echo "📚 Building documentation...";
step-2: run cmd=.venv/bin/python -m mkdocs build;
}
workflow[name="docs-serve"] {
trigger: "manual";
step-1: run cmd=echo "📚 Serving documentation...";
step-2: run cmd=.venv/bin/python -m mkdocs serve;
}
workflow[name="profile"] {
trigger: "manual";
step-1: run cmd=echo "📊 Running performance profile...";
step-2: run cmd=.venv/bin/python -m cProfile -o profile.stats -m llx analyze .;
step-3: run cmd=.venv/bin/python -c "import pstats; p = pstats.Stats('profile.stats'); p.sort_stats('cumulative'); p.print_stats(20)";
}
workflow[name="security"] {
trigger: "manual";
step-1: run cmd=echo "🔒 Running security scan...";
step-2: run cmd=.venv/bin/pip install safety bandit;
step-3: run cmd=.venv/bin/safety check;
step-4: run cmd=.venv/bin/bandit -r llx/;
}
workflow[name="db-reset"] {
trigger: "manual";
step-1: run cmd=echo "🗄️ Resetting database...";
step-2: run cmd=docker exec llx-postgres-prod psql -U llx -d llx -c "DROP SCHEMA IF EXISTS llx CASCADE; CREATE SCHEMA llx;";
step-3: run cmd=docker exec llx-postgres-prod psql -U llx -d llx -f /docker-entrypoint-initdb.d/init.sql;
}
workflow[name="db-migrate"] {
trigger: "manual";
step-1: run cmd=echo "🗄️ Running database migrations...";
step-2: run cmd=# Add migration commands here;
}
workflow[name="env-dev"] {
trigger: "manual";
step-1: run cmd=echo "🔧 Setting up development environment...";
step-2: run cmd=cp .env.example .env.dev;
step-3: run cmd=echo "✅ Created .env.dev - please edit with your values";
}
workflow[name="env-prod"] {
trigger: "manual";
step-1: run cmd=echo "🔧 Setting up production environment...";
step-2: run cmd=cp .env.example .env.prod;
step-3: run cmd=echo "✅ Created .env.prod - please edit with production values";
}
workflow[name="up"] {
trigger: "manual";
step-1: depend target=dev;
}
workflow[name="down"] {
trigger: "manual";
step-1: depend target=docker-stop;
}
workflow[name="logs"] {
trigger: "manual";
step-1: depend target=docker-logs;
}
workflow[name="ps"] {
trigger: "manual";
step-1: depend target=docker-status;
}
workflow[name="fmt"] {
trigger: "manual";
step-1: run cmd=ruff format .;
}
workflow[name="build"] {
trigger: "manual";
step-1: run cmd=python -m build;
}
workflow[name="health"] {
trigger: "manual";
step-1: run cmd=docker compose ps;
step-2: run cmd=docker compose exec app echo "Health check passed";
}
workflow[name="docker-build"] {
trigger: "manual";
step-1: run cmd=docker build -t llx:latest .;
}
workflow[name="import-makefile-hint"] {
trigger: "manual";
step-1: run cmd=echo 'Run: taskfile import Makefile to import existing targets.';
}
workflow[name="help"] {
trigger: "manual";
step-1: run cmd=echo \"\U0001F680 llx Development Commands\;
step-2: run cmd=echo "==========================";
step-3: run cmd=echo "";
step-4: run cmd=echo "Setup:";
step-5: run cmd=echo " install Install llx in development mode";
step-6: run cmd=echo " install-tools Install local development tools";
step-7: run cmd=echo "";
step-8: run cmd=echo "Development:";
step-9: run cmd=echo " dev Start development Docker stack";
step-10: run cmd=echo " prod Start production Docker stack";
step-11: run cmd=echo " test Run tests";
step-12: run cmd=echo " lint Run linting";
step-13: run cmd=echo " format Format code";
step-14: run cmd=echo "";
step-15: run cmd=echo "Docker:";
step-16: run cmd=echo " docker-dev Start development containers";
step-17: run cmd=echo " docker-prod Start production containers";
step-18: run cmd=echo " docker-stop Stop all containers";
step-19: run cmd=echo " docker-clean Clean Docker resources";
step-20: run cmd=echo " docker-logs Show logs";
step-21: run cmd=echo "";
step-22: run cmd=echo "Examples:";
step-23: run cmd=echo " examples-basic Run basic example";
step-24: run cmd=echo " examples-docker Run Docker example";
step-25: run cmd=echo " examples-proxy Run proxy example";
step-26: run cmd=echo "";
step-27: run cmd=echo "Utilities:";
step-28: run cmd=echo " clean Clean temporary files";
step-29: run cmd=echo " backup Create backups";
step-30: run cmd=echo " doctor Check system health";
}
deploy {
target: docker-compose;
compose_file: docker-compose.yml;
}
environment[name="local"] {
runtime: docker-compose;
env_file: ".env";
}
environment[name="backup"] {
runtime: docker-compose;
env_file: ".env.backup";
}
environment[name="new"] {
runtime: docker-compose;
env_file: ".env.new";
}
workflow[name="all"] {
trigger: "manual";
step-1: run cmd=taskfile run install;
step-2: run cmd=taskfile run lint;
step-3: run cmd=taskfile run test;
}