- Update health check messages in CI workflows to specify HTTP and gRPC readiness for the Tai service.
- Refactor integration tests to use `require` assertions instead of `assert`, improving error handling and test reliability.
- Ensure that responses from gRPC calls are not nil, enhancing test robustness.
These changes improve the clarity of service readiness checks and strengthen the integration test suite.
- Add support for the OAuth Device Authorization Flow (RFC 8628) in the OpenAPI service, allowing devices with limited input capabilities to obtain authorization.
- Implement `DeviceAuthorization()` and `AuthorizeDevice()` methods to handle device and user code generation, storage, and authorization.
- Update the OAuth endpoints to include `/device/authorize` for user code authorization and fix the discovery endpoint path for device authorization.
- Introduce MongoDB service in CI workflows for testing and enhance the unit test workflow with Redis setup.
- Update Go module dependencies to include necessary packages for the new features.
This commit significantly advances the OAuth capabilities of the application, enabling a more flexible authorization process for devices.
- Mark Phase 4 and Phase 5 as complete, indicating successful removal of fixed upstream connections and the introduction of dynamic routing based on request metadata.
- Implement `TokenManager` for handling authentication tokens and update gRPC client methods to support new features.
- Enhance tests for dynamic routing and token management, achieving significant coverage improvements.
- Begin preparations for Phase 6, outlining the structure for OAuth Device Flow and related tasks.
This commit finalizes key gRPC features and sets the stage for upcoming authentication enhancements.
- Add gRPC server configuration to the application, allowing for gRPC communication.
- Introduce new Makefile targets for gRPC unit testing and proto code generation.
- Update CI workflows to include gRPC tests with SQLite as the transport layer.
- Refactor the sandbox design to support multi-node capabilities and improve isolation.
- Enhance the service layer to facilitate internal request forwarding for gRPC APIs.
This commit lays the groundwork for integrating gRPC into the Yao SDK, improving performance and scalability.
- Add K8s sandbox implementation (sandbox/k8s.go) using client-go
- Extend tai.New() to support K8s runtime via Tai proxy
- Remove containerd support, fix default port assignment bug
- Update CI workflows to spin up k3d cluster and route K8s tests
through Tai proxy for full end-to-end coverage
- Make test ports configurable via environment variables
Made-with: Cursor
- Introduce new Tai SDK tests in the GitHub workflows, requiring a Tai container with Docker socket mount for execution.
- Update the Makefile to include a dedicated target for running Tai SDK tests, enhancing test coverage for the Tai integration.
- Modify the Go module dependencies to include the pierrec/lz4 package, ensuring compatibility with the new tests.
- Adjust test folder selection logic in the Makefile to exclude additional directories, streamlining the testing process.
- Introduce a fallback mechanism in the GetConnector method to use a default connector if the specified connector is not found.
- Add logging to notify when falling back to the default connector, improving debugging and traceability.
- Update comments for clarity on connector selection priority, ensuring better understanding of the logic flow.
- Add a `--force` flag to the `push` command in both agent and MCP modules, allowing users to overwrite existing versions by deleting them before pushing.
- Update the `PushOptions` struct to include the `Force` field, ensuring the functionality is integrated into the push logic.
- Enhance E2E tests to validate the behavior of the force push feature, ensuring that existing versions are deleted as expected when the flag is used.
- Introduce tests for packing directories to respect `.yaoignore` rules, improving file exclusion handling during the packaging process.
- Change the MCP server configuration from a map to a slice in both the E2E test helper functions and the agent management code, improving consistency in data representation.
- Update the test cases to reflect the new server structure, ensuring compatibility with the modified MCP configuration.
- Increase the timeout for the unit-test-registry target in the Makefile to 5 minutes for improved test execution.
- Refactor the prompt structure in E2E tests to align with the new format, enhancing clarity and consistency in the test setup.
- Change the test scope identifier from "@test" to "@yaoagents" in client tests for consistency.
- Remove the outdated E2E test file `e2e_test.go` from the manager directory, as it is no longer needed.
- Enhance the agent manager to utilize the MCP manager for dependency installations, improving the handling of MCP-type dependencies.
- Introduce new MCP and Robot command groups in the CLI, allowing for better organization of package management commands.
- Add corresponding command descriptions for MCP and Robot functionalities to improve user guidance.
- Update the agent command group to include additional commands for enhanced agent management.
- Modify .gitignore to exclude specific design markdown files from version control.
- Add environment variable for test application path in GitHub workflows to streamline testing setup.
- Add environment variables for registry initialization in both `pr-test.yml` and `unit-test.yml`.
- Implement a waiting mechanism for the registry service to ensure readiness before executing tests.
- Remove redundant steps for user creation and service restart, streamlining the test setup process.
- Enhance the client code to support auto-discovery of the API prefix, improving flexibility in server URL configuration.
- Introduce comprehensive error handling in client tests to cover various edge cases and improve test coverage.
- Update .gitignore to exclude registry data files.
- Modify Makefile to include new unit-test-registry target for running tests against the Yao Registry service.
- Add comprehensive Registry Client SDK tests in GitHub workflows, ensuring proper setup and execution of tests with Docker service dependencies.
- Implement steps for user creation, service restart, and test execution, along with reporting results back to the pull request.
- Introduce a new Tags field in the Server struct to allow for additional metadata.
- Update the listServers function to populate the Tags field from the server metadata, enhancing the server representation with more contextual information.
- 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.
- Introduce a refresh gate mechanism to prevent duplicate refresh attempts for the same token, allowing concurrent requests to safely handle expired tokens.
- Update the guard and refresh token logic to utilize the new error handling for in-progress refresh operations, enhancing the reliability of the authentication flow.
- Remove the previous caching mechanism for refresh status, streamlining the code and improving clarity in the refresh process.
- Introduce a new method to control the maximum number of history messages loaded, prioritizing user-defined options over store settings.
- Update the history loading logic to filter out non-semantic message types and convert tool call and action messages into historical summaries for better context.
- Refactor the message conversion functions to handle different formats and ensure clarity in the historical context provided to the LLM.
- Add comprehensive tests to validate the new behavior and ensure accurate message handling in various scenarios.
- Enhance the OAuth authentication flow to allow concurrent requests to safely handle expired tokens without triggering multiple refresh attempts.
- Introduce a mechanism to mark refresh tokens as being rotated, ensuring that only one request processes the refresh while others can proceed with valid claims.
- Update the guard logic to reflect these changes, improving the overall efficiency and reliability of token management.
- Update the delivery handling logic to only push messages to integration channels when the task originates from one, ensuring more accurate message routing.
- Enhance the error logging to include channel information for better debugging during integration reply failures.
- Streamline the conditions for message delivery to improve code clarity and maintainability.
- Add locale support for DingTalk and Discord integrations to ensure messages are sent in the correct language.
- Update message formatting logic in DingTalk and Discord to utilize dedicated formatting functions for Markdown.
- Implement image and file handling improvements in Feishu integration, allowing for better attachment processing and error handling.
- Refactor message sending methods to streamline the process and enhance code clarity across integrations.
- Introduce a new sanitizeDSL function to clean up unsupported wildcards in the generated DSL.
- Adjust the sequence of operations in SearchWithContext to reflect the new sanitization step.
- Update comments to accurately reflect the changes in the execution flow and improve code clarity.
- Introduce a new POST endpoint for verifying integration credentials at /robots/integrations/verify.
- Ensure the endpoint is positioned correctly in the routing to avoid conflicts with existing routes.
- Enhance the API's capabilities for integration management by allowing credential verification.
- Introduce Discord adapter in the robot lifecycle to enable integration with Discord events.
- Update the integration dispatcher to recognize and handle events from Discord.
- Modify the configuration structure to include settings for Discord integration.
- Enhance the integration parsing logic to support Discord configurations.
<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.
- Add Telegram integration support by introducing a dispatcher for handling Telegram events and messages.
- Implement event notifications for robot configuration changes (creation, update, deletion) to facilitate integration with external services.
- Refactor the robot initialization process to load robots into cache and start the dispatcher, improving the overall system setup.
- Update the delivery event structure to include additional metadata for better context during message handling.
- Enhance logging capabilities for better observability during robot execution and event processing.
- Introduce ServerURL field in YaoMetadata to provide the public server URL for the instance, with a fallback mechanism.
- Implement resolveServerURL function to determine the ServerURL based on the YAO_SERVER_URL environment variable or the issuer_url.
- Update yaoMetadata method to populate the ServerURL field, enhancing API endpoint construction for clients and integrations.
- 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.
- Update the filename logic in convertAttachments to prefer the semantic title from the delivery agent over the raw storage filename.
- Ensure the original file extension is preserved when using the human-readable title, improving clarity for email clients.
- Adjust logging to reflect the updated filename handling for better observability during attachment processing.
- Update DeliveryPayload to use structured types for Content and Preferences, enhancing type safety and readability.
- Modify tests to reflect changes in payload structure, ensuring proper serialization and deserialization of delivery content.
- Implement a new robotHandler for processing delivery events, streamlining the handling of different delivery channels (email, webhook, process).
- Remove the deprecated DeliveryCenter, consolidating delivery logic within the new handler for better maintainability.
- Enhance error handling and logging during delivery processing to improve observability and debugging capabilities.
- Change clock trigger time in tests from 09:00 to 03:33 for more accurate simulation.
- Ensure cleanup of integration robots is performed before each test run to maintain test isolation.
- Stop the manager before assertions to prevent unintended executions during test validation.
- Refactor execution listing to support pagination with `Page` and `PageSize` options, replacing previous `Limit` and `Offset` parameters.
- Introduce `ExcludeStatuses` in execution queries to filter out specific execution statuses.
- Implement streaming interaction methods in the manager, allowing real-time responses from the host agent during interactions.
- Update API endpoints to accommodate new query parameters and enhance interaction capabilities with streaming support.
- Modify tests to ensure coverage for new pagination and streaming functionalities.
- Replace direct cleanup calls in the Close method with a sync.Once mechanism to guarantee that cleanup runs only once.
- Remove the cleanup method and integrate its functionality into the Close method, streamlining resource management.
- Update the serve method to call Close for cleanup, enhancing clarity and consistency in session termination.
- Add `language_model` field to robot data structures for LLM connector overrides.
- Update `AgentCaller` to utilize the robot's language model and include logging capabilities for agent calls.
- Refactor task execution to log task outputs and inputs, improving observability during execution.
- Modify tests to accommodate changes in the runner initialization and ensure proper logging functionality.
- Update multiple test cases in interact_helpers_test.go to include Status and Phase fields in ExecutionRecord, ensuring comprehensive coverage for human-triggered actions.
- Replace direct error handling with require.NoError for improved test reliability and clarity in error reporting during execution store saves.
- Update multiple test cases in interact_helpers_test.go to include TriggerType set to types.TriggerHuman in ExecutionRecord.
- Ensure consistency in testing scenarios involving human-triggered executions, enhancing clarity and coverage in unit tests.
- Rename test folders and commands in the Makefile for consistency, changing references from AI to Agent tests.
- Update GitHub Actions workflows to reflect the new naming conventions for agent and robot tests, ensuring clarity in CI processes.
- Modify test cases to improve readability and maintainability, including renaming test functions for better understanding of their purpose.
- Enhance comments in the Makefile and workflows to provide clearer context on the testing processes and requirements.
- Implement V2 execution model in the standard executor, simplifying task execution to a single call without validation loops.
- Introduce support for resuming suspended executions, allowing for human input during task processing.
- Enhance event handling by pushing task completion and failure events to the event bus for better tracking and integration.
- Update tests to reflect changes in execution flow and ensure robust handling of task statuses and results.
- 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.
- Introduce `resolveEnvStrings` function to handle `$ENV.XXX` references in the agent's DSL settings, ensuring that environment variables are correctly substituted in system and uses fields.
- Enhance `Load` function to call `resolveEnvStrings` during the loading process, improving the configuration handling for agents.
- Add comprehensive unit tests for `resolveEnvStrings` to validate the correct resolution of environment variables across various fields and scenarios, including handling of undefined variables and plain strings.
- Ensure that the implementation maintains existing functionality while enhancing flexibility for environment-based configurations.
- Remove the `LoadModelCapabilities` test and associated model capabilities initialization from the agent, streamlining the loading process.
- Update the LLM provider implementations to utilize a unified `Capabilities` structure, replacing references to `openai.Capabilities` with `llm.Capabilities`.
- Enhance capability retrieval methods to simplify the extraction of connector capabilities, ensuring compatibility across different LLM providers.
- Clean up unused functions and variables related to model capabilities, improving code maintainability.
- Update the Subscribe and SubscribeFrom methods to return a cancel function, ensuring proper resource cleanup when subscriptions are no longer needed.
- Modify unsubscribe logic to close channels safely, preventing potential panics from sending on closed channels.
- Enhance test cases to utilize the new cancel functionality, ensuring robust handling of subscriptions in various scenarios.
- Update the error handling in the event service startup to allow for the case where the service is already running, preventing unnecessary test failures.