Commit Graph

111 Commits

Author SHA1 Message Date
dal 5e7467aefc
fix: improve Slack messaging reliability and error handling
- Add proper error handling for Slack API failures with typed responses
- Implement message operation types for better type safety
- Add retry logic with exponential backoff for transient failures
- Export webhook types for external consumers
- Update Slack agent task to handle errors gracefully and continue processing
- Add proper validation and error messages for failed operations
- Include structured error tracking for debugging

🤖 Generated with Anthropic

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-18 20:36:29 -06:00
dal 35623ad987
Integrate access controls with metric file downloads
- Added permission checks to metric file download handler
- Added permission checks to export-metric-data trigger task
- Created comprehensive tests for access control integration
- Updated AssetType enums to include report_file
- Resolved export conflicts in server-shared package
- Fixed AI package imports for new getPermissionedDatasets API
2025-08-13 14:25:41 -06:00
dal ebe496df87
Merge access-controls branch and resolve conflicts
- Combined asset type enums from both branches
- Merged all database query exports
- Integrated access-controls package into server-shared
- Resolved conflicts in AI package instructions
2025-08-13 14:15:20 -06:00
dal 594f08202b
Refactor metric file handling and improve error handling
- Updated type definitions for better clarity and type safety in metric file download and export tasks.
- Enhanced error handling in the metric files API to utilize HTTPException for more consistent error responses.
- Added environment variable validation in export tasks to ensure necessary credentials are present before execution.
- Improved type assertions for content in metric export queries to ensure proper handling of JSONB data.
2025-08-13 14:01:46 -06:00
dal 3eb80ae630
Add metric file export functionality with Cloudflare R2 support
- Introduced new API endpoint for downloading metric files as CSV.
- Implemented export logic to handle large datasets (up to 1 million rows) and generate presigned URLs for secure downloads.
- Added cleanup task to remove exported files from R2 storage after 60 seconds.
- Updated environment configuration to include Cloudflare R2 credentials.
- Enhanced error handling for various export scenarios.
- Refactored related database queries and schemas for better integration.
- Updated documentation for new features and usage instructions.
2025-08-13 13:36:42 -06:00
dal 8d438f25fd
fix trigger int tests 2025-08-11 13:32:13 -06:00
Nate Kelley 78374e7ddf
Update server editor 2025-08-11 13:13:33 -06:00
Nate Kelley f948ad3415
web load env 2025-08-11 11:53:05 -06:00
Nate Kelley a2190e677e
Merge branch 'staging' of https://github.com/buster-so/buster into staging 2025-08-11 11:39:29 -06:00
Nate Kelley 28e704c53e
added env validation for server 2025-08-11 11:39:08 -06:00
dal b96cb39b78
turbo fast web build 2025-08-11 11:33:18 -06:00
dal 332c367be2
trigger dev upgrade 2025-08-11 11:15:24 -06:00
dal 21c76f268a
trigger stuff 2025-08-11 11:03:09 -06:00
Nate Kelley ab887f6e85
fix imports 2025-08-01 23:34:11 -06:00
Nate Kelley 7dbe92357f
Remove old image capture package 2025-08-01 17:02:49 -06:00
dal 4bef4205f3
feat(access-controls): migrate Rust access control libraries to TypeScript
This PR migrates the Rust  and  libraries to TypeScript in the new  package.

## Changes

### New Access Controls Package
- Implemented complete asset permissions system with CRUD operations
- Added dataset permissions with all 5 access paths (admin, direct user, user→group, team→direct, team→group, org→default)
- Implemented cascading permissions (metrics inherit from dashboards/chats/collections)
- Added LRU caching to replace Redis (30-second TTL)
- Comprehensive test coverage (148 tests passing, 3 skipped pending createUser)

### Database Package Updates
- Fixed AssetType enum to include all 14 asset types
- Added missing database queries for permissions
- Fixed timestamp fields to use ISO strings
- Added getUserOrganizationsByUserId function
- Created organized query structure by table

### AI Package Updates
- Updated getPermissionedDatasets API calls to new format
- Changed property references from ymlFile to ymlContent
- Fixed all test mocks to match new API structure

### Trigger App Updates
- Updated to use new access controls API
- Fixed test mocks to match DatasetListResult structure
- Added proper type imports

### Server Shared Updates
- Added request/response types for access control endpoints
- Exported types for API consistency

## Testing
- All packages build successfully with turbo build:dry-run
- All tests pass with turbo test:unit
- Full type safety maintained throughout

## Migration Notes
- Drop-in replacement for Rust libraries
- Same permission model and roles
- Cache invalidation strategies implemented
- Soft delete pattern maintained

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-28 10:17:35 -06:00
dal 2833c6bb0c
dry run 2025-07-25 18:29:35 -06:00
dal 3396f9fb8a
Refactor package references: rename '@buster-tools/web-tools' to '@buster/web-tools' in package.json and pnpm-lock.yaml 2025-07-23 21:09:53 -06:00
dal b8b26af1f1
update trigger package? 2025-07-23 20:55:20 -06:00
dal 42d1da5389
context fixes on messages 2025-07-23 16:56:06 -06:00
dal 42949f6730
pin trigger versions 2025-07-23 14:23:37 -06:00
Nate Kelley 3638d73547
force the y on package 2025-07-22 09:45:46 -06:00
dal fc8ac85280
Merge branch 'staging' into devin/BUS-1465-1753085075 2025-07-22 09:12:05 -06:00
dal e1a60bdf11
build fixes 2025-07-22 09:11:36 -06:00
Nate Kelley 0c034d0926
fix small linting error 2025-07-22 09:06:57 -06:00
dal 8bfb6ff79b
trigger dependency updates 2025-07-22 08:39:00 -06:00
dal 9b9914cd70
build fixes 2025-07-21 17:38:37 -06:00
dal cb3dd968e3
slack markdown fixes 2025-07-21 17:35:58 -06:00
dal cf2ec2b02a
please 2025-07-21 16:27:15 -06:00
Nate Kelley 0eaeb3f12f
Merge pull request #589 from buster-so/cursor/centralize-environment-variables-with-turbo-1ef2
Cursor/centralize environment variables with turbo 1ef2
2025-07-21 16:11:43 -06:00
dal 1fa75800fc
unknwon fix and build error 2025-07-21 16:09:39 -06:00
Nate Kelley 8ee892bf2a
Use tsx and .ts files for validation 2025-07-21 16:07:14 -06:00
Nate Kelley 4418f4991b
use a shared env validation method 2025-07-21 16:00:10 -06:00
dal cee4483751
message post processing bugfix no longer loading duplicate conversation history 2025-07-21 12:34:34 -06:00
dal 84be211028
skip validate env on ci 2025-07-21 00:50:53 -06:00
dal 06249f5e8a
rearrange and get some things right for the initial read file tool 2025-07-20 23:04:11 -06:00
dal d3e2577d13
New polling logic 2025-07-18 23:30:28 -06:00
dal 18dde9e40b
concurrency and queuing 2025-07-18 23:19:48 -06:00
dal 6e65bec499
Enhance task triggering by adding concurrency key for sequential processing
- Updated `createChatHandler` to include a `concurrencyKey` when triggering the `analyst-agent-task`, ensuring tasks are processed sequentially per chat.
- Adjusted related test cases to verify the inclusion of the `concurrencyKey`.
- Integrated the `concurrencyKey` in the `slackAgentTask` to manage task queuing and notify users when tasks are queued.
2025-07-18 23:01:32 -06:00
dal 8daceae2e3
Add duplicate message check in slack-agent-task
- Introduced a new function `checkForDuplicateMessages` in the database queries to verify if a message already exists in the same chat.
- Integrated the duplicate check in the `slackAgentTask` to prevent processing of duplicate messages, enhancing task efficiency and logging warnings for duplicates detected.
2025-07-18 22:53:02 -06:00
dal 0e46d64683
trigger run id being added during the slack agent task 2025-07-18 22:34:02 -06:00
dal ba04450469
Enhance Slack event handling by adding hourglass reaction on app mentions and refactoring reaction management in slack-agent-task. Update CLAUDE.md and global.mdc with new guidelines for testing and development workflows. Adjust .gitignore for rerank package to ensure proper directory exclusion. 2025-07-18 21:40:20 -06:00
dal f9786c75c8
increase polling time for trigger bc 5 seconds or less still get charged lol 2025-07-18 16:12:03 -06:00
Nate Kelley 5f61995296
Fix linting errors 2025-07-18 10:48:49 -06:00
dal 3a43e21718
Merge remote-tracking branch 'origin/staging' into dallin/bus-1380-fix-unit-tests 2025-07-18 08:55:35 -06:00
dal cd8a50403f
Merge branch 'staging' into dallin/bus-1419-enable-sharing-of-dashboards-or-collections-with-workspace 2025-07-17 17:16:07 -06:00
dal b6cf6539ea
Merge branch 'origin/staging' into dallin/bus-1380-fix-unit-tests - Resolved conflicts in CLAUDE.md 2025-07-17 16:52:03 -06:00
Nate Kelley 5dd7b20f25
fix broken linting 2025-07-17 13:18:32 -06:00
dal a0a1e11493
update workspace sharing on all assets 2025-07-17 12:54:02 -06:00
dal bcaa133059
Enhance Slack agent task with no message handling and increase max duration
- Updated maxDuration to 600 seconds to align with analyst agent task.
- Added logic to handle cases where no messages are found, sending a direct response to Slack and updating message reactions accordingly.
- Improved type safety in SlackSharingPermissions component by defining a specific type for sharing permissions.
2025-07-16 17:37:17 -06:00