feat: implement database schema with Prisma ORM
Add PostgreSQL schema with 8 models (User, Session, McpServer, McpProfile,
Project, ProjectMcpProfile, McpInstance, AuditLog), comprehensive model
tests (31 passing), seed data for default MCP servers, and package exports.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-21 04:10:40 +00:00
|
|
|
generator client {
|
|
|
|
|
provider = "prisma-client-js"
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
datasource db {
|
|
|
|
|
provider = "postgresql"
|
|
|
|
|
url = env("DATABASE_URL")
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ── Users ──
|
|
|
|
|
|
|
|
|
|
model User {
|
feat: implement v2 3-tier architecture (mcpctl → mcplocal → mcpd)
- Rename local-proxy to mcplocal with HTTP server, LLM pipeline, mcpd discovery
- Add LLM pre-processing: token estimation, filter cache, metrics, Gemini CLI + DeepSeek providers
- Add mcpd auth (login/logout) and MCP proxy endpoints
- Update CLI: dual URLs (mcplocalUrl/mcpdUrl), auth commands, --direct flag
- Add tiered health monitoring, shell completions, e2e integration tests
- 57 test files, 597 tests passing
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 11:42:06 +00:00
|
|
|
id String @id @default(cuid())
|
|
|
|
|
email String @unique
|
|
|
|
|
name String?
|
|
|
|
|
passwordHash String
|
|
|
|
|
role Role @default(USER)
|
|
|
|
|
version Int @default(1)
|
|
|
|
|
createdAt DateTime @default(now())
|
|
|
|
|
updatedAt DateTime @updatedAt
|
feat: implement database schema with Prisma ORM
Add PostgreSQL schema with 8 models (User, Session, McpServer, McpProfile,
Project, ProjectMcpProfile, McpInstance, AuditLog), comprehensive model
tests (31 passing), seed data for default MCP servers, and package exports.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-21 04:10:40 +00:00
|
|
|
|
|
|
|
|
sessions Session[]
|
|
|
|
|
auditLogs AuditLog[]
|
|
|
|
|
projects Project[]
|
|
|
|
|
|
|
|
|
|
@@index([email])
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
enum Role {
|
|
|
|
|
USER
|
|
|
|
|
ADMIN
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ── Sessions ──
|
|
|
|
|
|
|
|
|
|
model Session {
|
|
|
|
|
id String @id @default(cuid())
|
|
|
|
|
token String @unique
|
|
|
|
|
userId String
|
|
|
|
|
expiresAt DateTime
|
|
|
|
|
createdAt DateTime @default(now())
|
|
|
|
|
|
|
|
|
|
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
|
|
|
|
|
|
|
|
|
|
@@index([token])
|
|
|
|
|
@@index([userId])
|
|
|
|
|
@@index([expiresAt])
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ── MCP Servers ──
|
|
|
|
|
|
|
|
|
|
model McpServer {
|
|
|
|
|
id String @id @default(cuid())
|
|
|
|
|
name String @unique
|
|
|
|
|
description String @default("")
|
|
|
|
|
packageName String?
|
|
|
|
|
dockerImage String?
|
|
|
|
|
transport Transport @default(STDIO)
|
|
|
|
|
repositoryUrl String?
|
2026-02-22 12:21:25 +00:00
|
|
|
externalUrl String?
|
|
|
|
|
command Json?
|
|
|
|
|
containerPort Int?
|
2026-02-22 13:30:46 +00:00
|
|
|
replicas Int @default(1)
|
feat: replace profiles with kubernetes-style secrets
Replace the confused Profile abstraction with a dedicated Secret resource
following Kubernetes conventions. Servers now have env entries with inline
values or secretRef references. Env vars are resolved and passed to
containers at startup (fixes existing gap).
- Add Secret CRUD (model, repo, service, routes, CLI commands)
- Server env: {name, value} or {name, valueFrom: {secretRef: {name, key}}}
- Add env-resolver utility shared by instance startup and config generation
- Remove all profile-related code (models, services, routes, CLI, tests)
- Update backup/restore for secrets instead of profiles
- describe secret masks values by default, --show-values to reveal
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 18:40:58 +00:00
|
|
|
env Json @default("[]")
|
feat: implement database schema with Prisma ORM
Add PostgreSQL schema with 8 models (User, Session, McpServer, McpProfile,
Project, ProjectMcpProfile, McpInstance, AuditLog), comprehensive model
tests (31 passing), seed data for default MCP servers, and package exports.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-21 04:10:40 +00:00
|
|
|
version Int @default(1)
|
|
|
|
|
createdAt DateTime @default(now())
|
|
|
|
|
updatedAt DateTime @updatedAt
|
|
|
|
|
|
2026-02-22 22:24:35 +00:00
|
|
|
templateName String?
|
|
|
|
|
templateVersion String?
|
|
|
|
|
|
feat: implement database schema with Prisma ORM
Add PostgreSQL schema with 8 models (User, Session, McpServer, McpProfile,
Project, ProjectMcpProfile, McpInstance, AuditLog), comprehensive model
tests (31 passing), seed data for default MCP servers, and package exports.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-21 04:10:40 +00:00
|
|
|
instances McpInstance[]
|
|
|
|
|
|
|
|
|
|
@@index([name])
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
enum Transport {
|
|
|
|
|
STDIO
|
|
|
|
|
SSE
|
|
|
|
|
STREAMABLE_HTTP
|
|
|
|
|
}
|
|
|
|
|
|
2026-02-22 22:24:35 +00:00
|
|
|
// ── MCP Templates ──
|
|
|
|
|
|
|
|
|
|
model McpTemplate {
|
|
|
|
|
id String @id @default(cuid())
|
|
|
|
|
name String @unique
|
|
|
|
|
version String @default("1.0.0")
|
|
|
|
|
description String @default("")
|
|
|
|
|
packageName String?
|
|
|
|
|
dockerImage String?
|
|
|
|
|
transport Transport @default(STDIO)
|
|
|
|
|
repositoryUrl String?
|
|
|
|
|
externalUrl String?
|
|
|
|
|
command Json?
|
|
|
|
|
containerPort Int?
|
|
|
|
|
replicas Int @default(1)
|
|
|
|
|
env Json @default("[]")
|
|
|
|
|
createdAt DateTime @default(now())
|
|
|
|
|
updatedAt DateTime @updatedAt
|
|
|
|
|
|
|
|
|
|
@@index([name])
|
|
|
|
|
}
|
|
|
|
|
|
feat: replace profiles with kubernetes-style secrets
Replace the confused Profile abstraction with a dedicated Secret resource
following Kubernetes conventions. Servers now have env entries with inline
values or secretRef references. Env vars are resolved and passed to
containers at startup (fixes existing gap).
- Add Secret CRUD (model, repo, service, routes, CLI commands)
- Server env: {name, value} or {name, valueFrom: {secretRef: {name, key}}}
- Add env-resolver utility shared by instance startup and config generation
- Remove all profile-related code (models, services, routes, CLI, tests)
- Update backup/restore for secrets instead of profiles
- describe secret masks values by default, --show-values to reveal
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 18:40:58 +00:00
|
|
|
// ── Secrets ──
|
feat: implement database schema with Prisma ORM
Add PostgreSQL schema with 8 models (User, Session, McpServer, McpProfile,
Project, ProjectMcpProfile, McpInstance, AuditLog), comprehensive model
tests (31 passing), seed data for default MCP servers, and package exports.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-21 04:10:40 +00:00
|
|
|
|
feat: replace profiles with kubernetes-style secrets
Replace the confused Profile abstraction with a dedicated Secret resource
following Kubernetes conventions. Servers now have env entries with inline
values or secretRef references. Env vars are resolved and passed to
containers at startup (fixes existing gap).
- Add Secret CRUD (model, repo, service, routes, CLI commands)
- Server env: {name, value} or {name, valueFrom: {secretRef: {name, key}}}
- Add env-resolver utility shared by instance startup and config generation
- Remove all profile-related code (models, services, routes, CLI, tests)
- Update backup/restore for secrets instead of profiles
- describe secret masks values by default, --show-values to reveal
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 18:40:58 +00:00
|
|
|
model Secret {
|
|
|
|
|
id String @id @default(cuid())
|
|
|
|
|
name String @unique
|
|
|
|
|
data Json @default("{}")
|
|
|
|
|
version Int @default(1)
|
|
|
|
|
createdAt DateTime @default(now())
|
|
|
|
|
updatedAt DateTime @updatedAt
|
feat: implement database schema with Prisma ORM
Add PostgreSQL schema with 8 models (User, Session, McpServer, McpProfile,
Project, ProjectMcpProfile, McpInstance, AuditLog), comprehensive model
tests (31 passing), seed data for default MCP servers, and package exports.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-21 04:10:40 +00:00
|
|
|
|
feat: replace profiles with kubernetes-style secrets
Replace the confused Profile abstraction with a dedicated Secret resource
following Kubernetes conventions. Servers now have env entries with inline
values or secretRef references. Env vars are resolved and passed to
containers at startup (fixes existing gap).
- Add Secret CRUD (model, repo, service, routes, CLI commands)
- Server env: {name, value} or {name, valueFrom: {secretRef: {name, key}}}
- Add env-resolver utility shared by instance startup and config generation
- Remove all profile-related code (models, services, routes, CLI, tests)
- Update backup/restore for secrets instead of profiles
- describe secret masks values by default, --show-values to reveal
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 18:40:58 +00:00
|
|
|
@@index([name])
|
feat: implement database schema with Prisma ORM
Add PostgreSQL schema with 8 models (User, Session, McpServer, McpProfile,
Project, ProjectMcpProfile, McpInstance, AuditLog), comprehensive model
tests (31 passing), seed data for default MCP servers, and package exports.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-21 04:10:40 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ── Projects ──
|
|
|
|
|
|
|
|
|
|
model Project {
|
|
|
|
|
id String @id @default(cuid())
|
|
|
|
|
name String @unique
|
|
|
|
|
description String @default("")
|
|
|
|
|
ownerId String
|
|
|
|
|
version Int @default(1)
|
|
|
|
|
createdAt DateTime @default(now())
|
|
|
|
|
updatedAt DateTime @updatedAt
|
|
|
|
|
|
|
|
|
|
owner User @relation(fields: [ownerId], references: [id], onDelete: Cascade)
|
|
|
|
|
|
|
|
|
|
@@index([name])
|
|
|
|
|
@@index([ownerId])
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ── MCP Instances (running containers) ──
|
|
|
|
|
|
|
|
|
|
model McpInstance {
|
|
|
|
|
id String @id @default(cuid())
|
|
|
|
|
serverId String
|
|
|
|
|
containerId String?
|
|
|
|
|
status InstanceStatus @default(STOPPED)
|
|
|
|
|
port Int?
|
|
|
|
|
metadata Json @default("{}")
|
|
|
|
|
version Int @default(1)
|
|
|
|
|
createdAt DateTime @default(now())
|
|
|
|
|
updatedAt DateTime @updatedAt
|
|
|
|
|
|
|
|
|
|
server McpServer @relation(fields: [serverId], references: [id], onDelete: Cascade)
|
|
|
|
|
|
|
|
|
|
@@index([serverId])
|
|
|
|
|
@@index([status])
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
enum InstanceStatus {
|
|
|
|
|
STARTING
|
|
|
|
|
RUNNING
|
|
|
|
|
STOPPING
|
|
|
|
|
STOPPED
|
|
|
|
|
ERROR
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ── Audit Logs ──
|
|
|
|
|
|
|
|
|
|
model AuditLog {
|
|
|
|
|
id String @id @default(cuid())
|
|
|
|
|
userId String
|
|
|
|
|
action String
|
|
|
|
|
resource String
|
|
|
|
|
resourceId String?
|
|
|
|
|
details Json @default("{}")
|
|
|
|
|
createdAt DateTime @default(now())
|
|
|
|
|
|
|
|
|
|
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
|
|
|
|
|
|
|
|
|
|
@@index([userId])
|
|
|
|
|
@@index([action])
|
|
|
|
|
@@index([resource])
|
|
|
|
|
@@index([createdAt])
|
|
|
|
|
}
|