@zhin.js/plugin-60s 3.0.1 → 3.0.2
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/lib/agent/tools/60s_news.js +13 -0
- package/lib/agent/tools/60s_news.js.map +1 -0
- package/lib/agent/tools/bing_image.js +13 -0
- package/lib/agent/tools/bing_image.js.map +1 -0
- package/lib/agent/tools/douyin_hot.js +13 -0
- package/lib/agent/tools/douyin_hot.js.map +1 -0
- package/lib/agent/tools/duanzi.js +13 -0
- package/lib/agent/tools/duanzi.js.map +1 -0
- package/lib/agent/tools/exchange_rate.js +13 -0
- package/lib/agent/tools/exchange_rate.js.map +1 -0
- package/lib/agent/tools/fuel_price.js +13 -0
- package/lib/agent/tools/fuel_price.js.map +1 -0
- package/lib/agent/tools/gold_price.js +13 -0
- package/lib/agent/tools/gold_price.js.map +1 -0
- package/lib/agent/tools/history_today.js +13 -0
- package/lib/agent/tools/history_today.js.map +1 -0
- package/lib/agent/tools/hitokoto.js +13 -0
- package/lib/agent/tools/hitokoto.js.map +1 -0
- package/lib/agent/tools/ip_query.js +13 -0
- package/lib/agent/tools/ip_query.js.map +1 -0
- package/lib/agent/tools/kfc.js +13 -0
- package/lib/agent/tools/kfc.js.map +1 -0
- package/lib/agent/tools/moyu.js +13 -0
- package/lib/agent/tools/moyu.js.map +1 -0
- package/lib/agent/tools/toutiao_hot.js +13 -0
- package/lib/agent/tools/toutiao_hot.js.map +1 -0
- package/lib/agent/tools/translate_60s.js +13 -0
- package/lib/agent/tools/translate_60s.js.map +1 -0
- package/lib/agent/tools/weather.js +13 -0
- package/lib/agent/tools/weather.js.map +1 -0
- package/lib/agent/tools/weibo_hot.js +13 -0
- package/lib/agent/tools/weibo_hot.js.map +1 -0
- package/lib/agent/tools/zhihu_hot.js +13 -0
- package/lib/agent/tools/zhihu_hot.js.map +1 -0
- package/lib/{index.js → src/index.js} +1 -1
- package/lib/src/index.js.map +1 -0
- package/lib/tools/60s-news/handler.js +12 -0
- package/lib/tools/60s-news/handler.js.map +1 -0
- package/lib/tools/api.js +45 -0
- package/lib/tools/api.js.map +1 -0
- package/lib/tools/bing-image/handler.js +18 -0
- package/lib/tools/bing-image/handler.js.map +1 -0
- package/lib/tools/douyin-hot/handler.js +6 -0
- package/lib/tools/douyin-hot/handler.js.map +1 -0
- package/lib/tools/duanzi/handler.js +6 -0
- package/lib/tools/duanzi/handler.js.map +1 -0
- package/lib/tools/exchange-rate/handler.js +28 -0
- package/lib/tools/exchange-rate/handler.js.map +1 -0
- package/lib/tools/fuel-price/handler.js +21 -0
- package/lib/tools/fuel-price/handler.js.map +1 -0
- package/lib/tools/gold-price/handler.js +24 -0
- package/lib/tools/gold-price/handler.js.map +1 -0
- package/lib/tools/history-today/handler.js +16 -0
- package/lib/tools/history-today/handler.js.map +1 -0
- package/lib/tools/hitokoto/handler.js +16 -0
- package/lib/tools/hitokoto/handler.js.map +1 -0
- package/lib/tools/ip-query/handler.js +17 -0
- package/lib/tools/ip-query/handler.js.map +1 -0
- package/lib/tools/kfc/handler.js +6 -0
- package/lib/tools/kfc/handler.js.map +1 -0
- package/lib/tools/moyu/handler.js +39 -0
- package/lib/tools/moyu/handler.js.map +1 -0
- package/lib/tools/toutiao-hot/handler.js +6 -0
- package/lib/tools/toutiao-hot/handler.js.map +1 -0
- package/lib/tools/translate/handler.js +26 -0
- package/lib/tools/translate/handler.js.map +1 -0
- package/lib/tools/weather/handler.js +22 -0
- package/lib/tools/weather/handler.js.map +1 -0
- package/lib/tools/weibo-hot/handler.js +6 -0
- package/lib/tools/weibo-hot/handler.js.map +1 -0
- package/lib/tools/zhihu-hot/handler.js +6 -0
- package/lib/tools/zhihu-hot/handler.js.map +1 -0
- package/package.json +19 -9
- package/src/index.ts +1 -1
- package/tools/60s-news/handler.ts +1 -1
- package/tools/api.ts +35 -6
- package/tools/bing-image/handler.ts +4 -4
- package/tools/douyin-hot/handler.ts +2 -2
- package/tools/duanzi/handler.ts +1 -1
- package/tools/exchange-rate/handler.ts +8 -6
- package/tools/fuel-price/handler.ts +5 -4
- package/tools/gold-price/handler.ts +8 -7
- package/tools/history-today/handler.ts +8 -7
- package/tools/hitokoto/handler.ts +1 -1
- package/tools/ip-query/handler.ts +1 -1
- package/tools/kfc/handler.ts +1 -1
- package/tools/moyu/handler.ts +23 -16
- package/tools/toutiao-hot/handler.ts +2 -2
- package/tools/translate/handler.ts +13 -7
- package/tools/weather/handler.ts +13 -13
- package/tools/weibo-hot/handler.ts +2 -2
- package/tools/zhihu-hot/handler.ts +2 -2
- package/lib/index.d.ts +0 -2
- package/lib/index.d.ts.map +0 -1
- package/lib/index.js.map +0 -1
- package/tools/60s-news/60s-news.tool.md +0 -8
- 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/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/moyu.tool.md +0 -8
- package/tools/toutiao-hot/toutiao-hot.tool.md +0 -12
- package/tools/translate/translate.tool.md +0 -15
- 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 { defineTool } from '@zhin.js/agent/tools';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
|
|
4
|
+
export default defineTool({
|
|
5
|
+
description: "获取每日60秒新闻,快速了解今日要闻",
|
|
6
|
+
inputSchema: z.object({}),
|
|
7
|
+
keywords: ["60s", "新闻", "今日新闻", "60秒", "每日新闻", "读懂世界"],
|
|
8
|
+
tags: ["新闻", "资讯", "60s"],
|
|
9
|
+
async execute() {
|
|
10
|
+
const handler = (await import('../../tools/60s-news/handler.js')).default;
|
|
11
|
+
return handler();
|
|
12
|
+
},
|
|
13
|
+
});
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { defineTool } from '@zhin.js/agent/tools';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
|
|
4
|
+
export default defineTool({
|
|
5
|
+
description: "获取 Bing 每日壁纸图片",
|
|
6
|
+
inputSchema: z.object({}),
|
|
7
|
+
keywords: ["bing", "必应", "壁纸", "每日壁纸"],
|
|
8
|
+
tags: ["图片", "壁纸", "Bing"],
|
|
9
|
+
async execute() {
|
|
10
|
+
const handler = (await import('../../tools/bing-image/handler.js')).default;
|
|
11
|
+
return handler();
|
|
12
|
+
},
|
|
13
|
+
});
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { defineTool } from '@zhin.js/agent/tools';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
|
|
4
|
+
export default defineTool<{ 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('../../tools/douyin-hot/handler.js')).default;
|
|
11
|
+
return handler(input);
|
|
12
|
+
},
|
|
13
|
+
});
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { defineTool } from '@zhin.js/agent/tools';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
|
|
4
|
+
export default defineTool({
|
|
5
|
+
description: "获取一个段子",
|
|
6
|
+
inputSchema: z.object({}),
|
|
7
|
+
keywords: ["段子", "笑话", "搞笑", "joke", "duanzi"],
|
|
8
|
+
tags: ["娱乐", "笑话", "段子"],
|
|
9
|
+
async execute() {
|
|
10
|
+
const handler = (await import('../../tools/duanzi/handler.js')).default;
|
|
11
|
+
return handler();
|
|
12
|
+
},
|
|
13
|
+
});
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { defineTool } from '@zhin.js/agent/tools';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
|
|
4
|
+
export default defineTool<{ 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('../../tools/exchange-rate/handler.js')).default;
|
|
11
|
+
return handler(input);
|
|
12
|
+
},
|
|
13
|
+
});
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { defineTool } from '@zhin.js/agent/tools';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
|
|
4
|
+
export default defineTool<{ 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('../../tools/fuel-price/handler.js')).default;
|
|
11
|
+
return handler(input);
|
|
12
|
+
},
|
|
13
|
+
});
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { defineTool } from '@zhin.js/agent/tools';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
|
|
4
|
+
export default defineTool({
|
|
5
|
+
description: "查询今日黄金价格",
|
|
6
|
+
inputSchema: z.object({}),
|
|
7
|
+
keywords: ["金价", "黄金", "黄金价格", "gold"],
|
|
8
|
+
tags: ["金融", "黄金", "价格"],
|
|
9
|
+
async execute() {
|
|
10
|
+
const handler = (await import('../../tools/gold-price/handler.js')).default;
|
|
11
|
+
return handler();
|
|
12
|
+
},
|
|
13
|
+
});
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { defineTool } from '@zhin.js/agent/tools';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
|
|
4
|
+
export default defineTool({
|
|
5
|
+
description: "查看历史上的今天发生了什么",
|
|
6
|
+
inputSchema: z.object({}),
|
|
7
|
+
keywords: ["历史", "历史上的今天", "今天历史", "history"],
|
|
8
|
+
tags: ["历史", "知识", "日历"],
|
|
9
|
+
async execute() {
|
|
10
|
+
const handler = (await import('../../tools/history-today/handler.js')).default;
|
|
11
|
+
return handler();
|
|
12
|
+
},
|
|
13
|
+
});
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { defineTool } from '@zhin.js/agent/tools';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
|
|
4
|
+
export default defineTool<{ 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('../../tools/hitokoto/handler.js')).default;
|
|
11
|
+
return handler(input);
|
|
12
|
+
},
|
|
13
|
+
});
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { defineTool } from '@zhin.js/agent/tools';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
|
|
4
|
+
export default defineTool<{ 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('../../tools/ip-query/handler.js')).default;
|
|
11
|
+
return handler(input);
|
|
12
|
+
},
|
|
13
|
+
});
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { defineTool } from '@zhin.js/agent/tools';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
|
|
4
|
+
export default defineTool({
|
|
5
|
+
description: "获取 KFC 疯狂星期四文案",
|
|
6
|
+
inputSchema: z.object({}),
|
|
7
|
+
keywords: ["kfc", "KFC", "疯狂星期四", "v50", "肯德基"],
|
|
8
|
+
tags: ["娱乐", "KFC", "文案"],
|
|
9
|
+
async execute() {
|
|
10
|
+
const handler = (await import('../../tools/kfc/handler.js')).default;
|
|
11
|
+
return handler();
|
|
12
|
+
},
|
|
13
|
+
});
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { defineTool } from '@zhin.js/agent/tools';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
|
|
4
|
+
export default defineTool({
|
|
5
|
+
description: "获取摸鱼日历,查看今天适不适合摸鱼",
|
|
6
|
+
inputSchema: z.object({}),
|
|
7
|
+
keywords: ["摸鱼", "摸鱼日历", "moyu"],
|
|
8
|
+
tags: ["生活", "摸鱼", "日历"],
|
|
9
|
+
async execute() {
|
|
10
|
+
const handler = (await import('../../tools/moyu/handler.js')).default;
|
|
11
|
+
return handler();
|
|
12
|
+
},
|
|
13
|
+
});
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { defineTool } from '@zhin.js/agent/tools';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
|
|
4
|
+
export default defineTool<{ 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('../../tools/toutiao-hot/handler.js')).default;
|
|
11
|
+
return handler(input);
|
|
12
|
+
},
|
|
13
|
+
});
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { defineTool } from '@zhin.js/agent/tools';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
|
|
4
|
+
export default defineTool<{ 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('../../tools/translate/handler.js')).default;
|
|
11
|
+
return handler(input);
|
|
12
|
+
},
|
|
13
|
+
});
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { defineTool } from '@zhin.js/agent/tools';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
|
|
4
|
+
export default defineTool<{ 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('../../tools/weather/handler.js')).default;
|
|
11
|
+
return handler(input);
|
|
12
|
+
},
|
|
13
|
+
});
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { defineTool } from '@zhin.js/agent/tools';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
|
|
4
|
+
export default defineTool<{ 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('../../tools/weibo-hot/handler.js')).default;
|
|
11
|
+
return handler(input);
|
|
12
|
+
},
|
|
13
|
+
});
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { defineTool } from '@zhin.js/agent/tools';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
|
|
4
|
+
export default defineTool<{ 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('../../tools/zhihu-hot/handler.js')).default;
|
|
11
|
+
return handler(input);
|
|
12
|
+
},
|
|
13
|
+
});
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { defineTool } from '@zhin.js/agent/tools';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
export default defineTool({
|
|
4
|
+
description: "获取每日60秒新闻,快速了解今日要闻",
|
|
5
|
+
inputSchema: z.object({}),
|
|
6
|
+
keywords: ["60s", "新闻", "今日新闻", "60秒", "每日新闻", "读懂世界"],
|
|
7
|
+
tags: ["新闻", "资讯", "60s"],
|
|
8
|
+
async execute() {
|
|
9
|
+
const handler = (await import('../../tools/60s-news/handler.js')).default;
|
|
10
|
+
return handler();
|
|
11
|
+
},
|
|
12
|
+
});
|
|
13
|
+
//# sourceMappingURL=60s_news.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"60s_news.js","sourceRoot":"","sources":["../../../agent/tools/60s_news.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAe,UAAU,CAAC;IACxB,WAAW,EAAE,oBAAoB;IACjC,WAAW,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC;IACzB,QAAQ,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,CAAC;IACtD,IAAI,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,KAAK,CAAC;IACzB,KAAK,CAAC,OAAO;QACX,MAAM,OAAO,GAAG,CAAC,MAAM,MAAM,CAAC,iCAAiC,CAAC,CAAC,CAAC,OAAO,CAAC;QAC1E,OAAO,OAAO,EAAE,CAAC;IACnB,CAAC;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { defineTool } from '@zhin.js/agent/tools';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
export default defineTool({
|
|
4
|
+
description: "获取 Bing 每日壁纸图片",
|
|
5
|
+
inputSchema: z.object({}),
|
|
6
|
+
keywords: ["bing", "必应", "壁纸", "每日壁纸"],
|
|
7
|
+
tags: ["图片", "壁纸", "Bing"],
|
|
8
|
+
async execute() {
|
|
9
|
+
const handler = (await import('../../tools/bing-image/handler.js')).default;
|
|
10
|
+
return handler();
|
|
11
|
+
},
|
|
12
|
+
});
|
|
13
|
+
//# sourceMappingURL=bing_image.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bing_image.js","sourceRoot":"","sources":["../../../agent/tools/bing_image.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAe,UAAU,CAAC;IACxB,WAAW,EAAE,gBAAgB;IAC7B,WAAW,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC;IACzB,QAAQ,EAAE,CAAC,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,CAAC;IACtC,IAAI,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,CAAC;IAC1B,KAAK,CAAC,OAAO;QACX,MAAM,OAAO,GAAG,CAAC,MAAM,MAAM,CAAC,mCAAmC,CAAC,CAAC,CAAC,OAAO,CAAC;QAC5E,OAAO,OAAO,EAAE,CAAC;IACnB,CAAC;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { defineTool } from '@zhin.js/agent/tools';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
export default defineTool({
|
|
4
|
+
description: "获取抖音热搜榜",
|
|
5
|
+
inputSchema: z.object({ limit: z.number().optional() }),
|
|
6
|
+
keywords: ["抖音", "热搜", "douyin", "dy"],
|
|
7
|
+
tags: ["热搜", "短视频", "抖音"],
|
|
8
|
+
async execute(input) {
|
|
9
|
+
const handler = (await import('../../tools/douyin-hot/handler.js')).default;
|
|
10
|
+
return handler(input);
|
|
11
|
+
},
|
|
12
|
+
});
|
|
13
|
+
//# sourceMappingURL=douyin_hot.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"douyin_hot.js","sourceRoot":"","sources":["../../../agent/tools/douyin_hot.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAe,UAAU,CAAqB;IAC5C,WAAW,EAAE,SAAS;IACtB,WAAW,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,EAAE,CAAC;IACvD,QAAQ,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,CAAC;IACtC,IAAI,EAAE,CAAC,IAAI,EAAE,KAAK,EAAE,IAAI,CAAC;IACzB,KAAK,CAAC,OAAO,CAAC,KAAK;QACjB,MAAM,OAAO,GAAG,CAAC,MAAM,MAAM,CAAC,mCAAmC,CAAC,CAAC,CAAC,OAAO,CAAC;QAC5E,OAAO,OAAO,CAAC,KAAK,CAAC,CAAC;IACxB,CAAC;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { defineTool } from '@zhin.js/agent/tools';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
export default defineTool({
|
|
4
|
+
description: "获取一个段子",
|
|
5
|
+
inputSchema: z.object({}),
|
|
6
|
+
keywords: ["段子", "笑话", "搞笑", "joke", "duanzi"],
|
|
7
|
+
tags: ["娱乐", "笑话", "段子"],
|
|
8
|
+
async execute() {
|
|
9
|
+
const handler = (await import('../../tools/duanzi/handler.js')).default;
|
|
10
|
+
return handler();
|
|
11
|
+
},
|
|
12
|
+
});
|
|
13
|
+
//# sourceMappingURL=duanzi.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"duanzi.js","sourceRoot":"","sources":["../../../agent/tools/duanzi.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAe,UAAU,CAAC;IACxB,WAAW,EAAE,QAAQ;IACrB,WAAW,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC;IACzB,QAAQ,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,CAAC;IAC9C,IAAI,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC;IACxB,KAAK,CAAC,OAAO;QACX,MAAM,OAAO,GAAG,CAAC,MAAM,MAAM,CAAC,+BAA+B,CAAC,CAAC,CAAC,OAAO,CAAC;QACxE,OAAO,OAAO,EAAE,CAAC;IACnB,CAAC;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { defineTool } from '@zhin.js/agent/tools';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
export default defineTool({
|
|
4
|
+
description: "查询货币汇率",
|
|
5
|
+
inputSchema: z.object({ from: z.string().optional(), to: z.string().optional() }),
|
|
6
|
+
keywords: ["汇率", "兑换", "外汇", "exchange", "rate"],
|
|
7
|
+
tags: ["金融", "汇率", "查询"],
|
|
8
|
+
async execute(input) {
|
|
9
|
+
const handler = (await import('../../tools/exchange-rate/handler.js')).default;
|
|
10
|
+
return handler(input);
|
|
11
|
+
},
|
|
12
|
+
});
|
|
13
|
+
//# sourceMappingURL=exchange_rate.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"exchange_rate.js","sourceRoot":"","sources":["../../../agent/tools/exchange_rate.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAe,UAAU,CAAiC;IACxD,WAAW,EAAE,QAAQ;IACrB,WAAW,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,EAAE,CAAC;IACjF,QAAQ,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,CAAC;IAChD,IAAI,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC;IACxB,KAAK,CAAC,OAAO,CAAC,KAAK;QACjB,MAAM,OAAO,GAAG,CAAC,MAAM,MAAM,CAAC,sCAAsC,CAAC,CAAC,CAAC,OAAO,CAAC;QAC/E,OAAO,OAAO,CAAC,KAAK,CAAC,CAAC;IACxB,CAAC;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { defineTool } from '@zhin.js/agent/tools';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
export default defineTool({
|
|
4
|
+
description: "查询今日油价",
|
|
5
|
+
inputSchema: z.object({ province: z.string().optional() }),
|
|
6
|
+
keywords: ["油价", "汽油", "柴油", "fuel"],
|
|
7
|
+
tags: ["生活", "油价", "价格"],
|
|
8
|
+
async execute(input) {
|
|
9
|
+
const handler = (await import('../../tools/fuel-price/handler.js')).default;
|
|
10
|
+
return handler(input);
|
|
11
|
+
},
|
|
12
|
+
});
|
|
13
|
+
//# sourceMappingURL=fuel_price.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fuel_price.js","sourceRoot":"","sources":["../../../agent/tools/fuel_price.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAe,UAAU,CAAwB;IAC/C,WAAW,EAAE,QAAQ;IACrB,WAAW,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,EAAE,CAAC;IAC1D,QAAQ,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,CAAC;IACpC,IAAI,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC;IACxB,KAAK,CAAC,OAAO,CAAC,KAAK;QACjB,MAAM,OAAO,GAAG,CAAC,MAAM,MAAM,CAAC,mCAAmC,CAAC,CAAC,CAAC,OAAO,CAAC;QAC5E,OAAO,OAAO,CAAC,KAAK,CAAC,CAAC;IACxB,CAAC;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { defineTool } from '@zhin.js/agent/tools';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
export default defineTool({
|
|
4
|
+
description: "查询今日黄金价格",
|
|
5
|
+
inputSchema: z.object({}),
|
|
6
|
+
keywords: ["金价", "黄金", "黄金价格", "gold"],
|
|
7
|
+
tags: ["金融", "黄金", "价格"],
|
|
8
|
+
async execute() {
|
|
9
|
+
const handler = (await import('../../tools/gold-price/handler.js')).default;
|
|
10
|
+
return handler();
|
|
11
|
+
},
|
|
12
|
+
});
|
|
13
|
+
//# sourceMappingURL=gold_price.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gold_price.js","sourceRoot":"","sources":["../../../agent/tools/gold_price.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAe,UAAU,CAAC;IACxB,WAAW,EAAE,UAAU;IACvB,WAAW,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC;IACzB,QAAQ,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,CAAC;IACtC,IAAI,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC;IACxB,KAAK,CAAC,OAAO;QACX,MAAM,OAAO,GAAG,CAAC,MAAM,MAAM,CAAC,mCAAmC,CAAC,CAAC,CAAC,OAAO,CAAC;QAC5E,OAAO,OAAO,EAAE,CAAC;IACnB,CAAC;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { defineTool } from '@zhin.js/agent/tools';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
export default defineTool({
|
|
4
|
+
description: "查看历史上的今天发生了什么",
|
|
5
|
+
inputSchema: z.object({}),
|
|
6
|
+
keywords: ["历史", "历史上的今天", "今天历史", "history"],
|
|
7
|
+
tags: ["历史", "知识", "日历"],
|
|
8
|
+
async execute() {
|
|
9
|
+
const handler = (await import('../../tools/history-today/handler.js')).default;
|
|
10
|
+
return handler();
|
|
11
|
+
},
|
|
12
|
+
});
|
|
13
|
+
//# sourceMappingURL=history_today.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"history_today.js","sourceRoot":"","sources":["../../../agent/tools/history_today.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAe,UAAU,CAAC;IACxB,WAAW,EAAE,eAAe;IAC5B,WAAW,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC;IACzB,QAAQ,EAAE,CAAC,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,SAAS,CAAC;IAC7C,IAAI,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC;IACxB,KAAK,CAAC,OAAO;QACX,MAAM,OAAO,GAAG,CAAC,MAAM,MAAM,CAAC,sCAAsC,CAAC,CAAC,CAAC,OAAO,CAAC;QAC/E,OAAO,OAAO,EAAE,CAAC;IACnB,CAAC;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { defineTool } from '@zhin.js/agent/tools';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
export default defineTool({
|
|
4
|
+
description: "获取一言/每日一句,随机返回一条语句",
|
|
5
|
+
inputSchema: z.object({ type: z.string().optional() }),
|
|
6
|
+
keywords: ["一言", "每日一句", "语录", "名言", "hitokoto"],
|
|
7
|
+
tags: ["语录", "文学", "随机"],
|
|
8
|
+
async execute(input) {
|
|
9
|
+
const handler = (await import('../../tools/hitokoto/handler.js')).default;
|
|
10
|
+
return handler(input);
|
|
11
|
+
},
|
|
12
|
+
});
|
|
13
|
+
//# sourceMappingURL=hitokoto.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hitokoto.js","sourceRoot":"","sources":["../../../agent/tools/hitokoto.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAe,UAAU,CAAoB;IAC3C,WAAW,EAAE,oBAAoB;IACjC,WAAW,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,EAAE,CAAC;IACtD,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,UAAU,CAAC;IAChD,IAAI,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC;IACxB,KAAK,CAAC,OAAO,CAAC,KAAK;QACjB,MAAM,OAAO,GAAG,CAAC,MAAM,MAAM,CAAC,iCAAiC,CAAC,CAAC,CAAC,OAAO,CAAC;QAC1E,OAAO,OAAO,CAAC,KAAK,CAAC,CAAC;IACxB,CAAC;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { defineTool } from '@zhin.js/agent/tools';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
export default defineTool({
|
|
4
|
+
description: "查询 IP 地址的地理位置信息",
|
|
5
|
+
inputSchema: z.object({ ip: z.string().optional() }),
|
|
6
|
+
keywords: ["ip", "IP", "IP查询", "ip查询"],
|
|
7
|
+
tags: ["网络", "查询", "IP"],
|
|
8
|
+
async execute(input) {
|
|
9
|
+
const handler = (await import('../../tools/ip-query/handler.js')).default;
|
|
10
|
+
return handler(input);
|
|
11
|
+
},
|
|
12
|
+
});
|
|
13
|
+
//# sourceMappingURL=ip_query.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ip_query.js","sourceRoot":"","sources":["../../../agent/tools/ip_query.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAe,UAAU,CAAkB;IACzC,WAAW,EAAE,iBAAiB;IAC9B,WAAW,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,EAAE,CAAC;IACpD,QAAQ,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,CAAC;IACtC,IAAI,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC;IACxB,KAAK,CAAC,OAAO,CAAC,KAAK;QACjB,MAAM,OAAO,GAAG,CAAC,MAAM,MAAM,CAAC,iCAAiC,CAAC,CAAC,CAAC,OAAO,CAAC;QAC1E,OAAO,OAAO,CAAC,KAAK,CAAC,CAAC;IACxB,CAAC;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { defineTool } from '@zhin.js/agent/tools';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
export default defineTool({
|
|
4
|
+
description: "获取 KFC 疯狂星期四文案",
|
|
5
|
+
inputSchema: z.object({}),
|
|
6
|
+
keywords: ["kfc", "KFC", "疯狂星期四", "v50", "肯德基"],
|
|
7
|
+
tags: ["娱乐", "KFC", "文案"],
|
|
8
|
+
async execute() {
|
|
9
|
+
const handler = (await import('../../tools/kfc/handler.js')).default;
|
|
10
|
+
return handler();
|
|
11
|
+
},
|
|
12
|
+
});
|
|
13
|
+
//# sourceMappingURL=kfc.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"kfc.js","sourceRoot":"","sources":["../../../agent/tools/kfc.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAe,UAAU,CAAC;IACxB,WAAW,EAAE,gBAAgB;IAC7B,WAAW,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC;IACzB,QAAQ,EAAE,CAAC,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,CAAC;IAC/C,IAAI,EAAE,CAAC,IAAI,EAAE,KAAK,EAAE,IAAI,CAAC;IACzB,KAAK,CAAC,OAAO;QACX,MAAM,OAAO,GAAG,CAAC,MAAM,MAAM,CAAC,4BAA4B,CAAC,CAAC,CAAC,OAAO,CAAC;QACrE,OAAO,OAAO,EAAE,CAAC;IACnB,CAAC;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { defineTool } from '@zhin.js/agent/tools';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
export default defineTool({
|
|
4
|
+
description: "获取摸鱼日历,查看今天适不适合摸鱼",
|
|
5
|
+
inputSchema: z.object({}),
|
|
6
|
+
keywords: ["摸鱼", "摸鱼日历", "moyu"],
|
|
7
|
+
tags: ["生活", "摸鱼", "日历"],
|
|
8
|
+
async execute() {
|
|
9
|
+
const handler = (await import('../../tools/moyu/handler.js')).default;
|
|
10
|
+
return handler();
|
|
11
|
+
},
|
|
12
|
+
});
|
|
13
|
+
//# sourceMappingURL=moyu.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"moyu.js","sourceRoot":"","sources":["../../../agent/tools/moyu.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAe,UAAU,CAAC;IACxB,WAAW,EAAE,mBAAmB;IAChC,WAAW,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC;IACzB,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,CAAC;IAChC,IAAI,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC;IACxB,KAAK,CAAC,OAAO;QACX,MAAM,OAAO,GAAG,CAAC,MAAM,MAAM,CAAC,6BAA6B,CAAC,CAAC,CAAC,OAAO,CAAC;QACtE,OAAO,OAAO,EAAE,CAAC;IACnB,CAAC;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { defineTool } from '@zhin.js/agent/tools';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
export default defineTool({
|
|
4
|
+
description: "获取今日头条热搜榜",
|
|
5
|
+
inputSchema: z.object({ limit: z.number().optional() }),
|
|
6
|
+
keywords: ["头条", "今日头条", "热搜", "toutiao", "tt"],
|
|
7
|
+
tags: ["热搜", "资讯", "头条"],
|
|
8
|
+
async execute(input) {
|
|
9
|
+
const handler = (await import('../../tools/toutiao-hot/handler.js')).default;
|
|
10
|
+
return handler(input);
|
|
11
|
+
},
|
|
12
|
+
});
|
|
13
|
+
//# sourceMappingURL=toutiao_hot.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toutiao_hot.js","sourceRoot":"","sources":["../../../agent/tools/toutiao_hot.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAe,UAAU,CAAqB;IAC5C,WAAW,EAAE,WAAW;IACxB,WAAW,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,EAAE,CAAC;IACvD,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,CAAC;IAC/C,IAAI,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC;IACxB,KAAK,CAAC,OAAO,CAAC,KAAK;QACjB,MAAM,OAAO,GAAG,CAAC,MAAM,MAAM,CAAC,oCAAoC,CAAC,CAAC,CAAC,OAAO,CAAC;QAC7E,OAAO,OAAO,CAAC,KAAK,CAAC,CAAC;IACxB,CAAC;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { defineTool } from '@zhin.js/agent/tools';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
export default defineTool({
|
|
4
|
+
description: "翻译文本",
|
|
5
|
+
inputSchema: z.object({ text: z.string().min(1), to: z.string().optional() }),
|
|
6
|
+
keywords: ["翻译", "英文", "中文", "日文", "translate", "译"],
|
|
7
|
+
tags: ["工具", "翻译", "语言"],
|
|
8
|
+
async execute(input) {
|
|
9
|
+
const handler = (await import('../../tools/translate/handler.js')).default;
|
|
10
|
+
return handler(input);
|
|
11
|
+
},
|
|
12
|
+
});
|
|
13
|
+
//# sourceMappingURL=translate_60s.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"translate_60s.js","sourceRoot":"","sources":["../../../agent/tools/translate_60s.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAe,UAAU,CAAgC;IACvD,WAAW,EAAE,MAAM;IACnB,WAAW,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,EAAE,CAAC;IAC7E,QAAQ,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,WAAW,EAAE,GAAG,CAAC;IACpD,IAAI,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC;IACxB,KAAK,CAAC,OAAO,CAAC,KAAK;QACjB,MAAM,OAAO,GAAG,CAAC,MAAM,MAAM,CAAC,kCAAkC,CAAC,CAAC,CAAC,OAAO,CAAC;QAC3E,OAAO,OAAO,CAAC,KAAK,CAAC,CAAC;IACxB,CAAC;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { defineTool } from '@zhin.js/agent/tools';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
export default defineTool({
|
|
4
|
+
description: "查询指定城市的当前天气信息",
|
|
5
|
+
inputSchema: z.object({ city: z.string() }),
|
|
6
|
+
keywords: ["天气", "气温", "温度", "下雨", "晴天", "阴天", "weather"],
|
|
7
|
+
tags: ["天气", "生活", "查询"],
|
|
8
|
+
async execute(input) {
|
|
9
|
+
const handler = (await import('../../tools/weather/handler.js')).default;
|
|
10
|
+
return handler(input);
|
|
11
|
+
},
|
|
12
|
+
});
|
|
13
|
+
//# sourceMappingURL=weather.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"weather.js","sourceRoot":"","sources":["../../../agent/tools/weather.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAe,UAAU,CAAmB;IAC1C,WAAW,EAAE,eAAe;IAC5B,WAAW,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC;IAC3C,QAAQ,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,SAAS,CAAC;IACzD,IAAI,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC;IACxB,KAAK,CAAC,OAAO,CAAC,KAAK;QACjB,MAAM,OAAO,GAAG,CAAC,MAAM,MAAM,CAAC,gCAAgC,CAAC,CAAC,CAAC,OAAO,CAAC;QACzE,OAAO,OAAO,CAAC,KAAK,CAAC,CAAC;IACxB,CAAC;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { defineTool } from '@zhin.js/agent/tools';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
export default defineTool({
|
|
4
|
+
description: "获取微博热搜榜",
|
|
5
|
+
inputSchema: z.object({ limit: z.number().optional() }),
|
|
6
|
+
keywords: ["微博", "热搜", "weibo", "wb"],
|
|
7
|
+
tags: ["热搜", "社交", "微博"],
|
|
8
|
+
async execute(input) {
|
|
9
|
+
const handler = (await import('../../tools/weibo-hot/handler.js')).default;
|
|
10
|
+
return handler(input);
|
|
11
|
+
},
|
|
12
|
+
});
|
|
13
|
+
//# sourceMappingURL=weibo_hot.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"weibo_hot.js","sourceRoot":"","sources":["../../../agent/tools/weibo_hot.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAe,UAAU,CAAqB;IAC5C,WAAW,EAAE,SAAS;IACtB,WAAW,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,EAAE,CAAC;IACvD,QAAQ,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,CAAC;IACrC,IAAI,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC;IACxB,KAAK,CAAC,OAAO,CAAC,KAAK;QACjB,MAAM,OAAO,GAAG,CAAC,MAAM,MAAM,CAAC,kCAAkC,CAAC,CAAC,CAAC,OAAO,CAAC;QAC3E,OAAO,OAAO,CAAC,KAAK,CAAC,CAAC;IACxB,CAAC;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { defineTool } from '@zhin.js/agent/tools';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
export default defineTool({
|
|
4
|
+
description: "获取知乎热榜",
|
|
5
|
+
inputSchema: z.object({ limit: z.number().optional() }),
|
|
6
|
+
keywords: ["知乎", "热榜", "zhihu", "zh"],
|
|
7
|
+
tags: ["热搜", "社交", "知乎"],
|
|
8
|
+
async execute(input) {
|
|
9
|
+
const handler = (await import('../../tools/zhihu-hot/handler.js')).default;
|
|
10
|
+
return handler(input);
|
|
11
|
+
},
|
|
12
|
+
});
|
|
13
|
+
//# sourceMappingURL=zhihu_hot.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"zhihu_hot.js","sourceRoot":"","sources":["../../../agent/tools/zhihu_hot.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAe,UAAU,CAAqB;IAC5C,WAAW,EAAE,QAAQ;IACrB,WAAW,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,EAAE,CAAC;IACvD,QAAQ,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,CAAC;IACrC,IAAI,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC;IACxB,KAAK,CAAC,OAAO,CAAC,KAAK;QACjB,MAAM,OAAO,GAAG,CAAC,MAAM,MAAM,CAAC,kCAAkC,CAAC,CAAC,CAAC,OAAO,CAAC;QAC3E,OAAO,OAAO,CAAC,KAAK,CAAC,CAAC;IACxB,CAAC;CACF,CAAC,CAAC"}
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
*/
|
|
24
24
|
import { usePlugin } from 'zhin.js';
|
|
25
25
|
const plugin = usePlugin();
|
|
26
|
-
const {
|
|
26
|
+
const { root } = plugin;
|
|
27
27
|
const configService = root.inject('config');
|
|
28
28
|
const appConfig = configService?.getPrimary() || {};
|
|
29
29
|
const config = {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAEpC,MAAM,MAAM,GAAG,SAAS,EAAE,CAAC;AAC3B,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,CAAC;AAQxB,MAAM,aAAa,GAAG,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;AAC5C,MAAM,SAAS,GAAG,aAAa,EAAE,UAAU,EAAsB,IAAI,EAAE,CAAC;AACxE,MAAM,MAAM,GAAW;IACrB,OAAO,EAAE,sBAAsB;IAC/B,GAAG,SAAS,CAAC,KAAK,CAAC;CACpB,CAAC;AAEF,mCAAmC;AACnC,OAAO,CAAC,GAAG,CAAC,YAAY,GAAG,MAAM,CAAC,OAAO,IAAI,sBAAsB,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=handler.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"handler.js","sourceRoot":"","sources":["../../../tools/60s-news/handler.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"}
|