import { sqliteTable, text } from 'drizzle-orm/sqlite-core';
/**
 * Windows table schema (inlined for server build).
 * This is a copy of src/lib/db/schema.ts for the server build.
 * Keep in sync with the frontend schema.
 */
export const windows = sqliteTable('windows', {
    id: text('id').primaryKey(),
    directoryId: text('directory_id').notNull(),
    rootSessionId: text('root_session_id'), // The topmost session (never a subagent)
    activeSessionId: text('active_session_id'), // Currently viewed session (root or subagent)
    lastActiveAt: text('last_active_at'), // Timestamp for cross-device active window sync
    agent: text('agent'),
    modelProvider: text('model_provider'),
    modelId: text('model_id'),
    label: text('label'),
    createdAt: text('created_at').notNull(),
});
