- Add server-shared types for GetTitleRequest and GetTitleResponse with Zod validation
- Create database query functions for each asset type (chat, metric, collection, dashboard)
- Implement GET endpoint with zValidator middleware and exhaustive switch statement
- Add proper permission checks (publiclyAccessible OR organizationId match)
- Export new functions from database query index files
- Add title route to v2 API index
- Follow existing Hono API patterns with standardErrorHandler
Co-Authored-By: nate@buster.so <nate@buster.so>
- Simplify test assertion in test_wildcard_allowed_on_cte for better clarity
- Clean up validate_wildcard_on_tables logic to remove redundant checks
- Improve code readability and maintainability
Co-Authored-By: Dallin Bentley <dallinbentley98@gmail.com>
- Add BlockedWildcardUsage error variant to SqlAnalyzerError enum
- Enhance process_select_item to validate wildcards against physical tables
- Block SELECT * and qualified wildcards on physical database tables
- Allow wildcards on CTEs and derived tables
- Add comprehensive tests for all wildcard validation scenarios
- Maintain backward compatibility with legitimate query patterns
This security enhancement prevents bypassing column-level permissions
through wildcard queries on physical database tables while preserving
functionality for CTEs and other legitimate use cases.
Co-Authored-By: Dallin Bentley <dallinbentley98@gmail.com>
- Renamed `respondWithoutAnalysis` to `respondWithoutAssetCreation` across multiple files to better reflect its purpose.
- Updated the `think-and-prep-instructions.ts` to clarify the agent's focus on asset creation instead of analysis.
- Added a new file `think-and-prep-updates.ts` to implement the analyst workflow with improved error handling and response management.
- Commented out legacy code in `example_scorers.ts` and `metric.eval.ts` for clarity and future reference.
- Adjusted the `sequential-thinking-tool` to remove unnecessary fields and streamline the thought processing logic.
This refactor enhances the clarity and functionality of the think-and-prep agent, aligning it with the current project goals.
- Add authentication state detection using useSupabaseContext
- Detect embed page context using window.location.pathname
- Show 'Login' button with redirect parameter for unauthenticated users or embed pages
- Keep 'Go home' button for authenticated users without asset access
- Include current URL as redirect parameter in login link
Co-Authored-By: nate@buster.so <nate@buster.so>
- Update login page to be server component that extracts searchParams
- Pass redirectTo as prop to LoginForm instead of using useSearchParams
- Add helper function to reduce code duplication in middleware
- Add URL validation in layout component as suggested in PR comments
- Follow Next.js App Router best practices for server/client components
Co-Authored-By: nate@buster.so <nate@buster.so>