localsbnb-mcp-server 1.0.11 → 1.0.12

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 (48) hide show
  1. package/README.md +129 -150
  2. package/dist/auth/apiKeyManager.js +1 -1
  3. package/dist/auth/index.js +1 -1
  4. package/dist/auth/permissionChecker.js +1 -1
  5. package/dist/client/cacheManager.js +1 -1
  6. package/dist/client/httpClient.js +1 -1
  7. package/dist/client/index.js +1 -1
  8. package/dist/client/retryHandler.js +1 -1
  9. package/dist/config/index.js +1 -1
  10. package/dist/config/tools.js +1 -1
  11. package/dist/index.js +1 -1
  12. package/dist/package.json +1 -1
  13. package/dist/server.js +1 -1
  14. package/dist/start.mjs +1 -1
  15. package/dist/tools/channels/getChannelDetails.js +1 -1
  16. package/dist/tools/channels/index.js +1 -1
  17. package/dist/tools/channels/listChannels.js +1 -1
  18. package/dist/tools/finance/analyzeRevenue.js +1 -1
  19. package/dist/tools/finance/index.js +1 -1
  20. package/dist/tools/finance/queryFinancialData.js +1 -1
  21. package/dist/tools/finance/queryOperationalData.js +1 -1
  22. package/dist/tools/finance/queryOperationalDataV2.js +1 -1
  23. package/dist/tools/orders/cancelOrder.js +1 -1
  24. package/dist/tools/orders/getOrderDetails.js +1 -1
  25. package/dist/tools/orders/getOrderDetailsV2.js +1 -1
  26. package/dist/tools/orders/index.js +1 -1
  27. package/dist/tools/orders/ordersGetShared.js +1 -1
  28. package/dist/tools/orders/queryInHouseOrders.js +1 -1
  29. package/dist/tools/orders/queryOrders.js +1 -1
  30. package/dist/tools/orders/queryOrdersByDateRange.js +1 -1
  31. package/dist/tools/orders/queryPreArrivalOrders.js +1 -1
  32. package/dist/tools/orders/queryPreDepartureOrders.js +1 -1
  33. package/dist/tools/orders/queryTodayOrders.js +1 -1
  34. package/dist/tools/rooms/batchUpdatePrices.js +1 -1
  35. package/dist/tools/rooms/index.js +1 -1
  36. package/dist/tools/rooms/queryRoomPrices.js +1 -1
  37. package/dist/tools/rooms/queryRoomStatusNew.js +1 -1
  38. package/dist/tools/rooms/queryTodayRoomStatus.js +1 -1
  39. package/dist/tools/rooms/updateRoomPrice.js +1 -1
  40. package/dist/types/index.js +1 -1
  41. package/dist/utils/desensitize.js +1 -1
  42. package/dist/utils/errorHandler.js +1 -1
  43. package/dist/utils/index.js +1 -1
  44. package/dist/utils/logger.js +1 -1
  45. package/dist/utils/price.js +1 -1
  46. package/dist/utils/shanghaiDate.js +1 -1
  47. package/dist/utils/validator.js +1 -1
  48. package/package.json +1 -1
package/README.md CHANGED
@@ -1,76 +1,100 @@
1
- # 路客云 AI 助手
1
+ # LocalsBnb AI(路客云 MCP 服务)
2
2
 
3
- ## 这是什么?
3
+ LocalsBnb AI 将路客云 PMS 的订单、房态房价、经营分析等核心能力统一封装为 MCP,
4
+ 让门店与运营团队在现有沟通入口中即可通过自然语言完成“查询 -> 判断 -> 执行”,减少系统切换、提升协同效率。
4
5
 
5
- 路客云 AI 助手让您可以在 **Cursor**、**Claude Desktop**、**Claude Code** 等 AI 工具中,直接用自然语言操作路客云 SPMS(酒店物业管理系统)。
6
+ 服务可接入 OpenClaw、Hermes Agent 及任意支持 MCP 的客户端;
7
+ 其中 **OpenClaw + 微信** 是当前落地最广、转化效率最高的组合,建议优先作为推广与实施路径。
6
8
 
7
- 例如,您可以说:
9
+ ---
10
+
11
+ ## 我们是什么
12
+
13
+ LocalsBnb AI 是一层“AI 到路客云 API 的标准连接层”:
14
+
15
+ - 对上:提供统一 MCP 工具能力
16
+ - 对下:调用路客云接口并处理鉴权、错误与权限
17
+ - 对业务:让查询与操作可以直接通过自然语言完成
18
+
19
+ 适用对象:门店运营、前台、店长、区域管理、技术实施团队。
20
+
21
+ ---
8
22
 
9
- - 「查询今天的房态」
10
- - 「今天有哪些订单?」
11
- - 「帮我查一下本周的入住率」
23
+ ## 我们可以做什么
12
24
 
13
- AI 会帮您调用路客云,并返回结果。
25
+ ### 核心查询能力(当前可直接落地)
14
26
 
15
- ## 能做什么?
27
+ - 订单看板:今日预抵 / 在住 / 预离一键汇总,快速识别当日待办
28
+ - 订单详情:按订单号直达详情,减少前台和运营反复翻找
29
+ - 房态与可售:支持今日快照与多日区间查询,适合排班与排房决策
30
+ - 房价数据:支持按日期/自然周查看价格趋势,便于活动与调价判断
31
+ - 经营分析:支持查看入住率、营收等核心指标,用于复盘与晨会
16
32
 
17
- ### 订单管理
18
- - 查询订单列表、订单详情
19
- - 办理入住 / 退房
33
+ ### 管理价值(对门店最直接)
20
34
 
21
- ### 房态管理
22
- - 查询房态
23
- - 查询和更新房价
24
- - 批量更新价格
35
+ - 把“查数据”从后台页面前移到对话入口,响应更快
36
+ - 一线同学按自然语言提问即可获得可执行结果,培训成本低
37
+ - 统一口径返回订单、房态、经营数据,减少跨角色信息偏差
25
38
 
26
- ### 数据分析
27
- - 查询经营数据、财务数据
28
- - 收益分析、入住率相关数据
39
+ ### 能力边界说明
29
40
 
30
- ### 渠道管理
31
- - 查看渠道列表、渠道详情
32
- - 关联或解绑渠道
41
+ - 当前版本以查询分析能力为主,已覆盖订单、房态、房价、经营数据主链路
42
+ - 写操作能力可按账号权限与部署策略逐步开放
33
43
 
34
44
  ---
35
45
 
36
- ## 用户初始化与快速入门
46
+ ## 我们可以怎么用
47
+
48
+ 你可以按组织现状选择入口,能力层一致。
37
49
 
38
- ### 一、前置条件
50
+ ### 路径 A(推荐): OpenClaw / Hermes Agent + IM
39
51
 
40
- | 项目 | 要求 |
41
- |------|------|
42
- | **Node.js** | ≥ 18.0(运行 `node -v` 检查) |
43
- | **路客云账号** | 已开通路客云 SPMS |
44
- | **访问凭证** | 已获取 **APP_SECRET** 与 **APP_ID**(由路客云管理员配置) |
45
- | **AI 客户端** | 已安装 Cursor、Claude Desktop 或 Claude Code |
52
+ 在 OpenClaw 或 Hermes Agent 中接入 LocalsBnb MCP 后,可打通:
46
53
 
47
- ### 二、获取访问凭证
54
+ - 微信
55
+ - 企业微信
56
+ - QQ
57
+ - 飞书
58
+ - 钉钉
59
+ - iMessage
48
60
 
49
- | 凭证 | 说明 | 示例格式 |
50
- |------|------|----------|
51
- | **APP_SECRET** | 路客云访问令牌,用于 API 鉴权 | 由路客云后台提供的 token 字符串 |
52
- | **APP_ID** | 营地/物业 ID,标识一家店或经营主体 | 数字字符串,如 `12345` |
61
+ 典型对话:
53
62
 
54
- 请联系路客云管理员或进入路客云后台获取:https://minsubao.localhome.cn/ → 「设置」→「API 密钥管理」或联系技术支持。
63
+ - 「查询今天房态」
64
+ - 「查询近期房价」
65
+ - 「今天预离还有几单?」
66
+ - 「查看张三的订单详情」
67
+ - 「看下本周入住率和营收」
68
+ - 「帮我根据当前经营情况,并结合近期天气、节假日等情况给出调价建议」
69
+ - 「拉取近 30 天入住率、房价、渠道占比和订单取消率,结合周末与节假日,给我一版下周调价策略(含涨降幅区间和执行优先级)」
70
+ - 「基于今日预抵/预离/在住结构,识别今晚可能的满房风险与空置风险,并给出房态和价格联动建议」
71
+ - 「结合最近一周经营数据与历史同周表现,输出门店晨会简报:异常指标、可能原因、今日行动项」
72
+ - 「对比近 14 天不同渠道订单质量(ADR、间夜、取消率),给出渠道投放与限房建议」
55
73
 
56
- > ⚠️ **安全提醒**:请勿将凭证分享给他人或提交到公开代码仓库。
74
+ ### 路径 B:MCP 客户端直连
57
75
 
58
- ### 三、选择安装方式
76
+ 适合总部运营、区域管理、店长、实施团队进行日常查询与管理:
59
77
 
60
- **方式 A:npx 直接运行(推荐,免安装)** — 无需下载,首次运行自动拉取。
78
+ - OpenClaw
79
+ - Hermes Agent
80
+ - Cursor
81
+ - Claude Desktop
82
+ - Claude Code
83
+ - 其他 MCP 客户端
61
84
 
62
- **方式 B:解压包安装** — 从发布页下载 `lukeyun-pms-mcp-vX.X.X.zip`,解压后在目录下执行 `npm install --production`。
85
+ ---
63
86
 
64
- **方式 C:从源码构建** — 克隆项目后执行 `npm install` 和 `npm run build`,配置时指向 `dist/run.sh` 或 `dist/run.cjs`。
87
+ ## 怎么配置
65
88
 
66
- ### 四、配置 MCP 客户端
89
+ ### 1) 前置条件
67
90
 
68
- #### 配置 Cursor
91
+ - 已开通路客云相关 API 权限
92
+ - 获取必填凭证:
93
+ - `APP_SECRET`(访问令牌)
94
+ - `APP_ID`(访问ID)
69
95
 
70
- 1. 打开 Cursor → `Cmd/Ctrl + ,` 打开设置 → 搜索「MCP」→ 找到 **MCP Servers** → 编辑 `~/.cursor/mcp.json`
71
- 2. 添加配置(**替换凭证为你的实际值**):
96
+ ### 2) 通用 MCP 配置
72
97
 
73
- **npx 方式(推荐)**
74
98
  ```json
75
99
  {
76
100
  "mcpServers": {
@@ -78,147 +102,102 @@ AI 会帮您调用路客云,并返回结果。
78
102
  "command": "npx",
79
103
  "args": ["--yes", "localsbnb-mcp-server"],
80
104
  "env": {
81
- "APP_SECRET": "<你的 token>",
82
- "APP_ID": "<你的 campId>"
105
+ "APP_SECRET": "<你的 APP_SECRET>",
106
+ "APP_ID": "<你的 APP_ID>"
83
107
  }
84
108
  }
85
109
  }
86
110
  }
87
111
  ```
88
112
 
89
- **解压包 / 源码构建方式**
90
- ```json
91
- {
92
- "mcpServers": {
93
- "LocalsBnb MCP": {
94
- "command": "sh",
95
- "args": ["/你的实际路径/dist/run.sh"],
96
- "env": {
97
- "APP_SECRET": "<你的 token>",
98
- "APP_ID": "<你的 campId>"
99
- }
100
- }
101
- }
102
- }
103
- ```
113
+ ### 3) OpenClaw / Hermes Agent(优先推荐)
104
114
 
105
- > 若 `run.sh` 报错,可改用:`"command": "node"`,`"args": ["/你的路径/dist/run.cjs"]`
115
+ 这是当前最主流、最容易规模化落地的接入方式,建议作为第一实施路径。
106
116
 
107
- 3. 完全重启 Cursor
117
+ 1. 在 OpenClaw / Hermes Agent 中注册 LocalsBnb MCP(配置 `APP_SECRET` + `APP_ID`)
118
+ 2. 绑定 IM 渠道(微信、企微、QQ、飞书、钉钉、iMessage)
119
+ 3. 配置角色权限与可执行边界(谁可查、谁可操作、谁需二次确认)
120
+ 4. 配置常用意图路由(如:今日房态、今日订单、订单详情、经营数据)
121
+ 5. 以“查询今天房态 / 查询今日订单 / 输出晨会简报”完成联调验收
108
122
 
109
- #### 配置 Claude Desktop
123
+ > 建议先上线查询类能力,再逐步开放写操作,保证上线稳定性与组织接受度。
110
124
 
111
- 1. 找到配置文件:
112
- - macOS:`~/Library/Application Support/Claude/claude_desktop_config.json`
113
- - Windows:`%APPDATA%\Claude\claude_desktop_config.json`
114
- - Linux:`~/.config/Claude/claude_desktop_config.json`
115
- 2. 添加与上文相同的 `mcpServers` 配置块
116
- 3. 保存并重启 Claude Desktop
125
+ #### OpenClaw 自然语言一键安装(推荐新手)
117
126
 
118
- #### 配置 Claude Code
127
+ 如果你已将 MCP 发布到 GitHub 与 npm,可直接通过对话让 OpenClaw 完成安装与配置。
119
128
 
120
- Claude Code 是终端版 Claude,通过 `claude mcp add` 添加 MCP 服务。包已发布到 npm,可直接用 npx 运行:
129
+ **步骤 1:准备凭证**
121
130
 
122
- **方式 1:命令行添加(推荐)**
131
+ - 在路客云 SPMS 获取 `APP_SECRET` 与 `APP_ID`
132
+ - 确认当前账号已开通对应查询权限(订单、房态、房价、经营数据)
123
133
 
124
- 在终端执行(**替换凭证为你的实际值**)。注意:**服务器名必须写在 `-e` 参数之前**:
134
+ **步骤 2:在 OpenClaw 或 Hermes Agent 中发送安装指令**
125
135
 
126
- ```bash
127
- claude mcp add LocalsBnbMCP --scope user \
128
- -e APP_SECRET="<你的 token>" \
129
- -e APP_ID="<你的 campId>" \
130
- -- npx -y localsbnb-mcp-server
131
- ```
132
-
133
- - 使用 `-e KEY=value` 传递环境变量(勿用 `--env`)
134
- - `--scope user`:所有项目可用;改为 `--scope local` 仅当前项目
135
-
136
- **方式 2:手动编辑配置文件**
136
+ 建议使用下面这句(比口语更稳定):
137
137
 
138
- 在项目根目录创建或编辑 `.mcp.json`:
139
-
140
- ```json
141
- {
142
- "mcpServers": {
143
- "LocalsBnb MCP": {
144
- "command": "npx",
145
- "args": ["-y", "localsbnb-mcp-server"],
146
- "env": {
147
- "APP_SECRET": "<你的 token>",
148
- "APP_ID": "<你的 campId>"
149
- }
150
- }
151
- }
152
- }
138
+ ```text
139
+ 请帮我安装 localsbnb-mcp-server,并配置 MCP 服务名为 LocalsBnb MCP。
140
+ 使用环境变量:
141
+ APP_SECRET=<你的APP_SECRET>
142
+ APP_ID=<你的APP_ID>
143
+ 安装完成后请先执行“查询今天房态”和“查询今日订单”做连通性验证。
153
144
  ```
154
145
 
155
- 也可将 MCP 配置写入用户级 `~/.claude.json` 的 `mcpServers` 字段。
156
-
157
- **验证**:在 Claude Code 中输入 `/mcp` 查看是否已加载,或直接说「查询今天的房态」测试。
146
+ **步骤 3:验收**
158
147
 
159
- ### 五、验证配置
148
+ - 能成功返回“今日房态”
149
+ - 能成功返回“今日订单(预抵/在住/预离)”
150
+ - 若失败,按错误提示检查 `APP_SECRET` / `APP_ID` 是否正确
160
151
 
161
- - **Cursor**:`Cmd/Ctrl + Shift + P` → 输入「MCP」,查看是否出现 `LocalsBnb MCP` 相关工具
162
- - **Claude Desktop**:新开对话,输入 `@LocalsBnb MCP` 或「查询今天的房态」
163
- - **Claude Code**:输入 `/mcp` 查看工具,或直接说「查询今天的房态」
152
+ > 安全建议:请在私聊或受控环境中发送凭证,不要在公开群聊明文发送。
164
153
 
165
- 若能返回房态、订单等数据,说明配置成功。
154
+ ### 4) 其他 MCP 客户端(补充接入)
166
155
 
167
- ### 六、可用工具一览
156
+ #### Cursor
168
157
 
169
- | 工具名 | 说明 | 示例指令 |
170
- |--------|------|----------|
171
- | `query_today_orders` | 今日订单(预抵/在住/预离) | 「今天有哪些订单?」 |
172
- | `get_order_details_v2` | 订单详情 | 「查一下订单 12345 的详情」 |
173
- | `query_today_room_status` | 今日房态 | 「今天房态怎么样?」 |
174
- | `query_room_status_new` | 房型日历价(新接口) | 「查一下未来 7 天的房态和价格」 |
175
- | `query_room_prices` | 近期房价 | 「本周房价是多少?」 |
176
- | `query_operational_data_v2` | 运营数据 | 「今天的经营情况如何?」 |
158
+ 编辑 `~/.cursor/mcp.json`,加入上面的 `mcpServers` 配置并重启 Cursor。
177
159
 
178
- ### 七、配置项速查
160
+ #### Claude Desktop
179
161
 
180
- | 环境变量 | 必填 | 说明 |
181
- |----------|------|------|
182
- | `APP_SECRET` | 是 | 路客云访问令牌 |
183
- | `APP_ID` | 是 | 营地 ID |
184
- | `LOG_LEVEL` | 否 | `info` / `debug`,调试用 |
162
+ - macOS: `~/Library/Application Support/Claude/claude_desktop_config.json`
163
+ - Windows: `%APPDATA%\\Claude\\claude_desktop_config.json`
164
+ - Linux: `~/.config/Claude/claude_desktop_config.json`
185
165
 
186
- ### 八、常见问题
166
+ #### Claude Code
187
167
 
188
- | 问题 | 解决 |
189
- |------|------|
190
- | 连接失败 / 无权限 | 确认 `APP_SECRET`、`APP_ID` 正确,且已开通 MCP/API 权限 |
191
- | 找不到工具 | 检查 JSON 格式、路径是否正确,完全重启客户端 |
192
- | ERR_REQUIRE_ESM | 使用 `dist/run.sh` 或 `dist/run.cjs` |
193
- | npx 缓存异常(Windows) | 执行 `npx clear-npx-cache` 后重试 |
168
+ ```bash
169
+ claude mcp add LocalsBnbMCP --scope user \
170
+ -e APP_SECRET="<你的 token>" \
171
+ -e APP_ID="<你的 campId>" \
172
+ -- npx -y localsbnb-mcp-server
173
+ ```
194
174
 
195
175
  ---
196
176
 
197
- ## 使用场景示例
177
+ ## 常见问题
198
178
 
199
- | 您可以说 | AI 会帮您 |
200
- |---------|----------|
201
- | 今天有几间房是空房? | 查询并展示今日房态 |
202
- | 本周入住率怎么样? | 统计并展示入住率数据 |
203
- | 帮我查一下订单号为 XXX 的详情 | 返回该订单的完整信息 |
204
- | 明天 101 房的价格是多少? | 查询并展示该房型价格 |
179
+ | 问题 | 处理方式 |
180
+ |---|---|
181
+ | 连接失败 / 无权限 | 核对 `APP_SECRET`、`APP_ID`,并确认路客云侧已开通权限 |
182
+ | 秘钥错误 | 当前秘钥信息错误,请前往登录路客云 SPMS 获取秘钥,或联系路客云客户经理咨询 |
183
+ | 找不到 MCP 工具 | 检查 JSON 格式、命令路径并重启客户端 |
184
+ | `ERR_REQUIRE_ESM` | 优先使用 `dist/run.sh` 或 `dist/run.cjs` |
205
185
 
206
- ## 部署方式
186
+ ---
207
187
 
208
- - **云端使用**:由路客云托管,您只需完成配置即可使用
209
- - **本地部署**:如需在企业内网使用,可联系技术支持获取本地部署方案
188
+ ## 安全建议
210
189
 
211
- ## 安全说明
190
+ - 凭证通过环境变量注入
191
+ - 不提交真实 `APP_SECRET` 到仓库
192
+ - 关键操作建议保留审核/确认流程
212
193
 
213
- - 使用 HTTPS 加密传输
214
- - 密钥加密存储
215
- - 支持按接口进行权限控制
194
+ ---
216
195
 
217
- ## 需要帮助?
196
+ ## 技术支持
218
197
 
219
- - **技术支持**:https://minsubao.localhome.cn/
198
+ - 技术支持: [https://minsubao.localhome.cn/](https://minsubao.localhome.cn/)
220
199
 
221
200
  ---
222
201
 
223
- **文档版本**:v1.0
224
- **最后更新**:2026年
202
+ **文档版本**: v2.0
203
+ **最后更新**: 2026-04
@@ -1 +1 @@
1
- function _0x26d9(_0x29a545,_0x1bdfba){const _0x5e4387=_0x5e43();return _0x26d9=function(_0x26d987,_0x8bc682){_0x26d987=_0x26d987-0x95;let _0x50f5aa=_0x5e4387[_0x26d987];return _0x50f5aa;},_0x26d9(_0x29a545,_0x1bdfba);}function _0x5e43(){const _0x1a8504=['setAPIKey','getScopes','split','getCampId','info','79767VzKKGp','APP_SECRET','hudsonAccessToken','hasAPIKey','Hudson\x20credentials\x20loaded\x20from\x20config','LUKEYUN_API_SCOPES','APP_ID','API\x20key\x20loaded\x20from\x20environment','trim','includes','campId','length','API\x20key\x20set','warn','1832931JAxSRt','getHudsonAccessToken','APP_SECRET\x20or\x20APP_ID\x20not\x20found\x20in\x20environment\x20variables','Hudson\x20credentials\x20set','scopes','apiKey','loadFromEnv','APP_ID\x20not\x20configured.\x20Please\x20set\x20APP_ID\x20environment\x20variable.','isConfigured','1673960pvVQof','3242JyGaWP','6bsFmwW','getAPIKey','11BhKrvm','env','isHudsonConfigured','map','52crLjnJ','18933020iwMpCr','4271393IzNZze','132vjesYI','6444296IRGFoq','API\x20key\x20not\x20found\x20in\x20environment\x20variables'];_0x5e43=function(){return _0x1a8504;};return _0x5e43();}(function(_0x189880,_0x51a7da){const _0xd1c076=_0x189880();while(!![]){try{const _0xdf193e=parseInt(_0x26d9(0xb2))/0x1*(-parseInt(_0x26d9(0xbc))/0x2)+-parseInt(_0x26d9(0x9a))/0x3*(parseInt(_0x26d9(0xb9))/0x4)+parseInt(_0x26d9(0xb1))/0x5*(parseInt(_0x26d9(0xb3))/0x6)+-parseInt(_0x26d9(0xbb))/0x7+-parseInt(_0x26d9(0xbd))/0x8+parseInt(_0x26d9(0xa8))/0x9+parseInt(_0x26d9(0xba))/0xa*(parseInt(_0x26d9(0xb5))/0xb);if(_0xdf193e===_0x51a7da)break;else _0xd1c076['push'](_0xd1c076['shift']());}catch(_0x4afdd8){_0xd1c076['push'](_0xd1c076['shift']());}}}(_0x5e43,0x6f6c4));import{logger}from'../utils/logger.js';export class APIKeyManager{[_0x26d9(0xad)]=null;['scopes']=[];[_0x26d9(0x9c)]=null;[_0x26d9(0xa4)]=null;[_0x26d9(0xae)](){this['apiKey']=process[_0x26d9(0xb6)]['LUKEYUN_API_KEY']||null;const _0x4c1a54=process[_0x26d9(0xb6)][_0x26d9(0x9f)];this[_0x26d9(0xac)]=_0x4c1a54?_0x4c1a54[_0x26d9(0x97)](',')[_0x26d9(0xb8)](_0x5ea3d2=>_0x5ea3d2[_0x26d9(0xa2)]()):[],this[_0x26d9(0x9c)]=process[_0x26d9(0xb6)][_0x26d9(0x9b)]||null,this[_0x26d9(0xa4)]=process[_0x26d9(0xb6)][_0x26d9(0xa0)]||null,!this[_0x26d9(0xad)]?logger[_0x26d9(0xa7)](_0x26d9(0xbe)):logger[_0x26d9(0x99)](_0x26d9(0xa1),{'hasScopes':this[_0x26d9(0xac)]['length']>0x0}),!this[_0x26d9(0x9c)]||!this[_0x26d9(0xa4)]?logger[_0x26d9(0xa7)](_0x26d9(0xaa)):logger[_0x26d9(0x99)]('Hudson\x20credentials\x20loaded\x20from\x20environment');}['loadFromConfig'](_0x17a5ac){this[_0x26d9(0xad)]=_0x17a5ac['apiKey']||null,this[_0x26d9(0xac)]=_0x17a5ac[_0x26d9(0xac)]||[],this[_0x26d9(0x9c)]=_0x17a5ac['hudsonAccessToken']||null,this[_0x26d9(0xa4)]=_0x17a5ac[_0x26d9(0xa4)]||null,this[_0x26d9(0xad)]&&logger['info']('API\x20key\x20loaded\x20from\x20config',{'hasScopes':this['scopes'][_0x26d9(0xa5)]>0x0}),this[_0x26d9(0x9c)]&&this['campId']&&logger[_0x26d9(0x99)](_0x26d9(0x9e));}[_0x26d9(0x95)](_0x348ce2,_0x4938a2){this[_0x26d9(0xad)]=_0x348ce2,this[_0x26d9(0xac)]=_0x4938a2||[],logger[_0x26d9(0x99)](_0x26d9(0xa6),{'hasScopes':this['scopes'][_0x26d9(0xa5)]>0x0});}['setHudsonCredentials'](_0x15fd2d,_0x3dfa16){this['hudsonAccessToken']=_0x15fd2d,this[_0x26d9(0xa4)]=_0x3dfa16,logger[_0x26d9(0x99)](_0x26d9(0xab));}[_0x26d9(0xb4)](){return this[_0x26d9(0xad)]||'';}[_0x26d9(0x9d)](){return this[_0x26d9(0xad)]!==null&&this['apiKey']!=='';}['hasScope'](_0x28980c){if(this[_0x26d9(0xac)][_0x26d9(0xa3)]('*'))return!![];return this[_0x26d9(0xac)]['includes'](_0x28980c);}[_0x26d9(0x96)](){return[...this[_0x26d9(0xac)]];}[_0x26d9(0xb0)](){return this[_0x26d9(0xad)]!==null;}[_0x26d9(0xb7)](){return this[_0x26d9(0x9c)]!==null&&this[_0x26d9(0xa4)]!==null;}[_0x26d9(0xa9)](){if(!this[_0x26d9(0x9c)])throw new Error('APP_SECRET\x20not\x20configured.\x20Please\x20set\x20APP_SECRET\x20environment\x20variable.');return this[_0x26d9(0x9c)];}[_0x26d9(0x98)](){if(!this[_0x26d9(0xa4)])throw new Error(_0x26d9(0xaf));return this[_0x26d9(0xa4)];}}
1
+ (function(_0x2f9899,_0x49f967){const _0x575d82=_0x2f9899();while(!![]){try{const _0x239b3a=-parseInt(_0x568e(0xcb))/0x1*(parseInt(_0x568e(0xb0))/0x2)+-parseInt(_0x568e(0xd1))/0x3+parseInt(_0x568e(0xc3))/0x4*(-parseInt(_0x568e(0xd7))/0x5)+-parseInt(_0x568e(0xb6))/0x6+-parseInt(_0x568e(0xd2))/0x7*(-parseInt(_0x568e(0xd4))/0x8)+parseInt(_0x568e(0xc7))/0x9*(-parseInt(_0x568e(0xda))/0xa)+-parseInt(_0x568e(0xd3))/0xb*(-parseInt(_0x568e(0xc2))/0xc);if(_0x239b3a===_0x49f967)break;else _0x575d82['push'](_0x575d82['shift']());}catch(_0x29429a){_0x575d82['push'](_0x575d82['shift']());}}}(_0x64e1,0x83792));import{logger}from'../utils/logger.js';function _0x568e(_0x2a16f1,_0x51e259){const _0x64e1f2=_0x64e1();return _0x568e=function(_0x568eb8,_0x27d22a){_0x568eb8=_0x568eb8-0xaf;let _0x25f5f6=_0x64e1f2[_0x568eb8];return _0x25f5f6;},_0x568e(_0x2a16f1,_0x51e259);}export class APIKeyManager{['apiKey']=null;[_0x568e(0xd9)]=[];[_0x568e(0xba)]=null;[_0x568e(0xd8)]=null;[_0x568e(0xc8)](){this['apiKey']=process[_0x568e(0xb8)]['LUKEYUN_API_KEY']||null;const _0x240199=process[_0x568e(0xb8)][_0x568e(0xb4)];this[_0x568e(0xd9)]=_0x240199?_0x240199[_0x568e(0xb1)](',')['map'](_0xc2f133=>_0xc2f133['trim']()):[],this[_0x568e(0xba)]=process[_0x568e(0xb8)][_0x568e(0xbd)]||null,this[_0x568e(0xd8)]=process['env'][_0x568e(0xcd)]||null,!this[_0x568e(0xc4)]?logger['warn'](_0x568e(0xd6)):logger[_0x568e(0xd5)](_0x568e(0xca),{'hasScopes':this[_0x568e(0xd9)][_0x568e(0xc6)]>0x0}),!this[_0x568e(0xba)]||!this['campId']?logger[_0x568e(0xcc)](_0x568e(0xc1)):logger[_0x568e(0xd5)](_0x568e(0xbe));}[_0x568e(0xc0)](_0x3319ae){this[_0x568e(0xc4)]=_0x3319ae['apiKey']||null,this['scopes']=_0x3319ae[_0x568e(0xd9)]||[],this[_0x568e(0xba)]=_0x3319ae['hudsonAccessToken']||null,this[_0x568e(0xd8)]=_0x3319ae[_0x568e(0xd8)]||null,this[_0x568e(0xc4)]&&logger['info']('API\x20key\x20loaded\x20from\x20config',{'hasScopes':this[_0x568e(0xd9)][_0x568e(0xc6)]>0x0}),this[_0x568e(0xba)]&&this['campId']&&logger[_0x568e(0xd5)]('Hudson\x20credentials\x20loaded\x20from\x20config');}[_0x568e(0xd0)](_0x1bf781,_0x42572d){this['apiKey']=_0x1bf781,this[_0x568e(0xd9)]=_0x42572d||[],logger[_0x568e(0xd5)](_0x568e(0xce),{'hasScopes':this['scopes'][_0x568e(0xc6)]>0x0});}[_0x568e(0xaf)](_0x5bb177,_0x52334b){this[_0x568e(0xba)]=_0x5bb177,this[_0x568e(0xd8)]=_0x52334b,logger[_0x568e(0xd5)](_0x568e(0xc5));}[_0x568e(0xdb)](){return this[_0x568e(0xc4)]||'';}[_0x568e(0xc9)](){return this[_0x568e(0xc4)]!==null&&this[_0x568e(0xc4)]!=='';}[_0x568e(0xb2)](_0x454715){if(this['scopes'][_0x568e(0xbb)]('*'))return!![];return this[_0x568e(0xd9)][_0x568e(0xbb)](_0x454715);}[_0x568e(0xbf)](){return[...this[_0x568e(0xd9)]];}[_0x568e(0xbc)](){return this[_0x568e(0xc4)]!==null;}[_0x568e(0xb9)](){return this[_0x568e(0xba)]!==null&&this['campId']!==null;}[_0x568e(0xcf)](){if(!this['hudsonAccessToken'])throw new Error(_0x568e(0xb3));return this[_0x568e(0xba)];}[_0x568e(0xb5)](){if(!this[_0x568e(0xd8)])throw new Error(_0x568e(0xb7));return this[_0x568e(0xd8)];}}function _0x64e1(){const _0x1e1c3f=['loadFromConfig','APP_SECRET\x20or\x20APP_ID\x20not\x20found\x20in\x20environment\x20variables','12dxcbRY','44ywdfQy','apiKey','Hudson\x20credentials\x20set','length','4312116BHWzCA','loadFromEnv','hasAPIKey','API\x20key\x20loaded\x20from\x20environment','144883lRRXIb','warn','APP_ID','API\x20key\x20set','getHudsonAccessToken','setAPIKey','2280243AMAFWr','7zJLCfn','25990591mxyzHg','6511416IIyGFu','info','API\x20key\x20not\x20found\x20in\x20environment\x20variables','155065kibhdL','campId','scopes','10WAJiTA','getAPIKey','setHudsonCredentials','10iigHag','split','hasScope','APP_SECRET\x20not\x20configured.\x20Please\x20set\x20APP_SECRET\x20environment\x20variable.','LUKEYUN_API_SCOPES','getCampId','2000586uiQMBW','APP_ID\x20not\x20configured.\x20Please\x20set\x20APP_ID\x20environment\x20variable.','env','isHudsonConfigured','hudsonAccessToken','includes','isConfigured','APP_SECRET','Hudson\x20credentials\x20loaded\x20from\x20environment','getScopes'];_0x64e1=function(){return _0x1e1c3f;};return _0x64e1();}
@@ -1 +1 @@
1
- (function(_0x4f1810,_0x36bbd9){var _0x1df192=_0x4f1810();while(!![]){try{var _0x213f1f=parseInt(_0x1bfb(0x16a))/0x1*(-parseInt(_0x1bfb(0x15e))/0x2)+-parseInt(_0x1bfb(0x163))/0x3+-parseInt(_0x1bfb(0x167))/0x4*(parseInt(_0x1bfb(0x168))/0x5)+parseInt(_0x1bfb(0x165))/0x6*(-parseInt(_0x1bfb(0x161))/0x7)+parseInt(_0x1bfb(0x15f))/0x8*(-parseInt(_0x1bfb(0x162))/0x9)+-parseInt(_0x1bfb(0x160))/0xa*(-parseInt(_0x1bfb(0x166))/0xb)+parseInt(_0x1bfb(0x164))/0xc*(parseInt(_0x1bfb(0x169))/0xd);if(_0x213f1f===_0x36bbd9)break;else _0x1df192['push'](_0x1df192['shift']());}catch(_0x31a4ac){_0x1df192['push'](_0x1df192['shift']());}}}(_0x4ed9,0x466e7));function _0x1bfb(_0xb3e2c9,_0x5e62d9){var _0x4ed93c=_0x4ed9();return _0x1bfb=function(_0x1bfb60,_0xa44310){_0x1bfb60=_0x1bfb60-0x15e;var _0x2c9966=_0x4ed93c[_0x1bfb60];return _0x2c9966;},_0x1bfb(_0xb3e2c9,_0x5e62d9);}function _0x4ed9(){var _0x2d834c=['4GvAwtV','1133695FJRcxn','11230063UPKNis','59AOgFTC','606YYmOBU','159832NMagfo','790jKlqwo','14JpDcMD','171NSQZvn','1482402jQakAG','12khzXcJ','92844bgkZmf','79915htgGwR'];_0x4ed9=function(){return _0x2d834c;};return _0x4ed9();}export{APIKeyManager}from'./apiKeyManager.js';export{PermissionChecker}from'./permissionChecker.js';
1
+ (function(_0x4f6601,_0x574952){var _0x9b87b4=_0x4f6601();while(!![]){try{var _0xb96e66=parseInt(_0x313a(0x184))/0x1+-parseInt(_0x313a(0x180))/0x2*(-parseInt(_0x313a(0x185))/0x3)+parseInt(_0x313a(0x182))/0x4+parseInt(_0x313a(0x186))/0x5+-parseInt(_0x313a(0x17f))/0x6*(parseInt(_0x313a(0x17d))/0x7)+-parseInt(_0x313a(0x17e))/0x8+parseInt(_0x313a(0x181))/0x9*(-parseInt(_0x313a(0x183))/0xa);if(_0xb96e66===_0x574952)break;else _0x9b87b4['push'](_0x9b87b4['shift']());}catch(_0x529e69){_0x9b87b4['push'](_0x9b87b4['shift']());}}}(_0x383e,0xe7d43));export{APIKeyManager}from'./apiKeyManager.js';export{PermissionChecker}from'./permissionChecker.js';function _0x313a(_0x2e22bf,_0x450934){var _0x383e50=_0x383e();return _0x313a=function(_0x313a75,_0x127696){_0x313a75=_0x313a75-0x17d;var _0x1c7e58=_0x383e50[_0x313a75];return _0x1c7e58;},_0x313a(_0x2e22bf,_0x450934);}function _0x383e(){var _0x4fde45=['2934716anaQUR','134630gfusdu','245698gAJxmn','417FRCPrN','3832535AVMuef','940961EXpMrZ','14301544alizTf','18uZKJyT','23360NVEqpS','153QZzqrH'];_0x383e=function(){return _0x4fde45;};return _0x383e();}
@@ -1 +1 @@
1
- (function(_0x1151f8,_0x36f166){const _0x1dfa77=_0x1151f8();while(!![]){try{const _0x4898dd=-parseInt(_0x5bc5(0x18f))/0x1*(parseInt(_0x5bc5(0x17e))/0x2)+parseInt(_0x5bc5(0x183))/0x3*(parseInt(_0x5bc5(0x178))/0x4)+-parseInt(_0x5bc5(0x195))/0x5*(-parseInt(_0x5bc5(0x189))/0x6)+-parseInt(_0x5bc5(0x197))/0x7*(-parseInt(_0x5bc5(0x182))/0x8)+parseInt(_0x5bc5(0x180))/0x9*(parseInt(_0x5bc5(0x199))/0xa)+-parseInt(_0x5bc5(0x18b))/0xb*(parseInt(_0x5bc5(0x184))/0xc)+-parseInt(_0x5bc5(0x18e))/0xd*(parseInt(_0x5bc5(0x198))/0xe);if(_0x4898dd===_0x36f166)break;else _0x1dfa77['push'](_0x1dfa77['shift']());}catch(_0x2f5006){_0x1dfa77['push'](_0x1dfa77['shift']());}}}(_0x1a06,0xe2be9));import{MCPError,ErrorCode,getPermissionDeniedMessage}from'../utils/errorHandler.js';function _0x1a06(){const _0x2f51f6=['query_today_orders','length','hasScope','getScopes','PERMISSION_DENIED','3392405QwXHiO','generic','2116051eDdzHT','209986UTBlaM','40Tumbkd','get_order_details_v2','4TDGdeq','query_pre_arrival_orders','finance','query_room_status_new','Permission\x20check\x20passed','hasAPIKey','14KumclP','keyManager','3391425flzVwD','query_pre_departure_orders','40ZjRbte','3359514ASOWfx','7008RTFHum','room_status','get_order_details','debug','some','6emETok','checkPermission','5346EQtUtR','isHudsonConfigured','query_in_house_orders','2470GALTtA','107815cVAZno'];_0x1a06=function(){return _0x2f51f6;};return _0x1a06();}function _0x5bc5(_0x5bf110,_0x5b2c29){const _0x1a0652=_0x1a06();return _0x5bc5=function(_0x5bc52d,_0x5cbfcb){_0x5bc52d=_0x5bc52d-0x177;let _0x5180bb=_0x1a0652[_0x5bc52d];return _0x5180bb;},_0x5bc5(_0x5bf110,_0x5b2c29);}import{logger}from'../utils/logger.js';function toolToPermissionDomain(_0x3b9cbb){switch(_0x3b9cbb){case _0x5bc5(0x190):case _0x5bc5(0x179):case _0x5bc5(0x18d):case _0x5bc5(0x181):case'query_orders_by_date_range':case _0x5bc5(0x177):case'query_orders':case _0x5bc5(0x186):return'orders';case'query_operational_data_v2':return _0x5bc5(0x17a);case'query_today_room_status':case _0x5bc5(0x17b):return _0x5bc5(0x185);case'query_room_prices':return'room_price';default:return _0x5bc5(0x196);}}export class PermissionChecker{[_0x5bc5(0x17f)];constructor(_0x5655e4){this[_0x5bc5(0x17f)]=_0x5655e4;}[_0x5bc5(0x18a)](_0x56c3ac,_0x2c8db3){if(_0x2c8db3[_0x5bc5(0x191)]===0x0)return;if(!this[_0x5bc5(0x17f)][_0x5bc5(0x17d)]()&&this['keyManager'][_0x5bc5(0x18c)]()){logger[_0x5bc5(0x187)]('Permission\x20check\x20passed\x20(Hudson\x20auth\x20only)',{'tool':_0x56c3ac,'requiredScopes':_0x2c8db3});return;}const _0x1fdd37=_0x2c8db3[_0x5bc5(0x188)](_0x1891c5=>this[_0x5bc5(0x17f)][_0x5bc5(0x192)](_0x1891c5));if(!_0x1fdd37){const _0x2b4418=this['keyManager'][_0x5bc5(0x193)](),_0x1ae448=toolToPermissionDomain(_0x56c3ac);logger['warn']('Permission\x20denied',{'tool':_0x56c3ac,'required':_0x2c8db3,'current':_0x2b4418,'domain':_0x1ae448});throw new MCPError(ErrorCode[_0x5bc5(0x194)],getPermissionDeniedMessage(_0x1ae448),{'tool':_0x56c3ac,'requiredScopes':_0x2c8db3,'currentScopes':_0x2b4418,'domain':_0x1ae448,'source':'路客云AI'});}logger[_0x5bc5(0x187)](_0x5bc5(0x17c),{'tool':_0x56c3ac,'scopes':_0x2c8db3});}}
1
+ function _0x42fe(_0x37323a,_0x319f1d){const _0x30067d=_0x3006();return _0x42fe=function(_0x42fe70,_0x4a045c){_0x42fe70=_0x42fe70-0x161;let _0x5aa1d7=_0x30067d[_0x42fe70];return _0x5aa1d7;},_0x42fe(_0x37323a,_0x319f1d);}(function(_0x2ac63f,_0x16c282){const _0x8d55d2=_0x2ac63f();while(!![]){try{const _0x23a6ec=parseInt(_0x42fe(0x161))/0x1*(-parseInt(_0x42fe(0x167))/0x2)+-parseInt(_0x42fe(0x178))/0x3+-parseInt(_0x42fe(0x16a))/0x4+-parseInt(_0x42fe(0x181))/0x5+parseInt(_0x42fe(0x173))/0x6+parseInt(_0x42fe(0x17a))/0x7*(parseInt(_0x42fe(0x16b))/0x8)+parseInt(_0x42fe(0x180))/0x9*(parseInt(_0x42fe(0x17f))/0xa);if(_0x23a6ec===_0x16c282)break;else _0x8d55d2['push'](_0x8d55d2['shift']());}catch(_0x40ace3){_0x8d55d2['push'](_0x8d55d2['shift']());}}}(_0x3006,0x7e2e6));import{MCPError,ErrorCode,getPermissionDeniedMessage}from'../utils/errorHandler.js';import{logger}from'../utils/logger.js';function toolToPermissionDomain(_0x171081){switch(_0x171081){case _0x42fe(0x170):case _0x42fe(0x166):case _0x42fe(0x17c):case _0x42fe(0x17e):case _0x42fe(0x179):case _0x42fe(0x16f):case _0x42fe(0x172):case'get_order_details':return _0x42fe(0x16c);case _0x42fe(0x17b):return _0x42fe(0x174);case _0x42fe(0x182):case'query_room_status_new':return'room_status';case _0x42fe(0x164):return _0x42fe(0x175);default:return _0x42fe(0x169);}}export class PermissionChecker{[_0x42fe(0x176)];constructor(_0x2eddf9){this['keyManager']=_0x2eddf9;}[_0x42fe(0x165)](_0x518966,_0x487706){if(_0x487706[_0x42fe(0x171)]===0x0)return;if(!this[_0x42fe(0x176)][_0x42fe(0x177)]()&&this[_0x42fe(0x176)][_0x42fe(0x163)]()){logger[_0x42fe(0x16e)]('Permission\x20check\x20passed\x20(Hudson\x20auth\x20only)',{'tool':_0x518966,'requiredScopes':_0x487706});return;}const _0x16226f=_0x487706['some'](_0x1113dd=>this[_0x42fe(0x176)][_0x42fe(0x168)](_0x1113dd));if(!_0x16226f){const _0x2716dd=this[_0x42fe(0x176)][_0x42fe(0x16d)](),_0x203fba=toolToPermissionDomain(_0x518966);logger[_0x42fe(0x184)]('Permission\x20denied',{'tool':_0x518966,'required':_0x487706,'current':_0x2716dd,'domain':_0x203fba});throw new MCPError(ErrorCode[_0x42fe(0x17d)],getPermissionDeniedMessage(_0x203fba),{'tool':_0x518966,'requiredScopes':_0x487706,'currentScopes':_0x2716dd,'domain':_0x203fba,'source':_0x42fe(0x183)});}logger[_0x42fe(0x16e)](_0x42fe(0x162),{'tool':_0x518966,'scopes':_0x487706});}}function _0x3006(){const _0x3fc4a0=['room_price','keyManager','hasAPIKey','1730931pljmFC','query_orders_by_date_range','243306SjTYKV','query_operational_data_v2','query_in_house_orders','PERMISSION_DENIED','query_pre_departure_orders','8988840WmzLHP','18dFGTSO','2261670zMsoat','query_today_room_status','路客云AI','warn','284008AxtWWk','Permission\x20check\x20passed','isHudsonConfigured','query_room_prices','checkPermission','query_pre_arrival_orders','4yvoJFt','hasScope','generic','1318408eDWOTP','136cOrBoL','orders','getScopes','debug','get_order_details_v2','query_today_orders','length','query_orders','330678FtMEBv','finance'];_0x3006=function(){return _0x3fc4a0;};return _0x3006();}
@@ -1 +1 @@
1
- (function(_0x389207,_0x8a9f3e){const _0x2517cc=_0x389207();while(!![]){try{const _0x685053=parseInt(_0x1a67(0xe6))/0x1+parseInt(_0x1a67(0xe1))/0x2+parseInt(_0x1a67(0xdc))/0x3*(parseInt(_0x1a67(0xf1))/0x4)+-parseInt(_0x1a67(0xe0))/0x5+-parseInt(_0x1a67(0xda))/0x6*(-parseInt(_0x1a67(0xe4))/0x7)+-parseInt(_0x1a67(0xe2))/0x8*(parseInt(_0x1a67(0xdf))/0x9)+-parseInt(_0x1a67(0xeb))/0xa;if(_0x685053===_0x8a9f3e)break;else _0x2517cc['push'](_0x2517cc['shift']());}catch(_0x4e766a){_0x2517cc['push'](_0x2517cc['shift']());}}}(_0x1f72,0xb3314));function _0x1a67(_0x26f3a1,_0x306666){const _0x1f729d=_0x1f72();return _0x1a67=function(_0x1a67a7,_0x1be450){_0x1a67a7=_0x1a67a7-0xd8;let _0x4cc11a=_0x1f729d[_0x1a67a7];return _0x4cc11a;},_0x1a67(_0x26f3a1,_0x306666);}import{config}from'../config/index.js';function _0x1f72(){const _0x56d0f5=['generateKey','525916zLiMXn','Cache\x20expired','Cache\x20cleared','clear','Cache\x20set','13000EKzEnc','expiresAt','keys','Cache\x20deleted','set','data','4JnFscN','stringify','debug','get','now','join','18PnKmVN','ttl','3273195QmwJjI','cache','delete','18ncsnuI','7321530nXFDWs','23014KDFlSy','2655464vLnejE','enabled','2881564OQKnBi'];_0x1f72=function(){return _0x56d0f5;};return _0x1f72();}import{logger}from'../utils/logger.js';export class CacheManager{[_0x1a67(0xdd)]=new Map();[_0x1a67(0xf4)](_0x4c27c7){if(!config['cache']['enabled'])return null;const _0x65b160=this[_0x1a67(0xdd)]['get'](_0x4c27c7);if(!_0x65b160)return null;if(Date[_0x1a67(0xd8)]()>_0x65b160[_0x1a67(0xec)])return this[_0x1a67(0xdd)][_0x1a67(0xde)](_0x4c27c7),logger[_0x1a67(0xf3)](_0x1a67(0xe7),{'key':_0x4c27c7}),null;return logger['debug']('Cache\x20hit',{'key':_0x4c27c7}),_0x65b160[_0x1a67(0xf0)];}['set'](_0x49f90d,_0x378d9e,_0x519f8b){if(!config['cache'][_0x1a67(0xe3)])return;const _0x427da3=_0x519f8b||config[_0x1a67(0xdd)][_0x1a67(0xdb)];this['cache'][_0x1a67(0xef)](_0x49f90d,{'data':_0x378d9e,'expiresAt':Date[_0x1a67(0xd8)]()+_0x427da3}),logger[_0x1a67(0xf3)](_0x1a67(0xea),{'key':_0x49f90d,'ttl':_0x427da3});}[_0x1a67(0xde)](_0x9cfc5d){this['cache'][_0x1a67(0xde)](_0x9cfc5d),logger[_0x1a67(0xf3)](_0x1a67(0xee),{'key':_0x9cfc5d});}[_0x1a67(0xe9)](){this[_0x1a67(0xdd)][_0x1a67(0xe9)](),logger['debug'](_0x1a67(0xe8));}static[_0x1a67(0xe5)](_0x260a67,_0x1fc45d){const _0x1044c1=Object[_0x1a67(0xed)](_0x1fc45d)['sort']()['map'](_0x457d04=>_0x457d04+'='+JSON[_0x1a67(0xf2)](_0x1fc45d[_0x457d04]))[_0x1a67(0xd9)]('&');return _0x260a67+':'+_0x1044c1;}}
1
+ function _0x432d(){const _0x423c27=['stringify','40zUttTl','now','6uzxNHJ','cache','796fSZcWv','1788CPqDAo','188670maZqdt','map','ttl','59554arwaPT','369yMFEnv','3388680PxKALU','delete','Cache\x20hit','Cache\x20set','2286bRSTIx','enabled','set','991571xYkvdQ','clear','Cache\x20cleared','keys','2756545OitGcq','sort','debug','Cache\x20deleted','1589130PliBeK','data'];_0x432d=function(){return _0x423c27;};return _0x432d();}(function(_0x4462b3,_0x2046b4){const _0x4019b1=_0x4462b3();while(!![]){try{const _0x476478=parseInt(_0x5cbc(0x1b9))/0x1*(parseInt(_0x5cbc(0x1cb))/0x2)+parseInt(_0x5cbc(0x1c4))/0x3+-parseInt(_0x5cbc(0x1d2))/0x4+-parseInt(_0x5cbc(0x1c0))/0x5*(-parseInt(_0x5cbc(0x1c9))/0x6)+parseInt(_0x5cbc(0x1bc))/0x7*(-parseInt(_0x5cbc(0x1c7))/0x8)+parseInt(_0x5cbc(0x1d1))/0x9*(-parseInt(_0x5cbc(0x1cd))/0xa)+parseInt(_0x5cbc(0x1d0))/0xb*(parseInt(_0x5cbc(0x1cc))/0xc);if(_0x476478===_0x2046b4)break;else _0x4019b1['push'](_0x4019b1['shift']());}catch(_0x2c2cca){_0x4019b1['push'](_0x4019b1['shift']());}}}(_0x432d,0x72647));import{config}from'../config/index.js';import{logger}from'../utils/logger.js';function _0x5cbc(_0x15cbe0,_0x3dcc3f){const _0x432da9=_0x432d();return _0x5cbc=function(_0x5cbc65,_0x24880e){_0x5cbc65=_0x5cbc65-0x1b6;let _0x13fdfa=_0x432da9[_0x5cbc65];return _0x13fdfa;},_0x5cbc(_0x15cbe0,_0x3dcc3f);}export class CacheManager{[_0x5cbc(0x1ca)]=new Map();['get'](_0x162678){if(!config[_0x5cbc(0x1ca)]['enabled'])return null;const _0x37eae8=this[_0x5cbc(0x1ca)]['get'](_0x162678);if(!_0x37eae8)return null;if(Date['now']()>_0x37eae8['expiresAt'])return this['cache'][_0x5cbc(0x1b6)](_0x162678),logger[_0x5cbc(0x1c2)]('Cache\x20expired',{'key':_0x162678}),null;return logger['debug'](_0x5cbc(0x1b7),{'key':_0x162678}),_0x37eae8[_0x5cbc(0x1c5)];}[_0x5cbc(0x1bb)](_0x28e7bd,_0x3aa652,_0x1bfd7b){if(!config['cache'][_0x5cbc(0x1ba)])return;const _0x39b281=_0x1bfd7b||config[_0x5cbc(0x1ca)][_0x5cbc(0x1cf)];this['cache'][_0x5cbc(0x1bb)](_0x28e7bd,{'data':_0x3aa652,'expiresAt':Date[_0x5cbc(0x1c8)]()+_0x39b281}),logger[_0x5cbc(0x1c2)](_0x5cbc(0x1b8),{'key':_0x28e7bd,'ttl':_0x39b281});}['delete'](_0x10d7c5){this[_0x5cbc(0x1ca)]['delete'](_0x10d7c5),logger[_0x5cbc(0x1c2)](_0x5cbc(0x1c3),{'key':_0x10d7c5});}[_0x5cbc(0x1bd)](){this[_0x5cbc(0x1ca)][_0x5cbc(0x1bd)](),logger[_0x5cbc(0x1c2)](_0x5cbc(0x1be));}static['generateKey'](_0x3e2693,_0x48b5c2){const _0x1f6be3=Object[_0x5cbc(0x1bf)](_0x48b5c2)[_0x5cbc(0x1c1)]()[_0x5cbc(0x1ce)](_0x3ff3ad=>_0x3ff3ad+'='+JSON[_0x5cbc(0x1c6)](_0x48b5c2[_0x3ff3ad]))['join']('&');return _0x3e2693+':'+_0x1f6be3;}}
@@ -1 +1 @@
1
- (function(_0x51db1d,_0x755857){const _0x5a1ba9=_0x51db1d();while(!![]){try{const _0x554fb5=-parseInt(_0x394e(0xe1))/0x1*(parseInt(_0x394e(0x10d))/0x2)+parseInt(_0x394e(0x108))/0x3*(parseInt(_0x394e(0xfa))/0x4)+parseInt(_0x394e(0x101))/0x5+-parseInt(_0x394e(0x11a))/0x6+-parseInt(_0x394e(0xe3))/0x7*(parseInt(_0x394e(0xee))/0x8)+parseInt(_0x394e(0x10a))/0x9*(parseInt(_0x394e(0xf0))/0xa)+parseInt(_0x394e(0xfd))/0xb;if(_0x554fb5===_0x755857)break;else _0x5a1ba9['push'](_0x5a1ba9['shift']());}catch(_0x31482a){_0x5a1ba9['push'](_0x5a1ba9['shift']());}}}(_0x9a16,0x4cc69));function _0x9a16(){const _0xdc0e48=['API\x20request','env','INTERNAL_ERROR','params','Request\x20interceptor\x20error','application/json','use','execute','4bbMfwC','API_ERROR','client','3322561kiXUVl','1.0.0','API\x20request\x20timeout','API密钥无效或已过期','1870615HAcfzB','method','status','debug','create','timeout','object','385068FsjLya','资源不存在','1423323pEcFGr','API_RATE_LIMIT','hudsonAccessToken','12bkRuqc','handleError','npm_package_version','API_NOT_FOUND','Request\x20configuration\x20error','retryHandler','AUTH_INVALID','interceptors','maxRetries','API\x20error\x20response','request','API_TIMEOUT','generic','1915398MIUzEz','response','PERMISSION_DENIED','delay','请求配置错误','apiKey','Authorization','API\x20response','81672aHeMqX','url','91WxKCfm','retry','data','api','error','headers','message','hudson-access-token','网络错误,请检查网络连接','ECONNABORTED','setupInterceptors','95528BiZdfs','服务器错误,请稍后重试','30jPdcMC','config'];_0x9a16=function(){return _0xdc0e48;};return _0x9a16();}import _0x4a8010 from'axios';import{config}from'../config/index.js';import{logger}from'../utils/logger.js';function _0x394e(_0x2917e6,_0x460953){const _0x9a1691=_0x9a16();return _0x394e=function(_0x394ecf,_0x1afe1f){_0x394ecf=_0x394ecf-0xdb;let _0x29a226=_0x9a1691[_0x394ecf];return _0x29a226;},_0x394e(_0x2917e6,_0x460953);}import{MCPError,ErrorCode}from'../utils/errorHandler.js';import{RetryHandler}from'./retryHandler.js';export class HTTPClient{[_0x394e(0xfc)];[_0x394e(0xde)];['hudsonAccessToken'];[_0x394e(0x112)];constructor(_0x2bf3d2,_0x14880f){this[_0x394e(0xde)]=_0x2bf3d2,this[_0x394e(0x10c)]=_0x14880f,this[_0x394e(0x112)]=new RetryHandler(config[_0x394e(0xe4)][_0x394e(0x115)],config['retry'][_0x394e(0xdc)]),this[_0x394e(0xfc)]=_0x4a8010[_0x394e(0x105)]({'baseURL':config[_0x394e(0xe6)]['baseURL'],'timeout':config['api'][_0x394e(0x106)],'headers':{'Content-Type':_0x394e(0xf7),'X-Client-Type':'mcp','X-Client-Version':process[_0x394e(0xf3)][_0x394e(0x10f)]||_0x394e(0xfe)}}),this[_0x394e(0xed)]();}[_0x394e(0xed)](){this[_0x394e(0xfc)][_0x394e(0x114)][_0x394e(0x117)][_0x394e(0xf8)](_0x5c8530=>{return this[_0x394e(0xde)]&&(_0x5c8530[_0x394e(0xe8)][_0x394e(0xdf)]='Bearer\x20'+this[_0x394e(0xde)]),this[_0x394e(0x10c)]&&(_0x5c8530[_0x394e(0xe8)][_0x394e(0xea)]=this[_0x394e(0x10c)]),logger[_0x394e(0x104)](_0x394e(0xf2),{'method':_0x5c8530[_0x394e(0x102)],'url':_0x5c8530['url'],'params':_0x5c8530[_0x394e(0xf5)]}),_0x5c8530;},_0x3563dd=>{return logger[_0x394e(0xe7)](_0x394e(0xf6),_0x3563dd),Promise['reject'](_0x3563dd);}),this[_0x394e(0xfc)][_0x394e(0x114)][_0x394e(0x11b)][_0x394e(0xf8)](_0x3b8eb6=>{return logger['debug'](_0x394e(0xe0),{'status':_0x3b8eb6[_0x394e(0x103)],'url':_0x3b8eb6['config'][_0x394e(0xe2)]}),_0x3b8eb6;},async _0x1a215b=>{return this[_0x394e(0x10e)](_0x1a215b);});}async[_0x394e(0x10e)](_0xe788e0){if(_0xe788e0[_0x394e(0x11b)]){const _0x487c2c=_0xe788e0[_0x394e(0x11b)]['status'],_0x26907a=_0xe788e0[_0x394e(0x11b)][_0x394e(0xe5)];logger[_0x394e(0xe7)](_0x394e(0x116),{'status':_0x487c2c,'url':_0xe788e0[_0x394e(0xf1)]?.[_0x394e(0xe2)],'message':_0x26907a[_0x394e(0xe9)]});switch(_0x487c2c){case 0x191:throw new MCPError(ErrorCode[_0x394e(0x113)],_0x394e(0x100),_0x26907a);case 0x193:throw new MCPError(ErrorCode[_0x394e(0xdb)],_0x26907a?.[_0x394e(0xe9)]||'权限不足',{..._0x26907a!=null&&typeof _0x26907a===_0x394e(0x107)?_0x26907a:{},'domain':_0x394e(0x119),'source':'路客云AI'});case 0x194:throw new MCPError(ErrorCode[_0x394e(0x110)],_0x394e(0x109),_0x26907a);case 0x1ad:throw new MCPError(ErrorCode[_0x394e(0x10b)],'请求频率过高,请稍后重试',_0x26907a);case 0x1f4:case 0x1f6:case 0x1f7:case 0x1f8:throw new MCPError(ErrorCode['API_ERROR'],_0x394e(0xef),_0x26907a);default:throw new MCPError(ErrorCode[_0x394e(0xfb)],_0x26907a[_0x394e(0xe9)]||'API错误:'+_0x487c2c,_0x26907a);}}else{if(_0xe788e0[_0x394e(0x117)]){logger[_0x394e(0xe7)](_0x394e(0xff),{'url':_0xe788e0[_0x394e(0xf1)]?.['url'],'timeout':config['api'][_0x394e(0x106)]});if(_0xe788e0['code']===_0x394e(0xec))throw new MCPError(ErrorCode[_0x394e(0x118)],'请求超时,请稍后重试');throw new MCPError(ErrorCode[_0x394e(0xfb)],_0x394e(0xeb));}else{logger[_0x394e(0xe7)](_0x394e(0x111),_0xe788e0);throw new MCPError(ErrorCode[_0x394e(0xf4)],_0x394e(0xdd));}}}async[_0x394e(0x117)](_0x1c858e){const _0x3fbb69={'method':_0x1c858e[_0x394e(0x102)],'url':_0x1c858e[_0x394e(0xe2)],'params':_0x1c858e[_0x394e(0xf5)],'data':_0x1c858e[_0x394e(0xe5)],'headers':_0x1c858e[_0x394e(0xe8)]};try{const _0x2b9278=await this[_0x394e(0x112)][_0x394e(0xf9)](()=>this[_0x394e(0xfc)][_0x394e(0x117)](_0x3fbb69));return _0x2b9278[_0x394e(0xe5)];}catch(_0x4fc185){throw _0x4fc185;}}}
1
+ function _0x3c3d(){const _0x4c7098=['timeout','data','status','17325209NOdcQp','17451VleQWv','retryHandler','response','debug','457667cajAGt','handleError','request','INTERNAL_ERROR','API_RATE_LIMIT','Authorization','application/json','请求配置错误','code','generic','路客云AI','config','npm_package_version','env','mcp','资源不存在','943776RZwCez','API\x20request\x20timeout','execute','client','retry','请求频率过高,请稍后重试','API_ERROR','1.0.0','API\x20request','API\x20error\x20response','url','2692308jIcGgB','API\x20response','message','API密钥无效或已过期','请求超时,请稍后重试','ECONNABORTED','maxRetries','error','API_TIMEOUT','hudsonAccessToken','api','baseURL','248sbgTJX','1611dUPPMh','hudson-access-token','method','setupInterceptors','服务器错误,请稍后重试','820UmKnwo','API_NOT_FOUND','apiKey','create','params','2YWUNbW','286019lFOVyA','reject','5taazKJ','AUTH_INVALID','use','delay','headers','interceptors','Bearer\x20'];_0x3c3d=function(){return _0x4c7098;};return _0x3c3d();}(function(_0x113857,_0x20e2f1){const _0x5ade91=_0x113857();while(!![]){try{const _0x1c4fc2=-parseInt(_0x5892(0x228))/0x1*(parseInt(_0x5892(0x227))/0x2)+parseInt(_0x5892(0x1f1))/0x3*(-parseInt(_0x5892(0x21c))/0x4)+-parseInt(_0x5892(0x22a))/0x5*(parseInt(_0x5892(0x210))/0x6)+-parseInt(_0x5892(0x1f5))/0x7+-parseInt(_0x5892(0x205))/0x8+parseInt(_0x5892(0x21d))/0x9*(-parseInt(_0x5892(0x222))/0xa)+parseInt(_0x5892(0x1f0))/0xb;if(_0x1c4fc2===_0x20e2f1)break;else _0x5ade91['push'](_0x5ade91['shift']());}catch(_0x117249){_0x5ade91['push'](_0x5ade91['shift']());}}}(_0x3c3d,0x44bfd));import _0x4982ef from'axios';import{config}from'../config/index.js';import{logger}from'../utils/logger.js';function _0x5892(_0x8d3064,_0x1e263b){const _0x3c3dc3=_0x3c3d();return _0x5892=function(_0x589265,_0x3f6fd4){_0x589265=_0x589265-0x1e7;let _0x155a5f=_0x3c3dc3[_0x589265];return _0x155a5f;},_0x5892(_0x8d3064,_0x1e263b);}import{MCPError,ErrorCode}from'../utils/errorHandler.js';import{RetryHandler}from'./retryHandler.js';export class HTTPClient{[_0x5892(0x208)];[_0x5892(0x224)];[_0x5892(0x219)];[_0x5892(0x1f2)];constructor(_0x5ea2c8,_0x49cf64){this[_0x5892(0x224)]=_0x5ea2c8,this['hudsonAccessToken']=_0x49cf64,this['retryHandler']=new RetryHandler(config[_0x5892(0x209)][_0x5892(0x216)],config['retry'][_0x5892(0x1e9)]),this[_0x5892(0x208)]=_0x4982ef[_0x5892(0x225)]({'baseURL':config[_0x5892(0x21a)][_0x5892(0x21b)],'timeout':config[_0x5892(0x21a)]['timeout'],'headers':{'Content-Type':_0x5892(0x1fb),'X-Client-Type':_0x5892(0x203),'X-Client-Version':process[_0x5892(0x202)][_0x5892(0x201)]||_0x5892(0x20c)}}),this[_0x5892(0x220)]();}[_0x5892(0x220)](){this[_0x5892(0x208)][_0x5892(0x1eb)][_0x5892(0x1f7)][_0x5892(0x1e8)](_0x2b495a=>{return this['apiKey']&&(_0x2b495a[_0x5892(0x1ea)][_0x5892(0x1fa)]=_0x5892(0x1ec)+this[_0x5892(0x224)]),this[_0x5892(0x219)]&&(_0x2b495a['headers'][_0x5892(0x21e)]=this[_0x5892(0x219)]),logger[_0x5892(0x1f4)](_0x5892(0x20d),{'method':_0x2b495a[_0x5892(0x21f)],'url':_0x2b495a[_0x5892(0x20f)],'params':_0x2b495a[_0x5892(0x226)]}),_0x2b495a;},_0x22487f=>{return logger[_0x5892(0x217)]('Request\x20interceptor\x20error',_0x22487f),Promise[_0x5892(0x229)](_0x22487f);}),this['client']['interceptors'][_0x5892(0x1f3)][_0x5892(0x1e8)](_0x3157f7=>{return logger[_0x5892(0x1f4)](_0x5892(0x211),{'status':_0x3157f7['status'],'url':_0x3157f7[_0x5892(0x200)][_0x5892(0x20f)]}),_0x3157f7;},async _0x26f671=>{return this[_0x5892(0x1f6)](_0x26f671);});}async['handleError'](_0x3a3d35){if(_0x3a3d35['response']){const _0x29ac7f=_0x3a3d35[_0x5892(0x1f3)][_0x5892(0x1ef)],_0x3d21b9=_0x3a3d35[_0x5892(0x1f3)][_0x5892(0x1ee)];logger['error'](_0x5892(0x20e),{'status':_0x29ac7f,'url':_0x3a3d35[_0x5892(0x200)]?.[_0x5892(0x20f)],'message':_0x3d21b9['message']});switch(_0x29ac7f){case 0x191:throw new MCPError(ErrorCode[_0x5892(0x1e7)],_0x5892(0x213),_0x3d21b9);case 0x193:throw new MCPError(ErrorCode['PERMISSION_DENIED'],_0x3d21b9?.[_0x5892(0x212)]||'权限不足',{..._0x3d21b9!=null&&typeof _0x3d21b9==='object'?_0x3d21b9:{},'domain':_0x5892(0x1fe),'source':_0x5892(0x1ff)});case 0x194:throw new MCPError(ErrorCode[_0x5892(0x223)],_0x5892(0x204),_0x3d21b9);case 0x1ad:throw new MCPError(ErrorCode[_0x5892(0x1f9)],_0x5892(0x20a),_0x3d21b9);case 0x1f4:case 0x1f6:case 0x1f7:case 0x1f8:throw new MCPError(ErrorCode[_0x5892(0x20b)],_0x5892(0x221),_0x3d21b9);default:throw new MCPError(ErrorCode[_0x5892(0x20b)],_0x3d21b9[_0x5892(0x212)]||'API错误:'+_0x29ac7f,_0x3d21b9);}}else{if(_0x3a3d35[_0x5892(0x1f7)]){logger['error'](_0x5892(0x206),{'url':_0x3a3d35[_0x5892(0x200)]?.[_0x5892(0x20f)],'timeout':config['api'][_0x5892(0x1ed)]});if(_0x3a3d35[_0x5892(0x1fd)]===_0x5892(0x215))throw new MCPError(ErrorCode[_0x5892(0x218)],_0x5892(0x214));throw new MCPError(ErrorCode['API_ERROR'],'网络错误,请检查网络连接');}else{logger[_0x5892(0x217)]('Request\x20configuration\x20error',_0x3a3d35);throw new MCPError(ErrorCode[_0x5892(0x1f8)],_0x5892(0x1fc));}}}async[_0x5892(0x1f7)](_0x84a717){const _0x4aba34={'method':_0x84a717[_0x5892(0x21f)],'url':_0x84a717['url'],'params':_0x84a717[_0x5892(0x226)],'data':_0x84a717[_0x5892(0x1ee)],'headers':_0x84a717[_0x5892(0x1ea)]};try{const _0x279eb5=await this['retryHandler'][_0x5892(0x207)](()=>this['client'][_0x5892(0x1f7)](_0x4aba34));return _0x279eb5['data'];}catch(_0x42e2f2){throw _0x42e2f2;}}}
@@ -1 +1 @@
1
- function _0x4f2d(_0x534027,_0x4b07e8){var _0x36efe1=_0x36ef();return _0x4f2d=function(_0x4f2dcd,_0x421745){_0x4f2dcd=_0x4f2dcd-0x1b0;var _0x38053b=_0x36efe1[_0x4f2dcd];return _0x38053b;},_0x4f2d(_0x534027,_0x4b07e8);}function _0x36ef(){var _0x55b12e=['6479CbMcdu','291tjAFmZ','105ChCvrB','3012PMBKhz','3815sGYtIf','3127120geQcfq','7516Ptrrdo','50643aHzvKp','10cIvhKV','40yiVizr','217910fyFRzx','145272ObNNKZ'];_0x36ef=function(){return _0x55b12e;};return _0x36ef();}(function(_0x22e836,_0x18fabf){var _0x52b524=_0x22e836();while(!![]){try{var _0xb0ff2f=parseInt(_0x4f2d(0x1b1))/0x1*(-parseInt(_0x4f2d(0x1b5))/0x2)+-parseInt(_0x4f2d(0x1ba))/0x3*(-parseInt(_0x4f2d(0x1b3))/0x4)+parseInt(_0x4f2d(0x1b7))/0x5+-parseInt(_0x4f2d(0x1b8))/0x6*(-parseInt(_0x4f2d(0x1bb))/0x7)+-parseInt(_0x4f2d(0x1b2))/0x8+parseInt(_0x4f2d(0x1b4))/0x9*(parseInt(_0x4f2d(0x1b6))/0xa)+-parseInt(_0x4f2d(0x1b9))/0xb*(-parseInt(_0x4f2d(0x1b0))/0xc);if(_0xb0ff2f===_0x18fabf)break;else _0x52b524['push'](_0x52b524['shift']());}catch(_0x3bfee9){_0x52b524['push'](_0x52b524['shift']());}}}(_0x36ef,0x554df));export{HTTPClient}from'./httpClient.js';export{RetryHandler}from'./retryHandler.js';export{CacheManager}from'./cacheManager.js';
1
+ (function(_0x4c9992,_0x412ff4){var _0x1cf9ae=_0x4c9992();while(!![]){try{var _0xe904a3=-parseInt(_0x29f5(0x170))/0x1*(-parseInt(_0x29f5(0x16f))/0x2)+-parseInt(_0x29f5(0x173))/0x3+-parseInt(_0x29f5(0x171))/0x4+-parseInt(_0x29f5(0x172))/0x5*(-parseInt(_0x29f5(0x16b))/0x6)+parseInt(_0x29f5(0x16c))/0x7+-parseInt(_0x29f5(0x16e))/0x8*(-parseInt(_0x29f5(0x16a))/0x9)+parseInt(_0x29f5(0x16d))/0xa;if(_0xe904a3===_0x412ff4)break;else _0x1cf9ae['push'](_0x1cf9ae['shift']());}catch(_0x220ec7){_0x1cf9ae['push'](_0x1cf9ae['shift']());}}}(_0x13cb,0xc1f3a));export{HTTPClient}from'./httpClient.js';function _0x13cb(){var _0x315c96=['2172105PTwMzc','954KPZVOP','19830KvVaBT','4546682KovgkD','6419410bHiqtC','20816QFucap','4wkFTzd','546803uCCeri','4582916sHLISk','5ltfeeB'];_0x13cb=function(){return _0x315c96;};return _0x13cb();}export{RetryHandler}from'./retryHandler.js';function _0x29f5(_0x83c7ef,_0x4ed6c0){var _0x13cbcc=_0x13cb();return _0x29f5=function(_0x29f574,_0x3fa0ac){_0x29f574=_0x29f574-0x16a;var _0x28e6be=_0x13cbcc[_0x29f574];return _0x28e6be;},_0x29f5(_0x83c7ef,_0x4ed6c0);}export{CacheManager}from'./cacheManager.js';
@@ -1 +1 @@
1
- function _0x5b51(){const _0x1569c3=['1358833EESjRi','warn','response','1777100rprQXm','sleep','5968490NJfTJp','4InyPiT','ECONNRESET','baseDelay','237RoduqW','pow','maxRetries','ECONNABORTED','code','692478VBuqSa','283688TZuhVI','2578bMxOvr','45OInSIX','8057830xXTXNw','Request\x20failed,\x20retrying...\x20(attempt\x20','isRetryableError','18MXuJWh','status','36zliMKr'];_0x5b51=function(){return _0x1569c3;};return _0x5b51();}(function(_0x123516,_0x56c85c){const _0x5d1b49=_0x123516();while(!![]){try{const _0x56b32a=-parseInt(_0x5699(0x1d1))/0x1+-parseInt(_0x5699(0x1d3))/0x2*(parseInt(_0x5699(0x1cc))/0x3)+-parseInt(_0x5699(0x1c9))/0x4*(-parseInt(_0x5699(0x1c6))/0x5)+parseInt(_0x5699(0x1c0))/0x6*(-parseInt(_0x5699(0x1c3))/0x7)+-parseInt(_0x5699(0x1d2))/0x8*(parseInt(_0x5699(0x1d4))/0x9)+-parseInt(_0x5699(0x1c8))/0xa+-parseInt(_0x5699(0x1d5))/0xb*(-parseInt(_0x5699(0x1c2))/0xc);if(_0x56b32a===_0x56c85c)break;else _0x5d1b49['push'](_0x5d1b49['shift']());}catch(_0x22de93){_0x5d1b49['push'](_0x5d1b49['shift']());}}}(_0x5b51,0x6230e));import{logger}from'../utils/logger.js';import{AxiosError}from'axios';function _0x5699(_0x55fa58,_0x18a510){const _0x5b51d7=_0x5b51();return _0x5699=function(_0x569936,_0x451e9c){_0x569936=_0x569936-0x1c0;let _0x121619=_0x5b51d7[_0x569936];return _0x121619;},_0x5699(_0x55fa58,_0x18a510);}export class RetryHandler{[_0x5699(0x1ce)];['baseDelay'];constructor(_0x10aad3=0x3,_0x12d530=0x3e8){this[_0x5699(0x1ce)]=_0x10aad3,this[_0x5699(0x1cb)]=_0x12d530;}async['execute'](_0xcad1b6){let _0x14d3ce;for(let _0x703e50=0x0;_0x703e50<=this[_0x5699(0x1ce)];_0x703e50++){try{return await _0xcad1b6();}catch(_0x27ba35){_0x14d3ce=_0x27ba35;if(_0x703e50===this['maxRetries'])break;if(!this[_0x5699(0x1d7)](_0x27ba35))throw _0x27ba35;const _0x2a135e=this[_0x5699(0x1cb)]*Math[_0x5699(0x1cd)](0x2,_0x703e50);logger[_0x5699(0x1c4)](_0x5699(0x1d6)+(_0x703e50+0x1)+'/'+this[_0x5699(0x1ce)]+')',{'error':_0x27ba35 instanceof Error?_0x27ba35['message']:String(_0x27ba35),'delay':_0x2a135e}),await this[_0x5699(0x1c7)](_0x2a135e);}}throw _0x14d3ce;}['isRetryableError'](_0x5bdb0a){if(_0x5bdb0a instanceof AxiosError){if(_0x5bdb0a['code']===_0x5699(0x1ca)||_0x5bdb0a['code']==='ETIMEDOUT'||_0x5bdb0a[_0x5699(0x1d0)]===_0x5699(0x1cf))return!![];if(_0x5bdb0a[_0x5699(0x1c5)]&&_0x5bdb0a[_0x5699(0x1c5)][_0x5699(0x1c1)]>=0x1f4)return!![];if(_0x5bdb0a[_0x5699(0x1c5)]&&_0x5bdb0a['response'][_0x5699(0x1c1)]===0x1ad)return!![];}return![];}[_0x5699(0x1c7)](_0x1f9ea4){return new Promise(_0x5df23b=>setTimeout(_0x5df23b,_0x1f9ea4));}}
1
+ function _0x4249(_0x550547,_0x2ed600){const _0x262448=_0x2624();return _0x4249=function(_0x4249d0,_0x4c960f){_0x4249d0=_0x4249d0-0x11c;let _0xae7e25=_0x262448[_0x4249d0];return _0xae7e25;},_0x4249(_0x550547,_0x2ed600);}(function(_0x3efd7a,_0x2d8601){const _0x1bc2d2=_0x3efd7a();while(!![]){try{const _0x193c67=-parseInt(_0x4249(0x11f))/0x1+-parseInt(_0x4249(0x121))/0x2*(parseInt(_0x4249(0x123))/0x3)+parseInt(_0x4249(0x132))/0x4*(-parseInt(_0x4249(0x130))/0x5)+parseInt(_0x4249(0x12a))/0x6+parseInt(_0x4249(0x12b))/0x7*(parseInt(_0x4249(0x127))/0x8)+-parseInt(_0x4249(0x12f))/0x9*(parseInt(_0x4249(0x125))/0xa)+parseInt(_0x4249(0x12c))/0xb*(parseInt(_0x4249(0x128))/0xc);if(_0x193c67===_0x2d8601)break;else _0x1bc2d2['push'](_0x1bc2d2['shift']());}catch(_0x44241e){_0x1bc2d2['push'](_0x1bc2d2['shift']());}}}(_0x2624,0xea0ba));function _0x2624(){const _0x394550=['72ZyYQBr','20KAFfKq','Request\x20failed,\x20retrying...\x20(attempt\x20','1790812thuRsW','execute','status','baseDelay','1469656urzLGE','response','19654rqrnYL','isRetryableError','489zndktN','maxRetries','1667560waNFoP','message','16sPeWyU','96IesLoG','ETIMEDOUT','11449062wkZwcL','835037HMOWui','6886286KQlKlw','sleep','ECONNABORTED'];_0x2624=function(){return _0x394550;};return _0x2624();}import{logger}from'../utils/logger.js';import{AxiosError}from'axios';export class RetryHandler{['maxRetries'];[_0x4249(0x11e)];constructor(_0x2a1bdc=0x3,_0x4061f3=0x3e8){this['maxRetries']=_0x2a1bdc,this['baseDelay']=_0x4061f3;}async[_0x4249(0x11c)](_0x5acf64){let _0x5a59e0;for(let _0x4f5dd9=0x0;_0x4f5dd9<=this['maxRetries'];_0x4f5dd9++){try{return await _0x5acf64();}catch(_0x31bd1b){_0x5a59e0=_0x31bd1b;if(_0x4f5dd9===this['maxRetries'])break;if(!this[_0x4249(0x122)](_0x31bd1b))throw _0x31bd1b;const _0x5b20cc=this[_0x4249(0x11e)]*Math['pow'](0x2,_0x4f5dd9);logger['warn'](_0x4249(0x131)+(_0x4f5dd9+0x1)+'/'+this[_0x4249(0x124)]+')',{'error':_0x31bd1b instanceof Error?_0x31bd1b[_0x4249(0x126)]:String(_0x31bd1b),'delay':_0x5b20cc}),await this[_0x4249(0x12d)](_0x5b20cc);}}throw _0x5a59e0;}[_0x4249(0x122)](_0x57266f){if(_0x57266f instanceof AxiosError){if(_0x57266f['code']==='ECONNRESET'||_0x57266f['code']===_0x4249(0x129)||_0x57266f['code']===_0x4249(0x12e))return!![];if(_0x57266f['response']&&_0x57266f[_0x4249(0x120)]['status']>=0x1f4)return!![];if(_0x57266f[_0x4249(0x120)]&&_0x57266f[_0x4249(0x120)][_0x4249(0x11d)]===0x1ad)return!![];}return![];}['sleep'](_0x25fe8d){return new Promise(_0x50ee7f=>setTimeout(_0x50ee7f,_0x25fe8d));}}
@@ -1 +1 @@
1
- function _0x2427(_0x590726,_0x2d2f8a){const _0x3e4a6e=_0x3e4a();return _0x2427=function(_0x24272c,_0x5c1f63){_0x24272c=_0x24272c-0x137;let _0x493ada=_0x3e4a6e[_0x24272c];return _0x493ada;},_0x2427(_0x590726,_0x2d2f8a);}(function(_0x296972,_0x306dce){const _0x3a9ae3=_0x296972();while(!![]){try{const _0x511955=-parseInt(_0x2427(0x13b))/0x1+parseInt(_0x2427(0x13f))/0x2+parseInt(_0x2427(0x148))/0x3+parseInt(_0x2427(0x149))/0x4*(-parseInt(_0x2427(0x13c))/0x5)+parseInt(_0x2427(0x14a))/0x6*(-parseInt(_0x2427(0x153))/0x7)+-parseInt(_0x2427(0x142))/0x8+parseInt(_0x2427(0x14b))/0x9*(parseInt(_0x2427(0x13a))/0xa);if(_0x511955===_0x306dce)break;else _0x3a9ae3['push'](_0x3a9ae3['shift']());}catch(_0x5b2429){_0x3a9ae3['push'](_0x3a9ae3['shift']());}}}(_0x3e4a,0xd5b0f));function _0x3e4a(){const _0x4c8e39=['LOG_FORMAT','300000','6594GtdRYr','NODE_ENV','info','production','LOCALSBNB_LOG_TO_FILES','2090HdlJeh','48567sUhxSh','30fzvBEp','true','env','1258050MhxQeE','develop','config','12015424DCkqVG','1000','LOG_LEVEL','PORT','RETRY_DELAY','LUKEYUN_API_BASE_URL','1990191aWcXqK','1149164obkoXe','6834DLjOoI','169236qBjktb','CACHE_ENABLED','30000','development','json','API_TIMEOUT'];_0x3e4a=function(){return _0x4c8e39;};return _0x3e4a();}import _0x2413b2 from'dotenv';_0x2413b2[_0x2427(0x141)]();const resolvedEnv=process['env'][_0x2427(0x154)]||_0x2427(0x138);function resolveBaseURL(){if(process[_0x2427(0x13e)][_0x2427(0x147)])return process[_0x2427(0x13e)][_0x2427(0x147)];if(resolvedEnv===_0x2427(0x140)||resolvedEnv===_0x2427(0x14e))return'https://hudson-dev.localhome.cn';return'https://hudson-prod.localhome.cn';}export const config={'api':{'baseURL':resolveBaseURL(),'timeout':parseInt(process[_0x2427(0x13e)][_0x2427(0x150)]||_0x2427(0x14d),0xa)},'server':{'port':parseInt(process['env'][_0x2427(0x145)]||'3000',0xa),'env':resolvedEnv},'cache':{'enabled':process[_0x2427(0x13e)][_0x2427(0x14c)]==='true','ttl':parseInt(process[_0x2427(0x13e)]['CACHE_TTL']||_0x2427(0x152),0xa)},'retry':{'maxRetries':parseInt(process['env']['MAX_RETRIES']||'3',0xa),'delay':parseInt(process[_0x2427(0x13e)][_0x2427(0x146)]||_0x2427(0x143),0xa)},'log':{'level':process['env'][_0x2427(0x144)]||_0x2427(0x137),'format':process[_0x2427(0x13e)][_0x2427(0x151)]||_0x2427(0x14f),'toFiles':process[_0x2427(0x13e)][_0x2427(0x139)]==='1'||process[_0x2427(0x13e)][_0x2427(0x139)]===_0x2427(0x13d)}};
1
+ (function(_0x5192b3,_0x394226){const _0x403369=_0x5192b3();while(!![]){try{const _0x4ec4eb=parseInt(_0x4222(0x166))/0x1+-parseInt(_0x4222(0x153))/0x2*(parseInt(_0x4222(0x15a))/0x3)+-parseInt(_0x4222(0x159))/0x4*(-parseInt(_0x4222(0x169))/0x5)+-parseInt(_0x4222(0x16b))/0x6*(-parseInt(_0x4222(0x154))/0x7)+parseInt(_0x4222(0x167))/0x8*(parseInt(_0x4222(0x165))/0x9)+parseInt(_0x4222(0x155))/0xa+-parseInt(_0x4222(0x162))/0xb;if(_0x4ec4eb===_0x394226)break;else _0x403369['push'](_0x403369['shift']());}catch(_0x35e7bd){_0x403369['push'](_0x403369['shift']());}}}(_0x3b1e,0x56703));import _0x4419d8 from'dotenv';_0x4419d8[_0x4222(0x15f)]();const resolvedEnv=process[_0x4222(0x163)][_0x4222(0x156)]||'production';function _0x3b1e(){const _0x3f1d12=['development','LOG_FORMAT','config','MAX_RETRIES','30000','9094085guZhlP','env','true','45UhXiIP','543492dJbRlW','825000XstYab','RETRY_DELAY','815lJLvTg','300000','177114ktYGBv','API_TIMEOUT','LOG_LEVEL','PORT','CACHE_TTL','LOCALSBNB_LOG_TO_FILES','LUKEYUN_API_BASE_URL','4rOsCYK','28KCsZvx','6361180bIpWcN','NODE_ENV','info','1000','1116YBZsap','1017003ZcttKA','CACHE_ENABLED','develop'];_0x3b1e=function(){return _0x3f1d12;};return _0x3b1e();}function resolveBaseURL(){if(process[_0x4222(0x163)][_0x4222(0x152)])return process['env'][_0x4222(0x152)];if(resolvedEnv===_0x4222(0x15c)||resolvedEnv===_0x4222(0x15d))return'https://hudson-dev.localhome.cn';return'https://hudson-prod.localhome.cn';}function _0x4222(_0x3b29c0,_0x148ee4){const _0x3b1e89=_0x3b1e();return _0x4222=function(_0x4222fc,_0x45fd95){_0x4222fc=_0x4222fc-0x152;let _0x27c16a=_0x3b1e89[_0x4222fc];return _0x27c16a;},_0x4222(_0x3b29c0,_0x148ee4);}export const config={'api':{'baseURL':resolveBaseURL(),'timeout':parseInt(process[_0x4222(0x163)][_0x4222(0x16c)]||_0x4222(0x161),0xa)},'server':{'port':parseInt(process[_0x4222(0x163)][_0x4222(0x16e)]||'3000',0xa),'env':resolvedEnv},'cache':{'enabled':process[_0x4222(0x163)][_0x4222(0x15b)]===_0x4222(0x164),'ttl':parseInt(process[_0x4222(0x163)][_0x4222(0x16f)]||_0x4222(0x16a),0xa)},'retry':{'maxRetries':parseInt(process[_0x4222(0x163)][_0x4222(0x160)]||'3',0xa),'delay':parseInt(process[_0x4222(0x163)][_0x4222(0x168)]||_0x4222(0x158),0xa)},'log':{'level':process['env'][_0x4222(0x16d)]||_0x4222(0x157),'format':process[_0x4222(0x163)][_0x4222(0x15e)]||'json','toFiles':process[_0x4222(0x163)]['LOCALSBNB_LOG_TO_FILES']==='1'||process[_0x4222(0x163)][_0x4222(0x170)]===_0x4222(0x164)}};