Repository navigation
Conversation
docs/api/README.md claims to mirror the routes registered in internal/httpapi/server.go, but the index stopped at the manifest-exposed capabilities. The /api/assistant/* domain (32 routes, including the two v0.4.0 additions for diagnostics export and in-conversation CLI install) and the shared AI schedule task routes were absent, so the file pointed readers at a contract that no longer described the server. Add both index tables and document the diagnostics and cli-install endpoints: methods, status codes, response fields, the redaction boundary and curl examples, taken from the handlers rather than from the proposal that first described them. Refs Tencent#1022
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
docs/api/README.md开篇声称索引与internal/httpapi/server.go注册的路由保持一致,但表格只覆盖了通过 manifest 暴露的 capabilities。整个 AI 对话域/api/assistant/*(32 条路由)以及共享 AI 定时任务(2 条)都不在其中——包括 v0.4.0 新增的诊断导出GET /api/assistant/generations/{generationId}/diagnostics和对话内安装 CLIPOST /api/assistant/cli-install。按main上的server.go逐条比对,本文件缺 34 条路由,读者据此写出的对接代码会漏掉整个助手域。这个 PR 把缺口补上:
### AI 对话(助手):32 行「方法 / 路径」索引表,置于原索引末尾。### 共享 AI 定时任务:2 行索引表。## AI 对话:诊断导出与对话内安装 CLI:两个 v0.4.0 端点的契约说明——状态码、响应字段、脱敏边界、?download=1的下载文件名,以及可直接运行的 curl 示例。内容取自 handler 实现(
assistant_diagnostics.go、assistant_cli_install.go、internal/domain/assistant_diagnostics.go),而不是取自最早描述这两个端点的提案文档,因此状态码与字段名与代码一致。Closes #1022
Scope
Compatibility
无运行时变化,只新增文档段落,不改动任何已有行(
+83 / -0)。docs/api/openapi.yaml有意未改:它是 MCP 工具 schema 的生成来源(internal/mcpserver/schema.go从apidocs.OpenAPI构建),把助手端点写进去会改变对外暴露的工具集合,属于需要维护者决定的范围,不适合夹带在补索引的文档 PR 里。若维护者希望助手域也进入 OpenAPI 契约,我可以另开一个 PR。Validation
实际执行过的检查:
未运行 / 受限项:
go test ./...:当前主机是 Windows,运行器代码使用syscall.Kill、syscall.Setpgid、syscall.Stat_t,无法在 Windows 上构建,只能在 Linux 主机或 CI 上跑。本 PR 未改动 Go 代码。python3 scripts/check-public.py:本机只有python(3.13),无python3,无法按原命令执行。Safety