Commit graph

2937 commits

Author SHA1 Message Date
Max
7da3f0dc87
Merge pull request #1246 from trheyi/main
Add new endpoint for file content retrieval
2025-10-28 09:36:26 +08:00
Max
b2c7ddde19 Add new endpoint for file content retrieval
- Introduced a new API endpoint `GET /file/:uploaderID/:fileID/content` to facilitate the retrieval of file content based on uploader ID and file ID.
- This addition enhances the user capabilities for accessing file data within the application.
2025-10-28 09:28:05 +08:00
Max
e42c669843
Merge pull request #1245 from trheyi/main
Add logo support to team creation and update functionality
2025-10-27 18:19:24 +08:00
Max
8ffa767dfe Add logo support to team creation and update functionality
- Enhanced the team creation and update processes to include an optional logo field, allowing teams to have custom logos.
- Updated the CreateTeamRequest and UpdateTeamRequest structures to accommodate the new logo field.
- Modified the GinTeamCreate and GinTeamUpdate handlers to handle logo data appropriately.
- Expanded test cases for team creation and updates to validate logo handling, ensuring comprehensive coverage for scenarios involving logos.
2025-10-27 17:46:25 +08:00
Max
ece929669d
Merge pull request #1244 from trheyi/main
Enhance robot member functionality with avatar support
2025-10-27 16:47:03 +08:00
Max
7572f99ba0 Enhance robot member functionality with avatar support
- Added avatar field to CreateRobotMemberRequest and UpdateRobotMemberRequest structures, allowing for avatar URL or file ID during member creation and updates.
- Updated GinMemberCreateRobot and GinMemberUpdateRobot handlers to process avatar information, ensuring it is included in the member data.
- Expanded test cases for member creation and updates to validate avatar handling, including scenarios for updating only the avatar without affecting other fields.
- Enhanced team configuration tests to verify preservation of uploader and avatar agent fields, improving overall test coverage and reliability.
2025-10-27 16:45:10 +08:00
Max
b1c6ee3ed6
Merge pull request #1243 from trheyi/main
Refactor test case for member update to remove unnecessary whitespace
2025-10-27 13:43:50 +08:00
Max
26b690246d Refactor test case for member update to remove unnecessary whitespace
- Cleaned up the `TestMemberUpdateRobot` function by removing redundant blank lines, improving code readability and maintainability.
2025-10-27 13:43:27 +08:00
Max
99830237bc
Merge pull request #1242 from trheyi/main
Implement robot member update functionality with comprehensive valida…
2025-10-27 12:06:03 +08:00
Max
1e01ed768e Implement robot member update functionality with comprehensive validation
- Added the `UpdateRobotMember` method to handle updates for robot members, including validation for member existence, type checks, and email uniqueness.
- Introduced a new `UpdateRobotMemberRequest` structure to facilitate updates via the API, allowing for modifications to various fields such as `robot_email`, `status`, and `autonomous_mode`.
- Enhanced the `GinMemberUpdateRobot` handler to process update requests, ensuring proper authentication and error handling for various scenarios.
- Expanded test coverage with new test cases for the robot member update functionality, validating successful updates, error conditions, and edge cases.
- Refactored existing member management logic to integrate the new update capabilities, improving overall system robustness and user experience.
2025-10-27 12:05:11 +08:00
Max
3d0ae251ac
Merge pull request #1241 from trheyi/main
Update robot member functionality with new fields and validation
2025-10-27 11:35:01 +08:00
Max
7de562f80d Update robot member functionality with new fields and validation
- Introduced the `robot_email`, `authorized_senders`, and `email_filter_rules` fields to the robot member model, enhancing the configuration options for robot members.
- Updated the member creation and existence check logic to ensure the uniqueness of `robot_email` globally, improving data integrity.
- Refactored API endpoints and request/response structures to accommodate the new fields, ensuring consistency across the member management system.
- Enhanced test cases to validate the new robot member features, including scenarios for email uniqueness and configuration updates, improving overall test coverage and reliability.
2025-10-27 11:34:07 +08:00
Max
43538ee160
Merge pull request #1240 from trheyi/main
Enhance member listing functionality with advanced filtering and sorting
2025-10-26 14:10:55 +08:00
Max
772c00e095 Enhance member listing functionality with advanced filtering and sorting
- Introduced a new MemberListRequest structure to support advanced filtering options such as status, member_type, role_id, email, and display_name.
- Updated the GinMemberList handler to parse and validate query parameters, improving user experience with clearer error messages for invalid inputs.
- Enhanced the memberList function to handle advanced filtering and sorting, allowing for more flexible and efficient member retrieval.
- Added comprehensive test cases to validate new filtering and sorting functionalities, ensuring robust coverage and reliability in member listing scenarios.
- Refactored existing member response structures to include new fields and improve data representation.
2025-10-26 14:10:04 +08:00
Max
0e8248297d
Merge pull request #1239 from trheyi/main
Enhance member model and team management with is_owner field
2025-10-26 12:26:00 +08:00
Max
420a17f844 Enhance member model and team management with is_owner field
- Added the is_owner field to the member model to indicate if a member is the team owner, improving clarity and performance for queries related to team ownership.
- Updated the team creation process to automatically set the is_owner field for the creator of the team, ensuring accurate member status upon creation.
- Refactored related tests to verify the correct assignment of the is_owner field, enhancing test coverage and reliability in team membership scenarios.
- Removed redundant permission and restriction fields from the member model to streamline the data structure and improve maintainability.
2025-10-26 12:25:15 +08:00
Max
ee508050e0
Merge pull request #1238 from trheyi/main
Add MCP client loading in engine
2025-10-26 11:32:36 +08:00
Max
40b0c449f1 Enhance robot member creation with additional fields
- Added new fields to the robot member creation process, including permissions, restrictions, notes, and metadata, to improve the flexibility and detail of robot member configurations.
- Updated the AddMember function to include tracking of the user who invited the member and the team ID, enhancing member management and accountability.
- These changes improve the overall functionality and usability of the member management system.
2025-10-26 11:31:50 +08:00
Max
846da4042f Add MCP client loading in engine
- Integrated MCP client loading in both Load and Reload functions, enhancing the engine's capability to manage MCP configurations.
- Added error handling for MCP loading, ensuring warnings are generated for any issues encountered during the process.
- This update improves the overall robustness of the engine's loading mechanism and provides better feedback on MCP-related errors.
2025-10-26 11:17:57 +08:00
Max
fb4df03b02
Merge pull request #1237 from trheyi/main
Enhance member management with member_id and email checks
2025-10-26 11:09:35 +08:00
Max
f71ce2ac9a Implement existence checks for various entities in update functions
- Added functions to check the existence of invitation codes, members, OAuth accounts, roles, teams, and user types before performing updates, enhancing error handling and user feedback.
- Updated relevant update functions to utilize these existence checks, ensuring accurate error messages when no changes are made or when entities do not exist.
- Refactored tests to validate the new existence check logic, improving overall test coverage and reliability.
2025-10-26 11:09:07 +08:00
Max
5f6f8d7911 Enhance member management with member_id and email checks
- Introduced member_id as a unique identifier for members, improving data integrity and consistency across member operations.
- Updated member-related functions to utilize member_id instead of internal IDs, enhancing API usability and clarity.
- Implemented email existence checks for team members, allowing for better validation during member creation and updates.
- Refactored existing tests to accommodate changes in member identification and email validation, ensuring comprehensive coverage and reliability.
- Added new API endpoint for checking if an email exists within a team, improving user experience during member management.
2025-10-26 09:49:45 +08:00
Max
ec8650b59e
Merge pull request #1236 from trheyi/main
Implement robot member creation and validation
2025-10-26 09:04:46 +08:00
Max
fd10a058b1 Implement robot member creation and validation
- Introduced a new endpoint for creating robot members, enhancing the member model to include fields specific to robots such as email, system prompt, and autonomous mode.
- Refactored existing member creation logic to accommodate robot-specific requirements and ensure email uniqueness within teams.
- Updated request and response structures to support the new robot member functionality, improving API consistency.
- Added comprehensive test cases to validate the new robot member creation process, including scenarios for required fields, duplicate emails, and invalid inputs.
2025-10-26 09:04:22 +08:00
Max
56110d29cd
Merge pull request #1235 from trheyi/main
Update member model and robot member handling
2025-10-25 17:41:56 +08:00
Max
f89dbc2109 Update member model and robot member handling
- Enhanced the member model by adding 'avatar' and updating 'display_name' and 'bio' fields for improved identity representation.
- Refactored robot member creation and validation to utilize the new fields, ensuring consistency across user and robot profiles.
- Updated test cases to reflect changes in member data structure, improving coverage and accuracy in robot member operations.
- Adjusted database indices and constraints to accommodate new fields and ensure efficient querying.
2025-10-25 17:41:30 +08:00
Max
4829a2b761
Merge pull request #1234 from trheyi/main
Add Neo loading in test preparation
2025-10-25 16:43:48 +08:00
Max
b5812a7f2f Add Neo loading in test preparation
- Integrated Neo loading in the Prepare function of testutils.go to ensure the Neo environment is initialized before running tests.
- Updated error handling to log failures in loading Neo, enhancing test reliability and feedback.
- Adjusted variable assignment for Knowledge Base loading to maintain consistency in error handling.
2025-10-25 16:43:28 +08:00
Max
7230f62532
Merge pull request #1233 from trheyi/main
Refactor API handler functions for assistants in Neo package
2025-10-25 16:02:25 +08:00
Max
d8f267694d Refactor API handler functions for assistants in Neo package
- Updated the assistant-related API handler functions in neo/api.go to follow Go naming conventions by capitalizing the function names, making them exported for use in openapi/agent.
- This change enhances code readability and consistency across the API implementation.
- Added new LLM and MCP server management handlers in their respective packages, improving the overall structure and organization of the OpenAPI module.
- Removed the obsolete agent.go file, streamlining the codebase.
2025-10-25 16:02:01 +08:00
Max
963a580be7
Merge pull request #1232 from trheyi/main
Update user status in test cases from "enabled" to "active"
2025-10-25 15:00:23 +08:00
Max
0abb8c7d3b Update user status in test cases from "enabled" to "active"
- Modified the user creation functions in entry_test.go and invitation_test.go to use "active" as the status value instead of "enabled", aligning with the valid enum values for user status.
- This change ensures consistency across user-related tests and improves clarity regarding user status representation.
2025-10-25 14:59:57 +08:00
Max
c96fd2951e
Merge pull request #1231 from trheyi/main
Update Neo4j test URL in workflow configurations
2025-10-25 14:42:10 +08:00
Max
741847224d Update Neo4j test URL in workflow configurations
- Changed the NEO4J_TEST_URL from "neo4j://localhost:7686" to "neo4j://localhost:7687" in both pr-test.yml and unit-test.yml to reflect the updated Neo4j service endpoint.
- Cleaned up whitespace in the OpenAPI signin configurations for better readability.
2025-10-25 14:41:42 +08:00
Max
d0841e8aa7
Merge pull request #1230 from trheyi/main
Add SIGNIN_CLIENT_ID to workflow configurations
2025-10-25 13:40:19 +08:00
Max
6302cfc960 Add SIGNIN_CLIENT_ID to workflow configurations
- Introduced SIGNIN_CLIENT_ID environment variable in both pr-test.yml and unit-test.yml for OpenAPI signin configurations, ensuring consistent access across workflows.
- This addition enhances the setup for authentication processes in the testing environment.
2025-10-25 13:39:55 +08:00
Max
e26585d2d0
Merge pull request #1229 from trheyi/main
Refactor test utilities and enhance access token handling
2025-10-25 13:27:15 +08:00
Max
ddf8fd7a32 Refactor test utilities and enhance access token handling
- Introduced ObtainAccessTokenWithRootPermission function to streamline the creation of test users with root permissions, ensuring consistent access token generation for tests.
- Updated various test cases to utilize the new function, improving clarity and reducing redundancy in access token acquisition.
- Enhanced team configuration retrieval to expose public settings while hiding sensitive information, improving security in API responses.
2025-10-25 13:26:51 +08:00
Max
e2fa04f876
Merge pull request #1228 from trheyi/main
Update member model to include profile fields and enhance invitation …
2025-10-23 19:42:16 +08:00
Max
f31b3f5882 Update member model to include profile fields and enhance invitation handling
- Added display_name, bio, and email fields to the member model for improved team-specific identity.
- Updated team invitation creation and acceptance logic to handle new profile fields, ensuring proper data management and user experience.
- Implemented logic to copy user profile fields when creating or updating members, enhancing data consistency.
2025-10-23 19:40:29 +08:00
Max
932a8d2c0e
Merge pull request #1227 from trheyi/main
Add current team retrieval endpoint and refactor team access checks
2025-10-23 18:15:09 +08:00
Max
b9e71823ca Add current team retrieval endpoint and refactor team access checks 2025-10-23 17:50:32 +08:00
Max
93b48f474c
Merge pull request #1226 from trheyi/main
Update team invitation handling and user invitation acceptance logic
2025-10-23 11:24:03 +08:00
Max
5d6f346601 Update team invitation handling and user invitation acceptance logic
- Refactored the team invitation creation function to utilize the new authorized package for improved user authentication checks.
- Enhanced the invitation acceptance logic to include the user ID of the person who updated the invitation, improving tracking and accountability.
- Adjusted the invitation data preparation to incorporate user-specific scopes, ensuring proper permissions are applied during invitation processing.
2025-10-23 11:22:10 +08:00
Max
827bcb7757
Merge pull request #1225 from trheyi/main
Refactor test case structure for path matching in ACL tests
2025-10-23 10:55:15 +08:00
Max
976eb2769d Refactor test case structure for path matching in ACL tests
- Adjusted the formatting of the test case struct in scope_test.go for improved readability.
- No functional changes were made; this commit focuses on code style consistency.
2025-10-23 10:54:48 +08:00
Max
cf009f46e5
Merge pull request #1224 from trheyi/main
Normalize request paths in ACL checks and add path normalization utility
2025-10-23 10:49:42 +08:00
Max
cd9c52fe33 Normalize request paths in ACL checks and add path normalization utility
- Implemented path normalization in the ACL enforcement logic to ensure consistent matching by removing trailing slashes from request paths.
- Introduced a new utility function, normalizePath, to handle path normalization across various components.
- Updated endpoint matching and public endpoint checks to utilize the normalized paths, improving access decision accuracy.
- Enhanced team and member creation logic to include a new field, __yao_team_id, for better data management.
2025-10-23 10:48:53 +08:00
Max
7b61be9379
Merge pull request #1223 from trheyi/main
Enhance ACL configuration and enforcement with path prefix support
2025-10-22 19:20:06 +08:00
Max
cc181a52f6 Enhance ACL configuration and enforcement with path prefix support
- Updated ACL configuration to include a PathPrefix field, allowing for dynamic path stripping from request URLs.
- Enhanced ACL enforcement logic to log the configured path prefix and adjust request paths accordingly during access checks.
- Improved logging throughout the enforcement process to provide clearer insights into access decisions and scope matching.
- Registered built-in scopes for temporary access tokens, enhancing flexibility in access control for specific endpoints.
- Updated scope management to support constraints for matched scopes, improving granularity in access control configurations.
2025-10-22 19:19:30 +08:00