buster/apps/trigger
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
..
scripts Use tsx and .ts files for validation 2025-07-21 16:07:14 -06:00
src feat(access-controls): migrate Rust access control libraries to TypeScript 2025-07-28 10:17:35 -06:00
tests Enhance analyst agent task by integrating message post-processing functionality. Updated logging configuration in integration tests to use environment variable for project name. 2025-07-07 10:40:11 -06:00
.env.example env vars and oauth scopes 2025-07-07 11:03:40 -06:00
.gitignore Mastra braintrust (#391) 2025-07-02 14:33:40 -07:00
CLAUDE.md Mastra braintrust (#391) 2025-07-02 14:33:40 -07:00
biome.json Mastra braintrust (#391) 2025-07-02 14:33:40 -07:00
env.d.ts slack and env for buster prod alerts 2025-07-14 08:19:57 -06:00
package.json dry run 2025-07-25 18:29:35 -06:00
trigger.config.ts Mastra braintrust (#391) 2025-07-02 14:33:40 -07:00
tsconfig.json fix all of the bugs 2025-07-12 22:14:08 -06:00
turbo.json update database dev 2025-07-15 22:26:13 -06:00
vitest.config.ts Mastra braintrust (#391) 2025-07-02 14:33:40 -07:00