koishi-plugin-market-next 3.0.1 → 3.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md ADDED
@@ -0,0 +1,98 @@
1
+ # koishi-plugin-market-next
2
+
3
+ 更好用的 Koishi 插件市场与插件管理入口。`market-next` 基于原始 market 插件继续增强,目标是让插件搜索、安装、更新和 AI 查询都更稳定、更清楚、更顺手。
4
+
5
+ ## Next 优势
6
+
7
+ - 默认使用更适合大陆网络的插件市场镜像:`https://registry.koishi.t4wefan.pub/index.json`。
8
+ - 修复原 market 中刷新按钮无效、刷新无反馈、网络正常但提示 `failed to fetch`、市场打不开等体验问题。
9
+ - 列表改为无限滚动,减少分页来回切换,浏览插件更直接。
10
+ - 搜索和筛选更稳定:分类再次点击可取消,关键词或筛选变化后不会停在空页。
11
+ - 安装、更新后会尽量让插件配置进入配置页可管理范围,降低“装了但找不到配置”的困惑。
12
+ - 内置可选 ChatLuna 插件市场查询工具,让 AI 能按关键词、分类、状态、时间范围、最近新增、最近更新、下载量和评分查询市场。
13
+ - ChatLuna 能力默认关闭;未安装 ChatLuna 时不会影响 market 正常加载。
14
+
15
+ ## 功能概览
16
+
17
+ ### 插件市场
18
+
19
+ - 浏览 Koishi 插件市场。
20
+ - 搜索插件名、短名、简介和关键词。
21
+ - 按分类筛选插件。
22
+ - 无限滚动加载更多插件。
23
+ - 安装、更新、卸载插件。
24
+ - 查看插件版本、评分、下载量、更新时间、维护者等信息。
25
+
26
+ ### 网络与缓存
27
+
28
+ - 默认搜索源为 t4wefan 镜像。
29
+ - 支持通过 `search.endpoint` 自定义市场 index 地址。
30
+ - 支持 `search.timeout` 和 `search.proxyAgent`。
31
+ - ChatLuna 查询工具维护 10 分钟内存缓存;请求失败但存在旧缓存时会返回 stale 结果和失败原因。
32
+
33
+ ### ChatLuna Tool
34
+
35
+ 开启配置项 `chatlunaTool` 后,如果当前 Koishi 同时安装了 ChatLuna,会注册只读工具:
36
+
37
+ ```text
38
+ koishi_plugin_market_search
39
+ ```
40
+
41
+ 支持的查询范围包括:
42
+
43
+ - `query`: 关键词搜索。
44
+ - `category`: 分类过滤,例如 `adapter`、`ai`、`tool`、`game`、`webui`。
45
+ - `status`: 状态过滤,包括 `verified`、`insecure`、`preview`、`portable`、`deprecated`。
46
+ - `createdAfter` / `createdBefore`: 创建时间范围。
47
+ - `updatedAfter` / `updatedBefore`: 更新时间范围。
48
+ - `createdWithinDays`: 最近新增。
49
+ - `updatedWithinDays`: 最近更新。
50
+ - `sort`: `relevance`、`rating`、`downloads`、`created`、`updated`。
51
+ - `order`: `asc` 或 `desc`。
52
+ - `limit`: 结果数量,1 到 50。
53
+ - `includeHidden`: 是否包含隐藏插件。
54
+ - `includeDeprecated`: 是否包含废弃插件。
55
+
56
+ 这个工具只查询市场,不安装、不卸载、不写配置,也不修改 `package.json`。
57
+
58
+ ## 配置
59
+
60
+ ```yaml
61
+ plugins:
62
+ market:
63
+ search:
64
+ endpoint: https://registry.koishi.t4wefan.pub/index.json
65
+ timeout: 30s
66
+ chatlunaTool: false
67
+ ```
68
+
69
+ 主要配置项:
70
+
71
+ - `registry`: 插件下载源设置。
72
+ - `search.endpoint`: 插件市场搜索 index 地址。
73
+ - `search.timeout`: 获取市场数据的超时时间。
74
+ - `search.proxyAgent`: 搜索市场时使用的代理。
75
+ - `chatlunaTool`: 启用 ChatLuna 插件市场查询工具,默认关闭。
76
+
77
+ ## 开发
78
+
79
+ ```bash
80
+ npm install
81
+ npm run build
82
+ npm pack --dry-run
83
+ ```
84
+
85
+ 构建产物:
86
+
87
+ - `lib`: 后端与类型产物。
88
+ - `dist`: 控制台前端产物。
89
+ - `src`: 源码。
90
+
91
+ ## 版本
92
+
93
+ 当前版本:`3.2.0`
94
+
95
+ ## 许可证
96
+
97
+ AGPL-3.0
98
+