koishi-plugin-openai-compatible 1.0.0 → 1.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/README.md CHANGED
@@ -9,9 +9,11 @@
9
9
  - 兼容所有支持OpenAI协议的AI聊天服务
10
10
  - 可自定义API端点、模型名称等参数
11
11
  - 支持系统预设提示词
12
+ - 支持为特定用户设置专属预设提示词
12
13
  - 可选的自定义指令名
13
14
  - 支持会话上下文记忆
14
15
  - 自动清理过期的聊天历史
16
+ - 提供管理命令,方便管理用户预设和历史记录
15
17
 
16
18
  ## 安装
17
19
 
@@ -33,6 +35,8 @@ npm install koishi-plugin-openai-compatible
33
35
  | systemPrompt | string | 你是一个有用的AI助手。 | 系统预设提示词(可选) |
34
36
  | commandName | string | - | 自定义指令名(可选,如不设置则默认处理所有消息) |
35
37
  | triggerPrefix | string | - | 触发前缀(可选,仅在未设置commandName时有效) |
38
+ | userPrompts | object | {} | 特定用户的预设提示词(可选,格式为 {"用户ID": "预设提示词"}) |
39
+ | thinkingPrompt | string | - | 思考提示词(可选,留空则不显示思考提示) |
36
40
 
37
41
  ## 使用方法
38
42
 
@@ -64,6 +68,39 @@ npm install koishi-plugin-openai-compatible
64
68
  - 本地部署的开源模型(如通过LM Studio、ollama等提供的兼容API)
65
69
  - 各种云服务提供的兼容OpenAI的API端点
66
70
 
71
+ ## 管理命令
72
+
73
+ 插件提供了一系列管理命令,用于管理用户预设和聊天历史:
74
+
75
+ ### 设置用户预设
76
+
77
+ 为特定用户设置专属的系统提示词:
78
+
79
+ ```
80
+ /openai-admin.set-user-prompt <用户ID> <预设提示词>
81
+ ```
82
+
83
+ 例如:
84
+ ```
85
+ /openai-admin.set-user-prompt 123456 你是一个专业的翻译助手,擅长中英文互译。
86
+ ```
87
+
88
+ ### 移除用户预设
89
+
90
+ 移除特定用户的专属系统提示词:
91
+
92
+ ```
93
+ /openai-admin.remove-user-prompt <用户ID>
94
+ ```
95
+
96
+ ### 清除用户历史
97
+
98
+ 清除特定用户的聊天历史记录:
99
+
100
+ ```
101
+ /openai-admin.clear-history <用户ID>
102
+ ```
103
+
67
104
  ## 许可证
68
105
 
69
106
  MIT
package/lib/config.d.ts CHANGED
@@ -7,6 +7,8 @@ export interface Config {
7
7
  systemPrompt: string;
8
8
  commandName?: string;
9
9
  triggerPrefix?: string;
10
+ userPrompts?: Record<string, string>;
11
+ thinkingPrompt?: string;
10
12
  }
11
13
  export interface Message {
12
14
  role: 'system' | 'user' | 'assistant';
@@ -0,0 +1,29 @@
1
+ export interface UserPrompt {
2
+ userId: string;
3
+ prompt: string;
4
+ createdAt: Date;
5
+ updatedAt: Date;
6
+ }
7
+ export interface ChatHistory {
8
+ userId: string;
9
+ messages: {
10
+ role: 'system' | 'user' | 'assistant';
11
+ content: string;
12
+ timestamp: Date;
13
+ }[];
14
+ lastUpdated: Date;
15
+ }
16
+ declare const tables: {
17
+ 'openai.userPrompts': {
18
+ userId: string;
19
+ prompt: string;
20
+ createdAt: string;
21
+ updatedAt: string;
22
+ };
23
+ 'openai.chatHistories': {
24
+ userId: string;
25
+ messages: string;
26
+ lastUpdated: string;
27
+ };
28
+ };
29
+ export default tables;
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tables = {
4
+ 'openai.userPrompts': {
5
+ userId: 'string',
6
+ prompt: 'text',
7
+ createdAt: 'timestamp',
8
+ updatedAt: 'timestamp'
9
+ },
10
+ 'openai.chatHistories': {
11
+ userId: 'string',
12
+ messages: 'json',
13
+ lastUpdated: 'timestamp'
14
+ }
15
+ };
16
+ exports.default = tables;
package/lib/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { Context, Schema } from 'koishi';
2
2
  import { Config as ConfigInterface } from './config';
3
3
  export declare const name = "openai-compatible";
4
- export declare const usage = "## \uD83E\uDD16 OpenAI\u517C\u5BB9\u804A\u5929\u63D2\u4EF6\n\n\u8BE5\u63D2\u4EF6\u652F\u6301\u4E0E\u6240\u6709\u517C\u5BB9OpenAI API\u7684\u5927\u6A21\u578B\u8FDB\u884C\u804A\u5929\u4EA4\u4E92\u3002\n\n### \u914D\u7F6E\u8BF4\u660E\n\n- **apiEndpoint**: API\u7AEF\u70B9URL\uFF0C\u4F8B\u5982 \"https://api.openai.com/v1\"\n- **apiKey**: API\u5BC6\u94A5\n- **model**: \u4F7F\u7528\u7684\u6A21\u578B\u540D\u79F0\uFF0C\u4F8B\u5982 \"gpt-3.5-turbo\"\n- **temperature**: \u6E29\u5EA6\u53C2\u6570\uFF0C\u63A7\u5236\u56DE\u590D\u7684\u968F\u673A\u6027 (0-2)\n- **maxTokens**: \u6700\u5927\u751F\u6210\u7684token\u6570\u91CF\n- **systemPrompt**: \u7CFB\u7EDF\u9884\u8BBE\u63D0\u793A\u8BCD\uFF08\u53EF\u9009\uFF09\n- **commandName**: \u81EA\u5B9A\u4E49\u6307\u4EE4\u540D\uFF08\u53EF\u9009\uFF0C\u5982\u4E0D\u8BBE\u7F6E\u5219\u9ED8\u8BA4\u5904\u7406\u6240\u6709\u6D88\u606F\uFF09\n- **triggerPrefix**: \u89E6\u53D1\u524D\u7F00\uFF08\u53EF\u9009\uFF0C\u4EC5\u5728\u672A\u8BBE\u7F6EcommandName\u65F6\u6709\u6548\uFF09\n\n### \u4F7F\u7528\u65B9\u6CD5\n\n\u5982\u679C\u8BBE\u7F6E\u4E86\u81EA\u5B9A\u4E49\u6307\u4EE4\u540D\uFF0C\u53EF\u4EE5\u901A\u8FC7 `/\u6307\u4EE4\u540D \u4F60\u7684\u95EE\u9898` \u6765\u4F7F\u7528\u3002\n\u5982\u679C\u672A\u8BBE\u7F6E\u6307\u4EE4\u540D\uFF0C\u5219\u6240\u6709\u6D88\u606F\u90FD\u4F1A\u89E6\u53D1\u63D2\u4EF6\uFF08\u53EF\u901A\u8FC7\u524D\u7F00\u8FC7\u6EE4\uFF09\u3002\n\n### \u793A\u4F8B\n\n```\n/chat \u4ECA\u5929\u5929\u6C14\u600E\u4E48\u6837\uFF1F\n```\n\n\u6216\u8005\u5728\u672A\u8BBE\u7F6E\u6307\u4EE4\u540D\u7684\u60C5\u51B5\u4E0B\u76F4\u63A5\u53D1\u9001\u6D88\u606F\uFF1A\n\n```\n\u4ECA\u5929\u5929\u6C14\u600E\u4E48\u6837\uFF1F\n```\n";
4
+ export declare const usage = "## \uD83E\uDD16 OpenAI\u517C\u5BB9\u804A\u5929\u63D2\u4EF6\n\n\u8BE5\u63D2\u4EF6\u652F\u6301\u4E0E\u6240\u6709\u517C\u5BB9OpenAI API\u7684\u5927\u6A21\u578B\u8FDB\u884C\u804A\u5929\u4EA4\u4E92\u3002\n\n### \u914D\u7F6E\u8BF4\u660E\n\n- **apiEndpoint**: API\u7AEF\u70B9URL\uFF0C\u4F8B\u5982 \"https://api.openai.com/v1\"\n- **apiKey**: API\u5BC6\u94A5\n- **model**: \u4F7F\u7528\u7684\u6A21\u578B\u540D\u79F0\uFF0C\u4F8B\u5982 \"gpt-3.5-turbo\"\n- **temperature**: \u6E29\u5EA6\u53C2\u6570\uFF0C\u63A7\u5236\u56DE\u590D\u7684\u968F\u673A\u6027 (0-2)\n- **maxTokens**: \u6700\u5927\u751F\u6210\u7684token\u6570\u91CF\n- **systemPrompt**: \u7CFB\u7EDF\u9884\u8BBE\u63D0\u793A\u8BCD\uFF08\u53EF\u9009\uFF09\n- **commandName**: \u81EA\u5B9A\u4E49\u6307\u4EE4\u540D\uFF08\u53EF\u9009\uFF0C\u5982\u4E0D\u8BBE\u7F6E\u5219\u9ED8\u8BA4\u5904\u7406\u6240\u6709\u6D88\u606F\uFF09\n- **triggerPrefix**: \u89E6\u53D1\u524D\u7F00\uFF08\u53EF\u9009\uFF0C\u4EC5\u5728\u672A\u8BBE\u7F6EcommandName\u65F6\u6709\u6548\uFF09\n- **userPrompts**: \u7279\u5B9A\u7528\u6237\u7684\u9884\u8BBE\u63D0\u793A\u8BCD\uFF08\u53EF\u9009\uFF0C\u683C\u5F0F\u4E3A {\"\u7528\u6237ID\": \"\u9884\u8BBE\u63D0\u793A\u8BCD\"}\uFF09\n- **thinkingPrompt**: \u601D\u8003\u63D0\u793A\u8BCD\uFF08\u53EF\u9009\uFF0C\u7559\u7A7A\u5219\u4E0D\u663E\u793A\u601D\u8003\u63D0\u793A\uFF09\n\n### \u4F7F\u7528\u65B9\u6CD5\n\n\u5982\u679C\u8BBE\u7F6E\u4E86\u81EA\u5B9A\u4E49\u6307\u4EE4\u540D\uFF0C\u53EF\u4EE5\u901A\u8FC7 `/\u6307\u4EE4\u540D \u4F60\u7684\u95EE\u9898` \u6765\u4F7F\u7528\u3002\n\u5982\u679C\u672A\u8BBE\u7F6E\u6307\u4EE4\u540D\uFF0C\u5219\u6240\u6709\u6D88\u606F\u90FD\u4F1A\u89E6\u53D1\u63D2\u4EF6\uFF08\u53EF\u901A\u8FC7\u524D\u7F00\u8FC7\u6EE4\uFF09\u3002\n\n### \u793A\u4F8B\n\n```\n/chat \u4ECA\u5929\u5929\u6C14\u600E\u4E48\u6837\uFF1F\n```\n\n\u6216\u8005\u5728\u672A\u8BBE\u7F6E\u6307\u4EE4\u540D\u7684\u60C5\u51B5\u4E0B\u76F4\u63A5\u53D1\u9001\u6D88\u606F\uFF1A\n\n```\n\u4ECA\u5929\u5929\u6C14\u600E\u4E48\u6837\uFF1F\n```\n";
5
5
  export declare const Config: Schema<ConfigInterface>;
6
6
  export declare function apply(ctx: Context, config: ConfigInterface): void;
package/lib/index.js CHANGED
@@ -19,6 +19,8 @@ exports.usage = `## 🤖 OpenAI兼容聊天插件
19
19
  - **systemPrompt**: 系统预设提示词(可选)
20
20
  - **commandName**: 自定义指令名(可选,如不设置则默认处理所有消息)
21
21
  - **triggerPrefix**: 触发前缀(可选,仅在未设置commandName时有效)
22
+ - **userPrompts**: 特定用户的预设提示词(可选,格式为 {"用户ID": "预设提示词"})
23
+ - **thinkingPrompt**: 思考提示词(可选,留空则不显示思考提示)
22
24
 
23
25
  ### 使用方法
24
26
 
@@ -67,10 +69,55 @@ exports.Config = koishi_1.Schema.object({
67
69
  triggerPrefix: koishi_1.Schema.string()
68
70
  .description('触发前缀(可选,仅在未设置commandName时有效)')
69
71
  .default(''),
72
+ userPrompts: koishi_1.Schema.dict(koishi_1.Schema.string())
73
+ .description('特定用户的预设提示词(可选,格式为 {"用户ID": "预设提示词"})')
74
+ .default({}),
75
+ thinkingPrompt: koishi_1.Schema.string()
76
+ .description('思考提示词(可选,留空则不显示思考提示)')
77
+ .default(''),
70
78
  });
71
79
  function apply(ctx, config) {
72
80
  // 创建服务实例
73
81
  const service = new service_1.OpenAICompatibleService(ctx, config);
82
+ // 注册管理命令
83
+ ctx.command('ai管理', '管理AI插件')
84
+ .usage('管理OpenAI兼容插件的设置和用户预设')
85
+ .userFields(['authority'])
86
+ .action(({ session }) => {
87
+ if (session.user.authority < 3)
88
+ return '权限不足';
89
+ return '管理功能已启用';
90
+ });
91
+ // 设置用户预设命令
92
+ ctx.command('ai预设 <userId:string> <prompt:text>', '设置用户专属AI行为')
93
+ .usage('设置用户专属AI行为\n示例:ai预设 123456 你是一个专业翻译')
94
+ .example('ai预设 123456 你是一个专业翻译')
95
+ .action(async ({ session }, userId, prompt) => {
96
+ if (!userId || !prompt)
97
+ return '请提供用户ID和预设提示词';
98
+ service.setUserPrompt(userId, prompt);
99
+ return `已为用户 ${userId} 设置预设提示词`;
100
+ });
101
+ // 移除用户预设命令
102
+ ctx.command('ai清除 <userId:string>', '删除用户专属设置')
103
+ .usage('移除特定用户的预设提示词')
104
+ .example('ai清除 123456')
105
+ .action(async ({ session }, userId) => {
106
+ if (!userId)
107
+ return '请提供用户ID';
108
+ service.removeUserPrompt(userId);
109
+ return `已移除用户 ${userId} 的预设提示词`;
110
+ });
111
+ // 清除用户历史命令
112
+ ctx.command('ai清除记录 <userId:string>', '清除用户聊天历史')
113
+ .usage('清除特定用户的聊天历史')
114
+ .example('ai清除记录 123456')
115
+ .action(async ({ session }, userId) => {
116
+ if (!userId)
117
+ return '请提供用户ID';
118
+ service.clearHistory(userId);
119
+ return `已清除用户 ${userId} 的聊天历史`;
120
+ });
74
121
  // 如果设置了指令名,则注册指令
75
122
  if (config.commandName) {
76
123
  ctx.command(config.commandName, '与AI助手对话')
@@ -78,7 +125,10 @@ function apply(ctx, config) {
78
125
  if (!text)
79
126
  return '请输入您想问的内容。';
80
127
  try {
81
- session.send(koishi_1.h.text('思考中...'));
128
+ // 仅当配置了思考提示时才发送
129
+ if (config.thinkingPrompt) {
130
+ session.send(koishi_1.h.text(config.thinkingPrompt));
131
+ }
82
132
  const response = await service.chat(session.userId, text);
83
133
  return response;
84
134
  }
@@ -106,8 +156,10 @@ function apply(ctx, config) {
106
156
  if (!text)
107
157
  return next();
108
158
  try {
109
- // 发送思考中提示
110
- await session.send(koishi_1.h.text('思考中...'));
159
+ // 仅当配置了思考提示时才发送
160
+ if (config.thinkingPrompt) {
161
+ await session.send(koishi_1.h.text(config.thinkingPrompt));
162
+ }
111
163
  // 获取回复
112
164
  const response = await service.chat(session.userId, text);
113
165
  return response;
package/lib/service.d.ts CHANGED
@@ -1,10 +1,10 @@
1
1
  import { Context, Service } from 'koishi';
2
2
  import { Config } from './config';
3
3
  export declare class OpenAICompatibleService extends Service {
4
- private histories;
4
+ config: Config;
5
5
  private readonly historyMaxLength;
6
6
  private readonly historyExpireTime;
7
- config: Config;
7
+ private histories;
8
8
  constructor(ctx: Context, config: Config);
9
9
  /**
10
10
  * 清理过期的历史记录
@@ -26,4 +26,12 @@ export declare class OpenAICompatibleService extends Service {
26
26
  * 清除用户的聊天历史
27
27
  */
28
28
  clearHistory(userId: string): void;
29
+ /**
30
+ * 设置特定用户的预设提示词
31
+ */
32
+ setUserPrompt(userId: string, prompt: string): Promise<void>;
33
+ /**
34
+ * 移除特定用户的预设提示词
35
+ */
36
+ removeUserPrompt(userId: string): void;
29
37
  }
package/lib/service.js CHANGED
@@ -1,18 +1,31 @@
1
1
  "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
2
  Object.defineProperty(exports, "__esModule", { value: true });
6
3
  exports.OpenAICompatibleService = void 0;
7
4
  const koishi_1 = require("koishi");
8
- const axios_1 = __importDefault(require("axios"));
9
5
  class OpenAICompatibleService extends koishi_1.Service {
10
6
  constructor(ctx, config) {
11
7
  super(ctx, 'openai-compatible');
12
- this.histories = new Map();
13
8
  this.historyMaxLength = 10; // 历史记录最大长度
14
9
  this.historyExpireTime = 30 * 60 * 1000; // 历史记录过期时间(30分钟)
10
+ this.histories = new Map();
15
11
  this.config = config;
12
+ this.ctx = ctx;
13
+ // 初始化数据库
14
+ ctx.model.extend('openai.userPrompts', {
15
+ userId: 'string',
16
+ prompt: 'text',
17
+ createdAt: 'timestamp',
18
+ updatedAt: 'timestamp',
19
+ }, {
20
+ primary: 'userId'
21
+ });
22
+ ctx.model.extend('openai.chatHistories', {
23
+ userId: 'string',
24
+ messages: 'json',
25
+ lastUpdated: 'timestamp',
26
+ }, {
27
+ primary: 'userId'
28
+ });
16
29
  // 定期清理过期的历史记录
17
30
  ctx.setInterval(() => {
18
31
  this.cleanExpiredHistories();
@@ -21,13 +34,11 @@ class OpenAICompatibleService extends koishi_1.Service {
21
34
  /**
22
35
  * 清理过期的历史记录
23
36
  */
24
- cleanExpiredHistories() {
25
- const now = Date.now();
26
- for (const [userId, history] of this.histories.entries()) {
27
- if (now - history.lastUpdated > this.historyExpireTime) {
28
- this.histories.delete(userId);
29
- }
30
- }
37
+ async cleanExpiredHistories() {
38
+ const expireTime = new Date(Date.now() - this.historyExpireTime);
39
+ await this.ctx.database.remove('openai.chatHistories', {
40
+ lastUpdated: { $lt: expireTime }
41
+ });
31
42
  }
32
43
  /**
33
44
  * 获取用户的聊天历史
@@ -74,11 +85,16 @@ class OpenAICompatibleService extends koishi_1.Service {
74
85
  // 获取用户历史记录
75
86
  const history = this.getUserHistory(userId);
76
87
  // 如果是首次对话且有系统提示,添加系统提示
77
- if (history.messages.length === 0 && this.config.systemPrompt) {
78
- this.addMessageToHistory(userId, {
79
- role: 'system',
80
- content: this.config.systemPrompt
81
- });
88
+ if (history.messages.length === 0) {
89
+ // 检查是否有特定用户的预设提示词
90
+ const userPrompt = this.config.userPrompts?.[userId];
91
+ const systemPrompt = userPrompt || this.config.systemPrompt;
92
+ if (systemPrompt) {
93
+ this.addMessageToHistory(userId, {
94
+ role: 'system',
95
+ content: systemPrompt
96
+ });
97
+ }
82
98
  }
83
99
  // 添加用户消息
84
100
  this.addMessageToHistory(userId, {
@@ -87,7 +103,7 @@ class OpenAICompatibleService extends koishi_1.Service {
87
103
  });
88
104
  try {
89
105
  // 调用API
90
- const response = await axios_1.default.post(`${this.config.apiEndpoint}/chat/completions`, {
106
+ const response = await this.ctx.http.post(`${this.config.apiEndpoint}/chat/completions`, {
91
107
  model: this.config.model,
92
108
  messages: history.messages,
93
109
  temperature: this.config.temperature,
@@ -99,7 +115,7 @@ class OpenAICompatibleService extends koishi_1.Service {
99
115
  }
100
116
  });
101
117
  // 处理响应
102
- const assistantMessage = response.data.choices[0]?.message;
118
+ const assistantMessage = response.choices[0]?.message;
103
119
  if (!assistantMessage || !assistantMessage.content) {
104
120
  throw new Error('API返回的响应格式不正确');
105
121
  }
@@ -114,14 +130,15 @@ class OpenAICompatibleService extends koishi_1.Service {
114
130
  this.ctx.logger('openai-compatible').error('API调用失败:', error);
115
131
  // 从历史记录中移除最后一条用户消息(因为没有得到回复)
116
132
  history.messages.pop();
117
- if (error.response) {
118
- throw new Error(`API调用失败: ${error.response.status} ${error.response.statusText}`);
133
+ // 处理 ctx.http 的错误
134
+ if (error.status) {
135
+ throw new Error(`API调用失败: ${error.status} ${error.statusText || 'Bad Request'}`);
119
136
  }
120
- else if (error.request) {
137
+ else if (error.code === 'ETIMEDOUT' || error.code === 'ECONNABORTED') {
121
138
  throw new Error('API请求超时或无响应');
122
139
  }
123
140
  else {
124
- throw new Error(`请求错误: ${error.message}`);
141
+ throw new Error(`请求错误: ${error.message || '未知错误'}`);
125
142
  }
126
143
  }
127
144
  }
@@ -131,5 +148,43 @@ class OpenAICompatibleService extends koishi_1.Service {
131
148
  clearHistory(userId) {
132
149
  this.histories.delete(userId);
133
150
  }
151
+ /**
152
+ * 设置特定用户的预设提示词
153
+ */
154
+ async setUserPrompt(userId, prompt) {
155
+ await this.ctx.database.upsert('openai.userPrompts', [{
156
+ userId,
157
+ prompt,
158
+ updatedAt: new Date()
159
+ }]);
160
+ // 如果用户已有历史记录,更新系统提示
161
+ if (this.histories.has(userId)) {
162
+ const history = this.getUserHistory(userId);
163
+ const systemIndex = history.messages.findIndex(m => m.role === 'system');
164
+ if (systemIndex >= 0) {
165
+ // 替换现有的系统提示
166
+ history.messages[systemIndex] = {
167
+ role: 'system',
168
+ content: prompt
169
+ };
170
+ }
171
+ else if (history.messages.length > 0) {
172
+ // 在开头插入系统提示
173
+ history.messages.unshift({
174
+ role: 'system',
175
+ content: prompt
176
+ });
177
+ }
178
+ history.lastUpdated = Date.now();
179
+ }
180
+ }
181
+ /**
182
+ * 移除特定用户的预设提示词
183
+ */
184
+ removeUserPrompt(userId) {
185
+ if (this.config.userPrompts && this.config.userPrompts[userId]) {
186
+ delete this.config.userPrompts[userId];
187
+ }
188
+ }
134
189
  }
135
190
  exports.OpenAICompatibleService = OpenAICompatibleService;
package/package.json CHANGED
@@ -1,43 +1,43 @@
1
1
  {
2
- "name": "koishi-plugin-openai-compatible",
3
- "version": "1.0.0",
4
- "description": "Koishi plugin compatible with OpenAI API for various AI chat services",
5
- "main": "lib/index.js",
6
- "scripts": {
7
- "build": "tsc",
8
- "test": "echo \"Error: no test specified\" && exit 1"
9
- },
10
- "keywords": [
11
- "koishi",
12
- "plugin",
13
- "openai",
14
- "chat",
15
- "ai"
16
- ],
17
- "author": "",
18
- "license": "MIT",
19
- "type": "commonjs",
20
- "dependencies": {
21
- "@koishijs/plugin-help": "^2.4.5",
22
- "axios": "^1.11.0",
23
- "koishi": "^4.0.0"
24
- },
25
- "peerDependencies": {
26
- "koishi": "^4.0.0"
27
- },
28
- "koishi": {
29
- "description": {
30
- "en": "Chat plugin compatible with OpenAI API",
31
- "zh": "兼容OpenAI API的聊天插件"
2
+ "name": "koishi-plugin-openai-compatible",
3
+ "version": "1.0.2",
4
+ "description": "这是一个适用于KoishiOpenAI兼容聊天插件,支持与所有兼容OpenAI API的大模型进行聊天交互。",
5
+ "main": "lib/index.js",
6
+ "scripts": {
7
+ "build": "tsc",
8
+ "test": "echo \"Error: no test specified\" && exit 1"
32
9
  },
33
- "service": {
34
- "required": [
35
- "database"
36
- ]
10
+ "keywords": [
11
+ "koishi",
12
+ "plugin",
13
+ "openai",
14
+ "chat",
15
+ "ai"
16
+ ],
17
+ "author": "",
18
+ "license": "MIT",
19
+ "type": "commonjs",
20
+ "dependencies": {
21
+ "@koishijs/plugin-help": "^2.4.5",
22
+ "koishi": "^4.0.0"
23
+ },
24
+ "peerDependencies": {
25
+ "koishi": "^4.0.0"
26
+ },
27
+ "koishi": {
28
+ "description": {
29
+ "en": "Chat plugin compatible with OpenAI API",
30
+ "zh": "兼容OpenAI API的聊天插件"
31
+ },
32
+ "service": {
33
+ "required": [
34
+ "database"
35
+ ]
36
+ }
37
+ },
38
+ "devDependencies": {
39
+ "@types/node": "^24.3.1",
40
+ "typescript": "^5.9.2"
37
41
  }
38
- },
39
- "devDependencies": {
40
- "@types/node": "^24.3.1",
41
- "typescript": "^5.9.2"
42
42
  }
43
- }
43
+
package/src/config.ts CHANGED
@@ -1,21 +1,23 @@
1
1
  export interface Config {
2
- apiEndpoint: string
3
- apiKey: string
4
- model: string
5
- temperature: number
6
- maxTokens: number
7
- systemPrompt: string
8
- commandName?: string
9
- triggerPrefix?: string
10
- }
11
-
12
- export interface Message {
13
- role: 'system' | 'user' | 'assistant'
14
- content: string
15
- }
16
-
17
- export interface ChatHistory {
18
- userId: string
19
- messages: Message[]
20
- lastUpdated: number
21
- }
2
+ apiEndpoint: string
3
+ apiKey: string
4
+ model: string
5
+ temperature: number
6
+ maxTokens: number
7
+ systemPrompt: string
8
+ commandName?: string
9
+ triggerPrefix?: string
10
+ userPrompts?: Record<string, string>
11
+ thinkingPrompt?: string
12
+ }
13
+
14
+ export interface Message {
15
+ role: 'system' | 'user' | 'assistant'
16
+ content: string
17
+ }
18
+
19
+ export interface ChatHistory {
20
+ userId: string
21
+ messages: Message[]
22
+ lastUpdated: number
23
+ }
@@ -0,0 +1,34 @@
1
+ import { Tables } from 'koishi'
2
+
3
+ export interface UserPrompt {
4
+ userId: string
5
+ prompt: string
6
+ createdAt: Date
7
+ updatedAt: Date
8
+ }
9
+
10
+ export interface ChatHistory {
11
+ userId: string
12
+ messages: {
13
+ role: 'system' | 'user' | 'assistant'
14
+ content: string
15
+ timestamp: Date
16
+ }[]
17
+ lastUpdated: Date
18
+ }
19
+
20
+ const tables = {
21
+ 'openai.userPrompts': {
22
+ userId: 'string',
23
+ prompt: 'text',
24
+ createdAt: 'timestamp',
25
+ updatedAt: 'timestamp'
26
+ },
27
+ 'openai.chatHistories': {
28
+ userId: 'string',
29
+ messages: 'json',
30
+ lastUpdated: 'timestamp'
31
+ }
32
+ };
33
+
34
+ export default tables;
package/src/index.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { Context, Schema, h } from 'koishi'
1
+ import { Context, Schema, h, Database } from 'koishi'
2
2
  import { OpenAICompatibleService } from './service'
3
3
  import { Config as ConfigInterface } from './config'
4
4
 
@@ -17,6 +17,8 @@ export const usage = `## 🤖 OpenAI兼容聊天插件
17
17
  - **systemPrompt**: 系统预设提示词(可选)
18
18
  - **commandName**: 自定义指令名(可选,如不设置则默认处理所有消息)
19
19
  - **triggerPrefix**: 触发前缀(可选,仅在未设置commandName时有效)
20
+ - **userPrompts**: 特定用户的预设提示词(可选,格式为 {"用户ID": "预设提示词"})
21
+ - **thinkingPrompt**: 思考提示词(可选,留空则不显示思考提示)
20
22
 
21
23
  ### 使用方法
22
24
 
@@ -66,11 +68,59 @@ export const Config: Schema<ConfigInterface> = Schema.object({
66
68
  triggerPrefix: Schema.string()
67
69
  .description('触发前缀(可选,仅在未设置commandName时有效)')
68
70
  .default(''),
71
+ userPrompts: Schema.dict(Schema.string())
72
+ .description('特定用户的预设提示词(可选,格式为 {"用户ID": "预设提示词"})')
73
+ .default({}),
74
+ thinkingPrompt: Schema.string()
75
+ .description('思考提示词(可选,留空则不显示思考提示)')
76
+ .default(''),
69
77
  })
70
78
 
71
79
  export function apply(ctx: Context, config: ConfigInterface) {
72
80
  // 创建服务实例
73
81
  const service = new OpenAICompatibleService(ctx, config)
82
+
83
+ // 注册管理命令
84
+ ctx.command('ai管理', '管理AI插件')
85
+ .usage('管理OpenAI兼容插件的设置和用户预设')
86
+ .userFields(['authority'])
87
+ .action(({ session }) => {
88
+ if (session.user.authority < 3) return '权限不足'
89
+ return '管理功能已启用'
90
+ })
91
+
92
+ // 设置用户预设命令
93
+ ctx.command('ai预设 <userId:string> <prompt:text>', '设置用户专属AI行为')
94
+ .usage('设置用户专属AI行为\n示例:ai预设 123456 你是一个专业翻译')
95
+ .example('ai预设 123456 你是一个专业翻译')
96
+ .action(async ({ session }, userId, prompt) => {
97
+ if (!userId || !prompt) return '请提供用户ID和预设提示词'
98
+
99
+ service.setUserPrompt(userId, prompt)
100
+ return `已为用户 ${userId} 设置预设提示词`
101
+ })
102
+
103
+ // 移除用户预设命令
104
+ ctx.command('ai清除 <userId:string>', '删除用户专属设置')
105
+ .usage('移除特定用户的预设提示词')
106
+ .example('ai清除 123456')
107
+ .action(async ({ session }, userId) => {
108
+ if (!userId) return '请提供用户ID'
109
+
110
+ service.removeUserPrompt(userId)
111
+ return `已移除用户 ${userId} 的预设提示词`
112
+ })
113
+
114
+ // 清除用户历史命令
115
+ ctx.command('ai清除记录 <userId:string>', '清除用户聊天历史')
116
+ .usage('清除特定用户的聊天历史')
117
+ .example('ai清除记录 123456')
118
+ .action(async ({ session }, userId) => {
119
+ if (!userId) return '请提供用户ID'
120
+
121
+ service.clearHistory(userId)
122
+ return `已清除用户 ${userId} 的聊天历史`
123
+ })
74
124
 
75
125
  // 如果设置了指令名,则注册指令
76
126
  if (config.commandName) {
@@ -79,7 +129,10 @@ export function apply(ctx: Context, config: ConfigInterface) {
79
129
  if (!text) return '请输入您想问的内容。'
80
130
 
81
131
  try {
82
- session.send(h.text('思考中...'))
132
+ // 仅当配置了思考提示时才发送
133
+ if (config.thinkingPrompt) {
134
+ session.send(h.text(config.thinkingPrompt))
135
+ }
83
136
  const response = await service.chat(session.userId, text)
84
137
  return response
85
138
  } catch (error) {
@@ -107,8 +160,10 @@ export function apply(ctx: Context, config: ConfigInterface) {
107
160
  if (!text) return next()
108
161
 
109
162
  try {
110
- // 发送思考中提示
111
- await session.send(h.text('思考中...'))
163
+ // 仅当配置了思考提示时才发送
164
+ if (config.thinkingPrompt) {
165
+ await session.send(h.text(config.thinkingPrompt))
166
+ }
112
167
 
113
168
  // 获取回复
114
169
  const response = await service.chat(session.userId, text)
package/src/service.ts CHANGED
@@ -1,33 +1,56 @@
1
1
  import { Context, Service } from 'koishi'
2
- import axios from 'axios'
3
- import { Config, Message, ChatHistory } from './config'
2
+ import { Config, Message } from './config'
3
+ import Database from './database'
4
+
5
+ interface ChatHistory {
6
+ userId: string;
7
+ messages: Message[];
8
+ lastUpdated: number;
9
+ }
4
10
 
5
11
  export class OpenAICompatibleService extends Service {
6
- private histories: Map<string, ChatHistory> = new Map()
12
+ public config: Config
7
13
  private readonly historyMaxLength = 10 // 历史记录最大长度
8
14
  private readonly historyExpireTime = 30 * 60 * 1000 // 历史记录过期时间(30分钟)
9
-
10
- public config: Config
11
-
15
+ private histories = new Map<string, ChatHistory>()
16
+
12
17
  constructor(ctx: Context, config: Config) {
13
- super(ctx, 'openai-compatible')
14
- this.config = config
18
+ super(ctx, 'openai-compatible');
19
+ this.config = config;
20
+ this.ctx = ctx;
21
+
22
+ // 初始化数据库
23
+ ctx.model.extend('openai.userPrompts' as any, {
24
+ userId: 'string',
25
+ prompt: 'text',
26
+ createdAt: 'timestamp',
27
+ updatedAt: 'timestamp',
28
+ }, {
29
+ primary: 'userId'
30
+ });
31
+
32
+ ctx.model.extend('openai.chatHistories' as any, {
33
+ userId: 'string',
34
+ messages: 'json',
35
+ lastUpdated: 'timestamp',
36
+ }, {
37
+ primary: 'userId'
38
+ });
39
+
15
40
  // 定期清理过期的历史记录
16
41
  ctx.setInterval(() => {
17
- this.cleanExpiredHistories()
18
- }, 5 * 60 * 1000) // 每5分钟清理一次
42
+ this.cleanExpiredHistories();
43
+ }, 5 * 60 * 1000); // 每5分钟清理一次
19
44
  }
20
45
 
21
46
  /**
22
47
  * 清理过期的历史记录
23
48
  */
24
- private cleanExpiredHistories() {
25
- const now = Date.now()
26
- for (const [userId, history] of this.histories.entries()) {
27
- if (now - history.lastUpdated > this.historyExpireTime) {
28
- this.histories.delete(userId)
29
- }
30
- }
49
+ private async cleanExpiredHistories(): Promise<void> {
50
+ const expireTime = new Date(Date.now() - this.historyExpireTime)
51
+ await this.ctx.database.remove('openai.chatHistories' as any, {
52
+ lastUpdated: { $lt: expireTime }
53
+ })
31
54
  }
32
55
 
33
56
  /**
@@ -82,11 +105,17 @@ export class OpenAICompatibleService extends Service {
82
105
  const history = this.getUserHistory(userId)
83
106
 
84
107
  // 如果是首次对话且有系统提示,添加系统提示
85
- if (history.messages.length === 0 && this.config.systemPrompt) {
86
- this.addMessageToHistory(userId, {
87
- role: 'system',
88
- content: this.config.systemPrompt
89
- })
108
+ if (history.messages.length === 0) {
109
+ // 检查是否有特定用户的预设提示词
110
+ const userPrompt = this.config.userPrompts?.[userId]
111
+ const systemPrompt = userPrompt || this.config.systemPrompt
112
+
113
+ if (systemPrompt) {
114
+ this.addMessageToHistory(userId, {
115
+ role: 'system',
116
+ content: systemPrompt
117
+ })
118
+ }
90
119
  }
91
120
 
92
121
  // 添加用户消息
@@ -97,7 +126,7 @@ export class OpenAICompatibleService extends Service {
97
126
 
98
127
  try {
99
128
  // 调用API
100
- const response = await axios.post(
129
+ const response = await this.ctx.http.post(
101
130
  `${this.config.apiEndpoint}/chat/completions`,
102
131
  {
103
132
  model: this.config.model,
@@ -114,7 +143,7 @@ export class OpenAICompatibleService extends Service {
114
143
  )
115
144
 
116
145
  // 处理响应
117
- const assistantMessage = response.data.choices[0]?.message
146
+ const assistantMessage = response.choices[0]?.message
118
147
 
119
148
  if (!assistantMessage || !assistantMessage.content) {
120
149
  throw new Error('API返回的响应格式不正确')
@@ -133,12 +162,13 @@ export class OpenAICompatibleService extends Service {
133
162
  // 从历史记录中移除最后一条用户消息(因为没有得到回复)
134
163
  history.messages.pop()
135
164
 
136
- if (error.response) {
137
- throw new Error(`API调用失败: ${error.response.status} ${error.response.statusText}`)
138
- } else if (error.request) {
165
+ // 处理 ctx.http 的错误
166
+ if (error.status) {
167
+ throw new Error(`API调用失败: ${error.status} ${error.statusText || 'Bad Request'}`)
168
+ } else if (error.code === 'ETIMEDOUT' || error.code === 'ECONNABORTED') {
139
169
  throw new Error('API请求超时或无响应')
140
170
  } else {
141
- throw new Error(`请求错误: ${error.message}`)
171
+ throw new Error(`请求错误: ${error.message || '未知错误'}`)
142
172
  }
143
173
  }
144
174
  }
@@ -149,4 +179,46 @@ export class OpenAICompatibleService extends Service {
149
179
  clearHistory(userId: string): void {
150
180
  this.histories.delete(userId)
151
181
  }
182
+
183
+ /**
184
+ * 设置特定用户的预设提示词
185
+ */
186
+ async setUserPrompt(userId: string, prompt: string): Promise<void> {
187
+ await this.ctx.database.upsert('openai.userPrompts' as any, [{
188
+ userId,
189
+ prompt,
190
+ updatedAt: new Date()
191
+ }])
192
+
193
+ // 如果用户已有历史记录,更新系统提示
194
+ if (this.histories.has(userId)) {
195
+ const history = this.getUserHistory(userId)
196
+ const systemIndex = history.messages.findIndex(m => m.role === 'system')
197
+
198
+ if (systemIndex >= 0) {
199
+ // 替换现有的系统提示
200
+ history.messages[systemIndex] = {
201
+ role: 'system',
202
+ content: prompt
203
+ }
204
+ } else if (history.messages.length > 0) {
205
+ // 在开头插入系统提示
206
+ history.messages.unshift({
207
+ role: 'system',
208
+ content: prompt
209
+ })
210
+ }
211
+
212
+ history.lastUpdated = Date.now()
213
+ }
214
+ }
215
+
216
+ /**
217
+ * 移除特定用户的预设提示词
218
+ */
219
+ removeUserPrompt(userId: string): void {
220
+ if (this.config.userPrompts && this.config.userPrompts[userId]) {
221
+ delete this.config.userPrompts[userId]
222
+ }
223
+ }
152
224
  }
@@ -0,0 +1 @@
1
+ {"fileNames":["./node_modules/typescript/lib/lib.es5.d.ts","./node_modules/typescript/lib/lib.es2015.d.ts","./node_modules/typescript/lib/lib.es2016.d.ts","./node_modules/typescript/lib/lib.es2017.d.ts","./node_modules/typescript/lib/lib.es2018.d.ts","./node_modules/typescript/lib/lib.es2019.d.ts","./node_modules/typescript/lib/lib.es2020.d.ts","./node_modules/typescript/lib/lib.dom.d.ts","./node_modules/typescript/lib/lib.dom.iterable.d.ts","./node_modules/typescript/lib/lib.dom.asynciterable.d.ts","./node_modules/typescript/lib/lib.webworker.importscripts.d.ts","./node_modules/typescript/lib/lib.scripthost.d.ts","./node_modules/typescript/lib/lib.es2015.core.d.ts","./node_modules/typescript/lib/lib.es2015.collection.d.ts","./node_modules/typescript/lib/lib.es2015.generator.d.ts","./node_modules/typescript/lib/lib.es2015.iterable.d.ts","./node_modules/typescript/lib/lib.es2015.promise.d.ts","./node_modules/typescript/lib/lib.es2015.proxy.d.ts","./node_modules/typescript/lib/lib.es2015.reflect.d.ts","./node_modules/typescript/lib/lib.es2015.symbol.d.ts","./node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","./node_modules/typescript/lib/lib.es2016.array.include.d.ts","./node_modules/typescript/lib/lib.es2016.intl.d.ts","./node_modules/typescript/lib/lib.es2017.arraybuffer.d.ts","./node_modules/typescript/lib/lib.es2017.date.d.ts","./node_modules/typescript/lib/lib.es2017.object.d.ts","./node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","./node_modules/typescript/lib/lib.es2017.string.d.ts","./node_modules/typescript/lib/lib.es2017.intl.d.ts","./node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","./node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","./node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","./node_modules/typescript/lib/lib.es2018.intl.d.ts","./node_modules/typescript/lib/lib.es2018.promise.d.ts","./node_modules/typescript/lib/lib.es2018.regexp.d.ts","./node_modules/typescript/lib/lib.es2019.array.d.ts","./node_modules/typescript/lib/lib.es2019.object.d.ts","./node_modules/typescript/lib/lib.es2019.string.d.ts","./node_modules/typescript/lib/lib.es2019.symbol.d.ts","./node_modules/typescript/lib/lib.es2019.intl.d.ts","./node_modules/typescript/lib/lib.es2020.bigint.d.ts","./node_modules/typescript/lib/lib.es2020.date.d.ts","./node_modules/typescript/lib/lib.es2020.promise.d.ts","./node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","./node_modules/typescript/lib/lib.es2020.string.d.ts","./node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","./node_modules/typescript/lib/lib.es2020.intl.d.ts","./node_modules/typescript/lib/lib.es2020.number.d.ts","./node_modules/typescript/lib/lib.esnext.disposable.d.ts","./node_modules/typescript/lib/lib.esnext.float16.d.ts","./node_modules/typescript/lib/lib.decorators.d.ts","./node_modules/typescript/lib/lib.decorators.legacy.d.ts","./node_modules/typescript/lib/lib.es2020.full.d.ts","./node_modules/cosmokit/lib/index.d.ts","./node_modules/@satorijs/element/lib/index.d.ts","./node_modules/@satorijs/element/jsx-runtime.d.ts","./src/config.ts","./node_modules/inaba/lib/index.d.ts","./node_modules/@koishijs/utils/lib/index.d.ts","./node_modules/@cordisjs/core/lib/index.d.ts","./node_modules/reggol/index.d.ts","./node_modules/@cordisjs/logger/lib/index.d.ts","./node_modules/schemastery/lib/index.d.ts","./node_modules/@cordisjs/schema/lib/index.d.ts","./node_modules/@cordisjs/timer/lib/index.d.ts","./node_modules/cordis/lib/index.d.ts","./node_modules/minato/lib/index.d.ts","./node_modules/@satorijs/protocol/lib/index.d.ts","./node_modules/@types/node/compatibility/iterators.d.ts","./node_modules/@types/node/globals.typedarray.d.ts","./node_modules/@types/node/buffer.buffer.d.ts","./node_modules/@types/node/globals.d.ts","./node_modules/@types/node/web-globals/abortcontroller.d.ts","./node_modules/@types/node/web-globals/domexception.d.ts","./node_modules/@types/node/web-globals/events.d.ts","./node_modules/buffer/index.d.ts","./node_modules/undici-types/utility.d.ts","./node_modules/undici-types/header.d.ts","./node_modules/undici-types/readable.d.ts","./node_modules/undici-types/fetch.d.ts","./node_modules/undici-types/formdata.d.ts","./node_modules/undici-types/connector.d.ts","./node_modules/undici-types/client-stats.d.ts","./node_modules/undici-types/client.d.ts","./node_modules/undici-types/errors.d.ts","./node_modules/undici-types/dispatcher.d.ts","./node_modules/undici-types/global-dispatcher.d.ts","./node_modules/undici-types/global-origin.d.ts","./node_modules/undici-types/pool-stats.d.ts","./node_modules/undici-types/pool.d.ts","./node_modules/undici-types/handlers.d.ts","./node_modules/undici-types/balanced-pool.d.ts","./node_modules/undici-types/h2c-client.d.ts","./node_modules/undici-types/agent.d.ts","./node_modules/undici-types/mock-interceptor.d.ts","./node_modules/undici-types/mock-call-history.d.ts","./node_modules/undici-types/mock-agent.d.ts","./node_modules/undici-types/mock-client.d.ts","./node_modules/undici-types/mock-pool.d.ts","./node_modules/undici-types/mock-errors.d.ts","./node_modules/undici-types/proxy-agent.d.ts","./node_modules/undici-types/env-http-proxy-agent.d.ts","./node_modules/undici-types/retry-handler.d.ts","./node_modules/undici-types/retry-agent.d.ts","./node_modules/undici-types/api.d.ts","./node_modules/undici-types/cache-interceptor.d.ts","./node_modules/undici-types/interceptors.d.ts","./node_modules/undici-types/util.d.ts","./node_modules/undici-types/cookies.d.ts","./node_modules/undici-types/patch.d.ts","./node_modules/undici-types/websocket.d.ts","./node_modules/undici-types/eventsource.d.ts","./node_modules/undici-types/diagnostics-channel.d.ts","./node_modules/undici-types/content-type.d.ts","./node_modules/undici-types/cache.d.ts","./node_modules/undici-types/index.d.ts","./node_modules/@types/node/web-globals/fetch.d.ts","./node_modules/@types/node/web-globals/navigator.d.ts","./node_modules/@types/node/web-globals/storage.d.ts","./node_modules/@types/node/assert.d.ts","./node_modules/@types/node/assert/strict.d.ts","./node_modules/@types/node/async_hooks.d.ts","./node_modules/@types/node/buffer.d.ts","./node_modules/@types/node/child_process.d.ts","./node_modules/@types/node/cluster.d.ts","./node_modules/@types/node/console.d.ts","./node_modules/@types/node/constants.d.ts","./node_modules/@types/node/crypto.d.ts","./node_modules/@types/node/dgram.d.ts","./node_modules/@types/node/diagnostics_channel.d.ts","./node_modules/@types/node/dns.d.ts","./node_modules/@types/node/dns/promises.d.ts","./node_modules/@types/node/domain.d.ts","./node_modules/@types/node/events.d.ts","./node_modules/@types/node/fs.d.ts","./node_modules/@types/node/fs/promises.d.ts","./node_modules/@types/node/http.d.ts","./node_modules/@types/node/http2.d.ts","./node_modules/@types/node/https.d.ts","./node_modules/@types/node/inspector.d.ts","./node_modules/@types/node/module.d.ts","./node_modules/@types/node/net.d.ts","./node_modules/@types/node/os.d.ts","./node_modules/@types/node/path.d.ts","./node_modules/@types/node/perf_hooks.d.ts","./node_modules/@types/node/process.d.ts","./node_modules/@types/node/punycode.d.ts","./node_modules/@types/node/querystring.d.ts","./node_modules/@types/node/readline.d.ts","./node_modules/@types/node/readline/promises.d.ts","./node_modules/@types/node/repl.d.ts","./node_modules/@types/node/sea.d.ts","./node_modules/@types/node/sqlite.d.ts","./node_modules/@types/node/stream.d.ts","./node_modules/@types/node/stream/promises.d.ts","./node_modules/@types/node/stream/consumers.d.ts","./node_modules/@types/node/stream/web.d.ts","./node_modules/@types/node/string_decoder.d.ts","./node_modules/@types/node/test.d.ts","./node_modules/@types/node/timers.d.ts","./node_modules/@types/node/timers/promises.d.ts","./node_modules/@types/node/tls.d.ts","./node_modules/@types/node/trace_events.d.ts","./node_modules/@types/node/tty.d.ts","./node_modules/@types/node/url.d.ts","./node_modules/@types/node/util.d.ts","./node_modules/@types/node/v8.d.ts","./node_modules/@types/node/vm.d.ts","./node_modules/@types/node/wasi.d.ts","./node_modules/@types/node/worker_threads.d.ts","./node_modules/@types/node/zlib.d.ts","./node_modules/@types/node/index.d.ts","./node_modules/@types/ws/index.d.ts","./node_modules/@cordisjs/plugin-http/lib/index.d.ts","./node_modules/@satorijs/core/node_modules/path-to-regexp/dist/index.d.ts","./node_modules/@satorijs/core/lib/index.d.ts","./node_modules/@koishijs/i18n-utils/lib/index.d.ts","./node_modules/@koishijs/core/lib/index.d.ts","./node_modules/ns-require/lib/index.d.ts","./node_modules/@koishijs/loader/lib/shared.d.ts","./node_modules/@koishijs/loader/lib/index.d.ts","./node_modules/koishi/lib/index.d.ts","./src/database.ts","./src/service.ts","./src/index.ts","./node_modules/@types/accepts/index.d.ts","./node_modules/@types/connect/index.d.ts","./node_modules/@types/body-parser/index.d.ts","./node_modules/@types/qs/index.d.ts","./node_modules/@types/co-body/index.d.ts","./node_modules/@types/content-disposition/index.d.ts","./node_modules/@types/mime/index.d.ts","./node_modules/@types/send/index.d.ts","./node_modules/@types/range-parser/index.d.ts","./node_modules/@types/express-serve-static-core/index.d.ts","./node_modules/@types/http-errors/index.d.ts","./node_modules/@types/serve-static/index.d.ts","./node_modules/@types/express/index.d.ts","./node_modules/@types/keygrip/index.d.ts","./node_modules/@types/cookies/index.d.ts","./node_modules/@types/formidable/Formidable.d.ts","./node_modules/@types/formidable/parsers/index.d.ts","./node_modules/@types/formidable/PersistentFile.d.ts","./node_modules/@types/formidable/VolatileFile.d.ts","./node_modules/@types/formidable/FormidableError.d.ts","./node_modules/@types/formidable/index.d.ts","./node_modules/@types/http-assert/index.d.ts","./node_modules/@types/koa-compose/index.d.ts","./node_modules/@types/koa/index.d.ts","./node_modules/@types/koa__router/index.d.ts"],"fileIdsList":[[54,71,123],[60,61,62,64,65,71,123,180],[54,66,67,71,123,157,173,174,176,178],[60,62,63,64,65,71,123,180],[60,62,64,65,71,123,180],[54,59,66,67,71,123,174,176,177,178],[71,123],[71,123,178,179,180],[60,62,64,65,66,67,71,123,174,176,178,180],[54,58,71,123],[54,55,66,67,68,71,123,174,175,176,178],[55,71,123],[54,55,71,123],[71,123,137,172],[71,123,137,172,187],[71,123,137,172,189],[71,123,137,172,187,198,199],[71,123,134,137,172,189,193,194],[71,123,188,195,197],[71,123,137,154,206],[71,123,134,206],[71,123,154,172,201,202,203,204,205],[71,123,154,206],[71,123,209],[71,122,123,134,137,138,142,148,165,172,186,191,196,199,200,207,208],[71,120,123],[71,122,123],[123],[71,123,128,157],[71,123,124,129,134,142,154,165],[71,123,124,125,134,142],[71,123,126,166],[71,123,127,128,135,143],[71,123,128,154,162],[71,123,129,131,134,142],[71,122,123,130],[71,123,131,132],[71,123,133,134],[71,122,123,134],[71,123,134,135,136,154,165],[71,123,134,135,136,149,154,157],[71,116,123,131,134,137,142,154,165],[71,123,134,135,137,138,142,154,162,165],[71,123,137,139,154,162,165],[69,70,71,72,73,74,75,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171],[71,123,134,140],[71,123,141,165],[71,123,131,134,142,154],[71,123,143],[71,123,144],[71,122,123,145],[71,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171],[71,123,147],[71,123,148],[71,123,134,149,150],[71,123,149,151,166,168],[71,123,134,154,155,157],[71,123,156,157],[71,123,154,155],[71,123,157],[71,123,158],[71,120,123,154,159],[71,123,134,160,161],[71,123,160,161],[71,123,128,142,154,162],[71,123,163],[71,123,142,164],[71,123,137,148,165],[71,123,128,166],[71,123,154,167],[71,123,141,168],[71,123,169],[71,116,123],[71,123,134,136,145,154,157,165,167,168,170],[71,123,154,171],[71,123,135,154,172,192],[71,123,137,172,193,196],[71,123,134,137,139,142,154,162,165,171,172],[71,123,178,180,181],[54,66,67,71,123,174,176,178],[71,83,86,89,90,123,165],[71,86,123,154,165],[71,86,90,123,165],[71,123,154],[71,80,123],[71,84,123],[71,82,83,86,123,165],[71,123,142,162],[71,123,172],[71,80,123,172],[71,82,86,123,142,165],[71,77,78,79,81,85,123,134,154,165],[71,86,94,123],[71,78,84,123],[71,86,110,111,123],[71,78,81,86,123,157,165,172],[71,86,123],[71,82,86,123,165],[71,77,123],[71,80,81,82,84,85,86,87,88,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,111,112,113,114,115,123],[71,86,103,106,123,131],[71,86,94,95,96,123],[71,84,86,95,97,123],[71,85,123],[71,78,80,86,123],[71,86,90,95,97,123],[71,90,123],[71,84,86,89,123,165],[71,78,82,86,94,123],[71,86,103,123],[71,80,86,110,123,157,170,172],[56,71,123],[56,71,123,182],[56,57,71,123,182,184],[56,57,71,123,182,183]],"fileInfos":[{"version":"c430d44666289dae81f30fa7b2edebf186ecc91a2d4c71266ea6ae76388792e1","affectsGlobalScope":true,"impliedFormat":1},{"version":"45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","impliedFormat":1},{"version":"3facaf05f0c5fc569c5649dd359892c98a85557e3e0c847964caeb67076f4d75","impliedFormat":1},{"version":"e44bb8bbac7f10ecc786703fe0a6a4b952189f908707980ba8f3c8975a760962","impliedFormat":1},{"version":"5e1c4c362065a6b95ff952c0eab010f04dcd2c3494e813b493ecfd4fcb9fc0d8","impliedFormat":1},{"version":"68d73b4a11549f9c0b7d352d10e91e5dca8faa3322bfb77b661839c42b1ddec7","impliedFormat":1},{"version":"5efce4fc3c29ea84e8928f97adec086e3dc876365e0982cc8479a07954a3efd4","impliedFormat":1},{"version":"080941d9f9ff9307f7e27a83bcd888b7c8270716c39af943532438932ec1d0b9","affectsGlobalScope":true,"impliedFormat":1},{"version":"2e80ee7a49e8ac312cc11b77f1475804bee36b3b2bc896bead8b6e1266befb43","affectsGlobalScope":true,"impliedFormat":1},{"version":"d7a3c8b952931daebdfc7a2897c53c0a1c73624593fa070e46bd537e64dcd20a","affectsGlobalScope":true,"impliedFormat":1},{"version":"80e18897e5884b6723488d4f5652167e7bb5024f946743134ecc4aa4ee731f89","affectsGlobalScope":true,"impliedFormat":1},{"version":"cd034f499c6cdca722b60c04b5b1b78e058487a7085a8e0d6fb50809947ee573","affectsGlobalScope":true,"impliedFormat":1},{"version":"c57796738e7f83dbc4b8e65132f11a377649c00dd3eee333f672b8f0a6bea671","affectsGlobalScope":true,"impliedFormat":1},{"version":"dc2df20b1bcdc8c2d34af4926e2c3ab15ffe1160a63e58b7e09833f616efff44","affectsGlobalScope":true,"impliedFormat":1},{"version":"515d0b7b9bea2e31ea4ec968e9edd2c39d3eebf4a2d5cbd04e88639819ae3b71","affectsGlobalScope":true,"impliedFormat":1},{"version":"0559b1f683ac7505ae451f9a96ce4c3c92bdc71411651ca6ddb0e88baaaad6a3","affectsGlobalScope":true,"impliedFormat":1},{"version":"0dc1e7ceda9b8b9b455c3a2d67b0412feab00bd2f66656cd8850e8831b08b537","affectsGlobalScope":true,"impliedFormat":1},{"version":"ce691fb9e5c64efb9547083e4a34091bcbe5bdb41027e310ebba8f7d96a98671","affectsGlobalScope":true,"impliedFormat":1},{"version":"8d697a2a929a5fcb38b7a65594020fcef05ec1630804a33748829c5ff53640d0","affectsGlobalScope":true,"impliedFormat":1},{"version":"4ff2a353abf8a80ee399af572debb8faab2d33ad38c4b4474cff7f26e7653b8d","affectsGlobalScope":true,"impliedFormat":1},{"version":"fb0f136d372979348d59b3f5020b4cdb81b5504192b1cacff5d1fbba29378aa1","affectsGlobalScope":true,"impliedFormat":1},{"version":"d15bea3d62cbbdb9797079416b8ac375ae99162a7fba5de2c6c505446486ac0a","affectsGlobalScope":true,"impliedFormat":1},{"version":"68d18b664c9d32a7336a70235958b8997ebc1c3b8505f4f1ae2b7e7753b87618","affectsGlobalScope":true,"impliedFormat":1},{"version":"eb3d66c8327153d8fa7dd03f9c58d351107fe824c79e9b56b462935176cdf12a","affectsGlobalScope":true,"impliedFormat":1},{"version":"38f0219c9e23c915ef9790ab1d680440d95419ad264816fa15009a8851e79119","affectsGlobalScope":true,"impliedFormat":1},{"version":"69ab18c3b76cd9b1be3d188eaf8bba06112ebbe2f47f6c322b5105a6fbc45a2e","affectsGlobalScope":true,"impliedFormat":1},{"version":"a680117f487a4d2f30ea46f1b4b7f58bef1480456e18ba53ee85c2746eeca012","affectsGlobalScope":true,"impliedFormat":1},{"version":"2f11ff796926e0832f9ae148008138ad583bd181899ab7dd768a2666700b1893","affectsGlobalScope":true,"impliedFormat":1},{"version":"4de680d5bb41c17f7f68e0419412ca23c98d5749dcaaea1896172f06435891fc","affectsGlobalScope":true,"impliedFormat":1},{"version":"954296b30da6d508a104a3a0b5d96b76495c709785c1d11610908e63481ee667","affectsGlobalScope":true,"impliedFormat":1},{"version":"ac9538681b19688c8eae65811b329d3744af679e0bdfa5d842d0e32524c73e1c","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a969edff4bd52585473d24995c5ef223f6652d6ef46193309b3921d65dd4376","affectsGlobalScope":true,"impliedFormat":1},{"version":"9e9fbd7030c440b33d021da145d3232984c8bb7916f277e8ffd3dc2e3eae2bdb","affectsGlobalScope":true,"impliedFormat":1},{"version":"811ec78f7fefcabbda4bfa93b3eb67d9ae166ef95f9bff989d964061cbf81a0c","affectsGlobalScope":true,"impliedFormat":1},{"version":"717937616a17072082152a2ef351cb51f98802fb4b2fdabd32399843875974ca","affectsGlobalScope":true,"impliedFormat":1},{"version":"d7e7d9b7b50e5f22c915b525acc5a49a7a6584cf8f62d0569e557c5cfc4b2ac2","affectsGlobalScope":true,"impliedFormat":1},{"version":"71c37f4c9543f31dfced6c7840e068c5a5aacb7b89111a4364b1d5276b852557","affectsGlobalScope":true,"impliedFormat":1},{"version":"576711e016cf4f1804676043e6a0a5414252560eb57de9faceee34d79798c850","affectsGlobalScope":true,"impliedFormat":1},{"version":"89c1b1281ba7b8a96efc676b11b264de7a8374c5ea1e6617f11880a13fc56dc6","affectsGlobalScope":true,"impliedFormat":1},{"version":"74f7fa2d027d5b33eb0471c8e82a6c87216223181ec31247c357a3e8e2fddc5b","affectsGlobalScope":true,"impliedFormat":1},{"version":"d6d7ae4d1f1f3772e2a3cde568ed08991a8ae34a080ff1151af28b7f798e22ca","affectsGlobalScope":true,"impliedFormat":1},{"version":"063600664504610fe3e99b717a1223f8b1900087fab0b4cad1496a114744f8df","affectsGlobalScope":true,"impliedFormat":1},{"version":"934019d7e3c81950f9a8426d093458b65d5aff2c7c1511233c0fd5b941e608ab","affectsGlobalScope":true,"impliedFormat":1},{"version":"52ada8e0b6e0482b728070b7639ee42e83a9b1c22d205992756fe020fd9f4a47","affectsGlobalScope":true,"impliedFormat":1},{"version":"3bdefe1bfd4d6dee0e26f928f93ccc128f1b64d5d501ff4a8cf3c6371200e5e6","affectsGlobalScope":true,"impliedFormat":1},{"version":"59fb2c069260b4ba00b5643b907ef5d5341b167e7d1dbf58dfd895658bda2867","affectsGlobalScope":true,"impliedFormat":1},{"version":"639e512c0dfc3fad96a84caad71b8834d66329a1f28dc95e3946c9b58176c73a","affectsGlobalScope":true,"impliedFormat":1},{"version":"368af93f74c9c932edd84c58883e736c9e3d53cec1fe24c0b0ff451f529ceab1","affectsGlobalScope":true,"impliedFormat":1},{"version":"51ad4c928303041605b4d7ae32e0c1ee387d43a24cd6f1ebf4a2699e1076d4fa","affectsGlobalScope":true,"impliedFormat":1},{"version":"4245fee526a7d1754529d19227ecbf3be066ff79ebb6a380d78e41648f2f224d","affectsGlobalScope":true,"impliedFormat":1},{"version":"8e7f8264d0fb4c5339605a15daadb037bf238c10b654bb3eee14208f860a32ea","affectsGlobalScope":true,"impliedFormat":1},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true,"impliedFormat":1},{"version":"1305d1e76ca44e30fb8b2b8075fa522b83f60c0bcf5d4326a9d2cf79b53724f8","impliedFormat":1},{"version":"e76f0a7d375b97bd7da5e65b9c437a01a948c973e3e85df0f4e650e4592947ab","impliedFormat":99},{"version":"365cdd6814c2ff82bd29372ff73346202efc4a1dfa179e4cf6911c6b632d69ed","affectsGlobalScope":true,"impliedFormat":1},{"version":"7038f51c3ec85e09ed2098ed581a64f7f0dfda910fc303b929af96bc79176cc3","impliedFormat":1},{"version":"dbab59a5b4ca5968262960812d9cfdfe987c1bd92dee5b5901fe19435a929bbd","signature":"98b815b42f5556a684073c84d1e1f18bc0f6d62dd3cb13e6a8ea26f0f942d384"},{"version":"a52a6d3a3d56107b369649d9849f942f2ea52c0086e0cdf8a0ecc28cdba9ea4e","impliedFormat":1},{"version":"5877124243dc40cb5f02a66f996097372ef118bd9e4afd6db5ba09b8f67a0a19","impliedFormat":1},{"version":"cd9a3966ea30aa2b4cda814d04c17b5cf121adac45f350949236438b868a5a12","impliedFormat":99},{"version":"b883960918130c038a779246eb467432ccd598ad17834d7225d776ede3f8b58a","impliedFormat":1},{"version":"c637d436a518b86363815665076d7e2dab5a4f6a103699c6da212f31157b0556","impliedFormat":99},{"version":"5630eca3f5a8b4ce16df8375c56c972c39ced536a339488adb1c205c4c04aacc","affectsGlobalScope":true,"impliedFormat":1},{"version":"5f64e678f2da135807d2ef7d5b1a708840eaba70dc2adb3d2804a5cbdcf4dd3c","impliedFormat":99},{"version":"c042466c71ade27c6bf7da7d6a4e52f10af53cccd4c59e3a7e2e68901638ab11","impliedFormat":99},{"version":"32f47b4fde1ff7bc016df1c1b0a93c9118543d1a2a40a80639fc85a4261001fa","impliedFormat":99},{"version":"3d4b4460d389f1a0de429f5292d6ef823fb14c090fe3ad289bc6e6f1be92dae0","impliedFormat":99},{"version":"76ff03302bd6283df89e817f5cecd2867be03caa5aac240342e84a5539bfd95f","impliedFormat":99},{"version":"d153a11543fd884b596587ccd97aebbeed950b26933ee000f94009f1ab142848","affectsGlobalScope":true,"impliedFormat":1},{"version":"c0671b50bb99cc7ad46e9c68fa0e7f15ba4bc898b59c31a17ea4611fab5095da","affectsGlobalScope":true,"impliedFormat":1},{"version":"d802f0e6b5188646d307f070d83512e8eb94651858de8a82d1e47f60fb6da4e2","affectsGlobalScope":true,"impliedFormat":1},{"version":"aa83e100f0c74a06c9d24f40a096c9e9cc3c02704250d01541e22c0ae9264eda","affectsGlobalScope":true,"impliedFormat":1},{"version":"1db0b7dca579049ca4193d034d835f6bfe73096c73663e5ef9a0b5779939f3d0","affectsGlobalScope":true,"impliedFormat":1},{"version":"9798340ffb0d067d69b1ae5b32faa17ab31b82466a3fc00d8f2f2df0c8554aaa","affectsGlobalScope":true,"impliedFormat":1},{"version":"456fa0c0ab68731564917642b977c71c3b7682240685b118652fb9253c9a6429","affectsGlobalScope":true,"impliedFormat":1},{"version":"4967529644e391115ca5592184d4b63980569adf60ee685f968fd59ab1557188","impliedFormat":1},{"version":"cdcf9ea426ad970f96ac930cd176d5c69c6c24eebd9fc580e1572d6c6a88f62c","impliedFormat":1},{"version":"23cd712e2ce083d68afe69224587438e5914b457b8acf87073c22494d706a3d0","impliedFormat":1},{"version":"487b694c3de27ddf4ad107d4007ad304d29effccf9800c8ae23c2093638d906a","impliedFormat":1},{"version":"e525f9e67f5ddba7b5548430211cae2479070b70ef1fd93550c96c10529457bd","impliedFormat":1},{"version":"ccf4552357ce3c159ef75f0f0114e80401702228f1898bdc9402214c9499e8c0","impliedFormat":1},{"version":"c6fd2c5a395f2432786c9cb8deb870b9b0e8ff7e22c029954fabdd692bff6195","impliedFormat":1},{"version":"68834d631c8838c715f225509cfc3927913b9cc7a4870460b5b60c8dbdb99baf","impliedFormat":1},{"version":"4bc0794175abedf989547e628949888c1085b1efcd93fc482bccd77ee27f8b7c","impliedFormat":1},{"version":"3c8e93af4d6ce21eb4c8d005ad6dc02e7b5e6781f429d52a35290210f495a674","impliedFormat":1},{"version":"2c9875466123715464539bfd69bcaccb8ff6f3e217809428e0d7bd6323416d01","impliedFormat":1},{"version":"ea6bc8de8b59f90a7a3960005fd01988f98fd0784e14bc6922dde2e93305ec7d","impliedFormat":1},{"version":"36107995674b29284a115e21a0618c4c2751b32a8766dd4cb3ba740308b16d59","impliedFormat":1},{"version":"914a0ae30d96d71915fc519ccb4efbf2b62c0ddfb3a3fc6129151076bc01dc60","impliedFormat":1},{"version":"33e981bf6376e939f99bd7f89abec757c64897d33c005036b9a10d9587d80187","impliedFormat":1},{"version":"6c8e442ba33b07892169a14f7757321e49ab0f1032d676d321a1fdab8a67d40c","impliedFormat":1},{"version":"b41767d372275c154c7ea6c9d5449d9a741b8ce080f640155cc88ba1763e35b3","impliedFormat":1},{"version":"1cd673d367293fc5cb31cd7bf03d598eb368e4f31f39cf2b908abbaf120ab85a","impliedFormat":1},{"version":"af13e99445f37022c730bfcafcdc1761e9382ce1ea02afb678e3130b01ce5676","impliedFormat":1},{"version":"3825bf209f1662dfd039010a27747b73d0ef379f79970b1d05601ec8e8a4249f","impliedFormat":1},{"version":"0b6e25234b4eec6ed96ab138d96eb70b135690d7dd01f3dd8a8ab291c35a683a","impliedFormat":1},{"version":"9666f2f84b985b62400d2e5ab0adae9ff44de9b2a34803c2c5bd3c8325b17dc0","impliedFormat":1},{"version":"da52342062e70c77213e45107921100ba9f9b3a30dd019444cf349e5fb3470c4","impliedFormat":1},{"version":"e9ace91946385d29192766bf783b8460c7dbcbfc63284aa3c9cae6de5155c8bc","impliedFormat":1},{"version":"40b463c6766ca1b689bfcc46d26b5e295954f32ad43e37ee6953c0a677e4ae2b","impliedFormat":1},{"version":"249b9cab7f5d628b71308c7d9bb0a808b50b091e640ba3ed6e2d0516f4a8d91d","impliedFormat":1},{"version":"1e30c045732e7db8f7a82cf90b516ebe693d2f499ce2250a977ec0d12e44a529","impliedFormat":1},{"version":"84b736594d8760f43400202859cda55607663090a43445a078963031d47e25e7","impliedFormat":1},{"version":"499e5b055a5aba1e1998f7311a6c441a369831c70905cc565ceac93c28083d53","impliedFormat":1},{"version":"54c3e2371e3d016469ad959697fd257e5621e16296fa67082c2575d0bf8eced0","impliedFormat":1},{"version":"beb8233b2c220cfa0feea31fbe9218d89fa02faa81ef744be8dce5acb89bb1fd","impliedFormat":1},{"version":"78b29846349d4dfdd88bd6650cc5d2baaa67f2e89dc8a80c8e26ef7995386583","impliedFormat":1},{"version":"5d0375ca7310efb77e3ef18d068d53784faf62705e0ad04569597ae0e755c401","impliedFormat":1},{"version":"59af37caec41ecf7b2e76059c9672a49e682c1a2aa6f9d7dc78878f53aa284d6","impliedFormat":1},{"version":"addf417b9eb3f938fddf8d81e96393a165e4be0d4a8b6402292f9c634b1cb00d","impliedFormat":1},{"version":"e38d4fdf79e1eadd92ed7844c331dbaa40f29f21541cfee4e1acff4db09cda33","impliedFormat":1},{"version":"8bd86b8e8f6a6aa6c49b71e14c4ffe1211a0e97c80f08d2c8cc98838006e4b88","impliedFormat":1},{"version":"7c10a32ae6f3962672e6869ee2c794e8055d8225ef35c91c0228e354b4e5d2d3","impliedFormat":1},{"version":"2e85db9e6fd73cfa3d7f28e0ab6b55417ea18931423bd47b409a96e4a169e8e6","impliedFormat":1},{"version":"c46e079fe54c76f95c67fb89081b3e399da2c7d109e7dca8e4b58d83e332e605","impliedFormat":1},{"version":"99f569b42ea7e7c5fe404b2848c0893f3e1a56e0547c1cd0f74d5dbb9a9de27e","impliedFormat":1},{"version":"830171b27c5fdf9bcbe4cf7d428fcf3ae2c67780fb7fbdccdf70d1623d938bc4","affectsGlobalScope":true,"impliedFormat":1},{"version":"f9501cc13ce624c72b61f12b3963e84fad210fbdf0ffbc4590e08460a3f04eba","affectsGlobalScope":true,"impliedFormat":1},{"version":"e7721c4f69f93c91360c26a0a84ee885997d748237ef78ef665b153e622b36c1","affectsGlobalScope":true,"impliedFormat":1},{"version":"bbcfd9cd76d92c3ee70475270156755346c9086391e1b9cb643d072e0cf576b8","impliedFormat":1},{"version":"7394959e5a741b185456e1ef5d64599c36c60a323207450991e7a42e08911419","impliedFormat":1},{"version":"72c1f5e0a28e473026074817561d1bc9647909cf253c8d56c41d1df8d95b85f7","impliedFormat":1},{"version":"003ec918ec442c3a4db2c36dc0c9c766977ea1c8bcc1ca7c2085868727c3d3f6","affectsGlobalScope":true,"impliedFormat":1},{"version":"a6310806c6aa3154773976dd083a15659d294700d9ad8f6b8a2e10c3dc461ff1","impliedFormat":1},{"version":"c4e8e8031808b158cfb5ac5c4b38d4a26659aec4b57b6a7e2ba0a141439c208c","impliedFormat":1},{"version":"2c91d8366ff2506296191c26fd97cc1990bab3ee22576275d28b654a21261a44","affectsGlobalScope":true,"impliedFormat":1},{"version":"5524481e56c48ff486f42926778c0a3cce1cc85dc46683b92b1271865bcf015a","impliedFormat":1},{"version":"db39d9a16e4ddcd8a8f2b7b3292b362cc5392f92ad7ccd76f00bccf6838ac7de","affectsGlobalScope":true,"impliedFormat":1},{"version":"289e9894a4668c61b5ffed09e196c1f0c2f87ca81efcaebdf6357cfb198dac14","impliedFormat":1},{"version":"25a1105595236f09f5bce42398be9f9ededc8d538c258579ab662d509aa3b98e","impliedFormat":1},{"version":"5078cd62dbdf91ae8b1dc90b1384dec71a9c0932d62bdafb1a811d2a8e26bef2","impliedFormat":1},{"version":"a2e2bbde231b65c53c764c12313897ffdfb6c49183dd31823ee2405f2f7b5378","impliedFormat":1},{"version":"ad1cc0ed328f3f708771272021be61ab146b32ecf2b78f3224959ff1e2cd2a5c","impliedFormat":1},{"version":"62f572306e0b173cc5dfc4c583471151f16ef3779cf27ab96922c92ec82a3bc8","affectsGlobalScope":true,"impliedFormat":1},{"version":"622b67a408a881e15ab38043547563b9d29ca4b46f5b7a7e4a4fc3123d25d19f","impliedFormat":1},{"version":"2617f1d06b32c7b4dfd0a5c8bc7b5de69368ec56788c90f3d7f3e3d2f39f0253","impliedFormat":1},{"version":"bd8b644c5861b94926687618ec2c9e60ad054d334d6b7eb4517f23f53cb11f91","impliedFormat":1},{"version":"bcbabfaca3f6b8a76cb2739e57710daf70ab5c9479ab70f5351c9b4932abf6bd","impliedFormat":1},{"version":"77fced47f495f4ff29bb49c52c605c5e73cd9b47d50080133783032769a9d8a6","impliedFormat":1},{"version":"966dd0793b220e22344c944e0f15afafdc9b0c9201b6444ea0197cd176b96893","impliedFormat":1},{"version":"c54f0b30a787b3df16280f4675bd3d9d17bf983ae3cd40087409476bc50b922d","affectsGlobalScope":true,"impliedFormat":1},{"version":"0f5cda0282e1d18198e2887387eb2f026372ebc4e11c4e4516fef8a19ee4d514","impliedFormat":1},{"version":"e99b0e71f07128fc32583e88ccd509a1aaa9524c290efb2f48c22f9bf8ba83b1","impliedFormat":1},{"version":"76957a6d92b94b9e2852cf527fea32ad2dc0ef50f67fe2b14bd027c9ceef2d86","impliedFormat":1},{"version":"5e9f8c1e042b0f598a9be018fc8c3cb670fe579e9f2e18e3388b63327544fe16","affectsGlobalScope":true,"impliedFormat":1},{"version":"a8a99a5e6ed33c4a951b67cc1fd5b64fd6ad719f5747845c165ca12f6c21ba16","affectsGlobalScope":true,"impliedFormat":1},{"version":"a58a15da4c5ba3df60c910a043281256fa52d36a0fcdef9b9100c646282e88dd","impliedFormat":1},{"version":"b36beffbf8acdc3ebc58c8bb4b75574b31a2169869c70fc03f82895b93950a12","impliedFormat":1},{"version":"de263f0089aefbfd73c89562fb7254a7468b1f33b61839aafc3f035d60766cb4","impliedFormat":1},{"version":"70b57b5529051497e9f6482b76d91c0dcbb103d9ead8a0549f5bab8f65e5d031","impliedFormat":1},{"version":"8c81fd4a110490c43d7c578e8c6f69b3af01717189196899a6a44f93daa57a3a","impliedFormat":1},{"version":"1013eb2e2547ad8c100aca52ef9df8c3f209edee32bb387121bb3227f7c00088","impliedFormat":1},{"version":"e07c573ac1971ea89e2c56ff5fd096f6f7bba2e6dbcd5681d39257c8d954d4a8","impliedFormat":1},{"version":"363eedb495912790e867da6ff96e81bf792c8cfe386321e8163b71823a35719a","impliedFormat":1},{"version":"37ba7b45141a45ce6e80e66f2a96c8a5ab1bcef0fc2d0f56bb58df96ec67e972","impliedFormat":1},{"version":"125d792ec6c0c0f657d758055c494301cc5fdb327d9d9d5960b3f129aff76093","impliedFormat":1},{"version":"dba28a419aec76ed864ef43e5f577a5c99a010c32e5949fe4e17a4d57c58dd11","affectsGlobalScope":true,"impliedFormat":1},{"version":"ea713aa14a670b1ea0fbaaca4fd204e645f71ca7653a834a8ec07ee889c45de6","impliedFormat":1},{"version":"07199a85560f473f37363d8f1300fac361cda2e954caf8a40221f83a6bfa7ade","impliedFormat":1},{"version":"9705cd157ffbb91c5cab48bdd2de5a437a372e63f870f8a8472e72ff634d47c1","affectsGlobalScope":true,"impliedFormat":1},{"version":"ae86f30d5d10e4f75ce8dcb6e1bd3a12ecec3d071a21e8f462c5c85c678efb41","impliedFormat":1},{"version":"982efeb2573605d4e6d5df4dc7e40846bda8b9e678e058fc99522ab6165c479e","impliedFormat":1},{"version":"e03460fe72b259f6d25ad029f085e4bedc3f90477da4401d8fbc1efa9793230e","impliedFormat":1},{"version":"4286a3a6619514fca656089aee160bb6f2e77f4dd53dc5a96b26a0b4fc778055","impliedFormat":1},{"version":"c9231cf03fd7e8cfd78307eecbd24ff3f0fa55d0f6d1108c4003c124d168adc4","affectsGlobalScope":true,"impliedFormat":1},{"version":"2d5d50cd0667d9710d4d2f6e077cc4e0f9dc75e106cccaea59999b36873c5a0d","affectsGlobalScope":true,"impliedFormat":1},{"version":"784490137935e1e38c49b9289110e74a1622baf8a8907888dcbe9e476d7c5e44","impliedFormat":1},{"version":"42180b657831d1b8fead051698618b31da623fb71ff37f002cb9d932cfa775f1","impliedFormat":1},{"version":"4f98d6fb4fe7cbeaa04635c6eaa119d966285d4d39f0eb55b2654187b0b27446","impliedFormat":1},{"version":"f8529fe0645fd9af7441191a4961497cc7638f75a777a56248eac6a079bb275d","affectsGlobalScope":true,"impliedFormat":1},{"version":"4445f6ce6289c5b2220398138da23752fd84152c5c95bb8b58dedefc1758c036","impliedFormat":1},{"version":"c39866300d394f45f82d3352ecfc1649aa1d5a47decdc5c76708cde15251c43d","impliedFormat":1},{"version":"1ba59c8bbeed2cb75b239bb12041582fa3e8ef32f8d0bd0ec802e38442d3f317","impliedFormat":1},{"version":"dd52547514c0fce12235ac2873631024d71cb7f92b750970c7eb6eda6a792e85","impliedFormat":99},{"version":"9a40a3320a2301a30e155d4d8445d971ad516a73222c1374b204fbe90d6f5203","impliedFormat":1},{"version":"73b7843bc39ae16c1c8a057b8c8f7410ade5d89bf88610232c7a88b21dcef55e","impliedFormat":99},{"version":"189a96b720fdf19c5cab349f7a3e99977acff3a6cdbca98c4c012c00091063b4","impliedFormat":1},{"version":"a421666af3fa0f26c82ab1f86a1a558e51337a0597d3d52c3e8fc2607c48833a","affectsGlobalScope":true,"impliedFormat":1},{"version":"8c33acd06162b104c323f196cbdcfa3e91b3a951883e4bd0037743072174ef0e","impliedFormat":1},{"version":"1d234a6a01fe26532575863a31148226ef6d43fc60e98d0e6ab7d734f43463cc","impliedFormat":1},{"version":"adf55203a52fe23af8cbf5d9b5a0f65b0d3e6e136a50de5a12e6a361d39d9646","impliedFormat":1},{"version":"906ebde38268293593b31a9faaee6a88452cb03366cd1653efe3edd592c145a4","impliedFormat":1},{"version":"9c9157de89721a90009ab214982b41f8a393972dff17487002d9ad02d0c8efed","signature":"e262effa654b9fc9a50de64b04d80dd646b89e20f73334d0e67a373fa645c584"},{"version":"970739c81e10494d683175666e17fd366b4a3f317dc7e1b65bd614f6e050b00d","signature":"e7de54cb4622a2b09989e7128acc09e12baf15646f5a68e1f180810b0512f15a"},{"version":"aeabad8faba1a5bffb455076b08f395419f0fde20eb8d8d7d4f6338ba36e62e8","signature":"3fb34a0cb81a9a536578233d9a846fba2b7e0187c92b1773f2db73e6318e917d"},{"version":"87f287f296f3ff07dbd14ea7853c2400d995dccd7bd83206196d6c0974774e96","impliedFormat":1},{"version":"104c67f0da1bdf0d94865419247e20eded83ce7f9911a1aa75fc675c077ca66e","impliedFormat":1},{"version":"cc0d0b339f31ce0ab3b7a5b714d8e578ce698f1e13d7f8c60bfb766baeb1d35c","impliedFormat":1},{"version":"baac9896d29bcc55391d769e408ff400d61273d832dd500f21de766205255acb","impliedFormat":1},{"version":"7578ed901eec5f590609fc7a6ba9027be5735ad1aedef119aa56d53a22dfbe02","impliedFormat":1},{"version":"0504070e7eaba788f5d0d5926782ed177f1db01cee28363c488fae94950c0bbc","impliedFormat":1},{"version":"d3f2d715f57df3f04bf7b16dde01dec10366f64fce44503c92b8f78f614c1769","impliedFormat":1},{"version":"b78cd10245a90e27e62d0558564f5d9a16576294eee724a59ae21b91f9269e4a","impliedFormat":1},{"version":"2f5747b1508ccf83fad0c251ba1e5da2f5a30b78b09ffa1cfaf633045160afed","impliedFormat":1},{"version":"a8932b7a5ef936687cc5b2492b525e2ad5e7ed321becfea4a17d5a6c80f49e92","affectsGlobalScope":true,"impliedFormat":1},{"version":"b71c603a539078a5e3a039b20f2b0a0d1708967530cf97dec8850a9ca45baa2b","impliedFormat":1},{"version":"0e13570a7e86c6d83dd92e81758a930f63747483e2cd34ef36fcdb47d1f9726a","impliedFormat":1},{"version":"d26a79f97f25eb1c5fc36a8552e4decc7ad11104a016d31b1307c3afaf48feb1","impliedFormat":1},{"version":"6847334317c1bc1e6fc4b679b0095bbd2b6ee3b85fe3f26fc26bac462f68ef5e","impliedFormat":1},{"version":"2224f3072e3cc07906eeed5c71746779511fba2dd224addc5489bcdb489bdee5","impliedFormat":1},{"version":"55caa9dcb8c8d260e424e69a723bd40abc4ea25824f485b4e03651b2540f2f5d","impliedFormat":1},{"version":"49d41b881040e728bc28d463806cdff98b64c69e9da721adcf0ec34345f691b5","impliedFormat":1},{"version":"0623c302651761724ec920bb95a27d9d47ea71f7e6ef7e4d6f60bd05c86cf50c","impliedFormat":1},{"version":"b32b6bcb77993c29a12335096b2000dae9028a425e15e8fdc8ce4c24c67bd9a5","impliedFormat":1},{"version":"afc87a77703487af971af992374f59a6cc729411cd8498a492eb14cce49f092b","impliedFormat":1},{"version":"041717f80688c47a942e0275a387609f6d029709b8054a9cfc78a6d338fd6511","impliedFormat":1},{"version":"fbf802b3a028f5eb22ad406ee5fc7c368f0acfd3a2a6d0f805120766f5717ec8","impliedFormat":1},{"version":"7e8d3f08435ad2cefe67f58182618bfc9a0a29db08cf2544b94cbcae754a9bd9","impliedFormat":1},{"version":"4b9d10d6cc065c3d6d55e3b6ab650da51a4dda087f4725962642590ad9f40f49","impliedFormat":1},{"version":"41ab75ee7cef1e86c663595cfac0e1d2d092cc6b6d18e6fd9fc19f993371d29b","impliedFormat":1}],"root":[57,[183,185]],"options":{"composite":true,"declaration":true,"esModuleInterop":true,"jsx":4,"jsxImportSource":"@satorijs/element","module":1,"outDir":"./lib","rootDir":"./src","skipLibCheck":true,"target":7},"referencedMap":[[60,1],[62,2],[174,3],[64,4],[65,5],[178,6],[177,7],[181,8],[180,9],[59,10],[176,11],[175,7],[56,12],[55,1],[68,13],[186,14],[188,15],[190,16],[187,14],[191,7],[200,17],[195,18],[198,19],[201,20],[205,7],[203,21],[204,21],[206,22],[202,23],[207,7],[196,7],[199,7],[208,24],[209,25],[210,24],[192,7],[120,26],[121,26],[122,27],[71,28],[123,29],[124,30],[125,31],[69,7],[126,32],[127,33],[128,34],[129,35],[130,36],[131,37],[132,37],[133,38],[134,39],[135,40],[136,41],[72,7],[70,7],[137,42],[138,43],[139,44],[172,45],[140,46],[141,47],[142,48],[143,49],[144,50],[145,51],[146,52],[147,53],[148,54],[149,55],[150,55],[151,56],[152,7],[153,7],[154,57],[156,58],[155,59],[157,60],[158,61],[159,62],[160,63],[161,64],[162,65],[163,66],[164,67],[165,68],[166,69],[167,70],[168,71],[169,72],[73,7],[74,7],[75,7],[117,73],[118,7],[119,7],[170,74],[171,75],[189,7],[194,7],[193,76],[197,77],[173,78],[76,7],[66,5],[54,7],[58,7],[182,79],[67,80],[179,7],[61,7],[63,1],[51,7],[52,7],[10,7],[8,7],[9,7],[14,7],[13,7],[2,7],[15,7],[16,7],[17,7],[18,7],[19,7],[20,7],[21,7],[22,7],[3,7],[23,7],[24,7],[4,7],[25,7],[29,7],[26,7],[27,7],[28,7],[30,7],[31,7],[32,7],[5,7],[33,7],[34,7],[35,7],[36,7],[6,7],[40,7],[37,7],[38,7],[39,7],[41,7],[7,7],[42,7],[53,7],[47,7],[48,7],[43,7],[44,7],[45,7],[46,7],[1,7],[49,7],[50,7],[12,7],[11,7],[94,81],[105,82],[92,83],[106,84],[115,85],[83,86],[84,87],[82,88],[114,89],[109,90],[113,91],[86,92],[102,93],[85,94],[112,95],[80,96],[81,90],[87,97],[88,7],[93,98],[91,97],[78,99],[116,100],[107,101],[97,102],[96,97],[98,103],[100,104],[95,105],[99,106],[110,89],[89,107],[90,108],[101,109],[79,84],[104,110],[103,97],[108,7],[77,7],[111,111],[57,112],[183,113],[185,114],[184,115]],"latestChangedDtsFile":"./lib/index.d.ts","version":"5.9.2"}