Skip to content

Conversation

@codegen-sh
Copy link

@codegen-sh codegen-sh bot commented Dec 14, 2025

Summary

Backend TypeScript server foundation for the Agentic Profiles System, providing REST APIs for dynamic template management, profile configuration, MCP tool integration, and multi-sandbox orchestration.

This implements Phase 1 (Backend Foundation) from the implementation plan.

What's Included

Database Schema (Prisma + SQLite)

  • Profiles: Role-based agent profiles with metadata
  • Templates: Dynamic template system (replaces static chainTemplates.ts)
  • McpTools: MCP tool catalog with deployment instructions
  • TaskTemplates: Pre-settable workflow configurations
  • Sandboxes: Multi-sandbox context isolation configs
  • Skills: Plugin/skill definitions
  • ✅ Junction tables for many-to-many relationships

REST API (Express + Zod Validation)

  • Profile CRUD: Full endpoints with relationships (/api/profiles)
  • Active Profile Management: Set/get active profile
  • ✅ Stub routes for templates, MCP tools, sandboxes, context application
  • ✅ Type-safe request validation with Zod schemas
  • ✅ Error handling and CORS configuration

Infrastructure

  • ✅ TypeScript configuration with strict mode
  • ✅ Environment variable management (.env.example)
  • ✅ Database migrations ready (Prisma)
  • ✅ Health check endpoint (/health)
  • ✅ Graceful shutdown handling
  • ✅ Development server with hot reload (tsx watch)

Key Features

  1. Dynamic Templates: Database-backed templates vs. static TypeScript imports
  2. Profile-Tool Association: Link tools, MCP tools, skills to profiles
  3. Sandbox Configuration: Per-profile sandbox deployment configs
  4. Type Safety: Full TypeScript + Zod validation
  5. PostgreSQL-Ready: SQLite for dev, easy migration to PostgreSQL

Testing

# Type checking ✅
cd server && npm run typecheck

# Database schema ✅
npx prisma generate
npx prisma migrate dev

# Test profile CRUD
curl http://localhost:3001/api/profiles

Next Steps (Phase 2-4)

  • Template CRUD routes + import from davila7/claude-code-templates
  • MCP tool catalog seeding (@playwright/mcp, @upstash/context7-mcp, Codegen MCP)
  • Context application engine (merge profile + template + variables)
  • Frontend integration (replace localStorage with API calls)
  • E2E tests with Playwright

Validation Gates Met

  • ✅ TypeScript compiles without errors
  • ✅ Database migrations apply successfully
  • ✅ All routes type-safe with Zod
  • ✅ Health check endpoint responds
  • ✅ No secrets committed (TruffleHog scan passed)

Related


Ready for review
Backend foundation complete, ready for phase 2 implementation.


💻 View my work • 👤 Initiated by @ZeeeepaAbout Codegen
⛔ Remove Codegen from PR🚫 Ban action checks


Summary by cubic

Sets up the backend foundation for Agentic Profiles with an Express + Prisma server, profile CRUD APIs, and a database schema for templates, tools, skills, task templates, and sandboxes. Delivers Phase 1 of the agentic profiles plan and prepares for dynamic templates and context application.

  • New Features

    • Prisma schema for Profiles, Templates, MCP Tools, Skills, TaskTemplates, Sandboxes, and junction tables.
    • Profile API: list/get/create/update/delete, get/set active profile, with Zod validation.
    • Stub routes for templates, MCP tools, task templates, sandboxes, and context.
    • Infrastructure: env config, CORS, Helmet, health check, graceful shutdown; SQLite for dev, PostgreSQL-ready.
  • Migration

    • Copy .env.example to .env and set DATABASE_URL, PORT, CORS_ORIGIN.
    • Run: prisma generate and prisma migrate dev.
    • Start: npm run dev and test via GET /api/profiles.

Written for commit a21e049. Summary will update automatically on new commits.

codegen-sh bot and others added 2 commits December 14, 2025 07:26
- Initialize TypeScript server with Express + Prisma
- Database schema with profiles, templates, MCP tools, sandboxes
- Profile CRUD API routes with full relationships
- Zod validation for type-safe requests
- SQLite for development (PostgreSQL-ready)
- Environment configuration and .gitignore
- README with setup instructions and API documentation

Infrastructure ready for:
- Dynamic template management (replacing static chainTemplates.ts)
- MCP tool catalog with deployment instructions
- Multi-sandbox context isolation
- Context application engine
- E2E testing

Related to: Plan Step 2 (Backend Foundation)
Next: Template CRUD, MCP catalog seeding, E2E tests

Co-authored-by: Zeeeepa <[email protected]>
@coderabbitai
Copy link

coderabbitai bot commented Dec 14, 2025

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


Comment @coderabbitai help to get the list of available commands and usage tips.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants