83 Commits

Author SHA1 Message Date
7c712bc931 fix: add python/main.py process aliases
All checks were successful
Deploy API Server / build-and-deploy (push) Successful in 39s
2026-05-22 14:09:15 +08:00
3079b2a18e fix: clean rewrite remote metrics with individual SSH calls
All checks were successful
Deploy API Server / build-and-deploy (push) Successful in 36s
2026-05-22 14:04:14 +08:00
27dfc1c028 fix: add newlines to remote SSH awk commands
All checks were successful
Deploy API Server / build-and-deploy (push) Successful in 37s
2026-05-22 14:00:31 +08:00
fc968830c5 fix: correct ps auxww column parsing + robust remote SSH script
All checks were successful
Deploy API Server / build-and-deploy (push) Successful in 36s
2026-05-22 13:57:26 +08:00
92173cb8c4 fix: single SSH script for remote metrics + Chinese uptime + process desc
All checks were successful
Deploy API Server / build-and-deploy (push) Successful in 38s
2026-05-22 13:51:19 +08:00
1776bed47e feat: friendly process names + data disk + public IPs + domains
All checks were successful
Deploy API Server / build-and-deploy (push) Successful in 36s
2026-05-22 13:42:42 +08:00
13a7718a3c fix: simplify remote SSH commands for reliability
All checks were successful
Deploy API Server / build-and-deploy (push) Successful in 37s
2026-05-22 13:34:08 +08:00
ad6112f4ab fix: use wangdl.pem for 4-core SSH
All checks were successful
Deploy API Server / build-and-deploy (push) Successful in 38s
2026-05-22 13:31:45 +08:00
f30a446bd5 feat: server metrics API — local os + remote SSH
All checks were successful
Deploy API Server / build-and-deploy (push) Successful in 38s
2026-05-22 13:30:44 +08:00
c31725433d feat: runs + SSE streaming proxy from Hermes /v1/runs
All checks were successful
Deploy API Server / build-and-deploy (push) Successful in 39s
2026-05-22 11:29:22 +08:00
aa0575b71b fix: normalize IP by stripping ::ffff: prefix
All checks were successful
Deploy API Server / build-and-deploy (push) Successful in 36s
2026-05-22 11:23:06 +08:00
63e73ecfaa fix: trust proxy for real client IP from Nginx
All checks were successful
Deploy API Server / build-and-deploy (push) Successful in 36s
2026-05-22 11:20:54 +08:00
f2d3f3f13f feat: add AdminMessage persistence + conversation title auto-set + messages API
Some checks failed
Deploy API Server / build-and-deploy (push) Failing after 21s
2026-05-22 11:03:24 +08:00
73e52d2201 fix: add validation decorators to conversation DTO
All checks were successful
Deploy API Server / build-and-deploy (push) Successful in 38s
2026-05-22 10:49:27 +08:00
f20bdc0d7a feat: add conversation management — sessionId + X-Hermes-Session-Id + CRUD
All checks were successful
Deploy API Server / build-and-deploy (push) Successful in 37s
2026-05-22 10:43:18 +08:00
3b42a8618a refactor: remove hardcoded system prompt — let Hermes handle natively
All checks were successful
Deploy API Server / build-and-deploy (push) Successful in 40s
2026-05-22 10:28:41 +08:00
c2e8f92abe refactor: remove DeepSeek fallback — Hermes only; fail fast on error
All checks were successful
Deploy API Server / build-and-deploy (push) Successful in 39s
2026-05-22 10:10:11 +08:00
6413936472 ci: fix missing DATABASE_URL env for prisma migrate
All checks were successful
Deploy API Server / build-and-deploy (push) Successful in 35s
2026-05-22 10:08:24 +08:00
ea7f6736df ci: add NestJS build + deploy — npm ci + prisma + nest build + rsync + restart
Some checks failed
Deploy API Server / build-and-deploy (push) Failing after 23s
2026-05-22 10:04:47 +08:00
WangDL
34774e5325 fix: type cast messages for DeepSeekProvider compatibility
All checks were successful
Deploy API Server / build-and-deploy (push) Successful in 12s
2026-05-22 00:28:12 +08:00
WangDL
a550ce2e67 feat: route admin chat through Hermes Agent API (DeepSeek fallback)
All checks were successful
Deploy API Server / build-and-deploy (push) Successful in 11s
2026-05-22 00:20:34 +08:00
WangDL
2b0bc92ebb feat: add hermes dashboard config endpoint to admin-ai-chat
All checks were successful
Deploy API Server / build-and-deploy (push) Successful in 12s
2026-05-22 00:02:14 +08:00
WangDL
f2d1c16299 fix: correct AdminRole import path in admin-ai-chat controller
All checks were successful
Deploy API Server / build-and-deploy (push) Successful in 9s
2026-05-21 23:58:56 +08:00
WangDL
017d78a8d6 fix: add admin-ai-chat module + fix AdminUsersModule PasswordService dependency
All checks were successful
Deploy API Server / build-and-deploy (push) Successful in 11s
2026-05-21 23:57:59 +08:00
b8a1fb0921 feat: add admin backend modules — dashboard, audit-log, admin-users
All checks were successful
Deploy API Server / build-and-deploy (push) Successful in 10s
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-21 17:22:48 +08:00
5a7c21dd60 feat: implement complete admin authentication system
All checks were successful
Deploy API Server / build-and-deploy (push) Successful in 9s
- Add AdminRole enum (SUPER_ADMIN/ADMIN/OPERATIONS/DEVELOPER/READONLY) with hierarchy
- Add PasswordService (bcryptjs, 12 rounds), AdminTokenService (type=admin JWT)
- Add AdminAuthService: login/lockout/refresh/logout with audit logging
- Add AdminAuthController: /admin-api/auth/{login,refresh,logout,me}
- Add AdminAuthGuard: validates type=admin, user status, session, lockout
- Add AdminRolesGuard + @AdminRoles() decorator for RBAC
- Add AdminAuditService for audit log persistence
- Add AdminLoginRateLimit (10 req/15min per IP)
- Add prisma/seed.ts for SUPER_ADMIN initialization via env vars
- Update JwtAuthGuard to skip /admin-api/* and /internal/* paths
- Update main.ts to exclude admin-api/internal from global 'api' prefix
- Update jwt.config.ts with admin JWT secrets and expiry config

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-21 15:05:31 +08:00
e5c6113b25 feat: add admin_users, admin_sessions, admin_audit_logs tables
All checks were successful
Deploy API Server / build-and-deploy (push) Successful in 13s
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-21 14:39:38 +08:00
69dbf24237 simplify CI: remove Docker deploy, keep only RAG Worker + health
All checks were successful
Deploy API Server / build-and-deploy (push) Successful in 10s
API runs via systemd on port 3000, Docker deployment not needed yet.
Health check now targets the actual running API.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-20 17:30:59 +08:00
1fb6dd4929 fix: Dockerfile build arg for prisma generate + cleanup deploy
Some checks failed
Deploy API Server / build-and-deploy (push) Failing after 1m42s
- Add ARG DATABASE_URL to Dockerfile so prisma generate works at build time
- Fix env file path (/opt/zhixi/env/ not /etc/zhixi/)
- Fix MySQL container name (mysql, not mysql-zhixi)
- Use correct DB name (zhixi_prod)
- Prevent duplicate mysql/redis containers from docker compose

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-20 17:25:35 +08:00
c64dc9c95a fix: correct .env.production path for Docker container
Some checks failed
Deploy API Server / build-and-deploy (push) Failing after 59s
/opt/zhixi/env/.env.production, not /etc/zhixi/.env.production

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-20 17:20:54 +08:00
b00c320496 fix: target prod runner (runs-on: prod) instead of ubuntu-latest
Some checks failed
Deploy API Server / build-and-deploy (push) Failing after 3m44s
Root cause: deploy.yml used runs-on: ubuntu-latest, which matched
the 4C4G web runner instead of the 8C32G prod runner. The web runner
doesn't have access to /opt/zhixi/, systemd, or Docker.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-20 17:11:02 +08:00
2d6c02609e fix CI: correct Gitea URL (10.2.0.7:3000) + sudo for systemctl
Some checks failed
Deploy API Server / build-and-deploy (push) Failing after 7s
Root cause: git clone http://localhost:3000 failed because port 3000
is NestJS, not Gitea. Use internal network URL instead.
Also add sudo to privileged commands and set -e to fail fast.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-20 16:57:16 +08:00
744f2118a8 fix: User=ubuntu in service file, simplify CI deploy step
Some checks failed
Deploy API Server / build-and-deploy (push) Failing after 7s
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-20 16:51:43 +08:00
7f70d0c78f fix: remove ExecStartPre, use systemd-run for optional self-test
Some checks failed
Deploy API Server / build-and-deploy (push) Failing after 8s
Service file is now minimal (no startup script dependency).
CI step verifies reranker importability via systemd-run on host.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-20 16:38:23 +08:00
88a2162b62 fix systemd: use startup.sh instead of inline ExecStartPre
Some checks failed
Deploy API Server / build-and-deploy (push) Failing after 7s
Multi-line Python in ExecStartPre is invalid systemd syntax.
Extract pip install + reranker self-test into startup.sh.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-20 16:32:22 +08:00
e0110fd8f8 fix CI: move Python deps + reranker test to systemd ExecStartPre
Some checks failed
Deploy API Server / build-and-deploy (push) Failing after 8s
Runner container lacks Python 3.11, so pip install and self-test
now run as ExecStartPre in zhixi-worker.service on the host.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-20 16:25:52 +08:00
9c8bd59620 add RAG Worker deploy + reranker test to CI/CD
Some checks failed
Deploy API Server / build-and-deploy (push) Failing after 7s
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-20 16:07:15 +08:00
c9882c8d04 add rerank module + bug fixes from e2e test
All checks were successful
Deploy API Server / build-and-deploy (push) Successful in 15s
- New reranker.py: SiliconFlow bge-reranker-v2-m3 integration
- config.py: add RERANK_MODEL
- api_client.py: fix get_next_job/claim_job/get_job_detail unwrapping
- candidate_generator.py: fix .format() conflict with JSON braces
- import_pipeline.py: fix file existence check + UUID point IDs
- Add .gitignore for __pycache__

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-20 16:05:09 +08:00
1947a0c0d5 revert: remove Agent View config from README and delete AI_BACKEND_WORKSPACE
All checks were successful
Deploy API Server / build-and-deploy (push) Successful in 15s
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-20 13:37:59 +08:00
536f406b73 docs: add AI Backend workspace template and For AI Agents section to README
All checks were successful
Deploy API Server / build-and-deploy (push) Successful in 14s
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-20 10:59:04 +08:00
WangDL
7e1f5c0e9b fix: 内部 RAG API 标记 @Public 绕过 JWT 认证
All checks were successful
Deploy API Server / build-and-deploy (push) Successful in 56s
2026-05-19 22:39:05 +08:00
WangDL
a0fafd0452 fix: TypeScript null check for RAG internal controller
All checks were successful
Deploy API Server / build-and-deploy (push) Successful in 55s
2026-05-19 22:36:18 +08:00
WangDL
fbdae9078f feat: Python RAG Worker + NestJS 内部 API(文档解析/切片/embedding/Qdrant/候选生成)
Some checks failed
Deploy API Server / build-and-deploy (push) Failing after 22s
2026-05-19 22:35:12 +08:00
WangDL
c149b96b04 fix: 完善 DocumentImport 仓库,支持新字段
All checks were successful
Deploy API Server / build-and-deploy (push) Successful in 55s
2026-05-19 22:21:47 +08:00
WangDL
9c161db26b feat: KnowledgeSource 和 ImportCandidate 模块
Some checks failed
Deploy API Server / build-and-deploy (push) Failing after 22s
2026-05-19 22:20:29 +08:00
WangDL
1e7e4268ab feat: 知识库新表 migration SQL
All checks were successful
Deploy API Server / build-and-deploy (push) Successful in 57s
2026-05-19 22:14:55 +08:00
WangDL
df56a76079 feat: 知识库新模型 — KnowledgeSource/KnowledgeChunk/ImportCandidate/BackupJob/MembershipPlan
All checks were successful
Deploy API Server / build-and-deploy (push) Successful in 1m16s
2026-05-19 22:09:44 +08:00
6db19c8ac8 fix: COS region changed from ap-guangzhou to ap-beijing
All checks were successful
Deploy API Server / build-and-deploy (push) Successful in 59s
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-19 16:35:04 +08:00
01df2453d7 fix: add global /api prefix to match nginx proxy; exclude health endpoint
All checks were successful
Deploy API Server / build-and-deploy (push) Successful in 54s
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-18 15:29:36 +08:00
4b11010c65 fix: use double quotes for MYSQL_PASS variable expansion in mysql exec
All checks were successful
Deploy API Server / build-and-deploy (push) Successful in 15s
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-18 15:26:03 +08:00