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/dist/commands/layers.js
CHANGED
|
@@ -12,7 +12,7 @@ const LAYER_SPECS = [
|
|
|
12
12
|
title: "Overview · 概要层",
|
|
13
13
|
summary: "**6 个 facet 队长,每 facet 1 个总览**:company-base / 风险 / 知产 / 经营信用 / 历史 / 董监高 各 1 个 L1 工具,单次调用聚合该 facet 多子维度。",
|
|
14
14
|
trigger: '"这家公司整体怎么样 / 风险如何 / 知产实力 / 经营状况 / 历史变更 / 这个人是谁"',
|
|
15
|
-
contract: "Agent 按 facet 选 1 个 L1 调用即得 _summary
|
|
15
|
+
contract: "Agent 按 facet 选 1 个 L1 调用即得 _summary;下一跳可用 tyc L2 list 或 MCP get_company_capabilities 确认工具。",
|
|
16
16
|
},
|
|
17
17
|
{
|
|
18
18
|
layer: "L2",
|
|
@@ -63,7 +63,7 @@ function registerLayers(program) {
|
|
|
63
63
|
recommended_call_order: [
|
|
64
64
|
`0. Anchor at L0 — feed the user's raw company name into the ${getLayerCount("L0")} L0 tool (search_companies); lock onto a USCC + official name`,
|
|
65
65
|
`1. Ascend to L1 — pick ONE of the ${getLayerCount("L1")} overview tools with the anchored USCC`,
|
|
66
|
-
"2. Read _summary
|
|
66
|
+
"2. Read _summary and pick the next dimension via tyc layer lists or MCP get_company_capabilities",
|
|
67
67
|
`3. Drill to L2 for a specific dimension (items + totals; ${getLayerCount("L2")} tools); when unsure which L2, default to the facet's L2 优先 (★, see l2_priority)`,
|
|
68
68
|
`4. Reach L3 for id-based detail, search_*, or vertical SKILL tools (${getLayerCount("L3")} tools)`,
|
|
69
69
|
],
|
|
@@ -130,7 +130,7 @@ function renderLayersText() {
|
|
|
130
130
|
lines.push("Rationale: LLM tool-selection accuracy collapses beyond 30 tools.");
|
|
131
131
|
lines.push(` tyc carves L0 into a single entity-resolution tool, so the default LLM`);
|
|
132
132
|
lines.push(` surface is L0 + L1 = ${defaultSurface} tools (≤ 15-tool exposure limit);`);
|
|
133
|
-
lines.push(" L2/L3 are discovered on demand via _summary
|
|
133
|
+
lines.push(" L2/L3 are discovered on demand via _summary, layer lists, or get_company_capabilities.");
|
|
134
134
|
lines.push("");
|
|
135
135
|
for (const s of LAYER_SPECS) {
|
|
136
136
|
const n = getLayerCount(s.layer);
|
|
@@ -153,7 +153,7 @@ function renderLayersText() {
|
|
|
153
153
|
lines.push("Recommended call order for agents:");
|
|
154
154
|
lines.push(` 0. Anchor at L0 — feed the user's raw company name into the ${getLayerCount("L0")} L0 tool (search_companies)`);
|
|
155
155
|
lines.push(` 1. Ascend to L1 — one of the ${getLayerCount("L1")} overview tools, with the anchored USCC`);
|
|
156
|
-
lines.push(" 2. Read _summary
|
|
156
|
+
lines.push(" 2. Read _summary, then choose the next dimension via layer lists or get_company_capabilities");
|
|
157
157
|
lines.push(` 3. Drill to L2 for a specific dimension (${getLayerCount("L2")} tools); unsure which L2 → default to that facet's L2★ 优先 (see L2 block above)`);
|
|
158
158
|
lines.push(` 4. Reach L3 for id-based detail / search_* / vertical SKILL (${getLayerCount("L3")} tools)`);
|
|
159
159
|
return lines.join("\n");
|
|
@@ -188,7 +188,7 @@ function renderLayersMarkdown() {
|
|
|
188
188
|
lines.push("");
|
|
189
189
|
lines.push(`0. Anchor at L0 — feed the user's raw company name into the ${getLayerCount("L0")} L0 tool (\`search_companies\`); lock onto a USCC + official name.`);
|
|
190
190
|
lines.push(`1. Ascend to L1 — pick ONE of the ${getLayerCount("L1")} overview tools with the anchored USCC.`);
|
|
191
|
-
lines.push("2. Read `_summary
|
|
191
|
+
lines.push("2. Read `_summary`, then choose the next dimension via layer lists or MCP `get_company_capabilities`.");
|
|
192
192
|
lines.push(`3. Drill to L2 for a specific dimension (items + totals; ${getLayerCount("L2")} tools). Unsure which L2 → default to that facet's L2★ 优先 (table above).`);
|
|
193
193
|
lines.push(`4. Reach L3 for id-based detail, \`search_*\`, or vertical SKILL tools (${getLayerCount("L3")} tools).`);
|
|
194
194
|
lines.push("");
|
package/dist/config.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
// { "url": "https://mcp.tianyancha.com/v1",
|
|
5
5
|
// "headers": { "Authorization": "xxxx" } }
|
|
6
6
|
//
|
|
7
|
-
//
|
|
7
|
+
// 默认端点指向天眼查公网 MCP Server;连接本地或私有环境可通过
|
|
8
8
|
// tyc init --url http://localhost:8080/v1 或 TYC_MCP_ENDPOINT 环境变量覆盖。
|
|
9
9
|
import { readFileSync, writeFileSync, mkdirSync, existsSync, chmodSync } from "node:fs";
|
|
10
10
|
import { join } from "node:path";
|
package/dist/index.js
CHANGED
|
@@ -16,7 +16,7 @@ ARCHITECTURE — Layered Tool Discovery for LLM Agents
|
|
|
16
16
|
entity-resolution layer:
|
|
17
17
|
|
|
18
18
|
┌─ L0 Resolve ${pad(getLayerCount("L0"), 3)} tool entity resolution · 简称/曾用名/模糊名 → 精确企业
|
|
19
|
-
├─ L1 Overview ${pad(getLayerCount("L1"), 3)} tools one captain per facet · returns _summary
|
|
19
|
+
├─ L1 Overview ${pad(getLayerCount("L1"), 3)} tools one captain per facet · returns _summary for routing
|
|
20
20
|
├─ L2 Drill-down ${pad(getLayerCount("L2"), 3)} tools one-hop into a specific data dimension (★ = L2 优先, see below)
|
|
21
21
|
└─ L3 Specialized ${pad(getLayerCount("L3"), 3)} tools id-based detail · search_* · vertical SKILLs
|
|
22
22
|
|
|
@@ -26,8 +26,9 @@ ARCHITECTURE — Layered Tool Discovery for LLM Agents
|
|
|
26
26
|
指代) into \`search_companies\`; lock onto one entity
|
|
27
27
|
with a USCC + official name before anything else.
|
|
28
28
|
1. Ascend to L1. Pick ONE of the ${getLayerCount("L1")} overview tools with the
|
|
29
|
-
anchored USCC. Read
|
|
30
|
-
|
|
29
|
+
anchored USCC. Read _summary, then use layer lists or
|
|
30
|
+
MCP get_company_capabilities for the next tool.
|
|
31
|
+
2. Descend to L2. Pick a specific dimension
|
|
31
32
|
(shareholders / litigation / patents / annual reports …).
|
|
32
33
|
If unsure which L2, default to that facet's L2★ 优先 (below).
|
|
33
34
|
3. Land on L3. When L2 returns a list item with an \`id\`, a \`search_*\`
|