Spaces:
Runtime error
Runtime error
Download schema.prisma from BTankut/Context-Store-LLM: direct link, hf CLI and curl.
- Browser
- Download file 18.2 kB
-
https://huggingface.co/spaces/BTankut/Context-Store-LLM/resolve/main/schema.prisma
- Command line
-
hf download hf://spaces/BTankut/Context-Store-LLM/schema.prisma
-
curl -L -o schema.prisma https://huggingface.co/spaces/BTankut/Context-Store-LLM/resolve/main/schema.prisma
18.2 kB
| datasource db { | |
| provider = "postgresql" | |
| url = env("DATABASE_URL") | |
| directUrl = env("DIRECT_URL") | |
| } | |
| generator client { | |
| provider = "prisma-client-js" | |
| binaryTargets = ["native", "debian-openssl-1.1.x", "debian-openssl-3.0.x"] | |
| previewFeatures = ["tracing"] | |
| } | |
| model Activity { | |
| id String | |
| createdAt DateTime | |
| updatedAt DateTime | |
| deleted DateTime? | |
| text String | |
| // Used to link the task or activity to external apps | |
| sourceURL String? | |
| integrationAccount IntegrationAccount? | |
| integrationAccountId String? | |
| rejectionReason String? | |
| workspace Workspace | |
| workspaceId String | |
| WebhookDeliveryLog WebhookDeliveryLog[] | |
| ConversationHistory ConversationHistory[] | |
| IngestionQueue IngestionQueue[] | |
| } | |
| model AuthorizationCode { | |
| id String | |
| code String | |
| personalAccessToken PersonalAccessToken? | |
| personalAccessTokenId String? | |
| createdAt DateTime | |
| updatedAt DateTime | |
| } | |
| model Conversation { | |
| id String | |
| createdAt DateTime | |
| updatedAt DateTime | |
| deleted DateTime? | |
| unread Boolean | |
| title String? | |
| user User | |
| userId String | |
| workspace Workspace? | |
| workspaceId String? | |
| status String // Can be "pending", "running", "completed", "failed", "need_attention" | |
| ConversationHistory ConversationHistory[] | |
| RecallLog RecallLog[] | |
| } | |
| model ConversationExecutionStep { | |
| id String | |
| createdAt DateTime | |
| updatedAt DateTime | |
| deleted DateTime? | |
| thought String | |
| message String | |
| actionId String? | |
| actionOutput String? | |
| actionInput String? | |
| actionStatus String? | |
| metadata Json? | |
| conversationHistory ConversationHistory | |
| conversationHistoryId String | |
| } | |
| model ConversationHistory { | |
| id String | |
| createdAt DateTime | |
| updatedAt DateTime | |
| deleted DateTime? | |
| message String | |
| userType UserType | |
| activity Activity? | |
| activityId String? | |
| context Json? | |
| thoughts Json? | |
| user User? | |
| userId String? | |
| conversation Conversation | |
| conversationId String | |
| ConversationExecutionStep ConversationExecutionStep[] | |
| } | |
| model Entity { | |
| id String | |
| name String // e.g., "User", "Issue", "Task", "Automation" | |
| metadata Json // Store field definitions and their types | |
| // Relations | |
| spaceEntities SpaceEntity[] | |
| createdAt DateTime | |
| updatedAt DateTime | |
| } | |
| model IngestionQueue { | |
| id String | |
| // Relations | |
| space Space? | |
| spaceId String? | |
| // Queue metadata | |
| data Json // The actual data to be processed | |
| output Json? // The processed output data | |
| status IngestionStatus | |
| priority Int | |
| workspaceId String | |
| workspace Workspace | |
| activity Activity? | |
| activityId String? | |
| // Error handling | |
| error String? | |
| retryCount Int | |
| // Timestamps | |
| createdAt DateTime | |
| updatedAt DateTime | |
| processedAt DateTime? | |
| } | |
| model IngestionRule { | |
| id String | |
| createdAt DateTime | |
| updatedAt DateTime | |
| deleted DateTime? | |
| name String? // Optional human-readable rule name | |
| text String // Free-flowing text rule description (mandatory) | |
| source String // Source/integration this rule applies to (mandatory) | |
| isActive Boolean // Enable/disable rule (mandatory) | |
| workspace Workspace | |
| workspaceId String | |
| user User | |
| userId String | |
| } | |
| model IntegrationAccount { | |
| id String | |
| createdAt DateTime | |
| updatedAt DateTime | |
| deleted DateTime? | |
| integrationConfiguration Json | |
| accountId String? | |
| settings Json? | |
| isActive Boolean | |
| integratedBy User | |
| integratedById String | |
| integrationDefinition IntegrationDefinitionV2 | |
| integrationDefinitionId String | |
| workspace Workspace | |
| workspaceId String | |
| Activity Activity[] | |
| oauthIntegrationGrants OAuthIntegrationGrant[] | |
| @ | |
| } | |
| model IntegrationDefinitionV2 { | |
| id String | |
| createdAt DateTime | |
| updatedAt DateTime | |
| deleted DateTime? | |
| name String | |
| slug String | |
| description String | |
| icon String | |
| config Json? | |
| spec Json | |
| version String? | |
| url String? | |
| workspace Workspace? | |
| workspaceId String? | |
| IntegrationAccount IntegrationAccount[] | |
| } | |
| model InvitationCode { | |
| id String | |
| code String | |
| users User[] | |
| createdAt DateTime | |
| } | |
| model OAuthAuthorizationCode { | |
| id String | |
| code String | |
| // OAuth2 specific fields | |
| clientId String | |
| userId String | |
| redirectUri String | |
| scope String? | |
| state String? | |
| codeChallenge String? | |
| codeChallengeMethod String? | |
| expiresAt DateTime | |
| used Boolean | |
| // Relations | |
| client OAuthClient | |
| user User | |
| workspace Workspace | |
| workspaceId String | |
| createdAt DateTime | |
| updatedAt DateTime | |
| } | |
| model OAuthAccessToken { | |
| id String | |
| token String | |
| clientId String | |
| userId String | |
| scope String? | |
| expiresAt DateTime | |
| revoked Boolean | |
| // Relations | |
| client OAuthClient | |
| user User | |
| workspace Workspace | |
| workspaceId String | |
| createdAt DateTime | |
| updatedAt DateTime | |
| } | |
| model OAuthClient { | |
| id String | |
| clientId String | |
| clientSecret String | |
| name String | |
| description String? | |
| // Redirect URIs (comma-separated for simplicity) | |
| redirectUris String | |
| // Allowed scopes (comma-separated) | |
| allowedScopes String | |
| // Grant types allowed | |
| grantTypes String | |
| // PKCE support | |
| requirePkce Boolean | |
| clientType String | |
| // Client metadata | |
| logoUrl String? | |
| homepageUrl String? | |
| // Integration hub webhook support | |
| webhookUrl String? | |
| webhookSecret String? | |
| // GitHub-style features | |
| isActive Boolean | |
| // Workspace relationship (like GitHub orgs) | |
| workspace Workspace? | |
| workspaceId String? | |
| // Created by user (for audit trail) | |
| createdBy User? | |
| createdById String? | |
| // Relations | |
| oauthAuthorizationCodes OAuthAuthorizationCode[] | |
| accessTokens OAuthAccessToken[] | |
| refreshTokens OAuthRefreshToken[] | |
| integrationGrants OAuthIntegrationGrant[] | |
| oAuthClientInstallation OAuthClientInstallation[] | |
| createdAt DateTime | |
| updatedAt DateTime | |
| } | |
| model OAuthClientInstallation { | |
| id String | |
| // The OAuth client being installed | |
| oauthClient OAuthClient | |
| oauthClientId String | |
| // The workspace where it's installed | |
| workspace Workspace | |
| workspaceId String | |
| // Installation metadata | |
| installedBy User | |
| installedById String | |
| installedAt DateTime | |
| uninstalledAt DateTime? | |
| // Installation status | |
| isActive Boolean | |
| // Installation-specific settings | |
| settings Json? | |
| grantedScopes String? | |
| createdAt DateTime | |
| updatedAt DateTime | |
| @ | |
| } | |
| model OAuthRefreshToken { | |
| id String | |
| token String | |
| clientId String | |
| userId String | |
| scope String? | |
| expiresAt DateTime | |
| revoked Boolean | |
| // Relations | |
| client OAuthClient | |
| user User | |
| workspace Workspace | |
| workspaceId String | |
| createdAt DateTime | |
| updatedAt DateTime | |
| } | |
| model OAuthIntegrationGrant { | |
| id String | |
| // OAuth client that has access | |
| client OAuthClient | |
| clientId String | |
| // User who granted access | |
| user User | |
| userId String | |
| // Integration account that was granted | |
| integrationAccount IntegrationAccount | |
| integrationAccountId String | |
| // When access was granted/revoked | |
| grantedAt DateTime | |
| revokedAt DateTime? | |
| isActive Boolean | |
| createdAt DateTime | |
| updatedAt DateTime | |
| @ | |
| } | |
| model PersonalAccessToken { | |
| id String | |
| /// If generated by the CLI this will be "cli", otherwise user-provided | |
| name String | |
| /// This is the token encrypted using the ENCRYPTION_KEY | |
| encryptedToken Json | |
| /// This is shown in the UI, with ******** | |
| obfuscatedToken String | |
| /// This is used to find the token in the database | |
| hashedToken String | |
| user User | |
| userId String | |
| revokedAt DateTime? | |
| lastAccessedAt DateTime? | |
| createdAt DateTime | |
| updatedAt DateTime | |
| authorizationCodes AuthorizationCode[] | |
| } | |
| model RecallLog { | |
| id String | |
| createdAt DateTime | |
| updatedAt DateTime | |
| deleted DateTime? | |
| // Access details | |
| accessType String // "search", "recall", "direct_access" | |
| query String? // Search query (null for direct access) | |
| // Target information | |
| targetType String? // "episode", "statement", "entity", "mixed_results" | |
| targetId String? // UUID of specific target (null for search with multiple results) | |
| // Search/access parameters | |
| searchMethod String? // "semantic", "keyword", "hybrid", "contextual", "graph_traversal" | |
| minSimilarity Float? // Minimum similarity threshold used | |
| maxResults Int? // Maximum results requested | |
| // Results and interaction | |
| resultCount Int // Number of results returned | |
| similarityScore Float? // Similarity score (for single result access) | |
| // Context and source | |
| context String? // Additional context | |
| source String? // Source of the access (e.g., "chat", "api", "integration") | |
| sessionId String? // Session identifier | |
| // Performance metrics | |
| responseTimeMs Int? // Response time in milliseconds | |
| // Relations | |
| user User | |
| userId String | |
| workspace Workspace? | |
| workspaceId String? | |
| conversation Conversation? | |
| conversationId String? | |
| // Metadata for additional tracking data | |
| metadata Json? | |
| } | |
| model Space { | |
| id String | |
| name String | |
| description String? | |
| autoMode Boolean | |
| // Relations | |
| user User | |
| userId String | |
| // Space's enabled entities | |
| enabledEntities SpaceEntity[] | |
| createdAt DateTime | |
| updatedAt DateTime | |
| IngestionQueue IngestionQueue[] | |
| } | |
| model SpaceEntity { | |
| id String | |
| // Relations | |
| space Space | |
| spaceId String | |
| entity Entity | |
| entityId String | |
| // Custom settings for this entity in this space | |
| settings Json? | |
| createdAt DateTime | |
| updatedAt DateTime | |
| @ | |
| } | |
| model User { | |
| id String | |
| email String | |
| authenticationMethod AuthenticationMethod | |
| authenticationProfile Json? | |
| authenticationExtraParams Json? | |
| authIdentifier String? | |
| displayName String? | |
| name String? | |
| avatarUrl String? | |
| memoryFilter String? // Adding memory filter instructions | |
| admin Boolean | |
| createdAt DateTime | |
| updatedAt DateTime | |
| marketingEmails Boolean | |
| confirmedBasicDetails Boolean | |
| onboardingComplete Boolean | |
| referralSource String? | |
| personalAccessTokens PersonalAccessToken[] | |
| InvitationCode InvitationCode? | |
| invitationCodeId String? | |
| Space Space[] | |
| Workspace Workspace? | |
| IntegrationAccount IntegrationAccount[] | |
| WebhookConfiguration WebhookConfiguration[] | |
| Conversation Conversation[] | |
| ConversationHistory ConversationHistory[] | |
| IngestionRule IngestionRule[] | |
| // OAuth2 relations | |
| oauthAuthorizationCodes OAuthAuthorizationCode[] | |
| oauthAccessTokens OAuthAccessToken[] | |
| oauthRefreshTokens OAuthRefreshToken[] | |
| oauthClientsCreated OAuthClient[] | |
| oauthIntegrationGrants OAuthIntegrationGrant[] | |
| oAuthClientInstallation OAuthClientInstallation[] | |
| UserUsage UserUsage? | |
| RecallLog RecallLog[] | |
| } | |
| model UserUsage { | |
| id String | |
| createdAt DateTime | |
| updatedAt DateTime | |
| deleted DateTime? | |
| availableCredits Int | |
| usedCredits Int | |
| user User | |
| userId String | |
| } | |
| model WebhookConfiguration { | |
| id String | |
| url String | |
| secret String? | |
| isActive Boolean | |
| eventTypes String[] // List of event types this webhook is interested in, e.g. ["activity.created"] | |
| user User? | |
| userId String? | |
| workspace Workspace? | |
| workspaceId String? | |
| createdAt DateTime | |
| updatedAt DateTime | |
| WebhookDeliveryLog WebhookDeliveryLog[] | |
| } | |
| model WebhookDeliveryLog { | |
| id String | |
| webhookConfiguration WebhookConfiguration | |
| webhookConfigurationId String | |
| activity Activity? | |
| activityId String? | |
| status WebhookDeliveryStatus | |
| responseStatusCode Int? | |
| responseBody String? | |
| error String? | |
| deliveredAt DateTime | |
| createdAt DateTime | |
| } | |
| model Workspace { | |
| id String | |
| createdAt DateTime | |
| updatedAt DateTime | |
| deleted DateTime? | |
| name String | |
| slug String | |
| icon String? | |
| integrations String[] | |
| userId String? | |
| user User? | |
| IngestionQueue IngestionQueue[] | |
| IntegrationAccount IntegrationAccount[] | |
| IntegrationDefinitionV2 IntegrationDefinitionV2[] | |
| Activity Activity[] | |
| WebhookConfiguration WebhookConfiguration[] | |
| Conversation Conversation[] | |
| IngestionRule IngestionRule[] | |
| OAuthClient OAuthClient[] | |
| OAuthClientInstallation OAuthClientInstallation[] | |
| OAuthAuthorizationCode OAuthAuthorizationCode[] | |
| OAuthAccessToken OAuthAccessToken[] | |
| OAuthRefreshToken OAuthRefreshToken[] | |
| RecallLog RecallLog[] | |
| } | |
| enum AuthenticationMethod { | |
| MAGIC_LINK | |
| } | |
| enum IngestionStatus { | |
| PENDING | |
| PROCESSING | |
| COMPLETED | |
| FAILED | |
| CANCELLED | |
| } | |
| enum UserType { | |
| Agent | |
| User | |
| System | |
| } | |
| enum WebhookDeliveryStatus { | |
| SUCCESS | |
| FAILED | |
| } | |