localsbnb-mcp-server 1.0.12 → 1.0.14

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 (68) hide show
  1. package/README.md +108 -141
  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/region/api.js +1 -0
  14. package/dist/region/dates.js +1 -0
  15. package/dist/region/i18n.js +1 -0
  16. package/dist/region/index.js +1 -0
  17. package/dist/region/money.js +1 -0
  18. package/dist/region/resolve.js +1 -0
  19. package/dist/region/timezone.js +1 -0
  20. package/dist/region/toolDescriptions.js +1 -0
  21. package/dist/region/types.js +1 -0
  22. package/dist/run.cjs +2 -2
  23. package/dist/run.sh +1 -1
  24. package/dist/server.js +1 -1
  25. package/dist/start.mjs +1 -1
  26. package/dist/tools/finance/index.js +1 -1
  27. package/dist/tools/finance/queryOperationalDataV2.js +1 -1
  28. package/dist/tools/orders/getOrderDetailsV2.js +1 -1
  29. package/dist/tools/orders/index.js +1 -1
  30. package/dist/tools/orders/ordersGetShared.js +1 -1
  31. package/dist/tools/orders/queryInHouseOrders.js +1 -1
  32. package/dist/tools/orders/queryOrdersByDateRange.js +1 -1
  33. package/dist/tools/orders/queryPreArrivalOrders.js +1 -1
  34. package/dist/tools/orders/queryPreDepartureOrders.js +1 -1
  35. package/dist/tools/orders/queryTodayOrders.js +1 -1
  36. package/dist/tools/overseas/finance.js +1 -0
  37. package/dist/tools/overseas/index.js +1 -0
  38. package/dist/tools/overseas/orders.js +1 -0
  39. package/dist/tools/overseas/prices.js +1 -0
  40. package/dist/tools/overseas/rooms.js +1 -0
  41. package/dist/tools/overseas/writes.js +1 -0
  42. package/dist/tools/rooms/index.js +1 -1
  43. package/dist/tools/rooms/queryRoomPrices.js +1 -1
  44. package/dist/tools/rooms/queryRoomStatusNew.js +1 -1
  45. package/dist/tools/rooms/queryTodayRoomStatus.js +1 -1
  46. package/dist/types/index.js +1 -1
  47. package/dist/utils/desensitize.js +1 -1
  48. package/dist/utils/errorHandler.js +1 -1
  49. package/dist/utils/index.js +1 -1
  50. package/dist/utils/logger.js +1 -1
  51. package/dist/utils/price.js +1 -1
  52. package/dist/utils/shanghaiDate.js +1 -1
  53. package/mcp.sample.json +2 -2
  54. package/package.json +1 -1
  55. package/dist/tools/channels/getChannelDetails.js +0 -1
  56. package/dist/tools/channels/index.js +0 -1
  57. package/dist/tools/channels/listChannels.js +0 -1
  58. package/dist/tools/finance/analyzeRevenue.js +0 -1
  59. package/dist/tools/finance/queryFinancialData.js +0 -1
  60. package/dist/tools/finance/queryOperationalData.js +0 -1
  61. package/dist/tools/orders/cancelOrder.js +0 -1
  62. package/dist/tools/orders/getOrderDetails.js +0 -1
  63. package/dist/tools/orders/queryOrders.js +0 -1
  64. package/dist/tools/rooms/batchUpdatePrices.js +0 -1
  65. package/dist/tools/rooms/updateRoomPrice.js +0 -1
  66. package/dist/types/api.js +0 -1
  67. package/dist/types/tools.js +0 -1
  68. package/dist/utils/validator.js +0 -1
package/README.md CHANGED
@@ -1,203 +1,170 @@
1
- # LocalsBnb AI(路客云 MCP 服务)
1
+ # LocalsBnb
2
2
 
3
- LocalsBnb AI 将路客云 PMS 的订单、房态房价、经营分析等核心能力统一封装为 MCP,
4
- 让门店与运营团队在现有沟通入口中即可通过自然语言完成“查询 -> 判断 -> 执行”,减少系统切换、提升协同效率。
3
+ **Say it. Your property answers.**
4
+ No LocalsBnb app. No extra computer. The AI you already use **is** the front desk.
5
5
 
6
- 服务可接入 OpenClaw、Hermes Agent 及任意支持 MCP 的客户端;
7
- 其中 **OpenClaw + 微信** 是当前落地最广、转化效率最高的组合,建议优先作为推广与实施路径。
6
+ **Language:** [English](README.md) · [简体中文](docs/readme/README.zh-CN.md) · [繁體中文](docs/readme/README.zh-TW.md) · [日本語](docs/readme/README.ja.md) · [ภาษาไทย](docs/readme/README.th.md) · [Bahasa Melayu](docs/readme/README.ms.md)
8
7
 
9
- ---
10
-
11
- ## 我们是什么
12
-
13
- LocalsBnb AI 是一层“AI 到路客云 API 的标准连接层”:
14
-
15
- - 对上:提供统一 MCP 工具能力
16
- - 对下:调用路客云接口并处理鉴权、错误与权限
17
- - 对业务:让查询与操作可以直接通过自然语言完成
18
-
19
- 适用对象:门店运营、前台、店长、区域管理、技术实施团队。
8
+ ![Say it. Your property answers.](docs/readme/assets/localsbnb-hero.png)
20
9
 
21
10
  ---
22
11
 
23
- ## 我们可以做什么
12
+ ## What is this?
24
13
 
25
- ### 核心查询能力(当前可直接落地)
14
+ You already run listings on **Airbnb, Booking.com, Agoda, and Trip.com** through **路客云 / Locals Cloud**. LocalsBnb is that same system — built for hosts who will not live inside another dashboard.
26
15
 
27
- - 订单看板:今日预抵 / 在住 / 预离一键汇总,快速识别当日待办
28
- - 订单详情:按订单号直达详情,减少前台和运营反复翻找
29
- - 房态与可售:支持今日快照与多日区间查询,适合排班与排房决策
30
- - 房价数据:支持按日期/自然周查看价格趋势,便于活动与调价判断
31
- - 经营分析:支持查看入住率、营收等核心指标,用于复盘与晨会
16
+ The old way: unlock the phone, open four apps, wait for calendars, copy a name into a notebook, forget who is in 302.
32
17
 
33
- ### 管理价值(对门店最直接)
18
+ The new way: open the chat you already have, and talk like you talk to a duty manager.
34
19
 
35
- - 把“查数据”从后台页面前移到对话入口,响应更快
36
- - 一线同学按自然语言提问即可获得可执行结果,培训成本低
37
- - 统一口径返回订单、房态、经营数据,减少跨角色信息偏差
20
+ > “Who’s arriving today?”
21
+ > “Is the sea-view room free Saturday?”
22
+ > “Check Anna in — wait, show me the booking first.”
38
23
 
39
- ### 能力边界说明
24
+ **Just say.** LocalsBnb sits behind your favorite AI and pulls the live store: real guests, real rooms, real money. You stay human. The clicking goes away.
40
25
 
41
- - 当前版本以查询分析能力为主,已覆盖订单、房态、房价、经营数据主链路
42
- - 写操作能力可按账号权限与部署策略逐步开放
26
+ ![You speak. Your AI asks LocalsBnb. Locals Cloud answers with your real bookings and rooms.](docs/readme/assets/localsbnb-flow.png)
43
27
 
44
28
  ---
45
29
 
46
- ## 我们可以怎么用
30
+ ## Where can I use it?
47
31
 
48
- 你可以按组织现状选择入口,能力层一致。
32
+ If the software can add a “tool” or “MCP”, LocalsBnb can live there. You install **once**. After that, any chat in that app can run your property.
49
33
 
50
- ### 路径 A(推荐): OpenClaw / Hermes Agent + IM
34
+ **Use it on the computer**
51
35
 
52
- 在 OpenClaw 或 Hermes Agent 中接入 LocalsBnb MCP 后,可打通:
36
+ | App | Who usually likes it |
37
+ |-----|----------------------|
38
+ | **Claude** (Claude Desktop) | The easiest start. Talk in plain language. |
39
+ | **ChatGPT** | If you already live in ChatGPT every day. |
40
+ | **Cursor** | If you already write or work in Cursor. |
41
+ | **Windsurf** | Same idea: an AI editor that accepts tools. |
42
+ | **VS Code + GitHub Copilot** | If your laptop is already VS Code. |
53
43
 
54
- - 微信
55
- - 企业微信
56
- - QQ
57
- - 飞书
58
- - 钉钉
59
- - iMessage
44
+ **Use it where you already chat**
60
45
 
61
- 典型对话:
46
+ Most overseas hosts stay in Claude / ChatGPT / Cursor. OpenClaw and Hermes are not the usual overseas install — they matter when you already use an assistant that lives inside a chat app.
62
47
 
63
- - 「查询今天房态」
64
- - 「查询近期房价」
65
- - 「今天预离还有几单?」
66
- - 「查看张三的订单详情」
67
- - 「看下本周入住率和营收」
68
- - 「帮我根据当前经营情况,并结合近期天气、节假日等情况给出调价建议」
69
- - 「拉取近 30 天入住率、房价、渠道占比和订单取消率,结合周末与节假日,给我一版下周调价策略(含涨降幅区间和执行优先级)」
70
- - 「基于今日预抵/预离/在住结构,识别今晚可能的满房风险与空置风险,并给出房态和价格联动建议」
71
- - 「结合最近一周经营数据与历史同周表现,输出门店晨会简报:异常指标、可能原因、今日行动项」
72
- - 「对比近 14 天不同渠道订单质量(ADR、间夜、取消率),给出渠道投放与限房建议」
48
+ | Where you talk | How LocalsBnb gets there |
49
+ |----------------|--------------------------|
50
+ | **WeChat / WeCom / Feishu / DingTalk** | China: add the same two codes to OpenClaw or Hermes, then ask while you walk. |
51
+ | **WhatsApp / LINE / Telegram / iMessage** | Overseas: only if you already run OpenClaw or Hermes as that chat’s assistant. Same two codes. If you do not have that setup, start in Claude / ChatGPT / Cursor. |
73
52
 
74
- ### 路径 B:MCP 客户端直连
53
+ ![Most hosts stay in Claude, ChatGPT, or Cursor. OpenClaw or Hermes only if that assistant already lives in WeChat or WhatsApp.](docs/readme/assets/localsbnb-doors.png)
75
54
 
76
- 适合总部运营、区域管理、店长、实施团队进行日常查询与管理:
77
-
78
- - OpenClaw
79
- - Hermes Agent
80
- - Cursor
81
- - Claude Desktop
82
- - Claude Code
83
- - 其他 MCP 客户端
55
+ Pick the app you already open in the morning. Do not download a fifth “hotel app”.
84
56
 
85
57
  ---
86
58
 
87
- ## 怎么配置
59
+ ## What can it actually do?
88
60
 
89
- ### 1) 前置条件
61
+ ### A day in the life — just ask
90
62
 
91
- - 已开通路客云相关 API 权限
92
- - 获取必填凭证:
93
- - `APP_SECRET`(访问令牌)
94
- - `APP_ID`(访问ID)
63
+ **7:10, still in bed, another city**
64
+ “What’s the board for today — arrivals, staying, leaving?”
65
+ One answer. Names, rooms, dates. You text the cleaner before coffee.
95
66
 
96
- ### 2) 通用 MCP 配置
67
+ **8:00, front desk handover**
68
+ “Who is checking out before 11? Any dirty rooms left?”
69
+ The new hire does not need a two-hour system class. They already know how to ask a question.
97
70
 
98
- ```json
99
- {
100
- "mcpServers": {
101
- "LocalsBnb MCP": {
102
- "command": "npx",
103
- "args": ["--yes", "localsbnb-mcp-server"],
104
- "env": {
105
- "APP_SECRET": "<你的 APP_SECRET>",
106
- "APP_ID": "<你的 APP_ID>"
107
- }
108
- }
109
- }
110
- }
111
- ```
71
+ **10:30, guest on the phone**
72
+ “Can the Lin family check in early? What time does the last person leave that room?”
73
+ You answer in thirty seconds, not after ‘let me open the computer’.
112
74
 
113
- ### 3) OpenClaw / Hermes Agent(优先推荐)
75
+ **12:00, thinking about the weekend**
76
+ “What’s our Airbnb price Friday to Sunday? What about Agoda?”
77
+ Compare channels in one breath. No four logins.
114
78
 
115
- 这是当前最主流、最容易规模化落地的接入方式,建议作为第一实施路径。
79
+ **15:00, housekeeper in the corridor**
80
+ “Which rooms are empty and clean right now?”
81
+ She does not need your password. You look, you tell her.
116
82
 
117
- 1. 在 OpenClaw / Hermes Agent 中注册 LocalsBnb MCP(配置 `APP_SECRET` + `APP_ID`)
118
- 2. 绑定 IM 渠道(微信、企微、QQ、飞书、钉钉、iMessage)
119
- 3. 配置角色权限与可执行边界(谁可查、谁可操作、谁需二次确认)
120
- 4. 配置常用意图路由(如:今日房态、今日订单、订单详情、经营数据)
121
- 5. 以“查询今天房态 / 查询今日订单 / 输出晨会简报”完成联调验收
83
+ **18:00, owner group chat**
84
+ “How did we do this week? Occupancy, average price, revenue.”
85
+ The number comes back in **your store’s language and currency** — the ones you already set in Locals Cloud.
122
86
 
123
- > 建议先上线查询类能力,再逐步开放写操作,保证上线稳定性与组织接受度。
87
+ **21:40, last-minute request**
88
+ “They want one more night. Can we extend?” *(overseas store)*
89
+ The AI shows **who, which room, which dates**. You say yes. Then it happens. Not before.
124
90
 
125
- #### OpenClaw 自然语言一键安装(推荐新手)
91
+ **22:15, wrong room**
92
+ “Move tonight’s guest from 201 to 305.” *(overseas store)*
93
+ Same rule: it names the booking. You confirm. Then the room changes.
126
94
 
127
- 如果你已将 MCP 发布到 GitHub 与 npm,可直接通过对话让 OpenClaw 完成安装与配置。
95
+ **Holiday / rain / a concert next door**
96
+ “How full are we this week versus last week?”
97
+ You decide whether to raise the weekend or leave it — with the week in front of you, not a gut feel.
128
98
 
129
- **步骤 1:准备凭证**
99
+ **First day of a new staff member**
100
+ They do not learn menus. They learn three sentences: *today’s arrivals, today’s rooms, this week’s numbers.*
130
101
 
131
- - 在路客云 SPMS 获取 `APP_SECRET` 与 `APP_ID`
132
- - 确认当前账号已开通对应查询权限(订单、房态、房价、经营数据)
102
+ ### Handle the stay — overseas LocalsBnb stores only
133
103
 
134
- **步骤 2:在 OpenClaw 或 Hermes Agent 中发送安装指令**
104
+ You can ask the AI to **check in, check out, extend, or change a room**.
135
105
 
136
- 建议使用下面这句(比口语更稳定):
106
+ It will never do it quietly. You always see the guest and the dates first. You say “that’s the one.” Only then it goes through.
137
107
 
138
- ```text
139
- 请帮我安装 localsbnb-mcp-server,并配置 MCP 服务名为 LocalsBnb MCP。
140
- 使用环境变量:
141
- APP_SECRET=<你的APP_SECRET>
142
- APP_ID=<你的APP_ID>
143
- 安装完成后请先执行“查询今天房态”和“查询今日订单”做连通性验证。
144
- ```
108
+ ![The AI shows the booking first. You confirm. Then it happens.](docs/readme/assets/localsbnb-confirm.png)
145
109
 
146
- **步骤 3:验收**
110
+ **If your store is in China:** you can ask all the “what’s going on” questions. **Check-in, check-out, extend, and room change are not available in China yet.** Cancel, change the listed price, or sync a calendar — still do that in Locals Cloud.
147
111
 
148
- - 能成功返回“今日房态”
149
- - 能成功返回“今日订单(预抵/在住/预离)”
150
- - 若失败,按错误提示检查 `APP_SECRET` / `APP_ID` 是否正确
112
+ ---
151
113
 
152
- > 安全建议:请在私聊或受控环境中发送凭证,不要在公开群聊明文发送。
114
+ ## How do I start? (three steps)
153
115
 
154
- ### 4) 其他 MCP 客户端(补充接入)
116
+ ### 1. Take two codes from Locals Cloud
155
117
 
156
- #### Cursor
118
+ Log in to Locals Cloud (路客云) and copy:
157
119
 
158
- 编辑 `~/.cursor/mcp.json`,加入上面的 `mcpServers` 配置并重启 Cursor。
120
+ - **APP_SECRET** — your key
121
+ - **APP_ID** — your property
159
122
 
160
- #### Claude Desktop
123
+ Yours only. Not for the class WeChat group.
161
124
 
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`
125
+ ### 2. Drop them into the AI you picked
165
126
 
166
- #### Claude Code
127
+ Open **Claude, ChatGPT, or Cursor**. Add a tool / MCP, paste this, replace the two lines:
167
128
 
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
129
+ ```json
130
+ {
131
+ "mcpServers": {
132
+ "LocalsBnb MCP": {
133
+ "command": "npx",
134
+ "args": ["--yes", "localsbnb-mcp-server"],
135
+ "env": {
136
+ "APP_SECRET": "<your APP_SECRET>",
137
+ "APP_ID": "<your APP_ID>"
138
+ }
139
+ }
140
+ }
141
+ }
173
142
  ```
174
143
 
175
- ---
144
+ | You use… | Where it usually goes |
145
+ |----------|------------------------|
146
+ | Cursor | Settings → MCP, or the `mcp.json` file |
147
+ | Claude Desktop | Settings → custom tools / MCP |
148
+ | ChatGPT | Settings → apps / developer tools (when your plan allows it) |
149
+ | WeChat / Feishu (China) | Ask the person who set up OpenClaw or Hermes to add the same two codes |
150
+ | WhatsApp / LINE / iMessage | Only if OpenClaw or Hermes already talks in that chat — same two codes. Otherwise use Claude / ChatGPT / Cursor |
176
151
 
177
- ## 常见问题
152
+ Hate config? Tell the AI itself:
178
153
 
179
- | 问题 | 处理方式 |
180
- |---|---|
181
- | 连接失败 / 无权限 | 核对 `APP_SECRET`、`APP_ID`,并确认路客云侧已开通权限 |
182
- | 秘钥错误 | 当前秘钥信息错误,请前往登录路客云 SPMS 获取秘钥,或联系路客云客户经理咨询 |
183
- | 找不到 MCP 工具 | 检查 JSON 格式、命令路径并重启客户端 |
184
- | `ERR_REQUIRE_ESM` | 优先使用 `dist/run.sh` 或 `dist/run.cjs` |
154
+ > Help me install localsbnb-mcp-server. Here is my APP_SECRET and APP_ID.
185
155
 
186
- ---
156
+ ### 3. Talk like a host, not like a programmer
187
157
 
188
- ## 安全建议
158
+ - “Who arrives today?”
159
+ - “Show today’s rooms.”
160
+ - “Airbnb prices this week.”
161
+ - “How is this week going?”
162
+ - “Check Maria in — show me the booking first.” *(overseas)*
189
163
 
190
- - 凭证通过环境变量注入
191
- - 不提交真实 `APP_SECRET` 到仓库
192
- - 关键操作建议保留审核/确认流程
164
+ Answers follow the **language of the property** in Locals Cloud. You do not pick English or Japanese again here.
193
165
 
194
166
  ---
195
167
 
196
- ## 技术支持
197
-
198
- - 技术支持: [https://minsubao.localhome.cn/](https://minsubao.localhome.cn/)
199
-
200
- ---
168
+ ## Need a hand?
201
169
 
202
- **文档版本**: v2.0
203
- **最后更新**: 2026-04
170
+ [localsbnb.com](https://localsbnb.com/)
@@ -1 +1 @@
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
+ function _0x58a1(_0x543f27,_0x482e9a){const _0x2c3aba=_0x2c3a();return _0x58a1=function(_0x58a1b8,_0x6e89da){_0x58a1b8=_0x58a1b8-0x1ac;let _0x47aa71=_0x2c3aba[_0x58a1b8];return _0x47aa71;},_0x58a1(_0x543f27,_0x482e9a);}(function(_0x3c3ad6,_0x3c0152){const _0x4c5c6c=_0x3c3ad6();while(!![]){try{const _0x119521=parseInt(_0x58a1(0x1c5))/0x1*(parseInt(_0x58a1(0x1c3))/0x2)+-parseInt(_0x58a1(0x1d2))/0x3+parseInt(_0x58a1(0x1ad))/0x4*(-parseInt(_0x58a1(0x1bb))/0x5)+-parseInt(_0x58a1(0x1ca))/0x6*(-parseInt(_0x58a1(0x1d3))/0x7)+-parseInt(_0x58a1(0x1c6))/0x8*(-parseInt(_0x58a1(0x1b8))/0x9)+-parseInt(_0x58a1(0x1bc))/0xa+parseInt(_0x58a1(0x1b2))/0xb;if(_0x119521===_0x3c0152)break;else _0x4c5c6c['push'](_0x4c5c6c['shift']());}catch(_0x301387){_0x4c5c6c['push'](_0x4c5c6c['shift']());}}}(_0x2c3a,0x39861));import{logger}from'../utils/logger.js';function _0x2c3a(){const _0x33fb6b=['getAPIKey','length','API\x20key\x20set','trim','1324518BkDtlQ','535822TIyKiD','info','Hudson\x20credentials\x20loaded\x20from\x20config','env','60RLnGkb','LUKEYUN_API_KEY','Hudson\x20credentials\x20set','includes','warn','9984953fGySQL','hudsonAccessToken','APP_SECRET\x20or\x20APP_ID\x20not\x20found\x20in\x20environment\x20variables','scopes','APP_ID\x20not\x20configured.\x20Please\x20set\x20APP_ID\x20environment\x20variable.','APP_ID','144ggImsp','getScopes','map','105015tgyQAR','4443840ShLkvA','LUKEYUN_API_SCOPES','campId','HUDSON_ACCESS_TOKEN','loadFromConfig','API\x20key\x20not\x20found\x20in\x20environment\x20variables','apiKey','2RJpfjc','API\x20key\x20loaded\x20from\x20config','78409nTzQlr','148664FrXMUd','setAPIKey','setHudsonCredentials','isHudsonConfigured','12EjBvBF','Hudson\x20credentials\x20loaded\x20from\x20environment','split','hasAPIKey'];_0x2c3a=function(){return _0x33fb6b;};return _0x2c3a();}export class APIKeyManager{[_0x58a1(0x1c2)]=null;['scopes']=[];[_0x58a1(0x1b3)]=null;[_0x58a1(0x1be)]=null;['loadFromEnv'](){this[_0x58a1(0x1c2)]=process[_0x58a1(0x1ac)][_0x58a1(0x1ae)]||null;const _0x132a87=process[_0x58a1(0x1ac)][_0x58a1(0x1bd)];this[_0x58a1(0x1b5)]=_0x132a87?_0x132a87[_0x58a1(0x1cc)](',')[_0x58a1(0x1ba)](_0xde1c21=>_0xde1c21[_0x58a1(0x1d1)]()):[],this[_0x58a1(0x1b3)]=process[_0x58a1(0x1ac)]['APP_SECRET']||process[_0x58a1(0x1ac)][_0x58a1(0x1bf)]||null,this[_0x58a1(0x1be)]=process[_0x58a1(0x1ac)][_0x58a1(0x1b7)]||process[_0x58a1(0x1ac)]['CAMP_ID']||null,!this[_0x58a1(0x1c2)]?logger[_0x58a1(0x1b1)](_0x58a1(0x1c1)):logger['info']('API\x20key\x20loaded\x20from\x20environment',{'hasScopes':this[_0x58a1(0x1b5)][_0x58a1(0x1cf)]>0x0}),!this['hudsonAccessToken']||!this[_0x58a1(0x1be)]?logger[_0x58a1(0x1b1)](_0x58a1(0x1b4)):logger[_0x58a1(0x1d4)](_0x58a1(0x1cb));}[_0x58a1(0x1c0)](_0x38d785){this[_0x58a1(0x1c2)]=_0x38d785['apiKey']||null,this[_0x58a1(0x1b5)]=_0x38d785['scopes']||[],this[_0x58a1(0x1b3)]=_0x38d785[_0x58a1(0x1b3)]||null,this[_0x58a1(0x1be)]=_0x38d785[_0x58a1(0x1be)]||null,this[_0x58a1(0x1c2)]&&logger[_0x58a1(0x1d4)](_0x58a1(0x1c4),{'hasScopes':this[_0x58a1(0x1b5)]['length']>0x0}),this[_0x58a1(0x1b3)]&&this[_0x58a1(0x1be)]&&logger[_0x58a1(0x1d4)](_0x58a1(0x1d5));}[_0x58a1(0x1c7)](_0x2cd91a,_0xe57321){this['apiKey']=_0x2cd91a,this[_0x58a1(0x1b5)]=_0xe57321||[],logger[_0x58a1(0x1d4)](_0x58a1(0x1d0),{'hasScopes':this[_0x58a1(0x1b5)]['length']>0x0});}[_0x58a1(0x1c8)](_0x41a6fa,_0x38a523){this[_0x58a1(0x1b3)]=_0x41a6fa,this[_0x58a1(0x1be)]=_0x38a523,logger[_0x58a1(0x1d4)](_0x58a1(0x1af));}[_0x58a1(0x1ce)](){return this[_0x58a1(0x1c2)]||'';}[_0x58a1(0x1cd)](){return this[_0x58a1(0x1c2)]!==null&&this[_0x58a1(0x1c2)]!=='';}['hasScope'](_0x2af36e){if(this['scopes'][_0x58a1(0x1b0)]('*'))return!![];return this[_0x58a1(0x1b5)][_0x58a1(0x1b0)](_0x2af36e);}[_0x58a1(0x1b9)](){return[...this[_0x58a1(0x1b5)]];}['isConfigured'](){return this[_0x58a1(0x1c2)]!==null;}[_0x58a1(0x1c9)](){return this[_0x58a1(0x1b3)]!==null&&this[_0x58a1(0x1be)]!==null;}['getHudsonAccessToken'](){if(!this[_0x58a1(0x1b3)])throw new Error('APP_SECRET\x20not\x20configured.\x20Please\x20set\x20APP_SECRET\x20environment\x20variable.');return this[_0x58a1(0x1b3)];}['getCampId'](){if(!this['campId'])throw new Error(_0x58a1(0x1b6));return this[_0x58a1(0x1be)];}}
@@ -1 +1 @@
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
+ (function(_0x399066,_0x1a74a6){var _0x4202f2=_0x399066();while(!![]){try{var _0x12cd77=-parseInt(_0x4b83(0x1e8))/0x1+-parseInt(_0x4b83(0x1df))/0x2*(parseInt(_0x4b83(0x1de))/0x3)+-parseInt(_0x4b83(0x1e5))/0x4*(parseInt(_0x4b83(0x1dd))/0x5)+-parseInt(_0x4b83(0x1e0))/0x6+-parseInt(_0x4b83(0x1e2))/0x7*(parseInt(_0x4b83(0x1e4))/0x8)+parseInt(_0x4b83(0x1e1))/0x9*(parseInt(_0x4b83(0x1e7))/0xa)+parseInt(_0x4b83(0x1e6))/0xb*(parseInt(_0x4b83(0x1e3))/0xc);if(_0x12cd77===_0x1a74a6)break;else _0x4202f2['push'](_0x4202f2['shift']());}catch(_0x27dcb7){_0x4202f2['push'](_0x4202f2['shift']());}}}(_0x219c,0x5e225));function _0x219c(){var _0x891f19=['26831eLvDyJ','17375748FudzkU','1120kCIaHe','20uCfcjo','22DantyW','2382220vQCAjJ','585597dpmmBA','591865whqQXg','39mfEIDc','113272vUvsvJ','1789542qPAdxq','9cWXRgq'];_0x219c=function(){return _0x891f19;};return _0x219c();}function _0x4b83(_0x417e93,_0x48c90d){var _0x219c36=_0x219c();return _0x4b83=function(_0x4b832c,_0x558cdb){_0x4b832c=_0x4b832c-0x1dd;var _0x1af428=_0x219c36[_0x4b832c];return _0x1af428;},_0x4b83(_0x417e93,_0x48c90d);}export{APIKeyManager}from'./apiKeyManager.js';export{PermissionChecker}from'./permissionChecker.js';
@@ -1 +1 @@
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
+ (function(_0x1a55af,_0x5ab8e7){const _0x269fb0=_0x1a55af();while(!![]){try{const _0x127761=parseInt(_0x5c95(0x161))/0x1*(-parseInt(_0x5c95(0x15e))/0x2)+-parseInt(_0x5c95(0x146))/0x3+parseInt(_0x5c95(0x142))/0x4*(parseInt(_0x5c95(0x156))/0x5)+parseInt(_0x5c95(0x165))/0x6*(parseInt(_0x5c95(0x14a))/0x7)+-parseInt(_0x5c95(0x160))/0x8*(parseInt(_0x5c95(0x140))/0x9)+-parseInt(_0x5c95(0x152))/0xa*(parseInt(_0x5c95(0x153))/0xb)+parseInt(_0x5c95(0x14b))/0xc;if(_0x127761===_0x5ab8e7)break;else _0x269fb0['push'](_0x269fb0['shift']());}catch(_0x1c7809){_0x269fb0['push'](_0x269fb0['shift']());}}}(_0x4d35,0xa6467));import{MCPError,ErrorCode,getPermissionDeniedMessage}from'../utils/errorHandler.js';import{logger}from'../utils/logger.js';function _0x5c95(_0x1fb81c,_0x4a80e3){const _0x4d354a=_0x4d35();return _0x5c95=function(_0x5c95c7,_0x3f6dca){_0x5c95c7=_0x5c95c7-0x140;let _0x3b3cb6=_0x4d354a[_0x5c95c7];return _0x3b3cb6;},_0x5c95(_0x1fb81c,_0x4a80e3);}function _0x4d35(){const _0x41dae6=['get_order_details_v2','626018ofZIXk','checkPermission','24bRGtGu','2wuxadn','query_in_house_orders','query_pre_arrival_orders','some','521016jDhlxc','getScopes','668007Krrzqw','debug','1183024aFSnkG','query_pre_departure_orders','Permission\x20check\x20passed\x20(Hudson\x20auth\x20only)','query_today_room_status','2860203SeCbIi','Permission\x20denied','orders','Permission\x20check\x20passed','21igrSvU','27848796zGVxeM','query_operational_data_v2','hasScope','arrange_room','keyManager','query_room_prices','check_in_order','1312820iumSad','33zTBhCl','PERMISSION_DENIED','query_orders_by_date_range','5yWWBEL','finance','isHudsonConfigured','hasAPIKey','query_today_orders','路客云AI','room_status'];_0x4d35=function(){return _0x41dae6;};return _0x4d35();}function toolToPermissionDomain(_0x2c67cc){switch(_0x2c67cc){case _0x5c95(0x15a):case _0x5c95(0x163):case _0x5c95(0x162):case _0x5c95(0x143):case _0x5c95(0x155):case _0x5c95(0x15d):case _0x5c95(0x151):case'check_out_order':case'extend_order':case _0x5c95(0x14e):return _0x5c95(0x148);case _0x5c95(0x14c):return _0x5c95(0x157);case _0x5c95(0x145):case'query_room_status_new':return _0x5c95(0x15c);case _0x5c95(0x150):return'room_price';default:return'generic';}}export class PermissionChecker{['keyManager'];constructor(_0x3a0356){this[_0x5c95(0x14f)]=_0x3a0356;}[_0x5c95(0x15f)](_0x275014,_0x5563a0){if(_0x5563a0['length']===0x0)return;if(!this['keyManager'][_0x5c95(0x159)]()&&this[_0x5c95(0x14f)][_0x5c95(0x158)]()){logger[_0x5c95(0x141)](_0x5c95(0x144),{'tool':_0x275014,'requiredScopes':_0x5563a0});return;}const _0x1ab88f=_0x5563a0[_0x5c95(0x164)](_0x1f8b94=>this[_0x5c95(0x14f)][_0x5c95(0x14d)](_0x1f8b94));if(!_0x1ab88f){const _0x39df3d=this[_0x5c95(0x14f)][_0x5c95(0x166)](),_0x3747ed=toolToPermissionDomain(_0x275014);logger['warn'](_0x5c95(0x147),{'tool':_0x275014,'required':_0x5563a0,'current':_0x39df3d,'domain':_0x3747ed});throw new MCPError(ErrorCode[_0x5c95(0x154)],getPermissionDeniedMessage(_0x3747ed),{'tool':_0x275014,'requiredScopes':_0x5563a0,'currentScopes':_0x39df3d,'domain':_0x3747ed,'source':_0x5c95(0x15b)});}logger[_0x5c95(0x141)](_0x5c95(0x149),{'tool':_0x275014,'scopes':_0x5563a0});}}
@@ -1 +1 @@
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
+ (function(_0x4c2864,_0x1a7558){const _0x51252d=_0x4c2864();while(!![]){try{const _0x557b39=parseInt(_0x470c(0xf5))/0x1*(parseInt(_0x470c(0xed))/0x2)+-parseInt(_0x470c(0xe3))/0x3*(-parseInt(_0x470c(0xf1))/0x4)+-parseInt(_0x470c(0xe5))/0x5*(-parseInt(_0x470c(0xf3))/0x6)+parseInt(_0x470c(0xf6))/0x7*(-parseInt(_0x470c(0xe7))/0x8)+parseInt(_0x470c(0xfb))/0x9+-parseInt(_0x470c(0xf4))/0xa*(-parseInt(_0x470c(0xec))/0xb)+-parseInt(_0x470c(0xf7))/0xc;if(_0x557b39===_0x1a7558)break;else _0x51252d['push'](_0x51252d['shift']());}catch(_0x3e7a3f){_0x51252d['push'](_0x51252d['shift']());}}}(_0x210e,0x9cdc7));function _0x470c(_0x5686e7,_0x4d5f3e){const _0x210e12=_0x210e();return _0x470c=function(_0x470cca,_0x4cb1dd){_0x470cca=_0x470cca-0xdf;let _0x4adbf1=_0x210e12[_0x470cca];return _0x4adbf1;},_0x470c(_0x5686e7,_0x4d5f3e);}import{config}from'../config/index.js';import{logger}from'../utils/logger.js';function _0x210e(){const _0x1f498a=['6220926rJgrwG','map','ttl','enabled','clear','Cache\x20deleted','3xzTgYZ','generateKey','2001360MNqdNT','sort','264skaffA','now','Cache\x20hit','join','data','11hxaRlI','5578edhAnb','debug','cache','expiresAt','3826036YxRDMJ','delete','12miCpfT','3085210QhDlBk','110kbtVIU','17710UwiZQb','28051020AftGBw','set','Cache\x20expired','keys'];_0x210e=function(){return _0x1f498a;};return _0x210e();}export class CacheManager{['cache']=new Map();['get'](_0x2e4bb0){if(!config[_0x470c(0xef)][_0x470c(0xe0)])return null;const _0x31d35f=this[_0x470c(0xef)]['get'](_0x2e4bb0);if(!_0x31d35f)return null;if(Date[_0x470c(0xe8)]()>_0x31d35f[_0x470c(0xf0)])return this[_0x470c(0xef)][_0x470c(0xf2)](_0x2e4bb0),logger[_0x470c(0xee)](_0x470c(0xf9),{'key':_0x2e4bb0}),null;return logger[_0x470c(0xee)](_0x470c(0xe9),{'key':_0x2e4bb0}),_0x31d35f[_0x470c(0xeb)];}[_0x470c(0xf8)](_0x378f90,_0x27ea29,_0x493520){if(!config[_0x470c(0xef)]['enabled'])return;const _0x2a938c=_0x493520||config[_0x470c(0xef)][_0x470c(0xdf)];this[_0x470c(0xef)][_0x470c(0xf8)](_0x378f90,{'data':_0x27ea29,'expiresAt':Date[_0x470c(0xe8)]()+_0x2a938c}),logger[_0x470c(0xee)]('Cache\x20set',{'key':_0x378f90,'ttl':_0x2a938c});}[_0x470c(0xf2)](_0x275c60){this['cache'][_0x470c(0xf2)](_0x275c60),logger[_0x470c(0xee)](_0x470c(0xe2),{'key':_0x275c60});}[_0x470c(0xe1)](){this[_0x470c(0xef)][_0x470c(0xe1)](),logger[_0x470c(0xee)]('Cache\x20cleared');}static[_0x470c(0xe4)](_0x2ba171,_0x1fc8bf){const _0x1051c1=Object[_0x470c(0xfa)](_0x1fc8bf)[_0x470c(0xe6)]()[_0x470c(0xfc)](_0x205e49=>_0x205e49+'='+JSON['stringify'](_0x1fc8bf[_0x205e49]))[_0x470c(0xea)]('&');return _0x2ba171+':'+_0x1051c1;}}
@@ -1 +1 @@
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
+ function _0x491f(){const _0x577592=['API\x20request','response','39782rdLknp','execute','object','请求配置错误','status','21145hzQIzf','headers','mcp','API_NOT_FOUND','7YBWgFx','baseURL','reject','handleError','API_TIMEOUT','retry','apiKey','912cnjqyU','API密钥无效或已过期','config','debug','setupInterceptors','INTERNAL_ERROR','服务器错误,请稍后重试','message','API_ERROR','1793oOAnvn','PERMISSION_DENIED','client','interceptors','hudson-access-token','request','hudsonAccessToken','retryHandler','网络错误,请检查网络连接','路客云AI','params','url','api','use','error','AUTH_INVALID','extraHeaders','delay','192798gPOmtu','10518794JsVFTO','method','7970kbYaAm','env','9804AhXxyc','API_RATE_LIMIT','API错误:','29dVHxfh','application/json','1390352oCbgOy','data','API\x20response','Authorization','code','npm_package_version','4kMFcDu','entries','generic','setExtraHeaders','6741NOLFVz','请求超时,请稍后重试'];_0x491f=function(){return _0x577592;};return _0x491f();}(function(_0x24ffea,_0x1e6bd9){const _0x45b3d3=_0x24ffea();while(!![]){try{const _0x2e26ea=parseInt(_0x3d27(0x1d8))/0x1*(parseInt(_0x3d27(0x1e8))/0x2)+-parseInt(_0x3d27(0x1d0))/0x3*(-parseInt(_0x3d27(0x1e0))/0x4)+parseInt(_0x3d27(0x1ed))/0x5*(-parseInt(_0x3d27(0x1f8))/0x6)+parseInt(_0x3d27(0x1f1))/0x7*(parseInt(_0x3d27(0x1da))/0x8)+parseInt(_0x3d27(0x1e4))/0x9*(-parseInt(_0x3d27(0x1d3))/0xa)+-parseInt(_0x3d27(0x201))/0xb*(-parseInt(_0x3d27(0x1d5))/0xc)+parseInt(_0x3d27(0x1d1))/0xd;if(_0x2e26ea===_0x1e6bd9)break;else _0x45b3d3['push'](_0x45b3d3['shift']());}catch(_0x5b9ebc){_0x45b3d3['push'](_0x45b3d3['shift']());}}}(_0x491f,0x7e547));import _0x308374 from'axios';import{config}from'../config/index.js';import{logger}from'../utils/logger.js';import{MCPError,ErrorCode}from'../utils/errorHandler.js';import{RetryHandler}from'./retryHandler.js';function _0x3d27(_0x5b96cb,_0xa486df){const _0x491fd2=_0x491f();return _0x3d27=function(_0x3d27b8,_0x268ff9){_0x3d27b8=_0x3d27b8-0x1c5;let _0x2073e2=_0x491fd2[_0x3d27b8];return _0x2073e2;},_0x3d27(_0x5b96cb,_0xa486df);}export class HTTPClient{[_0x3d27(0x203)];['apiKey'];['hudsonAccessToken'];[_0x3d27(0x1c5)];[_0x3d27(0x1ce)]={};constructor(_0x5e2d65,_0x1d1f0e){this[_0x3d27(0x1f7)]=_0x5e2d65,this[_0x3d27(0x207)]=_0x1d1f0e,this[_0x3d27(0x1c5)]=new RetryHandler(config[_0x3d27(0x1f6)]['maxRetries'],config[_0x3d27(0x1f6)][_0x3d27(0x1cf)]),this['client']=_0x308374['create']({'baseURL':config[_0x3d27(0x1ca)][_0x3d27(0x1f2)],'timeout':config['api']['timeout'],'headers':{'Content-Type':_0x3d27(0x1d9),'X-Client-Type':_0x3d27(0x1ef),'X-Client-Version':process[_0x3d27(0x1d4)][_0x3d27(0x1df)]||'1.0.0'}}),this[_0x3d27(0x1fc)]();}[_0x3d27(0x1fc)](){this['client']['interceptors'][_0x3d27(0x206)][_0x3d27(0x1cb)](_0x159ed7=>{this[_0x3d27(0x1f7)]&&(_0x159ed7[_0x3d27(0x1ee)][_0x3d27(0x1dd)]='Bearer\x20'+this[_0x3d27(0x1f7)]);this[_0x3d27(0x207)]&&(_0x159ed7[_0x3d27(0x1ee)][_0x3d27(0x205)]=this[_0x3d27(0x207)]);for(const [_0x4a44d9,_0x222d95]of Object[_0x3d27(0x1e1)](this[_0x3d27(0x1ce)])){if(_0x222d95)_0x159ed7[_0x3d27(0x1ee)][_0x4a44d9]=_0x222d95;}return logger[_0x3d27(0x1fb)](_0x3d27(0x1e6),{'method':_0x159ed7['method'],'url':_0x159ed7['url'],'params':_0x159ed7[_0x3d27(0x1c8)]}),_0x159ed7;},_0x2a218a=>{return logger[_0x3d27(0x1cc)]('Request\x20interceptor\x20error',_0x2a218a),Promise[_0x3d27(0x1f3)](_0x2a218a);}),this[_0x3d27(0x203)][_0x3d27(0x204)][_0x3d27(0x1e7)][_0x3d27(0x1cb)](_0x4b501e=>{return logger[_0x3d27(0x1fb)](_0x3d27(0x1dc),{'status':_0x4b501e[_0x3d27(0x1ec)],'url':_0x4b501e[_0x3d27(0x1fa)][_0x3d27(0x1c9)]}),_0x4b501e;},async _0x3694d7=>{return this[_0x3d27(0x1f4)](_0x3694d7);});}async[_0x3d27(0x1f4)](_0x376b33){if(_0x376b33['response']){const _0x13b7f2=_0x376b33[_0x3d27(0x1e7)][_0x3d27(0x1ec)],_0x52505b=_0x376b33[_0x3d27(0x1e7)][_0x3d27(0x1db)];logger[_0x3d27(0x1cc)]('API\x20error\x20response',{'status':_0x13b7f2,'url':_0x376b33[_0x3d27(0x1fa)]?.['url'],'message':_0x52505b[_0x3d27(0x1ff)]});switch(_0x13b7f2){case 0x191:throw new MCPError(ErrorCode[_0x3d27(0x1cd)],_0x3d27(0x1f9),_0x52505b);case 0x193:throw new MCPError(ErrorCode[_0x3d27(0x202)],_0x52505b?.[_0x3d27(0x1ff)]||'权限不足',{..._0x52505b!=null&&typeof _0x52505b===_0x3d27(0x1ea)?_0x52505b:{},'domain':_0x3d27(0x1e2),'source':_0x3d27(0x1c7)});case 0x194:throw new MCPError(ErrorCode[_0x3d27(0x1f0)],'资源不存在',_0x52505b);case 0x1ad:throw new MCPError(ErrorCode[_0x3d27(0x1d6)],'请求频率过高,请稍后重试',_0x52505b);case 0x1f4:case 0x1f6:case 0x1f7:case 0x1f8:throw new MCPError(ErrorCode[_0x3d27(0x200)],_0x3d27(0x1fe),_0x52505b);default:throw new MCPError(ErrorCode[_0x3d27(0x200)],_0x52505b[_0x3d27(0x1ff)]||_0x3d27(0x1d7)+_0x13b7f2,_0x52505b);}}else{if(_0x376b33[_0x3d27(0x206)]){logger[_0x3d27(0x1cc)]('API\x20request\x20timeout',{'url':_0x376b33[_0x3d27(0x1fa)]?.[_0x3d27(0x1c9)],'timeout':config[_0x3d27(0x1ca)]['timeout']});if(_0x376b33[_0x3d27(0x1de)]==='ECONNABORTED')throw new MCPError(ErrorCode[_0x3d27(0x1f5)],_0x3d27(0x1e5));throw new MCPError(ErrorCode[_0x3d27(0x200)],_0x3d27(0x1c6));}else{logger[_0x3d27(0x1cc)]('Request\x20configuration\x20error',_0x376b33);throw new MCPError(ErrorCode[_0x3d27(0x1fd)],_0x3d27(0x1eb));}}}[_0x3d27(0x1e3)](_0x3c277b){this['extraHeaders']={..._0x3c277b};}async[_0x3d27(0x206)](_0x6af391){const _0x1f73e8={'method':_0x6af391[_0x3d27(0x1d2)],'url':_0x6af391['url'],'params':_0x6af391[_0x3d27(0x1c8)],'data':_0x6af391[_0x3d27(0x1db)],'headers':_0x6af391['headers']};try{const _0x261eb6=await this[_0x3d27(0x1c5)][_0x3d27(0x1e9)](()=>this[_0x3d27(0x203)][_0x3d27(0x206)](_0x1f73e8));return _0x261eb6[_0x3d27(0x1db)];}catch(_0x1d1167){throw _0x1d1167;}}}
@@ -1 +1 @@
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
+ (function(_0x4f8621,_0x4c48fc){var _0x39ab2d=_0x4f8621();while(!![]){try{var _0x49adf2=-parseInt(_0x2198(0x64))/0x1*(-parseInt(_0x2198(0x6e))/0x2)+-parseInt(_0x2198(0x6c))/0x3+parseInt(_0x2198(0x6d))/0x4*(-parseInt(_0x2198(0x6f))/0x5)+-parseInt(_0x2198(0x67))/0x6*(-parseInt(_0x2198(0x69))/0x7)+-parseInt(_0x2198(0x65))/0x8*(-parseInt(_0x2198(0x68))/0x9)+parseInt(_0x2198(0x66))/0xa*(-parseInt(_0x2198(0x6b))/0xb)+parseInt(_0x2198(0x6a))/0xc;if(_0x49adf2===_0x4c48fc)break;else _0x39ab2d['push'](_0x39ab2d['shift']());}catch(_0x39ff8d){_0x39ab2d['push'](_0x39ab2d['shift']());}}}(_0x3c7e,0x417cb));export{HTTPClient}from'./httpClient.js';export{RetryHandler}from'./retryHandler.js';function _0x2198(_0x1b0bcd,_0x47c105){var _0x3c7e84=_0x3c7e();return _0x2198=function(_0x2198f6,_0x4d4706){_0x2198f6=_0x2198f6-0x64;var _0x5708aa=_0x3c7e84[_0x2198f6];return _0x5708aa;},_0x2198(_0x1b0bcd,_0x47c105);}export{CacheManager}from'./cacheManager.js';function _0x3c7e(){var _0x1cfc0f=['8602800BsHyuH','22AbxmzL','1374234LoeVGD','4bGmrti','16rtqAhN','2450420yPMBza','21426qsiUrX','7416XKakmv','2502130gboYrH','12HNeWue','4923sCuOSS','1125061fxxHnd'];_0x3c7e=function(){return _0x1cfc0f;};return _0x3c7e();}
@@ -1 +1 @@
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
+ function _0x9d79(_0x3b8538,_0x1fa262){const _0x18dfed=_0x18df();return _0x9d79=function(_0x9d790d,_0x544c00){_0x9d790d=_0x9d790d-0x96;let _0x2247e5=_0x18dfed[_0x9d790d];return _0x2247e5;},_0x9d79(_0x3b8538,_0x1fa262);}function _0x18df(){const _0x3733a7=['maxRetries','response','12638980PHztww','isRetryableError','2599214xmAKoR','ECONNRESET','58554VgmNqy','40YnNOvD','Request\x20failed,\x20retrying...\x20(attempt\x20','status','5245970lVBqCK','sleep','baseDelay','4omhZhl','96417eyYTUc','469YEzBhi','code','2207673TqdCsF','ETIMEDOUT','4630917SYOitG','warn'];_0x18df=function(){return _0x3733a7;};return _0x18df();}(function(_0x5e4ff9,_0x1fe102){const _0x5371ce=_0x5e4ff9();while(!![]){try{const _0x44bb6f=parseInt(_0x9d79(0x9f))/0x1+-parseInt(_0x9d79(0xaa))/0x2+parseInt(_0x9d79(0xa4))/0x3*(parseInt(_0x9d79(0x9e))/0x4)+parseInt(_0x9d79(0x9b))/0x5+parseInt(_0x9d79(0x97))/0x6*(-parseInt(_0x9d79(0xa0))/0x7)+-parseInt(_0x9d79(0x98))/0x8*(parseInt(_0x9d79(0xa2))/0x9)+parseInt(_0x9d79(0xa8))/0xa;if(_0x44bb6f===_0x1fe102)break;else _0x5371ce['push'](_0x5371ce['shift']());}catch(_0x6b964d){_0x5371ce['push'](_0x5371ce['shift']());}}}(_0x18df,0xbcc53));import{logger}from'../utils/logger.js';import{AxiosError}from'axios';export class RetryHandler{['maxRetries'];[_0x9d79(0x9d)];constructor(_0x737b3b=0x3,_0x1ee56c=0x3e8){this[_0x9d79(0xa6)]=_0x737b3b,this['baseDelay']=_0x1ee56c;}async['execute'](_0x205122){let _0x199fe4;for(let _0x5654d1=0x0;_0x5654d1<=this['maxRetries'];_0x5654d1++){try{return await _0x205122();}catch(_0x5477f7){_0x199fe4=_0x5477f7;if(_0x5654d1===this[_0x9d79(0xa6)])break;if(!this[_0x9d79(0xa9)](_0x5477f7))throw _0x5477f7;const _0x27634a=this[_0x9d79(0x9d)]*Math['pow'](0x2,_0x5654d1);logger[_0x9d79(0xa5)](_0x9d79(0x99)+(_0x5654d1+0x1)+'/'+this[_0x9d79(0xa6)]+')',{'error':_0x5477f7 instanceof Error?_0x5477f7['message']:String(_0x5477f7),'delay':_0x27634a}),await this[_0x9d79(0x9c)](_0x27634a);}}throw _0x199fe4;}[_0x9d79(0xa9)](_0x500a32){if(_0x500a32 instanceof AxiosError){if(_0x500a32['code']===_0x9d79(0x96)||_0x500a32['code']===_0x9d79(0xa3)||_0x500a32[_0x9d79(0xa1)]==='ECONNABORTED')return!![];if(_0x500a32[_0x9d79(0xa7)]&&_0x500a32['response']['status']>=0x1f4)return!![];if(_0x500a32[_0x9d79(0xa7)]&&_0x500a32[_0x9d79(0xa7)][_0x9d79(0x9a)]===0x1ad)return!![];}return![];}[_0x9d79(0x9c)](_0x23253c){return new Promise(_0x5b8fd7=>setTimeout(_0x5b8fd7,_0x23253c));}}
@@ -1 +1 @@
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)}};
1
+ function _0x4c67(_0x376201,_0x20719e){const _0x5e994d=_0x5e99();return _0x4c67=function(_0x4c67c4,_0x331f59){_0x4c67c4=_0x4c67c4-0xc1;let _0x27bc21=_0x5e994d[_0x4c67c4];return _0x27bc21;},_0x4c67(_0x376201,_0x20719e);}(function(_0x404be8,_0x5c489f){const _0x128df3=_0x404be8();while(!![]){try{const _0x475dcf=parseInt(_0x4c67(0xc5))/0x1*(-parseInt(_0x4c67(0xdf))/0x2)+-parseInt(_0x4c67(0xcd))/0x3*(parseInt(_0x4c67(0xcc))/0x4)+-parseInt(_0x4c67(0xd6))/0x5*(parseInt(_0x4c67(0xd8))/0x6)+-parseInt(_0x4c67(0xcf))/0x7+parseInt(_0x4c67(0xe0))/0x8*(parseInt(_0x4c67(0xd5))/0x9)+-parseInt(_0x4c67(0xd4))/0xa*(-parseInt(_0x4c67(0xc3))/0xb)+parseInt(_0x4c67(0xc4))/0xc;if(_0x475dcf===_0x5c489f)break;else _0x128df3['push'](_0x128df3['shift']());}catch(_0x3e2590){_0x128df3['push'](_0x128df3['shift']());}}}(_0x5e99,0x28004));function _0x5e99(){const _0x2afc32=['CACHE_TTL','PORT','MAX_RETRIES','55tdYLkZ','5734080HkYLju','170755uBVmvf','NODE_ENV','env','CACHE_ENABLED','LOG_LEVEL','true','https://hudson-prod.localhome.cn','4KPOcpg','505059mwMXjV','API_TIMEOUT','1560671aZnLRd','300000','development','LOCALSBNB_LOG_TO_FILES','3000','104530thpzFR','3141hoccIE','553110HGeAtK','LOG_FORMAT','6VtKglW','https://hudson-dev.localhome.cn','1000','info','LUKEYUN_API_BASE_URL','develop','config','2TSSsVy','7024AwJgph'];_0x5e99=function(){return _0x2afc32;};return _0x5e99();}import _0x1932a7 from'dotenv';_0x1932a7[_0x4c67(0xde)]();const resolvedEnv=process[_0x4c67(0xc7)][_0x4c67(0xc6)]||'production';function resolveBaseURL(){if(process[_0x4c67(0xc7)][_0x4c67(0xdc)])return process[_0x4c67(0xc7)][_0x4c67(0xdc)];if(resolvedEnv===_0x4c67(0xdd)||resolvedEnv===_0x4c67(0xd1))return _0x4c67(0xd9);return _0x4c67(0xcb);}export const config={'api':{'baseURL':resolveBaseURL(),'timeout':parseInt(process[_0x4c67(0xc7)][_0x4c67(0xce)]||'30000',0xa)},'server':{'port':parseInt(process[_0x4c67(0xc7)][_0x4c67(0xc1)]||_0x4c67(0xd3),0xa),'env':resolvedEnv},'cache':{'enabled':process['env'][_0x4c67(0xc8)]===_0x4c67(0xca),'ttl':parseInt(process[_0x4c67(0xc7)][_0x4c67(0xe1)]||_0x4c67(0xd0),0xa)},'retry':{'maxRetries':parseInt(process[_0x4c67(0xc7)][_0x4c67(0xc2)]||'3',0xa),'delay':parseInt(process[_0x4c67(0xc7)]['RETRY_DELAY']||_0x4c67(0xda),0xa)},'log':{'level':process[_0x4c67(0xc7)][_0x4c67(0xc9)]||_0x4c67(0xdb),'format':process[_0x4c67(0xc7)][_0x4c67(0xd7)]||'json','toFiles':process['env'][_0x4c67(0xd2)]==='1'||process[_0x4c67(0xc7)][_0x4c67(0xd2)]===_0x4c67(0xca)}};