diegosouzapw
388f06c74f
feat(ui): export 6 shared components + notificationStore, wire into layout
...
Batch 3 — Barrel Exports + Layout:
- shared/components/index.js: export Breadcrumbs, EmptyState, NotificationToast,
FilterBar, ColumnToggle, DataTable
- store/index.js: export useNotificationStore
- DashboardLayout.js: render <Breadcrumbs/> between Header and content,
render <NotificationToast/> as global fixed overlay
Build verified: exit code 0
2026-02-14 20:15:33 -03:00
Diego Rodrigues de Sa e Souza
91f6750d59
Merge pull request #28 from diegosouzapw/feature/api-routes
...
feat(api): create 9 API routes for backend module access
2026-02-14 20:11:42 -03:00
diegosouzapw
7e066df6cd
feat(api): create 9 API routes for backend module access
...
Batch 2 — API Routes:
- /api/cache/stats — GET cache stats, DELETE flush
- /api/models/availability — GET availability report, POST clear cooldown
- /api/telemetry/summary — GET p50/p95/p99 latency metrics
- /api/usage/budget — GET cost summary, POST set budget per key
- /api/fallback/chains — GET/POST/DELETE fallback chain management
- /api/compliance/audit-log — GET filterable audit log
- /api/evals — GET list suites, POST run suite
- /api/evals/[suiteId] — GET suite details
- /api/policies — GET circuit breaker + lockout status, POST force-unlock
Build verified: exit code 0
2026-02-14 20:11:27 -03:00
Diego Rodrigues de Sa e Souza
33f8123835
Merge pull request #27 from diegosouzapw/feature/pipeline-wiring
...
feat(pipeline): wire 7 backend modules into request pipeline
2026-02-14 20:07:02 -03:00
diegosouzapw
e87067f2fb
feat(pipeline): wire 7 backend modules into request pipeline
...
Batch 1 — Pipeline Wiring:
- server-init.js: initialize compliance audit_log, run expired log cleanup, log server.start
- chat.js: wire circuitBreaker (provider resilience), modelAvailability (TTL cooldowns),
requestTelemetry (7-phase lifecycle), requestId, costRules (budget check/record),
compliance audit logging. All wiring is non-breaking with try/catch guards.
- proxy.js: replace bare fetch() with fetchWithTimeout (5s timeout on /api/settings),
add X-Request-Id header for end-to-end tracing
- 307/307 tests pass, build succeeds
2026-02-14 20:06:44 -03:00
diegosouzapw
a9a85fdc1b
fix: add Record type annotation to getAllFallbackChains result
2026-02-14 19:43:19 -03:00
Diego Rodrigues de Sa e Souza
31c09f08e1
Merge pull request #26 from diegosouzapw/fix/eslint-v9-compatibility
...
fix: downgrade ESLint v10→v9 for eslint-config-next compatibility
2026-02-14 19:36:19 -03:00
diegosouzapw
3e89560a33
fix: downgrade ESLint v10→v9 for eslint-config-next compatibility
...
- ESLint 10 broke with scopeManager.addGlobals error (eslint-config-next plugins only support ≤v9)
- Rewrote eslint.config.mjs: removed defineConfig/globalIgnores (ESLint 10-only APIs)
- Now using ESLint 9 flat config format with plain array export
- Fixed TS lint warnings in compliance/index.js and a11yAudit.js
- Added omniroute-reset-password bin entry to package.json
- Lint passes cleanly (1 pre-existing React useState-in-effect warning)
- All 144 tests pass
2026-02-14 19:36:01 -03:00
Diego Rodrigues de Sa e Souza
2dbb717377
Merge pull request #25 from diegosouzapw/feature/batch-b-final-tasks
...
feat: complete all 46 tasks — Batch B final (T-30, T-33, T-35, T-38, T-39, T-42, T-43)
2026-02-14 19:18:27 -03:00
diegosouzapw
f44ec7e1f2
feat: complete all 46 tasks — ADRs, eval framework, compliance, a11y, CLI, Playwright specs (Batch B)
...
T-30 — ADRs:
- 6 ADRs: SQLite, Fallback Strategy, OAuth, JS+JSDoc, Single-Tenant, Translator Registry
T-33 — JSDoc Coverage:
- Full JSDoc on all new modules (100% exported functions documented)
T-35 — Accessibility:
- a11yAudit.js: lightweight WCAG AA checker (aria-label, dialog role, alt text, labels)
T-38 — Password Reset CLI:
- bin/reset-password.mjs: interactive CLI tool for admin password reset
T-39 — Playwright Specs:
- tests/e2e/responsiveSpecs.mjs: viewports (375/768/1280), 4 pages, test matrix
T-42 — Eval Framework:
- evalRunner.js: 4 strategies (exact, contains, regex, custom) + golden set (10 cases)
T-43 — Compliance:
- audit_log table, noLog opt-out per API key, LOG_RETENTION_DAYS cleanup
TASKS.md: 46/46 Concluído ✅
Tests: 144/144 pass (119 existing + 25 new)
2026-02-14 19:18:02 -03:00
Diego Rodrigues de Sa e Souza
ad003b6226
Merge pull request #24 from diegosouzapw/feature/batch-a-domain-infra
...
feat: domain layer, error codes, request ID, fetch timeout (Batch A)
2026-02-14 19:04:15 -03:00
diegosouzapw
c09978454b
feat: domain layer, error codes, request ID, fetch timeout, JSDoc (T-19, T-22, T-23, T-25, T-27)
...
T-19 — Domain Layer:
- modelAvailability.js: Model availability tracking with TTL cooldowns
- costRules.js: Per-API-key budget management with daily/monthly limits
- fallbackPolicy.js: Declarative fallback chain routing
T-22 — Error Codes Catalog:
- errorCodes.js: 24 codes in 6 categories + createErrorResponse helper
T-23 — Correlation ID:
- requestId.js: AsyncLocalStorage-based x-request-id propagation
T-25 — Fetch Timeout:
- fetchTimeout.js: AbortController wrapper with FETCH_TIMEOUT_MS env var
T-27 — JSDoc + @ts-check:
- Added @ts-check to 8 critical files
TASKS.md updated: 37/46 tasks Concluído, 9 remaining
Tests: 119/119 pass (88 existing + 31 new)
2026-02-14 19:03:55 -03:00
Diego Rodrigues de Sa e Souza
daffd6c9ca
Merge pull request #23 from diegosouzapw/feature/decomposition-t15-t28-t29
...
refactor: decompose usageDb, chat handler, UI (T-15, T-28, T-29)
2026-02-14 18:53:34 -03:00
diegosouzapw
492afc4ff1
refactor: decompose usageDb, handleSingleModelChat, UI components (T-15, T-28, T-29)
...
T-15 — Decompose usageDb.js (969→40 lines):
- Extract src/lib/usage/migrations.js (legacy + JSON→SQLite migration)
- Extract src/lib/usage/usageHistory.js (tracking, pending, log.txt)
- Extract src/lib/usage/costCalculator.js (pure cost calculation)
- Extract src/lib/usage/usageStats.js (dashboard aggregation)
- Extract src/lib/usage/callLogs.js (structured logs, CRUD, rotation)
- usageDb.js is now a thin facade re-exporting all functions
T-28 — Decompose handleSingleModelChat (183→80 lines):
- Extract handleNoCredentials() — credential error responses
- Extract safeResolveProxy() — proxy resolution with error handling
- Extract safeLogEvents() — fire-and-forget proxy + translation logging
- Also created chatHelpers.js with standalone helper exports
T-29 — Extract shared UI primitives (3230 total lines):
- FilterBar.js — search input + filter chips dropdown
- ColumnToggle.js — table column visibility toggle
- DataTable.js — generic data table with sticky header, loading/empty
Tests: 88/88 pass (no regressions)
2026-02-14 18:53:14 -03:00
Diego Rodrigues de Sa e Souza
967689d0a1
Merge pull request #22 from diegosouzapw/feature/remaining-tasks
...
feat(remaining): deferred tasks — error pages, UX, telemetry, domain
2026-02-14 18:43:30 -03:00
diegosouzapw
f77dd89d53
feat(remaining): deferred tasks — error pages, UX components, telemetry, domain extraction
...
T-20 — .gitignore cleanup:
- Add .analysis/ and antigravity-manager-analysis/ to gitignore
- Whitelist FASE docs, PLANO-IMPLANTACAO.md, TASKS.md
T-21 — Error pages:
- Create not-found.js (404 page with gradient design)
- Create global-error.js (root error boundary with dev details)
T-36 — Breadcrumbs:
- Create Breadcrumbs.js with path-to-label mapping and ARIA semantics
T-37 — Empty states:
- Create EmptyState.js with bounce animation and optional CTA
T-45 — Request telemetry:
- Create requestTelemetry.js (7-phase lifecycle, p50/p95/p99 aggregation)
T-46 — Domain extraction:
- Create comboResolver.js (priority/round-robin/random/least-used strategies)
- Create lockoutPolicy.js (sliding window lockout with force-unlock)
Tests: 13/13 new tests pass (88/88 total)
2026-02-14 18:43:07 -03:00
Diego Rodrigues de Sa e Souza
0a5434cae5
Merge pull request #21 from diegosouzapw/feature/security-hardening
...
feat(security): FASE-01 to FASE-09 — Security Hardening & Advanced Features
2026-02-14 18:31:31 -03:00
diegosouzapw
2178e99da7
feat(advanced): FASE-07 to FASE-09 advanced features
...
FASE-07 — UX & Microinteractions:
- Create notificationStore.js (Zustand global toast store)
- Create NotificationToast.js (glassmorphism toast UI with ARIA)
FASE-08 — LLM Proxy Advanced:
- Create policyEngine.js (declarative routing/budget/access policies)
- Create cacheLayer.js (LRU cache with content hashing and TTL)
FASE-09 — E2E Flow Hardening:
- Create streamState.js (SSE stream state machine with TTFB tracking)
Tests: 23/23 advanced tests pass (75/75 total across all suites)
2026-02-14 18:28:55 -03:00
diegosouzapw
1cbbc33f20
feat(security): FASE-01 to FASE-06 security hardening
...
FASE-01 — Security Hardening:
- Remove hardcoded JWT_SECRET and API_KEY_SECRET fallbacks (fail-fast)
- Create secretsValidator.js with enforceSecrets() at startup
- Create inputSanitizer.js (prompt injection + PII detection)
- Integrate sanitizer in chat.js handler pipeline
- Add structured logging to silent catch blocks in proxy.js
- Remove .passthrough() from Zod updateSettingsSchema
- Remove insecure npm fs dependency
- Update .env.example with generation commands
FASE-02 — CI/CD & Tests:
- Create ci.yml workflow (lint, build, test, coverage, e2e)
- Fix test scripts (test now runs actual tests)
- Add test:unit, test:security, test:coverage (c8), test:all
- Add security rules to ESLint (no-eval, no-implied-eval, no-new-func)
FASE-03 — Architecture:
- Create settingsCache.js (eliminate self-fetch anti-pattern)
- Create domain/types.js and domain/responses.js
FASE-04 — Observability:
- Create correlationId.js (AsyncLocalStorage tracing)
- Create circuitBreaker.js (full state machine + registry)
- Create requestTimeout.js (per-provider timeouts)
FASE-05 — Code Quality:
- Create structuredLogger.js (JSON/human-readable logging)
FASE-06 — Documentation:
- Update SECURITY.md with hardening practices
- Create CONTRIBUTING.md with dev setup and PR checklist
Tests: 52/52 pass (23 security + 15 observability + 14 integration)
2026-02-14 18:21:47 -03:00
Diego Rodrigues de Sa e Souza
d408be489c
Merge pull request #20 from diegosouzapw/feature/v0.2.0-release
...
feat: v0.2.0 — advanced routing services, cost analytics, pricing overhaul
v0.2.0
2026-02-14 13:51:18 -03:00
diegosouzapw
81a4f2986c
feat: v0.2.0 — advanced routing services, cost analytics dashboard, pricing overhaul
...
Added:
- 8 new open-sse services (account selector, IP filter, session manager, etc.)
- 6 new dashboard settings tabs (IP filter, system prompt, thinking budget, pricing)
- Usage cost dashboard with provider cost donut, cost trend line, model cost column
- Pricing API merging registry + custom + pricing-only models
- 9 unit tests for all new services
Changed:
- Usage analytics layout redesigned with prominent cost display
- DailyTrendChart upgraded to ComposedChart with dual Y-axes
Fixed:
- Pricing page now shows custom/imported models
- Icon rendering (material-symbols-rounded → outlined)
2026-02-14 13:50:45 -03:00
Diego Rodrigues de Sa e Souza
c1f1069a06
docs: add npm badge, CLI options table, and automated release section to README ( #19 )
...
Co-authored-by: diegosouzapw <diegosouzapw@users.noreply.github.com >
2026-02-14 04:47:08 -03:00
Diego Rodrigues de Sa e Souza
c4cdb52fe6
fix(ci): reference NPM_TOKEN environment for environment-scoped secrets ( #18 )
...
Co-authored-by: diegosouzapw <diegosouzapw@users.noreply.github.com >
v0.1.0
2026-02-14 04:31:26 -03:00
Diego Rodrigues de Sa e Souza
15ec100dcb
fix(ci): write .npmrc explicitly for npm auth — support both secrets and vars ( #17 )
...
Co-authored-by: diegosouzapw <diegosouzapw@users.noreply.github.com >
2026-02-14 04:26:05 -03:00
Diego Rodrigues de Sa e Souza
d401ef40f1
fix(ci): support NPM_TOKEN from both secrets and vars, remove --provenance ( #16 )
...
Co-authored-by: diegosouzapw <diegosouzapw@users.noreply.github.com >
2026-02-14 04:22:00 -03:00
Diego Rodrigues de Sa e Souza
92b4c59fec
feat(npm): add npm package publishing with CLI entry point ( #15 )
...
- Add bin/omniroute.mjs CLI with banner, auto-open browser, graceful shutdown
- Add scripts/prepublish.mjs to build Next.js standalone into app/
- Add .github/workflows/npm-publish.yml for automated publish on release
- Update package.json: name=omniroute, bin, files, engines, keywords, prepublishOnly
- Add output: 'standalone' to next.config.mjs
- Add MIT LICENSE
- Update .npmignore and .gitignore for app/ build artifact
Co-authored-by: diegosouzapw <diegosouzapw@users.noreply.github.com >
2026-02-14 04:14:14 -03:00
Diego Rodrigues de Sa e Souza
4f0155eb4a
Create SECURITY.md for security policy
...
Added a security policy document outlining supported versions and vulnerability reporting.
2026-02-13 23:21:18 -03:00
Diego Rodrigues de Sa e Souza
e544d81624
Merge pull request #13 from diegosouzapw/dependabot/npm_and_yarn/qs-6.14.2
...
deps: bump qs from 6.14.1 to 6.14.2
2026-02-13 23:19:59 -03:00
Diego Rodrigues de Sa e Souza
b8c50cc62d
Merge pull request #14 from diegosouzapw/feature/new-endpoints-and-providers
...
feat: add new endpoints (rerank, audio, moderations) and providers (Hyperbolic, Deepgram, AssemblyAI, NanoBanana)
2026-02-13 22:58:15 -03:00
diegosouzapw
c6000ecc8e
feat(providers): add new endpoints (rerank, audio, moderations) and providers (Hyperbolic, Deepgram, AssemblyAI, NanoBanana)
...
- Add /v1/rerank endpoint with Cohere, Together, NVIDIA, Fireworks
- Add /v1/audio/transcriptions with OpenAI, Groq, Deepgram, AssemblyAI
- Add /v1/audio/speech with OpenAI, Hyperbolic, Deepgram
- Add /v1/moderations with OpenAI
- Add Hyperbolic as chat provider (8 models, OpenAI-compatible)
- Add Hyperbolic image generation (SDXL, SD2, FLUX)
- Add NanoBanana image generation (Flash + Pro via nanobananaapi.ai)
- Add Deepgram STT (Nova 3, Nova 2) with Token auth and binary format
- Add AssemblyAI STT (Universal 3 Pro) with async upload-poll workflow
- Add Deepgram TTS (Aura voices) and Hyperbolic TTS (Melo)
- Update EndpointPageClient to show 7 endpoint sections
- Update /v1/models to return type/subtype for all model categories
- Fix build: remove output:standalone from next.config.mjs
2026-02-13 22:57:32 -03:00
diegosouzapw
4e6ba7d9cc
docs: Restructure changelog to Keep a Changelog format and add entries for model selector autocomplete and OpenAPI specification.
2026-02-13 21:35:06 -03:00
diegosouzapw
c0c2816671
feat: Implement model selection and dynamic model fetching in ChatTesterMode and TestBenchMode.
2026-02-13 21:11:19 -03:00
diegosouzapw
80cc76d531
fix: Ensure server port is free before startup by killing existing processes.
2026-02-13 20:59:11 -03:00
dependabot[bot]
af1ffab63d
deps: bump qs from 6.14.1 to 6.14.2
...
Bumps [qs](https://github.com/ljharb/qs ) from 6.14.1 to 6.14.2.
- [Changelog](https://github.com/ljharb/qs/blob/main/CHANGELOG.md )
- [Commits](https://github.com/ljharb/qs/compare/v6.14.1...v6.14.2 )
---
updated-dependencies:
- dependency-name: qs
dependency-version: 6.14.2
dependency-type: indirect
...
Signed-off-by: dependabot[bot] <support@github.com >
2026-02-13 23:58:54 +00:00
diegosouzapw
7ff1ba978a
feat: add OpenAPI specification, generate package-lock, and remove various SVG assets from the public directory.
2026-02-13 20:57:44 -03:00
diegosouzapw
d43bbf77fe
feat: Enhance restart.sh to include clean build, robust server startup with health check, graceful shutdown, and real-time log tailing.
2026-02-13 20:47:12 -03:00
Diego Rodrigues de Sa e Souza
4e5dc6a80b
Merge pull request #12 from diegosouzapw/fix/select-dark-theme
...
fix(ui): fix Select dropdown dark theme inconsistency
2026-02-13 19:22:36 -03:00
diegosouzapw
0be2852af2
fix(ui): fix Select dropdown dark theme inconsistency
...
Use bg-surface (theme-aware) instead of bg-white for select and
option elements. Prevents white dropdown panels in dark mode.
2026-02-13 19:22:09 -03:00
Diego Rodrigues de Sa e Souza
b3c36ed2ca
Merge pull request #11 from diegosouzapw/chore/rebrand-ui-omniroute
...
chore(ui): rebrand to OmniRoute
2026-02-13 19:14:19 -03:00
diegosouzapw
2b1b8e4539
chore(ui): rebrand to OmniRoute
...
- Sidebar: 'Endpoint Proxy' → 'OmniRoute'
- Page title: 'OmniRoute — AI Gateway for Multi-Provider LLMs'
- Description updated across layout and config
2026-02-13 19:13:57 -03:00
Diego Rodrigues de Sa e Souza
8b7b50f6fb
Merge pull request #10 from diegosouzapw/fix/cloud-sync-404-spam
...
fix(sync): disable cloud sync and truncate error logs
2026-02-13 19:01:53 -03:00
diegosouzapw
9c0ba39ed6
fix(sync): disable cloud sync and truncate error logs
...
CLOUD_URL was pointing to omniroute.com which doesn't have a /sync/
endpoint, causing repeated 404 HTML dumps in console logs.
- Clear CLOUD_URL to disable cloud sync until server is ready
- Truncate sync error text to 200 chars to prevent HTML spam in logs
2026-02-13 19:01:31 -03:00
Diego Rodrigues de Sa e Souza
801a050995
Merge pull request #9 from diegosouzapw/feat/enable-socks5-proxy
...
feat(proxy): enable SOCKS5 proxy support by default
2026-02-13 18:30:08 -03:00
diegosouzapw
e7532d7189
feat(proxy): enable SOCKS5 proxy support by default
...
SOCKS5 was already fully implemented in both backend
(proxyDispatcher.js) and frontend (ProxyConfigModal.js).
Enable the feature flags to show SOCKS5 option in the UI.
2026-02-13 18:29:49 -03:00
Diego Rodrigues de Sa e Souza
7349052b33
Merge pull request #8 from diegosouzapw/fix/test-token-corruption
...
fix(oauth): prevent connection test from corrupting valid tokens
2026-02-13 18:09:52 -03:00
diegosouzapw
0af22a558f
fix(oauth): prevent connection test from corrupting valid tokens
...
Only attempt token refresh on 401/403 during connection tests when
the token is actually expired (isTokenExpired). Previously, any 401/403
triggered an aggressive refresh that could overwrite valid tokens when
the upstream returned transient errors (rate-limiting, etc.).
Fixes Cline, Qwen, and iFlow losing authentication after tests.
2026-02-13 18:09:28 -03:00
Diego Rodrigues de Sa e Souza
3206583299
Merge pull request #7 from diegosouzapw/fix/iflow-secret-env-sync
...
chore(env): sync .env.example with current .env structure
2026-02-13 17:47:58 -03:00
diegosouzapw
575bda7375
chore(env): sync .env.example with current .env structure
...
Add missing Storage (SQLite) section, INSTANCE_NAME, and
align all sections with the actual .env file.
2026-02-13 17:47:38 -03:00
Diego Rodrigues de Sa e Souza
b3cde151c3
Merge pull request #6 from diegosouzapw/fix/oauth-upsert-broadened
...
fix(oauth): broaden upsert to match any existing connection
2026-02-13 17:30:16 -03:00
diegosouzapw
b7e757f3ba
fix(oauth): broaden upsert to match any existing connection
...
Remove test_status restriction from the no-email upsert fallback.
Now matches any existing OAuth connection for the same provider
(not just failed ones), preventing duplicates regardless of status.
2026-02-13 17:29:51 -03:00