node-karin 1.2.2 → 1.2.4-pr.251.56ea34a

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.
@@ -0,0 +1 @@
1
+ import{d as a}from"./index-DWlvh96A.js";var r=a;export{r as default};
@@ -0,0 +1 @@
1
+ import{d as a}from"./index-DWlvh96A.js";var r=a;export{r as default};
@@ -0,0 +1,24 @@
1
+ <!doctype html>
2
+ <html lang="en">
3
+
4
+ <head>
5
+ <meta charset="UTF-8" />
6
+ <link rel="icon" type="image/svg+xml" href="/web/karin.png" />
7
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
8
+ <title>KarinJS WebUI</title>
9
+ <meta key="title" content="Vite + NextUI" property="og:title" />
10
+ <meta content="Make beautiful websites regardless of your design experience." property="og:description" />
11
+ <meta content="Make beautiful websites regardless of your design experience." name="description" />
12
+ <meta key="viewport"
13
+ content="viewport-fit=cover, width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"
14
+ name="viewport" />
15
+ <link href="/web/assets/favicon-BoqZd694.ico" rel="icon" />
16
+ <script type="module" crossorigin src="/web/assets/index-DWlvh96A.js"></script>
17
+ <link rel="stylesheet" crossorigin href="/web/assets/index-B8bbCqnJ.css">
18
+ </head>
19
+
20
+ <body>
21
+ <div id="root"></div>
22
+ </body>
23
+
24
+ </html>
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "node-karin",
3
- "version": "1.2.2",
3
+ "version": "1.2.4-pr.251.56ea34a",
4
4
  "description": "Lightweight, efficient, concise, and stable robot framework.",
5
5
  "keywords": [
6
6
  "node",
@@ -92,7 +92,7 @@
92
92
  "access": "public",
93
93
  "registry": "https://registry.npmjs.org"
94
94
  },
95
- "time": "2025-01-15-2",
95
+ "time": "2025-01-21",
96
96
  "exports": {
97
97
  ".": {
98
98
  "import": "./dist/index.js",
@@ -1,34 +0,0 @@
1
- {
2
- "log4jsCfg": "log4js 日志配置",
3
- "log4jsCfg.level": "日志等级: trace, debug, info, warn, fatal, mark, error, off",
4
- "log4jsCfg.daysToKeep": "日志保留天数",
5
- "log4jsCfg.overall": "整体化: 将日志输出到一个文件(一天为一个文件)。日志较多的情况下不建议与碎片化同时开启",
6
- "log4jsCfg.fragments": "碎片化: 将日志分片,达到指定大小后自动切割。日志较多的情况下不建议与整体化同时开启",
7
- "log4jsCfg.maxLogSize": "日志文件最大大小 (MB)",
8
- "log4jsCfg.logColor": "logger.fnc颜色。不支持热更新",
9
- "pm2Restart": "重启是否调用pm2。如果不调用则会直接关机。此配置适合有进程守护的程序",
10
- "private.enable": "是否启用私聊",
11
- "private.tips": "关闭私聊后回复的提示词。为空则不回复",
12
- "private.disable": "关闭私聊后的用户白名单",
13
- "ffmpegPath": "ffmpeg路径,用于音视频处理",
14
- "ffprobePath": "ffprobe路径,用于音视频处理",
15
- "ffplayPath": "ffplay路径,用于音视频处理",
16
- "master": "Bot主人列表 (主权限)",
17
- "admin": "Bot管理列表 (子权限)",
18
- "disable.users": "黑名单用户",
19
- "disable.groups": "黑名单群聊",
20
- "disable.guilds": "黑名单频道",
21
- "disable.channels": "黑名单子频道",
22
- "disable.directs": "黑名单频道私聊: 禁用指定来源频道的私聊",
23
- "disable.groupLog": "消息日志黑名单群聊: 设置后不会打印指定群的消息日志",
24
- "disable.guildLog": "消息日志黑名单频道: 设置后不会打印指定频道的消息日志",
25
- "disable.channelLog": "消息日志黑名单子频道: 设置后不会打印指定子频道的消息日志",
26
- "enable.users": "白名单用户",
27
- "enable.groups": "白名单群聊",
28
- "enable.guilds": "白名单频道",
29
- "enable.channels": "白名单子频道",
30
- "enable.directs": "白名单频道私聊: 仅允许指定来源频道的私聊",
31
- "enable.groupLog": "消息日志白名单群聊: 设置后只会打印指定群的消息日志",
32
- "enable.guildLog": "消息日志白名单频道: 设置后只会打印指定频道的消息日志",
33
- "enable.channelLog": "消息日志白名单子频道: 设置后只会打印指定子频道的消息日志"
34
- }
@@ -1,10 +0,0 @@
1
- {
2
- "default": "全局默认配置",
3
- "default.cd": "好友消息冷却时间,单位秒,0则无限制",
4
- "default.mode": "机器人响应模式: 0-所有, 2-仅回应管理员, 3-仅回应别名, 5-管理员无限制, 非管理员别名, 6-仅回应主人",
5
- "default.alias": "机器人别名: 设置后别名+指令触发机器人",
6
- "default.enable": "白名单插件、功能: 只有在白名单中的插件、功能才会响应",
7
- "default.disable": "黑名单插件、功能: 黑名单中的插件、功能不会响应",
8
- "Bot:selfId": "单个Bot默认配置",
9
- "Bot:selfId:userId": "单个Bot:单个好友、频道成员 配置"
10
- }
@@ -1,11 +0,0 @@
1
- {
2
- "default": "全局默认配置",
3
- "default.cd": "好友消息冷却时间,单位秒,0则无限制",
4
- "default.mode": "机器人响应模式: 0-所有, 2-仅回应管理员, 3-仅回应别名, 5-管理员无限制,非管理员别名, 6-仅回应主人",
5
- "default.alias": "机器人别名: 设置后别名+指令触发机器人",
6
- "default.alias.k": "别名: k",
7
- "default.enable": "白名单插件、功能: 只有在白名单中的插件、功能才会响应,例如 karin-plugin-test:app.js",
8
- "default.disable": "黑名单插件、功能: 黑名单中的插件、功能不会响应,例如 karin-plugin-test:app.js",
9
- "Bot:selfId": "单个Bot默认配置",
10
- "Bot:selfId:userId": "单个Bot:单个好友、频道成员配置"
11
- }
@@ -1,17 +0,0 @@
1
- {
2
- "hmrToServer": "当前文件热更新是否重启http服务",
3
- "host": "http监听地址",
4
- "port": "http端口",
5
- "timeout": "ws api请求超时时间,单位:秒",
6
- "onebotHttp": "OneBot HTTP 配置列表",
7
- "reverseWsToken": "反向WebSocket鉴权秘钥",
8
- "forwardWs": "OneBot11正向WebSocket地址列表",
9
- "renderWs": "WebSocket 渲染器地址 (例如 ws://127.0.0.1:7005/ws/render)",
10
- "renderHttp": "HTTP 渲染器地址列表",
11
- "rootMsg": "HTTP根路由随机返回的文案",
12
- "console": "console控制台适配器",
13
- "console.isLocal": "只允许本地访问",
14
- "console.port": "console控制台端口",
15
- "console.token": "如果 isLocal 为 false 则需要配置 token",
16
- "console.host": "自定义host"
17
- }
@@ -1,67 +0,0 @@
1
- name: 应用配置
2
- view:
3
- - key: 黑名单
4
- comment: 黑名单相关
5
- path: "BlackList"
6
- type: "group"
7
- part:
8
- - key: 黑名单用户
9
- path: "BlackList.users"
10
- type: "boolean"
11
- - key: 黑名单群聊
12
- path: "BlackList.groups"
13
- type: "boolean"
14
- - key: 消息日志黑名单群聊
15
- comment: 设置后不会打印该群的消息日志
16
- path: "BlackList.GroupMsgLog"
17
- type: "boolean"
18
- - key: 白名单
19
- comment: 白名单相关
20
- path: "WhiteList"
21
- type: "group"
22
- part:
23
- - key: 白名单用户
24
- path: "WhiteList.users"
25
- type: "boolean"
26
- - key: 白名单群聊
27
- path: "WhiteList.groups"
28
- type: "boolean"
29
- - key: 消息日志白名单群聊
30
- comment: 消息日志白名单群聊 设置后只会打印该群的消息日志
31
- path: "WhiteList.GroupMsgLog"
32
- type: "boolean"
33
- - key: 群聊
34
- path: "GroupConfig"
35
- type: "group"
36
- part:
37
- - key: 消息冷却时间
38
- comment: 群聊中所有消息冷却时间
39
- path: "GroupConfig.GroupCD"
40
- type: "boolean"
41
- - key: 个人消息冷却时间
42
- comment: 群聊中 每个人的消息冷却时间
43
- path: "GroupConfig.GroupUserCD"
44
- type: "boolean"
45
- - key: 机器人响应模式
46
- path: "GroupConfig.mode"
47
- type: "boolean"
48
- - key: 机器人前缀
49
- comment: 机器人前缀 设置后前缀+指令触发机器人
50
- path: "GroupConfig.alias"
51
- type: "boolean"
52
- - key: 白名单插件、功能
53
- comment: 白名单插件、功能,只有在白名单中的插件、功能才会响应
54
- path: "GroupConfig.enable"
55
- type: "boolean"
56
- - key: 黑名单插件、功能
57
- comment: 黑名单插件、功能,黑名单中的插件、功能不会响应
58
- path: "GroupConfig.disable"
59
- type: "boolean"
60
- - key: 私聊
61
- path: "PrivateConfig"
62
- type: "group"
63
- part:
64
- - key: 是否开启私聊
65
- comment: 是否开启私聊
66
- path: "PrivateConfig.enable"
67
- type: "boolean"
@@ -1,170 +0,0 @@
1
- name: 通用配置
2
- view:
3
- - key: 日志配置
4
- comment: log4js日志配置
5
- path: log4jsCfg
6
- type: group
7
- part:
8
- - key: 日志等级
9
- comment: 日志等级:trace,debug,info,warn,fatal,mark,error,off
10
- path: log_level
11
- type: select
12
- multiple: false
13
- item:
14
- - name: Trace
15
- value: trace
16
- - name: Debug
17
- value: ebug
18
- - name: Info
19
- value: info
20
- - name: Warn
21
- value: warn
22
- - name: Fatal
23
- value: fatal
24
- - name: Mark
25
- value: mark
26
- - name: Error
27
- value: error
28
- - name: Off
29
- value: off
30
- - key: 日志保留天数
31
- path: log_days_Keep
32
- type: number
33
- - key: 整体化
34
- comment: 将日志输出到一个文件(一天为一个文件) 日志较多的情况下不建议与碎片化同时开启
35
- path: overall
36
- type: boolean
37
- - key: 碎片化
38
- comment: 将日志分片,达到指定大小后自动切割 日志较多的情况下不建议与整体化同时开启
39
- path: fragments
40
- type: boolean
41
- - key: 日志文件最大大小
42
- comment: 日志文件最大大小 MB
43
- path: maxLogSize
44
- type: number
45
-
46
- - key: 后台进程
47
- comment: 关闭后台进程失败后是否继续启动 继续启动会导致多进程
48
- path: multi_progress
49
- type: boolean
50
-
51
- - key: 控制台插件日志颜色
52
- comment: 控制台触发插件日志颜色 十六进制 默认#FFFF00 不支持热更新
53
- path: log_color
54
- type: text
55
-
56
- - key: 私聊设置
57
- comment: 私聊设置
58
- path: private
59
- type: group
60
- part:
61
- - key: 关闭私聊提示词
62
- comment: 关闭私聊后回复的提示词 为空则不回复
63
- path: tips
64
- type: text
65
- - key: 关闭私聊白名单
66
- comment: 关闭私聊后的用户白名单
67
- path: white_list
68
- type: array
69
-
70
- - key: input适配器配置
71
- comment: input适配器配置 以下所有配置均不支持热更新
72
- path: AdapterInput
73
- type: group
74
- part:
75
- - key: 是否启用
76
- comment: 是否启动input适配器
77
- path: enable
78
- type: boolean
79
- - key: 是否转为文件
80
- comment: 是否将语音、图片、视频消息转为文件 转为文件后可通过url访问
81
- path: msgToFile
82
- type: boolean
83
- - key: url访问token
84
- comment: url访问token 如果为 AdapterInput 每次启动后会重新生成
85
- path: token
86
- type: text
87
- - key: 访问ip
88
- comment: 访问ip
89
- path: ip
90
- type: text
91
-
92
- - key: ffmpeg路径
93
- comment: ffmpeg配置 用于音视频处理
94
- path: ffmpeg_path
95
- type: text
96
-
97
- - key: ffprobe路径
98
- comment: ffmpeg配置 用于音视频处理
99
- path: ffprobe_path
100
- type: text
101
-
102
- - key: 主人列表
103
- comment: 主人列表 主权限
104
- path: master
105
- type: array
106
- arrayType: string
107
-
108
- - key: 管理员列表
109
- comment: 管理员列表 子权限
110
- path: admin
111
- type: array
112
- arrayType: string
113
-
114
- - key: 黑名单
115
- comment: 黑名单相关
116
- path: BlackList
117
- type: group
118
- part:
119
- - key: 黑名单用户
120
- path: BlackList.users
121
- type: array
122
- arrayType: string
123
- associated:
124
- - file: App
125
- path: BlackList.users
126
- requirement: true
127
- - key: 黑名单群聊
128
- path: BlackList.groups
129
- type: array
130
- arrayType: string
131
- associated:
132
- - file: App
133
- path: BlackList.groups
134
- requirement: true
135
- - key: 消息日志黑名单群聊
136
- comment: 设置后不会打印该群的消息日志
137
- path: BlackList.GroupMsgLog
138
- type: array
139
- arrayType: string
140
- associated:
141
- - file: App
142
- path: BlackList.GroupMsgLog
143
- requirement: true
144
- - key: 白名单
145
- comment: 白名单相关
146
- path: WhiteList
147
- type: group
148
- part:
149
- - key: 白名单用户
150
- path: WhiteList.users
151
- type: boolean
152
- associated:
153
- - file: App
154
- path: WhiteList.users
155
- requirement: true
156
- - key: 白名单群聊
157
- path: WhiteList.groups
158
- type: boolean
159
- associated:
160
- - file: App
161
- path: WhiteList.groups
162
- requirement: true
163
- - key: 消息日志白名单群聊
164
- comment: 消息日志白名单群聊 设置后只会打印该群的消息日志
165
- path: WhiteList.GroupMsgLog
166
- type: boolean
167
- associated:
168
- - file: App
169
- path: WhiteList.GroupMsgLog
170
- requirement: true
@@ -1,73 +0,0 @@
1
- name: 群聊配置
2
- view:
3
- - key: 默认配置
4
- path: "default"
5
- type: "group"
6
- part:
7
- - key: 消息冷却时间
8
- comment: 群聊中所有消息冷却时间,0则无限制
9
- path: "default.global_cd"
10
- type: "number"
11
- suffix: 秒
12
- associated:
13
- - file: App
14
- path: "GroupConfig.GroupCD"
15
- requirement: true
16
- - key: 个人消息冷却时间
17
- comment: 群聊中 每个人的消息冷却时间,0则无限制。注意,开启后所有消息,无论是否触发插件。
18
- path: "default.personal_cd"
19
- type: "number"
20
- suffix: 秒
21
- associated:
22
- - file: App
23
- path: "GroupConfig.GroupUserCD"
24
- requirement: true
25
- - key: 机器人响应模式
26
- comment: 机器人响应模式,0-所有 1-仅@机器人 2-仅回应主人 3-仅回应前缀 4-前缀或@机器人 5-主人无前缀,群员前缀或@机器人
27
- path: "default.mode"
28
- type: "select"
29
- associated:
30
- - file: App
31
- path: "GroupConfig.mode"
32
- requirement: true
33
- multiple: false
34
- item:
35
- - name: 所有
36
- value: 0
37
- - name: 仅@机器人
38
- value: 1
39
- - name: 仅回应主人
40
- value: 2
41
- - name: 仅回应前缀
42
- value: 3
43
- - name: 前缀或@机器人
44
- value: 4
45
- - name: 主人无前缀,群员前缀或@机器人
46
- value: 5
47
- - key: 机器人前缀
48
- comment: 机器人前缀 设置后前缀+指令触发机器人
49
- path: "default.ailas"
50
- type: "array"
51
- arrayType: "text"
52
- associated:
53
- - file: App
54
- path: "GroupConfig.alias"
55
- requirement: true
56
- - key: 白名单插件
57
- comment: 白名单插件、功能,只有在白名单中的插件、功能才会响应
58
- path: "default.enable"
59
- type: "array"
60
- arrayType: "text"
61
- associated:
62
- - file: App
63
- path: "GroupConfig.enable"
64
- requirement: true
65
- - key: 黑名单插件
66
- comment: 黑名单插件、功能,黑名单中的插件、功能不会响应
67
- path: "default.disable"
68
- type: "array"
69
- arrayType: "text"
70
- associated:
71
- - file: App
72
- path: "GroupConfig.disable"
73
- requirement: true
@@ -1,41 +0,0 @@
1
- name: pm2配置
2
- view:
3
- -
4
- key: 应用
5
- path: 'apps'
6
- type: 'group'
7
- part:
8
- -
9
- key: 启动名称
10
- path: 'apps.name'
11
- type: 'text'
12
- -
13
- key: 进程守护
14
- path: 'apps.autorestart'
15
- type: 'boolean'
16
- -
17
- key: 每分钟最大重启数量
18
- path: 'apps.max_restarts'
19
- type: 'number'
20
- -
21
- key: 内存溢出重启
22
- comment: 内存溢出重启,可以是“10M”、“100K”、“2G”等
23
- path: 'apps.max_memory_restart'
24
- type: 'text'
25
- -
26
- key: 重启延迟
27
- path: 'apps.restart_delay'
28
- type: 'number'
29
- suffix: 毫秒
30
- -
31
- key: 避免使用进程 id 后缀日志文件
32
- path: 'apps.merge_logs'
33
- type: 'boolean'
34
- -
35
- key: 错误日志路径
36
- path: 'apps.error_file'
37
- type: 'text'
38
- -
39
- key: 输出日志路径
40
- path: 'apps.out_file'
41
- type: 'text'
@@ -1,20 +0,0 @@
1
- name: 数据库配置
2
- view:
3
- - key: redis地址
4
- path: "host"
5
- type: "text"
6
- - key: redis端口
7
- path: "port"
8
- type: "number"
9
- - key: redis用户名
10
- comment: redis用户名,可以为空
11
- path: "username"
12
- type: "text"
13
- - key: redis密码
14
- comment: redis密码,没有密码可以为空
15
- path: "password"
16
- type: "password"
17
- - key: 数据库
18
- comment: 运行中第几个redis数据库
19
- path: "db"
20
- type: "number"
@@ -1,73 +0,0 @@
1
- name: 服务配置
2
- view:
3
- - key: 热更新是否重启服务
4
- comment: 当前文件热更新是否重启http、grpc服务
5
- path: "HotUpdate"
6
- type: "boolean"
7
- - key: http 服务器配置
8
- path: "http"
9
- type: "group"
10
- part:
11
- - key: 监听地址
12
- path: "http.host"
13
- type: "text"
14
- - key: 端口
15
- path: "http.port"
16
- type: "number"
17
- - key: grpc 服务器配置
18
- path: "grpc"
19
- type: "group"
20
- part:
21
- - key: 监听地址
22
- path: "grpc.host"
23
- type: "text"
24
- - key: Api请求超时时间
25
- path: "grpc.timeout"
26
- type: "number"
27
- suffix: 秒
28
- - key: websocket 服务器配置
29
- path: "websocket"
30
- type: "group"
31
- part:
32
- - key: API请求超时时间
33
- path: "websocket.timeout"
34
- type: "number"
35
- suffix: 秒
36
- - key: websocket 渲染器地址
37
- comment: ws://127.0.0.1:7005/ws/render
38
- path: "websocket.render"
39
- type: "array"
40
- arrayType: "text"
41
- - key: onebot11 正向WebSocket地址
42
- path: "websocket.OneBot11Host"
43
- type: "array"
44
- arrayType: "text"
45
- - key: onebot12 正向WebSocket地址
46
- path: "websocket.OneBot12Host"
47
- type: "array"
48
- arrayType: "text"
49
- - key: HTTP渲染器配置
50
- path: "HttpRender"
51
- type: "group"
52
- part:
53
- - key: 是否开启http渲染
54
- path: "HttpRender.enable"
55
- type: "boolean"
56
- - key: karin端Api地址
57
- comment: 公网 > 局域网 > 127
58
- path: "HttpRender.host"
59
- type: "url"
60
- - key: karin-puppeteer渲染器 post请求地址
61
- path: "HttpRender.post"
62
- type: "url"
63
- - key: karin-puppeteer渲染器 post请求token
64
- path: "HttpRender.token"
65
- type: "text"
66
- - key: 请求的非html或非有效路径的返回内容
67
- comment: 可以填http地址 例如:https://ys.mihoyo.com
68
- path: "HttpRender.not_found"
69
- type: "text"
70
- - key: Wormhole代理地址
71
- comment: 无公网IP环境的情况下使用
72
- path: "HttpRender.WormholeClient"
73
- type: "text"