- 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.
- Added support for a new `RobotPrompt` field in the `Uses` struct to allow for custom robot system prompts.
- Updated the `Load` function to initialize `RobotPrompt` with a default value if not provided.
- Modified the `SystemConfig` struct to include a connector for the new `RobotPrompt` agent.
- Enhanced the asset binding to include new files related to the `robot_prompt` assistant.
- Updated related documentation and tests to reflect the addition of the `RobotPrompt` functionality.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- Added `robot_email` field to the Robot structure for specifying the sender's email address in email communications.
- Updated the EmailTarget structure by removing the CC field, simplifying the configuration for email targets.
- Revised TECHNICAL.md to include details on the new `robot_email` field and its usage in email delivery, ensuring clarity on the sender identity.
- Enhanced the Delivery Center's email handling to utilize the Robot's email as the From address, with a fallback to the provider's default if not configured.
- Updated DESIGN.md to reflect changes in email delivery architecture and added new sections for global email configuration.
- Marked completion of related tasks in TODO.md, confirming the integration of new email features and structures.
- Modified the DeliveryResult structure across multiple executors to include RequestID and Content fields, providing detailed summaries and bodies for dry-run, sandbox, and standard deliveries.
- Updated related test cases to reflect changes in the DeliveryResult structure, ensuring accurate validation of delivery types and content handling.
- Revised input formatting to display delivery summaries instead of types, improving clarity in execution summaries.
- Updated the DeliveryResult and ChannelResult structures to include new fields such as RequestID, SentAt, and improved content handling.
- Revised EmailTarget and WebhookTarget structures to clarify their configurations, including the addition of Template and Method fields.
- Enhanced the DeliveryPreferences structure to support Email, Webhook, and Process configurations, improving the flexibility of delivery options.
- Updated DESIGN.md and TECHNICAL.md to reflect these changes, ensuring comprehensive documentation of the new delivery architecture.
- Marked the completion of related tasks in TODO.md, confirming the integration of new features and structures.
- Enhanced the `mailer` provider to support email attachments, including both regular and inline attachments.
- Updated the `buildMessage` method to handle multipart email formats for messages with attachments.
- Added new tests for attachment handling in `mailer_test.go` and `mailgun_test.go`, ensuring comprehensive coverage for single, multiple, and inline attachments.
- Revised `TODO.md` to reflect the completion of attachment support across email providers, confirming that all major providers now support this feature.
- Removed RobotID from ExecutionRecord and DeliveryContext structures, emphasizing the use of MemberID as the globally unique identifier.
- Updated relevant documentation in DESIGN.md, TECHNICAL.md, and TODO.md to reflect these changes, ensuring clarity on the new context handling.
- Revised methods in ExecutionStore and Executor to align with the updated model, enhancing data management and execution tracking.
- Improved test cases to validate the new structure and ensure comprehensive coverage of execution scenarios.
- Updated the ExecutionRecord structure in TECHNICAL.md to include new fields such as ExecutionID and improved status tracking with cancellation support.
- Revised the ExecutionStore implementation in store/execution.go to add methods for updating execution status and current state, as well as deleting records.
- Marked the completion of the execution record model in TODO.md, reflecting the integration of new features and ensuring comprehensive tracking of execution history.
- Updated bindata.go and model.go to include the new execution model, enhancing the overall architecture for better data management.
- Revised DESIGN.md to update the DeliveryRequest structure, replacing exec_id with member_id and adding context for execution_id and trigger.
- Expanded TECHNICAL.md to clarify the DeliveryContext structure, including detailed comments on RobotID and MemberID for better understanding of their roles.
- Updated TODO.md to reflect changes in the execution record model, ensuring accurate tracking of the new fields and their implications for delivery processes.
- Enhanced documentation to improve clarity on the updated context and execution tracking, facilitating better developer understanding and implementation.
- Revised DESIGN.md to incorporate support for multiple delivery targets across email, webhook, and process channels, enhancing the flexibility of the delivery system.
- Expanded TECHNICAL.md with detailed descriptions of the new DeliveryPreferences structure, including EmailPreference, WebhookPreference, and ProcessPreference, to clarify their configurations and usage.
- Updated TODO.md to reflect the integration of multiple targets in delivery preferences, ensuring comprehensive tracking of the ongoing enhancements in the delivery architecture.
- Enhanced documentation to outline the new delivery channels and their configurations, improving clarity and usability for developers and users.
- Revised DESIGN.md to clarify the architecture of the P4 delivery process, emphasizing the separation of content generation and channel decision-making.
- Expanded TECHNICAL.md with detailed notes on the DeliveryRequest structure, DeliveryContent generation, and the role of the Delivery Center in managing delivery channels.
- Updated TODO.md to reflect the completion of the Delivery Agent setup and the integration of delivery preferences, ensuring comprehensive tracking of the P4 implementation progress.
- Enhanced documentation to outline the new delivery channels and their configurations, including email and webhook options, for improved clarity and usability.
- Marked the P3 Run Implementation as complete in TODO.md, reflecting the successful integration of task execution and validation.
- Updated the status of tests related to the ContinueOnFailure option, indicating their completion with detailed test cases for various execution scenarios.
- Enhanced run_test.go with new tests to validate the behavior of task execution under different ContinueOnFailure configurations, ensuring robust error handling and task management.
- Revised the RunExecution method to accept configuration data, improving flexibility in execution parameters.
- Revised DESIGN.md to clarify the architecture of the P3 entry point, including updated RunConfig parameters and task execution flow.
- Expanded TECHNICAL.md with detailed implementation notes on multi-turn conversation flow, validation rules format, task dependencies, and resource management.
- Removed outdated architecture diagrams from TODO.md and added comprehensive notes on the new multi-turn conversation handling and validation mechanisms.
- Documented the functionality of the new `yao/assert` package and its integration into the validation process.
- Marked several tests as completed, including those for task execution order, status updates, and validation logic.
- Added new tests for multi-turn conversation flow and error handling in the Runner tests.
- Updated the Validator tests to include scenarios for natural language rules and semantic validation.
- Revised the TODO section to outline future testing needs, specifically for the ContinueOnFailure option.
- Improved the multi-turn conversation handling in the `RunConfig`, adding parameters for better control over conversation execution.
- Enhanced the `ValidationResult` structure to better accommodate multi-turn states, ensuring accurate tracking of conversation progress.
- Updated the `ExecuteWithRetry` method to align with the new conversation flow, improving task execution reliability.
- Revised the `Validator` logic to effectively manage conversation continuation based on validation outcomes.
- Updated documentation and tests to ensure clarity and coverage of the new multi-turn capabilities and validation improvements.
- Updated the `RunConfig` to include parameters for multi-turn conversation control, such as `ContinueOnFailure`, `ValidationThreshold`, and `MaxTurnsPerTask`.
- Implemented a new multi-turn conversation flow for assistant tasks, allowing for iterative interactions until completion or maximum turns are reached.
- Enhanced the `ValidationResult` structure to support multi-turn states, including fields for `Complete`, `NeedReply`, and `ReplyContent`.
- Refined the `ExecuteWithRetry` method to accommodate the new conversation flow, ensuring proper handling of task execution and validation.
- Revised the `Validator` to include logic for determining when to continue conversations based on validation results.
- Updated documentation and tests to reflect the new multi-turn capabilities and validation mechanisms, ensuring comprehensive coverage of the changes.
- Completed the implementation of the P3 Run phase, integrating task execution and validation mechanisms.
- Introduced a new `RunConfig` struct to manage execution parameters such as retries and validation thresholds.
- Developed a two-layer validation system using the new `yao/assert` package, supporting both natural language and structured JSON rules.
- Enhanced the `RunExecution` method to execute tasks sequentially with progress tracking and a retry mechanism for validation failures.
- Updated task structures to include comprehensive validation rules and expected outputs, ensuring robust task management.
- Added unit tests for the new execution and validation features, achieving high test coverage across the implementation.
- Revised documentation to reflect changes in the architecture and functionality of the P3 phase.
- Marked P1 Goals and P2 Tasks as completed in TODO.md, reflecting the successful implementation of goal generation and task planning functionalities.
- Updated the input formatter to include delivery target details in the goal output, ensuring tasks are designed for appropriate delivery methods.
- Enhanced the RunTasks method to validate goals and parse tasks from agent responses, including comprehensive error handling and task validation.
- Added unit tests for new task parsing and validation features, ensuring robust coverage of task generation and execution scenarios.
- Revised documentation to clarify the integration of validation rules and expected outputs in task management.
- Introduced a new method to format available resources, improving clarity on the tools and agents accessible to the robot.
- Updated the RunGoals and RunInspiration methods to include resource information in user prompts, ensuring achievable goals and insights.
- Revised error messages in the executor to provide more context, enhancing debugging capabilities.
- Added comprehensive tests for the new resource formatting functionality and updated existing tests to reflect changes in error handling.
- Improved documentation for robot configuration, emphasizing the importance of available resources in goal and task generation.
- Introduced a structured Goals type with delivery metadata for improved task management and output handling.
- Updated the DeliveryTarget type to include additional fields for recipients, format, and options, enhancing flexibility in result delivery.
- Enhanced the Executor's RunGoals method to parse and handle delivery information from agent responses.
- Revised input formatting to include robot identity context, improving clarity in generated goals.
- Updated tests to validate the new structure and ensure comprehensive coverage of delivery functionalities.
- Introduced multiple executor modes (Standard, DryRun, Sandbox) to accommodate various use cases, enhancing flexibility in execution strategies.
- Updated DESIGN.md to reflect the new executor modes and their respective use cases, including detailed descriptions and configuration examples.
- Revised TECHNICAL.md to outline the new executor package structure, emphasizing the modular design for future enhancements.
- Enhanced the TODO.md to track the progress of executor mode implementations and related tasks.
- Removed outdated executor stub files and tests, streamlining the codebase for improved maintainability.
- Updated integration tests to utilize the new DryRun executor, ensuring comprehensive coverage of execution scenarios without real agent calls.
- Added a User-Agent header to HTTP requests in the OpenAI provider to improve request identification.
- Updated TODO.md to reflect the completion status of various agent configurations and test scenarios, marking several tasks as done.
- Ensured all relevant agents and expert configurations are now marked as complete, enhancing clarity on project progress.
- Introduced a validation mechanism for task results, including a detailed validation structure with scores and issues.
- Updated the input formatter to include validation results in the output, improving clarity on task success and validation status.
- Enhanced test cases to cover the new validation fields and ensure comprehensive testing of task results.
- Revised TODO.md to reflect the addition of validation features and the current status of the agent's development phases.
- Established a unified calling mechanism for agents, enabling streaming support and multi-turn conversations.
- Developed input formatters for various phases, ensuring proper data preparation for assistant prompts.
- Created test assistants for single and multi-turn interactions, along with comprehensive test cases for the AgentCaller and InputFormatter.
- Updated the TODO.md to reflect the new structure and progress of the agent call infrastructure, including future phases for assistant setup and implementation.
- Added assertions in multiple integration tests to verify that robots are correctly loaded into the cache during various execution scenarios.
- Updated tests for clock triggers, concurrent executions, control tests, event triggers, and human interventions to ensure comprehensive coverage of cache functionality.
- Improved test reliability by confirming the presence of expected robots in the cache, enhancing overall test robustness.
- Marked Phase 3 of the scheduling system as complete in TODO.md, highlighting the successful implementation of all sub-tasks and the passing of over 80 integration tests.
- Updated the integration test section to reflect completed tests for various triggers and execution scenarios, ensuring comprehensive coverage of the scheduling pipeline.
- Added new test files for core scheduling flow, clock trigger modes, human intervention, event triggers, concurrent executions, and control tests, enhancing overall test coverage and stability.
- Improved assertions in existing tests to utilize the Eventually pattern for better handling of timing variations in CI environments.
- Marked the Executor Stub Enhancement section in TODO.md as complete, detailing the enhancements made to the executor's functionality.
- Improved the Executor to simulate full execution with Job integration, including phase transitions and logging.
- Introduced a Config struct for customizable executor behavior, allowing for testing with callbacks and job integration control.
- Implemented phase-specific methods for modular execution, preparing for future real phase implementations.
- Added comprehensive tests for the executor, including smoke tests and verification of phase progression and job logs.
- Updated progress tracking in TODO.md to reflect the current status of the executor and integration testing.
- Added error handling for missing 'data' field in the ListLogs result, improving robustness.
- Implemented handling for nil data, returning an empty log slice as needed.
- Expanded data type handling to include generic []interface{}, ensuring compatibility with various log formats.
- Enhanced logging structure by extracting message, level, and job_id fields from different data types, improving log consistency and usability.
- Marked the Job Integration section in TODO.md as complete, detailing the implementation of job creation, execution lifecycle, and logging functionalities.
- Introduced a new Options struct for job creation, allowing for extensibility with fields like Priority, MaxRetryCount, and Metadata.
- Implemented methods for job status updates, including handling for completed, failed, and cancelled states, with corresponding updates to job configurations.
- Enhanced localization support for job names and logs, ensuring better usability across different languages.
- Updated tests for job creation, execution tracking, and logging, achieving full test coverage with all tests passing.
- Reflected changes in the job model to include new statuses and improved handling of job execution states.
- Updated the auto-refresh tests in cache_test.go to utilize fresh cache instances for each test, ensuring isolation and reliability.
- Improved assertions to verify cache stability after stopping auto-refresh and confirmed that multiple start calls replace previous ones without leaking goroutines.
- Added tests to check for safe behavior during rapid start/stop cycles and ensured that stopping without starting does not cause panics.
- Enhanced overall test coverage and clarity, contributing to better maintainability and understanding of the cache's auto-refresh functionality.
- Integrated trigger handling directly into the Manager, consolidating the logic for clock, human intervention, and event triggers.
- Updated the Manager to include methods for processing human interventions and event triggers, ensuring robust execution control.
- Refactored the trigger package to provide validation and utility functions, enhancing the overall structure and clarity of trigger-related logic.
- Improved documentation and comments throughout the Manager and trigger implementations for better understanding and maintainability.
- Updated tests to cover new functionalities, ensuring comprehensive validation of the Manager's behavior with various trigger types.
- Simplified comments and assertions in the timezone deduplication test for the Manager to enhance clarity and focus on the expected behavior of the times robot.
- Ensured that the test accurately verifies that the times robot does not trigger multiple times within the same minute, while allowing for daemon and interval robots to operate as expected.
- Improved the overall readability of the test code by removing redundant comments and emphasizing key assertions.
- Enhanced the test for the Manager's timezone deduplication functionality to ensure the times robot does not trigger multiple times within the same minute on the same day.
- Added detailed assertions to clarify expected behavior and improve test accuracy, particularly regarding the interaction between the times, daemon, and interval robots.
- Updated comments to provide better context and understanding of the test logic and expected outcomes.
- Introduced comprehensive tests for the Manager's timezone deduplication functionality, ensuring correct behavior across different timezones.
- Verified that the robot does not trigger multiple times within the same minute on the same day and correctly triggers on different days.
- Added tests for handling cross-timezone day boundaries and comparisons between UTC and local timezones, enhancing the robustness of the time management logic.
- Updated the shouldTriggerTimes method to utilize the correct timezone for LastRun comparisons, improving accuracy in execution triggers.
- Completed the Manager implementation, including methods for starting, stopping, and managing clock triggers for robot executions.
- Integrated context handling for background operations and added synchronization to ensure thread safety.
- Updated the TODO.md to reflect the completion of the Manager implementation and outlined the next steps for the Trigger and Dedup functionalities.
- Enhanced the Tick method to process clock triggers and submit jobs to the pool based on robot configurations.
- Added detailed comments and documentation for clarity on the Manager's functionality and its components.
- Updated the Executor to implement atomic slot acquisition for robot executions, preventing race conditions and ensuring proper quota management.
- Introduced the TryAcquireSlot method in the Robot struct for atomic checks and reservations of execution slots, enhancing concurrency handling.
- Adjusted the Worker to requeue tasks when quota is exceeded, improving error handling and system stability.
- Enhanced tests for concurrent access and quota management, ensuring robust functionality under load conditions.
- Updated comments and documentation for clarity on new methods and their intended use.
- Marked the Pool Implementation as complete in TODO.md, confirming all tasks are finished with comprehensive tests.
- Introduced a configurable worker pool with a priority queue for managing robot jobs, including graceful shutdown support.
- Enhanced the Executor with simulated execution delay and callback functionality for testing, tracking execution counts.
- Improved error handling in the pool's submission process and added methods for retrieving running and queued job counts.
- Updated tests to ensure robust functionality and performance of the pool and executor components.
- Implemented comprehensive tests for the auto-refresh feature in the cache, ensuring it operates without leaking goroutines.
- Verified that multiple start calls do not accumulate goroutines and that stopping the refresh does not panic.
- Included tests for concurrent start and stop operations to ensure thread safety and reliability in the cache's behavior.
- Enhanced overall test coverage for the cache module, contributing to improved stability and performance assurance.
- Marked the Cache Implementation as complete in TODO.md, confirming all tasks are finished with comprehensive integration tests.
- Updated cache.go to provide a thread-safe in-memory cache for Robot instances, improving performance and reliability.
- Enhanced the Load method to include pagination and configurable model name, ensuring efficient data handling.
- Added detailed comments and structured code for better readability and maintainability across the cache implementation.
- Improved validation and error handling in various utility functions to ensure robustness in data processing.
- Added descriptive comments for constants in enums.go to clarify their purpose and improve code readability.
- Updated error definitions in errors.go with comments to specify the meaning of each error, enhancing understanding of error handling in the codebase.
- Added a check for nil configuration in the CanRun method to ensure default behavior is maintained when no config is provided.
- Standardized comments in the Goals struct for improved clarity and consistency in task objectives.
- Updated the Execution struct's field formatting for better 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.