根本原因:Dio interceptor 的 onError/onRequest 签名是 void, 标 async 后变成 Future<void> 但没人 await,内部异常全部变成 Unhandled Exception 崩溃。 修复: - RetryInterceptor: onError 改为同步调度,retry 逻辑移到独立 _retry() 方法并用 try/catch 包裹全部路径 - DedupInterceptor: 防止 Completer 重复 complete,retry 请求 跳过去重避免与原始请求冲突 - TokenInterceptor: onRequest 和 onError 的 async lambda 全部 包裹 try/catch,异常时 fallback 到 handler.next() - main.dart: 三层全局错误兜底 — 1) FlutterError.onError 捕获框架错误 2) PlatformDispatcher.onError 捕获平台通道错误 3) runZonedGuarded 捕获所有漏网的异步异常 - receiveTimeout/sendTimeout 不再触发重试(服务器已收到请求) - 超时调整: connect 10s, send 30s, receive 30s - 仪表盘卡片 IntrinsicHeight 等高对齐 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> |
||
|---|---|---|
| deploy | ||
| docs | ||
| it0-web-admin | ||
| it0_app | ||
| packages | ||
| .dockerignore | ||
| .env.example | ||
| .gitignore | ||
| Dockerfile.service | ||
| README.md | ||
| logo.svg | ||
| package.json | ||
| pnpm-lock.yaml | ||
| pnpm-workspace.yaml | ||
| tsconfig.base.json | ||
| turbo.json | ||
README.md
IT0 — AI-Powered Server Cluster Operations Platform
Intelligent operations platform that combines AI agents with human oversight for managing server clusters.
Architecture
- Backend: NestJS microservices (TypeScript) with DDD + Clean Architecture
- Mobile: Flutter app with Riverpod state management
- Web Admin: Next.js dashboard with Zustand + React Query
- Voice: Python service for voice-based interaction (STT/TTS/VAD)
Services
| Service | Description |
|---|---|
| auth-service | Authentication, RBAC, API key management |
| agent-service | AI agent orchestration (Claude CLI + API) |
| inventory-service | Server, cluster, credential management |
| monitor-service | Metrics collection, alerting, health checks |
| ops-service | Task execution, approvals, standing orders |
| comm-service | Multi-channel notifications, escalation |
| audit-service | Audit logging, compliance trail |
| voice-service | Voice pipeline (Python) |
Quick Start
# Backend
pnpm install
pnpm dev
# Flutter
cd it0_app && flutter pub get && flutter run
# Web Admin
cd it0-web-admin && pnpm install && pnpm dev
Tech Stack
- Runtime: Node.js 20+, Dart 3.x, Python 3.11+
- Database: PostgreSQL (schema-per-tenant)
- Cache/Events: Redis Streams
- AI: Anthropic Claude (CLI + API)
- Build: pnpm workspaces + Turborepo