@zhin.js/plugin-60s 3.0.1 → 3.0.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/agent/tools/60s_news.ts +13 -0
- package/agent/tools/bing_image.ts +13 -0
- package/agent/tools/douyin_hot.ts +13 -0
- package/agent/tools/duanzi.ts +13 -0
- package/agent/tools/exchange_rate.ts +13 -0
- package/agent/tools/fuel_price.ts +13 -0
- package/agent/tools/gold_price.ts +13 -0
- package/agent/tools/history_today.ts +13 -0
- package/agent/tools/hitokoto.ts +13 -0
- package/agent/tools/ip_query.ts +13 -0
- package/agent/tools/kfc.ts +13 -0
- package/agent/tools/moyu.ts +13 -0
- package/agent/tools/toutiao_hot.ts +13 -0
- package/agent/tools/translate_60s.ts +13 -0
- package/agent/tools/weather.ts +13 -0
- package/agent/tools/weibo_hot.ts +13 -0
- package/agent/tools/zhihu_hot.ts +13 -0
- package/commands/60s.ts +7 -0
- package/commands/bing.ts +7 -0
- package/commands/douyin/[limit:number=10].ts +7 -0
- package/commands/duanzi.ts +7 -0
- package/commands/exchange.ts +10 -0
- package/commands/fanyi/[text:string].ts +7 -0
- package/commands/fuel/[province:string].ts +7 -0
- package/commands/gold.ts +7 -0
- package/commands/history.ts +7 -0
- package/commands/hitokoto/[type:string].ts +7 -0
- package/commands/ip/[ip:string].ts +7 -0
- package/commands/kfc.ts +7 -0
- package/commands/moyu.ts +7 -0
- package/commands/toutiao/[limit:number=10].ts +7 -0
- package/commands/weather/[city:string].ts +7 -0
- package/commands/weibo/[limit:number=10].ts +7 -0
- package/commands/zhihu/[limit:number=10].ts +7 -0
- package/lib/api.js +45 -0
- package/lib/api.js.map +1 -0
- package/lib/handlers/60s-news.js +12 -0
- package/lib/handlers/60s-news.js.map +1 -0
- package/lib/handlers/bing-image.js +18 -0
- package/lib/handlers/bing-image.js.map +1 -0
- package/lib/handlers/douyin-hot.js +6 -0
- package/lib/handlers/douyin-hot.js.map +1 -0
- package/lib/handlers/duanzi.js +6 -0
- package/lib/handlers/duanzi.js.map +1 -0
- package/lib/handlers/exchange-rate.js +28 -0
- package/lib/handlers/exchange-rate.js.map +1 -0
- package/lib/handlers/fuel-price.js +21 -0
- package/lib/handlers/fuel-price.js.map +1 -0
- package/lib/handlers/gold-price.js +24 -0
- package/lib/handlers/gold-price.js.map +1 -0
- package/lib/handlers/history-today.js +16 -0
- package/lib/handlers/history-today.js.map +1 -0
- package/lib/handlers/hitokoto.js +16 -0
- package/lib/handlers/hitokoto.js.map +1 -0
- package/lib/handlers/ip-query.js +17 -0
- package/lib/handlers/ip-query.js.map +1 -0
- package/lib/handlers/kfc.js +6 -0
- package/lib/handlers/kfc.js.map +1 -0
- package/lib/handlers/moyu.js +39 -0
- package/lib/handlers/moyu.js.map +1 -0
- package/lib/handlers/toutiao-hot.js +6 -0
- package/lib/handlers/toutiao-hot.js.map +1 -0
- package/lib/handlers/translate.js +26 -0
- package/lib/handlers/translate.js.map +1 -0
- package/lib/handlers/weather.js +22 -0
- package/lib/handlers/weather.js.map +1 -0
- package/lib/handlers/weibo-hot.js +6 -0
- package/lib/handlers/weibo-hot.js.map +1 -0
- package/lib/handlers/zhihu-hot.js +6 -0
- package/lib/handlers/zhihu-hot.js.map +1 -0
- package/lib/index.js +1 -34
- package/lib/index.js.map +1 -1
- package/package.json +48 -12
- package/plugin.ts +18 -0
- package/schema.json +12 -0
- package/src/api.ts +63 -0
- package/{tools/60s-news/handler.ts → src/handlers/60s-news.ts} +1 -1
- package/{tools/bing-image/handler.ts → src/handlers/bing-image.ts} +4 -4
- package/{tools/douyin-hot/handler.ts → src/handlers/douyin-hot.ts} +2 -2
- package/{tools/duanzi/handler.ts → src/handlers/duanzi.ts} +1 -1
- package/{tools/exchange-rate/handler.ts → src/handlers/exchange-rate.ts} +8 -6
- package/{tools/fuel-price/handler.ts → src/handlers/fuel-price.ts} +5 -4
- package/{tools/gold-price/handler.ts → src/handlers/gold-price.ts} +8 -7
- package/src/handlers/history-today.ts +16 -0
- package/{tools/hitokoto/handler.ts → src/handlers/hitokoto.ts} +1 -1
- package/{tools/ip-query/handler.ts → src/handlers/ip-query.ts} +1 -1
- package/{tools/kfc/handler.ts → src/handlers/kfc.ts} +1 -1
- package/src/handlers/moyu.ts +35 -0
- package/{tools/toutiao-hot/handler.ts → src/handlers/toutiao-hot.ts} +2 -2
- package/src/handlers/translate.ts +25 -0
- package/src/handlers/weather.ts +22 -0
- package/{tools/weibo-hot/handler.ts → src/handlers/weibo-hot.ts} +2 -2
- package/{tools/zhihu-hot/handler.ts → src/handlers/zhihu-hot.ts} +2 -2
- package/src/index.ts +8 -44
- package/lib/index.d.ts +0 -2
- package/lib/index.d.ts.map +0 -1
- package/plugin.yml +0 -3
- package/tools/60s-news/60s-news.tool.md +0 -8
- package/tools/api.ts +0 -34
- package/tools/bing-image/bing-image.tool.md +0 -8
- package/tools/douyin-hot/douyin-hot.tool.md +0 -12
- package/tools/duanzi/duanzi.tool.md +0 -8
- package/tools/exchange-rate/exchange-rate.tool.md +0 -14
- package/tools/fuel-price/fuel-price.tool.md +0 -11
- package/tools/gold-price/gold-price.tool.md +0 -8
- package/tools/history-today/handler.ts +0 -15
- package/tools/history-today/history-today.tool.md +0 -8
- package/tools/hitokoto/hitokoto.tool.md +0 -12
- package/tools/ip-query/ip-query.tool.md +0 -12
- package/tools/kfc/kfc.tool.md +0 -8
- package/tools/moyu/handler.ts +0 -28
- package/tools/moyu/moyu.tool.md +0 -8
- package/tools/toutiao-hot/toutiao-hot.tool.md +0 -12
- package/tools/translate/handler.ts +0 -19
- package/tools/translate/translate.tool.md +0 -15
- package/tools/weather/handler.ts +0 -22
- package/tools/weather/weather.tool.md +0 -12
- package/tools/weibo-hot/weibo-hot.tool.md +0 -12
- package/tools/zhihu-hot/zhihu-hot.tool.md +0 -12
- /package/{skills/60s/SKILL.md → agent/skills/60s.md} +0 -0
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { defineAgentTool } from '@zhin.js/agent/tools';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
|
|
4
|
+
export default defineAgentTool({
|
|
5
|
+
description: "获取每日60秒新闻,快速了解今日要闻",
|
|
6
|
+
inputSchema: z.object({}),
|
|
7
|
+
keywords: ["60s", "新闻", "今日新闻", "60秒", "每日新闻", "读懂世界"],
|
|
8
|
+
tags: ["新闻", "资讯", "60s"],
|
|
9
|
+
async execute() {
|
|
10
|
+
const handler = (await import('../../src/handlers/60s-news.js')).default;
|
|
11
|
+
return handler();
|
|
12
|
+
},
|
|
13
|
+
});
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { defineAgentTool } from '@zhin.js/agent/tools';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
|
|
4
|
+
export default defineAgentTool({
|
|
5
|
+
description: "获取 Bing 每日壁纸图片",
|
|
6
|
+
inputSchema: z.object({}),
|
|
7
|
+
keywords: ["bing", "必应", "壁纸", "每日壁纸"],
|
|
8
|
+
tags: ["图片", "壁纸", "Bing"],
|
|
9
|
+
async execute() {
|
|
10
|
+
const handler = (await import('../../src/handlers/bing-image.js')).default;
|
|
11
|
+
return handler();
|
|
12
|
+
},
|
|
13
|
+
});
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { defineAgentTool } from '@zhin.js/agent/tools';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
|
|
4
|
+
export default defineAgentTool<{ limit?: number }>({
|
|
5
|
+
description: "获取抖音热搜榜",
|
|
6
|
+
inputSchema: z.object({ limit: z.number().optional() }),
|
|
7
|
+
keywords: ["抖音", "热搜", "douyin", "dy"],
|
|
8
|
+
tags: ["热搜", "短视频", "抖音"],
|
|
9
|
+
async execute(input) {
|
|
10
|
+
const handler = (await import('../../src/handlers/douyin-hot.js')).default;
|
|
11
|
+
return handler(input);
|
|
12
|
+
},
|
|
13
|
+
});
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { defineAgentTool } from '@zhin.js/agent/tools';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
|
|
4
|
+
export default defineAgentTool({
|
|
5
|
+
description: "获取一个段子",
|
|
6
|
+
inputSchema: z.object({}),
|
|
7
|
+
keywords: ["段子", "笑话", "搞笑", "joke", "duanzi"],
|
|
8
|
+
tags: ["娱乐", "笑话", "段子"],
|
|
9
|
+
async execute() {
|
|
10
|
+
const handler = (await import('../../src/handlers/duanzi.js')).default;
|
|
11
|
+
return handler();
|
|
12
|
+
},
|
|
13
|
+
});
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { defineAgentTool } from '@zhin.js/agent/tools';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
|
|
4
|
+
export default defineAgentTool<{ from?: string; to?: string }>({
|
|
5
|
+
description: "查询货币汇率",
|
|
6
|
+
inputSchema: z.object({ from: z.string().optional(), to: z.string().optional() }),
|
|
7
|
+
keywords: ["汇率", "兑换", "外汇", "exchange", "rate"],
|
|
8
|
+
tags: ["金融", "汇率", "查询"],
|
|
9
|
+
async execute(input) {
|
|
10
|
+
const handler = (await import('../../src/handlers/exchange-rate.js')).default;
|
|
11
|
+
return handler(input);
|
|
12
|
+
},
|
|
13
|
+
});
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { defineAgentTool } from '@zhin.js/agent/tools';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
|
|
4
|
+
export default defineAgentTool<{ province?: string }>({
|
|
5
|
+
description: "查询今日油价",
|
|
6
|
+
inputSchema: z.object({ province: z.string().optional() }),
|
|
7
|
+
keywords: ["油价", "汽油", "柴油", "fuel"],
|
|
8
|
+
tags: ["生活", "油价", "价格"],
|
|
9
|
+
async execute(input) {
|
|
10
|
+
const handler = (await import('../../src/handlers/fuel-price.js')).default;
|
|
11
|
+
return handler(input);
|
|
12
|
+
},
|
|
13
|
+
});
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { defineAgentTool } from '@zhin.js/agent/tools';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
|
|
4
|
+
export default defineAgentTool({
|
|
5
|
+
description: "查询今日黄金价格",
|
|
6
|
+
inputSchema: z.object({}),
|
|
7
|
+
keywords: ["金价", "黄金", "黄金价格", "gold"],
|
|
8
|
+
tags: ["金融", "黄金", "价格"],
|
|
9
|
+
async execute() {
|
|
10
|
+
const handler = (await import('../../src/handlers/gold-price.js')).default;
|
|
11
|
+
return handler();
|
|
12
|
+
},
|
|
13
|
+
});
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { defineAgentTool } from '@zhin.js/agent/tools';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
|
|
4
|
+
export default defineAgentTool({
|
|
5
|
+
description: "查看历史上的今天发生了什么",
|
|
6
|
+
inputSchema: z.object({}),
|
|
7
|
+
keywords: ["历史", "历史上的今天", "今天历史", "history"],
|
|
8
|
+
tags: ["历史", "知识", "日历"],
|
|
9
|
+
async execute() {
|
|
10
|
+
const handler = (await import('../../src/handlers/history-today.js')).default;
|
|
11
|
+
return handler();
|
|
12
|
+
},
|
|
13
|
+
});
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { defineAgentTool } from '@zhin.js/agent/tools';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
|
|
4
|
+
export default defineAgentTool<{ type?: string }>({
|
|
5
|
+
description: "获取一言/每日一句,随机返回一条语句",
|
|
6
|
+
inputSchema: z.object({ type: z.string().optional() }),
|
|
7
|
+
keywords: ["一言", "每日一句", "语录", "名言", "hitokoto"],
|
|
8
|
+
tags: ["语录", "文学", "随机"],
|
|
9
|
+
async execute(input) {
|
|
10
|
+
const handler = (await import('../../src/handlers/hitokoto.js')).default;
|
|
11
|
+
return handler(input);
|
|
12
|
+
},
|
|
13
|
+
});
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { defineAgentTool } from '@zhin.js/agent/tools';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
|
|
4
|
+
export default defineAgentTool<{ ip?: string }>({
|
|
5
|
+
description: "查询 IP 地址的地理位置信息",
|
|
6
|
+
inputSchema: z.object({ ip: z.string().optional() }),
|
|
7
|
+
keywords: ["ip", "IP", "IP查询", "ip查询"],
|
|
8
|
+
tags: ["网络", "查询", "IP"],
|
|
9
|
+
async execute(input) {
|
|
10
|
+
const handler = (await import('../../src/handlers/ip-query.js')).default;
|
|
11
|
+
return handler(input);
|
|
12
|
+
},
|
|
13
|
+
});
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { defineAgentTool } from '@zhin.js/agent/tools';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
|
|
4
|
+
export default defineAgentTool({
|
|
5
|
+
description: "获取 KFC 疯狂星期四文案",
|
|
6
|
+
inputSchema: z.object({}),
|
|
7
|
+
keywords: ["kfc", "KFC", "疯狂星期四", "v50", "肯德基"],
|
|
8
|
+
tags: ["娱乐", "KFC", "文案"],
|
|
9
|
+
async execute() {
|
|
10
|
+
const handler = (await import('../../src/handlers/kfc.js')).default;
|
|
11
|
+
return handler();
|
|
12
|
+
},
|
|
13
|
+
});
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { defineAgentTool } from '@zhin.js/agent/tools';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
|
|
4
|
+
export default defineAgentTool({
|
|
5
|
+
description: "获取摸鱼日历,查看今天适不适合摸鱼",
|
|
6
|
+
inputSchema: z.object({}),
|
|
7
|
+
keywords: ["摸鱼", "摸鱼日历", "moyu"],
|
|
8
|
+
tags: ["生活", "摸鱼", "日历"],
|
|
9
|
+
async execute() {
|
|
10
|
+
const handler = (await import('../../src/handlers/moyu.js')).default;
|
|
11
|
+
return handler();
|
|
12
|
+
},
|
|
13
|
+
});
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { defineAgentTool } from '@zhin.js/agent/tools';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
|
|
4
|
+
export default defineAgentTool<{ limit?: number }>({
|
|
5
|
+
description: "获取今日头条热搜榜",
|
|
6
|
+
inputSchema: z.object({ limit: z.number().optional() }),
|
|
7
|
+
keywords: ["头条", "今日头条", "热搜", "toutiao", "tt"],
|
|
8
|
+
tags: ["热搜", "资讯", "头条"],
|
|
9
|
+
async execute(input) {
|
|
10
|
+
const handler = (await import('../../src/handlers/toutiao-hot.js')).default;
|
|
11
|
+
return handler(input);
|
|
12
|
+
},
|
|
13
|
+
});
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { defineAgentTool } from '@zhin.js/agent/tools';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
|
|
4
|
+
export default defineAgentTool<{ text: string; to?: string }>({
|
|
5
|
+
description: "翻译文本",
|
|
6
|
+
inputSchema: z.object({ text: z.string().min(1), to: z.string().optional() }),
|
|
7
|
+
keywords: ["翻译", "英文", "中文", "日文", "translate", "译"],
|
|
8
|
+
tags: ["工具", "翻译", "语言"],
|
|
9
|
+
async execute(input) {
|
|
10
|
+
const handler = (await import('../../src/handlers/translate.js')).default;
|
|
11
|
+
return handler(input);
|
|
12
|
+
},
|
|
13
|
+
});
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { defineAgentTool } from '@zhin.js/agent/tools';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
|
|
4
|
+
export default defineAgentTool<{ city: string }>({
|
|
5
|
+
description: "查询指定城市的当前天气信息",
|
|
6
|
+
inputSchema: z.object({ city: z.string() }),
|
|
7
|
+
keywords: ["天气", "气温", "温度", "下雨", "晴天", "阴天", "weather"],
|
|
8
|
+
tags: ["天气", "生活", "查询"],
|
|
9
|
+
async execute(input) {
|
|
10
|
+
const handler = (await import('../../src/handlers/weather.js')).default;
|
|
11
|
+
return handler(input);
|
|
12
|
+
},
|
|
13
|
+
});
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { defineAgentTool } from '@zhin.js/agent/tools';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
|
|
4
|
+
export default defineAgentTool<{ limit?: number }>({
|
|
5
|
+
description: "获取微博热搜榜",
|
|
6
|
+
inputSchema: z.object({ limit: z.number().optional() }),
|
|
7
|
+
keywords: ["微博", "热搜", "weibo", "wb"],
|
|
8
|
+
tags: ["热搜", "社交", "微博"],
|
|
9
|
+
async execute(input) {
|
|
10
|
+
const handler = (await import('../../src/handlers/weibo-hot.js')).default;
|
|
11
|
+
return handler(input);
|
|
12
|
+
},
|
|
13
|
+
});
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { defineAgentTool } from '@zhin.js/agent/tools';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
|
|
4
|
+
export default defineAgentTool<{ limit?: number }>({
|
|
5
|
+
description: "获取知乎热榜",
|
|
6
|
+
inputSchema: z.object({ limit: z.number().optional() }),
|
|
7
|
+
keywords: ["知乎", "热榜", "zhihu", "zh"],
|
|
8
|
+
tags: ["热搜", "社交", "知乎"],
|
|
9
|
+
async execute(input) {
|
|
10
|
+
const handler = (await import('../../src/handlers/zhihu-hot.js')).default;
|
|
11
|
+
return handler(input);
|
|
12
|
+
},
|
|
13
|
+
});
|
package/commands/60s.ts
ADDED
package/commands/bing.ts
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { defineCommand } from '@zhin.js/command';
|
|
2
|
+
import handler from '../src/handlers/exchange-rate.js';
|
|
3
|
+
|
|
4
|
+
export default defineCommand({
|
|
5
|
+
description: '货币汇率',
|
|
6
|
+
execute: ({ args }) => handler({
|
|
7
|
+
from: args[0] != null ? String(args[0]) : undefined,
|
|
8
|
+
to: args[1] != null ? String(args[1]) : undefined,
|
|
9
|
+
}),
|
|
10
|
+
});
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { defineCommand } from '@zhin.js/command';
|
|
2
|
+
import handler from '../../src/handlers/translate.js';
|
|
3
|
+
|
|
4
|
+
export default defineCommand({
|
|
5
|
+
description: '文本翻译',
|
|
6
|
+
execute: ({ params, args }) => handler({ text: String(params.text), to: args[0] != null ? String(args[0]) : undefined }),
|
|
7
|
+
});
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { defineCommand } from '@zhin.js/command';
|
|
2
|
+
import handler from '../../src/handlers/fuel-price.js';
|
|
3
|
+
|
|
4
|
+
export default defineCommand({
|
|
5
|
+
description: '今日油价',
|
|
6
|
+
execute: ({ params }) => handler({ province: params.province != null ? String(params.province) : undefined }),
|
|
7
|
+
});
|
package/commands/gold.ts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { defineCommand } from '@zhin.js/command';
|
|
2
|
+
import handler from '../../src/handlers/hitokoto.js';
|
|
3
|
+
|
|
4
|
+
export default defineCommand({
|
|
5
|
+
description: '随机一言',
|
|
6
|
+
execute: ({ params }) => handler({ type: params.type != null ? String(params.type) : undefined }),
|
|
7
|
+
});
|
package/commands/kfc.ts
ADDED
package/commands/moyu.ts
ADDED
package/lib/api.js
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 60s API 共享模块 — 供 *.tool.md handler 使用
|
|
3
|
+
*/
|
|
4
|
+
const API_BASE = process.env.ZHIN_60S_API || 'https://60s.viki.moe';
|
|
5
|
+
export async function fetchApi(endpoint, params) {
|
|
6
|
+
const url = new URL(`${API_BASE}/v2${endpoint}`);
|
|
7
|
+
if (params) {
|
|
8
|
+
Object.entries(params).forEach(([k, v]) => url.searchParams.set(k, v));
|
|
9
|
+
}
|
|
10
|
+
const res = await fetch(url.toString());
|
|
11
|
+
const data = (await res.json());
|
|
12
|
+
if (data.error)
|
|
13
|
+
throw new Error(data.error);
|
|
14
|
+
if (data.code !== undefined && data.code !== 200 && data.code !== 0) {
|
|
15
|
+
throw new Error(data.message || data.msg || `API 错误: ${data.code}`);
|
|
16
|
+
}
|
|
17
|
+
return (data.data ?? data);
|
|
18
|
+
}
|
|
19
|
+
/** Coerce nested API JSON objects for property access in handlers. */
|
|
20
|
+
export function asRecord(value) {
|
|
21
|
+
return value !== null && typeof value === 'object' && !Array.isArray(value)
|
|
22
|
+
? value
|
|
23
|
+
: {};
|
|
24
|
+
}
|
|
25
|
+
export function asString(value) {
|
|
26
|
+
return value == null ? '' : String(value);
|
|
27
|
+
}
|
|
28
|
+
export function asArray(value) {
|
|
29
|
+
return Array.isArray(value) ? value : [];
|
|
30
|
+
}
|
|
31
|
+
export function formatList(items, limit = 10) {
|
|
32
|
+
return items
|
|
33
|
+
.slice(0, limit)
|
|
34
|
+
.map((item, i) => {
|
|
35
|
+
const obj = typeof item === 'string' ? null : item;
|
|
36
|
+
const title = obj
|
|
37
|
+
? String(obj.title ?? obj.name ?? obj.word ?? item)
|
|
38
|
+
: item;
|
|
39
|
+
const hot = obj ? obj.hot_value ?? obj.hot : undefined;
|
|
40
|
+
const hotStr = hot ? ` 🔥${hot}` : '';
|
|
41
|
+
return `${i + 1}. ${title}${hotStr}`;
|
|
42
|
+
})
|
|
43
|
+
.join('\n');
|
|
44
|
+
}
|
|
45
|
+
//# sourceMappingURL=api.js.map
|
package/lib/api.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"api.js","sourceRoot":"","sources":["../src/api.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,MAAM,QAAQ,GAAG,OAAO,CAAC,GAAG,CAAC,YAAY,IAAI,sBAAsB,CAAC;AAOpE,MAAM,CAAC,KAAK,UAAU,QAAQ,CAC5B,QAAgB,EAChB,MAA+B;IAE/B,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,GAAG,QAAQ,MAAM,QAAQ,EAAE,CAAC,CAAC;IACjD,IAAI,MAAM,EAAE,CAAC;QACX,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,GAAG,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;IACzE,CAAC;IACD,MAAM,GAAG,GAAG,MAAM,KAA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,EAAE;QACf,MAAM,GAAG,GAAG,OAAO,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC;QACnD,MAAM,KAAK,GAAG,GAAG;YACf,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,KAAK,IAAI,GAAG,CAAC,IAAI,IAAI,GAAG,CAAC,IAAI,IAAI,IAAI,CAAC;YACnD,CAAC,CAAC,IAAI,CAAC;QACT,MAAM,GAAG,GAAG,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,SAAS,IAAI,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,SAAS,CAAC;QACvD,MAAM,MAAM,GAAG,GAAG,CAAC,CAAC,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QACtC,OAAO,GAAG,CAAC,GAAG,CAAC,KAAK,KAAK,GAAG,MAAM,EAAE,CAAC;IACvC,CAAC,CAAC;SACD,IAAI,CAAC,IAAI,CAAC,CAAC;AAChB,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { fetchApi } from '../api.js';
|
|
2
|
+
export default async function () {
|
|
3
|
+
const data = await fetchApi('/60s');
|
|
4
|
+
const lines = [`📰 今日60秒新闻 (${data.date || ''})`, ''];
|
|
5
|
+
if (data.news && Array.isArray(data.news)) {
|
|
6
|
+
lines.push(...data.news.map((n, i) => `${i + 1}. ${n}`));
|
|
7
|
+
}
|
|
8
|
+
if (data.tip)
|
|
9
|
+
lines.push('', `💡 ${data.tip}`);
|
|
10
|
+
return lines.join('\n');
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=60s-news.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"60s-news.js","sourceRoot":"","sources":["../../src/handlers/60s-news.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAErC,MAAM,CAAC,OAAO,CAAC,KAAK;IAClB,MAAM,IAAI,GAAG,MAAM,QAAQ,CAAC,MAAM,CAAC,CAAC;IACpC,MAAM,KAAK,GAAG,CAAC,eAAe,IAAI,CAAC,IAAI,IAAI,EAAE,GAAG,EAAE,EAAE,CAAC,CAAC;IACtD,IAAI,IAAI,CAAC,IAAI,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;QAC1C,KAAK,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAS,EAAE,CAAS,EAAE,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,CAAC;IAC3E,CAAC;IACD,IAAI,IAAI,CAAC,GAAG;QAAE,KAAK,CAAC,IAAI,CAAC,EAAE,EAAE,MAAM,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC;IAC/C,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC1B,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { asString, fetchApi } from '../api.js';
|
|
2
|
+
export default async function () {
|
|
3
|
+
const data = await fetchApi('/bing');
|
|
4
|
+
const lines = ['🖼️ Bing 每日壁纸', ''];
|
|
5
|
+
if (data.title)
|
|
6
|
+
lines.push(`📌 ${data.title}`);
|
|
7
|
+
if (data.headline)
|
|
8
|
+
lines.push(`💡 ${data.headline}`);
|
|
9
|
+
if (data.copyright)
|
|
10
|
+
lines.push(`📝 ${data.copyright}`);
|
|
11
|
+
if (data.description)
|
|
12
|
+
lines.push('', asString(data.description));
|
|
13
|
+
const imgUrl = data.cover || data.cover_4k || data.url || data.image;
|
|
14
|
+
if (imgUrl)
|
|
15
|
+
lines.push('', asString(imgUrl));
|
|
16
|
+
return lines.join('\n');
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=bing-image.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bing-image.js","sourceRoot":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MAAM,QAAQ,CAAa,SAAS,CAAC,CAAC;IACnD,OAAO,CAAC,SAAS,EAAE,EAAE,EAAE,UAAU,CAAC,IAAI,EAAE,IAAI,CAAC,KAAK,IAAI,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACxE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"duanzi.js","sourceRoot":"","sources":["../../src/handlers/duanzi.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAErC,MAAM,CAAC,OAAO,CAAC,KAAK;IAClB,MAAM,IAAI,GAAG,MAAM,QAAQ,CAAC,SAAS,CAAC,CAAC;IACvC,OAAO,YAAY,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,OAAO,IAAI,IAAI,CAAC,IAAI,IAAI,CAAC,OAAO,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC;AAC1G,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { asArray, asRecord, asString, fetchApi } from '../api.js';
|
|
2
|
+
export default async function (args) {
|
|
3
|
+
const params = {};
|
|
4
|
+
if (args.from)
|
|
5
|
+
params.from = args.from.toUpperCase();
|
|
6
|
+
if (args.to)
|
|
7
|
+
params.to = args.to.toUpperCase();
|
|
8
|
+
const data = await fetchApi('/exchange-rate', Object.keys(params).length ? params : undefined);
|
|
9
|
+
const lines = ['💱 汇率查询', ''];
|
|
10
|
+
const base = data.base_code || args.from || 'CNY';
|
|
11
|
+
lines.push(`基准货币: ${base}`);
|
|
12
|
+
if (data.updated)
|
|
13
|
+
lines.push(`更新时间: ${data.updated}`);
|
|
14
|
+
lines.push('');
|
|
15
|
+
const rates = asArray(data.rates);
|
|
16
|
+
const targetCurrencies = args.to
|
|
17
|
+
? [args.to.toUpperCase()]
|
|
18
|
+
: ['USD', 'EUR', 'JPY', 'GBP', 'HKD', 'KRW', 'AUD', 'CAD', 'SGD', 'CHF'];
|
|
19
|
+
rates.forEach((item) => {
|
|
20
|
+
const row = asRecord(item);
|
|
21
|
+
const currency = asString(row.currency);
|
|
22
|
+
if (targetCurrencies.includes(currency) && currency !== base) {
|
|
23
|
+
lines.push(`${base} → ${currency}: ${row.rate}`);
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
return lines.join('\n');
|
|
27
|
+
}
|
|
28
|
+
//# sourceMappingURL=exchange-rate.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"exchange-rate.js","sourceRoot":"","sources":["../../src/handlers/exchange-rate.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAElE,MAAM,CAAC,OAAO,CAAC,KAAK,WAAW,IAAoC;IACjE,MAAM,MAAM,GAA2B,EAAE,CAAC;IAC1C,IAAI,IAAI,CAAC,IAAI;QAAE,MAAM,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC;IACrD,IAAI,IAAI,CAAC,EAAE;QAAE,MAAM,CAAC,EAAE,GAAG,IAAI,CAAC,EAAE,CAAC,WAAW,EAAE,CAAC;IAC/C,MAAM,IAAI,GAAG,MAAM,QAAQ,CACzB,gBAAgB,EAChB,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,CAChD,CAAC;IACF,MAAM,KAAK,GAAG,CAAC,SAAS,EAAE,EAAE,CAAC,CAAC;IAC9B,MAAM,IAAI,GAAG,IAAI,CAAC,SAAS,IAAI,IAAI,CAAC,IAAI,IAAI,KAAK,CAAC;IAClD,KAAK,CAAC,IAAI,CAAC,SAAS,IAAI,EAAE,CAAC,CAAC;IAC5B,IAAI,IAAI,CAAC,OAAO;QAAE,KAAK,CAAC,IAAI,CAAC,SAAS,IAAI,CAAC,OAAO,EAAE,CAAC,CAAC;IACtD,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACf,MAAM,KAAK,GAAG,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAClC,MAAM,gBAAgB,GAAG,IAAI,CAAC,EAAE;QAC9B,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,WAAW,EAAE,CAAC;QACzB,CAAC,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC;IAC3E,KAAK,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE;QACrB,MAAM,GAAG,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC;QAC3B,MAAM,QAAQ,GAAG,QAAQ,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;QACxC,IAAI,gBAAgB,CAAC,QAAQ,CAAC,QAAQ,CAAC,IAAI,QAAQ,KAAK,IAAI,EAAE,CAAC;YAC7D,KAAK,CAAC,IAAI,CAAC,GAAG,IAAI,MAAM,QAAQ,KAAK,GAAG,CAAC,IAAI,EAAE,CAAC,CAAC;QACnD,CAAC;IACH,CAAC,CAAC,CAAC;IACH,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC1B,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { asRecord, asString, fetchApi } from '../api.js';
|
|
2
|
+
export default async function (args) {
|
|
3
|
+
const params = args.province
|
|
4
|
+
? { province: args.province }
|
|
5
|
+
: undefined;
|
|
6
|
+
const data = await fetchApi('/fuel-price', params);
|
|
7
|
+
const lines = ['⛽ 今日油价', ''];
|
|
8
|
+
if (data.region)
|
|
9
|
+
lines.push(`📍 ${data.region}`);
|
|
10
|
+
if (data.items && Array.isArray(data.items)) {
|
|
11
|
+
data.items.forEach((item) => {
|
|
12
|
+
lines.push(`${item.name}: ${item.price_desc || `¥${item.price}/升`}`);
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
if (data.trend) {
|
|
16
|
+
const trend = asRecord(data.trend);
|
|
17
|
+
lines.push('', `📊 ${asString(trend.description)}`);
|
|
18
|
+
}
|
|
19
|
+
return lines.join('\n');
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=fuel-price.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fuel-price.js","sourceRoot":"","sources":["../../src/handlers/fuel-price.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAEzD,MAAM,CAAC,OAAO,CAAC,KAAK,WAAW,IAA2B;IACxD,MAAM,MAAM,GAAuC,IAAI,CAAC,QAAQ;QAC9D,CAAC,CAAC,EAAE,QAAQ,EAAE,IAAI,CAAC,QAAQ,EAAE;QAC7B,CAAC,CAAC,SAAS,CAAC;IACd,MAAM,IAAI,GAAG,MAAM,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC,CAAC;IACnD,MAAM,KAAK,GAAG,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC;IAC7B,IAAI,IAAI,CAAC,MAAM;QAAE,KAAK,CAAC,IAAI,CAAC,MAAM,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC;IACjD,IAAI,IAAI,CAAC,KAAK,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;QAC5C,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,IAA6B,EAAE,EAAE;YACnD,KAAK,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,IAAI,KAAK,IAAI,CAAC,UAAU,IAAI,IAAI,IAAI,CAAC,KAAK,IAAI,EAAE,CAAC,CAAC;QACvE,CAAC,CAAC,CAAC;IACL,CAAC;IACD,IAAI,IAAI,CAAC,KAAK,EAAE,CAAC;QACf,MAAM,KAAK,GAAG,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QACnC,KAAK,CAAC,IAAI,CAAC,EAAE,EAAE,MAAM,QAAQ,CAAC,KAAK,CAAC,WAAW,CAAC,EAAE,CAAC,CAAC;IACtD,CAAC;IACD,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC1B,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { asArray, asRecord, fetchApi } from '../api.js';
|
|
2
|
+
export default async function () {
|
|
3
|
+
const data = await fetchApi('/gold-price');
|
|
4
|
+
const lines = ['💰 今日金价', ''];
|
|
5
|
+
if (data.date)
|
|
6
|
+
lines.push(`📅 ${data.date}`);
|
|
7
|
+
const metals = asArray(data.metals);
|
|
8
|
+
if (metals.length > 0) {
|
|
9
|
+
lines.push('');
|
|
10
|
+
metals.forEach((item) => {
|
|
11
|
+
const row = asRecord(item);
|
|
12
|
+
const name = row.name || '黄金';
|
|
13
|
+
const price = row.today_price || row.sell_price || row.price || 'N/A';
|
|
14
|
+
const unit = row.unit || '元/克';
|
|
15
|
+
if (price !== 'N/A')
|
|
16
|
+
lines.push(`${name}: ¥${price} ${unit}`);
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
else if (data.price) {
|
|
20
|
+
lines.push(`当前金价: ¥${data.price}/克`);
|
|
21
|
+
}
|
|
22
|
+
return lines.join('\n');
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=gold-price.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gold-price.js","sourceRoot":"","sources":["../../src/handlers/gold-price.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAExD,MAAM,CAAC,OAAO,CAAC,KAAK;IAClB,MAAM,IAAI,GAAG,MAAM,QAAQ,CAA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