diff --git a/apps/docs/components/icons.tsx b/apps/docs/components/icons.tsx index e9fbd90b32..da739b9273 100644 --- a/apps/docs/components/icons.tsx +++ b/apps/docs/components/icons.tsx @@ -4151,7 +4151,7 @@ export function DuckDuckGoIcon(props: SVGProps) { return ( - + `NULL`, // Only needed in full mode for details panel } const baseQuery = db @@ -107,6 +119,10 @@ export async function GET(request: NextRequest) { pausedExecutions, eq(pausedExecutions.executionId, workflowExecutionLogs.executionId) ) + .leftJoin( + workflowDeploymentVersion, + eq(workflowDeploymentVersion.id, workflowExecutionLogs.deploymentVersionId) + ) .innerJoin( workflow, and( @@ -397,6 +413,9 @@ export async function GET(request: NextRequest) { id: log.id, workflowId: log.workflowId, executionId: log.executionId, + deploymentVersionId: log.deploymentVersionId, + deploymentVersion: log.deploymentVersion ?? null, + deploymentVersionName: log.deploymentVersionName ?? null, level: log.level, duration: log.totalDurationMs ? `${log.totalDurationMs}ms` : null, trigger: log.trigger, diff --git a/apps/sim/app/api/proxy/stt/route.ts b/apps/sim/app/api/proxy/stt/route.ts index 3c3813516c..d2a94cda74 100644 --- a/apps/sim/app/api/proxy/stt/route.ts +++ b/apps/sim/app/api/proxy/stt/route.ts @@ -227,16 +227,16 @@ export async function POST(request: NextRequest) { logger.info(`[${requestId}] Transcription completed successfully`) - return NextResponse.json({ - transcript, - segments, - language: detectedLanguage, - duration, - confidence, - sentiment: sentimentResults, - entities, - summary, - }) + const response: Record = { transcript } + if (segments !== undefined) response.segments = segments + if (detectedLanguage !== undefined) response.language = detectedLanguage + if (duration !== undefined) response.duration = duration + if (confidence !== undefined) response.confidence = confidence + if (sentimentResults !== undefined) response.sentiment = sentimentResults + if (entities !== undefined) response.entities = entities + if (summary !== undefined) response.summary = summary + + return NextResponse.json(response) } catch (error) { logger.error(`[${requestId}] STT proxy error:`, error) const errorMessage = error instanceof Error ? error.message : 'Unknown error' @@ -277,11 +277,11 @@ async function transcribeWithWhisper( formData.append('temperature', temperature.toString()) } + formData.append('response_format', 'verbose_json') + if (timestamps === 'word') { - formData.append('response_format', 'verbose_json') formData.append('timestamp_granularities', 'word') } else if (timestamps === 'sentence') { - formData.append('response_format', 'verbose_json') formData.append('timestamp_granularities', 'segment') } @@ -302,17 +302,14 @@ async function transcribeWithWhisper( const data = await response.json() - if (timestamps === 'none') { - return { - transcript: data.text, - language: data.language, - } + let segments: TranscriptSegment[] | undefined + if (timestamps !== 'none') { + segments = (data.segments || data.words || []).map((seg: any) => ({ + text: seg.text, + start: seg.start, + end: seg.end, + })) } - const segments: TranscriptSegment[] = (data.segments || data.words || []).map((seg: any) => ({ - text: seg.text, - start: seg.start, - end: seg.end, - })) return { transcript: data.text, diff --git a/apps/sim/app/api/tools/mysql/utils.ts b/apps/sim/app/api/tools/mysql/utils.ts index 9edf9d56fa..50b2a65363 100644 --- a/apps/sim/app/api/tools/mysql/utils.ts +++ b/apps/sim/app/api/tools/mysql/utils.ts @@ -19,7 +19,6 @@ export async function createMySQLConnection(config: MySQLConnectionConfig) { } if (config.ssl === 'disabled') { - // Don't set ssl property at all to disable SSL } else if (config.ssl === 'required') { connectionConfig.ssl = { rejectUnauthorized: true } } else if (config.ssl === 'preferred') { @@ -54,42 +53,6 @@ export async function executeQuery( export function validateQuery(query: string): { isValid: boolean; error?: string } { const trimmedQuery = query.trim().toLowerCase() - const dangerousPatterns = [ - /drop\s+database/i, - /drop\s+schema/i, - /drop\s+user/i, - /create\s+user/i, - /grant\s+/i, - /revoke\s+/i, - /alter\s+user/i, - /set\s+global/i, - /set\s+session/i, - /load\s+data/i, - /into\s+outfile/i, - /into\s+dumpfile/i, - /load_file\s*\(/i, - /system\s+/i, - /exec\s+/i, - /execute\s+immediate/i, - /xp_cmdshell/i, - /sp_configure/i, - /information_schema\.tables/i, - /mysql\.user/i, - /mysql\.db/i, - /mysql\.host/i, - /performance_schema/i, - /sys\./i, - ] - - for (const pattern of dangerousPatterns) { - if (pattern.test(query)) { - return { - isValid: false, - error: `Query contains potentially dangerous operation: ${pattern.source}`, - } - } - } - const allowedStatements = /^(select|insert|update|delete|with|show|describe|explain)\s+/i if (!allowedStatements.test(trimmedQuery)) { return { diff --git a/apps/sim/app/api/tools/neo4j/utils.ts b/apps/sim/app/api/tools/neo4j/utils.ts index 28e9198d6e..3699ab6035 100644 --- a/apps/sim/app/api/tools/neo4j/utils.ts +++ b/apps/sim/app/api/tools/neo4j/utils.ts @@ -30,10 +30,7 @@ export async function createNeo4jDriver(config: Neo4jConnectionConfig) { return driver } -export function validateCypherQuery( - query: string, - allowDangerousOps = false -): { isValid: boolean; error?: string } { +export function validateCypherQuery(query: string): { isValid: boolean; error?: string } { if (!query || typeof query !== 'string') { return { isValid: false, @@ -41,33 +38,6 @@ export function validateCypherQuery( } } - if (!allowDangerousOps) { - const dangerousPatterns = [ - /DROP\s+DATABASE/i, - /DROP\s+CONSTRAINT/i, - /DROP\s+INDEX/i, - /CREATE\s+DATABASE/i, - /CREATE\s+CONSTRAINT/i, - /CREATE\s+INDEX/i, - /CALL\s+dbms\./i, - /CALL\s+db\./i, - /LOAD\s+CSV/i, - /apoc\.cypher\.run/i, - /apoc\.load/i, - /apoc\.periodic/i, - ] - - for (const pattern of dangerousPatterns) { - if (pattern.test(query)) { - return { - isValid: false, - error: - 'Query contains potentially dangerous operations (schema changes, system procedures, or external data loading)', - } - } - } - } - const trimmedQuery = query.trim() if (trimmedQuery.length === 0) { return { diff --git a/apps/sim/app/api/tools/postgresql/utils.ts b/apps/sim/app/api/tools/postgresql/utils.ts index 98771d3823..91956de208 100644 --- a/apps/sim/app/api/tools/postgresql/utils.ts +++ b/apps/sim/app/api/tools/postgresql/utils.ts @@ -42,46 +42,6 @@ export async function executeQuery( export function validateQuery(query: string): { isValid: boolean; error?: string } { const trimmedQuery = query.trim().toLowerCase() - // Block dangerous SQL operations - const dangerousPatterns = [ - /drop\s+database/i, - /drop\s+schema/i, - /drop\s+user/i, - /create\s+user/i, - /create\s+role/i, - /grant\s+/i, - /revoke\s+/i, - /alter\s+user/i, - /alter\s+role/i, - /set\s+role/i, - /reset\s+role/i, - /copy\s+.*from/i, - /copy\s+.*to/i, - /lo_import/i, - /lo_export/i, - /pg_read_file/i, - /pg_write_file/i, - /pg_ls_dir/i, - /information_schema\.tables/i, - /pg_catalog/i, - /pg_user/i, - /pg_shadow/i, - /pg_roles/i, - /pg_authid/i, - /pg_stat_activity/i, - /dblink/i, - /\\\\copy/i, - ] - - for (const pattern of dangerousPatterns) { - if (pattern.test(query)) { - return { - isValid: false, - error: `Query contains potentially dangerous operation: ${pattern.source}`, - } - } - } - const allowedStatements = /^(select|insert|update|delete|with|explain|analyze|show)\s+/i if (!allowedStatements.test(trimmedQuery)) { return { diff --git a/apps/sim/app/api/tools/rds/query/route.ts b/apps/sim/app/api/tools/rds/query/route.ts index a468988f7b..5c9d022630 100644 --- a/apps/sim/app/api/tools/rds/query/route.ts +++ b/apps/sim/app/api/tools/rds/query/route.ts @@ -25,7 +25,6 @@ export async function POST(request: NextRequest) { logger.info(`[${requestId}] Executing RDS query on ${params.database}`) - // Validate the query const validation = validateQuery(params.query) if (!validation.isValid) { logger.warn(`[${requestId}] Query validation failed: ${validation.error}`) diff --git a/apps/sim/app/api/tools/rds/utils.ts b/apps/sim/app/api/tools/rds/utils.ts index 507da507db..d76e248ea3 100644 --- a/apps/sim/app/api/tools/rds/utils.ts +++ b/apps/sim/app/api/tools/rds/utils.ts @@ -82,29 +82,6 @@ function parseFieldValue(field: Field): unknown { export function validateQuery(query: string): { isValid: boolean; error?: string } { const trimmedQuery = query.trim().toLowerCase() - const dangerousPatterns = [ - /drop\s+database/i, - /drop\s+schema/i, - /drop\s+user/i, - /create\s+user/i, - /create\s+role/i, - /grant\s+/i, - /revoke\s+/i, - /alter\s+user/i, - /alter\s+role/i, - /set\s+role/i, - /reset\s+role/i, - ] - - for (const pattern of dangerousPatterns) { - if (pattern.test(query)) { - return { - isValid: false, - error: `Query contains potentially dangerous operation: ${pattern.source}`, - } - } - } - const allowedStatements = /^(select|insert|update|delete|with|explain|show)\s+/i if (!allowedStatements.test(trimmedQuery)) { return { diff --git a/apps/sim/app/api/tools/stagehand/agent/route.ts b/apps/sim/app/api/tools/stagehand/agent/route.ts index 870e9e09fd..e9a6c7dbca 100644 --- a/apps/sim/app/api/tools/stagehand/agent/route.ts +++ b/apps/sim/app/api/tools/stagehand/agent/route.ts @@ -7,7 +7,6 @@ import { ensureZodObject, normalizeUrl } from '@/app/api/tools/stagehand/utils' const logger = createLogger('StagehandAgentAPI') -// Environment variables for Browserbase const BROWSERBASE_API_KEY = env.BROWSERBASE_API_KEY const BROWSERBASE_PROJECT_ID = env.BROWSERBASE_PROJECT_ID @@ -44,9 +43,7 @@ function extractActionDirectives(task: string): { let match let processedTask = task - // Find all action directives in the task while ((match = actionRegex.exec(task)) !== null) { - const _fullMatch = match[0] const actionText = match[1].trim() const index = match.index @@ -56,8 +53,6 @@ function extractActionDirectives(task: string): { }) } - // Replace action directives with placeholders for the agent - // We'll number them to make it clear to the agent what's happening if (actionDirectives.length > 0) { let offset = 0 for (let i = 0; i < actionDirectives.length; i++) { @@ -65,22 +60,18 @@ function extractActionDirectives(task: string): { const originalIndex = directive.index const placeholder = `[SECURE ACTION ${i + 1}]` - // Calculate position considering previous replacements const adjustedIndex = originalIndex - offset - // Get text to replace const fullMatch = task.substring( originalIndex, originalIndex + task.substring(originalIndex).indexOf(']]') + 2 ) - // Replace in processed task processedTask = processedTask.substring(0, adjustedIndex) + placeholder + processedTask.substring(adjustedIndex + fullMatch.length) - // Update offset for next replacement offset += fullMatch.length - placeholder.length } } @@ -88,7 +79,6 @@ function extractActionDirectives(task: string): { return { processedTask, actionDirectives } } -// Function to process secure actions in a given message async function processSecureActions( message: string, stagehand: Stagehand, @@ -98,21 +88,17 @@ async function processSecureActions( modifiedMessage: string executedActions: Array<{ action: string; result: { success: boolean; message: string } }> }> { - // Track executed actions and modified message const executedActions: Array<{ action: string; result: { success: boolean; message: string } }> = [] let modifiedMessage = message - // Look for secure action execute directives const secureActionMatches = [...message.matchAll(/EXECUTE SECURE ACTION (\d+)/gi)] - // Process each secure action request for (const match of secureActionMatches) { const fullMatch = match[0] - const actionIndex = Number.parseInt(match[1], 10) - 1 // Convert to 0-based index + const actionIndex = Number.parseInt(match[1], 10) - 1 if (actionDirectives[actionIndex]) { - // Found a secure action directive to execute const actionDirective = actionDirectives[actionIndex] let resultMessage = '' @@ -121,14 +107,10 @@ async function processSecureActions( action: actionDirective.action, }) - // Perform the action with variable substitution at runtime - // This uses act() directly, which handles variables securely - const result = await stagehand.page.act({ - action: actionDirective.action, + const result = await stagehand.act(actionDirective.action, { variables: variables || {}, }) - // Store the result for later reporting executedActions.push({ action: actionDirective.action, result: { @@ -137,7 +119,6 @@ async function processSecureActions( }, }) - // Success message to replace the execution request resultMessage = `\nSecure action ${actionIndex + 1} executed successfully.\n` } catch (error) { logger.error(`Error executing secure action ${actionIndex + 1}`, { @@ -145,7 +126,6 @@ async function processSecureActions( action: actionDirective.action, }) - // Store the failed result executedActions.push({ action: actionDirective.action, result: { @@ -154,14 +134,11 @@ async function processSecureActions( }, }) - // Error message to replace the execution request resultMessage = `\nError executing secure action ${actionIndex + 1}: ${error instanceof Error ? error.message : 'Unknown error'}\n` } - // Replace the execution directive with the result message modifiedMessage = modifiedMessage.replace(fullMatch, resultMessage) } else { - // Invalid action index - replace with error message const errorMessage = `\nError: Secure action ${actionIndex + 1} does not exist.\n` modifiedMessage = modifiedMessage.replace(fullMatch, errorMessage) } @@ -170,7 +147,6 @@ async function processSecureActions( return { modifiedMessage, executedActions } } -// Helper function for direct login attempt async function attemptDirectLogin( stagehand: Stagehand, variables: Record | undefined @@ -187,11 +163,9 @@ async function attemptDirectLogin( } } - // Define common variable keys for credentials const usernameKeys = ['username', 'email', 'user'] const passwordKeys = ['password', 'pass', 'secret'] - // Find the actual keys used in the variables const usernameKey = usernameKeys.find((key) => variables[key] !== undefined) const passwordKey = passwordKeys.find((key) => variables[key] !== undefined) @@ -210,9 +184,8 @@ async function attemptDirectLogin( logger.info('Attempting direct login with provided variables.') try { - const page = stagehand.page + const page = stagehand.context.pages()[0] - // Common selectors for username/email fields const usernameSelectors = [ 'input[type="text"][name*="user"]', 'input[type="email"]', @@ -225,7 +198,6 @@ async function attemptDirectLogin( 'input[aria-label*="email" i]', ] - // Common selectors for password fields const passwordSelectors = [ 'input[type="password"]', 'input[name*="pass"]', @@ -234,7 +206,6 @@ async function attemptDirectLogin( 'input[aria-label*="pass" i]', ] - // Common selectors for submit buttons const submitSelectors = [ 'button[type="submit"]', 'input[type="submit"]', @@ -246,12 +217,10 @@ async function attemptDirectLogin( 'button[name*="submit"]', ] - // Find and fill username let usernameFilled = false for (const selector of usernameSelectors) { const input = page.locator(selector).first() - if ((await input.count()) > 0 && (await input.isVisible({ timeout: 1000 }))) { - // Short timeout + if ((await input.count()) > 0 && (await input.isVisible())) { logger.info(`Found username field: ${selector}`) await input.fill(usernameValue) usernameFilled = true @@ -268,11 +237,10 @@ async function attemptDirectLogin( } } - // Find and fill password let passwordFilled = false for (const selector of passwordSelectors) { const input = page.locator(selector).first() - if ((await input.count()) > 0 && (await input.isVisible({ timeout: 1000 }))) { + if ((await input.count()) > 0 && (await input.isVisible())) { logger.info(`Found password field: ${selector}`) await input.fill(passwordValue) passwordFilled = true @@ -282,7 +250,6 @@ async function attemptDirectLogin( if (!passwordFilled) { logger.warn('Could not find a visible password field for direct login.') - // Even if password field not found, maybe username submit works? Unlikely but possible. return { attempted: true, success: false, @@ -291,20 +258,13 @@ async function attemptDirectLogin( } } - // Find and click submit button let submitClicked = false for (const selector of submitSelectors) { const button = page.locator(selector).first() - // Check if button exists and is visible/enabled - if ( - (await button.count()) > 0 && - (await button.isVisible({ timeout: 1000 })) && - (await button.isEnabled({ timeout: 1000 })) - ) { + if ((await button.count()) > 0 && (await button.isVisible())) { logger.info(`Found submit button: ${selector}`) await button.click() - // Wait longer for login processing - await page.waitForTimeout(3000) + await new Promise((resolve) => setTimeout(resolve, 3000)) submitClicked = true break } @@ -324,8 +284,6 @@ async function attemptDirectLogin( 'Direct login attempt completed (fields filled, submit clicked). Verifying result...' ) - // Verify if login was successful by checking for common success indicators - // 1. Check if we're redirected away from login page const currentUrl = page.url() const isStillOnLoginPage = currentUrl.includes('login') || @@ -334,9 +292,7 @@ async function attemptDirectLogin( currentUrl.includes('signup') || currentUrl.includes('register') - // 2. Check for login error messages const hasLoginError = await page.evaluate(() => { - // Look for common error message elements const errorSelectors = [ '[class*="error" i]', '[id*="error" i]', @@ -367,9 +323,7 @@ async function attemptDirectLogin( return false }) - // 3. Check for common success indicators const hasSuccessIndicators = await page.evaluate(() => { - // Check for user menu elements, profile info, etc. const userMenuSelectors = [ '[class*="avatar" i]', '[class*="profile" i]', @@ -454,26 +408,19 @@ export async function POST(request: NextRequest) { } const params = validationResult.data - // Simplify variable handling - safely convert any format to the object we need let variablesObject: Record | undefined - // Handle different formats of variables that might come from the UI if (params.variables) { if (Array.isArray(params.variables)) { - // For array format (from table input) variablesObject = {} params.variables.forEach((item: any) => { - // Check if item and item.cells exist, and Key is a string if (item?.cells?.Key && typeof item.cells.Key === 'string') { - // Access Key and Value within the 'cells' object variablesObject![item.cells.Key] = item.cells.Value || '' } }) } else if (typeof params.variables === 'object' && params.variables !== null) { - // For object format (already in correct format) variablesObject = { ...params.variables } } else if (typeof params.variables === 'string') { - // Handle string format (sometimes comes as JSON string) try { variablesObject = JSON.parse(params.variables) } catch (_e) { @@ -481,14 +428,12 @@ export async function POST(request: NextRequest) { } } - // Verify we have non-empty variables if (!variablesObject || Object.keys(variablesObject).length === 0) { logger.warn('Variables object is empty after processing', { originalVariables: params.variables, variablesType: typeof params.variables, }) - // Try to recover username/password from the raw variables if we can if (typeof params.variables === 'object' && params.variables !== null) { variablesObject = {} for (const key in params.variables) { @@ -502,7 +447,6 @@ export async function POST(request: NextRequest) { } } - // Log the collected variables (careful not to log actual passwords) if (variablesObject) { const safeVarKeys = Object.keys(variablesObject).map((key) => { return key.toLowerCase().includes('password') @@ -519,10 +463,8 @@ export async function POST(request: NextRequest) { const { task, startUrl: rawStartUrl, outputSchema, apiKey } = params - // Normalize the starting URL - only add https:// if needed let startUrl = rawStartUrl - // Add https:// if no protocol is specified startUrl = normalizeUrl(startUrl) logger.info('Starting Stagehand agent process', { @@ -532,7 +474,6 @@ export async function POST(request: NextRequest) { hasVariables: !!variablesObject && Object.keys(variablesObject).length > 0, }) - // Check for required environment variables if (!BROWSERBASE_API_KEY || !BROWSERBASE_PROJECT_ID) { logger.error('Missing required environment variables', { hasBrowserbaseApiKey: !!BROWSERBASE_API_KEY, @@ -546,68 +487,41 @@ export async function POST(request: NextRequest) { } try { - // Initialize Stagehand with Browserbase - logger.info('Initializing Stagehand with Browserbase') + logger.info('Initializing Stagehand with Browserbase (v3)') + stagehand = new Stagehand({ env: 'BROWSERBASE', apiKey: BROWSERBASE_API_KEY, projectId: BROWSERBASE_PROJECT_ID, verbose: 1, - // Use a custom logger wrapper that adapts our logger to Stagehand's expected format logger: (msg) => logger.info(typeof msg === 'string' ? msg : JSON.stringify(msg)), - disablePino: true, - modelName: 'claude-3-7-sonnet-20250219', - modelClientOptions: { - apiKey: apiKey, // User's OpenAI API key + model: { + modelName: 'claude-sonnet-4-20250514', + apiKey: apiKey, }, }) - // Initialize Stagehand logger.info('Starting stagehand.init()') await stagehand.init() logger.info('Stagehand initialized successfully') - // Monkey patch the page.act method to automatically apply variables to all actions - if (variablesObject && Object.keys(variablesObject).length > 0) { - logger.info('Setting up automatic variable substitution for all actions') - const originalAct = stagehand.page.act.bind(stagehand.page) - stagehand.page.act = async (options: any) => { - // If options is a string, convert it to object - if (typeof options === 'string') { - options = { action: options } - } + const page = stagehand.context.pages()[0] - // Ensure variables are included - options.variables = { ...(options.variables || {}), ...variablesObject } - - logger.info('Executing act with variables', { - action: options.action, - hasVariables: true, - variableCount: Object.keys(options.variables).length, - }) - - // Call original method - return originalAct(options) - } - } - - // Navigate to the start URL logger.info(`Navigating to ${startUrl}`) - await stagehand.page.goto(startUrl, { waitUntil: 'networkidle' }) + await page.goto(startUrl, { waitUntil: 'networkidle' }) logger.info('Navigation complete') - // Helper function to detect and navigate to login page if needed const ensureLoginPage = async (): Promise => { if (!stagehand) { logger.error('Stagehand instance is null') return false } + const currentPage = stagehand.context.pages()[0] logger.info('Checking if we need to navigate to login page') try { - // Check if we're already on a page with login form - const loginFormExists = await stagehand.page.evaluate(() => { + const loginFormExists = await currentPage.evaluate(() => { const usernameInput = document.querySelector( 'input[type="text"], input[type="email"], input[name="username"], input[id="username"]' ) @@ -620,10 +534,7 @@ export async function POST(request: NextRequest) { return true } - // Look for common login buttons/links - const loginElements = await stagehand.page.observe({ - instruction: 'Find login buttons or links on this page', - }) + const loginElements = await stagehand.observe('Find login buttons or links on this page') if (loginElements && loginElements.length > 0) { for (const element of loginElements) { @@ -633,18 +544,13 @@ export async function POST(request: NextRequest) { ) { logger.info(`Found login element: ${element.description}`) - // Click the login button/link if (element.selector) { logger.info(`Clicking login element: ${element.selector}`) - await stagehand.page.act({ - action: `Click on the ${element.description}`, - }) + await stagehand.act(`Click on the ${element.description}`) - // Wait for navigation or DOM changes - await stagehand.page.waitForTimeout(2000) + await new Promise((resolve) => setTimeout(resolve, 2000)) - // Check if we're now on login page - const loginPageAfterClick = await stagehand.page.evaluate(() => { + const loginPageAfterClick = await currentPage.evaluate(() => { const usernameInput = document.querySelector( 'input[type="text"], input[type="email"], input[name="username"], input[id="username"]' ) @@ -661,15 +567,13 @@ export async function POST(request: NextRequest) { } } - // Try direct navigation to /login if we couldn't find login elements logger.info('Trying direct navigation to /login path') - const currentUrl = await stagehand.page.url() + const currentUrl = currentPage.url() const loginUrl = new URL('/login', currentUrl).toString() - await stagehand.page.goto(loginUrl, { waitUntil: 'networkidle' }) + await currentPage.goto(loginUrl, { waitUntil: 'networkidle' }) - // Check if we're now on login page - const loginPageAfterDirectNav = await stagehand.page.evaluate(() => { + const loginPageAfterDirectNav = await currentPage.evaluate(() => { const usernameInput = document.querySelector( 'input[type="text"], input[type="email"], input[name="username"], input[id="username"]' ) @@ -690,14 +594,12 @@ export async function POST(request: NextRequest) { } } - // --- Direct Login Logic --- let directLoginAttempted = false let directLoginSuccess = false let loginMessage = '' - let taskForAgent = task // Use original task by default - let agentInstructions = '' // Will be generated below + let taskForAgent = task + let agentInstructions = '' - // Only attempt direct login if relevant variables exist const hasLoginVars = variablesObject && Object.keys(variablesObject).some((k) => @@ -725,7 +627,6 @@ export async function POST(request: NextRequest) { }) if (directLoginAttempted) { - // Modify task for agent regardless of login success/failure if (directLoginSuccess) { taskForAgent = `Login has been completed programmatically and was successful. Please verify that you are logged in and then proceed with the original task: ${task}` } else { @@ -741,19 +642,15 @@ export async function POST(request: NextRequest) { } else { logger.info('Skipping direct login: No relevant username/password variables found.') } - // --- End Direct Login Logic --- - // Extract action directives with variable placeholders (from original task) - const { processedTask, actionDirectives } = extractActionDirectives(task) // Use original task for extraction + const { processedTask, actionDirectives } = extractActionDirectives(task) logger.info('Extracted action directives', { actionCount: actionDirectives.length, hasActionDirectives: actionDirectives.length > 0, }) - // Generate instructions based on whether direct login was attempted if (directLoginAttempted) { - // Construct specific instructions based on login attempt outcome const loginInstructions = directLoginSuccess ? 'Login was completed programmatically and appears successful. Please VERIFY if the login was successful by checking for elements that only appear when logged in.' : `Login was attempted programmatically but appears to have FAILED (${loginMessage}). @@ -767,7 +664,6 @@ Once you've verified the login state, proceed with the following task: ${task} ${actionDirectives.length > 0 ? `\n\nNote on Secure Actions: You might see [SECURE ACTION X] placeholders. Handle these by outputting "EXECUTE SECURE ACTION X" when appropriate.` : ''} ${outputSchema && typeof outputSchema === 'object' && outputSchema !== null ? `\n\nIMPORTANT: You MUST return your final result in the following JSON format exactly:\n${formatSchemaForInstructions(getSchemaObject(outputSchema))}\n\nYour response should consist of valid JSON only, with no additional text.` : ''}` } else { - // Original detailed instructions if agent needs to handle login/placeholders agentInstructions = `You are a helpful web browsing assistant that will complete tasks on websites. Your goal is to accomplish the following task: ${processedTask}\n ${actionDirectives.length > 0 ? `\n\nYou'll see [SECURE ACTION X] placeholders in the task. These represent secure actions that will be handled automatically when you navigate to the appropriate page. When you reach a point where a secure action should be performed, output a line with exactly: "EXECUTE SECURE ACTION X" (where X is the action number). Then wait for confirmation before proceeding.` : ''}\n IMPORTANT: For any form fields that require sensitive information like usernames or passwords: @@ -790,40 +686,30 @@ WEBSITE NAVIGATION GUIDANCE: ${outputSchema && typeof outputSchema === 'object' && outputSchema !== null ? `\n\nIMPORTANT: You MUST return your final result in the following JSON format exactly:\n${formatSchemaForInstructions(getSchemaObject(outputSchema))}\n\nYour response should consist of valid JSON only, with no additional text. Ensure the data in your response adheres strictly to the schema provided.` : ''}` } - // Create agent to execute the task logger.info('Creating Stagehand agent', { directLoginAttempted, directLoginSuccess, loginMessage, }) - const agent = stagehand.agent({ - provider: 'anthropic', - model: 'claude-3-7-sonnet-20250219', - instructions: agentInstructions, // Use the generated instructions - options: { - apiKey: apiKey, - // Conditional additional instructions based on direct login attempt - additionalInstructions: directLoginAttempted - ? `Login was ${directLoginSuccess ? 'successfully completed' : 'attempted but failed'}. - ${loginMessage} - First check the current state of the page. - If login failed, you may need to click the login button again after ensuring fields are properly filled.` - : ` + + const additionalContext = directLoginAttempted + ? `Login was ${directLoginSuccess ? 'successfully completed' : 'attempted but failed'}. + ${loginMessage} + First check the current state of the page. + If login failed, you may need to click the login button again after ensuring fields are properly filled.` + : ` This task may contain placeholder variables like %username% and %password%. When you need to fill form fields, use these placeholders directly (e.g., type "%username%"). The system will substitute actual values when these placeholders are used, keeping sensitive data secure. - `.trim(), - }, + `.trim() + + const agent = stagehand.agent({ + model: 'anthropic/claude-sonnet-4-20250514', + systemPrompt: `${agentInstructions}\n\n${additionalContext}`, }) - // Since we can't use events directly, we'll need to handle secure actions - // by running the agent and then processing any EXECUTE SECURE ACTION directives - // in its output, then decide if we need to continue the conversation - - // Sequence to execute agent with secure action processing const runAgentWithSecureActions = async (): Promise => { - // Use taskForAgent which might have been modified if direct login occurred - let currentResult = await agent.execute(taskForAgent) + let currentResult = await agent.execute({ instruction: taskForAgent }) let allExecutedActions: Array<{ action: string result: { success: boolean; message: string } @@ -833,17 +719,13 @@ The system will substitute actual values when these placeholders are used, keepi while (iterationCount < maxIterations && stagehand !== null) { if (!currentResult.message) { - // No message to process, we're done break } - // Check if there are secure action directives in the message if (!/EXECUTE SECURE ACTION \d+/i.test(currentResult.message)) { - // No secure actions to execute, we're done break } - // Process secure actions in the message const { modifiedMessage, executedActions } = await processSecureActions( currentResult.message, stagehand, @@ -851,39 +733,28 @@ The system will substitute actual values when these placeholders are used, keepi variablesObject ) - // Add executed actions to our collection allExecutedActions = [...allExecutedActions, ...executedActions] if (executedActions.length === 0) { - // No actions were executed, we can stop break } - // Continue conversation with the agent using the modified message as context iterationCount++ - // Only continue if we need to - if we reached the final state - // with structured output, don't keep going const hasStructuredOutput = /```json|^\s*{/.test(modifiedMessage) if (hasStructuredOutput) { - // Already has structured output, let's not continue and risk losing it currentResult.message = modifiedMessage break } - // Continue the conversation with the agent logger.info( `Continuing agent execution with processed actions, iteration ${iterationCount}` ) try { - // Here we'd continue the agent conversation, but since agent.execute - // doesn't support continuation easily, we have to create a new prompt - // that synthesizes what's happened so far const continuationPrompt = `${modifiedMessage}\n\nPlease continue with the task.` - const nextResult = await agent.execute(continuationPrompt) + const nextResult = await agent.execute({ instruction: continuationPrompt }) - // Merge results - keep actions from both iterations but update message currentResult = { ...nextResult, actions: [...currentResult.actions, ...nextResult.actions], @@ -894,16 +765,14 @@ The system will substitute actual values when these placeholders are used, keepi } } - // Return the final result and all executed secure actions return { ...currentResult, secureActions: allExecutedActions, } } - // Execute the agent with secure action handling logger.info('Executing agent task', { - task: taskForAgent, // Log the task actually given to the agent + task: taskForAgent, actionDirectiveCount: actionDirectives.length, directLoginAttempted, directLoginSuccess, @@ -925,21 +794,16 @@ The system will substitute actual values when these placeholders are used, keepi executedActionCount: agentExecutionResult.secureActions?.length || 0, }) - // Parse the structured data from the agent's message if possible let structuredOutput = null if (agentResult.message) { try { - // Try to parse JSON from the message - // First, clean up the message to extract just the JSON let jsonContent = agentResult.message - // Look for JSON block markers in case the model wrapped it in ```json blocks const jsonBlockMatch = jsonContent.match(/```(?:json)?\s*([\s\S]*?)\s*```/) if (jsonBlockMatch?.[1]) { jsonContent = jsonBlockMatch[1] } - // Try to parse the content as JSON structuredOutput = JSON.parse(jsonContent) logger.info('Successfully parsed structured output from agent response') } catch (parseError) { @@ -948,7 +812,6 @@ The system will substitute actual values when these placeholders are used, keepi message: agentResult.message, }) - // If we have a schema, try one more approach with extract if ( outputSchema && typeof outputSchema === 'object' && @@ -960,12 +823,10 @@ The system will substitute actual values when these placeholders are used, keepi const schemaObj = getSchemaObject(outputSchema) const zodSchema = ensureZodObject(logger, schemaObj) - // Use the extract API to get structured data from whatever page we ended up on - structuredOutput = await stagehand.page.extract({ - instruction: - 'Extract the requested information from this page according to the schema', - schema: zodSchema, - } as any) + structuredOutput = await stagehand.extract( + 'Extract the requested information from this page according to the schema', + zodSchema + ) logger.info('Successfully extracted structured data as fallback', { keys: structuredOutput ? Object.keys(structuredOutput) : [], @@ -977,7 +838,6 @@ The system will substitute actual values when these placeholders are used, keepi } } - // Return agent result, structured output, and secure action results return NextResponse.json({ agentResult, structuredOutput, @@ -990,7 +850,6 @@ The system will substitute actual values when these placeholders are used, keepi stack: error instanceof Error ? error.stack : undefined, }) - // Provide detailed error information let errorMessage = 'Unknown error during agent execution' let errorDetails: Record = {} @@ -1001,7 +860,6 @@ The system will substitute actual values when these placeholders are used, keepi stack: error.stack, } - // Log additional properties for context const errorObj = error as any if (typeof errorObj.code !== 'undefined') { errorDetails.code = errorObj.code @@ -1036,7 +894,6 @@ The system will substitute actual values when these placeholders are used, keepi { status: 500 } ) } finally { - // Clean up Stagehand resources if (stagehand) { try { logger.info('Closing Stagehand instance') diff --git a/apps/sim/app/api/tools/stagehand/extract/route.ts b/apps/sim/app/api/tools/stagehand/extract/route.ts index 0ebdd9896c..4ef4fd66f8 100644 --- a/apps/sim/app/api/tools/stagehand/extract/route.ts +++ b/apps/sim/app/api/tools/stagehand/extract/route.ts @@ -7,7 +7,6 @@ import { ensureZodObject, normalizeUrl } from '@/app/api/tools/stagehand/utils' const logger = createLogger('StagehandExtractAPI') -// Environment variables for Browserbase const BROWSERBASE_API_KEY = env.BROWSERBASE_API_KEY const BROWSERBASE_PROJECT_ID = env.BROWSERBASE_PROJECT_ID @@ -21,7 +20,7 @@ const requestSchema = z.object({ }) export async function POST(request: NextRequest) { - let stagehand = null + let stagehand: Stagehand | null = null try { const body = await request.json() @@ -42,14 +41,13 @@ export async function POST(request: NextRequest) { } const params = validationResult.data - const { url: rawUrl, instruction, selector, useTextExtract, apiKey, schema } = params + const { url: rawUrl, instruction, selector, apiKey, schema } = params const url = normalizeUrl(rawUrl) logger.info('Starting Stagehand extraction process', { rawUrl, url, hasInstruction: !!instruction, - useTextExtract: !!useTextExtract, schemaType: typeof schema, }) @@ -79,16 +77,16 @@ export async function POST(request: NextRequest) { } try { - logger.info('Initializing Stagehand with Browserbase') + logger.info('Initializing Stagehand with Browserbase (v3)') + stagehand = new Stagehand({ env: 'BROWSERBASE', apiKey: BROWSERBASE_API_KEY, projectId: BROWSERBASE_PROJECT_ID, verbose: 1, logger: (msg) => logger.info(typeof msg === 'string' ? msg : JSON.stringify(msg)), - disablePino: true, - modelName: 'gpt-4o', - modelClientOptions: { + model: { + modelName: 'gpt-4o', apiKey: apiKey, }, }) @@ -97,8 +95,10 @@ export async function POST(request: NextRequest) { await stagehand.init() logger.info('Stagehand initialized successfully') + const page = stagehand.context.pages()[0] + logger.info(`Navigating to ${url}`) - await stagehand.page.goto(url, { waitUntil: 'networkidle' }) + await page.goto(url, { waitUntil: 'networkidle' }) logger.info('Navigation complete') logger.info('Preparing extraction schema', { @@ -130,32 +130,19 @@ export async function POST(request: NextRequest) { zodSchema = undefined } - const extractOptions: any = { - instruction, - useTextExtract: !!useTextExtract, - } - - if (zodSchema) { - extractOptions.schema = zodSchema - } - - if (selector) { - logger.info(`Using selector: ${selector}`) - extractOptions.selector = selector - } - - logger.info('Calling stagehand.page.extract with options', { - hasInstruction: !!extractOptions.instruction, - hasSchema: !!extractOptions.schema, - hasSelector: !!extractOptions.selector, - useTextExtract: extractOptions.useTextExtract, + logger.info('Calling stagehand.extract with options', { + hasInstruction: !!instruction, + hasSchema: !!zodSchema, + hasSelector: !!selector, }) let extractedData if (zodSchema) { - extractedData = await stagehand.page.extract(extractOptions) + extractedData = await stagehand.extract(instruction, zodSchema, { + selector: selector || undefined, + }) } else { - extractedData = await stagehand.page.extract(extractOptions.instruction) + extractedData = await stagehand.extract(instruction) } logger.info('Extraction successful', { diff --git a/apps/sim/app/api/tools/wordpress/upload/route.ts b/apps/sim/app/api/tools/wordpress/upload/route.ts new file mode 100644 index 0000000000..56c0beaf3f --- /dev/null +++ b/apps/sim/app/api/tools/wordpress/upload/route.ts @@ -0,0 +1,224 @@ +import { type NextRequest, NextResponse } from 'next/server' +import { z } from 'zod' +import { checkHybridAuth } from '@/lib/auth/hybrid' +import { generateRequestId } from '@/lib/core/utils/request' +import { createLogger } from '@/lib/logs/console/logger' +import { + getFileExtension, + getMimeTypeFromExtension, + processSingleFileToUserFile, +} from '@/lib/uploads/utils/file-utils' +import { downloadFileFromStorage } from '@/lib/uploads/utils/file-utils.server' + +export const dynamic = 'force-dynamic' + +const logger = createLogger('WordPressUploadAPI') + +const WORDPRESS_COM_API_BASE = 'https://public-api.wordpress.com/wp/v2/sites' + +const WordPressUploadSchema = z.object({ + accessToken: z.string().min(1, 'Access token is required'), + siteId: z.string().min(1, 'Site ID is required'), + file: z.any().optional().nullable(), + filename: z.string().optional().nullable(), + title: z.string().optional().nullable(), + caption: z.string().optional().nullable(), + altText: z.string().optional().nullable(), + description: z.string().optional().nullable(), +}) + +export async function POST(request: NextRequest) { + const requestId = generateRequestId() + + try { + const authResult = await checkHybridAuth(request, { requireWorkflowId: false }) + + if (!authResult.success) { + logger.warn(`[${requestId}] Unauthorized WordPress upload attempt: ${authResult.error}`) + return NextResponse.json( + { + success: false, + error: authResult.error || 'Authentication required', + }, + { status: 401 } + ) + } + + logger.info( + `[${requestId}] Authenticated WordPress upload request via ${authResult.authType}`, + { + userId: authResult.userId, + } + ) + + const body = await request.json() + const validatedData = WordPressUploadSchema.parse(body) + + logger.info(`[${requestId}] Uploading file to WordPress`, { + siteId: validatedData.siteId, + filename: validatedData.filename, + hasFile: !!validatedData.file, + }) + + if (!validatedData.file) { + return NextResponse.json( + { + success: false, + error: 'No file provided. Please upload a file.', + }, + { status: 400 } + ) + } + + // Process file - convert to UserFile format if needed + const fileData = validatedData.file + + let userFile + try { + userFile = processSingleFileToUserFile(fileData, requestId, logger) + } catch (error) { + return NextResponse.json( + { + success: false, + error: error instanceof Error ? error.message : 'Failed to process file', + }, + { status: 400 } + ) + } + + logger.info(`[${requestId}] Downloading file from storage`, { + fileName: userFile.name, + key: userFile.key, + size: userFile.size, + }) + + let fileBuffer: Buffer + + try { + fileBuffer = await downloadFileFromStorage(userFile, requestId, logger) + } catch (error) { + logger.error(`[${requestId}] Failed to download file:`, error) + return NextResponse.json( + { + success: false, + error: `Failed to download file: ${error instanceof Error ? error.message : 'Unknown error'}`, + }, + { status: 500 } + ) + } + + // Use provided filename or fall back to the original file name + const filename = validatedData.filename || userFile.name + const mimeType = userFile.type || getMimeTypeFromExtension(getFileExtension(filename)) + + logger.info(`[${requestId}] Uploading to WordPress`, { + siteId: validatedData.siteId, + filename, + mimeType, + size: fileBuffer.length, + }) + + // Upload to WordPress using multipart form data + const formData = new FormData() + // Convert Buffer to Uint8Array for Blob compatibility + const uint8Array = new Uint8Array(fileBuffer) + const blob = new Blob([uint8Array], { type: mimeType }) + formData.append('file', blob, filename) + + // Add optional metadata + if (validatedData.title) { + formData.append('title', validatedData.title) + } + if (validatedData.caption) { + formData.append('caption', validatedData.caption) + } + if (validatedData.altText) { + formData.append('alt_text', validatedData.altText) + } + if (validatedData.description) { + formData.append('description', validatedData.description) + } + + const uploadResponse = await fetch(`${WORDPRESS_COM_API_BASE}/${validatedData.siteId}/media`, { + method: 'POST', + headers: { + Authorization: `Bearer ${validatedData.accessToken}`, + }, + body: formData, + }) + + if (!uploadResponse.ok) { + const errorText = await uploadResponse.text() + let errorMessage = `WordPress API error: ${uploadResponse.statusText}` + + try { + const errorJson = JSON.parse(errorText) + errorMessage = errorJson.message || errorJson.error || errorMessage + } catch { + // Use default error message + } + + logger.error(`[${requestId}] WordPress API error:`, { + status: uploadResponse.status, + statusText: uploadResponse.statusText, + error: errorText, + }) + return NextResponse.json( + { + success: false, + error: errorMessage, + }, + { status: uploadResponse.status } + ) + } + + const uploadData = await uploadResponse.json() + + logger.info(`[${requestId}] File uploaded successfully`, { + mediaId: uploadData.id, + sourceUrl: uploadData.source_url, + }) + + return NextResponse.json({ + success: true, + output: { + media: { + id: uploadData.id, + date: uploadData.date, + slug: uploadData.slug, + type: uploadData.type, + link: uploadData.link, + title: uploadData.title, + caption: uploadData.caption, + alt_text: uploadData.alt_text, + media_type: uploadData.media_type, + mime_type: uploadData.mime_type, + source_url: uploadData.source_url, + media_details: uploadData.media_details, + }, + }, + }) + } catch (error) { + if (error instanceof z.ZodError) { + logger.warn(`[${requestId}] Invalid request data`, { errors: error.errors }) + return NextResponse.json( + { + success: false, + error: 'Invalid request data', + details: error.errors, + }, + { status: 400 } + ) + } + + logger.error(`[${requestId}] Error uploading file to WordPress:`, error) + + return NextResponse.json( + { + success: false, + error: error instanceof Error ? error.message : 'Internal server error', + }, + { status: 500 } + ) + } +} diff --git a/apps/sim/app/api/v1/logs/route.ts b/apps/sim/app/api/v1/logs/route.ts index d4ebc972e0..dc6352299a 100644 --- a/apps/sim/app/api/v1/logs/route.ts +++ b/apps/sim/app/api/v1/logs/route.ts @@ -111,6 +111,7 @@ export async function GET(request: NextRequest) { id: workflowExecutionLogs.id, workflowId: workflowExecutionLogs.workflowId, executionId: workflowExecutionLogs.executionId, + deploymentVersionId: workflowExecutionLogs.deploymentVersionId, level: workflowExecutionLogs.level, trigger: workflowExecutionLogs.trigger, startedAt: workflowExecutionLogs.startedAt, @@ -161,6 +162,7 @@ export async function GET(request: NextRequest) { id: log.id, workflowId: log.workflowId, executionId: log.executionId, + deploymentVersionId: log.deploymentVersionId, level: log.level, trigger: log.trigger, startedAt: log.startedAt.toISOString(), diff --git a/apps/sim/app/api/workflows/[id]/execute/route.ts b/apps/sim/app/api/workflows/[id]/execute/route.ts index 52dce524ab..a330dd624c 100644 --- a/apps/sim/app/api/workflows/[id]/execute/route.ts +++ b/apps/sim/app/api/workflows/[id]/execute/route.ts @@ -430,6 +430,7 @@ export async function POST(req: NextRequest, { params }: { params: Promise<{ id: edges: any[] loops: Record parallels: Record + deploymentVersionId?: string } | null = null let processedInput = input @@ -444,6 +445,10 @@ export async function POST(req: NextRequest, { params }: { params: Promise<{ id: edges: workflowData.edges, loops: workflowData.loops || {}, parallels: workflowData.parallels || {}, + deploymentVersionId: + !shouldUseDraftState && 'deploymentVersionId' in workflowData + ? (workflowData.deploymentVersionId as string) + : undefined, } const serializedWorkflow = new Serializer().serializeWorkflow( diff --git a/apps/sim/app/templates/[id]/template.tsx b/apps/sim/app/templates/[id]/template.tsx index 7ca551d5b0..9b8c32a00a 100644 --- a/apps/sim/app/templates/[id]/template.tsx +++ b/apps/sim/app/templates/[id]/template.tsx @@ -29,6 +29,7 @@ import { DropdownMenuItem, DropdownMenuTrigger, } from '@/components/ui/dropdown-menu' +import { Skeleton } from '@/components/ui/skeleton' import { VerifiedBadge } from '@/components/ui/verified-badge' import { useSession } from '@/lib/auth/auth-client' import { cn } from '@/lib/core/utils/cn' @@ -41,6 +42,95 @@ import { useStarTemplate, useTemplate } from '@/hooks/queries/templates' const logger = createLogger('TemplateDetails') +interface TemplateDetailsLoadingProps { + isWorkspaceContext?: boolean + workspaceId?: string | null +} + +function TemplateDetailsLoading({ isWorkspaceContext, workspaceId }: TemplateDetailsLoadingProps) { + const breadcrumbItems = [ + { + label: 'Templates', + href: + isWorkspaceContext && workspaceId ? `/workspace/${workspaceId}/templates` : '/templates', + }, + { label: 'Template' }, + ] + + return ( +
+
+
+ {/* Breadcrumb navigation */} + + + {/* Template name and action buttons */} +
+ +
+ +
+
+ + {/* Template tagline */} +
+ +
+ + {/* Creator and stats row */} +
+ {/* Star icon and count */} + + + + {/* Views icon and count */} + + + + {/* Vertical divider */} +
+ + {/* Creator profile pic */} + + {/* Creator name */} + +
+ + {/* Credentials needed */} +
+ +
+ + {/* Canvas preview */} +
+ +
+ + {/* About this Workflow */} +
+ +
+ + + +
+
+
+
+
+ ) +} + interface TemplateDetailsProps { isWorkspaceContext?: boolean } @@ -207,11 +297,7 @@ export default function TemplateDetails({ isWorkspaceContext = false }: Template if (loading) { return ( -
-
-

Loading template...

-
-
+ ) } @@ -542,9 +628,19 @@ export default function TemplateDetails({ isWorkspaceContext = false }: Template } return ( -
-
-
+
+
+
{/* Breadcrumb navigation */} @@ -697,7 +793,7 @@ export default function TemplateDetails({ isWorkspaceContext = false }: Template {/* Template tagline */} {template.details?.tagline && ( -

+

{template.details.tagline}

)} @@ -770,7 +866,7 @@ export default function TemplateDetails({ isWorkspaceContext = false }: Template {/* Canvas preview */}
{renderWorkflowPreview()} diff --git a/apps/sim/app/templates/layout-client.tsx b/apps/sim/app/templates/layout-client.tsx index 885db63d61..347740d97c 100644 --- a/apps/sim/app/templates/layout-client.tsx +++ b/apps/sim/app/templates/layout-client.tsx @@ -6,7 +6,7 @@ import { season } from '@/app/_styles/fonts/season/season' export default function TemplatesLayoutClient({ children }: { children: React.ReactNode }) { return ( -
{children}
+
{children}
) } diff --git a/apps/sim/app/workspace/[workspaceId]/knowledge/[id]/components/add-documents-modal/add-documents-modal.tsx b/apps/sim/app/workspace/[workspaceId]/knowledge/[id]/components/add-documents-modal/add-documents-modal.tsx index e515dac9bd..366d384f94 100644 --- a/apps/sim/app/workspace/[workspaceId]/knowledge/[id]/components/add-documents-modal/add-documents-modal.tsx +++ b/apps/sim/app/workspace/[workspaceId]/knowledge/[id]/components/add-documents-modal/add-documents-modal.tsx @@ -12,7 +12,6 @@ import { ModalFooter, ModalHeader, } from '@/components/emcn' -import { Alert, AlertDescription, AlertTitle } from '@/components/ui/alert' import { cn } from '@/lib/core/utils/cn' import { createLogger } from '@/lib/logs/console/logger' import { formatFileSize, validateKnowledgeBaseFile } from '@/lib/uploads/utils/file-utils' @@ -53,7 +52,7 @@ export function AddDocumentsModal({ const [dragCounter, setDragCounter] = useState(0) const [retryingIndexes, setRetryingIndexes] = useState>(new Set()) - const { isUploading, uploadProgress, uploadFiles, clearError } = useKnowledgeUpload({ + const { isUploading, uploadProgress, uploadFiles, uploadError, clearError } = useKnowledgeUpload({ workspaceId, onUploadComplete: () => { logger.info(`Successfully uploaded ${files.length} files`) @@ -234,11 +233,7 @@ export function AddDocumentsModal({
{fileError && ( - - - Error - {fileError} - +

{fileError}

)}
@@ -341,24 +336,31 @@ export function AddDocumentsModal({
- - - + + {uploadError && ( +

+ {uploadError.message} +

+ )} +
+ + +
diff --git a/apps/sim/app/workspace/[workspaceId]/knowledge/components/create-base-modal/create-base-modal.tsx b/apps/sim/app/workspace/[workspaceId]/knowledge/components/create-base-modal/create-base-modal.tsx index 0973eece03..2362593b0d 100644 --- a/apps/sim/app/workspace/[workspaceId]/knowledge/components/create-base-modal/create-base-modal.tsx +++ b/apps/sim/app/workspace/[workspaceId]/knowledge/components/create-base-modal/create-base-modal.tsx @@ -17,7 +17,6 @@ import { ModalHeader, Textarea, } from '@/components/emcn' -import { Alert, AlertDescription, AlertTitle } from '@/components/ui/alert' import { cn } from '@/lib/core/utils/cn' import { createLogger } from '@/lib/logs/console/logger' import { formatFileSize, validateKnowledgeBaseFile } from '@/lib/uploads/utils/file-utils' @@ -89,7 +88,7 @@ export function CreateBaseModal({ const scrollContainerRef = useRef(null) - const { uploadFiles, isUploading, uploadProgress, clearError } = useKnowledgeUpload({ + const { uploadFiles, isUploading, uploadProgress, uploadError, clearError } = useKnowledgeUpload({ workspaceId, onUploadComplete: (uploadedFiles) => { logger.info(`Successfully uploaded ${uploadedFiles.length} files`) @@ -280,21 +279,35 @@ export function CreateBaseModal({ const newKnowledgeBase = result.data if (files.length > 0) { - newKnowledgeBase.docCount = files.length + try { + const uploadedFiles = await uploadFiles(files, newKnowledgeBase.id, { + chunkSize: data.maxChunkSize, + minCharactersPerChunk: data.minChunkSize, + chunkOverlap: data.overlapSize, + recipe: 'default', + }) - if (onKnowledgeBaseCreated) { - onKnowledgeBaseCreated(newKnowledgeBase) + logger.info(`Successfully uploaded ${uploadedFiles.length} files`) + logger.info(`Started processing ${uploadedFiles.length} documents in the background`) + + newKnowledgeBase.docCount = uploadedFiles.length + + if (onKnowledgeBaseCreated) { + onKnowledgeBaseCreated(newKnowledgeBase) + } + } catch (uploadError) { + // If file upload fails completely, delete the knowledge base to avoid orphaned empty KB + logger.error('File upload failed, deleting knowledge base:', uploadError) + try { + await fetch(`/api/knowledge/${newKnowledgeBase.id}`, { + method: 'DELETE', + }) + logger.info(`Deleted orphaned knowledge base: ${newKnowledgeBase.id}`) + } catch (deleteError) { + logger.error('Failed to delete orphaned knowledge base:', deleteError) + } + throw uploadError } - - const uploadedFiles = await uploadFiles(files, newKnowledgeBase.id, { - chunkSize: data.maxChunkSize, - minCharactersPerChunk: data.minChunkSize, - chunkOverlap: data.overlapSize, - recipe: 'default', - }) - - logger.info(`Successfully uploaded ${uploadedFiles.length} files`) - logger.info(`Started processing ${uploadedFiles.length} documents in the background`) } else { if (onKnowledgeBaseCreated) { onKnowledgeBaseCreated(newKnowledgeBase) @@ -325,14 +338,6 @@ export function CreateBaseModal({
- {submitStatus && submitStatus.type === 'error' && ( - - - Error - {submitStatus.message} - - )} -
- - Error - {fileError} - +

{fileError}

)}
- - - + + {(submitStatus?.type === 'error' || uploadError) && ( +

+ {uploadError?.message || submitStatus?.message} +

+ )} +
+ + +
diff --git a/apps/sim/app/workspace/[workspaceId]/knowledge/hooks/use-knowledge-upload.ts b/apps/sim/app/workspace/[workspaceId]/knowledge/hooks/use-knowledge-upload.ts index fb7085e8eb..96c85cfae2 100644 --- a/apps/sim/app/workspace/[workspaceId]/knowledge/hooks/use-knowledge-upload.ts +++ b/apps/sim/app/workspace/[workspaceId]/knowledge/hooks/use-knowledge-upload.ts @@ -1,5 +1,6 @@ import { useCallback, useState } from 'react' import { createLogger } from '@/lib/logs/console/logger' +import { getFileExtension, getMimeTypeFromExtension } from '@/lib/uploads/utils/file-utils' const logger = createLogger('KnowledgeUpload') @@ -143,6 +144,17 @@ const calculateThroughputMbps = (bytes: number, durationMs: number) => { */ const formatDurationSeconds = (durationMs: number) => Number((durationMs / 1000).toFixed(2)) +/** + * Gets the content type for a file, falling back to extension-based lookup if browser doesn't provide one + */ +const getFileContentType = (file: File): string => { + if (file.type?.trim()) { + return file.type + } + const extension = getFileExtension(file.name) + return getMimeTypeFromExtension(extension) +} + /** * Runs async operations with concurrency limit */ @@ -280,7 +292,7 @@ const getPresignedData = async ( }, body: JSON.stringify({ fileName: file.name, - contentType: file.type, + contentType: getFileContentType(file), fileSize: file.size, }), signal: localController.signal, @@ -529,7 +541,9 @@ export function useKnowledgeUpload(options: UseKnowledgeUploadOptions = {}) { throughputMbps: calculateThroughputMbps(file.size, durationMs), status: xhr.status, }) - resolve(createUploadedFile(file.name, fullFileUrl, file.size, file.type, file)) + resolve( + createUploadedFile(file.name, fullFileUrl, file.size, getFileContentType(file), file) + ) } else { logger.error('S3 PUT request failed', { status: xhr.status, @@ -597,7 +611,7 @@ export function useKnowledgeUpload(options: UseKnowledgeUploadOptions = {}) { headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ fileName: file.name, - contentType: file.type, + contentType: getFileContentType(file), fileSize: file.size, }), }) @@ -736,7 +750,7 @@ export function useKnowledgeUpload(options: UseKnowledgeUploadOptions = {}) { const fullFileUrl = path.startsWith('http') ? path : `${window.location.origin}${path}` - return createUploadedFile(file.name, fullFileUrl, file.size, file.type, file) + return createUploadedFile(file.name, fullFileUrl, file.size, getFileContentType(file), file) } catch (error) { logger.error(`Multipart upload failed for ${file.name}:`, error) const durationMs = getHighResTime() - startTime @@ -800,7 +814,7 @@ export function useKnowledgeUpload(options: UseKnowledgeUploadOptions = {}) { file.name, filePath.startsWith('http') ? filePath : `${window.location.origin}${filePath}`, file.size, - file.type, + getFileContentType(file), file ) } finally { @@ -855,7 +869,7 @@ export function useKnowledgeUpload(options: UseKnowledgeUploadOptions = {}) { const batchRequest = { files: batchFiles.map((file) => ({ fileName: file.name, - contentType: file.type, + contentType: getFileContentType(file), fileSize: file.size, })), } diff --git a/apps/sim/app/workspace/[workspaceId]/knowledge/knowledge.tsx b/apps/sim/app/workspace/[workspaceId]/knowledge/knowledge.tsx index f9c1614857..757b0731fb 100644 --- a/apps/sim/app/workspace/[workspaceId]/knowledge/knowledge.tsx +++ b/apps/sim/app/workspace/[workspaceId]/knowledge/knowledge.tsx @@ -199,7 +199,7 @@ export function Knowledge() {
-
+
{isLoading ? ( ) : filteredAndSortedKnowledgeBases.length === 0 ? ( diff --git a/apps/sim/app/workspace/[workspaceId]/knowledge/layout.tsx b/apps/sim/app/workspace/[workspaceId]/knowledge/layout.tsx index 4e1ff395ba..d1d899e550 100644 --- a/apps/sim/app/workspace/[workspaceId]/knowledge/layout.tsx +++ b/apps/sim/app/workspace/[workspaceId]/knowledge/layout.tsx @@ -2,5 +2,5 @@ * Knowledge Base layout - applies sidebar padding for all knowledge routes. */ export default function KnowledgeLayout({ children }: { children: React.ReactNode }) { - return
{children}
+ return
{children}
} diff --git a/apps/sim/app/workspace/[workspaceId]/logs/components/dashboard/components/line-chart/line-chart.tsx b/apps/sim/app/workspace/[workspaceId]/logs/components/dashboard/components/line-chart/line-chart.tsx index 5c9053cc3c..cde20df021 100644 --- a/apps/sim/app/workspace/[workspaceId]/logs/components/dashboard/components/line-chart/line-chart.tsx +++ b/apps/sim/app/workspace/[workspaceId]/logs/components/dashboard/components/line-chart/line-chart.tsx @@ -30,8 +30,8 @@ export function LineChart({ }) { const containerRef = useRef(null) const uniqueId = useRef(`chart-${Math.random().toString(36).substring(2, 9)}`).current - const [containerWidth, setContainerWidth] = useState(420) - const width = containerWidth + const [containerWidth, setContainerWidth] = useState(null) + const width = containerWidth ?? 0 const height = 166 const padding = { top: 16, right: 28, bottom: 26, left: 26 } useEffect(() => { @@ -39,14 +39,14 @@ export function LineChart({ const element = containerRef.current const ro = new ResizeObserver((entries) => { const entry = entries[0] - if (entry?.contentRect) { + if (entry?.contentRect && entry.contentRect.width > 0) { const w = Math.max(280, Math.floor(entry.contentRect.width)) setContainerWidth(w) } }) ro.observe(element) const rect = element.getBoundingClientRect() - if (rect?.width) setContainerWidth(Math.max(280, Math.floor(rect.width))) + if (rect?.width && rect.width > 0) setContainerWidth(Math.max(280, Math.floor(rect.width))) return () => ro.disconnect() }, []) const chartWidth = width - padding.left - padding.right @@ -95,6 +95,16 @@ export function LineChart({ const hasExternalWrapper = !label || label === '' + if (containerWidth === null) { + return ( +
+ ) + } + if (data.length === 0) { return (
{/* Skeleton bars simulating chart */}
- {Array.from({ length: 24 }).map((_, i) => ( + {SKELETON_BAR_HEIGHTS.map((height, i) => ( ))} @@ -289,9 +297,19 @@ export default function Dashboard({ const executions = metricsQuery.data?.workflows ?? [] const aggregateSegments = metricsQuery.data?.aggregateSegments ?? [] - const loading = metricsQuery.isLoading const error = metricsQuery.error?.message ?? null + /** + * Loading state logic using TanStack Query best practices: + * - isPending: true when there's no cached data (initial load only) + * - isFetching: true when any fetch is in progress + * - isPlaceholderData: true when showing stale data from keepPreviousData + * + * We only show skeleton on initial load (isPending + no data). + * For subsequent fetches, keepPreviousData shows stale content while fetching. + */ + const showSkeleton = metricsQuery.isPending && !metricsQuery.data + // Check if any filters are actually applied const hasActiveFilters = useMemo( () => @@ -747,7 +765,7 @@ export default function Dashboard({ } }, [refreshTrigger]) - if (loading) { + if (showSkeleton) { return } @@ -793,7 +811,6 @@ export default function Dashboard({
{globalDetails ? ( {globalDetails ? ( {globalDetails ? ( +
{/* Level */}
@@ -233,14 +233,30 @@ export function LogDetails({
{/* Duration */} -
+
Duration - + {log.duration || '—'}
+ + {/* Version */} + {log.deploymentVersion && ( +
+ + Version + +
+ + {log.deploymentVersionName || `v${log.deploymentVersion}`} + +
+
+ )}
{/* Workflow State */} diff --git a/apps/sim/app/workspace/[workspaceId]/logs/components/logs-toolbar/logs-toolbar.tsx b/apps/sim/app/workspace/[workspaceId]/logs/components/logs-toolbar/logs-toolbar.tsx index e297156476..692849fa2d 100644 --- a/apps/sim/app/workspace/[workspaceId]/logs/components/logs-toolbar/logs-toolbar.tsx +++ b/apps/sim/app/workspace/[workspaceId]/logs/components/logs-toolbar/logs-toolbar.tsx @@ -343,17 +343,18 @@ export function LogsToolbar({ {/* View mode toggle */} -
+
onViewModeChange(isDashboardView ? 'logs' : 'dashboard')} + >
- {/* Dashboard view */} - {isDashboardView && ( -
- -
- )} + {/* Dashboard view - always mounted to preserve state and query cache */} +
+ +
{/* Main content area with table - only show in logs view */} - {!isDashboardView && ( -
- {/* Table container */} -
- {/* Table header */} -
-
- - Date - - - Time - - - Status - - - Workflow - - - Cost - - - Trigger - - - Duration - -
-
- - {/* Table body - scrollable */} -
- {logsQuery.isLoading && !logsQuery.data ? ( -
-
- - Loading logs... -
-
- ) : logsQuery.isError ? ( -
-
- - - Error: {logsQuery.error?.message || 'Failed to load logs'} - -
-
- ) : logs.length === 0 ? ( -
-
- No logs found -
-
- ) : ( -
- {logs.map((log) => { - const formattedDate = formatDate(log.createdAt) - const isSelected = selectedLog?.id === log.id - const baseLevel = (log.level || 'info').toLowerCase() - const isError = baseLevel === 'error' - const isPending = !isError && log.hasPendingPause === true - const isRunning = !isError && !isPending && log.duration === null - - return ( -
handleLogClick(log)} - > -
- {/* Date */} - - {formattedDate.compactDate} - - - {/* Time */} - - {formattedDate.compactTime} - - - {/* Status */} -
- -
- - {/* Workflow */} -
-
- - {log.workflow?.name || 'Unknown'} - -
- - {/* Cost */} - - {typeof log.cost?.total === 'number' - ? `$${log.cost.total.toFixed(4)}` - : '—'} - - - {/* Trigger */} -
- {log.trigger ? ( - - ) : ( - - — - - )} -
- - {/* Duration */} -
- - {formatDuration(log.duration) || '—'} - -
-
- - {/* Resume Link */} - {isPending && - log.executionId && - (log.workflow?.id || log.workflowId) && ( - e.stopPropagation()} - > - - - )} -
- ) - })} - - {/* Infinite scroll loader */} - {logsQuery.hasNextPage && ( -
-
- {logsQuery.isFetchingNextPage ? ( - <> - - Loading more... - - ) : ( - Scroll to load more - )} -
-
- )} -
- )} +
+ {/* Table container */} +
+ {/* Table header */} +
+
+ + Date + + + Time + + + Status + + + Workflow + + + Cost + + + Trigger + + + Duration +
- {/* Log Details - rendered inside table container */} - 0} - /> + {/* Table body - scrollable */} +
+ {logsQuery.isLoading && !logsQuery.data ? ( +
+
+ + Loading logs... +
+
+ ) : logsQuery.isError ? ( +
+
+ + + Error: {logsQuery.error?.message || 'Failed to load logs'} + +
+
+ ) : logs.length === 0 ? ( +
+
+ No logs found +
+
+ ) : ( +
+ {logs.map((log) => { + const formattedDate = formatDate(log.createdAt) + const isSelected = selectedLog?.id === log.id + const baseLevel = (log.level || 'info').toLowerCase() + const isError = baseLevel === 'error' + const isPending = !isError && log.hasPendingPause === true + const isRunning = !isError && !isPending && log.duration === null + + return ( +
handleLogClick(log)} + > +
+ {/* Date */} + + {formattedDate.compactDate} + + + {/* Time */} + + {formattedDate.compactTime} + + + {/* Status */} +
+ +
+ + {/* Workflow */} +
+
+ + {log.workflow?.name || 'Unknown'} + +
+ + {/* Cost */} + + {typeof log.cost?.total === 'number' + ? `$${log.cost.total.toFixed(4)}` + : '—'} + + + {/* Trigger */} +
+ {log.trigger ? ( + + ) : ( + + — + + )} +
+ + {/* Duration */} +
+ + {formatDuration(log.duration) || '—'} + +
+
+ + {/* Resume Link */} + {isPending && log.executionId && (log.workflow?.id || log.workflowId) && ( + e.stopPropagation()} + > + + + )} +
+ ) + })} + + {/* Infinite scroll loader */} + {logsQuery.hasNextPage && ( +
+
+ {logsQuery.isFetchingNextPage ? ( + <> + + Loading more... + + ) : ( + Scroll to load more + )} +
+
+ )} +
+ )} +
- )} + + {/* Log Details - rendered inside table container */} + 0} + /> +
diff --git a/apps/sim/app/workspace/[workspaceId]/templates/components/template-card.tsx b/apps/sim/app/workspace/[workspaceId]/templates/components/template-card.tsx index c953df748a..5199252d00 100644 --- a/apps/sim/app/workspace/[workspaceId]/templates/components/template-card.tsx +++ b/apps/sim/app/workspace/[workspaceId]/templates/components/template-card.tsx @@ -206,7 +206,10 @@ function TemplateCardInner({ className )} > -
+
{normalizedState && isInView ? ( )} - {/* Transparent overlay to block all pointer events from the preview */} -
diff --git a/apps/sim/app/workspace/[workspaceId]/templates/layout.tsx b/apps/sim/app/workspace/[workspaceId]/templates/layout.tsx index b47ee9feba..fb101fcaa1 100644 --- a/apps/sim/app/workspace/[workspaceId]/templates/layout.tsx +++ b/apps/sim/app/workspace/[workspaceId]/templates/layout.tsx @@ -2,9 +2,5 @@ * Templates layout - applies sidebar padding for all template routes. */ export default function TemplatesLayout({ children }: { children: React.ReactNode }) { - return ( -
-
{children}
-
- ) + return
{children}
} diff --git a/apps/sim/app/workspace/[workspaceId]/templates/templates.tsx b/apps/sim/app/workspace/[workspaceId]/templates/templates.tsx index f7120cea62..54f75ff22d 100644 --- a/apps/sim/app/workspace/[workspaceId]/templates/templates.tsx +++ b/apps/sim/app/workspace/[workspaceId]/templates/templates.tsx @@ -175,8 +175,8 @@ export default function Templates({
-
- +
+

Templates

diff --git a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/deploy/components/deploy-modal/components/template/template.tsx b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/deploy/components/deploy-modal/components/template/template.tsx index 90857eb81e..7d21e3c55b 100644 --- a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/deploy/components/deploy-modal/components/template/template.tsx +++ b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/deploy/components/deploy-modal/components/template/template.tsx @@ -16,6 +16,7 @@ import { } from '@/components/emcn' import { Skeleton, TagInput } from '@/components/ui' import { useSession } from '@/lib/auth/auth-client' +import { cn } from '@/lib/core/utils/cn' import { createLogger } from '@/lib/logs/console/logger' import { WorkflowPreview } from '@/app/workspace/[workspaceId]/w/components/workflow-preview/workflow-preview' import { @@ -87,7 +88,8 @@ export function TemplateDeploy({ const deleteMutation = useDeleteTemplate() const isSubmitting = createMutation.isPending || updateMutation.isPending - const isFormValid = formData.name.trim().length > 0 && formData.name.length <= 100 + const isFormValid = + formData.name.trim().length > 0 && formData.name.length <= 100 && formData.tagline.length <= 200 const updateField = (field: K, value: TemplateFormData[K]) => { setFormData((prev) => ({ ...prev, [field]: value })) @@ -302,6 +304,7 @@ export function TemplateDeploy({ value={formData.tagline} onChange={(e) => updateField('tagline', e.target.value)} disabled={isSubmitting} + className={cn(formData.tagline.length > 200 && 'border-[var(--text-error)]')} />
diff --git a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/tag-dropdown/tag-dropdown.tsx b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/tag-dropdown/tag-dropdown.tsx index b72c66d1f6..ed1c16d2a8 100644 --- a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/tag-dropdown/tag-dropdown.tsx +++ b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/tag-dropdown/tag-dropdown.tsx @@ -1,4 +1,6 @@ +import type React from 'react' import { useCallback, useEffect, useMemo, useRef, useState } from 'react' +import { RepeatIcon, SplitIcon } from 'lucide-react' import { useShallow } from 'zustand/react/shallow' import { Popover, @@ -349,14 +351,24 @@ const getCaretViewportPosition = ( } /** - * Renders a tag icon with background color + * Renders a tag icon with background color - can use either a React icon component or a letter */ -const TagIcon: React.FC<{ icon: string; color: string }> = ({ icon, color }) => ( +const TagIcon: React.FC<{ + icon: string | React.ComponentType<{ className?: string }> + color: string +}> = ({ icon, color }) => (
- {icon} + {typeof icon === 'string' ? ( + {icon} + ) : ( + (() => { + const IconComponent = icon + return + })() + )}
) @@ -1385,7 +1397,17 @@ export const TagDropdown: React.FC = ({ blockColor = BLOCK_COLORS.PARALLEL } - const tagIcon = group.blockName.charAt(0).toUpperCase() + // Use actual block icon if available, otherwise fall back to special icons for loop/parallel or first letter + let tagIcon: string | React.ComponentType<{ className?: string }> = group.blockName + .charAt(0) + .toUpperCase() + if (blockConfig?.icon) { + tagIcon = blockConfig.icon + } else if (group.blockType === 'loop') { + tagIcon = RepeatIcon + } else if (group.blockType === 'parallel') { + tagIcon = SplitIcon + } return (
diff --git a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/terminal/terminal.tsx b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/terminal/terminal.tsx index daeb57f9f7..d50b65953d 100644 --- a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/terminal/terminal.tsx +++ b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/terminal/terminal.tsx @@ -298,6 +298,8 @@ export function Terminal() { setOutputPanelWidth, openOnRun, setOpenOnRun, + wrapText, + setWrapText, setHasHydrated, } = useTerminalStore() const isExpanded = useTerminalStore((state) => state.terminalHeight > NEAR_MIN_THRESHOLD) @@ -312,7 +314,6 @@ export function Terminal() { const exportConsoleCSV = useTerminalConsoleStore((state) => state.exportConsoleCSV) const [selectedEntry, setSelectedEntry] = useState(null) const [isToggling, setIsToggling] = useState(false) - const [wrapText, setWrapText] = useState(true) const [showCopySuccess, setShowCopySuccess] = useState(false) const [showInput, setShowInput] = useState(false) const [autoSelectEnabled, setAutoSelectEnabled] = useState(true) @@ -1528,7 +1529,7 @@ export function Terminal() { showCheck onClick={(e) => { e.stopPropagation() - setWrapText((prev) => !prev) + setWrapText(!wrapText) }} > Wrap text diff --git a/apps/sim/app/workspace/[workspaceId]/w/components/sidebar/components/workflow-list/workflow-list.tsx b/apps/sim/app/workspace/[workspaceId]/w/components/sidebar/components/workflow-list/workflow-list.tsx index 91a38ad1a7..b2c70f7044 100644 --- a/apps/sim/app/workspace/[workspaceId]/w/components/sidebar/components/workflow-list/workflow-list.tsx +++ b/apps/sim/app/workspace/[workspaceId]/w/components/sidebar/components/workflow-list/workflow-list.tsx @@ -1,6 +1,6 @@ 'use client' -import { useCallback, useEffect, useMemo } from 'react' +import { useCallback, useEffect, useMemo, useRef } from 'react' import clsx from 'clsx' import { useParams, usePathname } from 'next/navigation' import { FolderItem } from '@/app/workspace/[workspaceId]/w/components/sidebar/components/workflow-list/components/folder-item/folder-item' @@ -144,25 +144,45 @@ export function WorkflowList({ [pathname, workspaceId] ) + // Track last scrolled workflow to avoid redundant scroll checks + const lastScrolledWorkflowRef = useRef(null) + /** - * Auto-expand folders and select the active workflow + * Auto-expand folders, select active workflow, and scroll into view if needed. */ useEffect(() => { if (!workflowId || isLoading || foldersLoading) return - // Expand folder path + // Expand folder path to reveal workflow if (activeWorkflowFolderId) { const folderPath = getFolderPath(activeWorkflowFolderId) - for (const folder of folderPath) { - setExpanded(folder.id, true) - } + folderPath.forEach((folder) => setExpanded(folder.id, true)) } - // Auto-select active workflow if not already selected + // Select workflow if not already selected const { selectedWorkflows, selectOnly } = useFolderStore.getState() if (!selectedWorkflows.has(workflowId)) { selectOnly(workflowId) } + + // Skip scroll check if already handled for this workflow + if (lastScrolledWorkflowRef.current === workflowId) return + lastScrolledWorkflowRef.current = workflowId + + // Scroll after render only if element is completely off-screen + requestAnimationFrame(() => { + const element = document.querySelector(`[data-item-id="${workflowId}"]`) + const container = scrollContainerRef.current + if (!element || !container) return + + const { top: elTop, bottom: elBottom } = element.getBoundingClientRect() + const { top: ctTop, bottom: ctBottom } = container.getBoundingClientRect() + + // Only scroll if completely above or below the visible area + if (elBottom <= ctTop || elTop >= ctBottom) { + element.scrollIntoView({ behavior: 'smooth', block: 'center' }) + } + }) }, [workflowId, activeWorkflowFolderId, isLoading, foldersLoading, getFolderPath, setExpanded]) const renderWorkflowItem = useCallback( diff --git a/apps/sim/app/workspace/[workspaceId]/w/components/sidebar/sidebar.tsx b/apps/sim/app/workspace/[workspaceId]/w/components/sidebar/sidebar.tsx index cdbcd75830..8549437792 100644 --- a/apps/sim/app/workspace/[workspaceId]/w/components/sidebar/sidebar.tsx +++ b/apps/sim/app/workspace/[workspaceId]/w/components/sidebar/sidebar.tsx @@ -212,64 +212,24 @@ export function Sidebar() { // Combined loading state const isLoading = workflowsLoading || sessionLoading - // Ref to track active timeout IDs for cleanup - const scrollTimeoutRef = useRef(null) - /** - * Scrolls an element into view if it's not already visible in the scroll container. - * Uses a retry mechanism with cleanup to wait for the element to be rendered in the DOM. - * - * @param elementId - The ID of the element to scroll to - * @param maxRetries - Maximum number of retry attempts (default: 10) + * Scrolls a newly created element into view if completely off-screen. + * Uses requestAnimationFrame to sync with render, then scrolls. */ - const scrollToElement = useCallback( - (elementId: string, maxRetries = 10) => { - // Clear any existing timeout - if (scrollTimeoutRef.current !== null) { - clearTimeout(scrollTimeoutRef.current) - scrollTimeoutRef.current = null + const scrollToElement = useCallback((elementId: string) => { + requestAnimationFrame(() => { + const element = document.querySelector(`[data-item-id="${elementId}"]`) + const container = scrollContainerRef.current + if (!element || !container) return + + const { top: elTop, bottom: elBottom } = element.getBoundingClientRect() + const { top: ctTop, bottom: ctBottom } = container.getBoundingClientRect() + + // Only scroll if element is completely off-screen + if (elBottom <= ctTop || elTop >= ctBottom) { + element.scrollIntoView({ behavior: 'smooth', block: 'center' }) } - - let attempts = 0 - - const tryScroll = () => { - attempts++ - const element = document.querySelector(`[data-item-id="${elementId}"]`) - const container = scrollContainerRef.current - - if (element && container) { - const elementRect = element.getBoundingClientRect() - const containerRect = container.getBoundingClientRect() - - // Check if element is not fully visible in the container - const isAboveView = elementRect.top < containerRect.top - const isBelowView = elementRect.bottom > containerRect.bottom - - if (isAboveView || isBelowView) { - element.scrollIntoView({ behavior: 'smooth', block: 'nearest' }) - } - scrollTimeoutRef.current = null - } else if (attempts < maxRetries) { - // Element not in DOM yet, retry after a short delay - scrollTimeoutRef.current = window.setTimeout(tryScroll, 50) - } else { - scrollTimeoutRef.current = null - } - } - - // Start the scroll attempt after a small delay to ensure rendering. - scrollTimeoutRef.current = window.setTimeout(tryScroll, 50) - }, - [scrollContainerRef] - ) - - // Cleanup timeouts on unmount - useEffect(() => { - return () => { - if (scrollTimeoutRef.current !== null) { - clearTimeout(scrollTimeoutRef.current) - } - } + }) }, []) /** diff --git a/apps/sim/background/schedule-execution.ts b/apps/sim/background/schedule-execution.ts index d5acb38c13..529ea590fc 100644 --- a/apps/sim/background/schedule-execution.ts +++ b/apps/sim/background/schedule-execution.ts @@ -193,6 +193,7 @@ async function runWorkflowExecution({ const deployedData = await loadDeployedWorkflowState(payload.workflowId) const blocks = deployedData.blocks + const { deploymentVersionId } = deployedData logger.info(`[${requestId}] Loaded deployed workflow ${payload.workflowId}`) if (payload.blockId) { @@ -233,6 +234,7 @@ async function runWorkflowExecution({ userId: actorUserId, workspaceId: workflowRecord.workspaceId || '', variables: variables || {}, + deploymentVersionId, }) const metadata: ExecutionMetadata = { diff --git a/apps/sim/background/webhook-execution.ts b/apps/sim/background/webhook-execution.ts index 6d4accc90f..56898865f9 100644 --- a/apps/sim/background/webhook-execution.ts +++ b/apps/sim/background/webhook-execution.ts @@ -138,18 +138,26 @@ async function executeWebhookJobInternal( requestId ) + // Track deploymentVersionId at function scope so it's available in catch block + let deploymentVersionId: string | undefined + try { - const workflowData = - payload.executionTarget === 'live' - ? await loadWorkflowFromNormalizedTables(payload.workflowId) - : await loadDeployedWorkflowState(payload.workflowId) + const useDraftState = payload.executionTarget === 'live' + const workflowData = useDraftState + ? await loadWorkflowFromNormalizedTables(payload.workflowId) + : await loadDeployedWorkflowState(payload.workflowId) if (!workflowData) { throw new Error( - `Workflow state not found. The workflow may not be ${payload.executionTarget === 'live' ? 'saved' : 'deployed'} or the deployment data may be corrupted.` + `Workflow state not found. The workflow may not be ${useDraftState ? 'saved' : 'deployed'} or the deployment data may be corrupted.` ) } const { blocks, edges, loops, parallels } = workflowData + // Only deployed executions have a deployment version ID + deploymentVersionId = + !useDraftState && 'deploymentVersionId' in workflowData + ? (workflowData.deploymentVersionId as string) + : undefined const wfRows = await db .select({ workspaceId: workflowTable.workspaceId, variables: workflowTable.variables }) @@ -229,6 +237,13 @@ async function executeWebhookJobInternal( useDraftState: false, startTime: new Date().toISOString(), isClientSession: false, + workflowStateOverride: { + blocks, + edges, + loops: loops || {}, + parallels: parallels || {}, + deploymentVersionId, + }, } const snapshot = new ExecutionSnapshot( @@ -280,6 +295,18 @@ async function executeWebhookJobInternal( // No changes to process logger.info(`[${requestId}] No Airtable changes to process`) + // Start logging session so the complete call has a log entry to update + await loggingSession.safeStart({ + userId: payload.userId, + workspaceId: workspaceId || '', + variables: {}, + triggerData: { + isTest: payload.testMode === true, + executionTarget: payload.executionTarget || 'deployed', + }, + deploymentVersionId, + }) + await loggingSession.safeComplete({ endedAt: new Date().toISOString(), totalDurationMs: 0, @@ -325,6 +352,19 @@ async function executeWebhookJobInternal( if (!input && payload.provider === 'whatsapp') { logger.info(`[${requestId}] No messages in WhatsApp payload, skipping execution`) + + // Start logging session so the complete call has a log entry to update + await loggingSession.safeStart({ + userId: payload.userId, + workspaceId: workspaceId || '', + variables: {}, + triggerData: { + isTest: payload.testMode === true, + executionTarget: payload.executionTarget || 'deployed', + }, + deploymentVersionId, + }) + await loggingSession.safeComplete({ endedAt: new Date().toISOString(), totalDurationMs: 0, @@ -444,6 +484,13 @@ async function executeWebhookJobInternal( useDraftState: false, startTime: new Date().toISOString(), isClientSession: false, + workflowStateOverride: { + blocks, + edges, + loops: loops || {}, + parallels: parallels || {}, + deploymentVersionId, + }, } const snapshot = new ExecutionSnapshot(metadata, workflow, input || {}, workflowVariables, []) @@ -495,7 +542,6 @@ async function executeWebhookJobInternal( }) try { - // Ensure logging session is started (safe to call multiple times) await loggingSession.safeStart({ userId: payload.userId, workspaceId: '', // May not be available for early errors @@ -504,6 +550,7 @@ async function executeWebhookJobInternal( isTest: payload.testMode === true, executionTarget: payload.executionTarget || 'deployed', }, + deploymentVersionId, // Pass if available (undefined for early errors) }) const executionResult = (error?.executionResult as ExecutionResult | undefined) || { diff --git a/apps/sim/blocks/blocks/parallel.ts b/apps/sim/blocks/blocks/parallel.ts index dbf14a3424..4de23cff6d 100644 --- a/apps/sim/blocks/blocks/parallel.ts +++ b/apps/sim/blocks/blocks/parallel.ts @@ -110,14 +110,14 @@ export const ParallelBlock: BlockConfig = { title: 'Processor', type: 'dropdown', options: [ - { label: 'Lite ($5/1K)', id: 'lite' }, - { label: 'Base ($10/1K)', id: 'base' }, - { label: 'Core ($25/1K)', id: 'core' }, - { label: 'Core 2x ($50/1K)', id: 'core2x' }, - { label: 'Pro ($100/1K)', id: 'pro' }, - { label: 'Ultra ($300/1K)', id: 'ultra' }, - { label: 'Ultra 2x ($600/1K)', id: 'ultra2x' }, - { label: 'Ultra 4x ($1,200/1K)', id: 'ultra4x' }, + { label: 'Lite', id: 'lite' }, + { label: 'Base', id: 'base' }, + { label: 'Core', id: 'core' }, + { label: 'Core 2x', id: 'core2x' }, + { label: 'Pro', id: 'pro' }, + { label: 'Ultra', id: 'ultra' }, + { label: 'Ultra 2x', id: 'ultra2x' }, + { label: 'Ultra 4x', id: 'ultra4x' }, ], value: () => 'base', condition: { field: 'operation', value: ['search', 'deep_research'] }, diff --git a/apps/sim/blocks/blocks/stagehand.ts b/apps/sim/blocks/blocks/stagehand.ts index d04b7c81f5..f8d4a5111b 100644 --- a/apps/sim/blocks/blocks/stagehand.ts +++ b/apps/sim/blocks/blocks/stagehand.ts @@ -48,8 +48,119 @@ export const StagehandBlock: BlockConfig = { type: 'code', placeholder: 'Enter JSON Schema...', language: 'json', - generationType: 'json-schema', required: true, + wandConfig: { + enabled: true, + maintainHistory: true, + prompt: `You are an expert programmer specializing in creating JSON schemas for web scraping and data extraction. +Generate ONLY the JSON schema based on the user's request. +The output MUST be a single, valid JSON object, starting with { and ending with }. +The JSON object MUST have the following top-level properties: 'name' (string), 'description' (string), 'strict' (boolean, usually true), and 'schema' (object). +The 'schema' object must define the structure and MUST contain 'type': 'object', 'properties': {...}, 'additionalProperties': false, and 'required': [...]. +Inside 'properties', use standard JSON Schema properties (type, description, enum, items for arrays, etc.). + +Current schema: {context} + +Do not include any explanations, markdown formatting, or other text outside the JSON object. + +Valid Schema Examples: + +Example 1 (Product Extraction): +{ + "name": "product_info", + "description": "Extracts product information from an e-commerce page", + "strict": true, + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The product name" + }, + "price": { + "type": "string", + "description": "The product price" + }, + "description": { + "type": "string", + "description": "The product description" + } + }, + "additionalProperties": false, + "required": ["name", "price"] + } +} + +Example 2 (Article Extraction): +{ + "name": "article_content", + "description": "Extracts article content from a news or blog page", + "strict": true, + "schema": { + "type": "object", + "properties": { + "title": { + "type": "string", + "description": "The article headline" + }, + "author": { + "type": "string", + "description": "The article author" + }, + "publishDate": { + "type": "string", + "description": "The publication date" + }, + "content": { + "type": "string", + "description": "The main article text" + } + }, + "additionalProperties": false, + "required": ["title", "content"] + } +} + +Example 3 (List Extraction): +{ + "name": "search_results", + "description": "Extracts search results or list items from a page", + "strict": true, + "schema": { + "type": "object", + "properties": { + "items": { + "type": "array", + "description": "List of extracted items", + "items": { + "type": "object", + "properties": { + "title": { + "type": "string", + "description": "Item title" + }, + "url": { + "type": "string", + "description": "Item URL" + }, + "snippet": { + "type": "string", + "description": "Brief description or snippet" + } + }, + "additionalProperties": false, + "required": ["title"] + } + } + }, + "additionalProperties": false, + "required": ["items"] + } +} +`, + placeholder: 'Describe what data you want to extract from the webpage...', + generationType: 'json-schema', + }, }, ], tools: { diff --git a/apps/sim/blocks/blocks/stagehand_agent.ts b/apps/sim/blocks/blocks/stagehand_agent.ts index 2bb7494a23..acbbdc830b 100644 --- a/apps/sim/blocks/blocks/stagehand_agent.ts +++ b/apps/sim/blocks/blocks/stagehand_agent.ts @@ -49,7 +49,118 @@ export const StagehandAgentBlock: BlockConfig = { type: 'code', placeholder: 'Enter JSON Schema...', language: 'json', - generationType: 'json-schema', + wandConfig: { + enabled: true, + maintainHistory: true, + prompt: `You are an expert programmer specializing in creating JSON schemas for web automation agents. +Generate ONLY the JSON schema based on the user's request. +The output MUST be a single, valid JSON object, starting with { and ending with }. +The JSON object MUST have the following top-level properties: 'name' (string), 'description' (string), 'strict' (boolean, usually true), and 'schema' (object). +The 'schema' object must define the structure and MUST contain 'type': 'object', 'properties': {...}, 'additionalProperties': false, and 'required': [...]. +Inside 'properties', use standard JSON Schema properties (type, description, enum, items for arrays, etc.). + +Current schema: {context} + +Do not include any explanations, markdown formatting, or other text outside the JSON object. + +Valid Schema Examples: + +Example 1 (Login Result): +{ + "name": "login_result", + "description": "Result of a login task performed by the agent", + "strict": true, + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean", + "description": "Whether the login was successful" + }, + "username": { + "type": "string", + "description": "The username that was logged in" + }, + "dashboardUrl": { + "type": "string", + "description": "The URL of the dashboard after login" + } + }, + "additionalProperties": false, + "required": ["success"] + } +} + +Example 2 (Form Submission): +{ + "name": "form_submission_result", + "description": "Result of submitting a form", + "strict": true, + "schema": { + "type": "object", + "properties": { + "submitted": { + "type": "boolean", + "description": "Whether the form was submitted" + }, + "confirmationNumber": { + "type": "string", + "description": "Confirmation or reference number if provided" + }, + "errorMessage": { + "type": "string", + "description": "Error message if submission failed" + } + }, + "additionalProperties": false, + "required": ["submitted"] + } +} + +Example 3 (Data Collection): +{ + "name": "collected_data", + "description": "Data collected by the agent from multiple pages", + "strict": true, + "schema": { + "type": "object", + "properties": { + "items": { + "type": "array", + "description": "List of collected items", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Item name" + }, + "value": { + "type": "string", + "description": "Item value or content" + }, + "sourceUrl": { + "type": "string", + "description": "URL where the item was found" + } + }, + "additionalProperties": false, + "required": ["name"] + } + }, + "totalCount": { + "type": "number", + "description": "Total number of items collected" + } + }, + "additionalProperties": false, + "required": ["items"] + } +} +`, + placeholder: 'Describe what output format you expect from the agent task...', + generationType: 'json-schema', + }, }, ], tools: { diff --git a/apps/sim/blocks/blocks/stt.ts b/apps/sim/blocks/blocks/stt.ts index c4885e7f84..99611d732c 100644 --- a/apps/sim/blocks/blocks/stt.ts +++ b/apps/sim/blocks/blocks/stt.ts @@ -304,15 +304,44 @@ export const SttBlock: BlockConfig = { outputs: { transcript: { type: 'string', description: 'Full transcribed text' }, - segments: { type: 'array', description: 'Timestamped segments with speaker labels' }, + segments: { + type: 'array', + description: 'Timestamped segments with speaker labels', + condition: { field: 'timestamps', value: 'none', not: true }, + }, language: { type: 'string', description: 'Detected or specified language' }, duration: { type: 'number', description: 'Audio duration in seconds' }, confidence: { type: 'number', - description: 'Overall confidence score (Deepgram, AssemblyAI only)', + description: 'Overall confidence score', + condition: { field: 'provider', value: ['deepgram', 'assemblyai', 'gemini'] }, + }, + sentiment: { + type: 'array', + description: 'Sentiment analysis results', + condition: { + field: 'provider', + value: 'assemblyai', + and: { field: 'sentiment', value: true }, + }, + }, + entities: { + type: 'array', + description: 'Detected entities', + condition: { + field: 'provider', + value: 'assemblyai', + and: { field: 'entityDetection', value: true }, + }, + }, + summary: { + type: 'string', + description: 'Auto-generated summary', + condition: { + field: 'provider', + value: 'assemblyai', + and: { field: 'summarization', value: true }, + }, }, - sentiment: { type: 'array', description: 'Sentiment analysis results (AssemblyAI only)' }, - entities: { type: 'array', description: 'Detected entities (AssemblyAI only)' }, - summary: { type: 'string', description: 'Auto-generated summary (AssemblyAI only)' }, }, } diff --git a/apps/sim/blocks/blocks/translate.ts b/apps/sim/blocks/blocks/translate.ts index 7b81ec6a66..5f7c954a1e 100644 --- a/apps/sim/blocks/blocks/translate.ts +++ b/apps/sim/blocks/blocks/translate.ts @@ -1,28 +1,15 @@ import { TranslateIcon } from '@/components/icons' import { isHosted } from '@/lib/core/config/environment' import { AuthMode, type BlockConfig } from '@/blocks/types' -import { - getAllModelProviders, - getHostedModels, - getProviderIcon, - providers, -} from '@/providers/utils' +import { getHostedModels, getProviderIcon, providers } from '@/providers/utils' import { useProvidersStore } from '@/stores/providers/store' const getCurrentOllamaModels = () => { return useProvidersStore.getState().providers.ollama.models } -const getTranslationPrompt = ( - targetLanguage: string -) => `You are a highly skilled translator. Your task is to translate the given text into ${targetLanguage || 'English'} while: -1. Preserving the original meaning and nuance -2. Maintaining appropriate formality levels -3. Adapting idioms and cultural references appropriately -4. Preserving formatting and special characters -5. Handling technical terms accurately - -Only return the translated text without any explanations or notes. The translation should be natural and fluent in ${targetLanguage || 'English'}.` +const getTranslationPrompt = (targetLanguage: string) => + `Translate the following text into ${targetLanguage || 'English'}. Output ONLY the translated text with no additional commentary, explanations, or notes.` export const TranslateBlock: BlockConfig = { type: 'translate', @@ -123,19 +110,17 @@ export const TranslateBlock: BlockConfig = { }, ], tools: { - access: ['openai_chat', 'anthropic_chat', 'google_chat'], + access: ['llm_chat'], config: { - tool: (params: Record) => { - const model = params.model || 'gpt-4o' - if (!model) { - throw new Error('No model selected') - } - const tool = getAllModelProviders()[model] - if (!tool) { - throw new Error(`Invalid model selected: ${model}`) - } - return tool - }, + tool: () => 'llm_chat', + params: (params: Record) => ({ + model: params.model, + systemPrompt: getTranslationPrompt(params.targetLanguage || 'English'), + context: params.context, + apiKey: params.apiKey, + azureEndpoint: params.azureEndpoint, + azureApiVersion: params.azureApiVersion, + }), }, }, inputs: { diff --git a/apps/sim/blocks/blocks/tts.ts b/apps/sim/blocks/blocks/tts.ts index 77a10b7d5b..b6da4abca3 100644 --- a/apps/sim/blocks/blocks/tts.ts +++ b/apps/sim/blocks/blocks/tts.ts @@ -579,7 +579,11 @@ export const TtsBlock: BlockConfig = { outputs: { audioUrl: { type: 'string', description: 'URL to the generated audio file' }, audioFile: { type: 'json', description: 'Generated audio file object (UserFile)' }, - duration: { type: 'number', description: 'Audio duration in seconds' }, + duration: { + type: 'number', + description: 'Audio duration in seconds', + condition: { field: 'provider', value: 'deepgram' }, + }, characterCount: { type: 'number', description: 'Number of characters processed' }, format: { type: 'string', description: 'Audio format' }, provider: { type: 'string', description: 'TTS provider used' }, diff --git a/apps/sim/blocks/blocks/wordpress.ts b/apps/sim/blocks/blocks/wordpress.ts index bc1471f693..eb19e776a0 100644 --- a/apps/sim/blocks/blocks/wordpress.ts +++ b/apps/sim/blocks/blocks/wordpress.ts @@ -272,22 +272,35 @@ export const WordPressBlock: BlockConfig = { }, }, - // Media Operations + // Media Operations - File upload (basic mode) + { + id: 'fileUpload', + title: 'Upload File', + type: 'file-upload', + canonicalParamId: 'file', + placeholder: 'Upload a media file to WordPress', + condition: { field: 'operation', value: 'wordpress_upload_media' }, + mode: 'basic', + multiple: false, + required: false, + }, + // Variable reference (advanced mode) - for referencing files from previous blocks { id: 'file', - title: 'File', + title: 'File Reference', type: 'short-input', - placeholder: 'Base64 encoded file data or file URL', + canonicalParamId: 'file', + placeholder: 'Reference file from previous block (e.g., {{block_name.file}})', condition: { field: 'operation', value: 'wordpress_upload_media' }, - required: { field: 'operation', value: 'wordpress_upload_media' }, + mode: 'advanced', + required: false, }, { id: 'filename', - title: 'Filename', + title: 'Filename Override', type: 'short-input', - placeholder: 'image.jpg', + placeholder: 'Optional: Override filename (e.g., image.jpg)', condition: { field: 'operation', value: 'wordpress_upload_media' }, - required: { field: 'operation', value: 'wordpress_upload_media' }, }, { id: 'mediaTitle', @@ -756,7 +769,7 @@ export const WordPressBlock: BlockConfig = { case 'wordpress_upload_media': return { ...baseParams, - file: params.file, + file: params.fileUpload || params.file, filename: params.filename, title: params.mediaTitle, caption: params.caption, @@ -891,8 +904,9 @@ export const WordPressBlock: BlockConfig = { parent: { type: 'number', description: 'Parent page ID' }, menuOrder: { type: 'number', description: 'Menu order' }, // Media inputs - file: { type: 'string', description: 'File data (base64) or URL' }, - filename: { type: 'string', description: 'Filename with extension' }, + fileUpload: { type: 'json', description: 'File to upload (UserFile object)' }, + file: { type: 'json', description: 'File reference from previous block' }, + filename: { type: 'string', description: 'Optional filename override' }, mediaTitle: { type: 'string', description: 'Media title' }, caption: { type: 'string', description: 'Media caption' }, altText: { type: 'string', description: 'Alt text' }, diff --git a/apps/sim/blocks/blocks/x.ts b/apps/sim/blocks/blocks/x.ts index bc2ac2a340..724d409a7d 100644 --- a/apps/sim/blocks/blocks/x.ts +++ b/apps/sim/blocks/blocks/x.ts @@ -145,32 +145,23 @@ export const XBlock: BlockConfig = { params: (params) => { const { credential, ...rest } = params - // Convert string values to appropriate types const parsedParams: Record = { credential: credential, } - // Add other params Object.keys(rest).forEach((key) => { const value = rest[key] - // Convert string boolean values to actual booleans if (value === 'true' || value === 'false') { parsedParams[key] = value === 'true' - } - // Convert numeric strings to numbers where appropriate - else if (key === 'maxResults' && value) { + } else if (key === 'maxResults' && value) { parsedParams[key] = Number.parseInt(value as string, 10) - } - // Handle mediaIds conversion from comma-separated string to array - else if (key === 'mediaIds' && typeof value === 'string') { + } else if (key === 'mediaIds' && typeof value === 'string') { parsedParams[key] = value .split(',') .map((id) => id.trim()) .filter((id) => id !== '') - } - // Keep other values as is - else { + } else { parsedParams[key] = value } }) @@ -197,13 +188,49 @@ export const XBlock: BlockConfig = { includeRecentTweets: { type: 'boolean', description: 'Include recent tweets' }, }, outputs: { - tweet: { type: 'json', description: 'Tweet data' }, - replies: { type: 'json', description: 'Tweet replies' }, - context: { type: 'json', description: 'Tweet context' }, - tweets: { type: 'json', description: 'Tweets data' }, - includes: { type: 'json', description: 'Additional data' }, - meta: { type: 'json', description: 'Response metadata' }, - user: { type: 'json', description: 'User profile data' }, - recentTweets: { type: 'json', description: 'Recent tweets data' }, + // Write and Read operation outputs + tweet: { + type: 'json', + description: 'Tweet data including contextAnnotations and publicMetrics', + condition: { field: 'operation', value: ['x_write', 'x_read'] }, + }, + // Read operation outputs + replies: { + type: 'json', + description: 'Tweet replies (when includeReplies is true)', + condition: { field: 'operation', value: 'x_read' }, + }, + context: { + type: 'json', + description: 'Tweet context (parent and quoted tweets)', + condition: { field: 'operation', value: 'x_read' }, + }, + // Search operation outputs + tweets: { + type: 'json', + description: 'Tweets data including contextAnnotations and publicMetrics', + condition: { field: 'operation', value: 'x_search' }, + }, + includes: { + type: 'json', + description: 'Additional data (users, media, polls)', + condition: { field: 'operation', value: 'x_search' }, + }, + meta: { + type: 'json', + description: 'Response metadata', + condition: { field: 'operation', value: 'x_search' }, + }, + // User operation outputs + user: { + type: 'json', + description: 'User profile data', + condition: { field: 'operation', value: 'x_user' }, + }, + recentTweets: { + type: 'json', + description: 'Recent tweets data', + condition: { field: 'operation', value: 'x_user' }, + }, }, } diff --git a/apps/sim/blocks/blocks/youtube.ts b/apps/sim/blocks/blocks/youtube.ts index 83e5d5a1a0..855ffdb29f 100644 --- a/apps/sim/blocks/blocks/youtube.ts +++ b/apps/sim/blocks/blocks/youtube.ts @@ -26,7 +26,6 @@ export const YouTubeBlock: BlockConfig = { { label: 'Get Channel Videos', id: 'youtube_channel_videos' }, { label: 'Get Channel Playlists', id: 'youtube_channel_playlists' }, { label: 'Get Playlist Items', id: 'youtube_playlist_items' }, - { label: 'Get Related Videos', id: 'youtube_related_videos' }, { label: 'Get Video Comments', id: 'youtube_comments' }, ], value: () => 'youtube_search', @@ -250,25 +249,6 @@ export const YouTubeBlock: BlockConfig = { integer: true, condition: { field: 'operation', value: 'youtube_playlist_items' }, }, - // Get Related Videos operation inputs - { - id: 'videoId', - title: 'Video ID', - type: 'short-input', - placeholder: 'Enter YouTube video ID to find related videos', - required: true, - condition: { field: 'operation', value: 'youtube_related_videos' }, - }, - { - id: 'maxResults', - title: 'Max Results', - type: 'slider', - min: 1, - max: 50, - step: 1, - integer: true, - condition: { field: 'operation', value: 'youtube_related_videos' }, - }, // Get Video Comments operation inputs { id: 'videoId', @@ -317,7 +297,6 @@ export const YouTubeBlock: BlockConfig = { 'youtube_channel_videos', 'youtube_channel_playlists', 'youtube_playlist_items', - 'youtube_related_videos', 'youtube_comments', ], config: { @@ -340,8 +319,6 @@ export const YouTubeBlock: BlockConfig = { return 'youtube_channel_playlists' case 'youtube_playlist_items': return 'youtube_playlist_items' - case 'youtube_related_videos': - return 'youtube_related_videos' case 'youtube_comments': return 'youtube_comments' default: diff --git a/apps/sim/blocks/blocks/zendesk.ts b/apps/sim/blocks/blocks/zendesk.ts index d0f956cc75..1e31161c09 100644 --- a/apps/sim/blocks/blocks/zendesk.ts +++ b/apps/sim/blocks/blocks/zendesk.ts @@ -504,7 +504,48 @@ export const ZendeskBlock: BlockConfig = { subdomain: { type: 'string', description: 'Zendesk subdomain' }, }, outputs: { - success: { type: 'boolean', description: 'Operation success status' }, - output: { type: 'json', description: 'Operation result data' }, + // Ticket operations - list + tickets: { type: 'json', description: 'Array of ticket objects (get_tickets)' }, + // Ticket operations - single + ticket: { + type: 'json', + description: 'Single ticket object (get_ticket, create_ticket, update_ticket)', + }, + // User operations - list + users: { type: 'json', description: 'Array of user objects (get_users, search_users)' }, + // User operations - single + user: { + type: 'json', + description: 'Single user object (get_user, get_current_user, create_user, update_user)', + }, + // Organization operations - list + organizations: { + type: 'json', + description: 'Array of organization objects (get_organizations, autocomplete_organizations)', + }, + // Organization operations - single + organization: { + type: 'json', + description: + 'Single organization object (get_organization, create_organization, update_organization)', + }, + // Search operations + results: { type: 'json', description: 'Array of search result objects (search)' }, + count: { type: 'number', description: 'Number of matching results (search_count)' }, + // Bulk/async operations + jobStatus: { + type: 'json', + description: + 'Job status for async operations (create_tickets_bulk, update_tickets_bulk, merge_tickets, create_users_bulk, update_users_bulk, create_organizations_bulk)', + }, + // Delete operations + deleted: { + type: 'boolean', + description: 'Deletion confirmation (delete_ticket, delete_user, delete_organization)', + }, + // Pagination (shared across list operations) + paging: { type: 'json', description: 'Pagination information for list operations' }, + // Metadata (shared across all operations) + metadata: { type: 'json', description: 'Operation metadata including operation type' }, }, } diff --git a/apps/sim/blocks/types.ts b/apps/sim/blocks/types.ts index 121c94a2dd..7cc0116c98 100644 --- a/apps/sim/blocks/types.ts +++ b/apps/sim/blocks/types.ts @@ -116,9 +116,33 @@ export type BlockOutput = | PrimitiveValueType | { [key: string]: PrimitiveValueType | Record } +/** + * Condition for showing an output field. + * Uses the same pattern as SubBlockConfig.condition + */ +export interface OutputCondition { + field: string + value: string | number | boolean | Array + not?: boolean + and?: { + field: string + value: string | number | boolean | Array | undefined + not?: boolean + } +} + export type OutputFieldDefinition = | PrimitiveValueType - | { type: PrimitiveValueType; description?: string } + | { + type: PrimitiveValueType + description?: string + /** + * Optional condition for when this output should be shown. + * If not specified, the output is always shown. + * Uses the same condition format as subBlocks. + */ + condition?: OutputCondition + } export interface ParamConfig { type: ParamType diff --git a/apps/sim/executor/execution/snapshot.ts b/apps/sim/executor/execution/snapshot.ts index 667d551b33..7ea7f2cc31 100644 --- a/apps/sim/executor/execution/snapshot.ts +++ b/apps/sim/executor/execution/snapshot.ts @@ -21,6 +21,7 @@ export interface ExecutionMetadata { edges: Edge[] loops?: Record parallels?: Record + deploymentVersionId?: string // ID of deployment version if this is deployed state } } diff --git a/apps/sim/executor/handlers/condition/condition-handler.ts b/apps/sim/executor/handlers/condition/condition-handler.ts index c6cc0db62c..452f40da9b 100644 --- a/apps/sim/executor/handlers/condition/condition-handler.ts +++ b/apps/sim/executor/handlers/condition/condition-handler.ts @@ -178,10 +178,20 @@ export class ConditionBlockHandler implements BlockHandler { evalContext ) - const connection = this.findConnectionForCondition(outgoingConnections, condition.id) - - if (connection && conditionMet) { - return { selectedConnection: connection, selectedCondition: condition } + if (conditionMet) { + const connection = this.findConnectionForCondition(outgoingConnections, condition.id) + if (connection) { + return { selectedConnection: connection, selectedCondition: condition } + } + // Condition is true but has no outgoing edge - branch ends gracefully + logger.info( + `Condition "${condition.title}" is true but has no outgoing edge - branch ending`, + { + blockId: block.id, + conditionId: condition.id, + } + ) + return { selectedConnection: null, selectedCondition: null } } } catch (error: any) { logger.error(`Failed to evaluate condition "${condition.title}": ${error.message}`) diff --git a/apps/sim/lib/logs/execution/logger.ts b/apps/sim/lib/logs/execution/logger.ts index 22727ef42c..3bf8496313 100644 --- a/apps/sim/lib/logs/execution/logger.ts +++ b/apps/sim/lib/logs/execution/logger.ts @@ -113,11 +113,13 @@ export class ExecutionLogger implements IExecutionLoggerService { trigger: ExecutionTrigger environment: ExecutionEnvironment workflowState: WorkflowState + deploymentVersionId?: string }): Promise<{ workflowLog: WorkflowExecutionLog snapshot: WorkflowExecutionSnapshot }> { - const { workflowId, executionId, trigger, environment, workflowState } = params + const { workflowId, executionId, trigger, environment, workflowState, deploymentVersionId } = + params logger.debug(`Starting workflow execution ${executionId} for workflow ${workflowId}`) @@ -168,6 +170,7 @@ export class ExecutionLogger implements IExecutionLoggerService { workflowId, executionId, stateSnapshotId: snapshotResult.snapshot.id, + deploymentVersionId: deploymentVersionId ?? null, level: 'info', trigger: trigger.type, startedAt: startTime, diff --git a/apps/sim/lib/logs/execution/logging-session.ts b/apps/sim/lib/logs/execution/logging-session.ts index a14dedfca7..92b76ae364 100644 --- a/apps/sim/lib/logs/execution/logging-session.ts +++ b/apps/sim/lib/logs/execution/logging-session.ts @@ -22,6 +22,7 @@ export interface SessionStartParams { variables?: Record triggerData?: Record skipLogCreation?: boolean // For resume executions - reuse existing log entry + deploymentVersionId?: string // ID of the deployment version used (null for manual/editor executions) } export interface SessionCompleteParams { @@ -65,7 +66,8 @@ export class LoggingSession { } async start(params: SessionStartParams = {}): Promise { - const { userId, workspaceId, variables, triggerData, skipLogCreation } = params + const { userId, workspaceId, variables, triggerData, skipLogCreation, deploymentVersionId } = + params try { this.trigger = createTriggerObject(this.triggerType, triggerData) @@ -86,6 +88,7 @@ export class LoggingSession { trigger: this.trigger, environment: this.environment, workflowState: this.workflowState, + deploymentVersionId, }) if (this.requestId) { @@ -267,7 +270,7 @@ export class LoggingSession { // Fallback: create a minimal logging session without full workflow state try { - const { userId, workspaceId, variables, triggerData } = params + const { userId, workspaceId, variables, triggerData, deploymentVersionId } = params this.trigger = createTriggerObject(this.triggerType, triggerData) this.environment = createEnvironmentObject( this.workflowId, @@ -290,6 +293,7 @@ export class LoggingSession { trigger: this.trigger, environment: this.environment, workflowState: this.workflowState, + deploymentVersionId, }) if (this.requestId) { diff --git a/apps/sim/lib/uploads/utils/validation.ts b/apps/sim/lib/uploads/utils/validation.ts index 46125f9b40..6ccfd5f330 100644 --- a/apps/sim/lib/uploads/utils/validation.ts +++ b/apps/sim/lib/uploads/utils/validation.ts @@ -133,6 +133,11 @@ export function validateFileType(fileName: string, mimeType: string): FileValida const baseMimeType = mimeType.split(';')[0].trim() + // Allow empty MIME types if the extension is supported (browsers often don't recognize certain file types) + if (!baseMimeType) { + return null + } + const allowedMimeTypes = SUPPORTED_MIME_TYPES[extension] if (!allowedMimeTypes.includes(baseMimeType)) { return { diff --git a/apps/sim/lib/workflows/blocks/block-outputs.ts b/apps/sim/lib/workflows/blocks/block-outputs.ts index 789ad7410f..cdc84b808f 100644 --- a/apps/sim/lib/workflows/blocks/block-outputs.ts +++ b/apps/sim/lib/workflows/blocks/block-outputs.ts @@ -11,11 +11,80 @@ import { USER_FILE_PROPERTY_TYPES, } from '@/lib/workflows/types' import { getBlock } from '@/blocks' -import type { BlockConfig } from '@/blocks/types' +import type { BlockConfig, OutputCondition } from '@/blocks/types' import { getTrigger, isTriggerValid } from '@/triggers' type OutputDefinition = Record +/** + * Evaluates an output condition against subBlock values. + * Returns true if the condition is met and the output should be shown. + */ +function evaluateOutputCondition( + condition: OutputCondition, + subBlocks: Record | undefined +): boolean { + if (!subBlocks) return false + + const fieldValue = subBlocks[condition.field]?.value + + let matches: boolean + if (Array.isArray(condition.value)) { + matches = condition.value.includes(fieldValue) + } else { + matches = fieldValue === condition.value + } + + if (condition.not) { + matches = !matches + } + + if (condition.and) { + const andFieldValue = subBlocks[condition.and.field]?.value + let andMatches: boolean + + if (Array.isArray(condition.and.value)) { + andMatches = condition.and.value.includes(andFieldValue) + } else { + andMatches = andFieldValue === condition.and.value + } + + if (condition.and.not) { + andMatches = !andMatches + } + + matches = matches && andMatches + } + + return matches +} + +/** + * Filters outputs based on their conditions. + * Returns a new OutputDefinition with only the outputs whose conditions are met. + */ +function filterOutputsByCondition( + outputs: OutputDefinition, + subBlocks: Record | undefined +): OutputDefinition { + const filtered: OutputDefinition = {} + + for (const [key, value] of Object.entries(outputs)) { + if (!value || typeof value !== 'object' || !('condition' in value)) { + filtered[key] = value + continue + } + + const condition = value.condition as OutputCondition | undefined + if (!condition || evaluateOutputCondition(condition, subBlocks)) { + const { condition: _, ...rest } = value + filtered[key] = rest + } + } + + return filtered +} + const CHAT_OUTPUTS: OutputDefinition = { input: { type: 'string', description: 'User message' }, conversationId: { type: 'string', description: 'Conversation ID' }, @@ -184,7 +253,8 @@ export function getBlockOutputs( } const baseOutputs = { ...(blockConfig.outputs || {}) } - return applyInputFormatToOutputs(blockType, blockConfig, subBlocks, baseOutputs) + const filteredOutputs = filterOutputsByCondition(baseOutputs, subBlocks) + return applyInputFormatToOutputs(blockType, blockConfig, subBlocks, filteredOutputs) } function shouldFilterReservedField( diff --git a/apps/sim/lib/workflows/executor/execution-core.ts b/apps/sim/lib/workflows/executor/execution-core.ts index e94a855d25..a3ae1893ea 100644 --- a/apps/sim/lib/workflows/executor/execution-core.ts +++ b/apps/sim/lib/workflows/executor/execution-core.ts @@ -111,6 +111,7 @@ export async function executeWorkflowCore( let edges: Edge[] let loops let parallels + let deploymentVersionId: string | undefined // Use workflowStateOverride if provided (for diff workflows) if (metadata.workflowStateOverride) { @@ -118,6 +119,7 @@ export async function executeWorkflowCore( edges = metadata.workflowStateOverride.edges loops = metadata.workflowStateOverride.loops || {} parallels = metadata.workflowStateOverride.parallels || {} + deploymentVersionId = metadata.workflowStateOverride.deploymentVersionId logger.info(`[${requestId}] Using workflow state override (diff workflow execution)`, { blocksCount: Object.keys(blocks).length, @@ -144,6 +146,7 @@ export async function executeWorkflowCore( edges = deployedData.edges loops = deployedData.loops parallels = deployedData.parallels + deploymentVersionId = deployedData.deploymentVersionId logger.info(`[${requestId}] Using deployed workflow state (deployed execution)`) } @@ -174,6 +177,7 @@ export async function executeWorkflowCore( workspaceId: providedWorkspaceId, variables, skipLogCreation, // Skip if resuming an existing execution + deploymentVersionId, // Only set for deployed executions }) // Process block states with env var substitution using pre-decrypted values diff --git a/apps/sim/lib/workflows/persistence/utils.ts b/apps/sim/lib/workflows/persistence/utils.ts index aaa125680d..e24c0708ac 100644 --- a/apps/sim/lib/workflows/persistence/utils.ts +++ b/apps/sim/lib/workflows/persistence/utils.ts @@ -40,6 +40,10 @@ export interface NormalizedWorkflowData { isFromNormalizedTables: boolean // Flag to indicate source (true = normalized tables, false = deployed state) } +export interface DeployedWorkflowData extends NormalizedWorkflowData { + deploymentVersionId: string +} + export async function blockExistsInDeployment( workflowId: string, blockId: string @@ -68,12 +72,11 @@ export async function blockExistsInDeployment( } } -export async function loadDeployedWorkflowState( - workflowId: string -): Promise { +export async function loadDeployedWorkflowState(workflowId: string): Promise { try { const [active] = await db .select({ + id: workflowDeploymentVersion.id, state: workflowDeploymentVersion.state, createdAt: workflowDeploymentVersion.createdAt, }) @@ -99,6 +102,7 @@ export async function loadDeployedWorkflowState( loops: state.loops || {}, parallels: state.parallels || {}, isFromNormalizedTables: false, + deploymentVersionId: active.id, } } catch (error) { logger.error(`Error loading deployed workflow state ${workflowId}:`, error) diff --git a/apps/sim/package.json b/apps/sim/package.json index e6432f8b44..fe68af4ca9 100644 --- a/apps/sim/package.json +++ b/apps/sim/package.json @@ -33,7 +33,7 @@ "@azure/storage-blob": "12.27.0", "@better-auth/sso": "1.3.12", "@better-auth/stripe": "1.3.12", - "@browserbasehq/stagehand": "^2.0.0", + "@browserbasehq/stagehand": "^3.0.5", "@cerebras/cerebras_cloud_sdk": "^1.23.0", "@e2b/code-interpreter": "^2.0.0", "@hookform/resolvers": "^4.1.3", diff --git a/apps/sim/stores/logs/filters/types.ts b/apps/sim/stores/logs/filters/types.ts index 0415759aa3..761b730f6b 100644 --- a/apps/sim/stores/logs/filters/types.ts +++ b/apps/sim/stores/logs/filters/types.ts @@ -100,6 +100,8 @@ export interface WorkflowLog { id: string workflowId: string executionId?: string | null + deploymentVersion?: number | null + deploymentVersionName?: string | null level: string duration: string | null trigger: string | null diff --git a/apps/sim/stores/logs/store.ts b/apps/sim/stores/logs/store.ts index e7b5baef46..4cd2ce88d9 100644 --- a/apps/sim/stores/logs/store.ts +++ b/apps/sim/stores/logs/store.ts @@ -4,8 +4,8 @@ import { persist } from 'zustand/middleware' /** * Width constraints for the log details panel. */ -export const MIN_LOG_DETAILS_WIDTH = 340 -export const DEFAULT_LOG_DETAILS_WIDTH = 340 +export const MIN_LOG_DETAILS_WIDTH = 400 +export const DEFAULT_LOG_DETAILS_WIDTH = 400 /** * Returns the maximum log details panel width (50vw). diff --git a/apps/sim/stores/terminal/store.ts b/apps/sim/stores/terminal/store.ts index da9f45bef6..c4f31c5b11 100644 --- a/apps/sim/stores/terminal/store.ts +++ b/apps/sim/stores/terminal/store.ts @@ -20,6 +20,8 @@ interface TerminalState { setOutputPanelWidth: (width: number) => void openOnRun: boolean setOpenOnRun: (open: boolean) => void + wrapText: boolean + setWrapText: (wrap: boolean) => void /** * Indicates whether the terminal is currently being resized via mouse drag. * @@ -35,8 +37,6 @@ interface TerminalState { * @param isResizing - True while the terminal is being resized. */ setIsResizing: (isResizing: boolean) => void - // displayMode: DisplayMode - // setDisplayMode: (mode: DisplayMode) => void _hasHydrated: boolean setHasHydrated: (hasHydrated: boolean) => void } @@ -119,10 +119,15 @@ export const useTerminalStore = create()( setOpenOnRun: (open) => { set({ openOnRun: open }) }, - // displayMode: DEFAULT_DISPLAY_MODE, - // setDisplayMode: (mode) => { - // set({ displayMode: mode }) - // }, + wrapText: true, + /** + * Enables or disables text wrapping in the output panel. + * + * @param wrap - Whether output text should wrap. + */ + setWrapText: (wrap) => { + set({ wrapText: wrap }) + }, /** * Indicates whether the terminal store has finished client-side hydration. */ diff --git a/apps/sim/tools/exa/find_similar_links.ts b/apps/sim/tools/exa/find_similar_links.ts index 4aff6ec5aa..bc2ddb059e 100644 --- a/apps/sim/tools/exa/find_similar_links.ts +++ b/apps/sim/tools/exa/find_similar_links.ts @@ -48,13 +48,6 @@ export const findSimilarLinksTool: ToolConfig< visibility: 'user-only', description: 'Exclude the source domain from results (default: false)', }, - category: { - type: 'string', - required: false, - visibility: 'user-only', - description: - 'Filter by category: company, research_paper, news_article, pdf, github, tweet, movie, song, personal_site', - }, highlights: { type: 'boolean', required: false, @@ -71,7 +64,8 @@ export const findSimilarLinksTool: ToolConfig< type: 'string', required: false, visibility: 'user-only', - description: 'Live crawling mode: always, fallback, or never (default: never)', + description: + 'Live crawling mode: never (default), fallback, always, or preferred (always try livecrawl, fall back to cache if fails)', }, apiKey: { type: 'string', @@ -113,9 +107,6 @@ export const findSimilarLinksTool: ToolConfig< body.excludeSourceDomain = params.excludeSourceDomain } - // Category filtering - if (params.category) body.category = params.category - // Content options - build contents object const contents: Record = {} if (params.text !== undefined) contents.text = params.text diff --git a/apps/sim/tools/exa/get_contents.ts b/apps/sim/tools/exa/get_contents.ts index 31f359daea..be44b70222 100644 --- a/apps/sim/tools/exa/get_contents.ts +++ b/apps/sim/tools/exa/get_contents.ts @@ -51,7 +51,8 @@ export const getContentsTool: ToolConfig = { required: false, visibility: 'user-only', description: - 'Filter by category: company, research_paper, news_article, pdf, github, tweet, movie, song, personal_site', + 'Filter by category: company, research paper, news, pdf, github, tweet, personal site, linkedin profile, financial report', }, text: { type: 'boolean', @@ -74,7 +74,8 @@ export const searchTool: ToolConfig = { type: 'string', required: false, visibility: 'user-only', - description: 'Live crawling mode: always, fallback, or never (default: never)', + description: + 'Live crawling mode: never (default), fallback, always, or preferred (always try livecrawl, fall back to cache if fails)', }, apiKey: { type: 'string', diff --git a/apps/sim/tools/llm/chat.ts b/apps/sim/tools/llm/chat.ts new file mode 100644 index 0000000000..536400734f --- /dev/null +++ b/apps/sim/tools/llm/chat.ts @@ -0,0 +1,130 @@ +import { createLogger } from '@/lib/logs/console/logger' +import { getProviderFromModel } from '@/providers/utils' +import type { ToolConfig, ToolResponse } from '@/tools/types' + +const logger = createLogger('LLMChatTool') + +interface LLMChatParams { + model: string + systemPrompt?: string + context: string + apiKey?: string + temperature?: number + maxTokens?: number + azureEndpoint?: string + azureApiVersion?: string +} + +interface LLMChatResponse extends ToolResponse { + output: { + content: string + model: string + tokens?: { + prompt?: number + completion?: number + total?: number + } + } +} + +export const llmChatTool: ToolConfig = { + id: 'llm_chat', + name: 'LLM Chat', + description: 'Send a chat completion request to any supported LLM provider', + version: '1.0.0', + + params: { + model: { + type: 'string', + required: true, + description: 'The model to use (e.g., gpt-4o, claude-sonnet-4-5, gemini-2.0-flash)', + }, + systemPrompt: { + type: 'string', + required: false, + description: 'System prompt to set the behavior of the assistant', + }, + context: { + type: 'string', + required: true, + description: 'The user message or context to send to the model', + }, + apiKey: { + type: 'string', + required: false, + visibility: 'hidden', + description: 'API key for the provider (uses platform key if not provided for hosted models)', + }, + temperature: { + type: 'number', + required: false, + description: 'Temperature for response generation (0-2)', + }, + maxTokens: { + type: 'number', + required: false, + description: 'Maximum tokens in the response', + }, + azureEndpoint: { + type: 'string', + required: false, + visibility: 'hidden', + description: 'Azure OpenAI endpoint URL', + }, + azureApiVersion: { + type: 'string', + required: false, + visibility: 'hidden', + description: 'Azure OpenAI API version', + }, + }, + + request: { + url: () => '/api/providers', + method: 'POST', + headers: () => ({ + 'Content-Type': 'application/json', + }), + body: (params) => { + const provider = getProviderFromModel(params.model) + + return { + provider, + model: params.model, + systemPrompt: params.systemPrompt, + context: JSON.stringify([{ role: 'user', content: params.context }]), + apiKey: params.apiKey, + temperature: params.temperature, + maxTokens: params.maxTokens, + azureEndpoint: params.azureEndpoint, + azureApiVersion: params.azureApiVersion, + } + }, + }, + + transformResponse: async (response: Response) => { + if (!response.ok) { + const errorData = await response.json().catch(() => ({})) + const errorMessage = errorData.error || `LLM API error: ${response.status}` + logger.error('LLM chat request failed', { error: errorMessage }) + throw new Error(errorMessage) + } + + const data = await response.json() + + return { + success: true, + output: { + content: data.content, + model: data.model, + tokens: data.tokens, + }, + } + }, + + outputs: { + content: { type: 'string', description: 'The generated response content' }, + model: { type: 'string', description: 'The model used for generation' }, + tokens: { type: 'object', description: 'Token usage information' }, + }, +} diff --git a/apps/sim/tools/llm/index.ts b/apps/sim/tools/llm/index.ts new file mode 100644 index 0000000000..18d5f3f0cd --- /dev/null +++ b/apps/sim/tools/llm/index.ts @@ -0,0 +1 @@ +export { llmChatTool } from './chat' diff --git a/apps/sim/tools/parallel/deep_research.ts b/apps/sim/tools/parallel/deep_research.ts index b03890bc68..cd0cca9f38 100644 --- a/apps/sim/tools/parallel/deep_research.ts +++ b/apps/sim/tools/parallel/deep_research.ts @@ -1,6 +1,9 @@ +import { createLogger } from '@/lib/logs/console/logger' import type { ParallelDeepResearchParams } from '@/tools/parallel/types' import type { ToolConfig, ToolResponse } from '@/tools/types' +const logger = createLogger('ParallelDeepResearchTool') + export const deepResearchTool: ToolConfig = { id: 'parallel_deep_research', name: 'Parallel AI Deep Research', @@ -90,34 +93,83 @@ export const deepResearchTool: ToolConfig { const data = await response.json() - if (data.status === 'running') { - return { - success: true, - output: { - status: 'running', - run_id: data.run_id, - message: - 'Deep research task is running. This can take up to 15 minutes. Use the run_id to check status.', - }, - } - } - return { success: true, output: { - status: data.status, run_id: data.run_id, - content: data.content || {}, - basis: data.basis || [], - metadata: data.metadata || {}, + status: data.status, + message: `Research task ${data.status}, waiting for completion...`, + content: {}, + basis: [], }, } }, + postProcess: async (result, params) => { + if (!result.success) { + return result + } + + const runId = result.output.run_id + if (!runId) { + return { + ...result, + success: false, + error: 'No run_id returned from task creation', + } + } + + logger.info(`Parallel AI deep research task ${runId} created, fetching results...`) + + try { + const resultResponse = await fetch(`https://api.parallel.ai/v1/tasks/runs/${runId}/result`, { + method: 'GET', + headers: { + 'x-api-key': params.apiKey, + 'Content-Type': 'application/json', + }, + }) + + if (!resultResponse.ok) { + const errorText = await resultResponse.text() + throw new Error(`Failed to get task result: ${resultResponse.status} - ${errorText}`) + } + + const taskResult = await resultResponse.json() + logger.info(`Parallel AI deep research task ${runId} completed`) + + const output = taskResult.output || {} + const run = taskResult.run || {} + + return { + success: true, + output: { + status: run.status || 'completed', + run_id: runId, + message: 'Research completed successfully', + content: output.content || {}, + basis: output.basis || [], + }, + } + } catch (error: unknown) { + const errorMessage = error instanceof Error ? error.message : 'Unknown error' + logger.error('Error fetching research task result:', { + message: errorMessage, + runId, + }) + + return { + ...result, + success: false, + error: `Error fetching research task result: ${errorMessage}`, + } + } + }, + outputs: { status: { type: 'string', - description: 'Task status (running, completed, failed)', + description: 'Task status (completed, failed)', }, run_id: { type: 'string', @@ -125,7 +177,7 @@ export const deepResearchTool: ToolConfig }, outputs: { - success: { type: 'boolean', description: 'Operation success status' }, - output: { + content: { type: 'string', description: 'Generated text content' }, + model: { type: 'string', description: 'Model used for generation' }, + usage: { type: 'object', - description: 'Chat completion results', + description: 'Token usage information', properties: { - content: { type: 'string', description: 'Generated text content' }, - model: { type: 'string', description: 'Model used for generation' }, - usage: { - type: 'object', - description: 'Token usage information', - properties: { - prompt_tokens: { type: 'number', description: 'Number of tokens in the prompt' }, - completion_tokens: { - type: 'number', - description: 'Number of tokens in the completion', - }, - total_tokens: { type: 'number', description: 'Total number of tokens used' }, - }, + prompt_tokens: { type: 'number', description: 'Number of tokens in the prompt' }, + completion_tokens: { + type: 'number', + description: 'Number of tokens in the completion', }, + total_tokens: { type: 'number', description: 'Total number of tokens used' }, }, }, }, diff --git a/apps/sim/tools/perplexity/search.ts b/apps/sim/tools/perplexity/search.ts index d0cd5d575f..e1c4ab5dec 100644 --- a/apps/sim/tools/perplexity/search.ts +++ b/apps/sim/tools/perplexity/search.ts @@ -126,29 +126,22 @@ export const searchTool: ToolConfig = { openai_embeddings: openAIEmbeddingsTool, http_request: httpRequestTool, huggingface_chat: huggingfaceChatTool, + llm_chat: llmChatTool, function_execute: functionExecuteTool, vision_tool: visionTool, file_parser: fileParseTool, @@ -1526,7 +1527,6 @@ export const tools: Record = { youtube_comments: youtubeCommentsTool, youtube_channel_videos: youtubeChannelVideosTool, youtube_channel_playlists: youtubeChannelPlaylistsTool, - youtube_related_videos: youtubeRelatedVideosTool, notion_read: notionReadTool, notion_read_database: notionReadDatabaseTool, notion_write: notionWriteTool, diff --git a/apps/sim/tools/thinking/tool.ts b/apps/sim/tools/thinking/tool.ts index ef27111932..5e319d6144 100644 --- a/apps/sim/tools/thinking/tool.ts +++ b/apps/sim/tools/thinking/tool.ts @@ -12,9 +12,9 @@ export const thinkingTool: ToolConfig thought: { type: 'string', required: true, - visibility: 'hidden', + visibility: 'llm-only', description: - 'The thought process or instruction provided by the user in the Thinking Step block.', + 'Your internal reasoning, analysis, or thought process. Use this to think through the problem step by step before responding.', }, }, diff --git a/apps/sim/tools/wordpress/types.ts b/apps/sim/tools/wordpress/types.ts index faa2bd3396..fbb9483356 100644 --- a/apps/sim/tools/wordpress/types.ts +++ b/apps/sim/tools/wordpress/types.ts @@ -254,8 +254,8 @@ export interface WordPressListPagesResponse extends ToolResponse { // Upload Media export interface WordPressUploadMediaParams extends WordPressBaseParams { - file: string // Base64 encoded file data or URL - filename: string + file: any // UserFile object from file upload + filename?: string // Optional filename override title?: string caption?: string altText?: string diff --git a/apps/sim/tools/wordpress/upload_media.ts b/apps/sim/tools/wordpress/upload_media.ts index 2d91e05348..d02162cc0a 100644 --- a/apps/sim/tools/wordpress/upload_media.ts +++ b/apps/sim/tools/wordpress/upload_media.ts @@ -1,9 +1,8 @@ +import { createLogger } from '@/lib/logs/console/logger' import type { ToolConfig } from '@/tools/types' -import { - WORDPRESS_COM_API_BASE, - type WordPressUploadMediaParams, - type WordPressUploadMediaResponse, -} from './types' +import type { WordPressUploadMediaParams, WordPressUploadMediaResponse } from './types' + +const logger = createLogger('WordPressUploadMediaTool') export const uploadMediaTool: ToolConfig = { @@ -26,16 +25,16 @@ export const uploadMediaTool: ToolConfig `${WORDPRESS_COM_API_BASE}/${params.siteId}/media`, + url: () => '/api/tools/wordpress/upload', method: 'POST', - headers: (params) => { - // Determine content type from filename - const ext = params.filename.split('.').pop()?.toLowerCase() || '' - const mimeTypes: Record = { - jpg: 'image/jpeg', - jpeg: 'image/jpeg', - png: 'image/png', - gif: 'image/gif', - webp: 'image/webp', - svg: 'image/svg+xml', - pdf: 'application/pdf', - mp4: 'video/mp4', - mp3: 'audio/mpeg', - wav: 'audio/wav', - doc: 'application/msword', - docx: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', - } - const contentType = mimeTypes[ext] || 'application/octet-stream' - - return { - 'Content-Type': contentType, - 'Content-Disposition': `attachment; filename="${params.filename}"`, - Authorization: `Bearer ${params.accessToken}`, - } - }, - body: (params) => { - // If the file is a base64 string, we need to decode it - // The body function returns the data directly for binary uploads - // In this case, we return the file data as-is and let the executor handle it - return params.file as any - }, + headers: () => ({ + 'Content-Type': 'application/json', + }), + body: (params) => ({ + accessToken: params.accessToken, + siteId: params.siteId, + file: params.file, + filename: params.filename, + title: params.title, + caption: params.caption, + altText: params.altText, + description: params.description, + }), }, transformResponse: async (response: Response) => { - if (!response.ok) { - const error = await response.json().catch(() => ({})) - throw new Error(error.message || `WordPress API error: ${response.status}`) - } - const data = await response.json() + if (!data.success) { + logger.error('Failed to upload media via custom API route', { + error: data.error, + }) + throw new Error(data.error || 'Failed to upload media to WordPress') + } + return { success: true, output: { - media: { - id: data.id, - date: data.date, - slug: data.slug, - type: data.type, - link: data.link, - title: data.title, - caption: data.caption, - alt_text: data.alt_text, - media_type: data.media_type, - mime_type: data.mime_type, - source_url: data.source_url, - media_details: data.media_details, - }, + media: data.output.media, }, } }, diff --git a/apps/sim/tools/x/read.ts b/apps/sim/tools/x/read.ts index e974b7f1e0..5db39eb856 100644 --- a/apps/sim/tools/x/read.ts +++ b/apps/sim/tools/x/read.ts @@ -1,5 +1,9 @@ +import { createLogger } from '@/lib/logs/console/logger' import type { ToolConfig } from '@/tools/types' import type { XReadParams, XReadResponse, XTweet } from '@/tools/x/types' +import { transformTweet } from '@/tools/x/types' + +const logger = createLogger('XReadTool') export const xReadTool: ToolConfig = { id: 'x_read', @@ -39,11 +43,36 @@ export const xReadTool: ToolConfig = { 'author_id', 'in_reply_to_user_id', 'referenced_tweets.id', + 'referenced_tweets.id.author_id', 'attachments.media_keys', 'attachments.poll_ids', ].join(',') - return `https://api.twitter.com/2/tweets/${params.tweetId}?expansions=${expansions}` + const tweetFields = [ + 'created_at', + 'conversation_id', + 'in_reply_to_user_id', + 'attachments', + 'context_annotations', + 'public_metrics', + ].join(',') + + const userFields = [ + 'name', + 'username', + 'description', + 'profile_image_url', + 'verified', + 'public_metrics', + ].join(',') + + const queryParams = new URLSearchParams({ + expansions, + 'tweet.fields': tweetFields, + 'user.fields': userFields, + }) + + return `https://api.twitter.com/2/tweets/${params.tweetId}?${queryParams.toString()}` }, method: 'GET', headers: (params) => ({ @@ -52,39 +81,79 @@ export const xReadTool: ToolConfig = { }), }, - transformResponse: async (response) => { + transformResponse: async (response, params) => { const data = await response.json() - const transformTweet = (tweet: any): XTweet => ({ - id: tweet.id, - text: tweet.text, - createdAt: tweet.created_at, - authorId: tweet.author_id, - conversationId: tweet.conversation_id, - inReplyToUserId: tweet.in_reply_to_user_id, - attachments: { - mediaKeys: tweet.attachments?.media_keys, - pollId: tweet.attachments?.poll_ids?.[0], - }, - }) + if (data.errors && !data.data) { + logger.error('X Read API Error:', JSON.stringify(data, null, 2)) + return { + success: false, + error: data.errors?.[0]?.detail || data.errors?.[0]?.message || 'Failed to fetch tweet', + output: { + tweet: {} as XTweet, + }, + } + } const mainTweet = transformTweet(data.data) const context: { parentTweet?: XTweet; rootTweet?: XTweet } = {} - // Get parent and root tweets if available if (data.includes?.tweets) { const referencedTweets = data.data.referenced_tweets || [] const parentTweetRef = referencedTweets.find((ref: any) => ref.type === 'replied_to') - const rootTweetRef = referencedTweets.find((ref: any) => ref.type === 'replied_to_root') + const quotedTweetRef = referencedTweets.find((ref: any) => ref.type === 'quoted') if (parentTweetRef) { const parentTweet = data.includes.tweets.find((t: any) => t.id === parentTweetRef.id) if (parentTweet) context.parentTweet = transformTweet(parentTweet) } - if (rootTweetRef) { - const rootTweet = data.includes.tweets.find((t: any) => t.id === rootTweetRef.id) - if (rootTweet) context.rootTweet = transformTweet(rootTweet) + if (!parentTweetRef && quotedTweetRef) { + const quotedTweet = data.includes.tweets.find((t: any) => t.id === quotedTweetRef.id) + if (quotedTweet) context.rootTweet = transformTweet(quotedTweet) + } + } + + let replies: XTweet[] = [] + if (params?.includeReplies && mainTweet.id) { + try { + const repliesExpansions = ['author_id', 'referenced_tweets.id'].join(',') + const repliesTweetFields = [ + 'created_at', + 'conversation_id', + 'in_reply_to_user_id', + 'public_metrics', + ].join(',') + + const conversationId = mainTweet.conversationId || mainTweet.id + const searchQuery = `conversation_id:${conversationId}` + const searchParams = new URLSearchParams({ + query: searchQuery, + expansions: repliesExpansions, + 'tweet.fields': repliesTweetFields, + max_results: '100', // Max allowed + }) + + const repliesResponse = await fetch( + `https://api.twitter.com/2/tweets/search/recent?${searchParams.toString()}`, + { + method: 'GET', + headers: { + Authorization: `Bearer ${params?.accessToken || ''}`, + 'Content-Type': 'application/json', + }, + } + ) + + const repliesData = await repliesResponse.json() + + if (repliesData.data && Array.isArray(repliesData.data)) { + replies = repliesData.data + .filter((tweet: any) => tweet.id !== mainTweet.id) + .map(transformTweet) + } + } catch (error) { + logger.warn('Failed to fetch replies:', error) } } @@ -92,7 +161,8 @@ export const xReadTool: ToolConfig = { success: true, output: { tweet: mainTweet, - context, + replies: replies.length > 0 ? replies : undefined, + context: Object.keys(context).length > 0 ? context : undefined, }, } }, diff --git a/apps/sim/tools/x/search.ts b/apps/sim/tools/x/search.ts index bbbec7e17e..6591041839 100644 --- a/apps/sim/tools/x/search.ts +++ b/apps/sim/tools/x/search.ts @@ -1,6 +1,7 @@ import { createLogger } from '@/lib/logs/console/logger' import type { ToolConfig } from '@/tools/types' -import type { XSearchParams, XSearchResponse, XTweet, XUser } from '@/tools/x/types' +import type { XSearchParams, XSearchResponse } from '@/tools/x/types' +import { transformTweet, transformUser } from '@/tools/x/types' const logger = createLogger('XSearchTool') @@ -67,7 +68,8 @@ export const xSearchTool: ToolConfig = { const queryParams = new URLSearchParams({ query, expansions, - 'tweet.fields': 'created_at,conversation_id,in_reply_to_user_id,attachments', + 'tweet.fields': + 'created_at,conversation_id,in_reply_to_user_id,attachments,context_annotations,public_metrics', 'user.fields': 'name,username,description,profile_image_url,verified,public_metrics', }) @@ -92,7 +94,6 @@ export const xSearchTool: ToolConfig = { transformResponse: async (response) => { const data = await response.json() - // Check if data.data is undefined/null or not an array if (!data.data || !Array.isArray(data.data)) { logger.error('X Search API Error:', JSON.stringify(data, null, 2)) return { @@ -118,33 +119,6 @@ export const xSearchTool: ToolConfig = { } } - const transformTweet = (tweet: any): XTweet => ({ - id: tweet.id, - text: tweet.text, - createdAt: tweet.created_at, - authorId: tweet.author_id, - conversationId: tweet.conversation_id, - inReplyToUserId: tweet.in_reply_to_user_id, - attachments: { - mediaKeys: tweet.attachments?.media_keys, - pollId: tweet.attachments?.poll_ids?.[0], - }, - }) - - const transformUser = (user: any): XUser => ({ - id: user.id, - username: user.username, - name: user.name, - description: user.description, - profileImageUrl: user.profile_image_url, - verified: user.verified, - metrics: { - followersCount: user.public_metrics.followers_count, - followingCount: user.public_metrics.following_count, - tweetCount: user.public_metrics.tweet_count, - }, - }) - return { success: true, output: { diff --git a/apps/sim/tools/x/types.ts b/apps/sim/tools/x/types.ts index 407e0c11cd..ac4cf2b701 100644 --- a/apps/sim/tools/x/types.ts +++ b/apps/sim/tools/x/types.ts @@ -1,6 +1,34 @@ import type { ToolResponse } from '@/tools/types' -// Common Types +/** + * Context annotation domain from X API + */ +export interface XContextAnnotationDomain { + id: string + name: string + description?: string +} + +/** + * Context annotation entity from X API + */ +export interface XContextAnnotationEntity { + id: string + name: string + description?: string +} + +/** + * Context annotation from X API - provides semantic context about tweet content + */ +export interface XContextAnnotation { + domain: XContextAnnotationDomain + entity: XContextAnnotationEntity +} + +/** + * Tweet object from X API + */ export interface XTweet { id: string text: string @@ -12,6 +40,13 @@ export interface XTweet { mediaKeys?: string[] pollId?: string } + contextAnnotations?: XContextAnnotation[] + publicMetrics?: { + retweetCount: number + replyCount: number + likeCount: number + quoteCount: number + } } export interface XUser { @@ -107,3 +142,45 @@ export interface XUserResponse extends ToolResponse { } export type XResponse = XWriteResponse | XReadResponse | XSearchResponse | XUserResponse + +/** + * Transforms raw X API tweet data (snake_case) into the XTweet format (camelCase) + */ +export const transformTweet = (tweet: any): XTweet => ({ + id: tweet.id, + text: tweet.text, + createdAt: tweet.created_at, + authorId: tweet.author_id, + conversationId: tweet.conversation_id, + inReplyToUserId: tweet.in_reply_to_user_id, + attachments: { + mediaKeys: tweet.attachments?.media_keys, + pollId: tweet.attachments?.poll_ids?.[0], + }, + contextAnnotations: tweet.context_annotations, + publicMetrics: tweet.public_metrics + ? { + retweetCount: tweet.public_metrics.retweet_count, + replyCount: tweet.public_metrics.reply_count, + likeCount: tweet.public_metrics.like_count, + quoteCount: tweet.public_metrics.quote_count, + } + : undefined, +}) + +/** + * Transforms raw X API user data (snake_case) into the XUser format (camelCase) + */ +export const transformUser = (user: any): XUser => ({ + id: user.id, + username: user.username, + name: user.name || '', + description: user.description || '', + profileImageUrl: user.profile_image_url || '', + verified: !!user.verified, + metrics: { + followersCount: user.public_metrics?.followers_count || 0, + followingCount: user.public_metrics?.following_count || 0, + tweetCount: user.public_metrics?.tweet_count || 0, + }, +}) diff --git a/apps/sim/tools/x/user.ts b/apps/sim/tools/x/user.ts index 4680616265..8f166ac001 100644 --- a/apps/sim/tools/x/user.ts +++ b/apps/sim/tools/x/user.ts @@ -1,6 +1,7 @@ import { createLogger } from '@/lib/logs/console/logger' import type { ToolConfig } from '@/tools/types' -import type { XUser, XUserParams, XUserResponse } from '@/tools/x/types' +import type { XUserParams, XUserResponse } from '@/tools/x/types' +import { transformUser } from '@/tools/x/types' const logger = createLogger('XUserTool') @@ -85,21 +86,7 @@ export const xUserTool: ToolConfig = { } const userData = responseData.data - - // Create the base user object with defensive coding for missing properties - const user: XUser = { - id: userData.id, - username: userData.username, - name: userData.name || '', - description: userData.description || '', - profileImageUrl: userData.profile_image_url || '', - verified: !!userData.verified, - metrics: { - followersCount: userData.public_metrics?.followers_count || 0, - followingCount: userData.public_metrics?.following_count || 0, - tweetCount: userData.public_metrics?.tweet_count || 0, - }, - } + const user = transformUser(userData) return { success: true, diff --git a/apps/sim/tools/x/write.ts b/apps/sim/tools/x/write.ts index 4faa2f3aa7..832a957fda 100644 --- a/apps/sim/tools/x/write.ts +++ b/apps/sim/tools/x/write.ts @@ -1,5 +1,6 @@ import type { ToolConfig } from '@/tools/types' import type { XWriteParams, XWriteResponse } from '@/tools/x/types' +import { transformTweet } from '@/tools/x/types' export const xWriteTool: ToolConfig = { id: 'x_write', @@ -81,18 +82,7 @@ export const xWriteTool: ToolConfig = { return { success: true, output: { - tweet: { - id: data.data.id, - text: data.data.text, - createdAt: data.data.created_at, - authorId: data.data.author_id, - conversationId: data.data.conversation_id, - inReplyToUserId: data.data.in_reply_to_user_id, - attachments: { - mediaKeys: data.data.attachments?.media_keys, - pollId: data.data.attachments?.poll_ids?.[0], - }, - }, + tweet: transformTweet(data.data), }, } }, diff --git a/apps/sim/tools/youtube/index.ts b/apps/sim/tools/youtube/index.ts index e231fa4268..054ea30b00 100644 --- a/apps/sim/tools/youtube/index.ts +++ b/apps/sim/tools/youtube/index.ts @@ -3,7 +3,6 @@ import { youtubeChannelPlaylistsTool } from '@/tools/youtube/channel_playlists' import { youtubeChannelVideosTool } from '@/tools/youtube/channel_videos' import { youtubeCommentsTool } from '@/tools/youtube/comments' import { youtubePlaylistItemsTool } from '@/tools/youtube/playlist_items' -import { youtubeRelatedVideosTool } from '@/tools/youtube/related_videos' import { youtubeSearchTool } from '@/tools/youtube/search' import { youtubeVideoDetailsTool } from '@/tools/youtube/video_details' @@ -14,4 +13,3 @@ export { youtubePlaylistItemsTool } export { youtubeCommentsTool } export { youtubeChannelVideosTool } export { youtubeChannelPlaylistsTool } -export { youtubeRelatedVideosTool } diff --git a/apps/sim/tools/youtube/related_videos.ts b/apps/sim/tools/youtube/related_videos.ts deleted file mode 100644 index e2d1603961..0000000000 --- a/apps/sim/tools/youtube/related_videos.ts +++ /dev/null @@ -1,108 +0,0 @@ -import type { ToolConfig } from '@/tools/types' -import type { - YouTubeRelatedVideosParams, - YouTubeRelatedVideosResponse, -} from '@/tools/youtube/types' - -export const youtubeRelatedVideosTool: ToolConfig< - YouTubeRelatedVideosParams, - YouTubeRelatedVideosResponse -> = { - id: 'youtube_related_videos', - name: 'YouTube Related Videos', - description: 'Find videos related to a specific YouTube video.', - version: '1.0.0', - params: { - videoId: { - type: 'string', - required: true, - visibility: 'user-or-llm', - description: 'YouTube video ID to find related videos for', - }, - maxResults: { - type: 'number', - required: false, - visibility: 'user-only', - default: 10, - description: 'Maximum number of related videos to return (1-50)', - }, - pageToken: { - type: 'string', - required: false, - visibility: 'user-only', - description: 'Page token for pagination', - }, - apiKey: { - type: 'string', - required: true, - visibility: 'user-only', - description: 'YouTube API Key', - }, - }, - - request: { - url: (params: YouTubeRelatedVideosParams) => { - let url = `https://www.googleapis.com/youtube/v3/search?part=snippet&type=video&relatedToVideoId=${encodeURIComponent( - params.videoId - )}&key=${params.apiKey}` - url += `&maxResults=${Number(params.maxResults || 10)}` - if (params.pageToken) { - url += `&pageToken=${params.pageToken}` - } - return url - }, - method: 'GET', - headers: () => ({ - 'Content-Type': 'application/json', - }), - }, - - transformResponse: async (response: Response): Promise => { - const data = await response.json() - const items = (data.items || []).map((item: any) => ({ - videoId: item.id?.videoId, - title: item.snippet?.title, - description: item.snippet?.description, - thumbnail: - item.snippet?.thumbnails?.medium?.url || - item.snippet?.thumbnails?.default?.url || - item.snippet?.thumbnails?.high?.url || - '', - channelTitle: item.snippet?.channelTitle || '', - })) - return { - success: true, - output: { - items, - totalResults: data.pageInfo?.totalResults || 0, - nextPageToken: data.nextPageToken, - }, - } - }, - - outputs: { - items: { - type: 'array', - description: 'Array of related videos', - items: { - type: 'object', - properties: { - videoId: { type: 'string', description: 'YouTube video ID' }, - title: { type: 'string', description: 'Video title' }, - description: { type: 'string', description: 'Video description' }, - thumbnail: { type: 'string', description: 'Video thumbnail URL' }, - channelTitle: { type: 'string', description: 'Channel name' }, - }, - }, - }, - totalResults: { - type: 'number', - description: 'Total number of related videos available', - }, - nextPageToken: { - type: 'string', - description: 'Token for accessing the next page of results', - optional: true, - }, - }, -} diff --git a/apps/sim/tools/youtube/types.ts b/apps/sim/tools/youtube/types.ts index 6523db4713..a93129929f 100644 --- a/apps/sim/tools/youtube/types.ts +++ b/apps/sim/tools/youtube/types.ts @@ -166,27 +166,6 @@ export interface YouTubeChannelPlaylistsResponse extends ToolResponse { } } -export interface YouTubeRelatedVideosParams { - apiKey: string - videoId: string - maxResults?: number - pageToken?: string -} - -export interface YouTubeRelatedVideosResponse extends ToolResponse { - output: { - items: Array<{ - videoId: string - title: string - description: string - thumbnail: string - channelTitle: string - }> - totalResults: number - nextPageToken?: string - } -} - export type YouTubeResponse = | YouTubeSearchResponse | YouTubeVideoDetailsResponse @@ -195,4 +174,3 @@ export type YouTubeResponse = | YouTubeCommentsResponse | YouTubeChannelVideosResponse | YouTubeChannelPlaylistsResponse - | YouTubeRelatedVideosResponse diff --git a/apps/sim/tools/zendesk/autocomplete_organizations.ts b/apps/sim/tools/zendesk/autocomplete_organizations.ts index 7b0ef8ccbb..8eb681bfa4 100644 --- a/apps/sim/tools/zendesk/autocomplete_organizations.ts +++ b/apps/sim/tools/zendesk/autocomplete_organizations.ts @@ -129,16 +129,8 @@ export const zendeskAutocompleteOrganizationsTool: ToolConfig< }, outputs: { - success: { type: 'boolean', description: 'Operation success status' }, - output: { - type: 'object', - description: 'Organizations search results', - properties: { - organizations: { type: 'array', description: 'Array of organization objects' }, - paging: { type: 'object', description: 'Pagination information' }, - metadata: { type: 'object', description: 'Operation metadata' }, - success: { type: 'boolean', description: 'Operation success' }, - }, - }, + organizations: { type: 'array', description: 'Array of organization objects' }, + paging: { type: 'object', description: 'Pagination information' }, + metadata: { type: 'object', description: 'Operation metadata' }, }, } diff --git a/apps/sim/tools/zendesk/create_organization.ts b/apps/sim/tools/zendesk/create_organization.ts index c77162ba85..21c667b146 100644 --- a/apps/sim/tools/zendesk/create_organization.ts +++ b/apps/sim/tools/zendesk/create_organization.ts @@ -151,15 +151,7 @@ export const zendeskCreateOrganizationTool: ToolConfig< }, outputs: { - success: { type: 'boolean', description: 'Operation success status' }, - output: { - type: 'object', - description: 'Created organization data', - properties: { - organization: { type: 'object', description: 'Created organization object' }, - metadata: { type: 'object', description: 'Operation metadata' }, - success: { type: 'boolean', description: 'Operation success' }, - }, - }, + organization: { type: 'object', description: 'Created organization object' }, + metadata: { type: 'object', description: 'Operation metadata' }, }, } diff --git a/apps/sim/tools/zendesk/create_organizations_bulk.ts b/apps/sim/tools/zendesk/create_organizations_bulk.ts index e46f9d9a8f..52720d4024 100644 --- a/apps/sim/tools/zendesk/create_organizations_bulk.ts +++ b/apps/sim/tools/zendesk/create_organizations_bulk.ts @@ -103,15 +103,7 @@ export const zendeskCreateOrganizationsBulkTool: ToolConfig< }, outputs: { - success: { type: 'boolean', description: 'Operation success status' }, - output: { - type: 'object', - description: 'Bulk creation job status', - properties: { - jobStatus: { type: 'object', description: 'Job status object' }, - metadata: { type: 'object', description: 'Operation metadata' }, - success: { type: 'boolean', description: 'Operation success' }, - }, - }, + jobStatus: { type: 'object', description: 'Job status object' }, + metadata: { type: 'object', description: 'Operation metadata' }, }, } diff --git a/apps/sim/tools/zendesk/create_ticket.ts b/apps/sim/tools/zendesk/create_ticket.ts index d0fd81a994..9ad8984311 100644 --- a/apps/sim/tools/zendesk/create_ticket.ts +++ b/apps/sim/tools/zendesk/create_ticket.ts @@ -183,15 +183,7 @@ export const zendeskCreateTicketTool: ToolConfig< }, outputs: { - success: { type: 'boolean', description: 'Operation success status' }, - output: { - type: 'object', - description: 'Created ticket data', - properties: { - ticket: { type: 'object', description: 'Created ticket object' }, - metadata: { type: 'object', description: 'Operation metadata' }, - success: { type: 'boolean', description: 'Operation success' }, - }, - }, + ticket: { type: 'object', description: 'Created ticket object' }, + metadata: { type: 'object', description: 'Operation metadata' }, }, } diff --git a/apps/sim/tools/zendesk/create_tickets_bulk.ts b/apps/sim/tools/zendesk/create_tickets_bulk.ts index bf7084f7db..1d701411dd 100644 --- a/apps/sim/tools/zendesk/create_tickets_bulk.ts +++ b/apps/sim/tools/zendesk/create_tickets_bulk.ts @@ -104,15 +104,7 @@ export const zendeskCreateTicketsBulkTool: ToolConfig< }, outputs: { - success: { type: 'boolean', description: 'Operation success status' }, - output: { - type: 'object', - description: 'Bulk create job status', - properties: { - jobStatus: { type: 'object', description: 'Job status object' }, - metadata: { type: 'object', description: 'Operation metadata' }, - success: { type: 'boolean', description: 'Operation success' }, - }, - }, + jobStatus: { type: 'object', description: 'Job status object' }, + metadata: { type: 'object', description: 'Operation metadata' }, }, } diff --git a/apps/sim/tools/zendesk/create_user.ts b/apps/sim/tools/zendesk/create_user.ts index c8f138e377..b2a0d76fa2 100644 --- a/apps/sim/tools/zendesk/create_user.ts +++ b/apps/sim/tools/zendesk/create_user.ts @@ -163,15 +163,7 @@ export const zendeskCreateUserTool: ToolConfig=3.25.0 <3.25.68" }, "bin": { "evals": "dist/evals/cli.js" } }, "sha512-VscOPDo/Go8+sHMYLrxcMrUW9sIOHgqCu0Iz9sYH+d/OQqkHJzsyd43oDwgNPCMRYxsZFLApcvczk0zz2l5A8Q=="], + "@browserbasehq/stagehand": ["@browserbasehq/stagehand@3.0.5", "", { "dependencies": { "@ai-sdk/provider": "^2.0.0", "@anthropic-ai/sdk": "0.39.0", "@browserbasehq/sdk": "^2.4.0", "@google/genai": "^1.22.0", "@langchain/openai": "^0.4.4", "@modelcontextprotocol/sdk": "^1.17.2", "ai": "^5.0.0", "devtools-protocol": "^0.0.1464554", "fetch-cookie": "^3.1.0", "openai": "^4.87.1", "pino": "^9.6.0", "pino-pretty": "^13.0.0", "playwright": "^1.52.0", "ws": "^8.18.0", "zod-to-json-schema": "^3.25.0" }, "optionalDependencies": { "@ai-sdk/anthropic": "^2.0.34", "@ai-sdk/azure": "^2.0.54", "@ai-sdk/cerebras": "^1.0.25", "@ai-sdk/deepseek": "^1.0.23", "@ai-sdk/google": "^2.0.23", "@ai-sdk/groq": "^2.0.24", "@ai-sdk/mistral": "^2.0.19", "@ai-sdk/openai": "^2.0.53", "@ai-sdk/perplexity": "^2.0.13", "@ai-sdk/togetherai": "^1.0.23", "@ai-sdk/xai": "^2.0.26", "@langchain/core": "^0.3.40", "bufferutil": "^4.0.9", "chrome-launcher": "^1.2.0", "ollama-ai-provider-v2": "^1.5.0", "patchright-core": "^1.55.2", "playwright-core": "^1.54.1", "puppeteer-core": "^22.8.0" }, "peerDependencies": { "deepmerge": "^4.3.1", "dotenv": "^16.4.5", "zod": "3.25.76 || 4.1.8" } }, "sha512-89QPlRKpfq8kJd8oGgodo5I39xDjEPwVIEvdjaICcU33X4yAtkvoR4lM2tEwGiiDu/BPQznB27JFgoGlMjUsTA=="], "@bufbuild/protobuf": ["@bufbuild/protobuf@2.10.1", "", {}, "sha512-ckS3+vyJb5qGpEYv/s1OebUHDi/xSNtfgw1wqKZo7MR9F2z+qXr0q5XagafAG/9O0QPVIUfST0smluYSTpYFkg=="], @@ -519,6 +518,8 @@ "@cerebras/cerebras_cloud_sdk": ["@cerebras/cerebras_cloud_sdk@1.59.0", "", { "dependencies": { "@types/node": "^18.11.18", "@types/node-fetch": "^2.6.4", "abort-controller": "^3.0.0", "agentkeepalive": "^4.2.1", "form-data-encoder": "1.7.2", "formdata-node": "^4.3.2", "node-fetch": "^2.6.7" } }, "sha512-bDx86IgIb+FzbLQVUtVnjsEv7e+TDPwQkulycLNImsb9ecyIJPfpURSIyxV4pdoHZ9zMVaQy59hBqJ0zLqNK8Q=="], + "@cfworker/json-schema": ["@cfworker/json-schema@4.1.1", "", {}, "sha512-gAmrUZSGtKc3AiBL71iNWxDsyUC5uMaKKGdvzYsBoTW/xi42JQHl7eKV2OYzCUqvc+D2RCcf7EXY2iCyFIk6og=="], + "@connectrpc/connect": ["@connectrpc/connect@2.0.0-rc.3", "", { "peerDependencies": { "@bufbuild/protobuf": "^2.2.0" } }, "sha512-ARBt64yEyKbanyRETTjcjJuHr2YXorzQo0etyS5+P6oSeW8xEuzajA9g+zDnMcj1hlX2dQE93foIWQGfpru7gQ=="], "@connectrpc/connect-web": ["@connectrpc/connect-web@2.0.0-rc.3", "", { "peerDependencies": { "@bufbuild/protobuf": "^2.2.0", "@connectrpc/connect": "2.0.0-rc.3" } }, "sha512-w88P8Lsn5CCsA7MFRl2e6oLY4J/5toiNtJns/YJrlyQaWOy3RO8pDgkz+iIkG98RPMhj2thuBvsd3Cn4DKKCkw=="], @@ -703,6 +704,10 @@ "@jsonhero/path": ["@jsonhero/path@1.0.21", "", {}, "sha512-gVUDj/92acpVoJwsVJ/RuWOaHyG4oFzn898WNGQItLCTQ+hOaVlEaImhwE1WqOTf+l3dGOUkbSiVKlb3q1hd1Q=="], + "@langchain/core": ["@langchain/core@0.3.79", "", { "dependencies": { "@cfworker/json-schema": "^4.0.2", "ansi-styles": "^5.0.0", "camelcase": "6", "decamelize": "1.2.0", "js-tiktoken": "^1.0.12", "langsmith": "^0.3.67", "mustache": "^4.2.0", "p-queue": "^6.6.2", "p-retry": "4", "uuid": "^10.0.0", "zod": "^3.25.32", "zod-to-json-schema": "^3.22.3" } }, "sha512-ZLAs5YMM5N2UXN3kExMglltJrKKoW7hs3KMZFlXUnD7a5DFKBYxPFMeXA4rT+uvTxuJRZPCYX0JKI5BhyAWx4A=="], + + "@langchain/openai": ["@langchain/openai@0.4.9", "", { "dependencies": { "js-tiktoken": "^1.0.12", "openai": "^4.87.3", "zod": "^3.22.4", "zod-to-json-schema": "^3.22.3" }, "peerDependencies": { "@langchain/core": ">=0.3.39 <0.4.0" } }, "sha512-NAsaionRHNdqaMjVLPkFCyjUDze+OqRHghA1Cn4fPoAafz+FXcl9c7LlEl9Xo0FH6/8yiCl7Rw2t780C/SBVxQ=="], + "@levischuck/tiny-cbor": ["@levischuck/tiny-cbor@0.2.11", "", {}, "sha512-llBRm4dT4Z89aRsm6u2oEZ8tfwL/2l6BwpZ7JcyieouniDECM5AqNgr/y08zalEIvW3RSK4upYyybDcmjXqAow=="], "@linear/sdk": ["@linear/sdk@40.0.0", "", { "dependencies": { "@graphql-typed-document-node/core": "^3.1.0", "graphql": "^15.4.0", "isomorphic-unfetch": "^3.1.0" } }, "sha512-R4lyDIivdi00fO+DYPs7gWNX221dkPJhgDowFrsfos/rNG6o5HixsCPgwXWtKN0GA0nlqLvFTmzvzLXpud1xKw=="], @@ -905,6 +910,8 @@ "@protobufjs/utf8": ["@protobufjs/utf8@1.1.0", "", {}, "sha512-Vvn3zZrhQZkkBE8LSuW3em98c0FwgO4nxzv6OdSxPKJIEKY2bGbHn+mhGIPerzI4twdxaP8/0+06HBpwf345Lw=="], + "@puppeteer/browsers": ["@puppeteer/browsers@2.3.0", "", { "dependencies": { "debug": "^4.3.5", "extract-zip": "^2.0.1", "progress": "^2.0.3", "proxy-agent": "^6.4.0", "semver": "^7.6.3", "tar-fs": "^3.0.6", "unbzip2-stream": "^1.4.3", "yargs": "^17.7.2" }, "bin": { "browsers": "lib/cjs/main-cli.js" } }, "sha512-ioXoq9gPxkss4MYhD+SFaU9p1IHFUX0ILAWFPyjGaBdjLsYAlZw6j1iLA0N/m12uVHLFDfSYNF7EQccjinIMDA=="], + "@radix-ui/number": ["@radix-ui/number@1.1.1", "", {}, "sha512-MkKCwxlXTgz6CFoJx3pCwn07GKp36+aZyu/u2Ln2VrA5DcdyCZkASEDBTd8x5whTQQL5CiYf4prXKLcgQdv29g=="], "@radix-ui/primitive": ["@radix-ui/primitive@1.1.3", "", {}, "sha512-JTF99U/6XIjCBo0wqkU5sK10glYe27MRRsfwoiq5zzOEZLHU3A3KCMa5X/azekYRCJ0HlwI0crAXS/5dEHTzDg=="], @@ -1297,6 +1304,8 @@ "@tokenizer/token": ["@tokenizer/token@0.3.0", "", {}, "sha512-OvjF+z51L3ov0OyAU0duzsYuvO01PH7x4t6DJx+guahgTnBHkhJdG7soQeTSFLWN3efnHyibZ4Z8l2EuWwJN3A=="], + "@tootallnate/quickjs-emscripten": ["@tootallnate/quickjs-emscripten@0.23.0", "", {}, "sha512-C5Mc6rdnsaJDjO3UpGW/CQTHtCKaYlScZTly4JIu97Jxo/odCiH0ITnDXSJPTOrEKk/ycSZ0AOgTmkDtkOsvIA=="], + "@trigger.dev/build": ["@trigger.dev/build@4.1.2", "", { "dependencies": { "@prisma/config": "^6.10.0", "@trigger.dev/core": "4.1.2", "mlly": "^1.7.1", "pkg-types": "^1.1.3", "resolve": "^1.22.8", "tinyglobby": "^0.2.2", "tsconfck": "3.1.3" } }, "sha512-CwejY4n6nqls7Z2Vju3AF1FIRfBzGgogKxm22aqBKGlkjblfbvKcZE3kGSrJ+X6n90Fw5glZVoK3BiC32Sdv3g=="], "@trigger.dev/core": ["@trigger.dev/core@4.1.2", "", { "dependencies": { "@bugsnag/cuid": "^3.1.1", "@electric-sql/client": "1.0.14", "@google-cloud/precise-date": "^4.0.0", "@jsonhero/path": "^1.0.21", "@opentelemetry/api": "1.9.0", "@opentelemetry/api-logs": "0.203.0", "@opentelemetry/core": "2.0.1", "@opentelemetry/exporter-logs-otlp-http": "0.203.0", "@opentelemetry/exporter-trace-otlp-http": "0.203.0", "@opentelemetry/instrumentation": "0.203.0", "@opentelemetry/resources": "2.0.1", "@opentelemetry/sdk-logs": "0.203.0", "@opentelemetry/sdk-trace-base": "2.0.1", "@opentelemetry/sdk-trace-node": "2.0.1", "@opentelemetry/semantic-conventions": "1.36.0", "@s2-dev/streamstore": "0.17.3", "dequal": "^2.0.3", "eventsource": "^3.0.5", "eventsource-parser": "^3.0.0", "execa": "^8.0.1", "humanize-duration": "^3.27.3", "jose": "^5.4.0", "nanoid": "3.3.8", "prom-client": "^15.1.0", "socket.io": "4.7.4", "socket.io-client": "4.7.5", "std-env": "^3.8.1", "superjson": "^2.2.1", "tinyexec": "^0.3.2", "uncrypto": "^0.1.3", "zod": "3.25.76", "zod-error": "1.5.0", "zod-validation-error": "^1.5.0" } }, "sha512-pQX1FA5zwB5jkcH2JGwpJllsA33t6sFI4dZKsPShrAKAdxb7/JHtcJwxeJSFJygxo4j4tP+o0wr6kX/lUpYCqg=="], @@ -1385,8 +1394,6 @@ "@types/deep-eql": ["@types/deep-eql@4.0.2", "", {}, "sha512-c9h9dVVMigMPc4bwTvC5dxqtqJZwQPePsWjPlpSOnojbor6pGqdk541lfA7AqFQr5pB1BRdq0juY9db81BwyFw=="], - "@types/diff-match-patch": ["@types/diff-match-patch@1.0.36", "", {}, "sha512-xFdR6tkm0MWvBfO8xXCSsinYxHcqkQUlcHeSpMC2ukzOb6lwQAfDmW+Qt0AvlGd8HpsS28qKsB+oPeJn9I39jg=="], - "@types/estree": ["@types/estree@1.0.8", "", {}, "sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w=="], "@types/estree-jsx": ["@types/estree-jsx@1.0.5", "", { "dependencies": { "@types/estree": "*" } }, "sha512-52CcUVNFyfb1A2ALocQw/Dd1BQFNmSdkuC3BkZ6iqhdMfQz7JWOFRuJFloOzjk+6WijU56m9oKXFAXc7o3Towg=="], @@ -1429,6 +1436,8 @@ "@types/react-window": ["@types/react-window@2.0.0", "", { "dependencies": { "react-window": "*" } }, "sha512-E8hMDtImEpMk1SjswSvqoSmYvk7GEtyVaTa/GJV++FdDNuMVVEzpAClyJ0nqeKYBrMkGiyH6M1+rPLM0Nu1exQ=="], + "@types/retry": ["@types/retry@0.12.0", "", {}, "sha512-wWKOClTTiizcZhXnPY4wikVAwmdYHp8q6DmC+EJUzAMsycb7HB32Kh9RN4+0gExjmPmZSAQjgURXIGATPegAvA=="], + "@types/shimmer": ["@types/shimmer@1.2.0", "", {}, "sha512-UE7oxhQLLd9gub6JKIAhDq06T0F6FnztwMNRvYgjeQSBeMc1ZG/tA47EwfduvkuQS8apbkM/lpLpWsaCeYsXVg=="], "@types/ssh2": ["@types/ssh2@1.15.5", "", { "dependencies": { "@types/node": "^18.11.18" } }, "sha512-N1ASjp/nXH3ovBHddRJpli4ozpk6UdDYIX4RJWFa9L1YKnzdhTlVmiGHm4DZnj/jLbqZpes4aeR30EFGQtvhQQ=="], @@ -1443,18 +1452,24 @@ "@types/unist": ["@types/unist@3.0.3", "", {}, "sha512-ko/gIFJRv177XgZsZcBwnqJN5x/Gien8qNOn0D5bQU/zAzVf9Zt3BlcUiLqhV9y4ARk0GbT3tnUiPNgnTXzc/Q=="], + "@types/uuid": ["@types/uuid@10.0.0", "", {}, "sha512-7gqG38EyHgyP1S+7+xomFtL+ZNHcKv6DwNaCZmJmo1vgMugyF3TCnXVg4t1uk89mLNwnLtnY3TpOpCOyp1/xHQ=="], + "@types/webidl-conversions": ["@types/webidl-conversions@7.0.3", "", {}, "sha512-CiJJvcRtIgzadHCYXw7dqEnMNRjhGZlYK05Mj9OyktqV8uVT8fD2BFOB7S1uwBE3Kj2Z+4UyPmFw/Ixgw/LAlA=="], "@types/webxr": ["@types/webxr@0.5.24", "", {}, "sha512-h8fgEd/DpoS9CBrjEQXR+dIDraopAEfu4wYVNY2tEPwk60stPWhvZMf4Foo5FakuQ7HFZoa8WceaWFervK2Ovg=="], "@types/whatwg-url": ["@types/whatwg-url@11.0.5", "", { "dependencies": { "@types/webidl-conversions": "*" } }, "sha512-coYR071JRaHa+xoEvvYqvnIHaVqaYrLPbsufM9BF63HkwI5Lgmy2QR8Q5K/lYDYo5AK82wOvSOS0UsLTpTG7uQ=="], + "@types/yauzl": ["@types/yauzl@2.10.3", "", { "dependencies": { "@types/node": "*" } }, "sha512-oJoftv0LSuaDZE3Le4DbKX+KS9G36NzOeSap90UIK0yMA/NhKJhqlSGtNDORNRaIbQfzjXDrQa0ytJ6mNRGz/Q=="], + "@typespec/ts-http-runtime": ["@typespec/ts-http-runtime@0.3.2", "", { "dependencies": { "http-proxy-agent": "^7.0.0", "https-proxy-agent": "^7.0.0", "tslib": "^2.6.2" } }, "sha512-IlqQ/Gv22xUC1r/WQm4StLkYQmaaTsXAhUVsNE0+xiyf0yRFiH5++q78U3bw6bLKDCTmh0uqKB9eG9+Bt75Dkg=="], "@ungap/structured-clone": ["@ungap/structured-clone@1.3.0", "", {}, "sha512-WmoN8qaIAo7WTYWbAZuG8PYEhn5fkz7dZrqTBZ7dtt//lL2Gwms1IcnQ5yHqjDfX8Ft5j4YzDM23f87zBfDe9g=="], "@vercel/og": ["@vercel/og@0.6.8", "", { "dependencies": { "@resvg/resvg-wasm": "2.4.0", "satori": "0.12.2", "yoga-wasm-web": "0.3.3" } }, "sha512-e4kQK9mP8ntpo3dACWirGod/hHv4qO5JMj9a/0a2AZto7b4persj5YP7t1Er372gTtYFTYxNhMx34jRvHooglw=="], + "@vercel/oidc": ["@vercel/oidc@3.0.5", "", {}, "sha512-fnYhv671l+eTTp48gB4zEsTW/YtRgRPnkI2nT7x6qw5rkI1Lq2hTmQIpHPgyThI0znLK+vX2n9XxKdXZ7BUbbw=="], + "@vitejs/plugin-react": ["@vitejs/plugin-react@4.7.0", "", { "dependencies": { "@babel/core": "^7.28.0", "@babel/plugin-transform-react-jsx-self": "^7.27.1", "@babel/plugin-transform-react-jsx-source": "^7.27.1", "@rolldown/pluginutils": "1.0.0-beta.27", "@types/babel__core": "^7.20.5", "react-refresh": "^0.17.0" }, "peerDependencies": { "vite": "^4.2.0 || ^5.0.0 || ^6.0.0 || ^7.0.0" } }, "sha512-gUu9hwfWvvEDBBmgtAowQCojwZmJ5mcLn3aufeCsitijs3+f2NsrPtlAWIR6OPiqljl96GVCUbLe0HyqIpVaoA=="], "@vitest/coverage-v8": ["@vitest/coverage-v8@3.2.4", "", { "dependencies": { "@ampproject/remapping": "^2.3.0", "@bcoe/v8-coverage": "^1.0.2", "ast-v8-to-istanbul": "^0.3.3", "debug": "^4.4.1", "istanbul-lib-coverage": "^3.2.2", "istanbul-lib-report": "^3.0.1", "istanbul-lib-source-maps": "^5.0.6", "istanbul-reports": "^3.1.7", "magic-string": "^0.30.17", "magicast": "^0.3.5", "std-env": "^3.9.0", "test-exclude": "^7.0.1", "tinyrainbow": "^2.0.0" }, "peerDependencies": { "@vitest/browser": "3.2.4", "vitest": "3.2.4" }, "optionalPeers": ["@vitest/browser"] }, "sha512-EyF9SXU6kS5Ku/U82E259WSnvg6c8KTjppUncuNdm5QHpe17mwREHnjDzozC8x9MZ0xfBUFSaLkRv4TMA75ALQ=="], @@ -1495,7 +1510,7 @@ "agentkeepalive": ["agentkeepalive@4.6.0", "", { "dependencies": { "humanize-ms": "^1.2.1" } }, "sha512-kja8j7PjmncONqaTsB8fQ+wE2mSU2DJ9D4XKoJ5PFWIdRMa6SLSN1ff4mOr4jCbfRSsxR4keIiySJU0N9T5hIQ=="], - "ai": ["ai@4.3.19", "", { "dependencies": { "@ai-sdk/provider": "1.1.3", "@ai-sdk/provider-utils": "2.2.8", "@ai-sdk/react": "1.2.12", "@ai-sdk/ui-utils": "1.2.11", "@opentelemetry/api": "1.9.0", "jsondiffpatch": "0.6.0" }, "peerDependencies": { "react": "^18 || ^19 || ^19.0.0-rc", "zod": "^3.23.8" }, "optionalPeers": ["react"] }, "sha512-dIE2bfNpqHN3r6IINp9znguYdhIOheKW2LDigAMrgt/upT3B8eBGPSCblENvaZGoq+hxaN9fSMzjWpbqloP+7Q=="], + "ai": ["ai@5.0.110", "", { "dependencies": { "@ai-sdk/gateway": "2.0.19", "@ai-sdk/provider": "2.0.0", "@ai-sdk/provider-utils": "3.0.18", "@opentelemetry/api": "1.9.0" }, "peerDependencies": { "zod": "^3.25.76 || ^4.1.8" } }, "sha512-ZBq+5bvef4e5qoIG4U6NJ1UpCPWGjuaWERHXbHu2T2ND3c02nJ2zlnjm+N6zAAplQPxwqm7Sb16mrRX5uQNWtQ=="], "ajv": ["ajv@6.12.6", "", { "dependencies": { "fast-deep-equal": "^3.1.1", "fast-json-stable-stringify": "^2.0.0", "json-schema-traverse": "^0.4.1", "uri-js": "^4.2.2" } }, "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g=="], @@ -1531,6 +1546,8 @@ "assertion-error": ["assertion-error@2.0.1", "", {}, "sha512-Izi8RQcffqCeNVgFigKli1ssklIbpHnCYc6AknXGYoB6grJqyeby7jv12JUQgmTAnIDnbck1uxksT4dzN3PWBA=="], + "ast-types": ["ast-types@0.13.4", "", { "dependencies": { "tslib": "^2.0.1" } }, "sha512-x1FCFnFifvYDDzTaLII71vG5uvDwgtmDTEVWAxrgeiR8VjMONcCXJx7E+USjDtHlwFmt9MysbqgF9b9Vjr6w+w=="], + "ast-v8-to-istanbul": ["ast-v8-to-istanbul@0.3.8", "", { "dependencies": { "@jridgewell/trace-mapping": "^0.3.31", "estree-walker": "^3.0.3", "js-tokens": "^9.0.1" } }, "sha512-szgSZqUxI5T8mLKvS7WTjF9is+MVbOeLADU73IseOcrqhxr/VAvy6wfoVE39KnKzA7JRhjF5eUagNlHwvZPlKQ=="], "astring": ["astring@1.9.0", "", { "bin": { "astring": "bin/astring" } }, "sha512-LElXdjswlqjWrPpJFg1Fx4wpkOCxj1TDHlSV4PlaRxHGWko024xICaa97ZkMfs6DRKlCguiAI+rbXv5GWwXIkg=="], @@ -1547,10 +1564,24 @@ "axios": ["axios@1.13.2", "", { "dependencies": { "follow-redirects": "^1.15.6", "form-data": "^4.0.4", "proxy-from-env": "^1.1.0" } }, "sha512-VPk9ebNqPcy5lRGuSlKx752IlDatOjT9paPlm8A7yOuW2Fbvp4X3JznJtT4f0GzGLLiWE9W8onz51SqLYwzGaA=="], + "b4a": ["b4a@1.7.3", "", { "peerDependencies": { "react-native-b4a": "*" }, "optionalPeers": ["react-native-b4a"] }, "sha512-5Q2mfq2WfGuFp3uS//0s6baOJLMoVduPYVeNmDYxu5OUA1/cBfvr2RIS7vi62LdNj/urk1hfmj867I3qt6uZ7Q=="], + "bail": ["bail@2.0.2", "", {}, "sha512-0xO6mYd7JB2YesxDKplafRpsiOzPt9V02ddPCLbY1xYGPOX24NTyN50qnUxgCPcSoYMhKpAuBTjQoRZCAkUDRw=="], "balanced-match": ["balanced-match@1.0.2", "", {}, "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw=="], + "bare-events": ["bare-events@2.8.2", "", { "peerDependencies": { "bare-abort-controller": "*" }, "optionalPeers": ["bare-abort-controller"] }, "sha512-riJjyv1/mHLIPX4RwiK+oW9/4c3TEUeORHKefKAKnZ5kyslbN+HXowtbaVEqt4IMUB7OXlfixcs6gsFeo/jhiQ=="], + + "bare-fs": ["bare-fs@4.5.2", "", { "dependencies": { "bare-events": "^2.5.4", "bare-path": "^3.0.0", "bare-stream": "^2.6.4", "bare-url": "^2.2.2", "fast-fifo": "^1.3.2" }, "peerDependencies": { "bare-buffer": "*" }, "optionalPeers": ["bare-buffer"] }, "sha512-veTnRzkb6aPHOvSKIOy60KzURfBdUflr5VReI+NSaPL6xf+XLdONQgZgpYvUuZLVQ8dCqxpBAudaOM1+KpAUxw=="], + + "bare-os": ["bare-os@3.6.2", "", {}, "sha512-T+V1+1srU2qYNBmJCXZkUY5vQ0B4FSlL3QDROnKQYOqeiQR8UbjNHlPa+TIbM4cuidiN9GaTaOZgSEgsvPbh5A=="], + + "bare-path": ["bare-path@3.0.0", "", { "dependencies": { "bare-os": "^3.0.1" } }, "sha512-tyfW2cQcB5NN8Saijrhqn0Zh7AnFNsnczRcuWODH0eYAXBsJ5gVxAUuNr7tsHSC6IZ77cA0SitzT+s47kot8Mw=="], + + "bare-stream": ["bare-stream@2.7.0", "", { "dependencies": { "streamx": "^2.21.0" }, "peerDependencies": { "bare-buffer": "*", "bare-events": "*" }, "optionalPeers": ["bare-buffer", "bare-events"] }, "sha512-oyXQNicV1y8nc2aKffH+BUHFRXmx6VrPzlnaEvMhram0nPBrKcEdcyBg5r08D0i8VxngHFAiVyn1QKXpSG0B8A=="], + + "bare-url": ["bare-url@2.3.2", "", { "dependencies": { "bare-path": "^3.0.0" } }, "sha512-ZMq4gd9ngV5aTMa5p9+UfY0b3skwhHELaDkhEHetMdX0LRkW9kzaym4oo/Eh+Ghm0CCDuMTsRIGM/ytUc1ZYmw=="], + "base64-js": ["base64-js@1.5.1", "", {}, "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA=="], "base64id": ["base64id@2.0.0", "", {}, "sha512-lGe34o6EHj9y3Kts9R4ZYs/Gr+6N7MCaMlIFA3F1R2O5/m7K06AxfSeO5530PEERE6/WyEg3lsuyw4GHlPZHog=="], @@ -1559,6 +1590,8 @@ "basic-auth": ["basic-auth@2.0.1", "", { "dependencies": { "safe-buffer": "5.1.2" } }, "sha512-NF+epuEdnUYVlGuhaxbbq+dvJttwLnGY+YixlXlME5KpQ5W3CnXA5cVTneY3SPbPDRkcjMbifrwmFYcClgOZeg=="], + "basic-ftp": ["basic-ftp@5.0.5", "", {}, "sha512-4Bcg1P8xhUuqcii/S0Z9wiHIrQVPMermM1any+MX5GeGD7faD3/msQUDGLol9wOcz4/jbg/WJnGqoJF6LiBdtg=="], + "bcrypt-pbkdf": ["bcrypt-pbkdf@1.0.2", "", { "dependencies": { "tweetnacl": "^0.14.3" } }, "sha512-qeFIXtP4MSoi6NLqO12WfqARWWuCKi2Rn/9hJLEmtB5yTNr9DqFWkJRCf2qShWzPeAMRnOgCrq0sg/KLv5ES9w=="], "before-after-hook": ["before-after-hook@3.0.2", "", {}, "sha512-Nik3Sc0ncrMK4UUdXQmAnRtzmNQTAAXmXIopizwZ1W1t8QmfJj+zL4OA2I7XPTPW5z5TDqv4hRo/JzouDJnX3A=="], @@ -1601,6 +1634,8 @@ "buffer-from": ["buffer-from@1.1.2", "", {}, "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ=="], + "bufferutil": ["bufferutil@4.0.9", "", { "dependencies": { "node-gyp-build": "^4.3.0" } }, "sha512-WDtdLmJvAuNNPzByAYpRo2rF1Mmradw6gvWsQKf63476DDXmomT9zUiGypLcG4ibIM67vhAj8jJRdbmEws2Aqw=="], + "bufrw": ["bufrw@1.4.0", "", { "dependencies": { "ansi-color": "^0.2.1", "error": "^7.0.0", "hexer": "^1.5.0", "xtend": "^4.0.0" } }, "sha512-sWm8iPbqvL9+5SiYxXH73UOkyEbGQg7kyHQmReF89WJHQJw2eV4P/yZ0E+b71cczJ4pPobVhXxgQcmfSTgGHxQ=="], "buildcheck": ["buildcheck@0.0.7", "", {}, "sha512-lHblz4ahamxpTmnsk+MNTRWsjYKv965MwOrSJyeD588rR3Jcu7swE+0wN5F+PbL5cjgu/9ObkhfzEPuofEMwLA=="], @@ -1653,6 +1688,10 @@ "chownr": ["chownr@3.0.0", "", {}, "sha512-+IxzY9BZOQd/XuYPRmrvEVjF/nqj5kgT4kEq7VofrDoM1MxoRjEWkrCC3EtLi59TVawxTAn+orJwFQcrqEN1+g=="], + "chrome-launcher": ["chrome-launcher@1.2.1", "", { "dependencies": { "@types/node": "*", "escape-string-regexp": "^4.0.0", "is-wsl": "^2.2.0", "lighthouse-logger": "^2.0.1" }, "bin": { "print-chrome-path": "bin/print-chrome-path.cjs" } }, "sha512-qmFR5PLMzHyuNJHwOloHPAHhbaNglkfeV/xDtt5b7xiFFyU1I+AZZX0PYseMuhenJSSirgxELYIbswcoc+5H4A=="], + + "chromium-bidi": ["chromium-bidi@0.6.3", "", { "dependencies": { "mitt": "3.0.1", "urlpattern-polyfill": "10.0.0", "zod": "3.23.8" }, "peerDependencies": { "devtools-protocol": "*" } }, "sha512-qXlsCmpCZJAnoTYI83Iu6EdYQpMYdVkCfq08KDh2pmlVqK5t5IA9mGs4/LwCwp4fqisSOMXZxP3HIh8w8aRn0A=="], + "citty": ["citty@0.1.6", "", { "dependencies": { "consola": "^3.2.3" } }, "sha512-tskPPKEs8D2KPafUypv2gxwJP8h/OaJmC82QQGGDQcHvXX43xF2VDACcJVmZ0EuSxkpO9Kc4MlrA3q0+FG58AQ=="], "cjs-module-lexer": ["cjs-module-lexer@1.4.3", "", {}, "sha512-9z8TZaGM1pfswYeXrUpzPrkx8UnWYdhJclsiYMm6x/w5+nN+8Tf/LnAgfLGQCm59qAOxU8WwHEq2vNwF6i4j+Q=="], @@ -1713,6 +1752,8 @@ "consola": ["consola@3.4.2", "", {}, "sha512-5IKcdX0nnYavi6G7TtOhwkYzyjfJlatbjMjuLSfE2kYT5pMDOilZ4OvMhi637CcDICTmz3wARPoyhqyX1Y+XvA=="], + "console-table-printer": ["console-table-printer@2.15.0", "", { "dependencies": { "simple-wcswidth": "^1.1.2" } }, "sha512-SrhBq4hYVjLCkBVOWaTzceJalvn5K1Zq5aQA6wXC/cYjI3frKWNPEMK3sZsJfNNQApvCQmgBcc13ZKmFj8qExw=="], + "content-disposition": ["content-disposition@1.0.1", "", {}, "sha512-oIXISMynqSqm241k6kcQ5UwttDILMK4BiurCfGEREw6+X9jkkpEe5T9FZaApyLGGOnFuyMWZpdolTXMtvEJ08Q=="], "content-type": ["content-type@1.0.5", "", {}, "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA=="], @@ -1799,6 +1840,8 @@ "debug": ["debug@4.4.3", "", { "dependencies": { "ms": "^2.1.3" } }, "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA=="], + "decamelize": ["decamelize@1.2.0", "", {}, "sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA=="], + "decimal.js": ["decimal.js@10.6.0", "", {}, "sha512-YpgQiITW3JXGntzdUmyUR1V812Hn8T1YVXhCu+wO3OpS4eU9l4YdD3qjyiKdV6mvV29zapkMeD390UVEf2lkUg=="], "decode-named-character-reference": ["decode-named-character-reference@1.2.0", "", { "dependencies": { "character-entities": "^2.0.0" } }, "sha512-c6fcElNV6ShtZXmsgNgFFV5tVX2PaV4g+MOAkb8eXHvn6sryJBrZa9r0zV6+dtTyoCKxtDy5tyQ5ZwQuidtd+Q=="], @@ -1813,6 +1856,8 @@ "defu": ["defu@6.1.4", "", {}, "sha512-mEQCMmwJu317oSz8CwdIOdwf3xMif1ttiM8LTufzc3g6kR+9Pe236twL8j3IYT1F7GfRgGcW6MWxzZjLIkuHIg=="], + "degenerator": ["degenerator@5.0.1", "", { "dependencies": { "ast-types": "^0.13.4", "escodegen": "^2.1.0", "esprima": "^4.0.1" } }, "sha512-TllpMR/t0M5sqCXfj85i4XaAzxmS5tVA16dqvdkMwGmzI+dXLXnw3J+3Vdv7VKw+ThlTMboK6i9rnZ6Nntj5CQ=="], + "delayed-stream": ["delayed-stream@1.0.0", "", {}, "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ=="], "denque": ["denque@2.1.0", "", {}, "sha512-HVQE3AAb/pxF8fQAoiqpvg9i3evqug3hoiwakOyZAwJm+6vZehbkYXZ0l4JxS+I3QxM97v5aaRNhj8v5oBhekw=="], @@ -1835,8 +1880,6 @@ "didyoumean": ["didyoumean@1.2.2", "", {}, "sha512-gxtyfqMg7GKyhQmb056K7M3xszy/myH8w+B4RT+QXBQsvAOdc3XymqDDPHx1BgPgsdAA5SIifona89YtRATDzw=="], - "diff-match-patch": ["diff-match-patch@1.0.5", "", {}, "sha512-IayShXAgj/QMXgB0IWmKx+rOPuGMhqm5w6jvFxmVenXKIzRqTAAsbBPT3kWQeGANj3jGgvcvv4yK6SxqYmikgw=="], - "dingbat-to-unicode": ["dingbat-to-unicode@1.0.1", "", {}, "sha512-98l0sW87ZT58pU4i61wa2OHwxbiYSbuxsCBozaVnYX2iCnr3bLM3fIes1/ej7h1YdOKuKt/MLs706TVnALA65w=="], "dlv": ["dlv@1.1.3", "", {}, "sha512-+HlytyjlPKnIG8XuRG8WvmBP8xs8P71y+SKKS6ZXWoEgLuePxtDoUEiH7WkdePWrQ5JBpE6aoVqfZfJUQkjXwA=="], @@ -1931,10 +1974,14 @@ "escape-html": ["escape-html@1.0.3", "", {}, "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow=="], - "escape-string-regexp": ["escape-string-regexp@1.0.5", "", {}, "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg=="], + "escape-string-regexp": ["escape-string-regexp@4.0.0", "", {}, "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA=="], + + "escodegen": ["escodegen@2.1.0", "", { "dependencies": { "esprima": "^4.0.1", "estraverse": "^5.2.0", "esutils": "^2.0.2" }, "optionalDependencies": { "source-map": "~0.6.1" }, "bin": { "esgenerate": "bin/esgenerate.js", "escodegen": "bin/escodegen.js" } }, "sha512-2NlIDTwUWJN0mRPQOdtQBzbUHvdGY2P1VXSyU83Q3xKxM7WHX2Ql8dKq782Q9TgQUNOLEzEYu9bzLNj1q88I5w=="], "esprima": ["esprima@4.0.1", "", { "bin": { "esparse": "./bin/esparse.js", "esvalidate": "./bin/esvalidate.js" } }, "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A=="], + "estraverse": ["estraverse@5.3.0", "", {}, "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA=="], + "estree-util-attach-comments": ["estree-util-attach-comments@3.0.0", "", { "dependencies": { "@types/estree": "^1.0.0" } }, "sha512-cKUwm/HUcTDsYh/9FgnuFqpfquUbwIqwKM26BVCGDPVgvaCl/nDCCjUfiLlx6lsEZ3Z4RFxNbOQ60pkaEwFxGw=="], "estree-util-build-jsx": ["estree-util-build-jsx@3.0.1", "", { "dependencies": { "@types/estree-jsx": "^1.0.0", "devlop": "^1.0.0", "estree-util-is-identifier-name": "^3.0.0", "estree-walker": "^3.0.0" } }, "sha512-8U5eiL6BTrPxp/CHbs2yMgP8ftMhR5ww1eIKoWRMlqvltHF8fZn5LRDvTKuxD3DUn+shRbLGqXemcP51oFCsGQ=="], @@ -1951,6 +1998,8 @@ "estree-walker": ["estree-walker@3.0.3", "", { "dependencies": { "@types/estree": "^1.0.0" } }, "sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g=="], + "esutils": ["esutils@2.0.3", "", {}, "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g=="], + "etag": ["etag@1.8.1", "", {}, "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg=="], "event-target-shim": ["event-target-shim@5.0.1", "", {}, "sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ=="], @@ -1959,6 +2008,8 @@ "events": ["events@3.3.0", "", {}, "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q=="], + "events-universal": ["events-universal@1.0.1", "", { "dependencies": { "bare-events": "^2.7.0" } }, "sha512-LUd5euvbMLpwOF8m6ivPCbhQeSiYVNb8Vs0fQ8QjXo0JTkEHpz8pxdQf0gStltaPpw0Cca8b39KxvK9cfKRiAw=="], + "eventsource": ["eventsource@3.0.7", "", { "dependencies": { "eventsource-parser": "^3.0.1" } }, "sha512-CRT1WTyuQoD771GW56XEZFQ/ZoSfWid1alKGDYMmkt2yl8UXrVR4pspqWNEcqKvVIzg6PAltWjxcSSPrboA4iA=="], "eventsource-parser": ["eventsource-parser@3.0.6", "", {}, "sha512-Vo1ab+QXPzZ4tCa8SwIHJFaSzy4R6SHf7BY79rFBDf0idraZWAkYrDjDj8uWaSm3S2TK+hJ7/t1CEmZ7jXw+pg=="], @@ -1979,6 +2030,8 @@ "extend-shallow": ["extend-shallow@2.0.1", "", { "dependencies": { "is-extendable": "^0.1.0" } }, "sha512-zCnTtlxNoAiDc3gqY2aYAWFx7XWWiasuF2K8Me5WbN8otHKTUKBwjPtNpRs/rbUZm7KxWAaNj7P1a/p52GbVug=="], + "extract-zip": ["extract-zip@2.0.1", "", { "dependencies": { "debug": "^4.1.1", "get-stream": "^5.1.0", "yauzl": "^2.10.0" }, "optionalDependencies": { "@types/yauzl": "^2.9.1" }, "bin": { "extract-zip": "cli.js" } }, "sha512-GDhU9ntwuKyGXdZBUgTIe+vXnWj0fppUEtMDL0+idd5Sta8TGpHssn/eusA9mrPr9qNDym6SxAYZjNvCn/9RBg=="], + "fast-check": ["fast-check@3.23.2", "", { "dependencies": { "pure-rand": "^6.1.0" } }, "sha512-h5+1OzzfCC3Ef7VbtKdcv7zsstUQwUDlYpUTvjeUsJAssPgLn7QzbboPtL5ro04Mq0rPOsMzl7q5hIbRs2wD1A=="], "fast-content-type-parse": ["fast-content-type-parse@2.0.1", "", {}, "sha512-nGqtvLrj5w0naR6tDPfB4cUmYCqouzyQiz6C5y/LtcDllJdrcc6WaWW6iXyIIOErTa/XRybj28aasdn4LkVk6Q=="], @@ -1987,6 +2040,8 @@ "fast-deep-equal": ["fast-deep-equal@3.1.3", "", {}, "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q=="], + "fast-fifo": ["fast-fifo@1.3.2", "", {}, "sha512-/d9sfos4yxzpwkDkuN7k2SqFKtYNmCTzgfEpz82x34IM9/zc8KGxQoXg1liNC/izpRM/MBdt44Nmx41ZWqk+FQ=="], + "fast-glob": ["fast-glob@3.3.3", "", { "dependencies": { "@nodelib/fs.stat": "^2.0.2", "@nodelib/fs.walk": "^1.2.3", "glob-parent": "^5.1.2", "merge2": "^1.3.0", "micromatch": "^4.0.8" } }, "sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg=="], "fast-json-stable-stringify": ["fast-json-stable-stringify@2.1.0", "", {}, "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw=="], @@ -1997,6 +2052,8 @@ "fastq": ["fastq@1.19.1", "", { "dependencies": { "reusify": "^1.0.4" } }, "sha512-GwLTyxkCXjXbxqIhTsMI2Nui8huMPtnxg7krajPJAjnEG/iiOS7i+zCtWGZR9G0NBKbXKh6X9m9UIsYX/N6vvQ=="], + "fd-slicer": ["fd-slicer@1.1.0", "", { "dependencies": { "pend": "~1.2.0" } }, "sha512-cE1qsB/VwyQozZ+q1dGxR8LBYNZeofhEdUNGSMbQD3Gw2lAzX9Zb3uIU6Ebc/Fmyjo9AWWfnn0AUCHqtevs/8g=="], + "fdir": ["fdir@6.5.0", "", { "peerDependencies": { "picomatch": "^3 || ^4" }, "optionalPeers": ["picomatch"] }, "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg=="], "fetch-blob": ["fetch-blob@3.2.0", "", { "dependencies": { "node-domexception": "^1.0.0", "web-streams-polyfill": "^3.0.3" } }, "sha512-7yAQpD2UMJzLi1Dqv7qFYnPbaPx7ZfFK6PiIxQ4PfkGPyNyl2Ugx+a/umUonmKqjhM4DnfbMvdX6otXq83soQQ=="], @@ -2073,6 +2130,8 @@ "get-tsconfig": ["get-tsconfig@4.13.0", "", { "dependencies": { "resolve-pkg-maps": "^1.0.0" } }, "sha512-1VKTZJCwBrvbd+Wn3AOgQP/2Av+TfTCOlE4AcRJE72W1ksZXbAx8PPBR9RzgTeSPzlPMHrbANMH3LbltH73wxQ=="], + "get-uri": ["get-uri@6.0.5", "", { "dependencies": { "basic-ftp": "^5.0.2", "data-uri-to-buffer": "^6.0.2", "debug": "^4.3.4" } }, "sha512-b1O07XYq8eRuVzBNgJLstU6FYc1tS6wnMtF1I1D9lE8LxZSOGZ7LhxN54yPP6mGw5f2CkXY2BQUL9Fx41qvcIg=="], + "giget": ["giget@2.0.0", "", { "dependencies": { "citty": "^0.1.6", "consola": "^3.4.0", "defu": "^6.1.4", "node-fetch-native": "^1.6.6", "nypm": "^0.6.0", "pathe": "^2.0.3" }, "bin": { "giget": "dist/cli.mjs" } }, "sha512-L5bGsVkxJbJgdnwyuheIunkGatUF/zssUoxxjACCseZYAVbaqdh9Tsmmlkl8vYan09H7sbvKt4pS8GqKLBrEzA=="], "github-slugger": ["github-slugger@2.0.0", "", {}, "sha512-IaOQ9puYtjrkq7Y0Ygl9KDZnrf/aiUJYUpVf89y8kyaxbRG7Y1SrX/jaumrv81vc61+kiMempujsM3Yw7w5qcw=="], @@ -2177,6 +2236,8 @@ "ioredis": ["ioredis@5.8.2", "", { "dependencies": { "@ioredis/commands": "1.4.0", "cluster-key-slot": "^1.1.0", "debug": "^4.3.4", "denque": "^2.1.0", "lodash.defaults": "^4.2.0", "lodash.isarguments": "^3.1.0", "redis-errors": "^1.2.0", "redis-parser": "^3.0.0", "standard-as-callback": "^2.1.0" } }, "sha512-C6uC+kleiIMmjViJINWk80sOQw5lEzse1ZmvD+S/s8p8CWapftSaC+kocGTx6xrbrJ4WmYQGC08ffHLr6ToR6Q=="], + "ip-address": ["ip-address@10.1.0", "", {}, "sha512-XXADHxXmvT9+CRxhXg56LJovE+bmWnEWB78LB83VZTprKTmaC5QfruXocxzTZ2Kl0DNwKuBdlIhjL8LeY8Sf8Q=="], + "ipaddr.js": ["ipaddr.js@1.9.1", "", {}, "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g=="], "is-alphabetical": ["is-alphabetical@2.0.1", "", {}, "sha512-FWyyY60MeTNyeSRpkM2Iry0G9hpr7/9kD40mD/cGQEuilcZYS4okz8SN2Q6rLCJ8gbCt6fN+rC+6tMGS99LaxQ=="], @@ -2191,6 +2252,8 @@ "is-decimal": ["is-decimal@2.0.1", "", {}, "sha512-AAB9hiomQs5DXWcRB1rqsxGUstbRroFOPPVAomNk/3XHR5JyEZChOyTWe2oayKnsSsr/kcGqF+z6yuH6HHpN0A=="], + "is-docker": ["is-docker@2.2.1", "", { "bin": { "is-docker": "cli.js" } }, "sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ=="], + "is-extendable": ["is-extendable@0.1.1", "", {}, "sha512-5BMULNob1vgFX6EjQw5izWDxrecWK9AM72rugNr0TFldMOi0fj6Jk+zeKIt0xGj4cEfQIJth4w3OKWOJ4f+AFw=="], "is-extglob": ["is-extglob@2.1.1", "", {}, "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ=="], @@ -2221,6 +2284,8 @@ "is-what": ["is-what@5.5.0", "", {}, "sha512-oG7cgbmg5kLYae2N5IVd3jm2s+vldjxJzK1pcu9LfpGuQ93MQSzo0okvRna+7y5ifrD+20FE8FvjusyGaz14fw=="], + "is-wsl": ["is-wsl@2.2.0", "", { "dependencies": { "is-docker": "^2.0.0" } }, "sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww=="], + "isarray": ["isarray@1.0.0", "", {}, "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ=="], "isexe": ["isexe@2.0.0", "", {}, "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw=="], @@ -2263,8 +2328,6 @@ "json5": ["json5@2.2.3", "", { "bin": { "json5": "lib/cli.js" } }, "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg=="], - "jsondiffpatch": ["jsondiffpatch@0.6.0", "", { "dependencies": { "@types/diff-match-patch": "^1.0.36", "chalk": "^5.3.0", "diff-match-patch": "^1.0.5" }, "bin": { "jsondiffpatch": "bin/jsondiffpatch.js" } }, "sha512-3QItJOXp2AP1uv7waBkao5nCvhEv+QmJAd38Ybq7wNI74Q+BBmnLn4EDKz6yI9xGAIQoUF87qHt+kc1IVxB4zQ=="], - "jsonwebtoken": ["jsonwebtoken@9.0.3", "", { "dependencies": { "jws": "^4.0.1", "lodash.includes": "^4.3.0", "lodash.isboolean": "^3.0.3", "lodash.isinteger": "^4.0.4", "lodash.isnumber": "^3.0.3", "lodash.isplainobject": "^4.0.6", "lodash.isstring": "^4.0.1", "lodash.once": "^4.0.0", "ms": "^2.1.1", "semver": "^7.5.4" } }, "sha512-MT/xP0CrubFRNLNKvxJ2BYfy53Zkm++5bX9dtuPbqAeQpTVe0MQTFhao8+Cp//EmJp244xt6Drw/GVEGCUj40g=="], "jszip": ["jszip@3.10.1", "", { "dependencies": { "lie": "~3.3.0", "pako": "~1.0.2", "readable-stream": "~2.3.6", "setimmediate": "^1.0.5" } }, "sha512-xXDvecyTpGLrqFrvkrUSoxxfJI5AH7U8zxxtVclpsUtMCq4JQ290LY8AW5c7Ggnr/Y/oK+bQMbqK2qmtk3pN4g=="], @@ -2281,10 +2344,14 @@ "kysely": ["kysely@0.28.8", "", {}, "sha512-QUOgl5ZrS9IRuhq5FvOKFSsD/3+IA6MLE81/bOOTRA/YQpKDza2sFdN5g6JCB9BOpqMJDGefLCQ9F12hRS13TA=="], + "langsmith": ["langsmith@0.3.85", "", { "dependencies": { "@types/uuid": "^10.0.0", "chalk": "^4.1.2", "console-table-printer": "^2.12.1", "p-queue": "^6.6.2", "semver": "^7.6.3", "uuid": "^10.0.0" }, "peerDependencies": { "@opentelemetry/api": "*", "@opentelemetry/exporter-trace-otlp-proto": "*", "@opentelemetry/sdk-trace-base": "*", "openai": "*" }, "optionalPeers": ["@opentelemetry/api", "@opentelemetry/exporter-trace-otlp-proto", "@opentelemetry/sdk-trace-base", "openai"] }, "sha512-Txuaxnpcra57qld4+hkqHhd9L2D6G6kEAReWXdr/sddxPu6ycBHXStqDciituC642lJmzPdarrYtll2vSwMbnQ=="], + "leac": ["leac@0.6.0", "", {}, "sha512-y+SqErxb8h7nE/fiEX07jsbuhrpO9lL8eca7/Y1nuWV2moNlXhyd59iDGcRf6moVyDMbmTNzL40SUyrFU/yDpg=="], "lie": ["lie@3.3.0", "", { "dependencies": { "immediate": "~3.0.5" } }, "sha512-UaiMJzeWRlEujzAuw5LokY1L5ecNQYZKfmyZ9L7wDHb/p5etKaxXhohBcrw0EYby+G/NA52vRSN4N39dxHAIwQ=="], + "lighthouse-logger": ["lighthouse-logger@2.0.2", "", { "dependencies": { "debug": "^4.4.1", "marky": "^1.2.2" } }, "sha512-vWl2+u5jgOQuZR55Z1WM0XDdrJT6mzMP8zHUct7xTlWhuQs+eV0g+QL0RQdFjT54zVmbhLCP8vIVpy1wGn/gCg=="], + "lightningcss": ["lightningcss@1.30.2", "", { "dependencies": { "detect-libc": "^2.0.3" }, "optionalDependencies": { "lightningcss-android-arm64": "1.30.2", "lightningcss-darwin-arm64": "1.30.2", "lightningcss-darwin-x64": "1.30.2", "lightningcss-freebsd-x64": "1.30.2", "lightningcss-linux-arm-gnueabihf": "1.30.2", "lightningcss-linux-arm64-gnu": "1.30.2", "lightningcss-linux-arm64-musl": "1.30.2", "lightningcss-linux-x64-gnu": "1.30.2", "lightningcss-linux-x64-musl": "1.30.2", "lightningcss-win32-arm64-msvc": "1.30.2", "lightningcss-win32-x64-msvc": "1.30.2" } }, "sha512-utfs7Pr5uJyyvDETitgsaqSyjCb2qNRAtuqUeWIAKztsOYdcACf2KtARYXg2pSvhkt+9NfoaNY7fxjl6nuMjIQ=="], "lightningcss-android-arm64": ["lightningcss-android-arm64@1.30.2", "", { "os": "android", "cpu": "arm64" }, "sha512-BH9sEdOCahSgmkVhBLeU7Hc9DWeZ1Eb6wNS6Da8igvUwAe0sqROHddIlvU06q3WyXVEOYDZ6ykBZQnjTbmo4+A=="], @@ -2375,6 +2442,8 @@ "marked": ["marked@7.0.4", "", { "bin": { "marked": "bin/marked.js" } }, "sha512-t8eP0dXRJMtMvBojtkcsA7n48BkauktUKzfkPSCq85ZMTJ0v76Rke4DYz01omYpPTUh4p/f7HePgRo3ebG8+QQ=="], + "marky": ["marky@1.3.0", "", {}, "sha512-ocnPZQLNpvbedwTy9kNrQEsknEfgvcLMvOtz3sFeWApDq1MXH1TqkCIx58xlpESsfwQOnuBO9beyQuNGzVvuhQ=="], + "math-intrinsics": ["math-intrinsics@1.1.0", "", {}, "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g=="], "md-to-react-email": ["md-to-react-email@5.0.5", "", { "dependencies": { "marked": "7.0.4" }, "peerDependencies": { "react": "^18.0 || ^19.0" } }, "sha512-OvAXqwq57uOk+WZqFFNCMZz8yDp8BD3WazW1wAKHUrPbbdr89K9DWS6JXY09vd9xNdPNeurI8DU/X4flcfaD8A=="], @@ -2519,6 +2588,8 @@ "minizlib": ["minizlib@3.1.0", "", { "dependencies": { "minipass": "^7.1.2" } }, "sha512-KZxYo1BUkWD2TVFLr0MQoM8vUUigWD3LlD83a/75BqC+4qE0Hb1Vo5v1FgcfaNXvfXzr+5EhQ6ing/CaBijTlw=="], + "mitt": ["mitt@3.0.1", "", {}, "sha512-vKivATfr97l2/QBCYAkXYDbrIWPM2IIKEl7YPhjCvKlG3kE2gm+uBo6nEXK3M5/Ffh/FLpKExzOQ3JJoJGFKBw=="], + "mlly": ["mlly@1.8.0", "", { "dependencies": { "acorn": "^8.15.0", "pathe": "^2.0.3", "pkg-types": "^1.3.1", "ufo": "^1.6.1" } }, "sha512-l8D9ODSRWLe2KHJSifWGwBqpTZXIXTeo8mlKjY+E2HAakaTeNpqAyBZ8GSqLzHgw4XmHmC8whvpjJNMbFZN7/g=="], "mnemonist": ["mnemonist@0.38.3", "", { "dependencies": { "obliterator": "^1.6.1" } }, "sha512-2K9QYubXx/NAjv4VLq1d1Ly8pWNC5L3BrixtdkyTegXWJIqY+zLNDhhX/A+ZwWt70tB1S8H4BE8FLYEFyNoOBw=="], @@ -2535,6 +2606,8 @@ "ms": ["ms@2.1.3", "", {}, "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA=="], + "mustache": ["mustache@4.2.0", "", { "bin": { "mustache": "bin/mustache" } }, "sha512-71ippSywq5Yb7/tVYyGbkBggbU8H3u5Rz56fH60jGFgr8uHwxs+aSKeqmluIVzM0m0kB7xQjKS6qPfd0b2ZoqQ=="], + "mute-stream": ["mute-stream@0.0.8", "", {}, "sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA=="], "mysql2": ["mysql2@3.14.3", "", { "dependencies": { "aws-ssl-profiles": "^1.1.1", "denque": "^2.1.0", "generate-function": "^2.3.1", "iconv-lite": "^0.6.3", "long": "^5.2.1", "lru.min": "^1.0.0", "named-placeholders": "^1.1.3", "seq-queue": "^0.0.5", "sqlstring": "^2.3.2" } }, "sha512-fD6MLV8XJ1KiNFIF0bS7Msl8eZyhlTDCDl75ajU5SJtpdx9ZPEACulJcqJWr1Y8OYyxsFc4j3+nflpmhxCU5aQ=="], @@ -2559,6 +2632,8 @@ "neo4j-driver-core": ["neo4j-driver-core@6.0.1", "", {}, "sha512-5I2KxICAvcHxnWdJyDqwu8PBAQvWVTlQH2ve3VQmtVdJScPqWhpXN1PiX5IIl+cRF3pFpz9GQF53B5n6s0QQUQ=="], + "netmask": ["netmask@2.0.2", "", {}, "sha512-dBpDMdxv9Irdq66304OLfEmQ9tbNRFnFTuZiLo+bD+r332bBmMJ8GBLXklIXXgxd3+v9+KUnZaUR5PJMa75Gsg=="], + "next": ["next@16.0.7", "", { "dependencies": { "@next/env": "16.0.7", "@swc/helpers": "0.5.15", "caniuse-lite": "^1.0.30001579", "postcss": "8.4.31", "styled-jsx": "5.1.6" }, "optionalDependencies": { "@next/swc-darwin-arm64": "16.0.7", "@next/swc-darwin-x64": "16.0.7", "@next/swc-linux-arm64-gnu": "16.0.7", "@next/swc-linux-arm64-musl": "16.0.7", "@next/swc-linux-x64-gnu": "16.0.7", "@next/swc-linux-x64-musl": "16.0.7", "@next/swc-win32-arm64-msvc": "16.0.7", "@next/swc-win32-x64-msvc": "16.0.7", "sharp": "^0.34.4" }, "peerDependencies": { "@opentelemetry/api": "^1.1.0", "@playwright/test": "^1.51.1", "babel-plugin-react-compiler": "*", "react": "^18.2.0 || 19.0.0-rc-de68d2f4-20241204 || ^19.0.0", "react-dom": "^18.2.0 || 19.0.0-rc-de68d2f4-20241204 || ^19.0.0", "sass": "^1.3.0" }, "optionalPeers": ["@opentelemetry/api", "@playwright/test", "babel-plugin-react-compiler", "sass"], "bin": { "next": "dist/bin/next" } }, "sha512-3mBRJyPxT4LOxAJI6IsXeFtKfiJUbjCLgvXO02fV8Wy/lIhPvP94Fe7dGhUgHXcQy4sSuYwQNcOLhIfOm0rL0A=="], "next-mdx-remote": ["next-mdx-remote@5.0.0", "", { "dependencies": { "@babel/code-frame": "^7.23.5", "@mdx-js/mdx": "^3.0.1", "@mdx-js/react": "^3.0.1", "unist-util-remove": "^3.1.0", "vfile": "^6.0.1", "vfile-matter": "^5.0.0" }, "peerDependencies": { "react": ">=16" } }, "sha512-RNNbqRpK9/dcIFZs/esQhuLA8jANqlH694yqoDBK8hkVdJUndzzGmnPHa2nyi90N4Z9VmzuSWNRpr5ItT3M7xQ=="], @@ -2577,6 +2652,8 @@ "node-forge": ["node-forge@1.3.3", "", {}, "sha512-rLvcdSyRCyouf6jcOIPe/BgwG/d7hKjzMKOas33/pHEr6gbq18IK9zV7DiPvzsz0oBJPme6qr6H6kGZuI9/DZg=="], + "node-gyp-build": ["node-gyp-build@4.8.4", "", { "bin": { "node-gyp-build": "bin.js", "node-gyp-build-optional": "optional.js", "node-gyp-build-test": "build-test.js" } }, "sha512-LA4ZjwlnUblHVgq0oBF3Jl/6h/Nvs5fzBLwdEF4nuxnFdsfajde4WfxtJr3CaiH+F6ewcIB/q4jQ4UzPyid+CQ=="], + "node-int64": ["node-int64@0.4.0", "", {}, "sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw=="], "node-releases": ["node-releases@2.0.27", "", {}, "sha512-nmh3lCkYZ3grZvqcCH+fjmQ7X+H0OeZgP40OierEaAptX4XofMh5kwNbWh7lBduUzCcV/8kZ+NDLCwm2iorIlA=="], @@ -2613,7 +2690,7 @@ "ohash": ["ohash@2.0.11", "", {}, "sha512-RdR9FQrFwNBNXAr4GixM8YaRZRJ5PUWbKYbE5eOsrwAjJW0q2REGcf79oYPsLyskQCZG1PLN+S/K1V00joZAoQ=="], - "ollama-ai-provider": ["ollama-ai-provider@1.2.0", "", { "dependencies": { "@ai-sdk/provider": "^1.0.0", "@ai-sdk/provider-utils": "^2.0.0", "partial-json": "0.1.7" }, "peerDependencies": { "zod": "^3.0.0" }, "optionalPeers": ["zod"] }, "sha512-jTNFruwe3O/ruJeppI/quoOUxG7NA6blG3ZyQj3lei4+NnJo7bi3eIRWqlVpRlu/mbzbFXeJSBuYQWF6pzGKww=="], + "ollama-ai-provider-v2": ["ollama-ai-provider-v2@1.5.5", "", { "dependencies": { "@ai-sdk/provider": "^2.0.0", "@ai-sdk/provider-utils": "^3.0.17" }, "peerDependencies": { "zod": "^4.0.16" } }, "sha512-1YwTFdPjhPNHny/DrOHO+s8oVGGIE5Jib61/KnnjPRNWQhVVimrJJdaAX3e6nNRRDXrY5zbb9cfm2+yVvgsrqw=="], "on-exit-leak-free": ["on-exit-leak-free@2.1.2", "", {}, "sha512-0eJJY6hXLGf1udHwfNftBqH+g73EU4B504nZeKpz1sYRKafAghwxEJunB2O7rDZkL4PGfsMVnTXZ2EjibbqcsA=="], @@ -2641,6 +2718,18 @@ "ora": ["ora@8.2.0", "", { "dependencies": { "chalk": "^5.3.0", "cli-cursor": "^5.0.0", "cli-spinners": "^2.9.2", "is-interactive": "^2.0.0", "is-unicode-supported": "^2.0.0", "log-symbols": "^6.0.0", "stdin-discarder": "^0.2.2", "string-width": "^7.2.0", "strip-ansi": "^7.1.0" } }, "sha512-weP+BZ8MVNnlCm8c0Qdc1WSWq4Qn7I+9CJGm7Qali6g44e/PUzbjNqJX5NJ9ljlNMosfJvg1fKEGILklK9cwnw=="], + "p-finally": ["p-finally@1.0.0", "", {}, "sha512-LICb2p9CB7FS+0eR1oqWnHhp0FljGLZCWBE9aix0Uye9W8LTQPwMTYVGWQWIw9RdQiDg4+epXQODwIYJtSJaow=="], + + "p-queue": ["p-queue@6.6.2", "", { "dependencies": { "eventemitter3": "^4.0.4", "p-timeout": "^3.2.0" } }, "sha512-RwFpb72c/BhQLEXIZ5K2e+AhgNVmIejGlTgiB9MzZ0e93GRvqZ7uSi0dvRF7/XIXDeNkra2fNHBxTyPDGySpjQ=="], + + "p-retry": ["p-retry@4.6.2", "", { "dependencies": { "@types/retry": "0.12.0", "retry": "^0.13.1" } }, "sha512-312Id396EbJdvRONlngUx0NydfrIQ5lsYu0znKVUzVvArzEIt08V1qhtyESbGVd1FGX7UKtiFp5uwKZdM8wIuQ=="], + + "p-timeout": ["p-timeout@3.2.0", "", { "dependencies": { "p-finally": "^1.0.0" } }, "sha512-rhIwUycgwwKcP9yTOOFK/AKsAopjjCakVqLHePO3CC6Mir1Z99xT+R63jZxAT5lFZLa2inS5h+ZS2GvR99/FBg=="], + + "pac-proxy-agent": ["pac-proxy-agent@7.2.0", "", { "dependencies": { "@tootallnate/quickjs-emscripten": "^0.23.0", "agent-base": "^7.1.2", "debug": "^4.3.4", "get-uri": "^6.0.1", "http-proxy-agent": "^7.0.0", "https-proxy-agent": "^7.0.6", "pac-resolver": "^7.0.1", "socks-proxy-agent": "^8.0.5" } }, "sha512-TEB8ESquiLMc0lV8vcd5Ql/JAKAoyzHFXaStwjkzpOpC5Yv+pIzLfHvjTSdf3vpa2bMiUQrg9i6276yn8666aA=="], + + "pac-resolver": ["pac-resolver@7.0.1", "", { "dependencies": { "degenerator": "^5.0.0", "netmask": "^2.0.2" } }, "sha512-5NPgf87AT2STgwa2ntRMr45jTKrYBGkVU36yT0ig/n/GMAa3oPqhZfIQ2kMEimReg0+t9kZViDVZ83qfVUlckg=="], + "package-json-from-dist": ["package-json-from-dist@1.0.1", "", {}, "sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw=="], "pako": ["pako@1.0.11", "", {}, "sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw=="], @@ -2663,7 +2752,7 @@ "parseurl": ["parseurl@1.3.3", "", {}, "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ=="], - "partial-json": ["partial-json@0.1.7", "", {}, "sha512-Njv/59hHaokb/hRUjce3Hdv12wd60MtM9Z5Olmn+nehe0QDAsRtRbJPvJ0Z91TusF0SuZRIvnM+S4l6EIP8leA=="], + "patchright-core": ["patchright-core@1.57.0", "", { "bin": { "patchright-core": "cli.js" } }, "sha512-um/9Wue7IFAa9UDLacjNgDn62ub5GJe1b1qouvYpELIF9rsFVMNhRo/rRXYajupLwp5xKJ0sSjOV6sw8/HarBQ=="], "path-is-absolute": ["path-is-absolute@1.0.1", "", {}, "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg=="], @@ -2763,12 +2852,16 @@ "proxy-addr": ["proxy-addr@2.0.7", "", { "dependencies": { "forwarded": "0.2.0", "ipaddr.js": "1.9.1" } }, "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg=="], + "proxy-agent": ["proxy-agent@6.5.0", "", { "dependencies": { "agent-base": "^7.1.2", "debug": "^4.3.4", "http-proxy-agent": "^7.0.1", "https-proxy-agent": "^7.0.6", "lru-cache": "^7.14.1", "pac-proxy-agent": "^7.1.0", "proxy-from-env": "^1.1.0", "socks-proxy-agent": "^8.0.5" } }, "sha512-TmatMXdr2KlRiA2CyDu8GqR8EjahTG3aY3nXjdzFyoZbmB8hrBsTyMezhULIXKnC0jpfjlmiZ3+EaCzoInSu/A=="], + "proxy-from-env": ["proxy-from-env@1.1.0", "", {}, "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg=="], "pump": ["pump@3.0.3", "", { "dependencies": { "end-of-stream": "^1.1.0", "once": "^1.3.1" } }, "sha512-todwxLMY7/heScKmntwQG8CXVkWUOdYxIvY2s0VWAAMh/nd8SoYiRaKjlr7+iCs984f2P8zvrfWcDDYVb73NfA=="], "punycode": ["punycode@2.3.1", "", {}, "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg=="], + "puppeteer-core": ["puppeteer-core@22.15.0", "", { "dependencies": { "@puppeteer/browsers": "2.3.0", "chromium-bidi": "0.6.3", "debug": "^4.3.6", "devtools-protocol": "0.0.1312386", "ws": "^8.18.0" } }, "sha512-cHArnywCiAAVXa3t4GGL2vttNxh7GqXtIYGym99egkNJ3oG//wL9LkvO4WE8W1TJe95t1F1ocu9X4xWaGsOKOA=="], + "pure-rand": ["pure-rand@6.1.0", "", {}, "sha512-bVWawvoZoBYpp6yIoQtQXHZjmz35RSVHnUOTefl8Vcjr8snTPY1wnpSPMWekcFwbxI6gtmT7rSYPFvz71ldiOA=="], "pvtsutils": ["pvtsutils@1.3.6", "", { "dependencies": { "tslib": "^2.8.1" } }, "sha512-PLgQXQ6H2FWCaeRak8vvk1GW462lMxB5s3Jm673N82zI4vqtVUPuZdffdZbPDFRoU8kAhItWFtPCWiPpp4/EDg=="], @@ -2881,6 +2974,8 @@ "restore-cursor": ["restore-cursor@3.1.0", "", { "dependencies": { "onetime": "^5.1.0", "signal-exit": "^3.0.2" } }, "sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA=="], + "retry": ["retry@0.13.1", "", {}, "sha512-XQBQ3I8W1Cge0Seh+6gjj03LbmRFWuoszgK9ooCpwYIrhhoO80pfq4cUkU5DkknwfOfFteRwlZ56PYOGYyFWdg=="], + "reusify": ["reusify@1.1.0", "", {}, "sha512-g6QUff04oZpHs0eG5p83rFLhHeV00ug/Yf9nZM6fLeUrPguBTkTQOdpAWWspMh55TZfVQDPaN3NQJfbVRAxdIw=="], "rfdc": ["rfdc@1.4.1", "", {}, "sha512-q1b3N5QkRUWUl7iyylaaj3kOpIT0N2i9MqIEQXP73GVsN9cw3fdx8X63cEmWhJGi2PPCF23Ijp7ktmd39rawIA=="], @@ -2973,6 +3068,8 @@ "simple-swizzle": ["simple-swizzle@0.2.4", "", { "dependencies": { "is-arrayish": "^0.3.1" } }, "sha512-nAu1WFPQSMNr2Zn9PGSZK9AGn4t/y97lEm+MXTtUDwfP0ksAIX4nO+6ruD9Jwut4C49SB1Ws+fbXsm/yScWOHw=="], + "simple-wcswidth": ["simple-wcswidth@1.1.2", "", {}, "sha512-j7piyCjAeTDSjzTSQ7DokZtMNwNlEAyxqSZeCS+CXH7fJ4jx3FuJ/mTW3mE+6JLs4VJBbcll0Kjn+KXI5t21Iw=="], + "simstudio": ["simstudio@workspace:packages/cli"], "simstudio-ts-sdk": ["simstudio-ts-sdk@workspace:packages/ts-sdk"], @@ -2983,6 +3080,8 @@ "slug": ["slug@6.1.0", "", {}, "sha512-x6vLHCMasg4DR2LPiyFGI0gJJhywY6DTiGhCrOMzb3SOk/0JVLIaL4UhyFSHu04SD3uAavrKY/K3zZ3i6iRcgA=="], + "smart-buffer": ["smart-buffer@4.2.0", "", {}, "sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg=="], + "socket.io": ["socket.io@4.8.1", "", { "dependencies": { "accepts": "~1.3.4", "base64id": "~2.0.0", "cors": "~2.8.5", "debug": "~4.3.2", "engine.io": "~6.6.0", "socket.io-adapter": "~2.5.2", "socket.io-parser": "~4.2.4" } }, "sha512-oZ7iUCxph8WYRHHcjBEc9unw3adt5CmSNlppj/5Q4k2RIrhl8Z5yY2Xr4j9zj0+wzVZ0bxmYoGSzKJnRl6A4yg=="], "socket.io-adapter": ["socket.io-adapter@2.5.5", "", { "dependencies": { "debug": "~4.3.4", "ws": "~8.17.1" } }, "sha512-eLDQas5dzPgOWCk9GuuJC2lBqItuhKI4uxGgo9aIV7MYbk2h9Q6uULEh8WBzThoI7l+qU9Ast9fVUmkqPP9wYg=="], @@ -2991,6 +3090,10 @@ "socket.io-parser": ["socket.io-parser@4.2.4", "", { "dependencies": { "@socket.io/component-emitter": "~3.1.0", "debug": "~4.3.1" } }, "sha512-/GbIKmo8ioc+NIWIhwdecY0ge+qVBSMdgxGygevmdHj24bsfgtCmcUUcQ5ZzcylGFHsN3k4HB4Cgkl96KVnuew=="], + "socks": ["socks@2.8.7", "", { "dependencies": { "ip-address": "^10.0.1", "smart-buffer": "^4.2.0" } }, "sha512-HLpt+uLy/pxB+bum/9DzAgiKS8CX1EvbWxI4zlmgGCExImLdiad2iCwXT5Z4c9c3Eq8rP2318mPW2c+QbtjK8A=="], + + "socks-proxy-agent": ["socks-proxy-agent@8.0.5", "", { "dependencies": { "agent-base": "^7.1.2", "debug": "^4.3.4", "socks": "^2.8.3" } }, "sha512-HehCEsotFqbPW9sJ8WVYB6UbmIMv7kUUORIF2Nncq4VQvBfNBLibW9YZR5dlYCSUhwcD628pRllm7n+E+YTzJw=="], + "sonic-boom": ["sonic-boom@4.2.0", "", { "dependencies": { "atomic-sleep": "^1.0.0" } }, "sha512-INb7TM37/mAcsGmc9hyyI6+QR3rR1zVRu36B0NeGXKnOOLiZOfER5SA+N7X7k3yUYRzLWafduTDvJAfDswwEww=="], "source-map": ["source-map@0.7.6", "", {}, "sha512-i5uvt8C3ikiWeNZSVZNWcfZPItFQOsYTUAOkcUPGd8DqDy1uOUikjt5dG+uRlwyvR108Fb9DOd4GvXfT0N2/uQ=="], @@ -3023,6 +3126,8 @@ "stdin-discarder": ["stdin-discarder@0.2.2", "", {}, "sha512-UhDfHmA92YAlNnCfhmq0VeNL5bDbiZGg7sZ2IvPsXubGkiNa9EC+tUTsjBRsYUAz87btI6/1wf4XoVvQ3uRnmQ=="], + "streamx": ["streamx@2.23.0", "", { "dependencies": { "events-universal": "^1.0.0", "fast-fifo": "^1.3.2", "text-decoder": "^1.1.0" } }, "sha512-kn+e44esVfn2Fa/O0CPFcex27fjIL6MkVae0Mm6q+E6f0hWv578YCERbv+4m02cjxvDsPKLnmxral/rR6lBMAg=="], + "string-argv": ["string-argv@0.3.2", "", {}, "sha512-aqD2Q0144Z+/RqG52NeHEkZauTAUWJO8c6yTftGJKO3Tja5tUgIfmIl6kExvhtxSDP7fXB6DvzkfMpCd/F3G+Q=="], "string-template": ["string-template@0.2.1", "", {}, "sha512-Yptehjogou2xm4UJbxJ4CxgZx12HBfeystp0y3x7s4Dj32ltVVG1Gg8YhKjHZkHicuKpZX/ffilA8505VbUbpw=="], @@ -3073,8 +3178,6 @@ "supports-preserve-symlinks-flag": ["supports-preserve-symlinks-flag@1.0.0", "", {}, "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w=="], - "swr": ["swr@2.3.7", "", { "dependencies": { "dequal": "^2.0.3", "use-sync-external-store": "^1.4.0" }, "peerDependencies": { "react": "^16.11.0 || ^17.0.0 || ^18.0.0 || ^19.0.0" } }, "sha512-ZEquQ82QvalqTxhBVv/DlAg2mbmUjF4UgpPg9wwk4ufb9rQnZXh1iKyyKBqV6bQGu1Ie7L1QwSYO07qFIa1p+g=="], - "symbol-tree": ["symbol-tree@3.2.4", "", {}, "sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw=="], "tailwind-merge": ["tailwind-merge@3.4.0", "", {}, "sha512-uSaO4gnW+b3Y2aWoWfFpX62vn2sR3skfhbjsEnaBI81WD1wBLlHZe5sWf0AqjksNdYTbGBEd0UasQMT3SNV15g=="], @@ -3087,10 +3190,16 @@ "tar": ["tar@7.5.2", "", { "dependencies": { "@isaacs/fs-minipass": "^4.0.0", "chownr": "^3.0.0", "minipass": "^7.1.2", "minizlib": "^3.1.0", "yallist": "^5.0.0" } }, "sha512-7NyxrTE4Anh8km8iEy7o0QYPs+0JKBTj5ZaqHg6B39erLg0qYXN3BijtShwbsNSvQ+LN75+KV+C4QR/f6Gwnpg=="], + "tar-fs": ["tar-fs@3.1.1", "", { "dependencies": { "pump": "^3.0.0", "tar-stream": "^3.1.5" }, "optionalDependencies": { "bare-fs": "^4.0.1", "bare-path": "^3.0.0" } }, "sha512-LZA0oaPOc2fVo82Txf3gw+AkEd38szODlptMYejQUhndHMLQ9M059uXR+AfS7DNo0NpINvSqDsvyaCrBVkptWg=="], + + "tar-stream": ["tar-stream@3.1.7", "", { "dependencies": { "b4a": "^1.6.4", "fast-fifo": "^1.2.0", "streamx": "^2.15.0" } }, "sha512-qJj60CXt7IU1Ffyc3NJMjh6EkuCFej46zUqJ4J7pqYlThyd9bO0XBTmcOIhSzZJVWfsLks0+nle/j538YAW9RQ=="], + "tdigest": ["tdigest@0.1.2", "", { "dependencies": { "bintrees": "1.0.2" } }, "sha512-+G0LLgjjo9BZX2MfdvPfH+MKLCrxlXSYec5DaPYP1fe6Iyhf0/fSmJ0bFiZ1F8BT6cGXl2LpltQptzjXKWEkKA=="], "test-exclude": ["test-exclude@7.0.1", "", { "dependencies": { "@istanbuljs/schema": "^0.1.2", "glob": "^10.4.1", "minimatch": "^9.0.4" } }, "sha512-pFYqmTw68LXVjeWJMST4+borgQP2AyMNbg1BpZh9LbyhUeNkeaPF9gzfPGUAnSMV3qPYdWUwDIjjCLiSDOl7vg=="], + "text-decoder": ["text-decoder@1.2.3", "", { "dependencies": { "b4a": "^1.6.4" } }, "sha512-3/o9z3X0X0fTupwsYvR03pJ/DjWuqqrfwBgTQzdWDiQSm9KitAyz/9WqsT2JQW7KV2m+bC2ol/zqpW37NHxLaA=="], + "thenify": ["thenify@3.3.1", "", { "dependencies": { "any-promise": "^1.0.0" } }, "sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw=="], "thenify-all": ["thenify-all@1.6.0", "", { "dependencies": { "thenify": ">= 3.1.0 < 4" } }, "sha512-RNxQH/qI8/t3thXJDwcstUO4zeqo64+Uy/+sNVRBx4Xn2OX+OZ9oP+iJnNFqplFra2ZUVeKCSa2oVWi3T4uVmA=="], @@ -3101,8 +3210,6 @@ "thriftrw": ["thriftrw@3.11.4", "", { "dependencies": { "bufrw": "^1.2.1", "error": "7.0.2", "long": "^2.4.0" }, "bin": { "thrift2json": "thrift2json.js" } }, "sha512-UcuBd3eanB3T10nXWRRMwfwoaC6VMk7qe3/5YIWP2Jtw+EbHqJ0p1/K3x8ixiR5dozKSSfcg1W+0e33G1Di3XA=="], - "throttleit": ["throttleit@2.1.0", "", {}, "sha512-nt6AMGKW1p/70DF/hGBdJB57B8Tspmbp5gfJ8ilhLnt7kkr2ye7hzD6NVG8GGErk2HWF34igrL2CXmNIkzKqKw=="], - "through": ["through@2.3.8", "", {}, "sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg=="], "tiny-inflate": ["tiny-inflate@1.0.3", "", {}, "sha512-pkY1fj1cKHb2seWDy0B16HeWyczlJA9/WW3u3c4z/NiWDsO3DOU5D7nhTLE9CF0yXv/QZFY7sEJmj24dK+Rrqw=="], @@ -3181,6 +3288,8 @@ "ulid": ["ulid@2.4.0", "", { "bin": { "ulid": "bin/cli.js" } }, "sha512-fIRiVTJNcSRmXKPZtGzFQv9WRrZ3M9eoptl/teFJvjOzmpU+/K/JH6HZ8deBfb5vMEpicJcLn7JmvdknlMq7Zg=="], + "unbzip2-stream": ["unbzip2-stream@1.4.3", "", { "dependencies": { "buffer": "^5.2.1", "through": "^2.3.8" } }, "sha512-mlExGW4w71ebDJviH16lQLtZS32VKqsSfk80GCfUlwT/4/hNRFsoscrF/c++9xinkMzECL1uL9DDwXqFWkruPg=="], + "uncrypto": ["uncrypto@0.1.3", "", {}, "sha512-Ql87qFHB3s/De2ClA9e0gsnS6zXG27SkTiSJwjCc9MebbfapQfuPzumMIUMi38ezPZVNFcHI9sUIepeQfw8J8Q=="], "underscore": ["underscore@1.13.7", "", {}, "sha512-GMXzWtsc57XAtguZgaQViUOzs0KTkk8ojr3/xAxXLITqf/3EMwxC0inyETfDFjH/Krbhuep0HNbbjI9i/q3F3g=="], @@ -3221,6 +3330,8 @@ "uri-js": ["uri-js@4.4.1", "", { "dependencies": { "punycode": "^2.1.0" } }, "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg=="], + "urlpattern-polyfill": ["urlpattern-polyfill@10.0.0", "", {}, "sha512-H/A06tKD7sS1O1X2SshBVeA5FLycRpjqiBeqGKmBwBDBy28EnRjORxTNe269KSSr5un5qyWi1iL61wLxpd+ZOg=="], + "use-callback-ref": ["use-callback-ref@1.3.3", "", { "dependencies": { "tslib": "^2.0.0" }, "peerDependencies": { "@types/react": "*", "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react"] }, "sha512-jQL3lRnocaFtu3V00JToYz/4QkNWswxijDaCVNZRiRTO3HQDLsdu1ZtmIUvV4yPp+rvWm5j0y0TG/S61cuijTg=="], "use-sidecar": ["use-sidecar@1.1.3", "", { "dependencies": { "detect-node-es": "^1.1.0", "tslib": "^2.0.0" }, "peerDependencies": { "@types/react": "*", "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react"] }, "sha512-Fedw0aZvkhynoPYlA5WXrMCAMm+nSWdZt6lzJQ7Ok8S6Q+VsHmHpRWndVRJ8Be0ZbkfPc5LRYH+5XrzXcEeLRQ=="], @@ -3339,8 +3450,6 @@ "zwitch": ["zwitch@2.0.4", "", {}, "sha512-bXE4cR/kVZhKZX/RjPEflHaKVhUVl85noU3v6b8apfQEc1x4A+zBxjZ4lN8LqGd6WZ3dl98pY4o717VFmoPp+A=="], - "@ai-sdk/provider-utils/secure-json-parse": ["secure-json-parse@2.7.0", "", {}, "sha512-6aU+Rwsezw7VR8/nyvKTx8QpWH9FrcYiXXlqC4z5d5XQBDRqtbfsRjnwGyqbi3gddNtWHuEk9OANUotL26qKUw=="], - "@anthropic-ai/sdk/@types/node": ["@types/node@18.19.130", "", { "dependencies": { "undici-types": "~5.26.4" } }, "sha512-GRaXQx6jGfL8sKfaIDD6OupbIHBr9jv7Jnaml9tB7l4v068PAOXqfcujMMo5PhbIs6ggR1XODELqahT2R8v0fg=="], "@anthropic-ai/sdk/node-fetch": ["node-fetch@2.7.0", "", { "dependencies": { "whatwg-url": "^5.0.0" }, "peerDependencies": { "encoding": "^0.1.0" }, "optionalPeers": ["encoding"] }, "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A=="], @@ -3399,8 +3508,6 @@ "@browserbasehq/sdk/node-fetch": ["node-fetch@2.7.0", "", { "dependencies": { "whatwg-url": "^5.0.0" }, "peerDependencies": { "encoding": "^0.1.0" }, "optionalPeers": ["encoding"] }, "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A=="], - "@browserbasehq/stagehand/zod": ["zod@4.1.13", "", {}, "sha512-AvvthqfqrAhNH9dnfmrfKzX5upOdjUVJYFqNSlkmGf64gRaTzlPwz99IHYnVs28qYAybvAlBV+H7pn0saFY4Ig=="], - "@cerebras/cerebras_cloud_sdk/@types/node": ["@types/node@18.19.130", "", { "dependencies": { "undici-types": "~5.26.4" } }, "sha512-GRaXQx6jGfL8sKfaIDD6OupbIHBr9jv7Jnaml9tB7l4v068PAOXqfcujMMo5PhbIs6ggR1XODELqahT2R8v0fg=="], "@cerebras/cerebras_cloud_sdk/node-fetch": ["node-fetch@2.7.0", "", { "dependencies": { "whatwg-url": "^5.0.0" }, "peerDependencies": { "encoding": "^0.1.0" }, "optionalPeers": ["encoding"] }, "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A=="], @@ -3415,6 +3522,10 @@ "@isaacs/cliui/wrap-ansi": ["wrap-ansi@8.1.0", "", { "dependencies": { "ansi-styles": "^6.1.0", "string-width": "^5.0.1", "strip-ansi": "^7.0.1" } }, "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ=="], + "@langchain/core/ansi-styles": ["ansi-styles@5.2.0", "", {}, "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA=="], + + "@langchain/core/uuid": ["uuid@10.0.0", "", { "bin": { "uuid": "dist/bin/uuid" } }, "sha512-8XkAphELsDnEGrDxUOHB3RGvXz6TeuYSGEZBOjtTtPm2lwhGBjLgOzLHB63IUWfBpNucQjND6d3AOudO+H3RWQ=="], + "@octokit/plugin-paginate-rest/@octokit/types": ["@octokit/types@13.10.0", "", { "dependencies": { "@octokit/openapi-types": "^24.2.0" } }, "sha512-ifLaO34EbbPj0Xgro4G5lP5asESjwHracYJvVaPIyXMuiuXLlhic3S47cBdTb+jfODkTE5YtGCLt3Ay3+J97sA=="], "@octokit/plugin-rest-endpoint-methods/@octokit/types": ["@octokit/types@13.10.0", "", { "dependencies": { "@octokit/openapi-types": "^24.2.0" } }, "sha512-ifLaO34EbbPj0Xgro4G5lP5asESjwHracYJvVaPIyXMuiuXLlhic3S47cBdTb+jfODkTE5YtGCLt3Ay3+J97sA=="], @@ -3597,6 +3708,8 @@ "@types/through/@types/node": ["@types/node@24.2.1", "", { "dependencies": { "undici-types": "~7.10.0" } }, "sha512-DRh5K+ka5eJic8CjH7td8QpYEV6Zo10gfRkjHCO3weqZHWDtAaSTFtl4+VMqOJ4N5jcuhZ9/l+yy8rVgw7BQeQ=="], + "@types/yauzl/@types/node": ["@types/node@24.2.1", "", { "dependencies": { "undici-types": "~7.10.0" } }, "sha512-DRh5K+ka5eJic8CjH7td8QpYEV6Zo10gfRkjHCO3weqZHWDtAaSTFtl4+VMqOJ4N5jcuhZ9/l+yy8rVgw7BQeQ=="], + "@typespec/ts-http-runtime/https-proxy-agent": ["https-proxy-agent@7.0.6", "", { "dependencies": { "agent-base": "^7.1.2", "debug": "4" } }, "sha512-vK9P5/iUfdl95AI+JVyUuIcVtd4ofvtrOr3HNtM2yxC9bnMbEdp3x01OhQNnjb8IJYi38VlTE3mBXwcfvywuSw=="], "accepts/mime-types": ["mime-types@2.1.35", "", { "dependencies": { "mime-db": "1.52.0" } }, "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw=="], @@ -3623,6 +3736,10 @@ "cheerio/htmlparser2": ["htmlparser2@10.0.0", "", { "dependencies": { "domelementtype": "^2.3.0", "domhandler": "^5.0.3", "domutils": "^3.2.1", "entities": "^6.0.0" } }, "sha512-TwAZM+zE5Tq3lrEHvOlvwgj1XLWQCtaaibSN11Q+gGBAS7Y1uZSWwXXRe4iF6OXnaq1riyQAPFOBtYc77Mxq0g=="], + "chrome-launcher/@types/node": ["@types/node@24.2.1", "", { "dependencies": { "undici-types": "~7.10.0" } }, "sha512-DRh5K+ka5eJic8CjH7td8QpYEV6Zo10gfRkjHCO3weqZHWDtAaSTFtl4+VMqOJ4N5jcuhZ9/l+yy8rVgw7BQeQ=="], + + "chromium-bidi/zod": ["zod@3.23.8", "", {}, "sha512-XBx9AXhXktjUqnepgTiE5flcKIYWi/rme0Eaj+5Y0lftuGBq+jyRu/md4WnuxqgP1ubdpNCsYEYPxrzVHD8d6g=="], + "cli-truncate/string-width": ["string-width@5.1.2", "", { "dependencies": { "eastasianwidth": "^0.2.0", "emoji-regex": "^9.2.2", "strip-ansi": "^7.0.1" } }, "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA=="], "cliui/wrap-ansi": ["wrap-ansi@7.0.0", "", { "dependencies": { "ansi-styles": "^4.0.0", "string-width": "^4.1.0", "strip-ansi": "^6.0.0" } }, "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q=="], @@ -3651,12 +3768,20 @@ "engine.io-client/ws": ["ws@8.17.1", "", { "peerDependencies": { "bufferutil": "^4.0.1", "utf-8-validate": ">=5.0.2" }, "optionalPeers": ["bufferutil", "utf-8-validate"] }, "sha512-6XQFvXTkbfUOZOKKILFG1PDK2NDQs4azKQl26T0YS5CxqWLgXajbPZ+h4gZekJyRqFU8pvnbAbbs/3TgRPy+GQ=="], + "escodegen/source-map": ["source-map@0.6.1", "", {}, "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g=="], + "express/accepts": ["accepts@2.0.0", "", { "dependencies": { "mime-types": "^3.0.0", "negotiator": "^1.0.0" } }, "sha512-5cvg6CtKwfgdmVqY1WIiXKc3Q1bkRqGLi+2W/6ao+6Y7gu/RCwRuAhGEzh5B4KlszSuTLgZYuqFqo5bImjNKng=="], + "extract-zip/get-stream": ["get-stream@5.2.0", "", { "dependencies": { "pump": "^3.0.0" } }, "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA=="], + + "extract-zip/yauzl": ["yauzl@2.10.0", "", { "dependencies": { "buffer-crc32": "~0.2.3", "fd-slicer": "~1.1.0" } }, "sha512-p4a9I6X6nu6IhoGmBqAcbJy1mlC4j27vEPZX9F4L4/vZT3Lyq1VkFHw/V/PUcB9Buo+DG3iHkT0x3Qya58zc3g=="], + "fast-glob/glob-parent": ["glob-parent@5.1.2", "", { "dependencies": { "is-glob": "^4.0.1" } }, "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow=="], "fetch-blob/web-streams-polyfill": ["web-streams-polyfill@3.3.3", "", {}, "sha512-d2JWLCivmZYTSIoge9MsgFCZrt571BikcWGYkjC1khllbTeDlGqZ2D8vD8E/lJa8WGWbb7Plm8/XJYV7IJHZZw=="], + "figures/escape-string-regexp": ["escape-string-regexp@1.0.5", "", {}, "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg=="], + "form-data/mime-types": ["mime-types@2.1.35", "", { "dependencies": { "mime-db": "1.52.0" } }, "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw=="], "fumadocs-mdx/esbuild": ["esbuild@0.27.1", "", { "optionalDependencies": { "@esbuild/aix-ppc64": "0.27.1", "@esbuild/android-arm": "0.27.1", "@esbuild/android-arm64": "0.27.1", "@esbuild/android-x64": "0.27.1", "@esbuild/darwin-arm64": "0.27.1", "@esbuild/darwin-x64": "0.27.1", "@esbuild/freebsd-arm64": "0.27.1", "@esbuild/freebsd-x64": "0.27.1", "@esbuild/linux-arm": "0.27.1", "@esbuild/linux-arm64": "0.27.1", "@esbuild/linux-ia32": "0.27.1", "@esbuild/linux-loong64": "0.27.1", "@esbuild/linux-mips64el": "0.27.1", "@esbuild/linux-ppc64": "0.27.1", "@esbuild/linux-riscv64": "0.27.1", "@esbuild/linux-s390x": "0.27.1", "@esbuild/linux-x64": "0.27.1", "@esbuild/netbsd-arm64": "0.27.1", "@esbuild/netbsd-x64": "0.27.1", "@esbuild/openbsd-arm64": "0.27.1", "@esbuild/openbsd-x64": "0.27.1", "@esbuild/openharmony-arm64": "0.27.1", "@esbuild/sunos-x64": "0.27.1", "@esbuild/win32-arm64": "0.27.1", "@esbuild/win32-ia32": "0.27.1", "@esbuild/win32-x64": "0.27.1" }, "bin": { "esbuild": "bin/esbuild" } }, "sha512-yY35KZckJJuVVPXpvjgxiCuVEJT67F6zDeVTv4rizyPrfGBUpZQsvmxnN+C371c2esD/hNMjj4tpBhuueLN7aA=="], @@ -3671,6 +3796,8 @@ "gaxios/https-proxy-agent": ["https-proxy-agent@7.0.6", "", { "dependencies": { "agent-base": "^7.1.2", "debug": "4" } }, "sha512-vK9P5/iUfdl95AI+JVyUuIcVtd4ofvtrOr3HNtM2yxC9bnMbEdp3x01OhQNnjb8IJYi38VlTE3mBXwcfvywuSw=="], + "get-uri/data-uri-to-buffer": ["data-uri-to-buffer@6.0.2", "", {}, "sha512-7hvf7/GW8e86rW0ptuwS3OcBGDjIi6SZva7hCyWC0yYry2cOPmLIjXAUHI6DK2HsnwJd9ifmt57i8eV2n4YNpw=="], + "glob/minimatch": ["minimatch@10.1.1", "", { "dependencies": { "@isaacs/brace-expansion": "^5.0.0" } }, "sha512-enIvLvRAFZYXJzkCYG5RKmPfrFArdLv+R+lbQ53BmIMLIry74bjKzX6iHAm8WYamJkhSSEabrWN5D97XnKObjQ=="], "gray-matter/js-yaml": ["js-yaml@3.14.2", "", { "dependencies": { "argparse": "^1.0.7", "esprima": "^4.0.0" }, "bin": { "js-yaml": "bin/js-yaml.js" } }, "sha512-PMSmkqxr106Xa156c2M265Z+FTrPl+oxd/rgOQy2tijQeK5TxQ43psO1ZCwhVOSdnn+RzkzlRz/eY4BgJBYVpg=="], @@ -3703,6 +3830,10 @@ "jws/safe-buffer": ["safe-buffer@5.2.1", "", {}, "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ=="], + "langsmith/chalk": ["chalk@4.1.2", "", { "dependencies": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" } }, "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA=="], + + "langsmith/uuid": ["uuid@10.0.0", "", { "bin": { "uuid": "dist/bin/uuid" } }, "sha512-8XkAphELsDnEGrDxUOHB3RGvXz6TeuYSGEZBOjtTtPm2lwhGBjLgOzLHB63IUWfBpNucQjND6d3AOudO+H3RWQ=="], + "linebreak/base64-js": ["base64-js@0.0.8", "", {}, "sha512-3XSA2cR/h/73EzlXXdU6YNycmYI7+kicTxks4eJg2g39biHR84slg2+des+p7iHYhbRg/udIS4TD53WabcOUkw=="], "lint-staged/commander": ["commander@13.1.0", "", {}, "sha512-/rFeCpNJQbhSZjGVwO9RFV3xPqbnERS8MmIQzCtD/zl6gpJuV/bMLuN92oG3F7d8oDEHHRrujSXNUr8fpjntKw=="], @@ -3743,6 +3874,8 @@ "oauth2-mock-server/jose": ["jose@5.10.0", "", {}, "sha512-s+3Al/p9g32Iq+oqXxkW//7jk2Vig6FF1CFqzVXoTUXt2qz89YWbL+OwS17NFYEvxC35n0FKeGO2LGYSxeM2Gg=="], + "ollama-ai-provider-v2/zod": ["zod@4.1.13", "", {}, "sha512-AvvthqfqrAhNH9dnfmrfKzX5upOdjUVJYFqNSlkmGf64gRaTzlPwz99IHYnVs28qYAybvAlBV+H7pn0saFY4Ig=="], + "openai/@types/node": ["@types/node@18.19.130", "", { "dependencies": { "undici-types": "~5.26.4" } }, "sha512-GRaXQx6jGfL8sKfaIDD6OupbIHBr9jv7Jnaml9tB7l4v068PAOXqfcujMMo5PhbIs6ggR1XODELqahT2R8v0fg=="], "openai/node-fetch": ["node-fetch@2.7.0", "", { "dependencies": { "whatwg-url": "^5.0.0" }, "peerDependencies": { "encoding": "^0.1.0" }, "optionalPeers": ["encoding"] }, "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A=="], @@ -3755,6 +3888,12 @@ "ora/strip-ansi": ["strip-ansi@7.1.2", "", { "dependencies": { "ansi-regex": "^6.0.1" } }, "sha512-gmBGslpoQJtgnMAvOVqGZpEz9dyoKTCzy2nfz/n8aIFhN/jCE/rCmcxabB6jOOHV+0WNnylOxaxBQPSvcWklhA=="], + "p-queue/eventemitter3": ["eventemitter3@4.0.7", "", {}, "sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw=="], + + "pac-proxy-agent/agent-base": ["agent-base@7.1.4", "", {}, "sha512-MnA+YT8fwfJPgBx3m60MNqakm30XOkyIoH1y6huTQvC0PwZG7ki8NacLBcrPbNoo8vEZy7Jpuk7+jMO+CUovTQ=="], + + "pac-proxy-agent/https-proxy-agent": ["https-proxy-agent@7.0.6", "", { "dependencies": { "agent-base": "^7.1.2", "debug": "4" } }, "sha512-vK9P5/iUfdl95AI+JVyUuIcVtd4ofvtrOr3HNtM2yxC9bnMbEdp3x01OhQNnjb8IJYi38VlTE3mBXwcfvywuSw=="], + "parse-entities/@types/unist": ["@types/unist@2.0.11", "", {}, "sha512-CmBKiL6NNo/OqgmMn95Fk9Whlp2mtvIv+KNpQKN2F4SjvrEesubTRWGYSg+BnWZOnlCaSTU1sMpsBOzgbYhnsA=="], "path-scurry/lru-cache": ["lru-cache@11.2.4", "", {}, "sha512-B5Y16Jr9LB9dHVkh6ZevG+vAbOsNOYCX+sXvFWFu7B3Iz5mijW3zdbMyhsh8ANd2mSWBYdJgnqi+mL7/LrOPYg=="], @@ -3769,6 +3908,14 @@ "protobufjs/@types/node": ["@types/node@24.2.1", "", { "dependencies": { "undici-types": "~7.10.0" } }, "sha512-DRh5K+ka5eJic8CjH7td8QpYEV6Zo10gfRkjHCO3weqZHWDtAaSTFtl4+VMqOJ4N5jcuhZ9/l+yy8rVgw7BQeQ=="], + "proxy-agent/agent-base": ["agent-base@7.1.4", "", {}, "sha512-MnA+YT8fwfJPgBx3m60MNqakm30XOkyIoH1y6huTQvC0PwZG7ki8NacLBcrPbNoo8vEZy7Jpuk7+jMO+CUovTQ=="], + + "proxy-agent/https-proxy-agent": ["https-proxy-agent@7.0.6", "", { "dependencies": { "agent-base": "^7.1.2", "debug": "4" } }, "sha512-vK9P5/iUfdl95AI+JVyUuIcVtd4ofvtrOr3HNtM2yxC9bnMbEdp3x01OhQNnjb8IJYi38VlTE3mBXwcfvywuSw=="], + + "proxy-agent/lru-cache": ["lru-cache@7.18.3", "", {}, "sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA=="], + + "puppeteer-core/devtools-protocol": ["devtools-protocol@0.0.1312386", "", {}, "sha512-DPnhUXvmvKT2dFA/j7B+riVLUt9Q6RKJlcppojL5CoRywJJKLDYnRlw0gTFKfgDPHP5E04UoB71SxoJlVZy8FA=="], + "raw-body/iconv-lite": ["iconv-lite@0.7.0", "", { "dependencies": { "safer-buffer": ">= 2.1.2 < 3.0.0" } }, "sha512-cf6L2Ds3h57VVmkZe+Pn+5APsT7FpqJtEhhieDCvrE2MK5Qk9MyffgQyuxQTm6BChfeZNtcOLHp9IcWRVcIcBQ=="], "react-email/chokidar": ["chokidar@4.0.3", "", { "dependencies": { "readdirp": "^4.0.1" } }, "sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA=="], @@ -3821,6 +3968,8 @@ "socket.io-parser/debug": ["debug@4.3.7", "", { "dependencies": { "ms": "^2.1.3" } }, "sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ=="], + "socks-proxy-agent/agent-base": ["agent-base@7.1.4", "", {}, "sha512-MnA+YT8fwfJPgBx3m60MNqakm30XOkyIoH1y6huTQvC0PwZG7ki8NacLBcrPbNoo8vEZy7Jpuk7+jMO+CUovTQ=="], + "source-map-support/source-map": ["source-map@0.6.1", "", {}, "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g=="], "string-width/emoji-regex": ["emoji-regex@8.0.0", "", {}, "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A=="], @@ -3837,6 +3986,8 @@ "tsyringe/tslib": ["tslib@1.14.1", "", {}, "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg=="], + "unbzip2-stream/buffer": ["buffer@5.7.1", "", { "dependencies": { "base64-js": "^1.3.1", "ieee754": "^1.1.13" } }, "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ=="], + "unicode-trie/pako": ["pako@0.2.9", "", {}, "sha512-NUcwaKxUxWrZLpDG+z/xZaCgQITkA/Dv4V/T6bw7VON6l1Xz/VnrBqrYjZQ12TamKHzITTfOEIYUj48y2KXImA=="], "unist-util-remove/@types/unist": ["@types/unist@2.0.11", "", {}, "sha512-CmBKiL6NNo/OqgmMn95Fk9Whlp2mtvIv+KNpQKN2F4SjvrEesubTRWGYSg+BnWZOnlCaSTU1sMpsBOzgbYhnsA=="], @@ -3999,12 +4150,16 @@ "@types/through/@types/node/undici-types": ["undici-types@7.10.0", "", {}, "sha512-t5Fy/nfn+14LuOc2KNYg75vZqClpAiqscVvMygNnlsHBFpSXdJaYtXMcdNLpl/Qvc3P2cB3s6lOV51nqsFq4ag=="], + "@types/yauzl/@types/node/undici-types": ["undici-types@7.10.0", "", {}, "sha512-t5Fy/nfn+14LuOc2KNYg75vZqClpAiqscVvMygNnlsHBFpSXdJaYtXMcdNLpl/Qvc3P2cB3s6lOV51nqsFq4ag=="], + "@typespec/ts-http-runtime/https-proxy-agent/agent-base": ["agent-base@7.1.4", "", {}, "sha512-MnA+YT8fwfJPgBx3m60MNqakm30XOkyIoH1y6huTQvC0PwZG7ki8NacLBcrPbNoo8vEZy7Jpuk7+jMO+CUovTQ=="], "accepts/mime-types/mime-db": ["mime-db@1.52.0", "", {}, "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg=="], "c12/chokidar/readdirp": ["readdirp@4.1.2", "", {}, "sha512-GDhwkLfywWL2s6vEjyhri+eXmfH6j1L7JE27WhqLeYzoh/A3DBaYGEj2H/HFZCn/kMfim73FXxEJTw06WtxQwg=="], + "chrome-launcher/@types/node/undici-types": ["undici-types@7.10.0", "", {}, "sha512-t5Fy/nfn+14LuOc2KNYg75vZqClpAiqscVvMygNnlsHBFpSXdJaYtXMcdNLpl/Qvc3P2cB3s6lOV51nqsFq4ag=="], + "cli-truncate/string-width/emoji-regex": ["emoji-regex@9.2.2", "", {}, "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg=="], "cli-truncate/string-width/strip-ansi": ["strip-ansi@7.1.2", "", { "dependencies": { "ansi-regex": "^6.0.1" } }, "sha512-gmBGslpoQJtgnMAvOVqGZpEz9dyoKTCzy2nfz/n8aIFhN/jCE/rCmcxabB6jOOHV+0WNnylOxaxBQPSvcWklhA=="], @@ -4091,6 +4246,8 @@ "jsdom/https-proxy-agent/agent-base": ["agent-base@7.1.4", "", {}, "sha512-MnA+YT8fwfJPgBx3m60MNqakm30XOkyIoH1y6huTQvC0PwZG7ki8NacLBcrPbNoo8vEZy7Jpuk7+jMO+CUovTQ=="], + "langsmith/chalk/supports-color": ["supports-color@7.2.0", "", { "dependencies": { "has-flag": "^4.0.0" } }, "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw=="], + "lint-staged/listr2/cli-truncate": ["cli-truncate@4.0.0", "", { "dependencies": { "slice-ansi": "^5.0.0", "string-width": "^7.0.0" } }, "sha512-nPdaFdQ0h/GEigbPClz11D0v/ZJEwxmeVZGeMo3Z5StPtUTkA9o1lD6QwoirYiSDzbcwn2XcjwmCp68W1IS4TA=="], "lint-staged/listr2/log-update": ["log-update@6.1.0", "", { "dependencies": { "ansi-escapes": "^7.0.0", "cli-cursor": "^5.0.0", "slice-ansi": "^7.1.0", "strip-ansi": "^7.1.0", "wrap-ansi": "^9.0.0" } }, "sha512-9ie8ItPR6tjY5uYJh8K/Zrv/RMZ5VOlOWvtZdEHYSTFKZfIBPQa9tOAEeAWhd+AnIneLJ22w5fjOYtoutpWq5w=="], diff --git a/packages/db/migrations/0121_new_mantis.sql b/packages/db/migrations/0121_new_mantis.sql new file mode 100644 index 0000000000..71705d0eae --- /dev/null +++ b/packages/db/migrations/0121_new_mantis.sql @@ -0,0 +1,3 @@ +ALTER TABLE "workflow_execution_logs" ADD COLUMN "deployment_version_id" text;--> statement-breakpoint +ALTER TABLE "workflow_execution_logs" ADD CONSTRAINT "workflow_execution_logs_deployment_version_id_workflow_deployment_version_id_fk" FOREIGN KEY ("deployment_version_id") REFERENCES "public"."workflow_deployment_version"("id") ON DELETE set null ON UPDATE no action;--> statement-breakpoint +CREATE INDEX "workflow_execution_logs_deployment_version_id_idx" ON "workflow_execution_logs" USING btree ("deployment_version_id"); \ No newline at end of file diff --git a/packages/db/migrations/meta/0121_snapshot.json b/packages/db/migrations/meta/0121_snapshot.json new file mode 100644 index 0000000000..0bcfa7e65e --- /dev/null +++ b/packages/db/migrations/meta/0121_snapshot.json @@ -0,0 +1,7816 @@ +{ + "id": "8d172f6f-534d-4896-877c-d07e979f716a", + "prevId": "10e90e5f-b789-49ea-a493-4e333c5e264b", + "version": "7", + "dialect": "postgresql", + "tables": { + "public.account": { + "name": "account", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "account_id": { + "name": "account_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "provider_id": { + "name": "provider_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "access_token": { + "name": "access_token", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "refresh_token": { + "name": "refresh_token", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "id_token": { + "name": "id_token", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "access_token_expires_at": { + "name": "access_token_expires_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "refresh_token_expires_at": { + "name": "refresh_token_expires_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "scope": { + "name": "scope", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "password": { + "name": "password", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "account_user_id_idx": { + "name": "account_user_id_idx", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "idx_account_on_account_id_provider_id": { + "name": "idx_account_on_account_id_provider_id", + "columns": [ + { + "expression": "account_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "provider_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "account_user_provider_account_unique": { + "name": "account_user_provider_account_unique", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "provider_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "account_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "account_user_id_user_id_fk": { + "name": "account_user_id_user_id_fk", + "tableFrom": "account", + "tableTo": "user", + "columnsFrom": ["user_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.api_key": { + "name": "api_key", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "workspace_id": { + "name": "workspace_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_by": { + "name": "created_by", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "key": { + "name": "key", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "type": { + "name": "type", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'personal'" + }, + "last_used": { + "name": "last_used", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "expires_at": { + "name": "expires_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + } + }, + "indexes": {}, + "foreignKeys": { + "api_key_user_id_user_id_fk": { + "name": "api_key_user_id_user_id_fk", + "tableFrom": "api_key", + "tableTo": "user", + "columnsFrom": ["user_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "api_key_workspace_id_workspace_id_fk": { + "name": "api_key_workspace_id_workspace_id_fk", + "tableFrom": "api_key", + "tableTo": "workspace", + "columnsFrom": ["workspace_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "api_key_created_by_user_id_fk": { + "name": "api_key_created_by_user_id_fk", + "tableFrom": "api_key", + "tableTo": "user", + "columnsFrom": ["created_by"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "api_key_key_unique": { + "name": "api_key_key_unique", + "nullsNotDistinct": false, + "columns": ["key"] + } + }, + "policies": {}, + "checkConstraints": { + "workspace_type_check": { + "name": "workspace_type_check", + "value": "(type = 'workspace' AND workspace_id IS NOT NULL) OR (type = 'personal' AND workspace_id IS NULL)" + } + }, + "isRLSEnabled": false + }, + "public.chat": { + "name": "chat", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "workflow_id": { + "name": "workflow_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "identifier": { + "name": "identifier", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "title": { + "name": "title", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "is_active": { + "name": "is_active", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": true + }, + "customizations": { + "name": "customizations", + "type": "json", + "primaryKey": false, + "notNull": false, + "default": "'{}'" + }, + "auth_type": { + "name": "auth_type", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'public'" + }, + "password": { + "name": "password", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "allowed_emails": { + "name": "allowed_emails", + "type": "json", + "primaryKey": false, + "notNull": false, + "default": "'[]'" + }, + "output_configs": { + "name": "output_configs", + "type": "json", + "primaryKey": false, + "notNull": false, + "default": "'[]'" + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "identifier_idx": { + "name": "identifier_idx", + "columns": [ + { + "expression": "identifier", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "chat_workflow_id_workflow_id_fk": { + "name": "chat_workflow_id_workflow_id_fk", + "tableFrom": "chat", + "tableTo": "workflow", + "columnsFrom": ["workflow_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "chat_user_id_user_id_fk": { + "name": "chat_user_id_user_id_fk", + "tableFrom": "chat", + "tableTo": "user", + "columnsFrom": ["user_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.copilot_chats": { + "name": "copilot_chats", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "workflow_id": { + "name": "workflow_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "title": { + "name": "title", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "messages": { + "name": "messages", + "type": "jsonb", + "primaryKey": false, + "notNull": true, + "default": "'[]'" + }, + "model": { + "name": "model", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'claude-3-7-sonnet-latest'" + }, + "conversation_id": { + "name": "conversation_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "preview_yaml": { + "name": "preview_yaml", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "plan_artifact": { + "name": "plan_artifact", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "config": { + "name": "config", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "copilot_chats_user_id_idx": { + "name": "copilot_chats_user_id_idx", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "copilot_chats_workflow_id_idx": { + "name": "copilot_chats_workflow_id_idx", + "columns": [ + { + "expression": "workflow_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "copilot_chats_user_workflow_idx": { + "name": "copilot_chats_user_workflow_idx", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "workflow_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "copilot_chats_created_at_idx": { + "name": "copilot_chats_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "copilot_chats_updated_at_idx": { + "name": "copilot_chats_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "copilot_chats_user_id_user_id_fk": { + "name": "copilot_chats_user_id_user_id_fk", + "tableFrom": "copilot_chats", + "tableTo": "user", + "columnsFrom": ["user_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "copilot_chats_workflow_id_workflow_id_fk": { + "name": "copilot_chats_workflow_id_workflow_id_fk", + "tableFrom": "copilot_chats", + "tableTo": "workflow", + "columnsFrom": ["workflow_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.copilot_feedback": { + "name": "copilot_feedback", + "schema": "", + "columns": { + "feedback_id": { + "name": "feedback_id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "chat_id": { + "name": "chat_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "user_query": { + "name": "user_query", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "agent_response": { + "name": "agent_response", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "is_positive": { + "name": "is_positive", + "type": "boolean", + "primaryKey": false, + "notNull": true + }, + "feedback": { + "name": "feedback", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "workflow_yaml": { + "name": "workflow_yaml", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "copilot_feedback_user_id_idx": { + "name": "copilot_feedback_user_id_idx", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "copilot_feedback_chat_id_idx": { + "name": "copilot_feedback_chat_id_idx", + "columns": [ + { + "expression": "chat_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "copilot_feedback_user_chat_idx": { + "name": "copilot_feedback_user_chat_idx", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "chat_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "copilot_feedback_is_positive_idx": { + "name": "copilot_feedback_is_positive_idx", + "columns": [ + { + "expression": "is_positive", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "copilot_feedback_created_at_idx": { + "name": "copilot_feedback_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "copilot_feedback_user_id_user_id_fk": { + "name": "copilot_feedback_user_id_user_id_fk", + "tableFrom": "copilot_feedback", + "tableTo": "user", + "columnsFrom": ["user_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "copilot_feedback_chat_id_copilot_chats_id_fk": { + "name": "copilot_feedback_chat_id_copilot_chats_id_fk", + "tableFrom": "copilot_feedback", + "tableTo": "copilot_chats", + "columnsFrom": ["chat_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.custom_tools": { + "name": "custom_tools", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "workspace_id": { + "name": "workspace_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "title": { + "name": "title", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "schema": { + "name": "schema", + "type": "json", + "primaryKey": false, + "notNull": true + }, + "code": { + "name": "code", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "custom_tools_workspace_id_idx": { + "name": "custom_tools_workspace_id_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "custom_tools_workspace_title_unique": { + "name": "custom_tools_workspace_title_unique", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "title", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "custom_tools_workspace_id_workspace_id_fk": { + "name": "custom_tools_workspace_id_workspace_id_fk", + "tableFrom": "custom_tools", + "tableTo": "workspace", + "columnsFrom": ["workspace_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "custom_tools_user_id_user_id_fk": { + "name": "custom_tools_user_id_user_id_fk", + "tableFrom": "custom_tools", + "tableTo": "user", + "columnsFrom": ["user_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.docs_embeddings": { + "name": "docs_embeddings", + "schema": "", + "columns": { + "chunk_id": { + "name": "chunk_id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "chunk_text": { + "name": "chunk_text", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "source_document": { + "name": "source_document", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "source_link": { + "name": "source_link", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "header_text": { + "name": "header_text", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "header_level": { + "name": "header_level", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "token_count": { + "name": "token_count", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "embedding": { + "name": "embedding", + "type": "vector(1536)", + "primaryKey": false, + "notNull": true + }, + "embedding_model": { + "name": "embedding_model", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'text-embedding-3-small'" + }, + "metadata": { + "name": "metadata", + "type": "jsonb", + "primaryKey": false, + "notNull": true, + "default": "'{}'" + }, + "chunk_text_tsv": { + "name": "chunk_text_tsv", + "type": "tsvector", + "primaryKey": false, + "notNull": false, + "generated": { + "as": "to_tsvector('english', \"docs_embeddings\".\"chunk_text\")", + "type": "stored" + } + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "docs_emb_source_document_idx": { + "name": "docs_emb_source_document_idx", + "columns": [ + { + "expression": "source_document", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "docs_emb_header_level_idx": { + "name": "docs_emb_header_level_idx", + "columns": [ + { + "expression": "header_level", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "docs_emb_source_header_idx": { + "name": "docs_emb_source_header_idx", + "columns": [ + { + "expression": "source_document", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "header_level", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "docs_emb_model_idx": { + "name": "docs_emb_model_idx", + "columns": [ + { + "expression": "embedding_model", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "docs_emb_created_at_idx": { + "name": "docs_emb_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "docs_embedding_vector_hnsw_idx": { + "name": "docs_embedding_vector_hnsw_idx", + "columns": [ + { + "expression": "embedding", + "isExpression": false, + "asc": true, + "nulls": "last", + "opclass": "vector_cosine_ops" + } + ], + "isUnique": false, + "concurrently": false, + "method": "hnsw", + "with": { + "m": 16, + "ef_construction": 64 + } + }, + "docs_emb_metadata_gin_idx": { + "name": "docs_emb_metadata_gin_idx", + "columns": [ + { + "expression": "metadata", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "gin", + "with": {} + }, + "docs_emb_chunk_text_fts_idx": { + "name": "docs_emb_chunk_text_fts_idx", + "columns": [ + { + "expression": "chunk_text_tsv", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "gin", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": { + "docs_embedding_not_null_check": { + "name": "docs_embedding_not_null_check", + "value": "\"embedding\" IS NOT NULL" + }, + "docs_header_level_check": { + "name": "docs_header_level_check", + "value": "\"header_level\" >= 1 AND \"header_level\" <= 6" + } + }, + "isRLSEnabled": false + }, + "public.document": { + "name": "document", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "knowledge_base_id": { + "name": "knowledge_base_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "filename": { + "name": "filename", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "file_url": { + "name": "file_url", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "file_size": { + "name": "file_size", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "mime_type": { + "name": "mime_type", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "chunk_count": { + "name": "chunk_count", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "token_count": { + "name": "token_count", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "character_count": { + "name": "character_count", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "processing_status": { + "name": "processing_status", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'pending'" + }, + "processing_started_at": { + "name": "processing_started_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "processing_completed_at": { + "name": "processing_completed_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "processing_error": { + "name": "processing_error", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "enabled": { + "name": "enabled", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": true + }, + "deleted_at": { + "name": "deleted_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "tag1": { + "name": "tag1", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "tag2": { + "name": "tag2", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "tag3": { + "name": "tag3", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "tag4": { + "name": "tag4", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "tag5": { + "name": "tag5", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "tag6": { + "name": "tag6", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "tag7": { + "name": "tag7", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "uploaded_at": { + "name": "uploaded_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "doc_kb_id_idx": { + "name": "doc_kb_id_idx", + "columns": [ + { + "expression": "knowledge_base_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "doc_filename_idx": { + "name": "doc_filename_idx", + "columns": [ + { + "expression": "filename", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "doc_processing_status_idx": { + "name": "doc_processing_status_idx", + "columns": [ + { + "expression": "knowledge_base_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "processing_status", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "doc_tag1_idx": { + "name": "doc_tag1_idx", + "columns": [ + { + "expression": "tag1", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "doc_tag2_idx": { + "name": "doc_tag2_idx", + "columns": [ + { + "expression": "tag2", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "doc_tag3_idx": { + "name": "doc_tag3_idx", + "columns": [ + { + "expression": "tag3", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "doc_tag4_idx": { + "name": "doc_tag4_idx", + "columns": [ + { + "expression": "tag4", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "doc_tag5_idx": { + "name": "doc_tag5_idx", + "columns": [ + { + "expression": "tag5", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "doc_tag6_idx": { + "name": "doc_tag6_idx", + "columns": [ + { + "expression": "tag6", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "doc_tag7_idx": { + "name": "doc_tag7_idx", + "columns": [ + { + "expression": "tag7", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "document_knowledge_base_id_knowledge_base_id_fk": { + "name": "document_knowledge_base_id_knowledge_base_id_fk", + "tableFrom": "document", + "tableTo": "knowledge_base", + "columnsFrom": ["knowledge_base_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.embedding": { + "name": "embedding", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "knowledge_base_id": { + "name": "knowledge_base_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "document_id": { + "name": "document_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "chunk_index": { + "name": "chunk_index", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "chunk_hash": { + "name": "chunk_hash", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "content": { + "name": "content", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "content_length": { + "name": "content_length", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "token_count": { + "name": "token_count", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "embedding": { + "name": "embedding", + "type": "vector(1536)", + "primaryKey": false, + "notNull": false + }, + "embedding_model": { + "name": "embedding_model", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'text-embedding-3-small'" + }, + "start_offset": { + "name": "start_offset", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "end_offset": { + "name": "end_offset", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "tag1": { + "name": "tag1", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "tag2": { + "name": "tag2", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "tag3": { + "name": "tag3", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "tag4": { + "name": "tag4", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "tag5": { + "name": "tag5", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "tag6": { + "name": "tag6", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "tag7": { + "name": "tag7", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "enabled": { + "name": "enabled", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": true + }, + "content_tsv": { + "name": "content_tsv", + "type": "tsvector", + "primaryKey": false, + "notNull": false, + "generated": { + "as": "to_tsvector('english', \"embedding\".\"content\")", + "type": "stored" + } + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "emb_kb_id_idx": { + "name": "emb_kb_id_idx", + "columns": [ + { + "expression": "knowledge_base_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "emb_doc_id_idx": { + "name": "emb_doc_id_idx", + "columns": [ + { + "expression": "document_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "emb_doc_chunk_idx": { + "name": "emb_doc_chunk_idx", + "columns": [ + { + "expression": "document_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "chunk_index", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "emb_kb_model_idx": { + "name": "emb_kb_model_idx", + "columns": [ + { + "expression": "knowledge_base_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "embedding_model", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "emb_kb_enabled_idx": { + "name": "emb_kb_enabled_idx", + "columns": [ + { + "expression": "knowledge_base_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "enabled", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "emb_doc_enabled_idx": { + "name": "emb_doc_enabled_idx", + "columns": [ + { + "expression": "document_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "enabled", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "embedding_vector_hnsw_idx": { + "name": "embedding_vector_hnsw_idx", + "columns": [ + { + "expression": "embedding", + "isExpression": false, + "asc": true, + "nulls": "last", + "opclass": "vector_cosine_ops" + } + ], + "isUnique": false, + "concurrently": false, + "method": "hnsw", + "with": { + "m": 16, + "ef_construction": 64 + } + }, + "emb_tag1_idx": { + "name": "emb_tag1_idx", + "columns": [ + { + "expression": "tag1", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "emb_tag2_idx": { + "name": "emb_tag2_idx", + "columns": [ + { + "expression": "tag2", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "emb_tag3_idx": { + "name": "emb_tag3_idx", + "columns": [ + { + "expression": "tag3", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "emb_tag4_idx": { + "name": "emb_tag4_idx", + "columns": [ + { + "expression": "tag4", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "emb_tag5_idx": { + "name": "emb_tag5_idx", + "columns": [ + { + "expression": "tag5", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "emb_tag6_idx": { + "name": "emb_tag6_idx", + "columns": [ + { + "expression": "tag6", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "emb_tag7_idx": { + "name": "emb_tag7_idx", + "columns": [ + { + "expression": "tag7", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "emb_content_fts_idx": { + "name": "emb_content_fts_idx", + "columns": [ + { + "expression": "content_tsv", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "gin", + "with": {} + } + }, + "foreignKeys": { + "embedding_knowledge_base_id_knowledge_base_id_fk": { + "name": "embedding_knowledge_base_id_knowledge_base_id_fk", + "tableFrom": "embedding", + "tableTo": "knowledge_base", + "columnsFrom": ["knowledge_base_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "embedding_document_id_document_id_fk": { + "name": "embedding_document_id_document_id_fk", + "tableFrom": "embedding", + "tableTo": "document", + "columnsFrom": ["document_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": { + "embedding_not_null_check": { + "name": "embedding_not_null_check", + "value": "\"embedding\" IS NOT NULL" + } + }, + "isRLSEnabled": false + }, + "public.environment": { + "name": "environment", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "variables": { + "name": "variables", + "type": "json", + "primaryKey": false, + "notNull": true + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": { + "environment_user_id_user_id_fk": { + "name": "environment_user_id_user_id_fk", + "tableFrom": "environment", + "tableTo": "user", + "columnsFrom": ["user_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "environment_user_id_unique": { + "name": "environment_user_id_unique", + "nullsNotDistinct": false, + "columns": ["user_id"] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.idempotency_key": { + "name": "idempotency_key", + "schema": "", + "columns": { + "key": { + "name": "key", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "namespace": { + "name": "namespace", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'default'" + }, + "result": { + "name": "result", + "type": "json", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "idempotency_key_namespace_unique": { + "name": "idempotency_key_namespace_unique", + "columns": [ + { + "expression": "key", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "namespace", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "idempotency_key_created_at_idx": { + "name": "idempotency_key_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "idempotency_key_namespace_idx": { + "name": "idempotency_key_namespace_idx", + "columns": [ + { + "expression": "namespace", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.invitation": { + "name": "invitation", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "email": { + "name": "email", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "inviter_id": { + "name": "inviter_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "organization_id": { + "name": "organization_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "role": { + "name": "role", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "status": { + "name": "status", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "expires_at": { + "name": "expires_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "invitation_email_idx": { + "name": "invitation_email_idx", + "columns": [ + { + "expression": "email", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "invitation_organization_id_idx": { + "name": "invitation_organization_id_idx", + "columns": [ + { + "expression": "organization_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "invitation_inviter_id_user_id_fk": { + "name": "invitation_inviter_id_user_id_fk", + "tableFrom": "invitation", + "tableTo": "user", + "columnsFrom": ["inviter_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "invitation_organization_id_organization_id_fk": { + "name": "invitation_organization_id_organization_id_fk", + "tableFrom": "invitation", + "tableTo": "organization", + "columnsFrom": ["organization_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.knowledge_base": { + "name": "knowledge_base", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "workspace_id": { + "name": "workspace_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "token_count": { + "name": "token_count", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "embedding_model": { + "name": "embedding_model", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'text-embedding-3-small'" + }, + "embedding_dimension": { + "name": "embedding_dimension", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 1536 + }, + "chunking_config": { + "name": "chunking_config", + "type": "json", + "primaryKey": false, + "notNull": true, + "default": "'{\"maxSize\": 1024, \"minSize\": 1, \"overlap\": 200}'" + }, + "deleted_at": { + "name": "deleted_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "kb_user_id_idx": { + "name": "kb_user_id_idx", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "kb_workspace_id_idx": { + "name": "kb_workspace_id_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "kb_user_workspace_idx": { + "name": "kb_user_workspace_idx", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "kb_deleted_at_idx": { + "name": "kb_deleted_at_idx", + "columns": [ + { + "expression": "deleted_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "knowledge_base_user_id_user_id_fk": { + "name": "knowledge_base_user_id_user_id_fk", + "tableFrom": "knowledge_base", + "tableTo": "user", + "columnsFrom": ["user_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "knowledge_base_workspace_id_workspace_id_fk": { + "name": "knowledge_base_workspace_id_workspace_id_fk", + "tableFrom": "knowledge_base", + "tableTo": "workspace", + "columnsFrom": ["workspace_id"], + "columnsTo": ["id"], + "onDelete": "no action", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.knowledge_base_tag_definitions": { + "name": "knowledge_base_tag_definitions", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "knowledge_base_id": { + "name": "knowledge_base_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "tag_slot": { + "name": "tag_slot", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "display_name": { + "name": "display_name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "field_type": { + "name": "field_type", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'text'" + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "kb_tag_definitions_kb_slot_idx": { + "name": "kb_tag_definitions_kb_slot_idx", + "columns": [ + { + "expression": "knowledge_base_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "tag_slot", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "kb_tag_definitions_kb_display_name_idx": { + "name": "kb_tag_definitions_kb_display_name_idx", + "columns": [ + { + "expression": "knowledge_base_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "display_name", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "kb_tag_definitions_kb_id_idx": { + "name": "kb_tag_definitions_kb_id_idx", + "columns": [ + { + "expression": "knowledge_base_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "knowledge_base_tag_definitions_knowledge_base_id_knowledge_base_id_fk": { + "name": "knowledge_base_tag_definitions_knowledge_base_id_knowledge_base_id_fk", + "tableFrom": "knowledge_base_tag_definitions", + "tableTo": "knowledge_base", + "columnsFrom": ["knowledge_base_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.marketplace": { + "name": "marketplace", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "workflow_id": { + "name": "workflow_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "state": { + "name": "state", + "type": "json", + "primaryKey": false, + "notNull": true + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "author_id": { + "name": "author_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "author_name": { + "name": "author_name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "views": { + "name": "views", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "category": { + "name": "category", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": { + "marketplace_workflow_id_workflow_id_fk": { + "name": "marketplace_workflow_id_workflow_id_fk", + "tableFrom": "marketplace", + "tableTo": "workflow", + "columnsFrom": ["workflow_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "marketplace_author_id_user_id_fk": { + "name": "marketplace_author_id_user_id_fk", + "tableFrom": "marketplace", + "tableTo": "user", + "columnsFrom": ["author_id"], + "columnsTo": ["id"], + "onDelete": "no action", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.mcp_servers": { + "name": "mcp_servers", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "workspace_id": { + "name": "workspace_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "created_by": { + "name": "created_by", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "transport": { + "name": "transport", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "url": { + "name": "url", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "headers": { + "name": "headers", + "type": "json", + "primaryKey": false, + "notNull": false, + "default": "'{}'" + }, + "timeout": { + "name": "timeout", + "type": "integer", + "primaryKey": false, + "notNull": false, + "default": 30000 + }, + "retries": { + "name": "retries", + "type": "integer", + "primaryKey": false, + "notNull": false, + "default": 3 + }, + "enabled": { + "name": "enabled", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": true + }, + "last_connected": { + "name": "last_connected", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "connection_status": { + "name": "connection_status", + "type": "text", + "primaryKey": false, + "notNull": false, + "default": "'disconnected'" + }, + "last_error": { + "name": "last_error", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "tool_count": { + "name": "tool_count", + "type": "integer", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "last_tools_refresh": { + "name": "last_tools_refresh", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "total_requests": { + "name": "total_requests", + "type": "integer", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "last_used": { + "name": "last_used", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "deleted_at": { + "name": "deleted_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "mcp_servers_workspace_enabled_idx": { + "name": "mcp_servers_workspace_enabled_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "enabled", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "mcp_servers_workspace_deleted_idx": { + "name": "mcp_servers_workspace_deleted_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "deleted_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "mcp_servers_workspace_id_workspace_id_fk": { + "name": "mcp_servers_workspace_id_workspace_id_fk", + "tableFrom": "mcp_servers", + "tableTo": "workspace", + "columnsFrom": ["workspace_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "mcp_servers_created_by_user_id_fk": { + "name": "mcp_servers_created_by_user_id_fk", + "tableFrom": "mcp_servers", + "tableTo": "user", + "columnsFrom": ["created_by"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.member": { + "name": "member", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "organization_id": { + "name": "organization_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "role": { + "name": "role", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "member_user_id_idx": { + "name": "member_user_id_idx", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "member_organization_id_idx": { + "name": "member_organization_id_idx", + "columns": [ + { + "expression": "organization_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "member_user_id_user_id_fk": { + "name": "member_user_id_user_id_fk", + "tableFrom": "member", + "tableTo": "user", + "columnsFrom": ["user_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "member_organization_id_organization_id_fk": { + "name": "member_organization_id_organization_id_fk", + "tableFrom": "member", + "tableTo": "organization", + "columnsFrom": ["organization_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.memory": { + "name": "memory", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "workflow_id": { + "name": "workflow_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "key": { + "name": "key", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "data": { + "name": "data", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "deleted_at": { + "name": "deleted_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "memory_key_idx": { + "name": "memory_key_idx", + "columns": [ + { + "expression": "key", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "memory_workflow_idx": { + "name": "memory_workflow_idx", + "columns": [ + { + "expression": "workflow_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "memory_workflow_key_idx": { + "name": "memory_workflow_key_idx", + "columns": [ + { + "expression": "workflow_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "key", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "memory_workflow_id_workflow_id_fk": { + "name": "memory_workflow_id_workflow_id_fk", + "tableFrom": "memory", + "tableTo": "workflow", + "columnsFrom": ["workflow_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.organization": { + "name": "organization", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "slug": { + "name": "slug", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "logo": { + "name": "logo", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "metadata": { + "name": "metadata", + "type": "json", + "primaryKey": false, + "notNull": false + }, + "org_usage_limit": { + "name": "org_usage_limit", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "storage_used_bytes": { + "name": "storage_used_bytes", + "type": "bigint", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "departed_member_usage": { + "name": "departed_member_usage", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": "'0'" + }, + "credit_balance": { + "name": "credit_balance", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": "'0'" + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.paused_executions": { + "name": "paused_executions", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "workflow_id": { + "name": "workflow_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "execution_id": { + "name": "execution_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "execution_snapshot": { + "name": "execution_snapshot", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "pause_points": { + "name": "pause_points", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "total_pause_count": { + "name": "total_pause_count", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "resumed_count": { + "name": "resumed_count", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "status": { + "name": "status", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'paused'" + }, + "metadata": { + "name": "metadata", + "type": "jsonb", + "primaryKey": false, + "notNull": true, + "default": "'{}'::jsonb" + }, + "paused_at": { + "name": "paused_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "expires_at": { + "name": "expires_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "paused_executions_workflow_id_idx": { + "name": "paused_executions_workflow_id_idx", + "columns": [ + { + "expression": "workflow_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "paused_executions_status_idx": { + "name": "paused_executions_status_idx", + "columns": [ + { + "expression": "status", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "paused_executions_execution_id_unique": { + "name": "paused_executions_execution_id_unique", + "columns": [ + { + "expression": "execution_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "paused_executions_workflow_id_workflow_id_fk": { + "name": "paused_executions_workflow_id_workflow_id_fk", + "tableFrom": "paused_executions", + "tableTo": "workflow", + "columnsFrom": ["workflow_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.permissions": { + "name": "permissions", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "entity_type": { + "name": "entity_type", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "entity_id": { + "name": "entity_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "permission_type": { + "name": "permission_type", + "type": "permission_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "permissions_user_id_idx": { + "name": "permissions_user_id_idx", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "permissions_entity_idx": { + "name": "permissions_entity_idx", + "columns": [ + { + "expression": "entity_type", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "entity_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "permissions_user_entity_type_idx": { + "name": "permissions_user_entity_type_idx", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "entity_type", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "permissions_user_entity_permission_idx": { + "name": "permissions_user_entity_permission_idx", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "entity_type", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "permission_type", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "permissions_user_entity_idx": { + "name": "permissions_user_entity_idx", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "entity_type", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "entity_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "permissions_unique_constraint": { + "name": "permissions_unique_constraint", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "entity_type", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "entity_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "permissions_user_id_user_id_fk": { + "name": "permissions_user_id_user_id_fk", + "tableFrom": "permissions", + "tableTo": "user", + "columnsFrom": ["user_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.rate_limit_bucket": { + "name": "rate_limit_bucket", + "schema": "", + "columns": { + "key": { + "name": "key", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "tokens": { + "name": "tokens", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "last_refill_at": { + "name": "last_refill_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.resume_queue": { + "name": "resume_queue", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "paused_execution_id": { + "name": "paused_execution_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "parent_execution_id": { + "name": "parent_execution_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "new_execution_id": { + "name": "new_execution_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "context_id": { + "name": "context_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "resume_input": { + "name": "resume_input", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "status": { + "name": "status", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'pending'" + }, + "queued_at": { + "name": "queued_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "claimed_at": { + "name": "claimed_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "completed_at": { + "name": "completed_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "failure_reason": { + "name": "failure_reason", + "type": "text", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "resume_queue_parent_status_idx": { + "name": "resume_queue_parent_status_idx", + "columns": [ + { + "expression": "parent_execution_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "status", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "queued_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "resume_queue_new_execution_idx": { + "name": "resume_queue_new_execution_idx", + "columns": [ + { + "expression": "new_execution_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "resume_queue_paused_execution_id_paused_executions_id_fk": { + "name": "resume_queue_paused_execution_id_paused_executions_id_fk", + "tableFrom": "resume_queue", + "tableTo": "paused_executions", + "columnsFrom": ["paused_execution_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.session": { + "name": "session", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "expires_at": { + "name": "expires_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true + }, + "token": { + "name": "token", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true + }, + "ip_address": { + "name": "ip_address", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "user_agent": { + "name": "user_agent", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "active_organization_id": { + "name": "active_organization_id", + "type": "text", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "session_user_id_idx": { + "name": "session_user_id_idx", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "session_token_idx": { + "name": "session_token_idx", + "columns": [ + { + "expression": "token", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "session_user_id_user_id_fk": { + "name": "session_user_id_user_id_fk", + "tableFrom": "session", + "tableTo": "user", + "columnsFrom": ["user_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "session_active_organization_id_organization_id_fk": { + "name": "session_active_organization_id_organization_id_fk", + "tableFrom": "session", + "tableTo": "organization", + "columnsFrom": ["active_organization_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "session_token_unique": { + "name": "session_token_unique", + "nullsNotDistinct": false, + "columns": ["token"] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.settings": { + "name": "settings", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "theme": { + "name": "theme", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'system'" + }, + "auto_connect": { + "name": "auto_connect", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": true + }, + "telemetry_enabled": { + "name": "telemetry_enabled", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": true + }, + "email_preferences": { + "name": "email_preferences", + "type": "json", + "primaryKey": false, + "notNull": true, + "default": "'{}'" + }, + "billing_usage_notifications_enabled": { + "name": "billing_usage_notifications_enabled", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": true + }, + "show_training_controls": { + "name": "show_training_controls", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "super_user_mode_enabled": { + "name": "super_user_mode_enabled", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": true + }, + "error_notifications_enabled": { + "name": "error_notifications_enabled", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": true + }, + "copilot_enabled_models": { + "name": "copilot_enabled_models", + "type": "jsonb", + "primaryKey": false, + "notNull": true, + "default": "'{}'" + }, + "copilot_auto_allowed_tools": { + "name": "copilot_auto_allowed_tools", + "type": "jsonb", + "primaryKey": false, + "notNull": true, + "default": "'[]'" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": { + "settings_user_id_user_id_fk": { + "name": "settings_user_id_user_id_fk", + "tableFrom": "settings", + "tableTo": "user", + "columnsFrom": ["user_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "settings_user_id_unique": { + "name": "settings_user_id_unique", + "nullsNotDistinct": false, + "columns": ["user_id"] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.sso_provider": { + "name": "sso_provider", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "issuer": { + "name": "issuer", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "domain": { + "name": "domain", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "oidc_config": { + "name": "oidc_config", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "saml_config": { + "name": "saml_config", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "provider_id": { + "name": "provider_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "organization_id": { + "name": "organization_id", + "type": "text", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "sso_provider_provider_id_idx": { + "name": "sso_provider_provider_id_idx", + "columns": [ + { + "expression": "provider_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "sso_provider_domain_idx": { + "name": "sso_provider_domain_idx", + "columns": [ + { + "expression": "domain", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "sso_provider_user_id_idx": { + "name": "sso_provider_user_id_idx", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "sso_provider_organization_id_idx": { + "name": "sso_provider_organization_id_idx", + "columns": [ + { + "expression": "organization_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "sso_provider_user_id_user_id_fk": { + "name": "sso_provider_user_id_user_id_fk", + "tableFrom": "sso_provider", + "tableTo": "user", + "columnsFrom": ["user_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "sso_provider_organization_id_organization_id_fk": { + "name": "sso_provider_organization_id_organization_id_fk", + "tableFrom": "sso_provider", + "tableTo": "organization", + "columnsFrom": ["organization_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.subscription": { + "name": "subscription", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "plan": { + "name": "plan", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "reference_id": { + "name": "reference_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "stripe_customer_id": { + "name": "stripe_customer_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "stripe_subscription_id": { + "name": "stripe_subscription_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "status": { + "name": "status", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "period_start": { + "name": "period_start", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "period_end": { + "name": "period_end", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "cancel_at_period_end": { + "name": "cancel_at_period_end", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "seats": { + "name": "seats", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "trial_start": { + "name": "trial_start", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "trial_end": { + "name": "trial_end", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "metadata": { + "name": "metadata", + "type": "json", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "subscription_reference_status_idx": { + "name": "subscription_reference_status_idx", + "columns": [ + { + "expression": "reference_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "status", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": { + "check_enterprise_metadata": { + "name": "check_enterprise_metadata", + "value": "plan != 'enterprise' OR metadata IS NOT NULL" + } + }, + "isRLSEnabled": false + }, + "public.template_creators": { + "name": "template_creators", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "reference_type": { + "name": "reference_type", + "type": "template_creator_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "reference_id": { + "name": "reference_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "profile_image_url": { + "name": "profile_image_url", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "details": { + "name": "details", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "verified": { + "name": "verified", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "created_by": { + "name": "created_by", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "template_creators_reference_idx": { + "name": "template_creators_reference_idx", + "columns": [ + { + "expression": "reference_type", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "reference_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "template_creators_reference_id_idx": { + "name": "template_creators_reference_id_idx", + "columns": [ + { + "expression": "reference_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "template_creators_created_by_idx": { + "name": "template_creators_created_by_idx", + "columns": [ + { + "expression": "created_by", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "template_creators_created_by_user_id_fk": { + "name": "template_creators_created_by_user_id_fk", + "tableFrom": "template_creators", + "tableTo": "user", + "columnsFrom": ["created_by"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.template_stars": { + "name": "template_stars", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "template_id": { + "name": "template_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "starred_at": { + "name": "starred_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "template_stars_user_id_idx": { + "name": "template_stars_user_id_idx", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "template_stars_template_id_idx": { + "name": "template_stars_template_id_idx", + "columns": [ + { + "expression": "template_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "template_stars_user_template_idx": { + "name": "template_stars_user_template_idx", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "template_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "template_stars_template_user_idx": { + "name": "template_stars_template_user_idx", + "columns": [ + { + "expression": "template_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "template_stars_starred_at_idx": { + "name": "template_stars_starred_at_idx", + "columns": [ + { + "expression": "starred_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "template_stars_template_starred_at_idx": { + "name": "template_stars_template_starred_at_idx", + "columns": [ + { + "expression": "template_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "starred_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "template_stars_user_template_unique": { + "name": "template_stars_user_template_unique", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "template_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "template_stars_user_id_user_id_fk": { + "name": "template_stars_user_id_user_id_fk", + "tableFrom": "template_stars", + "tableTo": "user", + "columnsFrom": ["user_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "template_stars_template_id_templates_id_fk": { + "name": "template_stars_template_id_templates_id_fk", + "tableFrom": "template_stars", + "tableTo": "templates", + "columnsFrom": ["template_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.templates": { + "name": "templates", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "workflow_id": { + "name": "workflow_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "details": { + "name": "details", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "creator_id": { + "name": "creator_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "views": { + "name": "views", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "stars": { + "name": "stars", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "status": { + "name": "status", + "type": "template_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'pending'" + }, + "tags": { + "name": "tags", + "type": "text[]", + "primaryKey": false, + "notNull": true, + "default": "'{}'::text[]" + }, + "required_credentials": { + "name": "required_credentials", + "type": "jsonb", + "primaryKey": false, + "notNull": true, + "default": "'[]'" + }, + "state": { + "name": "state", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "templates_status_idx": { + "name": "templates_status_idx", + "columns": [ + { + "expression": "status", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "templates_creator_id_idx": { + "name": "templates_creator_id_idx", + "columns": [ + { + "expression": "creator_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "templates_views_idx": { + "name": "templates_views_idx", + "columns": [ + { + "expression": "views", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "templates_stars_idx": { + "name": "templates_stars_idx", + "columns": [ + { + "expression": "stars", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "templates_status_views_idx": { + "name": "templates_status_views_idx", + "columns": [ + { + "expression": "status", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "views", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "templates_status_stars_idx": { + "name": "templates_status_stars_idx", + "columns": [ + { + "expression": "status", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "stars", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "templates_created_at_idx": { + "name": "templates_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "templates_updated_at_idx": { + "name": "templates_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "templates_workflow_id_workflow_id_fk": { + "name": "templates_workflow_id_workflow_id_fk", + "tableFrom": "templates", + "tableTo": "workflow", + "columnsFrom": ["workflow_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + }, + "templates_creator_id_template_creators_id_fk": { + "name": "templates_creator_id_template_creators_id_fk", + "tableFrom": "templates", + "tableTo": "template_creators", + "columnsFrom": ["creator_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.user": { + "name": "user", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "email": { + "name": "email", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "email_verified": { + "name": "email_verified", + "type": "boolean", + "primaryKey": false, + "notNull": true + }, + "image": { + "name": "image", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true + }, + "stripe_customer_id": { + "name": "stripe_customer_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "is_super_user": { + "name": "is_super_user", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "user_email_unique": { + "name": "user_email_unique", + "nullsNotDistinct": false, + "columns": ["email"] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.user_stats": { + "name": "user_stats", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "total_manual_executions": { + "name": "total_manual_executions", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "total_api_calls": { + "name": "total_api_calls", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "total_webhook_triggers": { + "name": "total_webhook_triggers", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "total_scheduled_executions": { + "name": "total_scheduled_executions", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "total_chat_executions": { + "name": "total_chat_executions", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "total_tokens_used": { + "name": "total_tokens_used", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "total_cost": { + "name": "total_cost", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": "'0'" + }, + "current_usage_limit": { + "name": "current_usage_limit", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": "'10'" + }, + "usage_limit_updated_at": { + "name": "usage_limit_updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false, + "default": "now()" + }, + "current_period_cost": { + "name": "current_period_cost", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": "'0'" + }, + "last_period_cost": { + "name": "last_period_cost", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": "'0'" + }, + "billed_overage_this_period": { + "name": "billed_overage_this_period", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": "'0'" + }, + "pro_period_cost_snapshot": { + "name": "pro_period_cost_snapshot", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": "'0'" + }, + "credit_balance": { + "name": "credit_balance", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": "'0'" + }, + "total_copilot_cost": { + "name": "total_copilot_cost", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": "'0'" + }, + "current_period_copilot_cost": { + "name": "current_period_copilot_cost", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": "'0'" + }, + "last_period_copilot_cost": { + "name": "last_period_copilot_cost", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": "'0'" + }, + "total_copilot_tokens": { + "name": "total_copilot_tokens", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "total_copilot_calls": { + "name": "total_copilot_calls", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "storage_used_bytes": { + "name": "storage_used_bytes", + "type": "bigint", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "last_active": { + "name": "last_active", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "billing_blocked": { + "name": "billing_blocked", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "billing_blocked_reason": { + "name": "billing_blocked_reason", + "type": "billing_blocked_reason", + "typeSchema": "public", + "primaryKey": false, + "notNull": false + } + }, + "indexes": {}, + "foreignKeys": { + "user_stats_user_id_user_id_fk": { + "name": "user_stats_user_id_user_id_fk", + "tableFrom": "user_stats", + "tableTo": "user", + "columnsFrom": ["user_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "user_stats_user_id_unique": { + "name": "user_stats_user_id_unique", + "nullsNotDistinct": false, + "columns": ["user_id"] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.verification": { + "name": "verification", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "identifier": { + "name": "identifier", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "value": { + "name": "value", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "expires_at": { + "name": "expires_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "verification_identifier_idx": { + "name": "verification_identifier_idx", + "columns": [ + { + "expression": "identifier", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.waitlist": { + "name": "waitlist", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "email": { + "name": "email", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "status": { + "name": "status", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'pending'" + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "waitlist_email_unique": { + "name": "waitlist_email_unique", + "nullsNotDistinct": false, + "columns": ["email"] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.webhook": { + "name": "webhook", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "workflow_id": { + "name": "workflow_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "block_id": { + "name": "block_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "path": { + "name": "path", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "provider": { + "name": "provider", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "provider_config": { + "name": "provider_config", + "type": "json", + "primaryKey": false, + "notNull": false + }, + "is_active": { + "name": "is_active", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": true + }, + "failed_count": { + "name": "failed_count", + "type": "integer", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "last_failed_at": { + "name": "last_failed_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "path_idx": { + "name": "path_idx", + "columns": [ + { + "expression": "path", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "idx_webhook_on_workflow_id_block_id": { + "name": "idx_webhook_on_workflow_id_block_id", + "columns": [ + { + "expression": "workflow_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "block_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "webhook_workflow_id_workflow_id_fk": { + "name": "webhook_workflow_id_workflow_id_fk", + "tableFrom": "webhook", + "tableTo": "workflow", + "columnsFrom": ["workflow_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "webhook_block_id_workflow_blocks_id_fk": { + "name": "webhook_block_id_workflow_blocks_id_fk", + "tableFrom": "webhook", + "tableTo": "workflow_blocks", + "columnsFrom": ["block_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.workflow": { + "name": "workflow", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "workspace_id": { + "name": "workspace_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "folder_id": { + "name": "folder_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "color": { + "name": "color", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'#3972F6'" + }, + "last_synced": { + "name": "last_synced", + "type": "timestamp", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true + }, + "is_deployed": { + "name": "is_deployed", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "deployed_at": { + "name": "deployed_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "run_count": { + "name": "run_count", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "last_run_at": { + "name": "last_run_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "variables": { + "name": "variables", + "type": "json", + "primaryKey": false, + "notNull": false, + "default": "'{}'" + } + }, + "indexes": { + "workflow_user_id_idx": { + "name": "workflow_user_id_idx", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workflow_workspace_id_idx": { + "name": "workflow_workspace_id_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workflow_user_workspace_idx": { + "name": "workflow_user_workspace_idx", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "workflow_user_id_user_id_fk": { + "name": "workflow_user_id_user_id_fk", + "tableFrom": "workflow", + "tableTo": "user", + "columnsFrom": ["user_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "workflow_workspace_id_workspace_id_fk": { + "name": "workflow_workspace_id_workspace_id_fk", + "tableFrom": "workflow", + "tableTo": "workspace", + "columnsFrom": ["workspace_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "workflow_folder_id_workflow_folder_id_fk": { + "name": "workflow_folder_id_workflow_folder_id_fk", + "tableFrom": "workflow", + "tableTo": "workflow_folder", + "columnsFrom": ["folder_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.workflow_blocks": { + "name": "workflow_blocks", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "workflow_id": { + "name": "workflow_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "type": { + "name": "type", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "position_x": { + "name": "position_x", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "position_y": { + "name": "position_y", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "enabled": { + "name": "enabled", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": true + }, + "horizontal_handles": { + "name": "horizontal_handles", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": true + }, + "is_wide": { + "name": "is_wide", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "advanced_mode": { + "name": "advanced_mode", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "trigger_mode": { + "name": "trigger_mode", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "height": { + "name": "height", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": "'0'" + }, + "sub_blocks": { + "name": "sub_blocks", + "type": "jsonb", + "primaryKey": false, + "notNull": true, + "default": "'{}'" + }, + "outputs": { + "name": "outputs", + "type": "jsonb", + "primaryKey": false, + "notNull": true, + "default": "'{}'" + }, + "data": { + "name": "data", + "type": "jsonb", + "primaryKey": false, + "notNull": false, + "default": "'{}'" + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "workflow_blocks_workflow_id_idx": { + "name": "workflow_blocks_workflow_id_idx", + "columns": [ + { + "expression": "workflow_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "workflow_blocks_workflow_id_workflow_id_fk": { + "name": "workflow_blocks_workflow_id_workflow_id_fk", + "tableFrom": "workflow_blocks", + "tableTo": "workflow", + "columnsFrom": ["workflow_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.workflow_checkpoints": { + "name": "workflow_checkpoints", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "workflow_id": { + "name": "workflow_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "chat_id": { + "name": "chat_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "message_id": { + "name": "message_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "workflow_state": { + "name": "workflow_state", + "type": "json", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "workflow_checkpoints_user_id_idx": { + "name": "workflow_checkpoints_user_id_idx", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workflow_checkpoints_workflow_id_idx": { + "name": "workflow_checkpoints_workflow_id_idx", + "columns": [ + { + "expression": "workflow_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workflow_checkpoints_chat_id_idx": { + "name": "workflow_checkpoints_chat_id_idx", + "columns": [ + { + "expression": "chat_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workflow_checkpoints_message_id_idx": { + "name": "workflow_checkpoints_message_id_idx", + "columns": [ + { + "expression": "message_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workflow_checkpoints_user_workflow_idx": { + "name": "workflow_checkpoints_user_workflow_idx", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "workflow_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workflow_checkpoints_workflow_chat_idx": { + "name": "workflow_checkpoints_workflow_chat_idx", + "columns": [ + { + "expression": "workflow_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "chat_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workflow_checkpoints_created_at_idx": { + "name": "workflow_checkpoints_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workflow_checkpoints_chat_created_at_idx": { + "name": "workflow_checkpoints_chat_created_at_idx", + "columns": [ + { + "expression": "chat_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "workflow_checkpoints_user_id_user_id_fk": { + "name": "workflow_checkpoints_user_id_user_id_fk", + "tableFrom": "workflow_checkpoints", + "tableTo": "user", + "columnsFrom": ["user_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "workflow_checkpoints_workflow_id_workflow_id_fk": { + "name": "workflow_checkpoints_workflow_id_workflow_id_fk", + "tableFrom": "workflow_checkpoints", + "tableTo": "workflow", + "columnsFrom": ["workflow_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "workflow_checkpoints_chat_id_copilot_chats_id_fk": { + "name": "workflow_checkpoints_chat_id_copilot_chats_id_fk", + "tableFrom": "workflow_checkpoints", + "tableTo": "copilot_chats", + "columnsFrom": ["chat_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.workflow_deployment_version": { + "name": "workflow_deployment_version", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "workflow_id": { + "name": "workflow_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "version": { + "name": "version", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "state": { + "name": "state", + "type": "json", + "primaryKey": false, + "notNull": true + }, + "is_active": { + "name": "is_active", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_by": { + "name": "created_by", + "type": "text", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "workflow_deployment_version_workflow_version_unique": { + "name": "workflow_deployment_version_workflow_version_unique", + "columns": [ + { + "expression": "workflow_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "version", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workflow_deployment_version_workflow_active_idx": { + "name": "workflow_deployment_version_workflow_active_idx", + "columns": [ + { + "expression": "workflow_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "is_active", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workflow_deployment_version_created_at_idx": { + "name": "workflow_deployment_version_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "workflow_deployment_version_workflow_id_workflow_id_fk": { + "name": "workflow_deployment_version_workflow_id_workflow_id_fk", + "tableFrom": "workflow_deployment_version", + "tableTo": "workflow", + "columnsFrom": ["workflow_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.workflow_edges": { + "name": "workflow_edges", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "workflow_id": { + "name": "workflow_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "source_block_id": { + "name": "source_block_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "target_block_id": { + "name": "target_block_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "source_handle": { + "name": "source_handle", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "target_handle": { + "name": "target_handle", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "workflow_edges_workflow_id_idx": { + "name": "workflow_edges_workflow_id_idx", + "columns": [ + { + "expression": "workflow_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workflow_edges_workflow_source_idx": { + "name": "workflow_edges_workflow_source_idx", + "columns": [ + { + "expression": "workflow_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "source_block_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workflow_edges_workflow_target_idx": { + "name": "workflow_edges_workflow_target_idx", + "columns": [ + { + "expression": "workflow_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "target_block_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "workflow_edges_workflow_id_workflow_id_fk": { + "name": "workflow_edges_workflow_id_workflow_id_fk", + "tableFrom": "workflow_edges", + "tableTo": "workflow", + "columnsFrom": ["workflow_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "workflow_edges_source_block_id_workflow_blocks_id_fk": { + "name": "workflow_edges_source_block_id_workflow_blocks_id_fk", + "tableFrom": "workflow_edges", + "tableTo": "workflow_blocks", + "columnsFrom": ["source_block_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "workflow_edges_target_block_id_workflow_blocks_id_fk": { + "name": "workflow_edges_target_block_id_workflow_blocks_id_fk", + "tableFrom": "workflow_edges", + "tableTo": "workflow_blocks", + "columnsFrom": ["target_block_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.workflow_execution_logs": { + "name": "workflow_execution_logs", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "workflow_id": { + "name": "workflow_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "execution_id": { + "name": "execution_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "state_snapshot_id": { + "name": "state_snapshot_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "deployment_version_id": { + "name": "deployment_version_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "level": { + "name": "level", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "trigger": { + "name": "trigger", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "started_at": { + "name": "started_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true + }, + "ended_at": { + "name": "ended_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "total_duration_ms": { + "name": "total_duration_ms", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "execution_data": { + "name": "execution_data", + "type": "jsonb", + "primaryKey": false, + "notNull": true, + "default": "'{}'" + }, + "cost": { + "name": "cost", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "files": { + "name": "files", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "workflow_execution_logs_workflow_id_idx": { + "name": "workflow_execution_logs_workflow_id_idx", + "columns": [ + { + "expression": "workflow_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workflow_execution_logs_state_snapshot_id_idx": { + "name": "workflow_execution_logs_state_snapshot_id_idx", + "columns": [ + { + "expression": "state_snapshot_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workflow_execution_logs_deployment_version_id_idx": { + "name": "workflow_execution_logs_deployment_version_id_idx", + "columns": [ + { + "expression": "deployment_version_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workflow_execution_logs_trigger_idx": { + "name": "workflow_execution_logs_trigger_idx", + "columns": [ + { + "expression": "trigger", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workflow_execution_logs_level_idx": { + "name": "workflow_execution_logs_level_idx", + "columns": [ + { + "expression": "level", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workflow_execution_logs_started_at_idx": { + "name": "workflow_execution_logs_started_at_idx", + "columns": [ + { + "expression": "started_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workflow_execution_logs_execution_id_unique": { + "name": "workflow_execution_logs_execution_id_unique", + "columns": [ + { + "expression": "execution_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workflow_execution_logs_workflow_started_at_idx": { + "name": "workflow_execution_logs_workflow_started_at_idx", + "columns": [ + { + "expression": "workflow_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "started_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "workflow_execution_logs_workflow_id_workflow_id_fk": { + "name": "workflow_execution_logs_workflow_id_workflow_id_fk", + "tableFrom": "workflow_execution_logs", + "tableTo": "workflow", + "columnsFrom": ["workflow_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "workflow_execution_logs_state_snapshot_id_workflow_execution_snapshots_id_fk": { + "name": "workflow_execution_logs_state_snapshot_id_workflow_execution_snapshots_id_fk", + "tableFrom": "workflow_execution_logs", + "tableTo": "workflow_execution_snapshots", + "columnsFrom": ["state_snapshot_id"], + "columnsTo": ["id"], + "onDelete": "no action", + "onUpdate": "no action" + }, + "workflow_execution_logs_deployment_version_id_workflow_deployment_version_id_fk": { + "name": "workflow_execution_logs_deployment_version_id_workflow_deployment_version_id_fk", + "tableFrom": "workflow_execution_logs", + "tableTo": "workflow_deployment_version", + "columnsFrom": ["deployment_version_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.workflow_execution_snapshots": { + "name": "workflow_execution_snapshots", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "workflow_id": { + "name": "workflow_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "state_hash": { + "name": "state_hash", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "state_data": { + "name": "state_data", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "workflow_snapshots_workflow_id_idx": { + "name": "workflow_snapshots_workflow_id_idx", + "columns": [ + { + "expression": "workflow_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workflow_snapshots_hash_idx": { + "name": "workflow_snapshots_hash_idx", + "columns": [ + { + "expression": "state_hash", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workflow_snapshots_workflow_hash_idx": { + "name": "workflow_snapshots_workflow_hash_idx", + "columns": [ + { + "expression": "workflow_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "state_hash", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workflow_snapshots_created_at_idx": { + "name": "workflow_snapshots_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "workflow_execution_snapshots_workflow_id_workflow_id_fk": { + "name": "workflow_execution_snapshots_workflow_id_workflow_id_fk", + "tableFrom": "workflow_execution_snapshots", + "tableTo": "workflow", + "columnsFrom": ["workflow_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.workflow_folder": { + "name": "workflow_folder", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "workspace_id": { + "name": "workspace_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "parent_id": { + "name": "parent_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "color": { + "name": "color", + "type": "text", + "primaryKey": false, + "notNull": false, + "default": "'#6B7280'" + }, + "is_expanded": { + "name": "is_expanded", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": true + }, + "sort_order": { + "name": "sort_order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "workflow_folder_user_idx": { + "name": "workflow_folder_user_idx", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workflow_folder_workspace_parent_idx": { + "name": "workflow_folder_workspace_parent_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workflow_folder_parent_sort_idx": { + "name": "workflow_folder_parent_sort_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "sort_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "workflow_folder_user_id_user_id_fk": { + "name": "workflow_folder_user_id_user_id_fk", + "tableFrom": "workflow_folder", + "tableTo": "user", + "columnsFrom": ["user_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "workflow_folder_workspace_id_workspace_id_fk": { + "name": "workflow_folder_workspace_id_workspace_id_fk", + "tableFrom": "workflow_folder", + "tableTo": "workspace", + "columnsFrom": ["workspace_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.workflow_schedule": { + "name": "workflow_schedule", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "workflow_id": { + "name": "workflow_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "block_id": { + "name": "block_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "cron_expression": { + "name": "cron_expression", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "next_run_at": { + "name": "next_run_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "last_ran_at": { + "name": "last_ran_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "last_queued_at": { + "name": "last_queued_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "trigger_type": { + "name": "trigger_type", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "timezone": { + "name": "timezone", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'UTC'" + }, + "failed_count": { + "name": "failed_count", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "status": { + "name": "status", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'active'" + }, + "last_failed_at": { + "name": "last_failed_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "workflow_schedule_workflow_block_unique": { + "name": "workflow_schedule_workflow_block_unique", + "columns": [ + { + "expression": "workflow_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "block_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "workflow_schedule_workflow_id_workflow_id_fk": { + "name": "workflow_schedule_workflow_id_workflow_id_fk", + "tableFrom": "workflow_schedule", + "tableTo": "workflow", + "columnsFrom": ["workflow_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "workflow_schedule_block_id_workflow_blocks_id_fk": { + "name": "workflow_schedule_block_id_workflow_blocks_id_fk", + "tableFrom": "workflow_schedule", + "tableTo": "workflow_blocks", + "columnsFrom": ["block_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.workflow_subflows": { + "name": "workflow_subflows", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "workflow_id": { + "name": "workflow_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "type": { + "name": "type", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "config": { + "name": "config", + "type": "jsonb", + "primaryKey": false, + "notNull": true, + "default": "'{}'" + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "workflow_subflows_workflow_id_idx": { + "name": "workflow_subflows_workflow_id_idx", + "columns": [ + { + "expression": "workflow_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workflow_subflows_workflow_type_idx": { + "name": "workflow_subflows_workflow_type_idx", + "columns": [ + { + "expression": "workflow_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "type", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "workflow_subflows_workflow_id_workflow_id_fk": { + "name": "workflow_subflows_workflow_id_workflow_id_fk", + "tableFrom": "workflow_subflows", + "tableTo": "workflow", + "columnsFrom": ["workflow_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.workspace": { + "name": "workspace", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "owner_id": { + "name": "owner_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "billed_account_user_id": { + "name": "billed_account_user_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "allow_personal_api_keys": { + "name": "allow_personal_api_keys", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": { + "workspace_owner_id_user_id_fk": { + "name": "workspace_owner_id_user_id_fk", + "tableFrom": "workspace", + "tableTo": "user", + "columnsFrom": ["owner_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "workspace_billed_account_user_id_user_id_fk": { + "name": "workspace_billed_account_user_id_user_id_fk", + "tableFrom": "workspace", + "tableTo": "user", + "columnsFrom": ["billed_account_user_id"], + "columnsTo": ["id"], + "onDelete": "no action", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.workspace_environment": { + "name": "workspace_environment", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "workspace_id": { + "name": "workspace_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "variables": { + "name": "variables", + "type": "json", + "primaryKey": false, + "notNull": true, + "default": "'{}'" + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "workspace_environment_workspace_unique": { + "name": "workspace_environment_workspace_unique", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "workspace_environment_workspace_id_workspace_id_fk": { + "name": "workspace_environment_workspace_id_workspace_id_fk", + "tableFrom": "workspace_environment", + "tableTo": "workspace", + "columnsFrom": ["workspace_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.workspace_file": { + "name": "workspace_file", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "workspace_id": { + "name": "workspace_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "key": { + "name": "key", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "size": { + "name": "size", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "type": { + "name": "type", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "uploaded_by": { + "name": "uploaded_by", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "uploaded_at": { + "name": "uploaded_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "workspace_file_workspace_id_idx": { + "name": "workspace_file_workspace_id_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workspace_file_key_idx": { + "name": "workspace_file_key_idx", + "columns": [ + { + "expression": "key", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "workspace_file_workspace_id_workspace_id_fk": { + "name": "workspace_file_workspace_id_workspace_id_fk", + "tableFrom": "workspace_file", + "tableTo": "workspace", + "columnsFrom": ["workspace_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "workspace_file_uploaded_by_user_id_fk": { + "name": "workspace_file_uploaded_by_user_id_fk", + "tableFrom": "workspace_file", + "tableTo": "user", + "columnsFrom": ["uploaded_by"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "workspace_file_key_unique": { + "name": "workspace_file_key_unique", + "nullsNotDistinct": false, + "columns": ["key"] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.workspace_files": { + "name": "workspace_files", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "key": { + "name": "key", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "workspace_id": { + "name": "workspace_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "context": { + "name": "context", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "original_name": { + "name": "original_name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "content_type": { + "name": "content_type", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "size": { + "name": "size", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "uploaded_at": { + "name": "uploaded_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "workspace_files_key_idx": { + "name": "workspace_files_key_idx", + "columns": [ + { + "expression": "key", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workspace_files_user_id_idx": { + "name": "workspace_files_user_id_idx", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workspace_files_workspace_id_idx": { + "name": "workspace_files_workspace_id_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workspace_files_context_idx": { + "name": "workspace_files_context_idx", + "columns": [ + { + "expression": "context", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "workspace_files_user_id_user_id_fk": { + "name": "workspace_files_user_id_user_id_fk", + "tableFrom": "workspace_files", + "tableTo": "user", + "columnsFrom": ["user_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "workspace_files_workspace_id_workspace_id_fk": { + "name": "workspace_files_workspace_id_workspace_id_fk", + "tableFrom": "workspace_files", + "tableTo": "workspace", + "columnsFrom": ["workspace_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "workspace_files_key_unique": { + "name": "workspace_files_key_unique", + "nullsNotDistinct": false, + "columns": ["key"] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.workspace_invitation": { + "name": "workspace_invitation", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "workspace_id": { + "name": "workspace_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "email": { + "name": "email", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "inviter_id": { + "name": "inviter_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "role": { + "name": "role", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'member'" + }, + "status": { + "name": "status", + "type": "workspace_invitation_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'pending'" + }, + "token": { + "name": "token", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "permissions": { + "name": "permissions", + "type": "permission_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'admin'" + }, + "org_invitation_id": { + "name": "org_invitation_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "expires_at": { + "name": "expires_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": { + "workspace_invitation_workspace_id_workspace_id_fk": { + "name": "workspace_invitation_workspace_id_workspace_id_fk", + "tableFrom": "workspace_invitation", + "tableTo": "workspace", + "columnsFrom": ["workspace_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "workspace_invitation_inviter_id_user_id_fk": { + "name": "workspace_invitation_inviter_id_user_id_fk", + "tableFrom": "workspace_invitation", + "tableTo": "user", + "columnsFrom": ["inviter_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "workspace_invitation_token_unique": { + "name": "workspace_invitation_token_unique", + "nullsNotDistinct": false, + "columns": ["token"] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.workspace_notification_delivery": { + "name": "workspace_notification_delivery", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "subscription_id": { + "name": "subscription_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "workflow_id": { + "name": "workflow_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "execution_id": { + "name": "execution_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "status": { + "name": "status", + "type": "notification_delivery_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'pending'" + }, + "attempts": { + "name": "attempts", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "last_attempt_at": { + "name": "last_attempt_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "next_attempt_at": { + "name": "next_attempt_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "response_status": { + "name": "response_status", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "response_body": { + "name": "response_body", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "error_message": { + "name": "error_message", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "workspace_notification_delivery_subscription_id_idx": { + "name": "workspace_notification_delivery_subscription_id_idx", + "columns": [ + { + "expression": "subscription_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workspace_notification_delivery_execution_id_idx": { + "name": "workspace_notification_delivery_execution_id_idx", + "columns": [ + { + "expression": "execution_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workspace_notification_delivery_status_idx": { + "name": "workspace_notification_delivery_status_idx", + "columns": [ + { + "expression": "status", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workspace_notification_delivery_next_attempt_idx": { + "name": "workspace_notification_delivery_next_attempt_idx", + "columns": [ + { + "expression": "next_attempt_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "workspace_notification_delivery_subscription_id_workspace_notification_subscription_id_fk": { + "name": "workspace_notification_delivery_subscription_id_workspace_notification_subscription_id_fk", + "tableFrom": "workspace_notification_delivery", + "tableTo": "workspace_notification_subscription", + "columnsFrom": ["subscription_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "workspace_notification_delivery_workflow_id_workflow_id_fk": { + "name": "workspace_notification_delivery_workflow_id_workflow_id_fk", + "tableFrom": "workspace_notification_delivery", + "tableTo": "workflow", + "columnsFrom": ["workflow_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.workspace_notification_subscription": { + "name": "workspace_notification_subscription", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "workspace_id": { + "name": "workspace_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "notification_type": { + "name": "notification_type", + "type": "notification_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "workflow_ids": { + "name": "workflow_ids", + "type": "text[]", + "primaryKey": false, + "notNull": true, + "default": "'{}'::text[]" + }, + "all_workflows": { + "name": "all_workflows", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "level_filter": { + "name": "level_filter", + "type": "text[]", + "primaryKey": false, + "notNull": true, + "default": "ARRAY['info', 'error']::text[]" + }, + "trigger_filter": { + "name": "trigger_filter", + "type": "text[]", + "primaryKey": false, + "notNull": true, + "default": "ARRAY['api', 'webhook', 'schedule', 'manual', 'chat']::text[]" + }, + "include_final_output": { + "name": "include_final_output", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "include_trace_spans": { + "name": "include_trace_spans", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "include_rate_limits": { + "name": "include_rate_limits", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "include_usage_data": { + "name": "include_usage_data", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "webhook_config": { + "name": "webhook_config", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "email_recipients": { + "name": "email_recipients", + "type": "text[]", + "primaryKey": false, + "notNull": false + }, + "slack_config": { + "name": "slack_config", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "alert_config": { + "name": "alert_config", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "last_alert_at": { + "name": "last_alert_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "active": { + "name": "active", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": true + }, + "created_by": { + "name": "created_by", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "workspace_notification_workspace_id_idx": { + "name": "workspace_notification_workspace_id_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workspace_notification_active_idx": { + "name": "workspace_notification_active_idx", + "columns": [ + { + "expression": "active", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workspace_notification_type_idx": { + "name": "workspace_notification_type_idx", + "columns": [ + { + "expression": "notification_type", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "workspace_notification_subscription_workspace_id_workspace_id_fk": { + "name": "workspace_notification_subscription_workspace_id_workspace_id_fk", + "tableFrom": "workspace_notification_subscription", + "tableTo": "workspace", + "columnsFrom": ["workspace_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "workspace_notification_subscription_created_by_user_id_fk": { + "name": "workspace_notification_subscription_created_by_user_id_fk", + "tableFrom": "workspace_notification_subscription", + "tableTo": "user", + "columnsFrom": ["created_by"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + } + }, + "enums": { + "public.billing_blocked_reason": { + "name": "billing_blocked_reason", + "schema": "public", + "values": ["payment_failed", "dispute"] + }, + "public.notification_delivery_status": { + "name": "notification_delivery_status", + "schema": "public", + "values": ["pending", "in_progress", "success", "failed"] + }, + "public.notification_type": { + "name": "notification_type", + "schema": "public", + "values": ["webhook", "email", "slack"] + }, + "public.permission_type": { + "name": "permission_type", + "schema": "public", + "values": ["admin", "write", "read"] + }, + "public.template_creator_type": { + "name": "template_creator_type", + "schema": "public", + "values": ["user", "organization"] + }, + "public.template_status": { + "name": "template_status", + "schema": "public", + "values": ["pending", "approved", "rejected"] + }, + "public.workspace_invitation_status": { + "name": "workspace_invitation_status", + "schema": "public", + "values": ["pending", "accepted", "rejected", "cancelled"] + } + }, + "schemas": {}, + "sequences": {}, + "roles": {}, + "policies": {}, + "views": {}, + "_meta": { + "columns": {}, + "schemas": {}, + "tables": {} + } +} diff --git a/packages/db/migrations/meta/_journal.json b/packages/db/migrations/meta/_journal.json index 40770d1c96..9fdd91800b 100644 --- a/packages/db/migrations/meta/_journal.json +++ b/packages/db/migrations/meta/_journal.json @@ -841,6 +841,13 @@ "when": 1765339999291, "tag": "0120_illegal_moon_knight", "breakpoints": true + }, + { + "idx": 121, + "version": "7", + "when": 1765434895472, + "tag": "0121_new_mantis", + "breakpoints": true } ] } diff --git a/packages/db/schema.ts b/packages/db/schema.ts index c203f3c6c6..ab94f52453 100644 --- a/packages/db/schema.ts +++ b/packages/db/schema.ts @@ -293,6 +293,10 @@ export const workflowExecutionLogs = pgTable( stateSnapshotId: text('state_snapshot_id') .notNull() .references(() => workflowExecutionSnapshots.id), + deploymentVersionId: text('deployment_version_id').references( + () => workflowDeploymentVersion.id, + { onDelete: 'set null' } + ), level: text('level').notNull(), // 'info', 'error' trigger: text('trigger').notNull(), // 'api', 'webhook', 'schedule', 'manual', 'chat' @@ -311,6 +315,9 @@ export const workflowExecutionLogs = pgTable( stateSnapshotIdIdx: index('workflow_execution_logs_state_snapshot_id_idx').on( table.stateSnapshotId ), + deploymentVersionIdIdx: index('workflow_execution_logs_deployment_version_id_idx').on( + table.deploymentVersionId + ), triggerIdx: index('workflow_execution_logs_trigger_idx').on(table.trigger), levelIdx: index('workflow_execution_logs_level_idx').on(table.level), startedAtIdx: index('workflow_execution_logs_started_at_idx').on(table.startedAt),