Commit Graph

1328 Commits

Author SHA1 Message Date
Haitao Pan
8412e3ff95 docs: Update Sandbox and Root Assume implementation report. 2026-02-06 18:28:02 +08:00
Haitao Pan
97b7d64de3 fix: Remove redundant agent routes and handlers from main.go to resolve startup panic. 2026-02-06 18:18:46 +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
b6ab404206 fix: Remove duplicate route registration causing panic on startup. 2026-02-06 16:40:31 +08:00
Haitao Pan
1bfe4f1d53 fix: Robust DB connection retries and move sandbox routes to admin group. 2026-02-06 16:21:29 +08:00
Haitao Pan
9169192144 docs: add implementation report for Sandbox Mode and Agent Sync stability fixes 2026-02-06 13:28:33 +08:00
Haitao Pan
51358586e1 chore: unblock push by tuning gitleaks + report path 2026-02-06 13:24:49 +08:00
Haitao Pan
33bd1b8beb fix: Refine error reporting in agent sync and fix lints. 2026-02-06 13:13:44 +08:00
Haitao Pan
3b818314db fix: Filter out wildcard agent (*) from the nodes list in SandboxNodeBindingPanel. 2026-02-06 13:12:40 +08:00
Haitao Pan
c366e96e5d fix: Ensure users table has required columns for agent sync and add explicit migrations. 2026-02-06 13:10:18 +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
508e98504a feat: Add empty gitleaks final scrub configuration file. 2026-02-06 13:03:14 +08:00
Haitao Pan
882378e328 test: Replace hardcoded test password with a named variable in api_test.go and add api.test. 2026-02-06 12:29:10 +08:00
Haitao Pan
ba85a0236b feat: Add expressions_v2.txt with new redaction patterns for sensitive data. 2026-02-06 12:22:31 +08:00
Haitao Pan
d0537acafd docs: restore archival records and runbooks 2026-02-06 12:13:29 +08:00
Haitao Pan
a705f16cbb chore: Add gitleaks secret scanning report. 2026-02-06 12:11:39 +08:00
Haitao Pan
df6f1dd92b Runbook: Moved into github-org-cloud-neutral-toolkit/docs/ 2026-02-06 12:10:21 +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
fbe04d37b1 fix(agent-server): authenticate /v1/nodes via session tokens 2026-02-05 17:39:43 +08:00
Haitao Pan
cc0ff117f6 chore: commit pending agent/controller updates and docs 2026-02-05 16:56:17 +08:00
Haitao Pan
4b4a2069b3 feat(agent): expose canonical /api/agent-server/v1/nodes 2026-02-05 16:52:10 +08:00
Haitao Pan
700a1db5e3 docs: update runbook for fixing agent 404 errors and UUID changes. 2026-02-05 15:41:19 +08:00
Haitao Pan
c353a43547 docs: Add runbook for fixing Agent 404 errors and UUID changes. 2026-02-05 15:22:50 +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
e48c23fab5 feat: add agent loading debug logging and fix nodes endpoint response format 2026-02-05 12:17:35 +08:00
Haitao Pan
e75b2d45e3 feat: Implement persistent session management by moving session logic to the store interface and adding a sessions table. 2026-02-05 11:27:11 +08:00
Haitao Pan
4d5aae09ad fix: correct sessions table column name in applyRBACSchema to user_uuid 2026-02-05 11:10:25 +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
29bb103aa3 fix(config): remove empty agents.credentials to enable INTERNAL_SERVICE_TOKEN fallback
The empty credentials array was preventing the INTERNAL_SERVICE_TOKEN
environment variable from being used for agent authentication.
2026-02-05 08:52:43 +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
81177114f5 feat(agent): support multiple agents with shared token and self-reported IDs
- Add AgentID field to StatusReport for agent self-identification
- Implement RegisterAgent() method for dynamic agent registration
- Modify agentReportStatusHandler to extract and use agent-reported IDs
- Use wildcard credential to support multiple agents with INTERNAL_SERVICE_TOKEN
- Add agents table schema for future persistence

This enables scalable multi-node deployment without pre-configuring each agent ID.
2026-02-05 08:05:23 +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
7cae075709 feat: Allow internal agent ID to be configured via AGENT_ID environment variable, defaulting to 'internal-agent'. 2026-02-05 00:06:18 +08:00
Haitao Pan
15c07826ae feat: incorporate registered agent metadata to dynamically populate and name VLESS nodes 2026-02-04 22:40:50 +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
838b1a1c0f fix: enforce demo no-mfa login and expose proxy uuid in session 2026-02-04 14:59:19 +08:00
Haitao Pan
982a091b33 feat: add internal public overview endpoint for homepage stats 2026-02-04 14:15:27 +08:00
Haitao Pan
40bb141322 feat: enforce root account and introduce RBAC policy scaffolding 2026-02-04 13:36:24 +08:00
Haitao Pan
09eb26da25 feat: add read-only Demo account with hourly UUID rotation 2026-02-04 12:37:31 +08:00
Haitao Pan
89c8957c57 refactor: API routing by nesting agent endpoints under /api and fix user not found error handling. 2026-02-03 14:49:47 +08:00
Haitao Pan
a9f669e7cd feat: Enforce OAuth email verification and update user verification status during login. 2026-02-02 21:07:10 +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
9774dea4b6 feat: enhance proxy UUID renewal with absolute date and refined expiration logic 2026-02-02 20:37:43 +08:00
Haitao Pan
8afd3e5b8f fix: resolve build errors (undefined generateRandomUUID, shadowed auth package) and update .gitignore 2026-02-02 20:29:10 +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
0ea695c486 feat: Add Apache License 2.0 to the project. 2026-02-02 18:09:42 +08:00