问题描述:
在其他机器上构建报错:
"Error when reading 'lib/features/auth/data/models/auth_response.dart': 系统找不到指定的路径"
导致 AuthUser、AuthResponse 等类型找不到,编译失败。
根本原因:
根目录 .gitignore 第75行 "models/" 规则本意是忽略 ML 模型大文件,
但该规则匹配了所有目录名为 models/ 的路径,包括 Flutter 项目中
DDD 架构的 data/models/ 源码目录(共 11 个 models/ 目录、10 个 .dart 文件)。
这些文件在本地存在但从未被 Git 追踪,其他机器 pull 后缺失这些文件。
修复内容:
1. 修改 .gitignore: 将宽泛的 "models/" 替换为精确的规则
- packages/services/voice-service/models/ — voice-service 下载的 ML 模型
- *.pt, *.pth, *.safetensors — PyTorch/HuggingFace 模型二进制文件
- 不再影响 Flutter 的 data/models/ 源码目录
2. 提交之前被忽略的 10 个 Flutter model 文件:
- auth/data/models/auth_response.dart — 登录响应 (accessToken, refreshToken, user)
- chat/data/models/chat_message_model.dart — 聊天消息模型
- chat/data/models/session_model.dart — 会话模型
- chat/data/models/stream_event_model.dart — SSE 流事件模型
- servers/data/models/server_model.dart — 服务器状态模型
- approvals/data/models/approval_model.dart — 审批请求模型
- alerts/data/models/alert_event_model.dart — 告警事件模型
- agent_call/data/models/voice_session_model.dart — 语音会话模型
- standing_orders/data/models/standing_order_model.dart — 常设指令模型
- tasks/data/models/task_model.dart — 任务模型
3. 同时提交:
- it0_app/test/widget_test.dart — Flutter 默认测试
- packages/services/voice-service/src/models/__init__.py — Python 模块初始化
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