tyc-cli 0.3.3 → 0.3.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +13 -0
- package/README.md +16 -8
- package/dist/catalog.json +217 -196
- package/dist/commands/layers.js +5 -5
- package/dist/config.js +1 -1
- package/dist/index.js +4 -3
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -23,6 +23,19 @@
|
|
|
23
23
|
|
|
24
24
|
- 默认 stdout 由紧凑单行 JSON 改为缩进 2 空格 JSON。需要旧默认行为的脚本请显式加 `--compact`
|
|
25
25
|
|
|
26
|
+
## [0.3.4] - 2026-05-28
|
|
27
|
+
|
|
28
|
+
### 变更
|
|
29
|
+
|
|
30
|
+
- 更新 CLI catalog 中部分搜索类工具的 help/参数说明,使命令语义与 MCP Server 实际参数映射一致:
|
|
31
|
+
- `companies-by-industry-region`:明确 `industry` 为国标行业代码,`region` 为地区代码
|
|
32
|
+
- `companies-by-ranking`:明确按企业名称、统一社会信用代码或天眼查企业 ID 查询企业上榜榜单
|
|
33
|
+
- `companies-by-tag`:明确未传 `tag` 时使用 `searchKey` 作为标签名称
|
|
34
|
+
- `listed-companies`:明确按企业名称、统一社会信用代码或天眼查企业 ID 搜索上市公司信息
|
|
35
|
+
- `search-patents` / `search-trademarks`:说明 `applicant` 会作为关键词按申请人字段搜索,不是与 `searchKey` 叠加的二次过滤
|
|
36
|
+
- `search-bids`:说明 `purchaser` 的搜索语义,并明确 `bidType` 支持的公告类型枚举
|
|
37
|
+
- 版本号提升至 `0.3.4`。
|
|
38
|
+
|
|
26
39
|
## [0.3.0] - 2026-04-29
|
|
27
40
|
|
|
28
41
|
### 新增
|
package/README.md
CHANGED
|
@@ -15,12 +15,17 @@
|
|
|
15
15
|
Streamable HTTP)调用天眼查 162 个业务语义聚合工具,覆盖企业工商、知产、司法风险、
|
|
16
16
|
董监高等全维度商业数据。
|
|
17
17
|
|
|
18
|
+
当前 MCP Server 的 `tools/list` 默认只公开少量 AI Agent 入口工具
|
|
19
|
+
(搜索、公司画像、能力目录、`call_tool` / `call_tools_batch` 等),但 162 个业务语义
|
|
20
|
+
工具仍注册在服务端并保持 `tools/call` 兼容。CLI 不依赖 `tools/list` 构建命令树,
|
|
21
|
+
而是使用打包内 `catalog.json` 直达这些业务工具。
|
|
22
|
+
|
|
18
23
|
**核心特点**:
|
|
19
24
|
|
|
20
25
|
- 🧠 **MCP 客户端架构**:CLI 只做协议转换与参数透传;多源合并、时间戳格式化、
|
|
21
26
|
空结果归一化、`_summary` 注入等业务逻辑由 MCP Server 完成
|
|
22
|
-
- 🔌
|
|
23
|
-
支持 `--url`
|
|
27
|
+
- 🔌 **公网优先**:默认连接天眼查 MCP 端点 `https://mcp.tianyancha.com/v1`;
|
|
28
|
+
支持 `--url` 指向本地或私有部署
|
|
24
29
|
- 🔄 **Session 复用**:`Mcp-Session-Id` 本地缓存 24 小时,后续调用零 initialize 开销
|
|
25
30
|
- 🎯 **6 大业务分类 / 162 个工具**:企业基础信息 · 风险合规 · 知识产权 · 经营与公示 · 历史信息 · 董监高
|
|
26
31
|
- 🤖 **AI Agent 友好**:tyc 英文 key 透传 / 时间戳格式化 / `_summary / _empty / _warnings` 元数据
|
|
@@ -52,6 +57,9 @@ npm install && npm run build && npm link
|
|
|
52
57
|
# 连接官方 MCP(默认)
|
|
53
58
|
tyc init --authorization "YOUR_API_TOKEN"
|
|
54
59
|
|
|
60
|
+
# 连接本地 MCP(需要本机启动 apimcp)
|
|
61
|
+
tyc init --authorization "YOUR_API_TOKEN" --url "http://localhost:8080/v1"
|
|
62
|
+
|
|
55
63
|
# 连接自建 MCP
|
|
56
64
|
tyc init --authorization "YOUR_API_TOKEN" --url "http://your-mcp-host:8080/v1"
|
|
57
65
|
|
|
@@ -164,7 +172,7 @@ tyc company registration-info "百度" --compact | jq .name
|
|
|
164
172
|
|
|
165
173
|
## 📚 查询指令手册
|
|
166
174
|
|
|
167
|
-
### 企业基础信息(company,
|
|
175
|
+
### 企业基础信息(company,49)
|
|
168
176
|
|
|
169
177
|
```bash
|
|
170
178
|
tyc company registration-info "北京百度网讯科技有限公司" # 工商登记
|
|
@@ -173,13 +181,13 @@ tyc company beneficial-owners "..." # UBO
|
|
|
173
181
|
tyc company key-personnel "..." # 主要人员
|
|
174
182
|
tyc company annual-reports "..." # 企业年报
|
|
175
183
|
tyc company financial-data "..." # 财务数据(上市/非上市自动回退)
|
|
176
|
-
tyc company accuracy "
|
|
184
|
+
tyc company accuracy "北京百度网讯科技有限公司" --companyCode "91110000802100433B" --legalPersonName "梁志祥" # 三要素核验
|
|
177
185
|
tyc company equity-tree "..." # 股权图谱
|
|
178
186
|
tyc company relation-path "A" --searchKey2 "B" # 双企业最短路径
|
|
179
187
|
tyc company group-info "..." # 集团信息(serial 串行执行)
|
|
180
188
|
```
|
|
181
189
|
|
|
182
|
-
### 风险合规(risk,
|
|
190
|
+
### 风险合规(risk,35)
|
|
183
191
|
|
|
184
192
|
```bash
|
|
185
193
|
tyc risk dishonest-info "..." # 失信被执行
|
|
@@ -214,7 +222,7 @@ tyc operation invest-agency-profile "红杉资本" # 投资机构
|
|
|
214
222
|
tyc operation private-fund-profile "..." # 私募基金
|
|
215
223
|
```
|
|
216
224
|
|
|
217
|
-
### 历史信息(history,
|
|
225
|
+
### 历史信息(history,17)
|
|
218
226
|
|
|
219
227
|
```bash
|
|
220
228
|
tyc history historical-registration "..."
|
|
@@ -254,7 +262,7 @@ tyc executive person-risk-overview "..." --humanName "张三"
|
|
|
254
262
|
1. 解析命令行(commander)
|
|
255
263
|
2. 组装 `tools/call` JSON-RPC 请求,透传 `Authorization` header
|
|
256
264
|
3. Session 管理(`initialize` + 24h 缓存 + 失效重建)
|
|
257
|
-
4. 解析 MCP Streamable HTTP
|
|
265
|
+
4. 解析 MCP Streamable HTTP 响应(当前服务端返回单包 JSON)
|
|
258
266
|
5. 格式化输出(默认 pretty / `--compact` / `--md`),并可叠加 `--head/--tail/--full/--threshold/--output-file` 做截断与落盘
|
|
259
267
|
|
|
260
268
|
**CLI 不做**:
|
|
@@ -342,7 +350,7 @@ tyc-cli/
|
|
|
342
350
|
| 协议 | MCP client(JSON-RPC over Streamable HTTP) | MCP server |
|
|
343
351
|
| 实现 | TypeScript | Go |
|
|
344
352
|
| 职责 | 命令树 · 参数透传 · 格式化输出 | 多源聚合 · 时间戳格式化 · 元数据注入 · Authorization 透传至 OpenAPI |
|
|
345
|
-
| 运维 | 用户本地安装 |
|
|
353
|
+
| 运维 | 用户本地安装 | 默认连接官方托管 `mcp.tianyancha.com`,也可切到本机 apimcp 或用户自建 |
|
|
346
354
|
|
|
347
355
|
CLI 和 MCP Server 共享同一 162 工具清单;工具元数据从打包内的 `catalog.json`
|
|
348
356
|
读取,保证命令树冷启动零网络开销。
|