Commit graph

29 commits

Author SHA1 Message Date
Max
68c29ca1c0 test(robot): extend timeout for execution status checks in E2E tests
- Increased the timeout duration from 60 seconds to 120 seconds for waiting on execution statuses in multiple E2E test cases, ensuring more reliable test outcomes during longer execution scenarios.
2026-03-24 23:04:26 +08:00
Max
d43b637ad4 feat(assistant): enhance sandbox handling and improve assistant tag filtering
- 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.
2026-03-24 19:19:04 +08:00
Max
09af247a7c feat(robot): add Weixin integration and enhance existing adapters
- Introduced Weixin integration support with new configuration options for WeChat iLink Bot.
- Updated existing adapters (DingTalk, Discord, Feishu, Telegram) to include sender_id and app_id in message metadata for improved context handling.
- Enhanced dispatcher logic to accommodate the new Weixin adapter and ensure proper initialization and shutdown processes.
- Improved message handling across integrations to support typing indicators, providing a more interactive user experience.
2026-03-23 23:47:25 +08:00
Max
ce19e9bdb7 feat(robot): enhance manager and execution handling
- Added GetManager function to retrieve the global manager instance, returning nil if not started.
- Introduced ExecRecovered event to notify about recovered non-terminal executions during manager startup.
- Updated execution store to support querying by multiple statuses with ListByStatuses method.
- Enhanced integration tests to accommodate longer tick intervals and added sleep delays for stability.
- Improved cleanup logic in integration tests to prevent interference from previous execution records.
2026-03-23 17:46:32 +08:00
Max
1bddac44a4 refactor(robot): rename ListRobots to ListAllRobots and enhance caching logic
- Renamed ListRobots function to ListAllRobots for clarity and consistency across the codebase.
- Updated related API endpoints and tests to reflect the new function name.
- Improved caching logic to ensure both autonomous and non-autonomous robots are loaded correctly.
- Enhanced filtering and pagination capabilities within the ListAllRobots function.
- Added new test cases to validate the updated functionality and ensure robust performance.
2026-03-23 12:25:17 +08:00
Max
5333302055 Add Discord integration support in robot lifecycle
- 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.
2026-03-02 07:53:49 +08:00
Max
33efd3e890 Add Feishu and DingTalk integration support in robot lifecycle</message>
<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.
2026-03-02 07:36:34 +08:00
Max
ea9e070f29 Enhance robot integration with Telegram and improve event handling
- 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.
2026-03-01 22:03:25 +08:00
Max
3fee0e3fc3 Enhance execution listing and interaction with pagination and streaming support
- 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.
2026-02-27 16:38:30 +08:00
Max
ae346435b9 Enhance robot execution with language model integration and logging
- 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.
2026-02-26 14:23:42 +08:00
Max
bc4787f857 Update executor to support V2 execution model and enhance event handling
- 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.
2026-02-25 18:40:48 +08:00
Max
454da5208b Enhance Execution Control and Error Handling in Robot Manager
- Updated execution control methods (`PauseExecution`, `ResumeExecution`, `StopExecution`) to include error handling and database status updates for paused, running, and cancelled states.
- Introduced `ExecuteWithControl` method in the Executor interface to manage execution with pause/resume capabilities, allowing for better control during execution.
- Enhanced the `Execute` methods across different executors (DryRun, Sandbox, Standard) to support pre-generated execution IDs and control mechanisms.
- Improved error messages in the execution handling API to provide clearer feedback on execution status and errors.
- Added support for a new execution status `ExecPaused` in the execution model, enhancing the tracking of execution states.
2026-01-28 19:10:01 +08:00
Max
ecb95f4cc8 Enhance Robot Delivery Logic and Context Management
- Introduced manager ID and email fields in the Robot struct to facilitate mandatory delivery to managers.
- Updated delivery routing logic to ensure manager email is always included if manager ID is set, improving delivery reliability.
- Added JSON serialization handling in the Delivery Center to ensure compatibility with various data types.
- Enhanced context ID generation by replacing time-based IDs with NanoID for improved uniqueness and consistency.
2026-01-28 14:44:42 +08:00
Max
0f8287a51b Enhance Robot Configuration with Agents and MCP Servers Integration
- Updated database queries to include 'agents' and 'mcp_servers' fields in robot data retrieval.
- Enhanced the robot configuration structure to merge agents and MCP servers from the member table into the robot's resources.
- Improved the input formatter to display time markers with check/cross indicators for better context awareness.
- Added tests to validate the new functionality and ensure proper formatting of robot identity when identity is nil.
2026-01-27 15:59:14 +08:00
Max
3ef536c1e7 Add Activity Type Filtering to ListActivities API
- Introduced a new `Type` field in the `ActivityQuery` struct to allow filtering activities by type (e.g., execution.started, execution.completed, execution.failed, execution.cancelled).
- Updated the `ListActivities` method in `ExecutionStore` to handle the new type filter, mapping it to corresponding execution statuses.
- Enhanced unit tests in `execution_test.go` to validate filtering by activity type, including tests for valid and invalid type scenarios.
- Modified OpenAPI definitions and related types to support the new type filter in the activities endpoint, improving API usability and flexibility.
2026-01-24 18:28:16 +08:00
Max
2f040196ec Add Results and Activities Functionality to ExecutionStore
- Implemented `ListResults` and `CountResults` methods in `ExecutionStore` to retrieve and count completed executions with delivery content, supporting filtering by member ID, team ID, trigger type, and keyword.
- Developed `ListActivities` method to derive activities from execution status changes, allowing retrieval of recent activities for a team.
- Created corresponding unit tests in `execution_test.go` to validate the functionality of results and activities listing, ensuring accurate filtering and pagination.
- Updated OpenAPI routes and types to include new endpoints for listing results and activities, enhancing the API's capabilities for managing execution data.
2026-01-24 17:57:58 +08:00
Max
28d5730289 Add Description Field to Task Struct and Enhance Execution Management
- Introduced a new `Description` field in the `Task` struct for a human-readable task description, improving UI clarity.
- Updated the `ParseTask` function to save the description from input data and convert it to a message if no explicit messages are provided.
- Enhanced the `Executor` to update UI fields with localized messages during task execution phases, ensuring better user feedback.
- Implemented a new method in the `ExecutionStore` to persist task status updates, allowing real-time UI updates.
- Added unit tests to validate the new task description handling and UI updates during execution phases.
2026-01-24 12:16:02 +08:00
Max
d590bd7557 Enhance Execution Management with UI Display Fields and Localization Support
- Added `Name` and `CurrentTaskName` fields to the `Execution` struct for improved UI display during execution phases.
- Implemented localization support for UI messages, allowing dynamic updates based on the execution context and user locale.
- Updated the executor to manage these fields at various phases, ensuring accurate representation of execution status.
- Enhanced OpenAPI documentation to reflect the new fields and their usage in execution responses.
- Added unit tests to validate the functionality of UI fields and localization handling.
2026-01-24 10:10:48 +08:00
Max
c63c68fd7b Refine Autonomous Mode Caching Logic in ListRobots API
- Updated the ListRobots function to enhance caching behavior by explicitly requiring the autonomous_mode filter to be true when using cached results.
- Improved comments for clarity on caching conditions and the implications of autonomous_mode filtering.
- Ensured that when autonomous_mode is not specified or set to false, the database is queried to include all robots, maintaining comprehensive results.
2026-01-22 22:46:58 +08:00
Max
add933d34c Refactor Job System Integration to Execution Storage
- Removed the job system integration from the robot execution flow, transitioning to a dedicated ExecutionStore for managing execution records.
- Updated the design documentation to reflect the new architecture, emphasizing the relationship between robots and concurrent executions.
- Revised the API to return execution IDs instead of job IDs, ensuring clarity in execution tracking.
- Enhanced logging mechanisms to utilize the kun/log package for better traceability of execution phases.
- Updated tests and documentation to align with the removal of job-related structures and the introduction of execution management.
2026-01-22 18:24:50 +08:00
Max
36ac190637 Implement Auto-Generation of Member ID in Robot API
- Updated the CreateRobot API to auto-generate the member_id if not provided, enhancing usability and ensuring unique identifiers.
- Revised CreateRobotRequest structure to make member_id optional, aligning with the new auto-generation logic.
- Added a new function for generating unique member IDs with collision detection, ensuring compliance with existing ID patterns.
- Enhanced unit tests to validate the new behavior, ensuring robust error handling and proper ID generation.
- Updated related OpenAPI documentation to reflect changes in request structure and behavior.
2026-01-22 17:31:36 +08:00
Max
bb7638f1e5 Implement Autonomous Mode Filtering in Robot API
- Added support for filtering robots by `autonomous_mode` in the ListRobots API.
- Enhanced ListQuery structure to include an optional `AutonomousMode` field.
- Updated listRobotsFromDB function to apply the autonomous mode filter based on the query.
- Created new test cases to validate the filtering functionality for both autonomous and on-demand robots.
- Revised related OpenAPI endpoints and frontend integration to accommodate the new filtering options.
2026-01-22 16:14:59 +08:00
Max
64b5ffd154 Enhance Robot API with Permission Fields and Status Management
- Added `YaoCreatedBy` and `YaoTeamID` fields to `RobotState` and `RobotResponse` for improved access control.
- Updated `GetRobotStatus` to retrieve permission fields from the store and populate the robot state.
- Modified `robotFields` in the store to include new Yao permission fields for better management of access control.
- Enhanced OpenAPI integration by registering robot routes and ensuring proper permission checks in handlers.
- Updated documentation in TODO.md to reflect the completion of permission logic and API enhancements.
2026-01-22 12:21:44 +08:00
Max
df5836d8cc Enhance Robot API with Bio Field and CRUD Operations
- Added a `Bio` field to the `Robot` structure, allowing for a description of the robot.
- Updated the `cleanupAPITestRobots` function to delete robots with member IDs starting with both "robot_api_" and "api_robot_".
- Implemented new API functions for creating, updating, and removing robots, ensuring proper validation and cache management.
- Enhanced request and response types in `api/types.go` to include the new `Bio` field.
- Added comprehensive tests for the new CRUD operations in `robot_test.go`, ensuring robust validation and error handling.
2026-01-22 11:50:25 +08:00
Max
0a38c2b592 Refactor E2E Tests for Improved Execution Handling and CI Efficiency
- Enhanced the `TestE2EControlStop` function to implement a retry mechanism for verifying execution status, allowing for a longer wait time and accommodating potential delays in execution completion.
- Simplified the `TestE2EEventTriggerVariousEventTypes` by focusing on a single representative event type to reduce CI execution time, while maintaining coverage of event handling logic.
- Updated logging and assertions to reflect the new execution state checks, ensuring clarity in test outcomes and improving overall test reliability.
2026-01-19 11:57:26 +08:00
Max
5f4f51e806 Add Robot E2E Tests and Update Makefile and Workflows
- Introduced a new `unit-test-robot-e2e` target in the Makefile to run end-to-end tests for the robot API, requiring real LLM calls and specific environment setup.
- Updated the `pr-test.yml` and `unit-test.yml` workflows to include a dedicated job for Robot E2E Tests, ensuring proper execution in CI with necessary services and dependencies.
- Enhanced the TODO.md to reflect the completion of various E2E test flows, marking them as done and outlining future integration with OpenAPI.
- Refactored context handling in several test files to utilize `context.Background()` for improved clarity and consistency in execution context.
2026-01-19 11:16:33 +08:00
Max
c6ca68876d Refactor API Structure and Update TODO for MVP Integration
- Updated the API documentation in TODO.md to reflect the completion of the Go API implementation and end-to-end tests for the main flow (P0 → P1 → P2 → P3 → P4).
- Clarified that Process handlers and JSAPI are optional features, moving them to Phase 12, while emphasizing that the Go API is sufficient for MVP integration.
- Removed obsolete API files (`api.go`, `jsapi.go`, `process.go`) as they were stubs and not implemented in Phase 10, streamlining the codebase.
- Revised the structure of the TODO.md to better outline the goals and tasks for Phases 11 and 12, ensuring clear tracking of progress and dependencies.
2026-01-19 09:17:33 +08:00
Max
4ceb74da9e Refactor Structs for Consistency and Enhanced Readability
- Standardized field formatting in TriggerResult and Execution structs for improved code clarity.
- Added test cases in robot_test.go to ensure Robot can run with nil config and quota, verifying default behavior.
- Enhanced comments in the Goals struct to clarify task objectives and improve documentation consistency.
2026-01-14 18:08:19 +08:00
Max
90b52eaf22 Update TODO.md to Reflect Completion of Phases 1 and 2
- Marked Phase 1: Types & Interfaces as complete with 88.4% test coverage and all tests passing.
- Updated Phase 2: Skeleton Implementation status to complete, confirming all packages compile successfully without circular dependencies.
- Checked off all tasks under both phases, indicating full implementation of types, interfaces, and skeleton structures.
2026-01-14 18:03:08 +08:00