- Added LocalPath method to the Manager and Storage interfaces to retrieve the absolute path and content type of files.
- Enhanced local and S3 storage implementations to support LocalPath, including handling gzipped files and content type detection.
- Introduced comprehensive tests for LocalPath functionality, covering various file types, non-existent files, and gzipped content.
- Updated AddFile API to utilize LocalPath for retrieving file information, improving error handling and response consistency.
- Refactored the attachment manager to support file uploads with a new storage path and improved metadata handling.
- Implemented chunked uploads and direct content retrieval, enhancing performance and flexibility.
- Updated the file management API to include comprehensive operations for file uploads, downloads, and metadata management.
- Added support for multiple storage backends, including local and S3, with improved error handling and validation.
- Enhanced test coverage for file operations, ensuring reliability and consistency across different storage implementations.
- Modified test cases in `storage_test.go` to generate unique file IDs using UUIDs, ensuring no conflicts during tests.
- Updated the download test for non-existent files to utilize a UUID-based identifier, enhancing test reliability.
- Enhanced error handling in the S3 storage implementation by including the fileID in error messages for upload, upload chunk, merge chunks, and download operations. This change provides clearer context for debugging and improves the overall error reporting mechanism.
- Replaced the S3_CACHE_PATH variable with S3_PUBLIC_URL in both `pr-test.yml` and `unit-test.yml` workflows, enhancing the integration with S3 by providing a public URL for access.
- This change aligns with the ongoing improvements to S3-related environment variables for better deployment and testing processes.
- Added S3-related environment variables to both `pr-test.yml` and `unit-test.yml` workflows, enabling integration with S3 for testing and deployment.
- Included API, access key, secret key, bucket, and cache path settings to facilitate S3 interactions during CI processes.
- Introduced a new `Groups` field in the `Attachment` struct to support categorization of attachments.
- Integrated `types.MetaInfo` into `ManagerOption` for improved metadata handling.
- Added a local uploader for attachments, enabling file uploads from a specified local path.
- Updated asset management functions to reflect changes in file metadata and structure.
- Updated the API to include new upload options for handling different storage types: chat, knowledge, and assets.
- Improved group building logic for attachment uploads based on user, chat, and assistant IDs.
- Removed deprecated attachment files and refactored related code to streamline the attachment management process.
- Enhanced error handling for required fields in upload options, ensuring better validation and user feedback.
- Added AddFile, AddText, AddURL, and AddSegments functions to handle file and segment uploads, including JSON request parsing and validation.
- Integrated error handling for invalid requests and uninitialized Knowledge Base instances, ensuring robust API responses.
- Enhanced response structures for success and error cases, improving consistency across the API.
- Updated AutoDetectConverter function to use a single content type parameter instead of multiple content types.
- Deleted config.go, config_test.go, types.go, and related test files to streamline the codebase and remove deprecated components.
- Refactored Knowledge Base loading logic to utilize updated configuration structures, enhancing clarity and maintainability.
- Updated references in kb.go to align with the new configuration types, ensuring compatibility with the latest changes.
- Added a new test for resolving environment variables during configuration parsing, ensuring that environment variables are correctly substituted in the configuration.
- Refactored the configuration handling to resolve environment variables immediately after parsing, improving the clarity and usability of the configuration structure.
- Enhanced the collection management API by standardizing error responses and success responses using a custom response structure, improving consistency across endpoints.
- Implemented cleanup logic for test collections to ensure proper resource management during testing.
- Deleted obsolete test files for various OpenAPI components, including config_test.go, dsl_test.go, hello_test.go, oauth_test.go, oauth_token_test.go, and openapi_test.go, to streamline the codebase.
- Refactored OAuth response handling by integrating response methods from the response package, ensuring consistent error and success responses across OAuth endpoints.
- Enhanced error handling and response structure for improved clarity and maintainability, aligning with best practices for API responses.
- Moved Knowledge Base loading logic from the Load function to ensure it is consistently handled in both Load and Reload functions.
- Improved error handling by printing errors during Knowledge Base loading in the Reload function, enhancing user feedback.
- Updated GitHub Actions workflows to use the latest Ubuntu version and added services for Neo4j, Qdrant, and FastEmbed.
- Integrated FFmpeg and additional utilities into the CI environment, ensuring they are installed and tested during the workflow.
- Implemented environment variable resolution in the Knowledge Base configuration, allowing dynamic configuration based on environment settings.
- Added tests for environment variable resolution in the Knowledge Base configuration, ensuring correct parsing and handling of variables.
- Introduced a new configuration structure for the Knowledge Base, supporting vector and graph database configurations.
- Implemented JSON parsing methods for loading configurations from files and converting them to JSON format.
- Enhanced the Knowledge Base instance to integrate with GraphRag, allowing for dynamic configuration of vector and graph stores.
- Added feature detection capabilities to determine available functionalities based on the current configuration.
- Updated the Knowledge Base loading process to read from a specified configuration file, improving flexibility and usability.
- Introduced the Knowledge Base (KB) API by creating a new kb package with various endpoints for collection and document management, segment management, and search functionalities.
- Updated the OpenAPI router to attach the KB API, ensuring OAuth protection for all endpoints.
- Implemented logging for configuration validation to enhance error handling and user feedback.
- Marked the studio API functions (Start, Load, loadDSL, loadScripts) as deprecated, returning an error message to indicate their status.
- Commented out the implementation details of these functions to prevent execution of deprecated functionality, ensuring clarity in the codebase.
- Marked the studio API functions (Start, Load, loadDSL, loadScripts) as deprecated, returning an error message to indicate their status.
- Commented out all test cases in studio_test.go to prevent execution of deprecated functionality, ensuring clarity in the test suite.
- Deleted the existing hello world handlers from hello.go to streamline the codebase.
- Updated openapi.go to attach the new hello package for handling hello world routes, ensuring OAuth protection is applied correctly.
- Enhanced the README.md to reflect the new structure and provide comprehensive documentation for the hello world API endpoints.
- Updated response methods to standardize Content-Type header to "application/json" across OAuth endpoints, enhancing compliance with JSON standards.
- Refactored error and success response methods to streamline response generation without unnecessary wrappers, improving clarity and maintainability.
- Enhanced security by ensuring all responses include appropriate OAuth security headers, aligning with best practices for sensitive endpoints.
- Simplified test assertions for Content-Type in OAuth tests, ensuring consistency in response validation.
- Updated OAuth token handling to include PKCE (Proof Key for Code Exchange) parameters, improving security for authorization code grants.
- Refactored token management tests to incorporate PKCE code verifier and challenge, ensuring compliance with OAuth 2.1 standards.
- Enhanced refresh token handling to validate requested scopes against originally granted scopes, improving security and compliance.
- Updated various methods to support optional scope parameters, streamlining token management and validation processes.
- Improved test coverage for token introspection and exchange scenarios, ensuring robust validation of token handling logic.
- Added the JWKS endpoint to return JSON Web Key Set in compliance with RFC 7517, including necessary security headers.
- Refactored the JWKS generation logic to retrieve signing certificates and construct the JWK from the RSA public key.
- Introduced comprehensive tests for the JWKS endpoint, validating response format, compliance, and security headers.
- Updated go.mod to include the MongoDB driver as a required dependency.
- Introduced global test certificate paths to avoid redundant certificate generation across tests, improving efficiency.
- Implemented a function to create temporary certificates once for all tests, ensuring consistent usage of signing certificates.
- Updated test configurations to utilize the new certificate management, enhancing clarity and maintainability.
- Added cleanup functionality for global test certificates to ensure proper resource management after tests.
- Removed outdated token management tests from the user provider, including tests for storing, revoking, and retrieving tokens.
- Updated the user provider interface to reflect the removal of token management methods, ensuring cleaner code and improved maintainability.
- Streamlined the test suite by focusing on relevant user management functionalities, enhancing overall test clarity and effectiveness.
- Renamed existing hello world endpoints to public and added a new protected endpoint with OAuth guard.
- Updated test cases to reflect the new endpoint structure and added tests for protected endpoint access with and without valid tokens.
- Enhanced response handling for public and protected endpoints to ensure consistent output and proper status codes.
- Implemented comprehensive tests for the OAuth token revocation and introspection endpoints, ensuring correct handling of valid, invalid, and missing token scenarios.
- Enhanced the oauthRevoke and oauthIntrospect methods to comply with RFC specifications, returning appropriate status codes and responses.
- Introduced a utility function for obtaining access tokens directly in tests, streamlining the testing process for OAuth endpoints.
- Improved error handling and logging for better debugging and verification during tests.
- Consolidated token grant handling into a unified method for authorization code, client credentials, and device code grants, improving code organization and reducing duplication.
- Introduced new methods for handling token exchange and refresh token grants, ensuring compliance with relevant RFCs.
- Enhanced error handling and validation for client credentials and grant types, improving robustness and security.
- Updated tests to utilize real authorization codes and ensure comprehensive coverage of the new functionality.
- Added a comprehensive test for the OAuth client registration endpoint, ensuring proper handling of valid requests and responses.
- Updated the response handling methods to comply with RFC standards, including a new method for direct OAuth responses.
- Refactored existing response methods to improve security header management and streamline response generation.
- Enhanced test logging for better debugging and verification of response data during OAuth registration tests.
- Added core functionality for OAuth authorization, token handling, and user info retrieval, including error handling and response generation.
- Introduced helper functions for managing different grant types, improving code organization and clarity.
- Enhanced the test setup with a new Prepare function to initialize the OpenAPI test environment and a Clean function for proper resource management.
- Updated tests to ensure the OpenAPI server is correctly loaded and operational during testing.
- Removed OAuth discovery and metadata endpoints from the attachOAuth function to streamline the code.
- Introduced a new method to handle well-known endpoints, improving organization and clarity in the OAuth implementation.
- Updated the Attach method to include the new well-known handlers, ensuring proper routing for OAuth-related metadata.
- Added notes in the OAuth handler to clarify the requirements for using versioned paths, including the placement of discovery endpoints and server metadata.
- Emphasized the importance of mounting discovery endpoints at the root level for proper MCP client configuration and OAuth functionality.
- Integrated OpenAPI loading functionality into the engine's Load and Reload processes, allowing for better API management.
- Updated the OpenAPI configuration to set a default BaseURL and ensure it does not have a trailing slash.
- Implemented the Attach method to connect the OpenAPI server to the Gin router, facilitating API endpoint management.
- Removed the obsolete hello package to streamline the OpenAPI module.
- Enhanced the Config struct to support JSON marshaling and unmarshaling with human-readable duration strings for various OAuth settings.
- Introduced temporary structures to facilitate the conversion of string duration fields to time.Duration types during JSON operations.
- Added utility functions for parsing and formatting duration strings, ensuring accurate handling of time-related configurations.
- Updated tests to validate the correct parsing and formatting of duration fields in the configuration.
- Implemented a cleanup step in the TestLoad function to remove the data store created during tests, ensuring a clean test environment.
- Added error handling for the Load function to improve robustness and provide feedback in case of failures.
- Added support for a new OAuth data store in the system store management, allowing for better organization and retrieval of OAuth-related data.
- Updated the OAuth cache store configuration to increase the cache size from 4096 to 8192, improving performance and storage capacity.
- Enhanced test utilities to include the new OAuth store, ensuring comprehensive testing coverage for the updated store management features.
- Introduced a new system store management feature, allowing for the loading of predefined system stores such as cache and OAuth client stores.
- Added a `loadSystemStores` function to handle the loading of system stores with variable replacement for configuration paths.
- Enhanced the `Load` function to include the loading of system stores, improving the overall store management process.
- Updated test utilities to support loading system stores for testing, ensuring comprehensive coverage and functionality.
- Refactored the `replaceVars` function to facilitate variable replacement in JSON strings, enhancing flexibility in store configurations.
- Updated the SigningConfig, TokenConfig, SecurityConfig, and ClientConfig structures to include optional default values for various fields, improving clarity and usability.
- Added comments to specify default values and optionality for each configuration parameter, enhancing documentation within the code.
- This change aims to streamline the configuration process for OAuth service implementations.
- Updated the TokenExchange method to utilize a new generateExchangedToken function for improved token generation.
- Enhanced error handling to return a descriptive error response if token generation fails.
- Added a new generateExchangedToken function to encapsulate the logic for creating exchanged tokens, improving code organization and maintainability.
- Updated test cases to improve coverage for dynamic client registration scenarios.
- Enhanced error handling tests for various client registration edge cases, ensuring robustness in validation processes.
- Streamlined test setup for consistency across different testing environments.
- Implemented tests to verify error handling for disallowed redirect URI hosts and schemes during dynamic client registration.
- Updated test clients to use localhost for redirect URIs, ensuring consistency in testing environment.
- Added default values for grant types, response types, application type, and token endpoint auth method during dynamic client registration.
- Implemented nil checks for client information in the CreateClient and UpdateClient methods to ensure robust error handling and validation.
- Enhanced dynamic client registration by refining client ID and secret generation methods.
- Improved validation processes for client registration requests and authorization flows.
- Streamlined user management integration with the updated user model, ensuring compatibility and efficiency.
- Updated token management features to support new client and user interactions, enhancing overall service functionality.
- Added dynamic client registration support in the OAuth service, implementing RFC 7591 for automatic client registration.
- Introduced methods for generating client IDs and secrets, validating registration requests, and creating client information.
- Enhanced authorization flow by validating client requests, redirect URIs, and response types.
- Implemented token management features, including token introspection, token exchange, and refresh token handling.
- Improved security with state parameter generation and validation, as well as code challenge methods for PKCE.
- Updated endpoint discovery and server metadata retrieval to include new features and capabilities.
- Introduced a new user model `yao/models/user.mod.yao` to support user management functionalities.
- Updated the OAuth service to utilize the new `DefaultUser` provider, enhancing user authentication and management capabilities.
- Refactored user retrieval methods to align with the new user model structure, ensuring compatibility and improved functionality.
- Added token management methods to the user provider interface, streamlining token handling processes.
- Enhanced test utilities to include the new user model for comprehensive testing coverage.
- Deleted the OAuth interface and related types that were previously defined in the `interfaces.go` and `types.go` files, streamlining the codebase.
- Updated the `oauth.go` file to integrate user and client providers directly, enhancing the service's functionality and reducing complexity.
- Refactored the user information retrieval method to utilize the new user provider structure, ensuring compatibility with the updated architecture.
- Introduced the OAuth service structure, including configuration management and user provider integration.
- Implemented default settings and validation for various configuration parameters, ensuring robust service initialization.
- Added methods for retrieving service configuration and user information based on access tokens.
- Defined error handling for configuration issues, enhancing reliability of the OAuth service.
- Introduced a new function `loadSystemModels` to load predefined system models for testing purposes, enhancing the test environment setup.
- Implemented error handling for model loading and migration, ensuring robust integration of system models.
- Updated the `Prepare` function to call `loadSystemModels`, streamlining the test preparation process.