hotlens-mcp 0.4.1 → 0.4.3
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/README.md +1 -1
- package/dist/sources/catalog.js +39 -7
- package/dist/sources/catalog.js.map +1 -1
- package/dist/tools/listBoards.js +12 -6
- package/dist/tools/listBoards.js.map +1 -1
- package/dist/types.d.ts +3 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -64,7 +64,7 @@ list_boards({ category: "finance", limit: 20 })
|
|
|
64
64
|
list_boards({ query: "hupu" })
|
|
65
65
|
```
|
|
66
66
|
|
|
67
|
-
|
|
67
|
+
**No credits are spent by listing**, and the catalogue is cached for seven days — but the endpoint still requires `HOTLENS_TOPHUB_KEY`. Without a key this tool returns an error naming the variable, which is the honest answer; the six keyless platforms keep working either way. It returns `hashid` and `domain` for each board. Pass either one to `list_hot_topics` as `board`.
|
|
68
68
|
|
|
69
69
|
Why this exists: nine platforms answer "what is China talking about", but they cannot answer "what are Chinese *sports fans* talking about" or "what are Chinese *retail investors* arguing about". Those are different boards.
|
|
70
70
|
|
package/dist/sources/catalog.js
CHANGED
|
@@ -11,19 +11,30 @@ import { fetchJson } from "./types.js";
|
|
|
11
11
|
*/
|
|
12
12
|
const CACHE_TTL_MS = 7 * 24 * 60 * 60 * 1000;
|
|
13
13
|
const MAX_PAGES = 40;
|
|
14
|
+
/**
|
|
15
|
+
* Verbatim from the provider's documentation, which publishes the cid table
|
|
16
|
+
* with the free /nodes response. Do not "improve" these names: a caller who
|
|
17
|
+
* read the docs will write `ent` and `wxmp`, and a prettier alias makes their
|
|
18
|
+
* query return nothing.
|
|
19
|
+
*
|
|
20
|
+
* news 综合 / tech 科技 / ent 娱乐 / community 社区 / shopping 购物
|
|
21
|
+
* finance 财经 / developer 开发者 / university 大学 / organization 政务
|
|
22
|
+
* blog 博客专栏 / wxmp 微信公众号 / epaper 电子报 / design 设计
|
|
23
|
+
* other 其他 / widget 小工具
|
|
24
|
+
*/
|
|
14
25
|
const CID_CATEGORY = {
|
|
15
26
|
"1": "news",
|
|
16
27
|
"2": "tech",
|
|
17
|
-
"3": "
|
|
28
|
+
"3": "ent",
|
|
18
29
|
"4": "community",
|
|
19
30
|
"5": "shopping",
|
|
20
31
|
"6": "finance",
|
|
21
32
|
"7": "developer",
|
|
22
33
|
"8": "university",
|
|
23
|
-
"9": "
|
|
34
|
+
"9": "organization",
|
|
24
35
|
"10": "blog",
|
|
25
|
-
"11": "
|
|
26
|
-
"12": "
|
|
36
|
+
"11": "wxmp",
|
|
37
|
+
"12": "epaper",
|
|
27
38
|
"13": "design",
|
|
28
39
|
"0": "other",
|
|
29
40
|
"-1": "widget",
|
|
@@ -40,7 +51,15 @@ function readDisk() {
|
|
|
40
51
|
return null;
|
|
41
52
|
if (Date.now() - parsed.fetchedAt > CACHE_TTL_MS)
|
|
42
53
|
return null;
|
|
43
|
-
|
|
54
|
+
// `category` is derived from cid, never a stored truth: a cache written
|
|
55
|
+
// before the names were corrected must not keep serving the old words.
|
|
56
|
+
return {
|
|
57
|
+
fetchedAt: parsed.fetchedAt,
|
|
58
|
+
boards: parsed.boards.map((board) => ({
|
|
59
|
+
...board,
|
|
60
|
+
category: CID_CATEGORY[String(board.cid)] ?? "other",
|
|
61
|
+
})),
|
|
62
|
+
};
|
|
44
63
|
}
|
|
45
64
|
catch {
|
|
46
65
|
return null;
|
|
@@ -66,6 +85,7 @@ function toBoard(node) {
|
|
|
66
85
|
name: (node.name ?? "").trim(),
|
|
67
86
|
display: (node.display ?? "").trim(),
|
|
68
87
|
domain: (node.domain ?? "").trim(),
|
|
88
|
+
...(node.logo?.trim() ? { logo: node.logo.trim() } : {}),
|
|
69
89
|
category: CID_CATEGORY[cid] ?? "other",
|
|
70
90
|
cid,
|
|
71
91
|
};
|
|
@@ -73,12 +93,24 @@ function toBoard(node) {
|
|
|
73
93
|
async function fetchCatalogue() {
|
|
74
94
|
const key = loadConfig().tophubKey;
|
|
75
95
|
if (!key) {
|
|
76
|
-
throw new Error("The board catalogue needs HOTLENS_TOPHUB_KEY. Without
|
|
96
|
+
throw new Error("The board catalogue needs HOTLENS_TOPHUB_KEY. It costs no credits to list, but the endpoint still requires a key. Without one, only the six keyless platforms are available.");
|
|
77
97
|
}
|
|
78
98
|
const boards = new Map();
|
|
79
99
|
for (let page = 1; page <= MAX_PAGES; page += 1) {
|
|
80
100
|
const json = await fetchJson(`https://api.tophubdata.com/nodes?p=${page}`, { headers: { Authorization: key } }, 15000);
|
|
81
|
-
|
|
101
|
+
// Refusals arrive as HTTP 200 with data:{}. Reading `data` as an array
|
|
102
|
+
// would throw "not iterable", which tells the user nothing useful.
|
|
103
|
+
if (json.error) {
|
|
104
|
+
const detail = json.msg ?? `status ${json.status ?? "unknown"}`;
|
|
105
|
+
if (json.status === 100201 || /授权|authoriz/i.test(detail)) {
|
|
106
|
+
throw new Error(`HOTLENS_TOPHUB_KEY was rejected by the catalogue endpoint (${detail}). Check the key, then retry.`);
|
|
107
|
+
}
|
|
108
|
+
if (json.status === 100300) {
|
|
109
|
+
throw new Error(`Aggregator balance is exhausted (${detail}). Top up to list boards.`);
|
|
110
|
+
}
|
|
111
|
+
throw new Error(`The catalogue endpoint refused the request: ${detail}`);
|
|
112
|
+
}
|
|
113
|
+
const nodes = Array.isArray(json.data) ? json.data : [];
|
|
82
114
|
for (const node of nodes) {
|
|
83
115
|
const board = toBoard(node);
|
|
84
116
|
if (board)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"catalog.js","sourceRoot":"","sources":["../../src/sources/catalog.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AACjE,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,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,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,WAAW,EAAE,KAAK,CAAC,CAAC;QAChD,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,WAAW,EAAE,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;QACxD,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,WAAW,EAAE,KAAK,CAAC,CAAC;QAC9C,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC,CAClD,CAAC;AACJ,CAAC"}
|
package/dist/tools/listBoards.js
CHANGED
|
@@ -1,28 +1,33 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import { getBoardCatalogue } from "../sources/catalog.js";
|
|
3
|
+
/**
|
|
4
|
+
* The provider's own category names, taken from the cid table it publishes
|
|
5
|
+
* alongside /nodes. Kept verbatim so that someone reading the upstream docs
|
|
6
|
+
* and someone calling this tool use the same words.
|
|
7
|
+
*/
|
|
3
8
|
const CATEGORIES = [
|
|
4
9
|
"news",
|
|
5
10
|
"tech",
|
|
6
|
-
"
|
|
11
|
+
"ent",
|
|
7
12
|
"community",
|
|
8
13
|
"shopping",
|
|
9
14
|
"finance",
|
|
10
15
|
"developer",
|
|
11
16
|
"university",
|
|
12
|
-
"
|
|
17
|
+
"organization",
|
|
13
18
|
"blog",
|
|
14
|
-
"
|
|
15
|
-
"
|
|
19
|
+
"wxmp",
|
|
20
|
+
"epaper",
|
|
16
21
|
"design",
|
|
17
22
|
"other",
|
|
18
23
|
"widget",
|
|
19
24
|
];
|
|
20
25
|
export function registerListBoards(server) {
|
|
21
|
-
server.tool("list_boards", "List the Chinese boards available beyond the core platforms: Hupu, Douban, Xueqiu, 36Kr, SSPAI, The Paper and hundreds more, each with the hashid needed to pull it.
|
|
26
|
+
server.tool("list_boards", "List the Chinese boards available beyond the core platforms: Hupu, Douban, Xueqiu, 36Kr, SSPAI, The Paper and hundreds more, each with the hashid needed to pull it. Costs no aggregator credits, but does require HOTLENS_TOPHUB_KEY — say so rather than describing it as free. Use it when the user wants a niche community (sports, stocks, design, local news) rather than the national hot list, then pass the hashid to list_hot_topics as `board`.", {
|
|
22
27
|
category: z
|
|
23
28
|
.enum(CATEGORIES)
|
|
24
29
|
.optional()
|
|
25
|
-
.describe("Restrict to one category
|
|
30
|
+
.describe("Restrict to one category, using the provider's own names: news 综合, tech 科技, ent 娱乐, community 社区, shopping 购物, finance 财经, developer 开发者, university 大学, organization 政务, blog 博客, wxmp 微信公众号, epaper 电子报, design 设计, other 其他, widget 小工具."),
|
|
26
31
|
query: z
|
|
27
32
|
.string()
|
|
28
33
|
.optional()
|
|
@@ -68,6 +73,7 @@ export function registerListBoards(server) {
|
|
|
68
73
|
display: board.display,
|
|
69
74
|
domain: board.domain,
|
|
70
75
|
category: board.category,
|
|
76
|
+
...(board.logo ? { logo: board.logo } : {}),
|
|
71
77
|
})),
|
|
72
78
|
};
|
|
73
79
|
return {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"listBoards.js","sourceRoot":"","sources":["../../src/tools/listBoards.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAE1D,MAAM,UAAU,GAAG;IACjB,MAAM;IACN,MAAM;IACN,
|
|
1
|
+
{"version":3,"file":"listBoards.js","sourceRoot":"","sources":["../../src/tools/listBoards.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAE1D;;;;GAIG;AACH,MAAM,UAA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YAEF,OAAO;gBACL,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAe,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC;aAC7E,CAAC;QACJ,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,OAAO;gBACL,OAAO,EAAE,IAAa;gBACtB,OAAO,EAAE;oBACP;wBACE,IAAI,EAAE,MAAe;wBACrB,IAAI,EAAE,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC;qBACvD;iBACF;aACF,CAAC;QACJ,CAAC;IACH,CAAC,CACF,CAAC;AACJ,CAAC"}
|
package/dist/types.d.ts
CHANGED
|
@@ -17,7 +17,9 @@ export interface Board {
|
|
|
17
17
|
/** Board type on that site, e.g. 热榜 */
|
|
18
18
|
display: string;
|
|
19
19
|
domain: string;
|
|
20
|
-
/**
|
|
20
|
+
/** Site icon, when the provider supplies one. */
|
|
21
|
+
logo?: string;
|
|
22
|
+
/** Category id from the provider's own table: news, tech, ent, wxmp, ... */
|
|
21
23
|
category: string;
|
|
22
24
|
cid: string;
|
|
23
25
|
}
|
package/package.json
CHANGED