Commit Graph

4732 Commits

Author SHA1 Message Date
Nate Kelley 7e86e84d16
Fix many type errors 2025-07-23 09:56:01 -06:00
dal 03ba461dc4
Merge remote-tracking branch 'origin/staging' into devin/BUS-1495-1753278753 2025-07-23 09:43:18 -06:00
dal 3a4498c4fa
Merge pull request #608 from buster-so/dallin/hotfix-disable-parallel-tool-calls
Add fetch body modification for tool_choice in Anthropics and Vertex models
2025-07-23 09:35:03 -06:00
dal 5aa781a536
Add fetch body modification for tool_choice in Anthropics and Vertex models
- Implemented a custom fetch function in both anthropic.ts and vertex.ts to modify the request body.
- If tool_choice is present, added disable_parallel_tool_use to the request body.
- Included error handling for JSON parsing to ensure fallback to original request on failure.
2025-07-23 09:32:07 -06:00
dal 06aa299760
Merge pull request #607 from buster-so/dal/hotfix-streaming-proxy
Implement AbortError handling in streaming models
2025-07-23 09:03:35 -06:00
dal f10627b005
Implement AbortError handling in streaming models
- Added tests for handling AbortError scenarios in both memory-safe and standard streaming models.
- Updated the FallbackModel to gracefully handle intentional aborts without retrying or causing errors.
- Ensured that the controller closes properly on AbortError and that no fallback to subsequent models occurs.
- Enhanced mock models to simulate AbortError conditions for comprehensive testing.
2025-07-23 09:01:08 -06:00
Nate Kelley 957c38c0ac
add basic vite integration and remove unused helpers 2025-07-23 08:52:47 -06:00
dal 481bbed328
Merge pull request #606 from buster-so/dallin/bus-1122-reviewpush-the-think-and-prep-mode-updates
Dallin/bus-1122-reviewpush-the-think-and-prep-mode-updates
2025-07-23 08:32:49 -06:00
dal 5be55782fc
Update packages/ai/src/utils/memory/message-converters.ts
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
2025-07-23 08:29:47 -06:00
dal 87aa4f1993
Update packages/ai/src/tools/communication-tools/respond-without-asset-creation.test.ts
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
2025-07-23 08:29:40 -06:00
dal 3161c2b5e1
Update packages/ai/src/utils/memory/message-converters.test.ts
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
2025-07-23 08:29:20 -06:00
dal 5b0b6f360b
Update packages/ai/src/utils/database/format-llm-messages-as-reasoning.ts
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
2025-07-23 08:29:06 -06:00
dal b1be6aacc2
Update packages/ai/src/tools/communication-tools/respond-without-asset-creation.ts
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
2025-07-23 08:28:58 -06:00
dal b13d7c71fb
Update packages/ai/evals/agents/analyst-agent/metrics/think-and-prep-updates.ts
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
2025-07-23 08:28:38 -06:00
Nate Kelley 9889f1403c
Create README.md 2025-07-23 08:28:35 -06:00
dal 6c52727b48
Update packages/ai/src/tools/communication-tools/respond-without-asset-creation.ts
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
2025-07-23 08:28:32 -06:00
Devin AI a44153e2ee fix: update permission validator tests to work with wildcard validation
- Replace SELECT * with explicit column names in permission validation tests
- Update CTE test to use explicit columns in final SELECT
- Maintain test intent while aligning with new wildcard security validation
- Ensure all tests pass with new wildcard blocking behavior

Co-Authored-By: Dallin Bentley <dallinbentley98@gmail.com>
2025-07-23 14:23:32 +00:00
Devin AI efd56f90a7 Fix max-rows-limiting test mocks for streaming implementation
- Update Snowflake adapter test to use streamResult: true
- Mock streamRows method with proper stream event handling
- Remove TypeScript error from destroyed property
- Verify streamRows called with correct start/end parameters

Co-Authored-By: Dallin Bentley <dallinbentley98@gmail.com>
2025-07-23 14:12:25 +00:00
dal 24cfab962d
refactor: rename respondWithoutAnalysis to respondWithoutAssetCreation
- Updated references across multiple files to reflect the new tool name.
- Adjusted unit tests and schemas to ensure compatibility with the renamed tool.
- Removed the old respondWithoutAnalysis tool implementation and its associated tests.
- Ensured backward compatibility for existing functionality using the old tool name.
2025-07-23 08:12:23 -06:00
dal 7ddc683104
Merge remote-tracking branch 'origin/blake/prompt-changes-think-and-prep' into dallin/bus-1122-reviewpush-the-think-and-prep-mode-updates 2025-07-23 07:59:52 -06:00
Devin AI 3ac9d8b159 fix: replace 'as any' with proper types to resolve linting violations
- Import Select from node-sql-parser for type safety
- Replace function parameter types with Record<string, unknown> for dynamic AST objects
- Use proper type conversions through 'unknown' for incompatible types
- Maintain existing wildcard validation functionality
- Resolve all 8 noExplicitAny linting violations

Co-Authored-By: Dallin Bentley <dallinbentley98@gmail.com>
2025-07-23 13:58:11 +00:00
dal 535777cc85
Merge pull request #604 from buster-so/dallin/bus-1488-try-switching-to-cloudflare-ai-gateway
feat: add Google Vertex AI and improve model handling
2025-07-23 07:57:20 -06:00
Devin AI 315a151a3f BUS-1495: Implement Snowflake adapter streaming with network-level row limiting
- Update query() method to use streamResult: true and stmt.streamRows()
- Add network-level row limiting with default 5000 row cap
- Process stream events (data, error, end) to build result set
- Maintain backward compatibility with existing adapter interface
- Update unit tests to mock streaming behavior
- Fix integration test imports and property names
- Preserve query caching by using original SQL unchanged

Co-Authored-By: Dallin Bentley <dallinbentley98@gmail.com>
2025-07-23 13:56:40 +00:00
dal 5f779a6fe1
logic fix and ci improvement 2025-07-23 07:54:31 -06:00
dal 584387b9c1
small test fixes for unit testing and such 2025-07-23 07:48:28 -06:00
Devin AI b38940939b feat: implement TypeScript wildcard validation for SQL security (BUS-1487)
- Add validateWildcardUsage function to sql-parser-helpers.ts
- Block SELECT * and qualified wildcards on physical database tables
- Allow wildcards on CTEs and derived tables
- Integrate wildcard validation into permission-validator.ts
- Add comprehensive tests for all wildcard validation scenarios
- Revert Rust SQL analyzer changes to focus on TypeScript implementation
- Fix CTE alias handling for qualified wildcards (e.g., SELECT cte_alias.*)

This prevents bypassing column-level permissions through wildcard queries
while maintaining backward compatibility with legitimate query patterns.

Co-Authored-By: Dallin Bentley <dallinbentley98@gmail.com>
2025-07-23 13:43:26 +00:00
Devin AI 8bea0e8401 Fix Biome linting error: wrap switch default case in block scope
- Add curly braces around default case content to satisfy noSwitchDeclarations rule
- Prevents variable declarations from being accessible to other switch cases
- Apply Biome formatting fixes for import statement and spacing

Co-Authored-By: nate@buster.so <nate@buster.so>
2025-07-23 13:38:45 +00:00
Devin AI fdca380134 feat: implement wildcard validation in TypeScript sql-parser-helpers
- Add validateWildcardUsage() function to block SELECT * on physical tables
- Allow wildcards on CTEs but block on physical database tables
- Add comprehensive tests for wildcard validation scenarios
- Integrate wildcard validation into permission validator
- Supports all SQL dialects via node-sql-parser
- Prevents permission bypass through wildcard queries

Co-Authored-By: Dallin Bentley <dallinbentley98@gmail.com>
2025-07-23 13:34:56 +00:00
Devin AI e0f0f6509a revert: remove Rust wildcard validation implementation
- Revert changes to apps/api/libs/sql_analyzer/src/errors.rs
- Revert changes to apps/api/libs/sql_analyzer/src/analysis.rs
- Revert changes to apps/api/libs/sql_analyzer/tests/analysis_tests.rs
- Focus on TypeScript implementation in sql-parser-helpers.ts instead

Co-Authored-By: Dallin Bentley <dallinbentley98@gmail.com>
2025-07-23 13:34:56 +00:00
Devin AI 783b95b190 Fix CI failures: correct import paths and user organization access
- Import database queries from main @buster/database package
- Use getUserOrganizationId() instead of user.organizationId
- Add proper error handling for users without organizations
- Follow existing patterns from other API handlers

Co-Authored-By: nate@buster.so <nate@buster.so>
2025-07-23 13:26:58 +00:00
dal 2cd36e47e1
feat: add Google Vertex AI and improve model handling
- Added support for Google Vertex AI model version 2.2.27 in pnpm-lock.yaml and package.json.
- Introduced new model wrappers for Sonnet4 and Haiku35 with fallback logic.
- Updated various agents to utilize the new Sonnet4 model instead of the previous anthropicCachedModel.
- Enhanced error handling and retry logic in the fallback model implementation.
- Increased processing row limit in Snowflake query to 5000 for better performance.
- Added tests for new AI fallback models and their streaming capabilities.
2025-07-23 07:22:52 -06:00
Devin AI 5b40205275 Implement /api/v2/title endpoint for BUS-1494
- 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>
2025-07-23 13:14:58 +00:00
Nate Kelley 1b0a16d606
initial commit for a shared chart 2025-07-22 22:59:24 -06:00
Nate Kelley 446bfc6a8e
Merge pull request #602 from buster-so/big-nate/bus-1490-add-select-state-to-auto-share-chats-with-other-users
Add selected state to channel list
2025-07-22 22:20:48 -06:00
Nate Kelley 67336cf02e
Add selected state to channel list 2025-07-22 22:20:13 -06:00
Nate Kelley a0bd890ca2
Merge pull request #601 from buster-so/big-nate/bus-1489-alerts-channel-dropdown-shouldnt-be-a-button
Update slack integration to use new fake button
2025-07-22 22:10:24 -06:00
Nate Kelley 00848a58e7
Update slack integration to use new fake button 2025-07-22 22:09:25 -06:00
Nate Kelley 27b8ad6224
Merge pull request #565 from buster-so/devin/BUS-1445-1752897550
Fix syntax highlighting flicker by replacing PrismAsyncLight with Shiki
2025-07-22 21:54:40 -06:00
Nate Kelley 018641ff15
Merge branch 'staging' into devin/BUS-1445-1752897550 2025-07-22 21:49:36 -06:00
Nate Kelley dd6939f69b
font family fallback 2025-07-22 21:44:26 -06:00
Nate Kelley 93600447ee
Update SyntaxHighlighter.tsx 2025-07-22 21:17:42 -06:00
Devin AI 1e6a9ae602 refactor: address code review feedback
- 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>
2025-07-22 23:30:49 +00:00
Devin AI 3904f66dbc feat: implement wildcard validation for SQL security (BUS-1487)
- 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>
2025-07-22 23:11:33 +00:00
Nate Kelley f7a658a791
custom hook for token loading 2025-07-22 17:03:53 -06:00
Nate Kelley 29dff3b54e
more props for container 2025-07-22 16:59:17 -06:00
Nate Kelley 3520bd9111
shiki with proper transpilation 2025-07-22 16:29:21 -06:00
Nate Kelley 10be9b41b7
accept line numbers 2025-07-22 16:15:35 -06:00
Nate Kelley 7d7fa078a2
move to shiki 2025-07-22 15:47:25 -06:00
dal a6297182b1
Merge pull request #599 from buster-so/dallin/bus-1485-clarifications-and-todolist-runtime-context
Dallin/bus-1485-clarifications-and-todolist-runtime-context
2025-07-22 14:02:01 -06:00
Nate Kelley 8c43acc6ad
Merge branch 'staging' into devin/BUS-1445-1752897550 2025-07-22 13:49:23 -06:00