SRouter v0.1.3
SRouter v0.1.3
SRouter v0.1.3 brings major architectural improvements with strict TypeScript type safety, full monorepo-wide PascalCase standardizations, new provider additions (CodeBuddy CN), Gemini & Antigravity token cache mapping, native multi-arch Docker CI pipelines, and a refined password-first dashboard authentication flow.
🚀 Key Highlights & New Features
🇨🇳 CodeBuddy CN Provider Support
- Full OAuth Device Flow & Quota Integration: Seamlessly connect CodeBuddy CN accounts via device-code flow with automated token refresh and real-time live quota monitoring.
🧠 Antigravity & Gemini Token Cache Mapping
- Cache Token Awareness: Integrated
cachedContentTokenCountusage translation for Gemini / Antigravity payload adapters to accurately evaluate cached prompt costs. - Standardized Antigravity translator namespace across packages.
🔒 Password-First Dashboard Auth & Remote Access
- Streamlined Onboarding: Removed restrictive 12-character minimum password limits for local setups.
- Remote Access Routing Fix: Resolved
apiKeyAuthcatch-all interference that previously blocked dashboard UI assets and admin endpoints on remote setups.
🛡️ Monorepo-Wide Strict Type Safety & Clean Architecture
- Zero
unknown/anyPolicy: Eliminated loose type casts across dialect adapters (@srouter/translator), response builders, and event streams. - Strict SQLite Row Types: All database row models in
@srouter/dbstrictly map to concrete types (string,number,null). - Standardized PascalCase Conventions: Renamed and standardized all controllers (
AdminController,TunnelController,ChatController,AuthController,KeysController, etc.), middleware (AdminAuth,ApiKeyAuth,Validation), and domain logic. - Modular Zod Schemas: Extracted and centralized route validation schemas into
@srouter/types/src/schemas/. - Modular Provider Constants: Per-provider definitions, metadata, and catalogs isolated into
packages/constants/src/providers/. - Custom Models Deprecation: Cleaned up legacy custom models tables and database schemas in favor of direct catalog & provider matching.
⚡ Native Multi-Arch Docker CI
- Rebuilt GitHub Actions publishing pipeline to build
linux/amd64andlinux/arm64images on native runners with proper manifest annotations.
🔗 Pull Requests & Commits
- #59 —
refactor(translator): decompose message mappers and enforce strict typesby @seaavey - #58 —
feat(providers): remove custom models feature and clean up schemaby @seaavey - #57 —
refactor(db): enforce strict row typing and PascalCase query standardsby @seaavey - #56 —
chore(release): bump version to 0.1.2-rc.2 and modularize provider constantsby @seaavey - #54 —
refactor(routes): extract AdminController and TunnelController, add Zod schemas and clean route declarationsby @seaavey - #53 —
refactor(middleware): rename to ApiKeyAuth.ts & Validation.ts and enforce PascalCaseby @seaavey - #52 —
refactor(middleware): rename adminAuth.ts to AdminAuth.tsby @seaavey - #51 —
refactor(middleware): remove redundant adminAuth/requireAdmin aliases and enforce PascalCaseby @seaavey - #50 —
style: format all files with prettierby @seaavey - #49 —
refactor(models): standardize ModelsLogic to PascalCase, simplify matching and add Zod schemasby @seaavey - #48 —
refactor(controllers): standardize all API controllers with PascalCase and clean response helpersby @seaavey - #47 —
refactor(chat,providers): standardize controllers & logic with PascalCase and strict typingby @seaavey - #46 —
feat(auth,types,api): response helpers, zod modularization, and auth polling typesby @seaavey - #45 —
ci(docker): remove check-version job from docker-publish workflowby @seaavey - #44 —
refactor(auth): centralize auth types, namespace provider handlers, and clean controllersby @seaavey - #43 —
refactor(auth): simplify auth controller and routes to pure JSONby @seaavey - #41 —
feat(providers): add CodeBuddy CN provider with OAuth device flow and live quotaby @Sienz16 - #40 —
feat(auth): password-first setup, fix remote dashboard access, drop 12-char minimumby @Sienz16 - #39 —
ci(docker): fix merge job failure — quote labels, inspect real tagby @Sienz16 - #38 —
ci(docker): write digest to a file before uploading as artifactby @Sienz16 - #37 —
ci(docker): build multi-arch images on native runnersby @Sienz16
👥 Contributors
Huge thanks to everyone contributing to SRouter v0.1.3:
🐳 Docker Container & Quick Start
# Pull latest stable v0.1.3
docker pull ghcr.io/seaavey/srouter:0.1.3
docker pull ghcr.io/seaavey/srouter:latest
# Run container
docker run -d \
--name srouter \
-p 3000:3000 \
-p 1455:1455 \
-v srouter_data:/app/data \
ghcr.io/seaavey/srouter:0.1.3Full Changelog: v0.1.2...v0.1.3