Commit Graph

61 Commits

Author SHA1 Message Date
Haitao Pan
1c32d2f01b feat: Add multi-factor authentication login flow and config synchronization endpoints. 2026-02-17 11:59:18 +08:00
Haitao Pan
48102e95ad feat: Add local-test.yaml configuration, modify user not found API response to include mfa_enabled status, and add 5xx error logging. 2026-02-06 22:31:50 +08:00
Haitao Pan
de66aec30e feat: Implement database session fallback for token validation in the authentication middleware. 2026-02-06 22:16:28 +08:00
Haitao Pan
51336af5b7 feat: Implement session store fallback for token validation in the authentication middleware. 2026-02-06 19:02:48 +08:00
Haitao Pan
17909d57d2 fix: sandbox binding + agent sandbox sync + uuid rotation 2026-02-06 18:06:20 +08:00
Haitao Pan
d1195bbc75 fix: Implement missing ClearSandboxAgents method. 2026-02-06 16:44:11 +08:00
Haitao Pan
4503b053f7 feat: Implement sandbox agent functionality with dedicated user, admin API, and agent-side user filtering. 2026-02-06 13:03:47 +08:00
Haitao Pan
04ff61f952 feat: Update agent API paths to /api/agent-server/v1, modify route registration for improved error handling, and add INTERNAL_SERVICE_TOKEN to Cloud Run. 2026-02-06 12:07:24 +08:00
Haitao Pan
cc0ff117f6 chore: commit pending agent/controller updates and docs 2026-02-05 16:56:17 +08:00
Haitao Pan
d849e3e6cc fix(admin): complete management APIs for console integration 2026-02-05 15:01:12 +08:00
Haitao Pan
3ffd39cc8b feat: add public.agents table and its set_updated_at trigger. 2026-02-05 13:10:56 +08:00
Haitao Pan
dc348238f1 fix: correct sessions table column names from user_id to user_uuid
- Fixed CreateSession and GetSession SQL queries to use user_uuid instead of user_id
- Added unique constraint on sessions.token column for proper upsert support
- Created migration file to add the unique index to existing databases

This fixes the 500 error on /api/auth/login caused by session creation failure
2026-02-05 11:00:57 +08:00
Haitao Pan
bc2562b877 fix: move mfa/status endpoint outside auth middleware and implement persistent session storage
- Moved /api/auth/mfa/status outside authProtected group to allow pre-login MFA checks
- Added session management to Store interface with CreateSession, GetSession, DeleteSession
- Implemented session persistence in both memoryStore and postgresStore
- Updated handler to use store-based sessions instead of in-memory map
- Added database schema for users, sessions, agents, and email_blacklist tables
- This fixes the 401 error when checking MFA status before login
2026-02-05 09:37:04 +08:00
Haitao Pan
8b8a2aa3fa feat(agent-persistence): implement PostgreSQL persistence for agent registry
Core Changes:
- Add Agent struct and management methods to Store interface
- Implement PostgreSQL store methods (UpsertAgent, ListAgents, DeleteAgent, DeleteStaleAgents)
- Integrate persistence into Registry with async database writes
- Add Load() method to restore agents from database on startup
- Implement runAgentCleanup background task (5min interval, 10min stale threshold)

Database:
- Update agents table schema to use JSONB for groups field
- Add indexes on last_heartbeat and healthy columns
- Support health tracking and automatic cleanup of stale agents

Documentation:
- Add comprehensive DB access and upgrade guide
- Include agent persistence implementation plan
- Document diagnostic procedures and troubleshooting steps
- Add walkthrough of multi-agent support implementation

This enables:
- Persistent agent state across service restarts
- Automatic cleanup of offline agents
- Multi-agent support with shared token authentication
2026-02-05 08:34:25 +08:00
Haitao Pan
c084cd4c8f feat: Implement dynamic agent registration using self-reported IDs and persist agent details in a new agents database table. 2026-02-05 00:07:30 +08:00
Haitao Pan
5ff9d0ade0 feat(vless): support multi-region URI schemes and node metadata 2026-02-04 20:48:21 +08:00
Haitao Pan
c7cbf43665 chore: checkpoint current xray config assets 2026-02-04 19:56:15 +08:00
Haitao Pan
40bb141322 feat: enforce root account and introduce RBAC policy scaffolding 2026-02-04 13:36:24 +08:00
Haitao Pan
08a92ba2d0 feat: Add multiple context and editor hooks to ChatInput component. 2026-02-02 21:02:32 +08:00
Haitao Pan
693889f366 feat: implement user management features (pause, delete, blacklist, renew uuid) 2026-02-02 20:19:06 +08:00
Haitao Pan
01b62b7c4c feat: replace TCP template with full client config and template variables 2026-01-31 18:51:39 +08:00
Haitao Pan
94da3fdead feat: update XHTTP template with full configuration and domain variable 2026-01-31 18:46:13 +08:00
Haitao Pan
5bf93d1d3f feat: add user management APIs for management page
- Add ListUsers to Store interface and implementations
- Add user listing API endpoint (GET /api/users)
- Add role management endpoints (POST/DELETE /api/auth/admin/users/:userId/role)
- Add GeneratePublicToken to TokenService for OAuth callback
- Add CancelSubscription to Store interface
- Update go.mod with oauth2 dependencies
2026-01-30 08:59:55 +08:00
Haitao Pan
6ba56841b5 feat: add OAuth2 authentication support with new API endpoints, configuration, and identity storage. 2026-01-30 08:46:24 +08:00
Haitao Pan
de5847d1f0 feat: add internal service-to-service authentication middleware 2026-01-29 22:25:40 +08:00
Haitao Pan
9a711b2574 chore: Update Xray certificate and key file paths to Caddy ACME dynamic locations. 2026-01-27 22:40:29 +08:00
Haitao Pan
50039d2952 feat: Add default client entries to Xray templates and conditionally omit client flow for xhttp networks. 2026-01-27 22:19:50 +08:00
Haitao Pan
cb542092ce feat: Template Xray TCP certificate and key file paths using a domain placeholder. 2026-01-27 22:01:07 +08:00
Haitao Pan
e1e22bca62 feat: Introduce nodes table and refactor Xray config syncer to generate multiple protocol-specific configurations using new XHTTP and TCP templates. 2026-01-27 21:56:39 +08:00
Haitao Pan
29ee491acf reset accounts.svc.plus repo 2026-01-23 23:16:37 +08:00
Haitao Pan
ecf11b948f fix: update sql module imports 2026-01-16 16:20:06 +08:00
Haitao Pan
ee6e1a6363 feat: move account service to repo root
# Conflicts:
#	account/Makefile
#	account/go.mod
#	docs/account-admin-settings.md
#	docs/account-svc-plus.md
2026-01-16 16:15:23 +08:00
shenlan
522eb4c6fd Move RAG module under rag-server (#526) 2025-10-15 13:27:37 +08:00
shenlan
92a3458f4e Refactor server layout to rag-server (#525) 2025-10-15 13:04:58 +08:00
shenlan
8596cb4b39 fix: support chutes embedding response 2025-08-14 20:50:27 +08:00
shenlan
73774ea633 Add Chutes embedding client with retry logic 2025-08-14 20:20:33 +08:00
shenlan
b645b18f64 Revert "refactor: add native chutes embeddings client" 2025-08-14 19:36:29 +08:00
shenlan
302aded586 chore: rename endpoint config to baseurl 2025-08-14 19:27:11 +08:00
shenlan
a341b2e0ed Ignore model field for chutes embedding provider 2025-08-14 17:16:09 +08:00
shenlan
deeaf3209e fix: locate server config relative to executable 2025-08-14 11:40:40 +08:00
shenlan
a479b10efd feat(rag): add zhcn schema 2025-08-13 14:00:57 +08:00
shenlan
ec94825fbe Simplify RAG schema and upsert logic 2025-08-13 13:14:35 +08:00
shenlan
5676a11927 feat(rag): enhance chunking and embedding 2025-08-13 09:50:13 +08:00
shenlan
67e91e0adb feat: add hybrid search and reranker 2025-08-12 23:19:20 +08:00
shenlan
525f726265 feat: add provider-aware adapters 2025-08-11 00:19:18 +08:00
shenlan
4756dfe3e9 feat: support new model config 2025-08-10 18:00:17 +08:00
shenlan
512adc2987 Merge branch 'main' into codex/add-support-for-allama-in-xcontrol-server 2025-08-10 12:44:18 +08:00
shenlan
fe9b4f7a4d feat: add allama support 2025-08-10 12:38:15 +08:00
shenlan
4214a442fd feat: add repo proxy configuration 2025-08-10 12:01:56 +08:00
shenlan
dfd9e9e33d Ensure unique index for document upserts 2025-08-10 11:07:41 +08:00