- Updated the system configuration to include new role-level defaults for Light, Vision, and Audio connectors.
- Refactored the resolveSystemConnector function to prioritize per-agent overrides, improving connector resolution logic.
- Enhanced LLMConnector integration across various components to streamline settings retrieval and capabilities management.
- Improved error handling and logging for connector-related operations, ensuring better diagnostics and user feedback.
- Upgraded AWS SDK for Go v2 and its related packages in go.mod and go.sum to improve compatibility and access to new features.
- Updated session management logic in the Runner to ensure proper handling of chat sessions.
- Added new unit tests for keyword search functionality in the Assistant model, enhancing search capabilities across locales.
- Refactored JSON handling in the Assistant package to streamline options configuration.
- Introduced NanoToTime and TimeToNano functions for converting between UnixNano and time.Time, improving clarity and consistency in timestamp management.
- Updated Assistant model to utilize the new utility functions for created_at and updated_at fields.
- Refactored Xun store methods to ensure UTC compatibility for timestamp serialization across different database drivers.
- Added unit tests for the new conversion functions to validate their correctness and behavior.
- Updated GetAssistants and DeleteAssistants methods to utilize jsonContainsValue for filtering tags and locales, improving query compatibility across database drivers.
- Renamed related test functions to reflect the new JSON handling approach.
- Removed deprecated jsonLikeExpr and whereJsonLike methods to streamline codebase.
- Introduced utility functions for applying LIKE conditions on JSON columns, enhancing compatibility with PostgreSQL.
- Simplified the filtering logic for tags and keywords in the GetAssistants and DeleteAssistants methods.
- Added unit tests for the new JSON handling functions to ensure correctness across different database drivers.
- Updated database configuration to include PostgreSQL 14.0 in CI workflows.
- Enhanced JSON null detection in the Xun store to support PostgreSQL dialect.
- Refactored time conversion utilities to handle multiple database formats, including PostgreSQL.
- Improved cleanup logic in the DataCleaner to ensure proper order of operations for referential integrity.
- Added utility functions for converting between Unix timestamps and database timestamps.
- Added support for sandbox configuration in the LoadPath function, allowing for better management of sandbox settings.
- Updated tests to validate the retrieval of assistant tags with type filters, ensuring accurate responses for both assistant and robot types.
- Enhanced the assistant model to differentiate between sandbox versions, improving the handling of sandbox data in the database.
- Improved API responses to include computer filter details for V2 sandboxes, enhancing the information returned to clients.
- Replaced the previous file extension checks with a unified parsing function for sandbox configuration, improving code clarity and maintainability.
- Introduced a new HostExecConfig structure to manage local execution settings, allowing for more granular control over command execution permissions.
- Removed deprecated Moapi API files and related functionality, simplifying the codebase and reducing maintenance overhead.
- Updated the Tai node registration process to ensure local capabilities are accurately reflected based on the environment, enhancing overall system robustness.
- Updated the AssistantInfo struct to include new fields: Connector, ConnectorOptions, Modes, DefaultMode, Sandbox, and ComputerFilter for improved assistant configuration.
- Enhanced the loading process to extract Sandbox flag and ComputerFilter from V2 sandbox configuration.
- Refactored GetInfo method to return comprehensive assistant details for better UI integration.
- Introduced new endpoint for workspace options to streamline InputArea selector functionality.
Made-with: Cursor
- Updated the registration process to utilize NodeID instead of TaiID, allowing for server-generated TaiIDs.
- Implemented additional fields in the registration request, including DisplayName and improved error handling for missing parameters.
- Enhanced the connection logic for registered nodes, ensuring proper client binding and logging for better traceability.
- Introduced new methods for extracting and managing extra claims in OAuth tokens, improving the flexibility of user identification.
Made-with: Cursor
- Implemented V2 sandbox initialization in the assistant loading process, allowing for standalone sandbox.yao configuration.
- Added support for V2 sandbox execution paths in the Assistant's Stream method, differentiating between V1 and V2 sandboxes.
- Introduced comprehensive tests for V2 sandbox configurations, ensuring correct loading and execution behavior.
- Updated the context and types to accommodate V2 sandbox features, including system information and workspace management.
Made-with: Cursor
- Consolidate JSON serialization for assistant fields into a single function, `marshalJSONFields`, to streamline the code and improve maintainability.
- Introduce a new utility function, `isNil`, to accurately check for nil values, including typed nils in interface{} types.
- Remove redundant marshaling logic for options, tags, and modes, enhancing clarity and reducing code duplication.
- Update the `UpdateAssistant` method to utilize the new nil-checking logic for JSON fields, ensuring correct handling of nil values.
- Introduce a new field for dependencies in the Assistant model to manage external MCP client dependencies with version constraints.
- Implement deep copy functionality for dependencies in the Clone method to ensure integrity during assistant cloning.
- Enhance the Update method to handle dependencies input from data maps, supporting both string and interface types.
- Update the Map method to include dependencies in the serialized output.
- Add comprehensive tests to validate loading, cloning, and mapping of dependencies, ensuring correct behavior across various scenarios.
<message>
- Introduce Feishu and DingTalk adapters in the robot lifecycle for enhanced integration capabilities.
- Update the integration dispatcher to include new adapters for handling events from Feishu and DingTalk.
- Modify the configuration structure to support settings for both Feishu and DingTalk integrations.
- Enhance the integration parsing logic to recognize and process configurations for Feishu and DingTalk.
- Update GetMessages function to ensure that when a limit is specified, the most recent messages are retrieved in descending order and then reversed for chronological output.
- Adjust pagination handling to apply a large limit when only an offset is provided, maintaining clarity in message retrieval.
- Enhance query ordering to prioritize message creation time and sequence for consistent results.
- Implement TestEnsureChatMetadata to verify that metadata, including robot_id, is correctly persisted in chat records.
- Update EnsureChat method to store metadata from the context when creating chat records.
- Introduce TestExecutorGoalsInjection to validate that pre-confirmed goals are injected into executions from TriggerInput.Data.
- Enhance executor logic to handle goal injection and persistence, ensuring accurate execution titles.
- Modify chat filtering to support chat_id_prefix for improved chat retrieval based on robot identifiers.
- Modify the sandbox integration test to load a different assistant configuration, ensuring accurate testing of sandbox capabilities.
- Refactor JSON field parsing in the Xun store to handle both string and byte slice types, improving robustness in data processing and ensuring proper unmarshalling of JSON fields.
- Introduce `Capabilities` and `Sandbox` fields in the Assistant model, allowing for detailed descriptions of assistant capabilities and sandbox configurations.
- Update loading and conversion functions to handle the new fields, ensuring they are correctly parsed and stored.
- Modify filtering and response handling to include the new fields, providing better integration with the API.
- Add comprehensive tests to validate the functionality of the new fields, ensuring they are correctly processed in various scenarios.
- Implement secure config file location (/tmp/.yao/proxy.json) instead of user-visible /workspace/
- Add generic options map support for backend-specific parameters (e.g., thinking for Volcengine GLM-4.7)
- Add secrets support for passing sensitive env vars (e.g., GITHUB_TOKEN) to sandbox container
- Remove excessive debug logs, keep critical ones with log.Printf("[Sandbox]...")
- Fix test assertions for system prompt passing via CLI args instead of env var
- Update i18n messages for sandbox loading states
Co-authored-by: Cursor <cursoragent@cursor.com>
- Added steps to pull necessary Docker images for sandbox testing in both CI workflows.
- Updated the AI test execution to utilize sandbox configurations, ensuring proper environment setup.
- Introduced sandbox initialization in the Assistant's Stream method, allowing for execution of coding agents like Claude and Cursor.
- Enhanced context management to support sandbox execution, improving flexibility in handling agent operations.
- Added a new `Types` field to the `AssistantFilter` struct to allow filtering by multiple types using an IN query.
- Updated the `GetAssistants` function to apply the new multi-type filter alongside the existing single type filter.
- Modified the OpenAPI endpoint to support the new `types` query parameter for better flexibility in assistant retrieval.
- Ensured backward compatibility by setting a default type when neither `type` nor `types` is specified.
- Updated related documentation and tests to reflect the changes in filtering capabilities.
- Introduced a new `Search` type to store intermediate processing results, including extracted keywords, entities, relations, and generated QueryDSL for improved debugging and citation support.
- Updated the `executeAutoSearch` method to populate the new `Search` structure, ensuring all relevant data is captured during search execution.
- Implemented methods for saving and retrieving search records in MongoDB and Redis, enhancing data persistence across sessions.
- Revised localization files to include new keys for search-related messages, improving user experience.
- Updated DESIGN.md to reflect changes in the search result structure and data flow, ensuring comprehensive documentation of the new features.
- Introduced a new search configuration structure, allowing for detailed settings for web, knowledge base, database, citation, and weights.
- Updated the `Assistant` model to include a `Search` field, enabling assistant-specific search configurations.
- Enhanced the loading and merging logic for search configurations, ensuring global defaults can be overridden by assistant-specific settings.
- Added comprehensive tests for loading, saving, and updating assistants with search configurations, verifying the integrity of search settings.
- Updated documentation in DESIGN.md to reflect the new search configuration hierarchy and usage, clarifying the interaction between global and assistant-level settings.
- Added `locale` query parameter for assistant information retrieval, allowing for localization based on user preferences.
- Introduced `assistants` field in the response to provide localized details (name, avatar, description) for unique assistant IDs, improving frontend display capabilities.
- Updated documentation to clarify locale resolution priority and the significance of the new `assistants` field in chat responses.
- Introduced `GetInfo` method in the Assistant struct to return basic assistant information with optional locale support for internationalization.
- Implemented `GetInfoByIDs` function to retrieve information for multiple assistants based on their IDs, enhancing batch processing capabilities.
- Updated chat buffer management to include a mode parameter, allowing for dynamic switching between chat and task modes.
- Enhanced message handling to store and retrieve the mode associated with each message, improving context tracking during chat sessions.
- Revised tests to validate the new functionalities, ensuring accurate retrieval of assistant information and proper mode management in chat operations.
- Updated the `ChatBuffer` to support streaming messages, allowing for content to be appended and finalized with `SendStream` and `End` methods.
- Modified the `AddAssistantMessage` method to include a message ID, improving message tracking and retrieval.
- Implemented new methods for appending content to streaming messages and completing them, ensuring accurate message storage and event handling.
- Revised tests to validate the new streaming functionality and ensure proper integration with existing message handling processes.
- Updated `CHAT_STORAGE_DESIGN.md` to reflect changes in message storage and indexing, including unique constraints for message IDs within requests.
- Enhanced chat buffer and message handling to support dynamic connector switching, allowing users to change the connector during a chat session.
- Updated the `ChatBuffer` and `BufferedMessage` structures to include a `connector` field, enabling tracking of the connector used for each message.
- Modified the `EnsureChat` method to skip chat creation when history is disabled, improving chat session management.
- Revised tests to validate the new connector functionality, ensuring accurate message retrieval and connector state management.
- Updated `CHAT_STORAGE_DESIGN.md` to reflect the addition of the `last_connector` field in chat metadata and message structures.
- Added comprehensive documentation for the new RESTful HTTP APIs for managing chat sessions and messages, including endpoints for listing, retrieving, updating, and deleting chat sessions.
- Included detailed request and response examples for each endpoint, along with query parameters and permission filtering guidelines.
- Updated the `CHAT_STORAGE_DESIGN.md` to reflect these changes, ensuring clarity on the API's functionality and usage.
- Introduced methods for initializing and managing a chat buffer, allowing for efficient storage of user inputs and assistant messages during chat sessions.
- Added functionality to track execution steps, including beginning and completing steps, with support for capturing space snapshots and handling errors.
- Enhanced the FlushBuffer method to save buffered messages and steps to the database, ensuring data integrity and recovery capabilities.
- Updated the Stream method to integrate buffer management, ensuring proper handling of chat sessions and message storage.
- Added comprehensive tests to validate buffer initialization, user input handling, and step tracking functionalities.
- Updated the ChatFilter structure to include advanced permission filters for UserID and TeamID, allowing for more granular chat retrieval.
- Added examples in the documentation to demonstrate new filtering capabilities, including combinations of user and team filters, as well as complex conditions using QueryFilter.
- Implemented batch saving and retrieval functionalities for messages and resumes, improving data management efficiency.
- Revised related tests to validate the new filtering features and ensure robust functionality across chat management operations.
- Added CreateChat, GetChat, UpdateChat, and DeleteChat methods to manage chat sessions effectively.
- Implemented validation for required fields and handling of nullable fields during chat creation and updates.
- Enhanced chat retrieval with pagination and filtering options, including time-based grouping.
- Introduced helper functions for converting database rows to Chat structs and grouping chats by time.
- Updated message and resume models to support soft deletes, improving data management and integrity.
- Updated the `CHAT_STORAGE_DESIGN.md` to define the `ChatStore` and `AssistantStore` interfaces, providing clear operations for managing chats, messages, resumes, and assistants.
- Introduced new methods for creating, retrieving, updating, and deleting chats and assistants, along with batch operations for messages and resumes.
- Enhanced the documentation to clarify the responsibilities of each store interface and the associated data structures, ensuring better understanding for future development.
- Revised related functions and tests to support the new design, reinforcing the integrity and performance of chat interactions and assistant management.
- Removed the `history` model and replaced it with a new `message` model to streamline chat message storage and retrieval.
- Introduced a `resume` model to enhance the chat's ability to recover from interruptions, capturing essential execution state data.
- Updated the `CHAT_STORAGE_DESIGN.md` to reflect these changes, including new fields and relationships for the message and resume models.
- Revised related functions and tests to support the new data structures, ensuring improved integrity and performance in chat interactions.
- Added time range filters (StartTime, EndTime, TimeField) to the ChatFilter structure for improved chat retrieval based on specific time criteria.
- Introduced sorting options (OrderBy, Order) to allow customization of chat list order.
- Implemented grouping functionality (GroupBy) to enable time-based organization of chat results.
- Updated the ChatList structure to include groups for better UI representation of chats.
- Added examples in the documentation to demonstrate the new filtering and grouping capabilities in chat retrieval.
- Removed the `preset` field from the chat metadata structure to simplify the design.
- Added new indices for `role` and `thread_id` in the message storage section to enhance query performance and organization.
- Introduced a new index for `type` in the resume functionality to improve retrieval efficiency during chat state restoration.
- Revised the documentation to emphasize that all message types, including built-in and custom types, are stored, with specific notes on the handling of lifecycle events and custom types.
- Enhanced the timeline section to reflect changes in message processing, including updates to the sequence of stored messages and the introduction of concurrent operations storage.
- Improved clarity on the storage approach for concurrent operations, detailing the use of `block_id` and `thread_id` for grouping messages during parallel tasks.
- Updated the write strategy in CHAT_STORAGE_DESIGN.md to transition from a two-write to a single-write approach, enhancing efficiency by writing all messages (user input and assistant responses) to the database only once upon stream exit.
- Revised related documentation to clarify the new single-write process and its implications for message handling and database interactions.
- Adjusted implementation details in the Stream function to reflect the new strategy, ensuring that steps are only saved on error or interruption, thereby reducing unnecessary database writes.
- Introduced a new `retrieval` message type in `BUILTIN_TYPES.md` to handle knowledge base and web search results, including structured properties for query, sources, and metadata.
- Updated `CHAT_STORAGE_DESIGN.md` to document the storage approach for retrieval results, emphasizing user feedback, quality analytics, and source attribution.
- Enhanced examples and use cases for retrieval messages to clarify implementation and integration within the chat system.
- Revised related documentation to ensure consistency and understanding of the new retrieval capabilities.
- Updated the chat storage design to introduce a new `agent_resume` table for storing execution states during interruptions or failures, improving recovery capabilities.
- Replaced the `agent_step` table with a more focused `Resume` model, capturing essential data for resuming operations.
- Expanded the message types to include detailed structures for various content types, including `tool_call`, `error`, and multimedia messages.
- Enhanced documentation to clarify the new storage strategies and message handling processes, ensuring better understanding for future development.
- Updated related functions and tests to support the new resume logic and message structures, reinforcing the integrity of the chat storage system.
- Updated the chat storage design to reflect a shift from "Conversation" to "Chat" terminology, improving clarity in the data structure.
- Revised the data models for Chat and Message tables, including new fields for enhanced metadata management and permissions.
- Introduced a `space_snapshot` field in the Step model to facilitate recovery during execution, improving resilience in chat interactions.
- Enhanced middleware documentation to reflect the modular architecture and provide clearer usage examples for different API routes.
- Updated tests to ensure the integrity of new data structures and functionalities, reinforcing the robustness of the chat storage system.
- Improved the Assistant's initialization process by integrating dynamic configuration loading from `agent/kb.yml`, allowing for more flexible chat session settings.
- Refactored the `initKBConfig` function to streamline the reading and parsing of Knowledge Base settings.
- Optimized conversation initialization to prepare KB collections asynchronously, enhancing performance during chat interactions.
- Updated tests to ensure the correct application of KB settings and robust integration with the Assistant's functionality.
- Added functionality to load Knowledge Base (KB) configuration from `agent/kb.yml`, allowing dynamic settings for chat sessions.
- Introduced `initKBConfig` function to read and parse KB settings, integrating them into the Assistant's initialization process.
- Enhanced the Assistant's conversation initialization to prepare KB collections asynchronously, improving performance during chat interactions.
- Updated tests to verify the correct loading and application of KB settings, ensuring robust integration with the Assistant's functionality.
- Refactored metadata handling for KB collections to include additional fields for improved context management during chat sessions.
- Changed the `Optional` field in `ConnectorOptions` from a boolean to a pointer to allow for nil values, enhancing flexibility in option handling.
- Updated tests in `load_test.go`, `convert_test.go`, and `assistant_test.go` to reflect the new pointer type for `Optional`, ensuring proper assertions and error handling.
- Added new test cases to validate behavior when `Optional` is nil or false, improving test coverage and robustness of the ConnectorOptions functionality.
- Enhanced the `loadMap` function to include handling for `modes` and `default_mode` fields, allowing for flexible operational modes and a specified primary mode.
- Introduced a new `DB` field in the Assistant model to support database configuration, improving data management capabilities.
- Implemented the `ToModes` conversion function to facilitate various input types for modes, ensuring robust handling and validation.
- Added comprehensive tests for the `ToModes` function to validate its functionality across different input scenarios, enhancing overall reliability.
- Updated relevant methods to ensure consistent integration of the new fields and functionalities within the Assistant model.
- Introduced `modes` field to support multiple operational modes for the assistant, allowing for flexible functionality (e.g., chat, task).
- Added `default_mode` field to specify the primary mode of operation for the assistant.
- Updated the `Map`, `Clone`, and `Update` methods to handle the new fields appropriately.
- Enhanced the `ToAssistantModel` conversion function to include the new fields.
- Added tests to validate the integration and functionality of modes and default mode within the assistant model.
- Introduced a new `Database` type to encapsulate database models and options.
- Updated the `Assistant` model to include a `DB` field for database configuration.
- Enhanced the `Map`, `Clone`, and `Update` methods to handle the new `DB` field appropriately.
- Implemented the `ToDatabase` conversion function to support various input types for database initialization.
- Added comprehensive tests to validate the integration of the database functionality within the assistant model.
- Updated relevant fields and methods to ensure consistent handling of the new database configuration.
- Introduced the `disable_global_prompts` field in the Assistant model to control the usage of global prompts.
- Updated the Load and Get methods to initialize and retrieve global prompts from the configuration.
- Refactored tests to validate the new global prompts functionality and ensure proper loading and context handling.
- Improved the overall structure and clarity of the assistant's capabilities and configurations.
- Removed the GetByConnector method from the Assistant model to streamline the retrieval process.
- Introduced new fields for connector options and prompt presets, allowing for more flexible configurations.
- Updated the Map method to include additional fields such as connector options and prompt presets.
- Enhanced the Clone method to support deep copying of new fields.
- Improved the Update method to handle updates for the new source, connector options, and prompt presets fields.
- Refactored tests to ensure comprehensive coverage of the new functionalities and maintain clarity in the assistant structure.
- Enhanced the getConnectorCapabilities method to prioritize model capabilities and connector settings, improving capability retrieval logic.
- Deprecated the tools field in the Assistant model, transitioning to MCP for tool management, and updated related methods accordingly.
- Introduced new fields for connector options and prompt presets in the Assistant model, allowing for more flexible configurations.
- Updated the GetAssistant method to support field selection, improving data retrieval efficiency and flexibility.
- Refactored tests and documentation to reflect changes in the assistant structure and capabilities, ensuring clarity and maintainability.
- Updated MCP server configuration to support advanced formats, including tools and resources.
- Refactored the Assistant's Stream method for improved readability and maintainability, adding clear section comments.
- Enhanced error handling and logging for better traceability during streaming operations.
- Removed deprecated methods and streamlined MCP server handling in tests to ensure robust functionality and validation.