@zhin.js/plugin-60s 1.0.1 → 1.1.0

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.
Files changed (141) hide show
  1. package/README.md +1 -1
  2. package/agent/tools/60s_news.ts +13 -0
  3. package/agent/tools/bing_image.ts +13 -0
  4. package/agent/tools/douyin_hot.ts +13 -0
  5. package/agent/tools/duanzi.ts +13 -0
  6. package/agent/tools/exchange_rate.ts +13 -0
  7. package/agent/tools/fuel_price.ts +13 -0
  8. package/agent/tools/gold_price.ts +13 -0
  9. package/agent/tools/history_today.ts +13 -0
  10. package/agent/tools/hitokoto.ts +13 -0
  11. package/agent/tools/ip_query.ts +13 -0
  12. package/agent/tools/kfc.ts +13 -0
  13. package/agent/tools/moyu.ts +13 -0
  14. package/agent/tools/toutiao_hot.ts +13 -0
  15. package/agent/tools/translate_60s.ts +13 -0
  16. package/agent/tools/weather.ts +13 -0
  17. package/agent/tools/weibo_hot.ts +13 -0
  18. package/agent/tools/zhihu_hot.ts +13 -0
  19. package/commands/60s.js +7 -0
  20. package/commands/60s.ts +7 -0
  21. package/commands/bing.js +7 -0
  22. package/commands/bing.ts +7 -0
  23. package/commands/douyin/[[limit]].js +8 -0
  24. package/commands/douyin/[[limit]].ts +8 -0
  25. package/commands/duanzi.js +7 -0
  26. package/commands/duanzi.ts +7 -0
  27. package/commands/exchange.js +10 -0
  28. package/commands/exchange.ts +10 -0
  29. package/commands/fanyi/[text].js +8 -0
  30. package/commands/fanyi/[text].ts +8 -0
  31. package/commands/fuel/[province].js +8 -0
  32. package/commands/fuel/[province].ts +8 -0
  33. package/commands/gold.js +7 -0
  34. package/commands/gold.ts +7 -0
  35. package/commands/history.js +7 -0
  36. package/commands/history.ts +7 -0
  37. package/commands/hitokoto/[type].js +8 -0
  38. package/commands/hitokoto/[type].ts +8 -0
  39. package/commands/ip/[ip].js +8 -0
  40. package/commands/ip/[ip].ts +8 -0
  41. package/commands/kfc.js +7 -0
  42. package/commands/kfc.ts +7 -0
  43. package/commands/moyu.js +7 -0
  44. package/commands/moyu.ts +7 -0
  45. package/commands/toutiao/[[limit]].js +8 -0
  46. package/commands/toutiao/[[limit]].ts +8 -0
  47. package/commands/weather/[city].js +8 -0
  48. package/commands/weather/[city].ts +8 -0
  49. package/commands/weibo/[[limit]].js +8 -0
  50. package/commands/weibo/[[limit]].ts +8 -0
  51. package/commands/zhihu/[[limit]].js +8 -0
  52. package/commands/zhihu/[[limit]].ts +8 -0
  53. package/lib/api.js +59 -0
  54. package/lib/api.js.map +1 -0
  55. package/lib/handlers/60s-news.js +12 -0
  56. package/lib/handlers/60s-news.js.map +1 -0
  57. package/lib/handlers/bing-image.js +18 -0
  58. package/lib/handlers/bing-image.js.map +1 -0
  59. package/lib/handlers/douyin-hot.js +6 -0
  60. package/lib/handlers/douyin-hot.js.map +1 -0
  61. package/lib/handlers/duanzi.js +6 -0
  62. package/lib/handlers/duanzi.js.map +1 -0
  63. package/lib/handlers/exchange-rate.js +28 -0
  64. package/lib/handlers/exchange-rate.js.map +1 -0
  65. package/lib/handlers/fuel-price.js +21 -0
  66. package/lib/handlers/fuel-price.js.map +1 -0
  67. package/lib/handlers/gold-price.js +24 -0
  68. package/lib/handlers/gold-price.js.map +1 -0
  69. package/lib/handlers/history-today.js +16 -0
  70. package/lib/handlers/history-today.js.map +1 -0
  71. package/lib/handlers/hitokoto.js +16 -0
  72. package/lib/handlers/hitokoto.js.map +1 -0
  73. package/lib/handlers/ip-query.js +17 -0
  74. package/lib/handlers/ip-query.js.map +1 -0
  75. package/lib/handlers/kfc.js +6 -0
  76. package/lib/handlers/kfc.js.map +1 -0
  77. package/lib/handlers/moyu.js +39 -0
  78. package/lib/handlers/moyu.js.map +1 -0
  79. package/lib/handlers/toutiao-hot.js +6 -0
  80. package/lib/handlers/toutiao-hot.js.map +1 -0
  81. package/lib/handlers/translate.js +26 -0
  82. package/lib/handlers/translate.js.map +1 -0
  83. package/lib/handlers/weather.js +22 -0
  84. package/lib/handlers/weather.js.map +1 -0
  85. package/lib/handlers/weibo-hot.js +6 -0
  86. package/lib/handlers/weibo-hot.js.map +1 -0
  87. package/lib/handlers/zhihu-hot.js +6 -0
  88. package/lib/handlers/zhihu-hot.js.map +1 -0
  89. package/lib/index.js +1 -34
  90. package/lib/index.js.map +1 -1
  91. package/lib/runtime-deps.js +22 -0
  92. package/lib/runtime-deps.js.map +1 -0
  93. package/package.json +52 -12
  94. package/plugin.js +13 -0
  95. package/schema.json +12 -0
  96. package/src/api.ts +79 -0
  97. package/{tools/60s-news/handler.ts → src/handlers/60s-news.ts} +1 -1
  98. package/{tools/bing-image/handler.ts → src/handlers/bing-image.ts} +4 -4
  99. package/{tools/douyin-hot/handler.ts → src/handlers/douyin-hot.ts} +2 -2
  100. package/{tools/duanzi/handler.ts → src/handlers/duanzi.ts} +1 -1
  101. package/{tools/exchange-rate/handler.ts → src/handlers/exchange-rate.ts} +8 -6
  102. package/{tools/fuel-price/handler.ts → src/handlers/fuel-price.ts} +5 -4
  103. package/{tools/gold-price/handler.ts → src/handlers/gold-price.ts} +8 -7
  104. package/src/handlers/history-today.ts +16 -0
  105. package/{tools/hitokoto/handler.ts → src/handlers/hitokoto.ts} +1 -1
  106. package/{tools/ip-query/handler.ts → src/handlers/ip-query.ts} +1 -1
  107. package/{tools/kfc/handler.ts → src/handlers/kfc.ts} +1 -1
  108. package/src/handlers/moyu.ts +35 -0
  109. package/{tools/toutiao-hot/handler.ts → src/handlers/toutiao-hot.ts} +2 -2
  110. package/src/handlers/translate.ts +25 -0
  111. package/src/handlers/weather.ts +22 -0
  112. package/{tools/weibo-hot/handler.ts → src/handlers/weibo-hot.ts} +2 -2
  113. package/{tools/zhihu-hot/handler.ts → src/handlers/zhihu-hot.ts} +2 -2
  114. package/src/index.ts +8 -44
  115. package/src/runtime-deps.ts +26 -0
  116. package/lib/index.d.ts +0 -2
  117. package/lib/index.d.ts.map +0 -1
  118. package/plugin.yml +0 -3
  119. package/tools/60s-news/60s-news.tool.md +0 -8
  120. package/tools/api.ts +0 -34
  121. package/tools/bing-image/bing-image.tool.md +0 -8
  122. package/tools/douyin-hot/douyin-hot.tool.md +0 -12
  123. package/tools/duanzi/duanzi.tool.md +0 -8
  124. package/tools/exchange-rate/exchange-rate.tool.md +0 -14
  125. package/tools/fuel-price/fuel-price.tool.md +0 -11
  126. package/tools/gold-price/gold-price.tool.md +0 -8
  127. package/tools/history-today/handler.ts +0 -15
  128. package/tools/history-today/history-today.tool.md +0 -8
  129. package/tools/hitokoto/hitokoto.tool.md +0 -12
  130. package/tools/ip-query/ip-query.tool.md +0 -12
  131. package/tools/kfc/kfc.tool.md +0 -8
  132. package/tools/moyu/handler.ts +0 -28
  133. package/tools/moyu/moyu.tool.md +0 -8
  134. package/tools/toutiao-hot/toutiao-hot.tool.md +0 -12
  135. package/tools/translate/handler.ts +0 -19
  136. package/tools/translate/translate.tool.md +0 -15
  137. package/tools/weather/handler.ts +0 -22
  138. package/tools/weather/weather.tool.md +0 -12
  139. package/tools/weibo-hot/weibo-hot.tool.md +0 -12
  140. package/tools/zhihu-hot/zhihu-hot.tool.md +0 -12
  141. /package/{skills/60s/SKILL.md → agent/skills/60s.md} +0 -0
package/README.md CHANGED
@@ -46,7 +46,7 @@ plugins:
46
46
 
47
47
  ## AI 工具集成
48
48
 
49
- 所有工具均标记了 `tags` 和 `keywords`,支持 `@zhin.js/core` 内置 AI 的程序化工具过滤。用户通过自然语言即可触发对应工具,无需记忆命令格式:
49
+ 所有工具均标记了 `tags` 和 `keywords`,支持 Agent 栈的程序化工具过滤(`@zhin.js/ai` `filterTools`)。用户通过自然语言即可触发对应工具,无需记忆命令格式:
50
50
 
51
51
  - "今天的新闻是什么" → 自动调用 60s 新闻
52
52
  - "北京天气怎么样" → 自动调用天气查询
@@ -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
+ });
@@ -0,0 +1,7 @@
1
+ // Generated by build-plugin-runtime-entries.mjs. Do not edit.
2
+ import { defineCommand } from 'zhin.js/command';
3
+ import handler from "../lib/handlers/60s-news.js";
4
+ export default defineCommand({
5
+ description: '每日60秒新闻',
6
+ execute: () => handler(),
7
+ });
@@ -0,0 +1,7 @@
1
+ import { defineCommand } from 'zhin.js/command';
2
+ import handler from '../src/handlers/60s-news.js';
3
+
4
+ export default defineCommand({
5
+ description: '每日60秒新闻',
6
+ execute: () => handler(),
7
+ });
@@ -0,0 +1,7 @@
1
+ // Generated by build-plugin-runtime-entries.mjs. Do not edit.
2
+ import { defineCommand } from 'zhin.js/command';
3
+ import handler from "../lib/handlers/bing-image.js";
4
+ export default defineCommand({
5
+ description: 'Bing 每日壁纸',
6
+ execute: () => handler(),
7
+ });
@@ -0,0 +1,7 @@
1
+ import { defineCommand } from 'zhin.js/command';
2
+ import handler from '../src/handlers/bing-image.js';
3
+
4
+ export default defineCommand({
5
+ description: 'Bing 每日壁纸',
6
+ execute: () => handler(),
7
+ });
@@ -0,0 +1,8 @@
1
+ // Generated by build-plugin-runtime-entries.mjs. Do not edit.
2
+ import { defineCommand } from 'zhin.js/command';
3
+ import handler from "../../lib/handlers/douyin-hot.js";
4
+ export default defineCommand({
5
+ description: '抖音热搜',
6
+ params: { limit: { type: 'number', default: 10 } },
7
+ execute: ({ params }) => handler({ limit: Number(params.limit) }),
8
+ });
@@ -0,0 +1,8 @@
1
+ import { defineCommand } from 'zhin.js/command';
2
+ import handler from '../../src/handlers/douyin-hot.js';
3
+
4
+ export default defineCommand({
5
+ description: '抖音热搜',
6
+ params: { limit: { type: 'number', default: 10 } },
7
+ execute: ({ params }) => handler({ limit: Number(params.limit) }),
8
+ });
@@ -0,0 +1,7 @@
1
+ // Generated by build-plugin-runtime-entries.mjs. Do not edit.
2
+ import { defineCommand } from 'zhin.js/command';
3
+ import handler from "../lib/handlers/duanzi.js";
4
+ export default defineCommand({
5
+ description: '随机段子',
6
+ execute: () => handler(),
7
+ });
@@ -0,0 +1,7 @@
1
+ import { defineCommand } from 'zhin.js/command';
2
+ import handler from '../src/handlers/duanzi.js';
3
+
4
+ export default defineCommand({
5
+ description: '随机段子',
6
+ execute: () => handler(),
7
+ });
@@ -0,0 +1,10 @@
1
+ // Generated by build-plugin-runtime-entries.mjs. Do not edit.
2
+ import { defineCommand } from 'zhin.js/command';
3
+ import handler from "../lib/handlers/exchange-rate.js";
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,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,8 @@
1
+ // Generated by build-plugin-runtime-entries.mjs. Do not edit.
2
+ import { defineCommand } from 'zhin.js/command';
3
+ import handler from "../../lib/handlers/translate.js";
4
+ export default defineCommand({
5
+ description: '文本翻译',
6
+ params: { text: { type: 'string' } },
7
+ execute: ({ params, args }) => handler({ text: String(params.text), to: args[0] != null ? String(args[0]) : undefined }),
8
+ });
@@ -0,0 +1,8 @@
1
+ import { defineCommand } from 'zhin.js/command';
2
+ import handler from '../../src/handlers/translate.js';
3
+
4
+ export default defineCommand({
5
+ description: '文本翻译',
6
+ params: { text: { type: 'string' } },
7
+ execute: ({ params, args }) => handler({ text: String(params.text), to: args[0] != null ? String(args[0]) : undefined }),
8
+ });
@@ -0,0 +1,8 @@
1
+ // Generated by build-plugin-runtime-entries.mjs. Do not edit.
2
+ import { defineCommand } from 'zhin.js/command';
3
+ import handler from "../../lib/handlers/fuel-price.js";
4
+ export default defineCommand({
5
+ description: '今日油价',
6
+ params: { province: { type: 'string' } },
7
+ execute: ({ params }) => handler({ province: params.province != null ? String(params.province) : undefined }),
8
+ });
@@ -0,0 +1,8 @@
1
+ import { defineCommand } from 'zhin.js/command';
2
+ import handler from '../../src/handlers/fuel-price.js';
3
+
4
+ export default defineCommand({
5
+ description: '今日油价',
6
+ params: { province: { type: 'string' } },
7
+ execute: ({ params }) => handler({ province: params.province != null ? String(params.province) : undefined }),
8
+ });
@@ -0,0 +1,7 @@
1
+ // Generated by build-plugin-runtime-entries.mjs. Do not edit.
2
+ import { defineCommand } from 'zhin.js/command';
3
+ import handler from "../lib/handlers/gold-price.js";
4
+ export default defineCommand({
5
+ description: '今日金价',
6
+ execute: () => handler(),
7
+ });
@@ -0,0 +1,7 @@
1
+ import { defineCommand } from 'zhin.js/command';
2
+ import handler from '../src/handlers/gold-price.js';
3
+
4
+ export default defineCommand({
5
+ description: '今日金价',
6
+ execute: () => handler(),
7
+ });
@@ -0,0 +1,7 @@
1
+ // Generated by build-plugin-runtime-entries.mjs. Do not edit.
2
+ import { defineCommand } from 'zhin.js/command';
3
+ import handler from "../lib/handlers/history-today.js";
4
+ export default defineCommand({
5
+ description: '历史上的今天',
6
+ execute: () => handler(),
7
+ });
@@ -0,0 +1,7 @@
1
+ import { defineCommand } from 'zhin.js/command';
2
+ import handler from '../src/handlers/history-today.js';
3
+
4
+ export default defineCommand({
5
+ description: '历史上的今天',
6
+ execute: () => handler(),
7
+ });
@@ -0,0 +1,8 @@
1
+ // Generated by build-plugin-runtime-entries.mjs. Do not edit.
2
+ import { defineCommand } from 'zhin.js/command';
3
+ import handler from "../../lib/handlers/hitokoto.js";
4
+ export default defineCommand({
5
+ description: '随机一言',
6
+ params: { type: { type: 'string' } },
7
+ execute: ({ params }) => handler({ type: params.type != null ? String(params.type) : undefined }),
8
+ });
@@ -0,0 +1,8 @@
1
+ import { defineCommand } from 'zhin.js/command';
2
+ import handler from '../../src/handlers/hitokoto.js';
3
+
4
+ export default defineCommand({
5
+ description: '随机一言',
6
+ params: { type: { type: 'string' } },
7
+ execute: ({ params }) => handler({ type: params.type != null ? String(params.type) : undefined }),
8
+ });
@@ -0,0 +1,8 @@
1
+ // Generated by build-plugin-runtime-entries.mjs. Do not edit.
2
+ import { defineCommand } from 'zhin.js/command';
3
+ import handler from "../../lib/handlers/ip-query.js";
4
+ export default defineCommand({
5
+ description: 'IP 查询',
6
+ params: { ip: { type: 'string' } },
7
+ execute: ({ params }) => handler({ ip: params.ip != null ? String(params.ip) : undefined }),
8
+ });
@@ -0,0 +1,8 @@
1
+ import { defineCommand } from 'zhin.js/command';
2
+ import handler from '../../src/handlers/ip-query.js';
3
+
4
+ export default defineCommand({
5
+ description: 'IP 查询',
6
+ params: { ip: { type: 'string' } },
7
+ execute: ({ params }) => handler({ ip: params.ip != null ? String(params.ip) : undefined }),
8
+ });
@@ -0,0 +1,7 @@
1
+ // Generated by build-plugin-runtime-entries.mjs. Do not edit.
2
+ import { defineCommand } from 'zhin.js/command';
3
+ import handler from "../lib/handlers/kfc.js";
4
+ export default defineCommand({
5
+ description: 'KFC 文案',
6
+ execute: () => handler(),
7
+ });
@@ -0,0 +1,7 @@
1
+ import { defineCommand } from 'zhin.js/command';
2
+ import handler from '../src/handlers/kfc.js';
3
+
4
+ export default defineCommand({
5
+ description: 'KFC 文案',
6
+ execute: () => handler(),
7
+ });
@@ -0,0 +1,7 @@
1
+ // Generated by build-plugin-runtime-entries.mjs. Do not edit.
2
+ import { defineCommand } from 'zhin.js/command';
3
+ import handler from "../lib/handlers/moyu.js";
4
+ export default defineCommand({
5
+ description: '摸鱼日历',
6
+ execute: () => handler(),
7
+ });
@@ -0,0 +1,7 @@
1
+ import { defineCommand } from 'zhin.js/command';
2
+ import handler from '../src/handlers/moyu.js';
3
+
4
+ export default defineCommand({
5
+ description: '摸鱼日历',
6
+ execute: () => handler(),
7
+ });
@@ -0,0 +1,8 @@
1
+ // Generated by build-plugin-runtime-entries.mjs. Do not edit.
2
+ import { defineCommand } from 'zhin.js/command';
3
+ import handler from "../../lib/handlers/toutiao-hot.js";
4
+ export default defineCommand({
5
+ description: '头条热搜',
6
+ params: { limit: { type: 'number', default: 10 } },
7
+ execute: ({ params }) => handler({ limit: Number(params.limit) }),
8
+ });
@@ -0,0 +1,8 @@
1
+ import { defineCommand } from 'zhin.js/command';
2
+ import handler from '../../src/handlers/toutiao-hot.js';
3
+
4
+ export default defineCommand({
5
+ description: '头条热搜',
6
+ params: { limit: { type: 'number', default: 10 } },
7
+ execute: ({ params }) => handler({ limit: Number(params.limit) }),
8
+ });
@@ -0,0 +1,8 @@
1
+ // Generated by build-plugin-runtime-entries.mjs. Do not edit.
2
+ import { defineCommand } from 'zhin.js/command';
3
+ import handler from "../../lib/handlers/weather.js";
4
+ export default defineCommand({
5
+ description: '查询城市天气',
6
+ params: { city: { type: 'string' } },
7
+ execute: ({ params }) => handler({ city: String(params.city) }),
8
+ });
@@ -0,0 +1,8 @@
1
+ import { defineCommand } from 'zhin.js/command';
2
+ import handler from '../../src/handlers/weather.js';
3
+
4
+ export default defineCommand({
5
+ description: '查询城市天气',
6
+ params: { city: { type: 'string' } },
7
+ execute: ({ params }) => handler({ city: String(params.city) }),
8
+ });
@@ -0,0 +1,8 @@
1
+ // Generated by build-plugin-runtime-entries.mjs. Do not edit.
2
+ import { defineCommand } from 'zhin.js/command';
3
+ import handler from "../../lib/handlers/weibo-hot.js";
4
+ export default defineCommand({
5
+ description: '微博热搜',
6
+ params: { limit: { type: 'number', default: 10 } },
7
+ execute: ({ params }) => handler({ limit: Number(params.limit) }),
8
+ });
@@ -0,0 +1,8 @@
1
+ import { defineCommand } from 'zhin.js/command';
2
+ import handler from '../../src/handlers/weibo-hot.js';
3
+
4
+ export default defineCommand({
5
+ description: '微博热搜',
6
+ params: { limit: { type: 'number', default: 10 } },
7
+ execute: ({ params }) => handler({ limit: Number(params.limit) }),
8
+ });
@@ -0,0 +1,8 @@
1
+ // Generated by build-plugin-runtime-entries.mjs. Do not edit.
2
+ import { defineCommand } from 'zhin.js/command';
3
+ import handler from "../../lib/handlers/zhihu-hot.js";
4
+ export default defineCommand({
5
+ description: '知乎热榜',
6
+ params: { limit: { type: 'number', default: 10 } },
7
+ execute: ({ params }) => handler({ limit: Number(params.limit) }),
8
+ });
@@ -0,0 +1,8 @@
1
+ import { defineCommand } from 'zhin.js/command';
2
+ import handler from '../../src/handlers/zhihu-hot.js';
3
+
4
+ export default defineCommand({
5
+ description: '知乎热榜',
6
+ params: { limit: { type: 'number', default: 10 } },
7
+ execute: ({ params }) => handler({ limit: Number(params.limit) }),
8
+ });