Commit graph

149 commits

Author SHA1 Message Date
Max
0825e06dbe Implement Multi-Directory Watching and Enhance Locale File Handling
- Introduced the IWatchDirs interface to support watching multiple directories for changes, allowing templates to specify directories dynamically.
- Updated the watch command to handle multiple directories and display watched directories in the output.
- Added functionality to write locale files from a page's __locales directory to the public directory, improving localization support.
- Enhanced error handling during directory watching and locale file processing for better reliability and logging.
2026-01-03 14:39:57 +08:00
Max
097fb73416 Refactor SUI Command Arguments and Enhance Default Template Handling
- Updated the `build` and `watch` commands to accept a single argument for `<sui>` and made the `<template>` argument optional, improving usability.
- Introduced a default template assignment for the `agent` SUI, ensuring a more intuitive setup for users.
- Enhanced error messages for command usage to provide clearer guidance on expected input format.
- Added new OpenAPI file to the bindata, improving the framework's capabilities for API integration.
2026-01-01 10:28:45 +08:00
Max
8de302d4e8 Implement Dynamic Testing Features in Agent Test Framework
- Introduced dynamic testing capabilities, allowing for multi-turn conversations with checkpoints through the new `DynamicRunner`.
- Enhanced the `runSingleTest` method to support dynamic mode, including the execution of before/after scripts and detailed output for dynamic test results.
- Added new output methods in `output.go` for dynamic test start, turns, checkpoints, and results, improving console feedback during testing.
- Updated `DESIGN_V2.md` and `TODO_V2.md` to reflect the new dynamic mode features, including simulator configurations and checkpoint definitions.
- Revised the `Case` struct in `types.go` to include fields for dynamic testing, such as `Simulator`, `Checkpoints`, and `MaxTurns`.
2025-12-26 11:17:54 +08:00
Max
6ea982f027 Implement Agent-Driven Input and Dry-Run Mode in Test Framework
- Added support for generating test cases using agents and scripts through the new `LoadFromAgent` and `LoadFromScript` methods in the loader.
- Enhanced the `RunTests` method to handle different input sources, including agent-driven and script-based test case generation.
- Introduced a `--dry-run` flag to allow users to preview generated test cases without executing them.
- Updated relevant documentation in DESIGN_V2.md and TODO_V2.md to reflect the new features and implementation status.
2025-12-26 10:53:11 +08:00
Max
5351128f89 Refactor Before/After Script Integration in Agent Test Framework
- Updated DESIGN_V2.md to reflect changes in the handling of before/after scripts, removing the `scripts:` prefix and clarifying their usage in JSONL test cases.
- Enhanced runner.go to integrate global before/after hooks, ensuring they execute correctly before and after test cases.
- Revised types.go to include new fields for before/after scripts in test case and options structures.
- Improved TODO_V2.md to track the implementation progress of before/after script functionality and related tasks.
- Added utility function LoadAgentTestScripts to facilitate loading of test scripts from the agent's src directory.
2025-12-26 09:44:56 +08:00
Max
7f44e442da Enhance File Handling and Input Parsing in Test Framework
- Introduced support for file attachments in test inputs using the `file://` protocol, allowing images, audio, and documents to be loaded and converted to appropriate formats.
- Updated `ParseInput` and related functions to handle file references, ensuring seamless integration of file content into messages.
- Enhanced error handling and path resolution for file loading, considering both relative paths and the `YAO_ROOT` environment variable.
- Expanded documentation to include examples of file attachments and their usage in test cases, improving clarity for users.
2025-12-25 11:50:58 +08:00
Max
5e64c78435 Implement Script Testing Framework and Enhance Test Context Management
- Introduced a new script testing mode to allow testing of agent handler scripts (hooks, tools, etc.) using a Go-like interface, enabling better unit testing of TypeScript/JavaScript code.
- Enhanced the `LoadScripts` function to skip test files during script loading, ensuring only relevant scripts are processed.
- Refactored the test context creation to support custom context configurations via a JSON file, allowing for flexible authorization and metadata management during tests.
- Updated the test runner to handle script tests, including the ability to filter tests using regex patterns and manage custom context data.
- Improved documentation to include details on script testing usage, input formats, and available assertions, enhancing developer experience and clarity.
2025-12-21 10:44:59 +08:00
Max
d21f9c3769 Enhance Logging Functionality in RequestLogger
- Added a `noop` check in multiple logging methods (`LLMComplete`, `ToolStart`, `ToolComplete`, `HookStart`, `HookComplete`, and `HistoryLoad`) to prevent logging when the logger is in no-operation mode.
- Improved command handling in `root.go` by removing minimum argument requirements for commands and providing help output when no arguments are given.
- Introduced an `agent` command for better organization of agent-related functionalities in the CLI.
- Implemented automatic detection of the application root directory in `run.go` to streamline the application startup process.
- Cleaned up debug print statements in `config.go` to reduce clutter in the output.
2025-12-17 12:33:34 +08:00
Max
d0981e53af Enhance engine loading process with progress reporting and timing
- Introduced a `loadStep` function to wrap loading operations, providing timing and progress callback functionality.
- Updated the `Load` function to utilize `loadStep` for various components, improving visibility into loading durations.
- Enhanced the `start` command to display loading progress and duration in development mode, improving user experience during application startup.
- Refactored model loading functions to return models without migration, streamlining the loading process and improving performance.
2025-12-05 18:53:21 +08:00
Max
a50f43a8bb Refactor MCP client handling for improved categorization and information display
- Updated the `printMCPs` function to enhance the separation of agent and standard MCPs by utilizing the Type field for better clarity.
- Improved error handling and client information retrieval, ensuring accurate display of transport types and labels for each MCP.
- Modified the MCP loading process to specifically load agent clients, streamlining the management of different client types.
- Enhanced output formatting to include tools count only for process transport, improving the readability of MCP information.
2025-12-05 14:17:56 +08:00
Max
cd5b4df503 Add MCP client loading and printing functionality
- Introduced a new `printMCPs` function to display loaded MCP clients, categorizing them into standard and agent clients for better clarity.
- Enhanced the `Load` function to include loading MCP clients from the assistants directory, improving the overall MCP management.
- Added tests for loading assistant MCPs, ensuring that the functionality works as expected and that agent clients are correctly identified and logged.
- Updated model loading to support agent models from assistants, ensuring proper integration and functionality across the system.
2025-12-05 12:28:41 +08:00
Max
c54ef71d6a ⚠️ BREAKING: Removed the Studio package and renamed Neo to Agent. Configuration file path changed from neo/neo.yml to agent/agent.yml.
Remove deprecated studio package and refactor agent integration

- Deleted the studio package, which is no longer in use, to streamline the codebase.
- Updated references in the agent and chat modules to utilize the new agent package instead of the deprecated neo package.
- Ensured that all related middleware and routing functionalities are now aligned with the agent architecture, enhancing overall system coherence.
2025-11-06 18:13:54 +08:00
Max
c425b74383 Refactor error handling in various components to improve logging and message formatting
- Updated error messages to use fmt.Errorf with %s for better clarity and consistency.
- Enhanced logging statements to utilize formatted strings for improved readability.
- Refactored multiple Load functions across different modules to standardize error handling practices.
2025-09-28 10:24:17 +08:00
Max
4c026755c4 feat: Update versioning and commit information in Makefile and version command
- Added CUI commit information to the Makefile for artifact generation.
- Enhanced version command output to include Yao and CUI commit details with improved formatting.
- Updated constant names in share/const.go for clarity on versioning.
- Fixed references to CUI commit in process and app files to align with new naming conventions.
2025-05-18 16:47:32 +08:00
Max
fabced291c fix: Enhance loading functions to handle non-existent directories
- Added checks in various loading functions to ignore processing if the respective directories do not exist, improving error handling and preventing unnecessary operations.
- Updated the Load function signature to return warnings alongside errors, allowing for better feedback on loading issues across different components.
2025-05-13 09:10:10 +08:00
Max
cd01149db1 Update dependencies in go.mod and go.sum; upgrade golang.org/x/crypto to v0.31.0, golang.org/x/text to v0.21.0, golang.org/x/sync to v0.10.0, and golang.org/x/sys to v0.28.0. Modify process initialization in cmd/run.go to use context for improved execution management. 2024-12-13 01:02:22 +08:00
Max
d4f5a434a8 Improve error message for missing app.yao file for better clarity 2024-12-03 16:10:59 +08:00
Max
1d414bceb8 Fix endpoint URL formatting to handle default port correctly 2024-11-29 20:50:24 +08:00
Max
6b6edab97c Refactor network handling and endpoint retrieval; deprecate unused commands in startup 2024-11-29 20:43:29 +08:00
Max
8388b78a0e Update community link text in welcome message for clarity 2024-11-29 19:47:12 +08:00
Max
d9475988ff Add community link to welcome message and adjust documentation spacing 2024-11-29 19:45:42 +08:00
Max
c6cdf1115a Enhance startup output by adding runtime, data, and listening information; update frontend and dashboard labels to website and admin 2024-11-29 17:58:29 +08:00
Max
95dc351fa0 Deprecate Yao Studio functionality and comment out related code 2024-11-29 17:43:38 +08:00
Max
d7693a0487 Refactor startup logic to improve directory checks and enhance welcome message display 2024-11-29 17:36:45 +08:00
Max
79f77618d3 Remove setup package and related functionality from the project 2024-11-29 16:44:31 +08:00
Max
dc162bb206 feat: app afterMigrate hook support 2024-09-29 08:53:27 +08:00
Max
8269dcf6f3 chore: Add warning messages for SUI core watch command 2024-07-24 08:28:47 +08:00
Max
931394b36b feat: Add yao sui trans command for automatic translation support 2024-07-15 10:15:05 +08:00
Max
8dd5f02a7b feat: output warning messages during sui page build 2024-07-09 05:56:29 +08:00
Max
e4c8eeb180 optimize the SUI compiler & add http server gzip support 2024-07-07 15:29:50 +08:00
Max
c01b4ccb97 refactor: Improve SUI page build performance by adding script execution time measurement 2024-06-29 20:44:48 +08:00
yflau
39b8ef6238 add migrate options support for restore cmd 2024-06-13 20:00:56 +08:00
yflau
a42c556295
export rootCmd as public
export the rootCmd to support customized commands when use yao as lib
2024-05-08 19:51:46 +08:00
Max
9faf8f802f chore: Update engine.Load calls with additional options 2024-05-05 17:54:32 +08:00
Max
ff6629270e Add data flag to BuildCmd 2024-02-08 12:17:21 +08:00
Max
bba0119a95 Fix model update and print statement in migrate command 2024-01-28 11:45:23 +08:00
Max
04596d730d [fix] sui watch command 2024-01-16 08:25:56 +08:00
Max
6d49ae9195 Fix incorrect command in build.go 2024-01-14 13:26:51 +08:00
Max
38af2dddfc [add] sui build command 2024-01-14 13:18:50 +08:00
Max
c07b903c5c Set runtime mode and display it in start command 2023-12-28 21:17:33 +08:00
Max
8698c42607 [add] SUI Template Engine command 2023-12-07 23:14:39 +08:00
Max
7f6711f8ed [change] optimizing console output 2023-09-01 12:02:04 +08:00
Max
38150e5d66 [add] yao run command task support 2023-06-09 00:07:06 +08:00
Max
75ba3e532d fix yao get command 2023-05-18 11:58:40 +08:00
Max
d9b6910227 fix yao-init & get command 2023-05-18 10:58:27 +08:00
Max
e3a60a88c5 Improve error messages 2023-05-15 18:25:23 +08:00
Max
46ad1e761c [add] yao.table.Load & yao.form.Load & fix reload 2023-05-11 22:20:02 +08:00
Max
48415db96d [fix] config init 2023-04-24 17:58:06 +08:00
Max
ce4aaf667f [fix] setup & config 2023-04-24 17:38:29 +08:00
Max
082bcf57ff [add] pack & start command support license 2023-04-23 10:57:28 +08:00