Commit Graph

792 Commits

Author SHA1 Message Date
dal e0d03c6aab
Refactor data metadata handling and improve report creation logic. Updated SimpleType enum for better serialization, removed unused createDataMetadata function, and integrated createMetadataFromResults for data processing. Enhanced report creation with version history management and improved error handling in report updates. 2025-08-18 11:59:56 -06:00
dal c7627b00d6
identify assumptions fixed 2025-08-18 11:24:21 -06:00
dal b3cfa35430
for the most part things are looking good 2025-08-18 11:20:06 -06:00
dal 35e0fc27d7
done tool fix 2025-08-18 10:43:15 -06:00
dal 6d1a0b6c86
todos cleanedup 2025-08-18 10:31:52 -06:00
dal 6b171aae2e
build error map the reasoning message better in web 2025-08-18 10:16:59 -06:00
dal 138bd01d34
Add GitHub integration endpoints and middleware
- Introduced GitHub routes for handling installation callbacks and token management.
- Implemented middleware for validating GitHub webhook requests.
- Added tests for new handlers and middleware to ensure functionality.
- Enhanced sandbox utilities to support GitHub token usage for authenticated operations.
2025-08-18 09:29:18 -06:00
dal 9589ca198b
upgrade and fixes 2025-08-18 08:07:13 -06:00
dal 0cf763d9a3
type error on fallback 2025-08-18 07:27:31 -06:00
dal a63e8da785
Refactor sequential thinking tool to use toolCallId for message entries and improve error handling 2025-08-18 07:19:34 -06:00
dal 95b67529ad
sequential thinking tie off the request. 2025-08-15 19:10:45 -06:00
dal 4c042a34fa
tool result entry 2025-08-15 18:51:10 -06:00
dal e0ea7ce616
normalizer fo optimistic json parsing and file selection logic 2025-08-15 18:45:59 -06:00
dal d0e9852f5d
git server endpoints 2025-08-15 18:32:55 -06:00
dal d11c62446a
ok metrics are working again 2025-08-15 16:18:14 -06:00
dal 3f3b9233f3
ok need to debug dash and metrics 2025-08-15 15:57:35 -06:00
dal 41ca7078ab
initial github queries 2025-08-15 15:29:34 -06:00
dal c476aebd47
tools updating properly 2025-08-15 15:24:05 -06:00
dal e2757c1ad0
now sequential thinkgin 2025-08-15 15:04:03 -06:00
dal 2059988494
sequential thinking 2025-08-15 15:03:58 -06:00
dal 37aa14c43b
respond without assetstool restuls 2025-08-15 14:58:46 -06:00
dal cdb7e4f17e
message user clarifying 2025-08-15 14:48:41 -06:00
dal 641765b430
flip done tool stuff 2025-08-15 14:48:18 -06:00
dal 940ab3f59f
done tool state and context 2025-08-15 14:44:17 -06:00
dal 597f1b56a8
done tool shift in params 2025-08-14 14:39:51 -06:00
dal 5ec0af4273
optimized message queries 2025-08-14 14:38:02 -06:00
dal 82516e4fbb
Update reasoning messages to improve clarity and consistency across tools
- Changed the wording of elapsed time in reasoning messages from "min" to "minutes" for better readability.
- Updated the final reasoning message format to specify "Reasoned for" instead of "Total workflow time," enhancing user understanding of the output.

These changes contribute to a more user-friendly experience and maintain consistency in messaging across different tools.
2025-08-14 14:09:53 -06:00
dal 24e91b2ac7
lots of changes for the entries updates 2025-08-14 13:49:34 -06:00
dal f8f9f4b0e0
few tweaks from greptile comments 2025-08-14 10:19:40 -06:00
dal 0428552454
lint build test fixes 2025-08-14 09:55:37 -06:00
dal 6c4fbe027f
Refactor chat types and remove unnecessary request schema
- Updated chat types to include AssetPermissionRoleSchema for better clarity.
- Removed the ShareUpdateRequestSchema as it was deemed unnecessary.
2025-08-14 09:15:39 -06:00
dal ddbc47f0f9
revert the unneeded requests 2025-08-14 09:00:57 -06:00
dal e5481bc30a
Refactor chat asset type conversion and enhance error handling
- Changed chatAssetTypeToDatabaseAssetType to a Partial<Record> for better type safety.
- Updated convertChatAssetTypeToDatabaseAssetType to throw an error for unmapped asset types.
- Modified downloadMetricFileHandler tests to use fake timers and improve timeout handling.
- Updated report sharing endpoint to use SharePermissionsUpdateRequest for better clarity.
- Renamed schemas in server-shared for backward compatibility while maintaining clarity.
- Adjusted GetTitleRequestSchema to restrict asset types to those supporting title retrieval.
2025-08-13 14:55:37 -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 ccc27abaee
Enhance tool state management and reasoning entries across various tools
- Introduced start time tracking for tool operations in create, modify, and report tools to improve performance monitoring.
- Updated reasoning entries to include elapsed time for completed operations, enhancing user feedback.
- Refactored tool logic to ensure consistent handling of file statuses and improved clarity in reasoning messages.
- Enhanced logging for better traceability during tool execution.

These changes improve the overall user experience and maintainability of the toolset.
2025-08-13 14:19:32 -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 a3c4238da1
lint fix 2025-08-13 13:48:28 -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 d02d809e59
migration, optimization on entry querires, etc. 2025-08-13 11:50:56 -06:00
dal abc070449b
update the reasoning entries for all of hte tools 2025-08-13 11:04:37 -06:00
dal dab0bce7d2
Refactor tool imports and enhance naming consistency in Think and Prep Agent
- Updated import statements for communication and database tools to improve clarity and organization.
- Introduced constants for tool names in the `execute-sql` and `sequential-thinking-tool` modules to ensure consistent usage across the codebase.
- Enhanced the `createThinkAndPrepAgent` function to utilize these constants, improving maintainability and readability.

These changes streamline the integration of tools within the Think and Prep Agent, enhancing overall code organization.
2025-08-13 10:52:28 -06:00
dal 3e1181c121
more type safety 2025-08-13 10:49:35 -06:00
dal 8299e47e4e
more migration, streaming, type safety, etc 2025-08-13 10:48:07 -06:00
dal eb14e26972
dashboard helpers and tools 2025-08-12 23:26:46 -06:00
dal d9e6c3dee2
done tool no overwrite 2025-08-12 23:23:35 -06:00
dal 6c989b7c25
Refactor tool names and enhance context handling in AnalystAgent
- Updated tool name constants for visualization and communication tools to improve clarity and consistency.
- Modified the AnalystAgent to utilize these constants, ensuring better context handling during tool calls.
- Enhanced the STOP_CONDITIONS to reference the DONE_TOOL_NAME constant, improving maintainability.

These changes streamline the integration of tools within the AnalystAgent, enhancing overall code organization and readability.
2025-08-12 23:05:45 -06:00
dal 0f0a5ed7d1
fix prompts of dashboard and metric tools 2025-08-12 22:42:21 -06:00
dal 5d2631b848
Enhance agent streaming and logging in Analyst and Think and Prep steps
- Added consumption of text streams in both `runAnalystAgentStep` and `runThinkAndPrepAgentStep` to ensure continuous processing of agent responses.
- Introduced detailed logging at various stages of the agent's execution to improve traceability and debugging.
- These changes enhance the robustness of the agent workflow and provide better insights during execution.
2025-08-12 21:47:09 -06:00
dal 855e7b1a55
Integrate dataset handling into Analyst and Think and Prep agents
- Added support for fetching and managing user-specific datasets in the `analystAgentTask`, enhancing the context available for processing.
- Updated the `AnalystAgent` and `ThinkAndPrepAgent` schemas to include datasets, ensuring they are passed correctly in system messages.
- Implemented error handling for dataset retrieval to prevent workflow interruptions.
- Adjusted integration tests to accommodate the new datasets structure, ensuring comprehensive coverage.

These changes improve the agents' ability to utilize relevant datasets, enhancing their functionality and user experience.
2025-08-12 19:31:25 -06:00
dal cc6c407023
Enhance TODO creation process with streaming support
- Introduced a new streaming mechanism for generating TODO lists, allowing for real-time updates and improved user experience.
- Added context handling for datasets in both `AnalystAgent` and `ThinkAndPrepAgent`, ensuring relevant data is included in system messages.
- Implemented new helper functions for managing TODO state and reasoning messages, improving code organization and clarity.
- Updated integration tests to validate the new streaming functionality and ensure consistent message roles.

These changes significantly enhance the functionality and maintainability of the TODO creation process within the agent workflow.
2025-08-12 18:32:56 -06:00
dal 1e594ac4ec
Refactor chat message handling by removing unused fields
- Eliminated `responseMessages`, `reasoning`, and `rawLlmMessages` from chat creation and handling functions to streamline data processing.
- Updated the `generateJsonbArraySql` function to accept pre-stringified JSON for better performance and clarity.

These changes enhance the efficiency of chat message management and reduce unnecessary complexity in the codebase.
2025-08-12 16:38:20 -06:00
dal e52c0c7d72
move sequential thinking away from old inherited context 2025-08-12 16:15:37 -06:00
dal 0b8f8665d6
Refactor agent steps and message roles
- Removed unused `steps` array from `createThinkAndPrepAgent` function to simplify the code.
- Updated message role from 'assistant' to 'user' in `create-todos-step` for better context alignment.
- Adjusted `valuesMessage` role in `extract-values-search-step` to 'user' when extracted values are present, enhancing message clarity.

These changes improve code clarity and ensure consistent message roles across agent steps.
2025-08-12 16:13:41 -06:00
dal a7ced93c6e
move to newer braintrust version 2025-08-12 16:06:00 -06:00
dal 1d0d312ff3
lots of tests passing 2025-08-12 15:54:46 -06:00
dal da4f3605cc
Refactor prompt loading and streamline agent steps
- Replaced file system reads with direct imports of prompt text files in various agent and step files to improve performance and reduce complexity.
- Updated the `runDocsAgentStep` and `runDocsAgentWorkflow` functions to return `void` instead of structured outputs, simplifying their interfaces.
- Enhanced test cases to validate prompt loading without relying on file system checks, ensuring faster and more reliable tests.
- Cleaned up unused imports and optimized code structure across multiple files.

These changes aim to enhance code clarity, maintainability, and performance in the agent workflow and related components.
2025-08-12 14:57:23 -06:00
dal 8c27a3dfff
Merge remote-tracking branch 'origin/staging' into dal/upgrade-to-ai-sdk-v5 2025-08-12 12:53:48 -06:00
dal c6a28e39d5
migration changes 2025-08-12 12:44:15 -06:00
dal 79103376f1
more migratsion 2025-08-12 12:30:38 -06:00
dal 7e6e406727
more changes 2025-08-12 12:10:21 -06:00
dal 8f58ff84de
lots of migration and report tooling 2025-08-12 12:08:30 -06:00
dal 4871f49f59
Refactor identify assumptions step and related tests
- Updated type imports from `CoreMessage` to `ModelMessage` for consistency across the identify assumptions step.
- Changed argument names from `args` to `input` and `result` to `output` in the integration tests to align with the new structure.
- Removed legacy step export for `identifyAssumptionsStepLegacy` to clean up the codebase.
- Adjusted the reporting tools to import `StatusSchema` from the correct path.
- Deleted outdated test files and helper functions related to the docs agent workflow to streamline the project structure.

These changes improve code clarity and maintainability while ensuring the integration tests reflect the latest design patterns.
2025-08-12 11:58:15 -06:00
dal 299efd1c13
format follow up messages 2025-08-12 11:50:29 -06:00
dal 4a241ce419
repository tree cleanup 2025-08-12 11:46:15 -06:00
dal 9052bc6251
build issues cleaned up 2025-08-12 11:43:54 -06:00
dal cf3dc3387b
modify metrics finish 2025-08-12 11:33:39 -06:00
dal eb68b4edff
flag chat step clean 2025-08-12 11:33:01 -06:00
dal b699b9f2c9
versioned asset details 2025-08-12 11:32:37 -06:00
dal 72150c2ee1
clean bar line tests 2025-08-12 11:32:28 -06:00
dal 31c3cbc1b7
refactor: enhance reporting tools with new create and modify functionalities
- Introduced `createReports` and `modifyReports` tools, enabling users to create and modify reports with improved state management.
- Added new schemas for report input and output, enhancing type safety and clarity.
- Implemented helper functions for transforming report state and generating reasoning entries.
- Improved test coverage for the new reporting functionalities to ensure robust integration.

These changes streamline the reporting process and enhance overall code maintainability.
2025-08-12 11:19:07 -06:00
dal 819b2dd0d6
tons of migration from mastra to ai sdk 2025-08-12 10:36:55 -06:00
dal a5422360ec
migrating over docs agetn 2025-08-12 10:13:16 -06:00
dal 9d9690bb35
analysis type router 2025-08-12 09:36:40 -06:00
dal 77bc071f4b
more migrations 2025-08-12 09:32:07 -06:00
dal 29708e8d7d
create and modify 2025-08-12 09:10:23 -06:00
dal 7872ad2f29
refactor: enhance modify dashboards tool with improved state management and type definitions
- Updated the `modifyDashboardsDelta` and `modifyDashboardsFinish` functions to streamline state handling and improve message entry updates.
- Refactored helper functions for better clarity and type safety in dashboard modifications.
- Introduced new schemas for state management, enhancing type definitions for dashboard files and their statuses.
- Improved test coverage to ensure robust functionality and integration of the modify dashboards tool.

These changes optimize the dashboard modification process and enhance code maintainability.
2025-08-11 22:30:14 -06:00
dal d3870430c2
create dashboard fixes 2025-08-11 19:00:33 -06:00
dal e2d0d332c1
create dashboard functions debugged 2025-08-11 18:37:31 -06:00
dal 70193aad4f
fix lint issues 2025-08-11 16:57:49 -06:00
dal 4e7f6b080e
no reports in todos 2025-08-11 16:22:50 -06:00
dal f1d9293946
refactor: enhance create dashboards tool with improved state management and type definitions
- Removed unused properties from the dashboard state and output schemas for clarity.
- Introduced a new state file schema to better represent dashboard files.
- Updated helper functions to streamline file transformation and reasoning message creation.
- Improved type safety by utilizing the newly defined `StatusSchema`.

These changes optimize the dashboard creation process and enhance code maintainability.
2025-08-11 15:59:29 -06:00
dal 95c29cf507
Refactor analyst and think-and-prep agent instructions to remove report generation capabilities and streamline workflow. Update the analyst agent to exclude report-related tools and adjust think-and-prep instructions for clarity and focus on analysis preparation. Ensure consistent handling of SQL guidance and improve overall structure for better readability. 2025-08-11 15:58:07 -06:00
dal 317b7cb8c3
bump max tokens 2025-08-11 15:41:34 -06:00
Nate Kelley 48fa337303
can parse dollar signs 2025-08-11 15:10:55 -06:00
dal b5a15c8581
dashboard tool description fix 2025-08-11 15:08:18 -06:00
Nate Kelley 438bec4ce4
Fix caption parser 2025-08-11 15:01:08 -06:00
dal 71d862e51b
sql tools 2025-08-11 14:54:43 -06:00
Nate Kelley a5b175d418
Update create-todos-step.ts 2025-08-11 14:54:12 -06:00
Nate Kelley ec7d27167f
Merge branch 'staging' of https://github.com/buster-so/buster into staging 2025-08-11 14:53:43 -06:00
Nate Kelley 9dd37de7cd
Add tests for metric caption parsing 2025-08-11 14:53:41 -06:00
dal 82c1ea7f46
communication tools plus others 2025-08-11 14:53:23 -06:00
dal 2af5f408fa
refactor: enhance create dashboards tool and web search tool integration
- Updated the `createDashboardsStart` function to improve message handling and reasoning entry creation.
- Refactored helper functions for better clarity and type safety in dashboard creation.
- Enhanced web search tool execution to include additional parameters for improved functionality.
- Updated tests to reflect changes in tool execution and ensure robust integration.

These changes streamline the dashboard creation process and enhance the web search tool's capabilities.
2025-08-11 14:50:38 -06:00
dal 698444bb3e
create dashboard fixes with websearch fixes 2025-08-11 14:47:50 -06:00
dal 4ace4d337e
Revert 'Testing some new GPT 5 metaprompts' from commit 1f4f31909
This reverts commit 1f4f319098 which made changes to:
- analyst-agent-instructions.ts
- think-and-prep-instructions.ts
- investigation-instructions.ts
- format-analysis-type-router-prompt.ts
- create-todos-step.ts

Reverting Jacob's experimental prompt changes.
2025-08-11 14:33:07 -06:00
dal 2540f6e195
Revert "Improved Report Prompt"
This reverts commit ed056878e1.
2025-08-11 14:31:35 -06:00
dal 1c0a6b4f0f
move back to anthropic models 2025-08-11 14:27:16 -06:00
dal c6f4ac3902
verbosity low 2025-08-11 14:07:16 -06:00
dal 47f2e38557
priority tier 2025-08-11 13:55:43 -06:00
dal 82d89cf702
clean up builds and errors 2025-08-11 13:41:17 -06:00