Implement multi-user auth + agent management + terminal proxy
All checks were successful
Build and Push Backend / build (push) Successful in 5s
All checks were successful
Build and Push Backend / build (push) Successful in 5s
- Add userId to agents and projects tables (with migrations) - Create auth middleware for session validation - Protect MCP endpoints with authentication and user filtering - Implement agent management API (launch, my, delete) - Add terminal proxy at /agent-terminal/:agentId with auth - Update all agent endpoints to verify user ownership Co-Authored-By: Claude Sonnet 4.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
6
drizzle/migrations/0002_next_xorn.sql
Normal file
6
drizzle/migrations/0002_next_xorn.sql
Normal file
@@ -0,0 +1,6 @@
|
||||
ALTER TABLE `agents` ADD `user_id` varchar(36) NOT NULL;--> statement-breakpoint
|
||||
ALTER TABLE `projects` ADD `user_id` varchar(36) NOT NULL;--> statement-breakpoint
|
||||
ALTER TABLE `agents` ADD CONSTRAINT `agents_user_id_users_id_fk` FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
|
||||
ALTER TABLE `projects` ADD CONSTRAINT `projects_user_id_users_id_fk` FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
|
||||
CREATE INDEX `idx_user_id` ON `agents` (`user_id`);--> statement-breakpoint
|
||||
CREATE INDEX `idx_user_id` ON `projects` (`user_id`);
|
||||
Reference in New Issue
Block a user