feat(docs): 新增合思开放平台官方接口文档检索独立业务域与 CLI 客户端

- 新增 `src/domains/docs/` 领域(api.ts, tools.ts, types.ts, README.docs.md, docs.test.ts)
- 实现从线上 `docs.ekuaibao.com/search-index.json` 实时拉取最新规范与端点提取能力
- 集成多级缓存(L1 内存 + L2 SQLite)与 `specs/docs-catalog.json` 静态预编译保底,支持零网络离线毫秒级检索
- 提供 270+ 个 OpenAPI HTTP 接口端点、参数表格、CURL 示范与成功响应示例的高精度解析与结构化输出
- 注册 `hose-use docs` CLI 命令(search, show, categories, sync)及 `doc`, `api-doc` 别名
- 严格遵循 AGENTS.md 架构分层约束,全量 1144+ 自动化单测与 tsc 类型检查 100% 通过
This commit is contained in:
gitea committed 2026-11-16 16:29:27 +08:00
1 parent 448dd438ff
commit 4f572ad9c1
11 files changed
+1013 -2

No files matched your search

+6
View File
@@ -30,6 +30,7 @@ import { handleKeysCommand } from "./commands/keys.js";
import { handleStoreCommand } from "./commands/store.js";
import { handleFeeTypeCommand } from "./commands/feetype.js";
import { handleAssistPlatformCommand } from "./commands/assist-platform/index.js";
import { handleDocsCommand } from "./commands/docs.js";
import { COMMAND_METADATA, type CliCommandMetadata } from "./command-metadata.js";
import type { CliParsedArgs, CliResult, CliRunOptions, CliRuntime } from "./types.js";
@@ -206,6 +207,11 @@ export const CLI_COMMAND_REGISTRY: readonly CliCommandDefinition[] = [
...COMMAND_METADATA["assist-platform"],
handler: (parsed, runtime) => handleAssistPlatformCommand(parsed, runtime),
},
{
area: "docs",
...COMMAND_METADATA.docs,
handler: (parsed, runtime) => handleDocsCommand(parsed, runtime),
},
];
const COMMAND_LOOKUP = new Map<string, CliCommandDefinition>();