Commit graph

34 commits

Author SHA1 Message Date
Max
b39397ded0 feat(monitor): integrate monitor service start and stop in load and unload processes
- Added functionality to start the monitor service during the loading process, ensuring that watchers are registered.
- Implemented the stopping of the monitor service before unloading other services to allow for event handling.
- Updated middleware to utilize access logging for improved request tracking.

Made-with: Cursor
2026-03-15 10:18:55 +08:00
Max
83ebe49036 refactor: unify server lifecycle, migrate gRPC client, and clean up sandbox v2
Server lifecycle:
- Introduce service.Service to manage HTTP + gRPC startup/shutdown
- Fix gRPC mutex deadlock in StartServer when port is occupied
- Add GracefulStop with 5s timeout before forced Stop in grpc.go
- Pre-check HTTP and gRPC port availability in cmd/start.go
- Print gRPC server address in startup access-points block

gRPC client refactor:
- Move token manager and client from tai/grpc/ to grpc/client/
- Add backward-compatible aliases in tai/yao.go and tai/token.go
- Update cmd/run.go to import grpc/client directly (no tai dependency)

Sandbox v2 docker migration:
- Delete sandbox/v2/docker/ (moved to tai repo)
- Update sandbox/docker/build.sh hint to point to tai repo
- Clean up .gitignore entries for removed docker directory
- Temporarily disable SandboxV2Test and BenchmarkSandboxV2 in CI
  (docker images need rebuild after tai repo migration)

Tai integration:
- Add direct-mode registration API handlers in tai/api/
- Add heartbeat handler and token management wrappers
- Update tai/registry and tai/tunnel for latest protocol
- Replace yao-grpc references with tai call in docs

Made-with: Cursor
2026-03-07 17:19:19 +08:00
Max
6e68efaba3 Implement gRPC support in the Yao SDK
- 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.
2026-03-04 13:17:48 +08:00
Max
787954f0af Enhance OpenAPI Integration and API Routing
- Introduced support for OpenAPI mode, allowing dynamic routing and OAuth guards for API endpoints.
- Updated API root path handling to accommodate OpenAPI configurations, ensuring consistent URL structures.
- Added well-known routes for Yao metadata and OAuth discovery, improving API discoverability.
- Refactored middleware and guards to streamline OpenAPI integration, enhancing overall service functionality.
- Removed deprecated agent TypeScript file, simplifying the codebase and improving maintainability.
2026-01-04 15:46:09 +08:00
Max
0fe0843b43 Refactor agent and assistant structure for improved clarity and performance
- Removed deprecated API and vision components, streamlining the agent's architecture.
- Updated the Load function to utilize a new agentDSL variable, enhancing the management of assistant capabilities.
- Enhanced context handling by introducing a message metadata store for thread-safe operations, improving message tracking and management.
- Refactored context methods to eliminate deprecated fields, ensuring cleaner and more maintainable code.
- Improved documentation and comments throughout the codebase to clarify changes and enhance developer understanding.
2025-11-30 11:47:25 +08:00
Max
8dca4719c0 Remove deprecated agent API files and refactor agent loading logic
- Deleted obsolete agent API files (agent.go, api.go, api_test.go, types.go) to streamline the codebase.
- Refactored the agent loading logic to initialize the API instance correctly, ensuring proper integration with the new structure.
- Updated context handling to improve clarity and maintainability across the agent's functionality.
- Enhanced error handling and cache management in the agent's initialization process.
2025-11-11 11:23:20 +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
b96a400869 Add OpenAPI support and enhance configuration handling
- Integrated OpenAPI loading functionality into the engine's Load and Reload processes, allowing for better API management.
- Updated the OpenAPI configuration to set a default BaseURL and ensure it does not have a trailing slash.
- Implemented the Attach method to connect the OpenAPI server to the Gin router, facilitating API endpoint management.
- Removed the obsolete hello package to streamline the OpenAPI module.
2025-07-20 18:52:30 +08:00
Max
01d4b49c33 [add] server rewrite support and fix api reload 2023-11-22 18:10:17 +08:00
Max
7ee7de96c9 [add] Neo (70%) 2023-04-30 14:21:45 +08:00
Max
d2c1f034a6 [tidy] remove unused code 2023-04-01 11:52:12 +08:00
Max
2bd41ed135 [change] start command 2023-03-26 18:21:55 +08:00
Max
75ee709c23 [change] refactor the yao service 2023-03-26 17:12:02 +08:00
Max
a807899f95 [*] migrate to gou v0.10.3 (50%) 2023-02-01 17:25:11 +08:00
Max
9a54e15ae9 [optimize] close the DB connections when reloading 2023-01-16 15:15:44 +08:00
Max
93ba063cb4 [add] setup 2022-10-28 11:58:05 +08:00
Max
7517e4652a [change] Refactoring Watch 2022-08-20 21:25:32 +08:00
Max
3509956bce [add] Task & Schedule 2022-07-30 21:18:05 +08:00
Max
94a2a6d3c4 [add] Buntdb for session store 2022-05-27 14:18:59 +08:00
Max
6e9bc9b7be [add] redis session store 2022-05-25 23:38:53 +08:00
Max
098f1b53ce [add] cross domain env 2022-04-02 11:55:39 +08:00
Max
b6326c9144 Ign session on watch 2022-02-14 23:40:21 +08:00
Max
3f7deb9a25 + Watch 2022-02-14 23:34:56 +08:00
Max
34f4382c19 更新命名空间 2022-02-09 09:17:23 +08:00
Max
ea72f26d5e 调整环境变量 2022-02-09 00:49:57 +08:00
Max
c3fcfa857c 优化 Session 载入机制 2021-11-29 10:27:38 +08:00
Max
8f091b4a23 关闭时清理插件 2021-10-23 18:06:40 +08:00
Max
d053596a9b fix router bug -> v0.8.14 2021-10-21 09:25:01 +08:00
Max
42fe45aaf8 fix server bug 2021-10-21 00:05:16 +08:00
Max
1768014948 debug 2021-10-20 23:26:38 +08:00
Max
6a2442984a 优化引擎 2021-10-20 22:50:57 +08:00
Max
490a1c999f 优化热加载逻辑 2021-10-20 15:26:19 +08:00
Max
f4e0fee81f 优化载入逻辑: Step 5/5 2021-10-19 00:17:22 +08:00
Max
d03e1fc2e3 优化代码结构 v0.8.8 2021-10-18 21:38:39 +08:00
Renamed from global/service.go (Browse further)