docs: 将仓库代码注释统一为中文
CI / docs-check (push) Canceled after 0s
CI / backend-test (push) Canceled after 0s
CI / service-test (push) Canceled after 0s
CI / frontend-test (push) Canceled after 0s
CI / rust-core (push) Canceled after 0s
CI / docs-check (pull_request) Canceled after 0s
CI / backend-test (pull_request) Canceled after 0s
CI / service-test (pull_request) Canceled after 0s
CI / frontend-test (pull_request) Canceled after 0s
CI / rust-core (pull_request) Canceled after 0s

This commit is contained in:
2026-09-10 00:40:56 +08:00
parent 51c592841d
commit d703ab64e3
249 changed files with 707 additions and 900 deletions
+2 -7
View File
@@ -1,9 +1,4 @@
"""Agent tools backed by existing OpenNexus application services.
The tools in this module stay inside the same validation, permission and audit
pipeline as the original note tools. Plugin authoring is deliberately limited
to the host's declarative handlers: it cannot write or launch arbitrary code.
"""
"""基于现有 OpenNexus 应用服务的 Agent 工具。本模块中的工具沿用原笔记工具的验证、权限与审计流程。Plugin 编写仅限 Host 提供的声明式处理器,不能写入或启动任意代码。"""
from __future__ import annotations
@@ -184,7 +179,7 @@ def _register(registry: ToolRegistry, name: str, description: str, model: type[B
def register_service_tools(registry: ToolRegistry, plugins) -> None:
"""Register tools that need the completed Plugin runtime or the current registry."""
"""注册需要完整的Plugin运行时或当前注册表的工具。"""
async def rename_note(arguments: NoteRenameArguments, _: ToolExecutionContext) -> dict:
return (await note_service.rename_note(arguments.note_id, file_name=arguments.file_name)).model_dump(mode="json")