localsbnb-mcp-server 1.0.14 → 1.0.16

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 (71) hide show
  1. package/README.md +37 -13
  2. package/dist/auth/apiKeyManager.js +1 -1
  3. package/dist/auth/credentialsStore.js +1 -0
  4. package/dist/auth/handshakeTickets.js +1 -0
  5. package/dist/auth/hudsonToken.js +1 -0
  6. package/dist/auth/index.js +1 -1
  7. package/dist/auth/openSystemBrowser.js +1 -0
  8. package/dist/auth/permissionChecker.js +1 -1
  9. package/dist/client/cacheManager.js +1 -1
  10. package/dist/client/httpClient.js +1 -1
  11. package/dist/client/index.js +1 -1
  12. package/dist/client/retryHandler.js +1 -1
  13. package/dist/config/index.js +1 -1
  14. package/dist/config/tools.js +1 -1
  15. package/dist/index.js +1 -1
  16. package/dist/package.json +6 -4
  17. package/dist/region/api.js +1 -1
  18. package/dist/region/dates.js +1 -1
  19. package/dist/region/i18n.js +1 -1
  20. package/dist/region/index.js +1 -1
  21. package/dist/region/money.js +1 -1
  22. package/dist/region/resolve.js +1 -1
  23. package/dist/region/timezone.js +1 -1
  24. package/dist/region/toolDescriptions.js +1 -1
  25. package/dist/region/types.js +1 -1
  26. package/dist/run.cjs +0 -0
  27. package/dist/server.js +1 -1
  28. package/dist/start.mjs +1 -1
  29. package/dist/tools/auth/handshake.js +1 -0
  30. package/dist/tools/auth/onboarding.js +1 -0
  31. package/dist/tools/finance/index.js +1 -1
  32. package/dist/tools/finance/queryOperationalDataV2.js +1 -1
  33. package/dist/tools/orders/getOrderDetailsV2.js +1 -1
  34. package/dist/tools/orders/index.js +1 -1
  35. package/dist/tools/orders/ordersGetShared.js +1 -1
  36. package/dist/tools/orders/queryInHouseOrders.js +1 -1
  37. package/dist/tools/orders/queryOrdersByDateRange.js +1 -1
  38. package/dist/tools/orders/queryPreArrivalOrders.js +1 -1
  39. package/dist/tools/orders/queryPreDepartureOrders.js +1 -1
  40. package/dist/tools/orders/queryTodayOrders.js +1 -1
  41. package/dist/tools/overseas/channelConnectionFlow.js +1 -0
  42. package/dist/tools/overseas/channelConnectionSnapshot.js +1 -0
  43. package/dist/tools/overseas/channels.js +1 -0
  44. package/dist/tools/overseas/finance.js +1 -1
  45. package/dist/tools/overseas/index.js +1 -1
  46. package/dist/tools/overseas/mutationPreview.js +1 -0
  47. package/dist/tools/overseas/operationTools.js +1 -0
  48. package/dist/tools/overseas/operations.js +1 -0
  49. package/dist/tools/overseas/orders.js +1 -1
  50. package/dist/tools/overseas/prices.js +1 -1
  51. package/dist/tools/overseas/rooms.js +1 -1
  52. package/dist/tools/overseas/writes.js +1 -1
  53. package/dist/tools/rooms/index.js +1 -1
  54. package/dist/tools/rooms/queryRoomPrices.js +1 -1
  55. package/dist/tools/rooms/queryRoomStatusNew.js +1 -1
  56. package/dist/tools/rooms/queryTodayRoomStatus.js +1 -1
  57. package/dist/types/index.js +1 -1
  58. package/dist/utils/desensitize.js +1 -1
  59. package/dist/utils/errorHandler.js +1 -1
  60. package/dist/utils/index.js +1 -1
  61. package/dist/utils/logger.js +1 -1
  62. package/dist/utils/price.js +1 -1
  63. package/dist/utils/shanghaiDate.js +1 -1
  64. package/docs/readme/assets/localsbnb-channels.png +0 -0
  65. package/docs/readme/assets/localsbnb-confirm.png +0 -0
  66. package/docs/readme/assets/localsbnb-doors.png +0 -0
  67. package/docs/readme/assets/localsbnb-flow.png +0 -0
  68. package/docs/readme/assets/localsbnb-hero.png +0 -0
  69. package/docs/readme/assets/localsbnb-ops.png +0 -0
  70. package/mcp.bootstrap.sample.json +10 -0
  71. package/package.json +6 -4
package/README.md CHANGED
@@ -11,7 +11,7 @@ No LocalsBnb app. No extra computer. The AI you already use **is** the front des
11
11
 
12
12
  ## What is this?
13
13
 
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.
14
+ Your listings already live on **LocalsBnb**, connected to **Airbnb, Booking.com, Agoda, and Trip.com** — built for hosts who will not live inside another dashboard.
15
15
 
16
16
  The old way: unlock the phone, open four apps, wait for calendars, copy a name into a notebook, forget who is in 302.
17
17
 
@@ -23,7 +23,7 @@ The new way: open the chat you already have, and talk like you talk to a duty ma
23
23
 
24
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.
25
25
 
26
- ![You speak. Your AI asks LocalsBnb. Locals Cloud answers with your real bookings and rooms.](docs/readme/assets/localsbnb-flow.png)
26
+ ![You speak. Your AI asks LocalsBnb. LocalsBnb answers with your real bookings and rooms.](docs/readme/assets/localsbnb-flow.png)
27
27
 
28
28
  ---
29
29
 
@@ -78,11 +78,20 @@ Compare channels in one breath. No four logins.
78
78
 
79
79
  **15:00, housekeeper in the corridor**
80
80
  “Which rooms are empty and clean right now?”
81
- She does not need your password. You look, you tell her.
81
+ “Mark 302 dirty.” / “Mark the sea-view room clean.” *(overseas store)*
82
+ She does not need your password. You look, you tell her — or you change the clean status in the same chat.
83
+
84
+ **16:20, a walk-in guest**
85
+ “Create a manual booking for Zhang, check in tonight, check out Sunday, one adult.” *(overseas store)*
86
+ You see the quote first. You confirm. Then the order exists.
87
+
88
+ **17:05, weekend pricing**
89
+ “Set this Airbnb rate to 100 for Friday and Saturday — show me first.” *(overseas store)*
90
+ Preview the dates and amount. You say yes. Then the calendar updates.
82
91
 
83
92
  **18:00, owner group chat**
84
93
  “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.
94
+ The number comes back in **your store’s language and currency** — the ones you already set in LocalsBnb.
86
95
 
87
96
  **21:40, last-minute request**
88
97
  “They want one more night. Can we extend?” *(overseas store)*
@@ -99,23 +108,33 @@ You decide whether to raise the weekend or leave it — with the week in front o
99
108
  **First day of a new staff member**
100
109
  They do not learn menus. They learn three sentences: *today’s arrivals, today’s rooms, this week’s numbers.*
101
110
 
102
- ### Handle the stay — overseas LocalsBnb stores only
111
+ ### Open the store & connect channels — overseas LocalsBnb stores only
112
+
113
+ New host? You can **register or sign in in the chat** — email, code, password — without hunting through another install wizard.
114
+
115
+ Already live? Say **“Connect Airbnb”** or **“Connect Booking / Trip / Agoda.”** LocalsBnb opens the browser page (phone or desktop). You finish the channel steps there. Come back and say **“Done.”** The AI checks the link — it does not ask you to paste property IDs.
103
116
 
104
- You can ask the AI to **check in, check out, extend, or change a room**.
117
+ ![Say connect. Finish in the browser. Say Done — AI verifies the channel.](docs/readme/assets/localsbnb-channels.png)
105
118
 
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.
119
+ ### Handle the stay & run the calendar — overseas LocalsBnb stores only
120
+
121
+ You can ask the AI to **check in, check out, extend, change a room, create a manual order, update channel rates, close or open rooms, and set dirty / clean**.
122
+
123
+ It will never do writes quietly. You always see the guest, dates, amounts, or clean status first. You say “that’s the one.” Only then it goes through.
124
+
125
+ ![Account, order, rates, clean status — always preview, then you confirm.](docs/readme/assets/localsbnb-ops.png)
107
126
 
108
127
  ![The AI shows the booking first. You confirm. Then it happens.](docs/readme/assets/localsbnb-confirm.png)
109
128
 
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.
129
+ **If your store is in China:** you can ask all the “what’s going on” questions. **Check-in, check-out, extend, room change, channel connect, manual order, rate edits, and clean-status writes are not available in China yet.** Cancel or sync a calendar — still do that in LocalsBnb.
111
130
 
112
131
  ---
113
132
 
114
133
  ## How do I start? (three steps)
115
134
 
116
- ### 1. Take two codes from Locals Cloud
135
+ ### 1. Take two codes from LocalsBnb
117
136
 
118
- Log in to Locals Cloud (路客云) and copy:
137
+ Log in to LocalsBnb and copy:
119
138
 
120
139
  - **APP_SECRET** — your key
121
140
  - **APP_ID** — your property
@@ -159,9 +178,14 @@ Hate config? Tell the AI itself:
159
178
  - “Show today’s rooms.”
160
179
  - “Airbnb prices this week.”
161
180
  - “How is this week going?”
162
- - “Check Maria in — show me the booking first.” *(overseas)*
163
-
164
- Answers follow the **language of the property** in Locals Cloud. You do not pick English or Japanese again here.
181
+ - “Help me sign up for LocalsBnb.” / “Sign me in.” *(overseas)*
182
+ - “Connect Airbnb.” / “Connect Booking.” — then “Done.” *(overseas)*
183
+ - “Check Maria in — show me the booking first.” *(overseas)*
184
+ - “Create a booking for Zhang, tonight to Sunday.” *(overseas)*
185
+ - “Change this rate for Friday–Saturday — preview first.” *(overseas)*
186
+ - “Mark room 302 dirty.” / “Mark it clean.” *(overseas)*
187
+
188
+ Answers follow the **language of the property** in LocalsBnb. You do not pick English or Japanese again here. Channel pages work on **phone or desktop** browsers.
165
189
 
166
190
  ---
167
191
 
@@ -1 +1 @@
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
+ (function(_0x2bd0df,_0x551008){const _0x15b2ab=_0x2bd0df();while(!![]){try{const _0x1fdeca=parseInt(_0x2d5f(0x214))/0x1+-parseInt(_0x2d5f(0x1f8))/0x2+parseInt(_0x2d5f(0x217))/0x3*(parseInt(_0x2d5f(0x20f))/0x4)+-parseInt(_0x2d5f(0x212))/0x5*(parseInt(_0x2d5f(0x20e))/0x6)+-parseInt(_0x2d5f(0x1fe))/0x7+-parseInt(_0x2d5f(0x216))/0x8*(-parseInt(_0x2d5f(0x20a))/0x9)+-parseInt(_0x2d5f(0x208))/0xa*(-parseInt(_0x2d5f(0x1fa))/0xb);if(_0x1fdeca===_0x551008)break;else _0x15b2ab['push'](_0x15b2ab['shift']());}catch(_0x88d341){_0x15b2ab['push'](_0x15b2ab['shift']());}}}(_0xccf6,0x61e73));import{logger}from'../utils/logger.js';function _0x2d5f(_0x40ad9f,_0x22b827){const _0xccf6a9=_0xccf6();return _0x2d5f=function(_0x2d5f1b,_0x325193){_0x2d5f1b=_0x2d5f1b-0x1f4;let _0x2b0f00=_0xccf6a9[_0x2d5f1b];return _0x2b0f00;},_0x2d5f(_0x40ad9f,_0x22b827);}import{readStoredCredentials}from'./credentialsStore.js';export class APIKeyManager{['apiKey']=null;['scopes']=[];['hudsonAccessToken']=null;[_0x2d5f(0x1f5)]=null;[_0x2d5f(0x1f6)](){this[_0x2d5f(0x210)]=process[_0x2d5f(0x209)][_0x2d5f(0x21c)]||null;const _0xc65dc0=process[_0x2d5f(0x209)][_0x2d5f(0x21e)];this[_0x2d5f(0x1fc)]=_0xc65dc0?_0xc65dc0[_0x2d5f(0x20b)](',')[_0x2d5f(0x206)](_0x3c5238=>_0x3c5238[_0x2d5f(0x218)]()):[],this[_0x2d5f(0x1fb)]=process[_0x2d5f(0x209)][_0x2d5f(0x200)]||process[_0x2d5f(0x209)][_0x2d5f(0x204)]||null,this['campId']=process[_0x2d5f(0x209)]['APP_ID']||process['env'][_0x2d5f(0x21b)]||null;!this['apiKey']?logger[_0x2d5f(0x1f7)](_0x2d5f(0x1ff)):logger[_0x2d5f(0x203)](_0x2d5f(0x1f9),{'hasScopes':this[_0x2d5f(0x1fc)][_0x2d5f(0x219)]>0x0});if(this[_0x2d5f(0x1fb)]&&this[_0x2d5f(0x1f5)]){logger[_0x2d5f(0x203)]('Hudson\x20credentials\x20loaded\x20from\x20environment');return;}if(!this[_0x2d5f(0x1fb)]&&!this[_0x2d5f(0x1f5)]){const _0x5174ac=readStoredCredentials();if(_0x5174ac){this[_0x2d5f(0x1fb)]=_0x5174ac[_0x2d5f(0x202)],this['campId']=_0x5174ac['campId'],logger[_0x2d5f(0x203)]('Hudson\x20credentials\x20loaded\x20from\x20local\x20credentials\x20file');return;}}logger[_0x2d5f(0x1f7)]('APP_SECRET\x20or\x20APP_ID\x20not\x20found;\x20starting\x20in\x20bootstrap\x20auth\x20mode');}['loadFromConfig'](_0x5b022e){this[_0x2d5f(0x210)]=_0x5b022e[_0x2d5f(0x210)]||null,this[_0x2d5f(0x1fc)]=_0x5b022e[_0x2d5f(0x1fc)]||[],this[_0x2d5f(0x1fb)]=_0x5b022e['hudsonAccessToken']||null,this[_0x2d5f(0x1f5)]=_0x5b022e[_0x2d5f(0x1f5)]||null,this[_0x2d5f(0x210)]&&logger[_0x2d5f(0x203)](_0x2d5f(0x207),{'hasScopes':this[_0x2d5f(0x1fc)][_0x2d5f(0x219)]>0x0}),this['hudsonAccessToken']&&this[_0x2d5f(0x1f5)]&&logger[_0x2d5f(0x203)](_0x2d5f(0x20d));}['setAPIKey'](_0x5708c9,_0x55f216){this[_0x2d5f(0x210)]=_0x5708c9,this[_0x2d5f(0x1fc)]=_0x55f216||[],logger[_0x2d5f(0x203)](_0x2d5f(0x1f4),{'hasScopes':this[_0x2d5f(0x1fc)][_0x2d5f(0x219)]>0x0});}[_0x2d5f(0x21d)](_0x172cd0,_0x70e5d6){this['hudsonAccessToken']=_0x172cd0,this[_0x2d5f(0x1f5)]=_0x70e5d6,logger['info'](_0x2d5f(0x211));}['getAPIKey'](){return this[_0x2d5f(0x210)]||'';}['hasAPIKey'](){return this[_0x2d5f(0x210)]!==null&&this[_0x2d5f(0x210)]!=='';}[_0x2d5f(0x205)](_0x2c75cc){if(this[_0x2d5f(0x1fc)][_0x2d5f(0x215)]('*'))return!![];return this[_0x2d5f(0x1fc)][_0x2d5f(0x215)](_0x2c75cc);}[_0x2d5f(0x201)](){return[...this[_0x2d5f(0x1fc)]];}[_0x2d5f(0x21a)](){return this[_0x2d5f(0x210)]!==null;}[_0x2d5f(0x213)](){return this['hudsonAccessToken']!==null&&this[_0x2d5f(0x1f5)]!==null;}[_0x2d5f(0x1fd)](){if(!this['hudsonAccessToken'])throw new Error('APP_SECRET\x20not\x20configured.\x20Please\x20set\x20APP_SECRET\x20environment\x20variable.');return this[_0x2d5f(0x1fb)];}[_0x2d5f(0x20c)](){if(!this['campId'])throw new Error('APP_ID\x20not\x20configured.\x20Please\x20set\x20APP_ID\x20environment\x20variable.');return this[_0x2d5f(0x1f5)];}}function _0xccf6(){const _0x21004f=['env','99954VUQjbv','split','getCampId','Hudson\x20credentials\x20loaded\x20from\x20config','3239982mDregE','8364FitzxM','apiKey','Hudson\x20credentials\x20set','5DZFHop','isHudsonConfigured','190500UgLFQr','includes','56eAOoLV','699XpIYrG','trim','length','isConfigured','CAMP_ID','LUKEYUN_API_KEY','setHudsonCredentials','LUKEYUN_API_SCOPES','API\x20key\x20set','campId','loadFromEnv','warn','926356cJFedD','API\x20key\x20loaded\x20from\x20environment','3868084vaHeCC','hudsonAccessToken','scopes','getHudsonAccessToken','2843337vlUeZV','API\x20key\x20not\x20found\x20in\x20environment\x20variables','APP_SECRET','getScopes','accessToken','info','HUDSON_ACCESS_TOKEN','hasScope','map','API\x20key\x20loaded\x20from\x20config','30aatFla'];_0xccf6=function(){return _0x21004f;};return _0xccf6();}
@@ -0,0 +1 @@
1
+ (function(_0x2aea66,_0x53c2d5){const _0x5792ae=_0x2aea66();while(!![]){try{const _0x2606b8=-parseInt(_0x30a5(0x16b))/0x1*(-parseInt(_0x30a5(0x186))/0x2)+-parseInt(_0x30a5(0x18d))/0x3+parseInt(_0x30a5(0x170))/0x4+parseInt(_0x30a5(0x18a))/0x5*(-parseInt(_0x30a5(0x183))/0x6)+parseInt(_0x30a5(0x16d))/0x7+parseInt(_0x30a5(0x181))/0x8*(-parseInt(_0x30a5(0x17b))/0x9)+parseInt(_0x30a5(0x177))/0xa;if(_0x2606b8===_0x53c2d5)break;else _0x5792ae['push'](_0x5792ae['shift']());}catch(_0x6a2700){_0x5792ae['push'](_0x5792ae['shift']());}}}(_0xa845,0x53251));import{chmodSync,mkdirSync,readFileSync,renameSync,writeFileSync}from'fs';import _0x1153db from'os';import _0x5b3cb6 from'path';import{logger}from'../utils/logger.js';export const CREDENTIALS_FILE_VERSION=0x1;function _0xa845(){const _0x321e20=['296600iIGQlC','pid','6MKQakL','toISOString','env','825514exWCzc','accessToken','version','warn','336095UDqXUE','code','isArray','1128063xfjiOx','homedir','1auMsYw','Failed\x20to\x20read\x20LocalsBnb\x20credentials\x20file','2294614OHuVZh','dirname','stringify','870704keHKxy','Cannot\x20persist\x20LocalsBnb\x20credentials\x20without\x20accessToken\x20and\x20campId','info','object','isFinite','utf8','ENOENT','4558410ccyIZg','message','.tmp','trim','153WIaAba','.localsbnb','Loaded\x20LocalsBnb\x20credentials\x20from\x20file','join','credentials.json','campId'];_0xa845=function(){return _0x321e20;};return _0xa845();}export function defaultCredentialsPath(){const _0x21cf4c=(process[_0x30a5(0x185)]['LOCALSBNB_CREDENTIALS_PATH']||'')[_0x30a5(0x17a)]();if(_0x21cf4c)return _0x21cf4c;return _0x5b3cb6[_0x30a5(0x17e)](_0x1153db[_0x30a5(0x16a)](),_0x30a5(0x17c),_0x30a5(0x17f));}function isRecord(_0x30c34d){return _0x30c34d!=null&&typeof _0x30c34d===_0x30a5(0x173)&&!Array[_0x30a5(0x18c)](_0x30c34d);}export function parseStoredCredentials(_0x20c643){if(!isRecord(_0x20c643))return null;const _0x5d3df7=String(_0x20c643[_0x30a5(0x187)]??'')[_0x30a5(0x17a)](),_0x11746b=String(_0x20c643[_0x30a5(0x180)]??'')[_0x30a5(0x17a)]();if(!_0x5d3df7||!_0x11746b)return null;const _0x40c273=Number(_0x20c643[_0x30a5(0x188)]??CREDENTIALS_FILE_VERSION),_0x3f7ded=String(_0x20c643['updatedAt']??'')[_0x30a5(0x17a)]()||new Date()['toISOString']();return{'version':Number[_0x30a5(0x174)](_0x40c273)?_0x40c273:CREDENTIALS_FILE_VERSION,'accessToken':_0x5d3df7,'campId':_0x11746b,'updatedAt':_0x3f7ded};}function _0x30a5(_0x501e7e,_0xf3647d){const _0xa845aa=_0xa845();return _0x30a5=function(_0x30a56f,_0x33ea0b){_0x30a56f=_0x30a56f-0x16a;let _0x43ccf0=_0xa845aa[_0x30a56f];return _0x43ccf0;},_0x30a5(_0x501e7e,_0xf3647d);}export function readStoredCredentials(_0x5e7b97=defaultCredentialsPath()){try{const _0x423a77=readFileSync(_0x5e7b97,_0x30a5(0x175)),_0x41a9f4=parseStoredCredentials(JSON['parse'](_0x423a77));if(!_0x41a9f4)return logger[_0x30a5(0x189)]('Ignored\x20incomplete\x20LocalsBnb\x20credentials\x20file'),null;return logger[_0x30a5(0x172)](_0x30a5(0x17d)),_0x41a9f4;}catch(_0x1c350d){const _0x461824=_0x1c350d[_0x30a5(0x18b)];return _0x461824!==_0x30a5(0x176)&&logger[_0x30a5(0x189)](_0x30a5(0x16c),{'error':_0x1c350d instanceof Error?_0x1c350d[_0x30a5(0x178)]:String(_0x1c350d)}),null;}}export function writeStoredCredentials(_0x1043cb,_0x44b0ca=defaultCredentialsPath()){const _0x243e24={'version':CREDENTIALS_FILE_VERSION,'accessToken':_0x1043cb[_0x30a5(0x187)][_0x30a5(0x17a)](),'campId':_0x1043cb[_0x30a5(0x180)][_0x30a5(0x17a)](),'updatedAt':_0x1043cb['updatedAt']||new Date()[_0x30a5(0x184)]()};if(!_0x243e24[_0x30a5(0x187)]||!_0x243e24[_0x30a5(0x180)])throw new Error(_0x30a5(0x171));const _0x10b2f9=_0x5b3cb6[_0x30a5(0x16e)](_0x44b0ca);mkdirSync(_0x10b2f9,{'recursive':!![],'mode':0x1c0});try{chmodSync(_0x10b2f9,0x1c0);}catch{}const _0x5487fc=_0x44b0ca+'.'+process[_0x30a5(0x182)]+_0x30a5(0x179);writeFileSync(_0x5487fc,JSON[_0x30a5(0x16f)](_0x243e24,null,0x2)+'\x0a',{'encoding':_0x30a5(0x175),'mode':0x180}),renameSync(_0x5487fc,_0x44b0ca);try{chmodSync(_0x44b0ca,0x180);}catch{}return logger[_0x30a5(0x172)]('Saved\x20LocalsBnb\x20credentials\x20to\x20file'),_0x243e24;}
@@ -0,0 +1 @@
1
+ function _0x129b(_0x458614,_0x4d8552){const _0x35e76a=_0x35e7();return _0x129b=function(_0x129bb1,_0xe47814){_0x129bb1=_0x129bb1-0x1d7;let _0x179c95=_0x35e76a[_0x129bb1];return _0x179c95;},_0x129b(_0x458614,_0x4d8552);}(function(_0x48e0de,_0x4ca1d8){const _0x11bb42=_0x48e0de();while(!![]){try{const _0x2976d5=parseInt(_0x129b(0x1e9))/0x1*(-parseInt(_0x129b(0x1e5))/0x2)+parseInt(_0x129b(0x1e1))/0x3+-parseInt(_0x129b(0x1db))/0x4+parseInt(_0x129b(0x1f0))/0x5+-parseInt(_0x129b(0x1f2))/0x6*(-parseInt(_0x129b(0x1dc))/0x7)+-parseInt(_0x129b(0x1f1))/0x8+-parseInt(_0x129b(0x1da))/0x9;if(_0x2976d5===_0x4ca1d8)break;else _0x11bb42['push'](_0x11bb42['shift']());}catch(_0x1daeca){_0x11bb42['push'](_0x11bb42['shift']());}}}(_0x35e7,0x88256));import{existsSync,mkdirSync,readFileSync,writeFileSync}from'fs';import _0x15a560 from'os';import _0x17a256 from'path';import{logger}from'../utils/logger.js';export const HANDSHAKE_TTL_MS=0x19*0x3c*0x3e8;function _0x35e7(){const _0x51e8b7=['3899763aEAXvI','2972352VIEKzP','22029LLHKdC','parse','createdAt','utf8','LOCALSBNB_HANDSHAKE_STORE','2873076rHqWAX','expiresAt','info','filter','18woYqhX','Saved\x20Airbnb\x20handshake\x20ticket','sessionScope','homedir','63657UYhgVT','trim','.localsbnb','handshakes.json','now','join','entries','5398280hLFtBf','2651704xFqMaW','1146IoxJJz','env','stringify','ticketId','sort'];_0x35e7=function(){return _0x51e8b7;};return _0x35e7();}function storePath(){const _0x24943a=(process[_0x129b(0x1f3)][_0x129b(0x1e0)]||'')[_0x129b(0x1ea)]();if(_0x24943a)return _0x24943a;return _0x17a256[_0x129b(0x1ee)](_0x15a560[_0x129b(0x1e8)](),_0x129b(0x1eb),_0x129b(0x1ec));}function readMap(){const _0x103424=storePath();if(!existsSync(_0x103424))return{};try{return JSON[_0x129b(0x1dd)](readFileSync(_0x103424,_0x129b(0x1df)));}catch{return{};}}function writeMap(_0xd6f0d2){const _0x296c1a=storePath();mkdirSync(_0x17a256['dirname'](_0x296c1a),{'recursive':!![]}),writeFileSync(_0x296c1a,JSON[_0x129b(0x1d7)](_0xd6f0d2,null,0x2)+'\x0a',{'encoding':'utf8','mode':0x180});}export function saveLocalHandshakeTicket(_0x14dfd3){const _0x39d8d2=readMap(),_0x8c3127=Date[_0x129b(0x1ed)]();for(const [_0x51137f,_0x29a637]of Object[_0x129b(0x1ef)](_0x39d8d2)){if(!_0x29a637||_0x29a637[_0x129b(0x1e2)]<_0x8c3127)delete _0x39d8d2[_0x51137f];}_0x39d8d2[_0x14dfd3[_0x129b(0x1d8)]]=_0x14dfd3,writeMap(_0x39d8d2),logger[_0x129b(0x1e3)](_0x129b(0x1e6));}export function readLocalHandshakeTicket(_0x475711){const _0x179c83=readMap()[String(_0x475711||'')[_0x129b(0x1ea)]()];if(!_0x179c83)return null;if(_0x179c83['expiresAt']<Date[_0x129b(0x1ed)]())return null;return _0x179c83;}export function readLatestLocalHandshakeTicket(_0x332d52){return Object['values'](readMap())[_0x129b(0x1e4)](_0x2c2f94=>_0x2c2f94?.[_0x129b(0x1e7)]===_0x332d52&&_0x2c2f94[_0x129b(0x1e2)]>Date[_0x129b(0x1ed)]())[_0x129b(0x1d9)]((_0x315eb6,_0x4a988c)=>_0x4a988c[_0x129b(0x1de)]-_0x315eb6[_0x129b(0x1de)])[0x0]??null;}
@@ -0,0 +1 @@
1
+ (function(_0x3b8659,_0x362cba){const _0x2372c7=_0x3b8659();while(!![]){try{const _0x1a5ae2=-parseInt(_0x35f8(0x6f))/0x1*(parseInt(_0x35f8(0x6c))/0x2)+-parseInt(_0x35f8(0x66))/0x3+parseInt(_0x35f8(0x6e))/0x4+parseInt(_0x35f8(0x67))/0x5+-parseInt(_0x35f8(0x68))/0x6+-parseInt(_0x35f8(0x6b))/0x7+parseInt(_0x35f8(0x69))/0x8;if(_0x1a5ae2===_0x362cba)break;else _0x2372c7['push'](_0x2372c7['shift']());}catch(_0x4354ac){_0x2372c7['push'](_0x2372c7['shift']());}}}(_0xa5ed,0xad350));function _0xa5ed(){const _0x4288c9=['1VPaJZf','replace','length','3908415FBfEkn','5105445siZIQr','2987988aakkkZ','19234776Unuxwa','every','3479672dmRSxz','1012654BojOnr','trim','352984NkSqma'];_0xa5ed=function(){return _0x4288c9;};return _0xa5ed();}export function looksLikeJwt(_0x184460){const _0x1d7f13=_0x184460[_0x35f8(0x6d)]()['split']('.');return _0x1d7f13[_0x35f8(0x65)]===0x3&&_0x1d7f13[_0x35f8(0x6a)](_0x283b9b=>_0x283b9b[_0x35f8(0x65)]>0x0);}function _0x35f8(_0x1c8844,_0x1449c0){const _0xa5edd6=_0xa5ed();return _0x35f8=function(_0x35f8a2,_0x1f85ad){_0x35f8a2=_0x35f8a2-0x65;let _0x20a96f=_0xa5edd6[_0x35f8a2];return _0x20a96f;},_0x35f8(_0x1c8844,_0x1449c0);}export function formatHudsonAccessTokenHeader(_0x384fd9){const _0x1cfa6b=_0x384fd9[_0x35f8(0x6d)]()[_0x35f8(0x70)](/^Bearer\s+/i,'')[_0x35f8(0x6d)]();if(!_0x1cfa6b)return'';return looksLikeJwt(_0x1cfa6b)?'Bearer\x20'+_0x1cfa6b:_0x1cfa6b;}
@@ -1 +1 @@
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
+ (function(_0x7b78ef,_0x30603b){var _0x54b339=_0x7b78ef();while(!![]){try{var _0x5db097=-parseInt(_0x3379(0x83))/0x1*(parseInt(_0x3379(0x7f))/0x2)+-parseInt(_0x3379(0x82))/0x3*(parseInt(_0x3379(0x86))/0x4)+parseInt(_0x3379(0x84))/0x5+parseInt(_0x3379(0x81))/0x6*(-parseInt(_0x3379(0x87))/0x7)+parseInt(_0x3379(0x80))/0x8*(-parseInt(_0x3379(0x88))/0x9)+parseInt(_0x3379(0x89))/0xa+parseInt(_0x3379(0x85))/0xb;if(_0x5db097===_0x30603b)break;else _0x54b339['push'](_0x54b339['shift']());}catch(_0x1f577d){_0x54b339['push'](_0x54b339['shift']());}}}(_0x4d83,0x7707e));function _0x4d83(){var _0x4daf58=['80720LfqFKs','6PTFDFj','2658726ZIEYzb','1jrsjyL','723835JggbNq','27850724RWQpRJ','4MgTCzb','3155551wfRmkT','585bSdypa','5387170pjlCMa','1469866fHaTXk'];_0x4d83=function(){return _0x4daf58;};return _0x4d83();}function _0x3379(_0x3e2aa6,_0x3d0926){var _0x4d8354=_0x4d83();return _0x3379=function(_0x3379f1,_0x2eb604){_0x3379f1=_0x3379f1-0x7f;var _0x2b3321=_0x4d8354[_0x3379f1];return _0x2b3321;},_0x3379(_0x3e2aa6,_0x3d0926);}export{APIKeyManager}from'./apiKeyManager.js';export{PermissionChecker}from'./permissionChecker.js';export{defaultCredentialsPath,readStoredCredentials,writeStoredCredentials}from'./credentialsStore.js';
@@ -0,0 +1 @@
1
+ (function(_0x135018,_0x1790d0){const _0x5e6440=_0x135018();while(!![]){try{const _0x4064bf=-parseInt(_0x5b1c(0x82))/0x1*(parseInt(_0x5b1c(0x77))/0x2)+-parseInt(_0x5b1c(0x79))/0x3*(-parseInt(_0x5b1c(0x8b))/0x4)+-parseInt(_0x5b1c(0x84))/0x5*(parseInt(_0x5b1c(0x76))/0x6)+parseInt(_0x5b1c(0x8e))/0x7+-parseInt(_0x5b1c(0x83))/0x8+parseInt(_0x5b1c(0x90))/0x9+-parseInt(_0x5b1c(0x8d))/0xa;if(_0x4064bf===_0x1790d0)break;else _0x5e6440['push'](_0x5e6440['shift']());}catch(_0x15ade6){_0x5e6440['push'](_0x5e6440['shift']());}}}(_0x5a0e,0x4c259));import{spawn}from'child_process';function _0x5a0e(){const _0x23370d=['LOCALSBNB_OPEN_BROWSER','8AgadGJ','open','2046080uTAeBz','2937578OzXssc','message','3463182EEEkgN','once','spawn_error','error','disabled','https:','445386Pkxaet','13766LWLhcz','exit','27087jVVbsa','xdg-open','timeout','win32','exit_','platform','trim','start','cmd','5gImOkg','1578872LbilUa','5OKXrbz','spawn_failed','env','unref','http:','protocol'];_0x5a0e=function(){return _0x23370d;};return _0x5a0e();}const OPEN_TIMEOUT_MS=0x9c4;function isHttpUrl(_0x292a23){try{const _0x4c2eed=new URL(_0x292a23);return _0x4c2eed['protocol']===_0x5b1c(0x88)||_0x4c2eed[_0x5b1c(0x89)]===_0x5b1c(0x95);}catch{return![];}}function _0x5b1c(_0x818b5a,_0xd5a3fd){const _0x5a0e96=_0x5a0e();return _0x5b1c=function(_0x5b1cd7,_0x3527a1){_0x5b1cd7=_0x5b1cd7-0x76;let _0x2afe65=_0x5a0e96[_0x5b1cd7];return _0x2afe65;},_0x5b1c(_0x818b5a,_0xd5a3fd);}function spawnCommand(_0x1ab74c){if(process[_0x5b1c(0x7e)]==='darwin')return{'cmd':_0x5b1c(0x8c),'args':[_0x1ab74c]};if(process['platform']===_0x5b1c(0x7c))return{'cmd':_0x5b1c(0x81),'args':['/c',_0x5b1c(0x80),'',_0x1ab74c]};return{'cmd':_0x5b1c(0x7a),'args':[_0x1ab74c]};}export async function tryOpenSystemBrowser(_0x2e12aa){if((process[_0x5b1c(0x86)][_0x5b1c(0x8a)]||'')[_0x5b1c(0x7f)]()==='0')return{'opened':![],'reason':_0x5b1c(0x94)};const _0x54f941=String(_0x2e12aa||'')[_0x5b1c(0x7f)]();if(!isHttpUrl(_0x54f941))return{'opened':![],'reason':'invalid_url'};const {cmd:_0x599e10,args:_0x3d4b32}=spawnCommand(_0x54f941);return new Promise(_0x33b526=>{let _0x35ac9a=![];const _0x245f4b=_0x1075f8=>{if(_0x35ac9a)return;_0x35ac9a=!![],clearTimeout(_0x5be442),_0x33b526(_0x1075f8);},_0x5be442=setTimeout(()=>{_0x245f4b({'opened':![],'reason':_0x5b1c(0x7b)});},OPEN_TIMEOUT_MS);let _0x5d45bc;try{_0x5d45bc=spawn(_0x599e10,_0x3d4b32,{'stdio':'ignore','detached':!![]});}catch(_0x3ae287){_0x245f4b({'opened':![],'reason':_0x3ae287 instanceof Error?_0x3ae287[_0x5b1c(0x8f)]:_0x5b1c(0x85)});return;}_0x5d45bc[_0x5b1c(0x91)](_0x5b1c(0x93),_0x3da5f2=>{_0x245f4b({'opened':![],'reason':_0x3da5f2[_0x5b1c(0x8f)]||_0x5b1c(0x92)});}),_0x5d45bc[_0x5b1c(0x91)](_0x5b1c(0x78),_0x1e9deb=>{if(_0x1e9deb===0x0||_0x1e9deb==null){_0x245f4b({'opened':!![],'reason':'opened'});return;}_0x245f4b({'opened':![],'reason':_0x5b1c(0x7d)+_0x1e9deb});}),_0x5d45bc[_0x5b1c(0x87)]();});}
@@ -1 +1 @@
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
+ (function(_0x35e2e9,_0x43b245){const _0x3027b4=_0x35e2e9();while(!![]){try{const _0x334954=-parseInt(_0x5bab(0x14d))/0x1+-parseInt(_0x5bab(0x154))/0x2+-parseInt(_0x5bab(0x148))/0x3+parseInt(_0x5bab(0x144))/0x4*(-parseInt(_0x5bab(0x158))/0x5)+-parseInt(_0x5bab(0x141))/0x6+-parseInt(_0x5bab(0x140))/0x7+parseInt(_0x5bab(0x13f))/0x8;if(_0x334954===_0x43b245)break;else _0x3027b4['push'](_0x3027b4['shift']());}catch(_0x3a4154){_0x3027b4['push'](_0x3027b4['shift']());}}}(_0x2bee,0x25014));function _0x5bab(_0x3ac1a3,_0xc0137){const _0x2beea1=_0x2bee();return _0x5bab=function(_0x5bab06,_0x4da847){_0x5bab06=_0x5bab06-0x139;let _0x5e5425=_0x2beea1[_0x5bab06];return _0x5e5425;},_0x5bab(_0x3ac1a3,_0xc0137);}import{MCPError,ErrorCode,getPermissionDeniedMessage}from'../utils/errorHandler.js';import{logger}from'../utils/logger.js';function toolToPermissionDomain(_0x3dfcb9){switch(_0x3dfcb9){case _0x5bab(0x13e):case _0x5bab(0x15a):case'query_in_house_orders':case _0x5bab(0x153):case _0x5bab(0x143):case _0x5bab(0x14e):case _0x5bab(0x15d):case _0x5bab(0x155):case _0x5bab(0x14f):case'arrange_room':case _0x5bab(0x149):return _0x5bab(0x151);case'query_operational_data_v2':return'finance';case _0x5bab(0x139):case _0x5bab(0x14c):case _0x5bab(0x145):case _0x5bab(0x159):return _0x5bab(0x15c);case _0x5bab(0x13b):case'update_channel_prices':return _0x5bab(0x13a);default:return'generic';}}export class PermissionChecker{[_0x5bab(0x14b)];constructor(_0x182384){this['keyManager']=_0x182384;}[_0x5bab(0x13c)](_0x593ce2,_0x3913e3){if(_0x3913e3['length']===0x0)return;if(!this[_0x5bab(0x14b)][_0x5bab(0x13d)]()&&this[_0x5bab(0x14b)][_0x5bab(0x147)]()){logger[_0x5bab(0x157)]('Permission\x20check\x20passed\x20(Hudson\x20auth\x20only)',{'tool':_0x593ce2,'requiredScopes':_0x3913e3});return;}if(!this[_0x5bab(0x14b)][_0x5bab(0x13d)]()&&!this[_0x5bab(0x14b)][_0x5bab(0x147)]())throw new MCPError(ErrorCode['AUTH_REQUIRED'],_0x5bab(0x150));const _0x277cae=_0x3913e3[_0x5bab(0x14a)](_0x5385a5=>this[_0x5bab(0x14b)][_0x5bab(0x15b)](_0x5385a5));if(!_0x277cae){const _0x3d5ea9=this[_0x5bab(0x14b)][_0x5bab(0x156)](),_0x3be3e3=toolToPermissionDomain(_0x593ce2);logger[_0x5bab(0x15e)](_0x5bab(0x152),{'tool':_0x593ce2,'required':_0x3913e3,'current':_0x3d5ea9,'domain':_0x3be3e3});throw new MCPError(ErrorCode[_0x5bab(0x142)],getPermissionDeniedMessage(_0x3be3e3),{'tool':_0x593ce2,'requiredScopes':_0x3913e3,'currentScopes':_0x3d5ea9,'domain':_0x3be3e3,'source':_0x5bab(0x146)});}logger[_0x5bab(0x157)](_0x5bab(0x15f),{'tool':_0x593ce2,'scopes':_0x3913e3});}}function _0x2bee(){const _0x59067a=['19647DlXfxQ','get_order_details_v2','extend_order','Sign\x20in\x20or\x20register\x20with\x20LocalsBnb\x20first\x20(sign_in\x20or\x20send_signup_email_code\x20/\x20complete_sign_up).','orders','Permission\x20denied','query_pre_departure_orders','384770duRLWR','check_out_order','getScopes','debug','645205MqhVBB','open_rooms','query_pre_arrival_orders','hasScope','room_status','check_in_order','warn','Permission\x20check\x20passed','query_today_room_status','room_price','query_room_prices','checkPermission','hasAPIKey','query_today_orders','8806440RXpKmr','2007866yNlssk','375252kwEoBq','PERMISSION_DENIED','query_orders_by_date_range','4zukrMG','close_rooms','路客云AI','isHudsonConfigured','776340zOKHez','create_manual_order','some','keyManager','query_room_status_new'];_0x2bee=function(){return _0x59067a;};return _0x2bee();}
@@ -1 +1 @@
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
+ (function(_0x4bc172,_0x3658c7){const _0x22c45a=_0x4bc172();while(!![]){try{const _0x38e6a6=-parseInt(_0x426e(0x1b6))/0x1+parseInt(_0x426e(0x1b5))/0x2*(-parseInt(_0x426e(0x1b0))/0x3)+parseInt(_0x426e(0x1c7))/0x4*(parseInt(_0x426e(0x1bc))/0x5)+-parseInt(_0x426e(0x1bb))/0x6+-parseInt(_0x426e(0x1c3))/0x7+-parseInt(_0x426e(0x1b3))/0x8+parseInt(_0x426e(0x1af))/0x9*(parseInt(_0x426e(0x1c6))/0xa);if(_0x38e6a6===_0x3658c7)break;else _0x22c45a['push'](_0x22c45a['shift']());}catch(_0x332f3b){_0x22c45a['push'](_0x22c45a['shift']());}}}(_0x4080,0xa2a2c));import{config}from'../config/index.js';function _0x426e(_0x322a75,_0x3ebdf0){const _0x4080e4=_0x4080();return _0x426e=function(_0x426e2c,_0x6041df){_0x426e2c=_0x426e2c-0x1af;let _0x379375=_0x4080e4[_0x426e2c];return _0x379375;},_0x426e(_0x322a75,_0x3ebdf0);}function _0x4080(){const _0x17e775=['join','ttl','delete','enabled','stringify','now','6652205lgVEQk','Cache\x20deleted','set','60qnYtqA','4559668bNuDod','2488383sMxDPO','1276839wjJZZh','expiresAt','Cache\x20set','2754808hpEqju','sort','2lSIOTy','17225atfTvD','debug','clear','generateKey','cache','2371074OPHFyv','5OLwXWs'];_0x4080=function(){return _0x17e775;};return _0x4080();}import{logger}from'../utils/logger.js';export class CacheManager{[_0x426e(0x1ba)]=new Map();['get'](_0x15f648){if(!config[_0x426e(0x1ba)][_0x426e(0x1c0)])return null;const _0x458161=this[_0x426e(0x1ba)]['get'](_0x15f648);if(!_0x458161)return null;if(Date[_0x426e(0x1c2)]()>_0x458161[_0x426e(0x1b1)])return this[_0x426e(0x1ba)]['delete'](_0x15f648),logger[_0x426e(0x1b7)]('Cache\x20expired',{'key':_0x15f648}),null;return logger['debug']('Cache\x20hit',{'key':_0x15f648}),_0x458161['data'];}[_0x426e(0x1c5)](_0x482e7f,_0x1eeca4,_0x1707e4){if(!config[_0x426e(0x1ba)][_0x426e(0x1c0)])return;const _0x38abc9=_0x1707e4||config[_0x426e(0x1ba)][_0x426e(0x1be)];this[_0x426e(0x1ba)][_0x426e(0x1c5)](_0x482e7f,{'data':_0x1eeca4,'expiresAt':Date[_0x426e(0x1c2)]()+_0x38abc9}),logger[_0x426e(0x1b7)](_0x426e(0x1b2),{'key':_0x482e7f,'ttl':_0x38abc9});}[_0x426e(0x1bf)](_0xcf4be5){this[_0x426e(0x1ba)][_0x426e(0x1bf)](_0xcf4be5),logger[_0x426e(0x1b7)](_0x426e(0x1c4),{'key':_0xcf4be5});}[_0x426e(0x1b8)](){this['cache'][_0x426e(0x1b8)](),logger['debug']('Cache\x20cleared');}static[_0x426e(0x1b9)](_0x48577f,_0x131c37){const _0x1e3f37=Object['keys'](_0x131c37)[_0x426e(0x1b4)]()['map'](_0x1288f7=>_0x1288f7+'='+JSON[_0x426e(0x1c1)](_0x131c37[_0x1288f7]))[_0x426e(0x1bd)]('&');return _0x48577f+':'+_0x1e3f37;}}
@@ -1 +1 @@
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
+ function _0x75d4(){const _0x19aa70=['PERMISSION_DENIED','hudsonAccessToken','API_RATE_LIMIT','debug','API_ERROR','setupInterceptors','API\x20request','31096dpyTPs','baseURL','request','url','data','api','hudson-access-token','API_NOT_FOUND','560QGzsKw','method','config','mcp','1.0.0','请求频率过高,请稍后重试','路客云AI','apiKey','status','application/json','API_TIMEOUT','error','timeout','trim','Bearer\x20','handleError','client','execute','entries','Authorization','API\x20request\x20timeout','21602590CUiJQS','object','Request\x20interceptor\x20error','response','23216YYAlZS','env','4JfqaGG','API密钥无效或已过期','API\x20error\x20response','retryHandler','delay','11uvjVQV','headers','params','ECONNABORTED','请求配置错误','382806GOqSzq','interceptors','2988564dHPDMu','4128342sPQxSg','message','AUTH_INVALID','网络错误,请检查网络连接','6051807wQWGjL','1463RZULtR','use','extraHeaders','retry','服务器错误,请稍后重试'];_0x75d4=function(){return _0x19aa70;};return _0x75d4();}(function(_0x52de51,_0x7b4b49){const _0x398508=_0x52de51();while(!![]){try{const _0x565bfe=-parseInt(_0x1572(0x180))/0x1*(parseInt(_0x1572(0x1b7))/0x2)+-parseInt(_0x1572(0x182))/0x3+parseInt(_0x1572(0x1b5))/0x4*(parseInt(_0x1572(0x19c))/0x5)+-parseInt(_0x1572(0x183))/0x6+parseInt(_0x1572(0x188))/0x7*(parseInt(_0x1572(0x194))/0x8)+-parseInt(_0x1572(0x187))/0x9+parseInt(_0x1572(0x1b1))/0xa*(parseInt(_0x1572(0x17b))/0xb);if(_0x565bfe===_0x7b4b49)break;else _0x398508['push'](_0x398508['shift']());}catch(_0x5c79c6){_0x398508['push'](_0x398508['shift']());}}}(_0x75d4,0x7a2ba));import _0x1a92fe from'axios';import{formatHudsonAccessTokenHeader}from'../auth/hudsonToken.js';import{config}from'../config/index.js';function _0x1572(_0x373e59,_0x3e741e){const _0x75d49c=_0x75d4();return _0x1572=function(_0x1572f1,_0x152656){_0x1572f1=_0x1572f1-0x17b;let _0x532a25=_0x75d49c[_0x1572f1];return _0x532a25;},_0x1572(_0x373e59,_0x3e741e);}import{logger}from'../utils/logger.js';import{MCPError,ErrorCode}from'../utils/errorHandler.js';import{RetryHandler}from'./retryHandler.js';export class HTTPClient{['client'];['apiKey'];[_0x1572(0x18e)];['retryHandler'];['extraHeaders']={};constructor(_0x594806,_0x597afe){this[_0x1572(0x1a3)]=_0x594806,this[_0x1572(0x18e)]=_0x597afe,this[_0x1572(0x1ba)]=new RetryHandler(config[_0x1572(0x18b)]['maxRetries'],config['retry'][_0x1572(0x1bb)]),this[_0x1572(0x1ac)]=_0x1a92fe['create']({'baseURL':config[_0x1572(0x199)][_0x1572(0x195)],'timeout':config[_0x1572(0x199)][_0x1572(0x1a8)],'headers':{'Content-Type':_0x1572(0x1a5),'X-Client-Type':_0x1572(0x19f),'X-Client-Version':process[_0x1572(0x1b6)]['npm_package_version']||_0x1572(0x1a0)}}),this[_0x1572(0x192)]();}[_0x1572(0x192)](){this['client'][_0x1572(0x181)][_0x1572(0x196)][_0x1572(0x189)](_0x212955=>{this[_0x1572(0x1a3)]&&(_0x212955[_0x1572(0x17c)][_0x1572(0x1af)]=_0x1572(0x1aa)+this['apiKey']);this['hudsonAccessToken']&&(_0x212955[_0x1572(0x17c)][_0x1572(0x19a)]=formatHudsonAccessTokenHeader(this[_0x1572(0x18e)]));for(const [_0x172193,_0x28f60d]of Object[_0x1572(0x1ae)](this[_0x1572(0x18a)])){if(_0x28f60d)_0x212955[_0x1572(0x17c)][_0x172193]=_0x28f60d;}return logger[_0x1572(0x190)](_0x1572(0x193),{'method':_0x212955[_0x1572(0x19d)],'url':_0x212955['url'],'params':_0x212955[_0x1572(0x17d)]}),_0x212955;},_0x1fd2ed=>{return logger['error'](_0x1572(0x1b3),_0x1fd2ed),Promise['reject'](_0x1fd2ed);}),this['client'][_0x1572(0x181)]['response'][_0x1572(0x189)](_0x44f71c=>{return logger[_0x1572(0x190)]('API\x20response',{'status':_0x44f71c[_0x1572(0x1a4)],'url':_0x44f71c[_0x1572(0x19e)][_0x1572(0x197)]}),_0x44f71c;},async _0x5713ee=>{return this[_0x1572(0x1ab)](_0x5713ee);});}async[_0x1572(0x1ab)](_0x3d0041){if(_0x3d0041[_0x1572(0x1b4)]){const _0xe0765b=_0x3d0041[_0x1572(0x1b4)][_0x1572(0x1a4)],_0x30f15b=_0x3d0041['response'][_0x1572(0x198)];logger[_0x1572(0x1a7)](_0x1572(0x1b9),{'status':_0xe0765b,'url':_0x3d0041[_0x1572(0x19e)]?.['url'],'message':_0x30f15b[_0x1572(0x184)]});switch(_0xe0765b){case 0x191:throw new MCPError(ErrorCode[_0x1572(0x185)],_0x1572(0x1b8),_0x30f15b);case 0x193:throw new MCPError(ErrorCode[_0x1572(0x18d)],_0x30f15b?.[_0x1572(0x184)]||'权限不足',{..._0x30f15b!=null&&typeof _0x30f15b===_0x1572(0x1b2)?_0x30f15b:{},'domain':'generic','source':_0x1572(0x1a2)});case 0x194:throw new MCPError(ErrorCode[_0x1572(0x19b)],'资源不存在',_0x30f15b);case 0x1ad:throw new MCPError(ErrorCode[_0x1572(0x18f)],_0x1572(0x1a1),_0x30f15b);case 0x1f4:case 0x1f6:case 0x1f7:case 0x1f8:throw new MCPError(ErrorCode['API_ERROR'],_0x1572(0x18c),_0x30f15b);default:throw new MCPError(ErrorCode[_0x1572(0x191)],_0x30f15b[_0x1572(0x184)]||'API错误:'+_0xe0765b,_0x30f15b);}}else{if(_0x3d0041[_0x1572(0x196)]){logger[_0x1572(0x1a7)](_0x1572(0x1b0),{'url':_0x3d0041[_0x1572(0x19e)]?.[_0x1572(0x197)],'timeout':config[_0x1572(0x199)][_0x1572(0x1a8)]});if(_0x3d0041['code']===_0x1572(0x17e))throw new MCPError(ErrorCode[_0x1572(0x1a6)],'请求超时,请稍后重试');throw new MCPError(ErrorCode[_0x1572(0x191)],_0x1572(0x186));}else{logger['error']('Request\x20configuration\x20error',_0x3d0041);throw new MCPError(ErrorCode['INTERNAL_ERROR'],_0x1572(0x17f));}}}['setExtraHeaders'](_0xa749f4){this['extraHeaders']={..._0xa749f4};}['setHudsonAccessToken'](_0x4c31e3){const _0x5ea221=String(_0x4c31e3??'')[_0x1572(0x1a9)]();this[_0x1572(0x18e)]=_0x5ea221||undefined;}async[_0x1572(0x196)](_0x4be170){const _0x231e39={'method':_0x4be170[_0x1572(0x19d)],'url':_0x4be170[_0x1572(0x197)],'params':_0x4be170[_0x1572(0x17d)],'data':_0x4be170[_0x1572(0x198)],'headers':_0x4be170['headers']};try{const _0x33635e=_0x4be170['retry']===![]?await this['client'][_0x1572(0x196)](_0x231e39):await this[_0x1572(0x1ba)][_0x1572(0x1ad)](()=>this[_0x1572(0x1ac)]['request'](_0x231e39));return _0x33635e[_0x1572(0x198)];}catch(_0x8d5199){throw _0x8d5199;}}}
@@ -1 +1 @@
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
+ function _0x1739(_0x19c792,_0x4fb635){var _0xa2e188=_0xa2e1();return _0x1739=function(_0x1739f6,_0x59dc8b){_0x1739f6=_0x1739f6-0x1b7;var _0xea6250=_0xa2e188[_0x1739f6];return _0xea6250;},_0x1739(_0x19c792,_0x4fb635);}(function(_0xc3d0be,_0x1d7be8){var _0x2f7b1c=_0xc3d0be();while(!![]){try{var _0x240cf8=parseInt(_0x1739(0x1bc))/0x1*(-parseInt(_0x1739(0x1b7))/0x2)+-parseInt(_0x1739(0x1b9))/0x3+parseInt(_0x1739(0x1bd))/0x4*(-parseInt(_0x1739(0x1be))/0x5)+parseInt(_0x1739(0x1ba))/0x6*(-parseInt(_0x1739(0x1b8))/0x7)+parseInt(_0x1739(0x1bf))/0x8*(parseInt(_0x1739(0x1c1))/0x9)+parseInt(_0x1739(0x1c0))/0xa+parseInt(_0x1739(0x1bb))/0xb;if(_0x240cf8===_0x1d7be8)break;else _0x2f7b1c['push'](_0x2f7b1c['shift']());}catch(_0x1d6b52){_0x2f7b1c['push'](_0x2f7b1c['shift']());}}}(_0xa2e1,0xb47b1));export{HTTPClient}from'./httpClient.js';export{RetryHandler}from'./retryHandler.js';function _0xa2e1(){var _0x5558a0=['157218UytVVE','100pKgVsA','103115XrLkwh','8gRJwwy','9307630JVZcmH','5987097gJhIjn','4CvQNLE','38402LmeYWF','1649511TAopFz','6InsxxV','5814457TBGLCl'];_0xa2e1=function(){return _0x5558a0;};return _0xa2e1();}export{CacheManager}from'./cacheManager.js';
@@ -1 +1 @@
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
+ (function(_0x4baf7a,_0x4a1f5c){const _0x4e9c8a=_0x4baf7a();while(!![]){try{const _0x506e9b=parseInt(_0x50a7(0x151))/0x1+parseInt(_0x50a7(0x146))/0x2*(parseInt(_0x50a7(0x145))/0x3)+parseInt(_0x50a7(0x159))/0x4+-parseInt(_0x50a7(0x158))/0x5*(-parseInt(_0x50a7(0x14c))/0x6)+-parseInt(_0x50a7(0x14b))/0x7+parseInt(_0x50a7(0x15a))/0x8*(-parseInt(_0x50a7(0x15b))/0x9)+-parseInt(_0x50a7(0x14e))/0xa*(-parseInt(_0x50a7(0x14d))/0xb);if(_0x506e9b===_0x4a1f5c)break;else _0x4e9c8a['push'](_0x4e9c8a['shift']());}catch(_0x2b1ef2){_0x4e9c8a['push'](_0x4e9c8a['shift']());}}}(_0x20d4,0x65020));import{logger}from'../utils/logger.js';function _0x50a7(_0x24592e,_0x2b6ae0){const _0x20d494=_0x20d4();return _0x50a7=function(_0x50a72a,_0x1b956a){_0x50a72a=_0x50a72a-0x144;let _0x1d4d04=_0x20d494[_0x50a72a];return _0x1d4d04;},_0x50a7(_0x24592e,_0x2b6ae0);}function _0x20d4(){const _0x409158=['4681894ymZzOU','12CbVtpo','22bwjcnq','2146820kmCGpn','baseDelay','code','59083QNRIYq','isRetryableError','response','ECONNABORTED','warn','execute','ETIMEDOUT','367585sbqihs','2285308ShGXHe','2807816VQdtHT','9vVzKyi','Request\x20failed,\x20retrying...\x20(attempt\x20','15819mPrmrQ','86gdTHvI','sleep','maxRetries','message','status'];_0x20d4=function(){return _0x409158;};return _0x20d4();}import{AxiosError}from'axios';export class RetryHandler{['maxRetries'];[_0x50a7(0x14f)];constructor(_0x3512cf=0x3,_0x3a2de4=0x3e8){this['maxRetries']=_0x3512cf,this[_0x50a7(0x14f)]=_0x3a2de4;}async[_0x50a7(0x156)](_0x2b5301){let _0xca2997;for(let _0x58c4dc=0x0;_0x58c4dc<=this[_0x50a7(0x148)];_0x58c4dc++){try{return await _0x2b5301();}catch(_0x1d80ce){_0xca2997=_0x1d80ce;if(_0x58c4dc===this[_0x50a7(0x148)])break;if(!this['isRetryableError'](_0x1d80ce))throw _0x1d80ce;const _0x20a671=this[_0x50a7(0x14f)]*Math['pow'](0x2,_0x58c4dc);logger[_0x50a7(0x155)](_0x50a7(0x144)+(_0x58c4dc+0x1)+'/'+this['maxRetries']+')',{'error':_0x1d80ce instanceof Error?_0x1d80ce[_0x50a7(0x149)]:String(_0x1d80ce),'delay':_0x20a671}),await this[_0x50a7(0x147)](_0x20a671);}}throw _0xca2997;}[_0x50a7(0x152)](_0x12bd8c){if(_0x12bd8c instanceof AxiosError){if(_0x12bd8c[_0x50a7(0x150)]==='ECONNRESET'||_0x12bd8c[_0x50a7(0x150)]===_0x50a7(0x157)||_0x12bd8c[_0x50a7(0x150)]===_0x50a7(0x154))return!![];if(_0x12bd8c[_0x50a7(0x153)]&&_0x12bd8c[_0x50a7(0x153)][_0x50a7(0x14a)]>=0x1f4)return!![];if(_0x12bd8c[_0x50a7(0x153)]&&_0x12bd8c[_0x50a7(0x153)][_0x50a7(0x14a)]===0x1ad)return!![];}return![];}[_0x50a7(0x147)](_0x5346fe){return new Promise(_0x1d4a21=>setTimeout(_0x1d4a21,_0x5346fe));}}
@@ -1 +1 @@
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)}};
1
+ (function(_0x2ab88a,_0x4643ef){const _0x2a6e19=_0x2ab88a();while(!![]){try{const _0x5ac0a9=-parseInt(_0x4828(0x16e))/0x1*(parseInt(_0x4828(0x174))/0x2)+parseInt(_0x4828(0x16a))/0x3+-parseInt(_0x4828(0x180))/0x4+parseInt(_0x4828(0x17e))/0x5+parseInt(_0x4828(0x176))/0x6+parseInt(_0x4828(0x16f))/0x7*(parseInt(_0x4828(0x168))/0x8)+-parseInt(_0x4828(0x165))/0x9;if(_0x5ac0a9===_0x4643ef)break;else _0x2a6e19['push'](_0x2a6e19['shift']());}catch(_0x1139d6){_0x2a6e19['push'](_0x2a6e19['shift']());}}}(_0x6ebe,0xad3ef));import _0x387851 from'dotenv';_0x387851[_0x4828(0x17c)]();const resolvedEnv=process[_0x4828(0x17a)][_0x4828(0x16d)]||_0x4828(0x172);function resolveBaseURL(){if(process[_0x4828(0x17a)]['LUKEYUN_API_BASE_URL'])return process[_0x4828(0x17a)][_0x4828(0x16b)];if(resolvedEnv==='develop'||resolvedEnv==='development')return _0x4828(0x177);return _0x4828(0x17d);}function _0x4828(_0x2b01b6,_0x4e2fed){const _0x6ebe6b=_0x6ebe();return _0x4828=function(_0x4828cc,_0x3fa428){_0x4828cc=_0x4828cc-0x165;let _0x21096b=_0x6ebe6b[_0x4828cc];return _0x21096b;},_0x4828(_0x2b01b6,_0x4e2fed);}export const config={'api':{'baseURL':resolveBaseURL(),'timeout':parseInt(process['env'][_0x4828(0x173)]||_0x4828(0x167),0xa)},'server':{'port':parseInt(process[_0x4828(0x17a)][_0x4828(0x179)]||_0x4828(0x17b),0xa),'env':resolvedEnv},'cache':{'enabled':process[_0x4828(0x17a)][_0x4828(0x175)]===_0x4828(0x178),'ttl':parseInt(process[_0x4828(0x17a)][_0x4828(0x16c)]||_0x4828(0x17f),0xa)},'retry':{'maxRetries':parseInt(process[_0x4828(0x17a)][_0x4828(0x166)]||'3',0xa),'delay':parseInt(process['env']['RETRY_DELAY']||'1000',0xa)},'log':{'level':process[_0x4828(0x17a)]['LOG_LEVEL']||'info','format':process[_0x4828(0x17a)][_0x4828(0x171)]||_0x4828(0x170),'toFiles':process[_0x4828(0x17a)][_0x4828(0x169)]==='1'||process[_0x4828(0x17a)]['LOCALSBNB_LOG_TO_FILES']===_0x4828(0x178)}};function _0x6ebe(){const _0x67a6ad=['5116708RZVPuy','4282299irdfGg','MAX_RETRIES','30000','48LRxMGz','LOCALSBNB_LOG_TO_FILES','3617154MumFZr','LUKEYUN_API_BASE_URL','CACHE_TTL','NODE_ENV','2lqABoN','680876VLwrJe','json','LOG_FORMAT','production','API_TIMEOUT','124268MHdyGS','CACHE_ENABLED','920514KhhGTB','https://hudson-dev.localhome.cn','true','PORT','env','3000','config','https://hudson-prod.localhome.cn','3230630KfYxZW','300000'];_0x6ebe=function(){return _0x67a6ad;};return _0x6ebe();}
@@ -1 +1 @@
1
- (function(_0x443ab1,_0x39ba31){const _0x1af418=_0x443ab1();while(!![]){try{const _0xc3bdc6=-parseInt(_0x51c7(0x15b))/0x1*(-parseInt(_0x51c7(0x12c))/0x2)+-parseInt(_0x51c7(0x10a))/0x3+parseInt(_0x51c7(0x11f))/0x4+parseInt(_0x51c7(0x157))/0x5*(-parseInt(_0x51c7(0x111))/0x6)+-parseInt(_0x51c7(0x11a))/0x7+-parseInt(_0x51c7(0x12b))/0x8+parseInt(_0x51c7(0x14e))/0x9;if(_0xc3bdc6===_0x39ba31)break;else _0x1af418['push'](_0x1af418['shift']());}catch(_0x1533cb){_0x1af418['push'](_0x1af418['shift']());}}}(_0x2ff3,0x28d64));import*as _0x5b53fa from'../tools/rooms/index.js';function _0x2ff3(){const _0x47fde3=['订单ID','渠道ID列表(可选)','查询房价(渠道\x20RP、可配置天数价格)。用户说「本周房价」「上周房价」时必须传\x20timeRange=this_week\x20或\x20last_week(自然周周一至周日,上海时区),不要用「近7天」或默认\x20days=7\x20代替「本周」——否则日期区间错误。用户只说「近一周」「最近7天」且无「本周」字样时,可用\x20date+days(默认从当天起\x207\x20天)。支持关键词:查看房态日历价、房态日历价、日历价、房价、近期房价、本月房间、XXX天房价、今日房价查询、房价查询','Optional\x20parent\x20order\x20ID\x20for\x20preview','queryRoomStatusNewHandler','this_week=本周自然周房价;last_week=上周自然周。与「滚动\x207\x20天」不同','queryPreDepartureOrdersHandler','extend_order','关键字(可选)','Stay\x20detail\x20ID','checkOutOrderOverseas','Execute\x20only\x20after\x20the\x20human\x20confirms\x20this\x20exact\x20booking\x20(guest\x20+\x20dates).\x20Omit\x20to\x20preview.\x20Never\x20true\x20on\x20the\x20first\x20lookup.','string','房源分组ID列表(可选)','this_week','Nights\x20to\x20add\x20(>=1)','query_in_house_orders','roomId','Check\x20out\x20a\x20stay','query_pre_arrival_orders','object','query_orders_by_date_range','number','6008760HjrhHu','queryOrdersByDateRangeHandler','last_week','array','每页数量,默认10','模糊搜索:房源编码、房源简称、房源名称(可选)','region','query_pre_departure_orders','查询开始日期\x20YYYY-MM-DD;与\x20endDate\x20配对','15iqqooS','queryInHouseOrdersHandler','this_week=本周自然周;last_week=上周自然周。与\x20startDate/endDate\x20二选一','房源类型ID列表(可选)','87345xLxwHW','query_room_status_new','this_week=锚定日所在自然周(周一至周日);last_week=上一完整自然周。与\x20startDate/endDate\x20二选一','Stay\x20detail\x20IDs\x20to\x20check\x20out','orders:write','自定义统计区间起点,需与\x20endDate\x20同时传','548241jIwrnK','query_operational_data_v2','checkInOrderOverseas','queryTodayOrdersHandler','在住订单(今日已入住)。固定调用\x20/orders/get\x20且\x20orderType=10。支持关键词:在住情况、在住订单、今日在住、今日已入住、已入住、今日在住订单。','Check\x20in\x20a\x20stay','checkPermission','112560zexyvC','按房型日历查询房态、可售与库存等(新接口)。与「房价/渠道价」无关:用户说「查看房态日历价」「房态日历价」指近期/渠道房价时,必须调用\x20query_room_prices,勿选本工具。用户说「本周」「上周」房态日历时必须传\x20timeRange=this_week\x20或\x20last_week(自然周周一至周日,上海时区),勿用「从今天起连续\x2030\x20天」代替本周。','每页数量,默认15,最大100','date','orders:read','Target\x20room\x20ID','finance:read','extendOrderOverseas','queryOperationalDataV2Handler','2215010xDWhfv','orderDetailId','arrange_room','query_today_orders','rooms:read','120400mpioxC','订单查询(日期范围事件)。支持按\x20startDate/endDate\x20或\x20timeRange(this_week/last_week)\x20查询,不与今日订单/预抵/在住/预离混用。支持关键词:订单查询、查询订单、某时间段订单。','根据订单ID查询订单详情信息。返回中含客人姓名字段,向用户回复时必须说明客人姓名(不得省略)。支持关键词:XXX订单详情、订单详情、订单详情查询、订单详情统计、订单详情分析、订单详情报表、订单详情展示、订单详情可视化、订单详情仪表盘、订单详情报告、订单详情图表、订单详情表格。用户可先通过今日订单获得订单号再查详情','this_week=本周自然周;last_week=上周自然周。与仅按天数的「近30天」不同','check_in_order','boolean','Stay\x20detail\x20IDs\x20to\x20check\x20in','Assign\x20or\x20change\x20room','Current\x20order\x20ID\x20to\x20extend','预离订单(今日待退房)。固定调用\x20/orders/get\x20且\x20orderType=12。支持关键词:预离、预离订单、今日待退房、今日预离订单、今天待退房、剩余待退房、今日预离。','查询结束日期\x20YYYY-MM-DD;与\x20startDate\x20配对','开始日期\x20YYYY-MM-DD,默认当天;与\x20timeRange\x20联用时表示锚定日所在周','498880lhgwjC','2QveThI','permissionChecker','页码,默认1','Extend\x20a\x20stay','check_out_order','自定义统计区间终点,需与\x20startDate\x20同时传','预抵订单(今日待入住)。固定调用\x20/orders/get\x20且\x20orderType=11。支持关键词:预抵、预抵订单、今日待入住、今日预订订单、今天待入住、剩余待入住、今日预抵。','queryTodayRoomStatusHandler','orderDetailIds','getOrderDetailsV2Handler','查询今日(或指定日)房态汇总:房间状态、库存与保洁等,不含渠道房价。「查看房态日历价」指房价时请用\x20query_room_prices。支持关键词:今日房态、今日房态查询、今日房态统计、今日房态分析、今日房态报表、今日房态展示、今日房态可视化、今日房态仪表盘、今日房态报告、今日房态图表、今日房态表格、房态查询、房态'];_0x2ff3=function(){return _0x47fde3;};return _0x2ff3();}function _0x51c7(_0x3d7c49,_0x1b51b9){const _0x2ff3e9=_0x2ff3();return _0x51c7=function(_0x51c71f,_0x5b25f6){_0x51c71f=_0x51c71f-0x107;let _0x2581e1=_0x2ff3e9[_0x51c71f];return _0x2581e1;},_0x51c7(_0x3d7c49,_0x1b51b9);}import*as _0x1cfba2 from'../tools/orders/index.js';import*as _0x21b321 from'../tools/finance/index.js';import{getOverseasToolDescription}from'../region/index.js';import*as _0x5dd928 from'../tools/overseas/writes.js';import{handleToolError}from'../utils/errorHandler.js';export const toolDefinitions=[{'name':_0x51c7(0x15c),'description':_0x51c7(0x112),'inputSchema':{'type':_0x51c7(0x14b),'properties':{'date':{'type':'string','format':_0x51c7(0x114),'description':'开始日期,格式:YYYY-MM-DD,默认为当天;与\x20timeRange\x20联用时表示锚定日所在周'},'days':{'type':_0x51c7(0x14d),'default':0x1e,'minimum':0x1,'description':'查询天数,默认30天;与\x20timeRange\x20互斥(传\x20timeRange\x20时固定为自然周\x207\x20天)'},'timeRange':{'type':_0x51c7(0x143),'enum':[_0x51c7(0x145),_0x51c7(0x150)],'description':_0x51c7(0x122)},'roomCategoryIds':{'type':_0x51c7(0x151),'items':{'type':_0x51c7(0x14d)},'description':_0x51c7(0x15a)},'roomCategoryGroupIds':{'type':_0x51c7(0x151),'items':{'type':_0x51c7(0x14d)},'description':_0x51c7(0x144)},'channelIds':{'type':_0x51c7(0x151),'items':{'type':'number'},'description':_0x51c7(0x138)},'searchKey':{'type':'string','description':_0x51c7(0x153)},'pageNum':{'type':_0x51c7(0x14d),'default':0x1,'minimum':0x1,'description':_0x51c7(0x12e)},'pageSize':{'type':_0x51c7(0x14d),'default':0xf,'minimum':0x1,'maximum':0x64,'description':_0x51c7(0x113)}},'required':[]},'handler':_0x5b53fa[_0x51c7(0x13b)],'requiredScopes':[_0x51c7(0x11e)]},{'name':'query_today_room_status','description':_0x51c7(0x136),'inputSchema':{'type':'object','properties':{'date':{'type':_0x51c7(0x143),'format':_0x51c7(0x114),'description':'日期,格式:YYYY-MM-DD,默认为当天'}},'required':[]},'handler':_0x5b53fa[_0x51c7(0x133)],'requiredScopes':[_0x51c7(0x11e)]},{'name':'query_room_prices','description':_0x51c7(0x139),'inputSchema':{'type':_0x51c7(0x14b),'properties':{'date':{'type':'string','format':'date','description':_0x51c7(0x12a)},'days':{'type':_0x51c7(0x14d),'default':0x7,'minimum':0x1,'maximum':0x1e,'description':'从\x20date\x20起连续天数;与\x20timeRange\x20互斥(传\x20timeRange\x20时固定为自然周\x207\x20天)'},'timeRange':{'type':'string','enum':[_0x51c7(0x145),'last_week'],'description':_0x51c7(0x13c)}},'required':[]},'handler':_0x5b53fa['queryRoomPricesHandler'],'requiredScopes':['rooms:read']},{'name':_0x51c7(0x11d),'description':'今日订单(聚合事件):同时查询预抵(orderType=11)、在住(orderType=10)、预离(orderType=12)三组,并分别返回总数与明细。支持关键词:订单、今日订单情况、待办事项、待办、今日待办、待处理订单情况、订单情况。','inputSchema':{'type':_0x51c7(0x14b),'properties':{'pageNum':{'type':'number','default':0x1,'minimum':0x1,'description':_0x51c7(0x12e)},'pageSize':{'type':_0x51c7(0x14d),'default':0xa,'minimum':0x1,'maximum':0x32,'description':_0x51c7(0x152)},'keyword':{'type':_0x51c7(0x143),'description':_0x51c7(0x13f)}},'required':[]},'handler':_0x1cfba2[_0x51c7(0x10d)],'requiredScopes':[_0x51c7(0x115)]},{'name':_0x51c7(0x14a),'description':_0x51c7(0x132),'inputSchema':{'type':_0x51c7(0x14b),'properties':{'pageNum':{'type':'number','default':0x1,'minimum':0x1,'description':_0x51c7(0x12e)},'pageSize':{'type':_0x51c7(0x14d),'default':0xa,'minimum':0x1,'maximum':0x32,'description':_0x51c7(0x152)},'keyword':{'type':_0x51c7(0x143),'description':_0x51c7(0x13f)}},'required':[]},'handler':_0x1cfba2['queryPreArrivalOrdersHandler'],'requiredScopes':[_0x51c7(0x115)]},{'name':_0x51c7(0x147),'description':_0x51c7(0x10e),'inputSchema':{'type':'object','properties':{'pageNum':{'type':'number','default':0x1,'minimum':0x1,'description':_0x51c7(0x12e)},'pageSize':{'type':_0x51c7(0x14d),'default':0xa,'minimum':0x1,'maximum':0x32,'description':_0x51c7(0x152)},'keyword':{'type':_0x51c7(0x143),'description':_0x51c7(0x13f)}},'required':[]},'handler':_0x1cfba2[_0x51c7(0x158)],'requiredScopes':[_0x51c7(0x115)]},{'name':_0x51c7(0x155),'description':_0x51c7(0x128),'inputSchema':{'type':_0x51c7(0x14b),'properties':{'pageNum':{'type':'number','default':0x1,'minimum':0x1,'description':_0x51c7(0x12e)},'pageSize':{'type':_0x51c7(0x14d),'default':0xa,'minimum':0x1,'maximum':0x32,'description':_0x51c7(0x152)},'keyword':{'type':_0x51c7(0x143),'description':_0x51c7(0x13f)}},'required':[]},'handler':_0x1cfba2[_0x51c7(0x13d)],'requiredScopes':[_0x51c7(0x115)]},{'name':_0x51c7(0x14c),'description':_0x51c7(0x120),'inputSchema':{'type':'object','properties':{'startDate':{'type':_0x51c7(0x143),'description':_0x51c7(0x156)},'endDate':{'type':_0x51c7(0x143),'description':_0x51c7(0x129)},'timeRange':{'type':_0x51c7(0x143),'enum':[_0x51c7(0x145),_0x51c7(0x150)],'description':_0x51c7(0x159)},'date':{'type':_0x51c7(0x143),'format':'date','description':'与\x20timeRange\x20联用时为锚定日(默认上海当天)'},'pageNum':{'type':'number','default':0x1,'minimum':0x1,'description':_0x51c7(0x12e)},'pageSize':{'type':_0x51c7(0x14d),'default':0xa,'minimum':0x1,'maximum':0x32,'description':_0x51c7(0x152)}},'required':[]},'handler':_0x1cfba2[_0x51c7(0x14f)],'requiredScopes':['orders:read']},{'name':'get_order_details_v2','description':_0x51c7(0x121),'inputSchema':{'type':_0x51c7(0x14b),'properties':{'orderId':{'type':_0x51c7(0x143),'description':_0x51c7(0x137)}},'required':['orderId']},'handler':_0x1cfba2[_0x51c7(0x135)],'requiredScopes':['orders:read']},{'name':_0x51c7(0x10b),'description':'查询运营数据:夜审分页、首页实时、经营分析(含入住率\x20OCC、ADR、RevPAR\x20等)。「本周」「本周入住率」「本周经营」「上周收入」等必须按自然周传参:优先传\x20timeRange\x20为\x20this_week\x20或\x20last_week(周一~周日,上海时区);或显式传\x20startDate、endDate\x20为当周起止日。勿仅用单日\x20date\x20代替「本周」——否则经营分析区间错误。单日查询可只传\x20date(或\x20startDate=endDate=同一天)。支持关键词:当前运营情况、今天数据、数据、经营情况、运营数据、本周入住率、本周经营、上周数据等。若可呈现可视化表格则使用表格呈现','inputSchema':{'type':_0x51c7(0x14b),'properties':{'date':{'type':_0x51c7(0x143),'format':_0x51c7(0x114),'description':'锚定日期\x20YYYY-MM-DD:单日统计时即业务日;与\x20timeRange\x20联用时表示「以该日所在周」为本周/上周(默认不传则为上海当天)'},'startDate':{'type':_0x51c7(0x143),'format':_0x51c7(0x114),'description':_0x51c7(0x109)},'endDate':{'type':'string','format':'date','description':_0x51c7(0x131)},'timeRange':{'type':_0x51c7(0x143),'enum':[_0x51c7(0x145),_0x51c7(0x150)],'description':_0x51c7(0x15d)}},'required':[]},'handler':_0x21b321[_0x51c7(0x119)],'requiredScopes':[_0x51c7(0x117)]}];function overseasWriteTools(_0x1ef50b){const _0x1fb7b1=_0x1ef50b['locale'];return[{'name':_0x51c7(0x123),'description':getOverseasToolDescription(_0x51c7(0x123),_0x1fb7b1)||_0x51c7(0x10f),'inputSchema':{'type':_0x51c7(0x14b),'properties':{'orderDetailIds':{'type':_0x51c7(0x151),'items':{'type':_0x51c7(0x143)},'description':_0x51c7(0x125)},'orderId':{'type':_0x51c7(0x143),'description':_0x51c7(0x13a)},'confirm':{'type':_0x51c7(0x124),'description':_0x51c7(0x142)}},'required':[_0x51c7(0x134)]},'handler':async(_0x12881e,_0x35a03c)=>{try{return _0x35a03c[_0x51c7(0x12d)][_0x51c7(0x110)](_0x51c7(0x123),[_0x51c7(0x108)]),await _0x5dd928[_0x51c7(0x10c)](_0x12881e,_0x35a03c);}catch(_0xe5a1de){return handleToolError(_0xe5a1de,_0x35a03c);}},'requiredScopes':[_0x51c7(0x108)]},{'name':_0x51c7(0x130),'description':getOverseasToolDescription(_0x51c7(0x130),_0x1fb7b1)||_0x51c7(0x149),'inputSchema':{'type':_0x51c7(0x14b),'properties':{'orderDetailIds':{'type':'array','items':{'type':_0x51c7(0x143)},'description':_0x51c7(0x107)},'orderId':{'type':_0x51c7(0x143),'description':_0x51c7(0x13a)},'confirm':{'type':_0x51c7(0x124),'description':'Execute\x20only\x20after\x20the\x20human\x20confirms\x20this\x20exact\x20booking\x20(guest\x20+\x20dates).\x20Omit\x20to\x20preview.\x20Never\x20true\x20on\x20the\x20first\x20lookup.'}},'required':[_0x51c7(0x134)]},'handler':async(_0x13f77b,_0x5bbc60)=>{try{return _0x5bbc60[_0x51c7(0x12d)][_0x51c7(0x110)](_0x51c7(0x130),[_0x51c7(0x108)]),await _0x5dd928[_0x51c7(0x141)](_0x13f77b,_0x5bbc60);}catch(_0x51af39){return handleToolError(_0x51af39,_0x5bbc60);}},'requiredScopes':[_0x51c7(0x108)]},{'name':'extend_order','description':getOverseasToolDescription(_0x51c7(0x13e),_0x1fb7b1)||_0x51c7(0x12f),'inputSchema':{'type':'object','properties':{'previousOrderId':{'type':_0x51c7(0x143),'description':_0x51c7(0x127)},'nights':{'type':_0x51c7(0x14d),'minimum':0x1,'description':_0x51c7(0x146)},'roomId':{'type':_0x51c7(0x143),'description':'Room\x20ID\x20for\x20the\x20extension'},'paid':{'type':'number','description':'Optional\x20amount\x20already\x20paid,\x20in\x20fen'},'calcPayout':{'type':_0x51c7(0x124),'description':'If\x20true,\x20or\x20if\x20paid\x20is\x20omitted,\x20preview\x20calls\x20/bnbOrder/calcPayout.\x20Set\x20false\x20to\x20skip\x20quoting.'},'confirm':{'type':_0x51c7(0x124),'description':_0x51c7(0x142)}},'required':['previousOrderId','nights',_0x51c7(0x148)]},'handler':async(_0x410522,_0xe4a068)=>{try{return _0xe4a068['permissionChecker'][_0x51c7(0x110)](_0x51c7(0x13e),['orders:write']),await _0x5dd928[_0x51c7(0x118)](_0x410522,_0xe4a068);}catch(_0x429b9c){return handleToolError(_0x429b9c,_0xe4a068);}},'requiredScopes':['orders:write']},{'name':_0x51c7(0x11c),'description':getOverseasToolDescription(_0x51c7(0x11c),_0x1fb7b1)||_0x51c7(0x126),'inputSchema':{'type':_0x51c7(0x14b),'properties':{'orderDetailId':{'type':'string','description':_0x51c7(0x140)},'roomId':{'type':'string','description':_0x51c7(0x116)},'orderId':{'type':_0x51c7(0x143),'description':_0x51c7(0x13a)},'confirm':{'type':_0x51c7(0x124),'description':_0x51c7(0x142)}},'required':[_0x51c7(0x11b),_0x51c7(0x148)]},'handler':async(_0x264309,_0x55fa6c)=>{try{return _0x55fa6c['permissionChecker'][_0x51c7(0x110)](_0x51c7(0x11c),[_0x51c7(0x108)]),await _0x5dd928['arrangeRoomOverseas'](_0x264309,_0x55fa6c);}catch(_0x293a2b){return handleToolError(_0x293a2b,_0x55fa6c);}},'requiredScopes':['orders:write']}];}export function getActiveToolDefinitions(_0x4c7d77){if(_0x4c7d77[_0x51c7(0x154)]!=='overseas')return toolDefinitions;const _0xa86fb1=toolDefinitions['map'](_0x51950a=>{const _0x42319c=getOverseasToolDescription(_0x51950a['name'],_0x4c7d77['locale']);return _0x42319c?{..._0x51950a,'description':_0x42319c}:_0x51950a;});return[..._0xa86fb1,...overseasWriteTools(_0x4c7d77)];}
1
+ (function(_0xd3e957,_0x853fb5){const _0xb95170=_0xd3e957();while(!![]){try{const _0x184626=-parseInt(_0x227e(0xe8))/0x1*(-parseInt(_0x227e(0xdf))/0x2)+-parseInt(_0x227e(0xdc))/0x3*(parseInt(_0x227e(0xe2))/0x4)+-parseInt(_0x227e(0xd5))/0x5+parseInt(_0x227e(0x9c))/0x6+-parseInt(_0x227e(0xc9))/0x7+parseInt(_0x227e(0xc1))/0x8*(parseInt(_0x227e(0xbf))/0x9)+parseInt(_0x227e(0xc2))/0xa;if(_0x184626===_0x853fb5)break;else _0xb95170['push'](_0xb95170['shift']());}catch(_0x3f257f){_0xb95170['push'](_0xb95170['shift']());}}}(_0x5e71,0x5e813));import*as _0x5d1855 from'../tools/rooms/index.js';import*as _0x5ee175 from'../tools/orders/index.js';import*as _0x583227 from'../tools/finance/index.js';import{getOverseasToolDescription}from'../region/index.js';import*as _0x1fd529 from'../tools/overseas/writes.js';import{getAuthToolDefinitions}from'../tools/auth/onboarding.js';function _0x227e(_0x42b3ae,_0x124133){const _0x5e71f2=_0x5e71();return _0x227e=function(_0x227e76,_0x28daea){_0x227e76=_0x227e76-0x8f;let _0x4b26f8=_0x5e71f2[_0x227e76];return _0x4b26f8;},_0x227e(_0x42b3ae,_0x124133);}import{getHandshakeToolDefinitions}from'../tools/auth/handshake.js';import{getOverseasOperationTools}from'../tools/overseas/operationTools.js';import{handleToolError}from'../utils/errorHandler.js';function _0x5e71(){const _0x2699c5=['extend_order','页码,默认1','1705291cNhjyj','锚定日期\x20YYYY-MM-DD:单日统计时即业务日;与\x20timeRange\x20联用时表示「以该日所在周」为本周/上周(默认不传则为上海当天)','rooms:read','query_today_orders','Stay\x20detail\x20IDs\x20to\x20check\x20out','查询开始日期\x20YYYY-MM-DD;与\x20endDate\x20配对','查询房价(渠道\x20RP、可配置天数价格)。用户说「本周房价」「上周房价」时必须传\x20timeRange=this_week\x20或\x20last_week(自然周周一至周日,上海时区),不要用「近7天」或默认\x20days=7\x20代替「本周」——否则日期区间错误。用户只说「近一周」「最近7天」且无「本周」字样时,可用\x20date+days(默认从当天起\x207\x20天)。支持关键词:查看房态日历价、房态日历价、日历价、房价、近期房价、本月房间、XXX天房价、今日房价查询、房价查询','overseas','checkPermission','region','get_order_details_v2','订单查询(日期范围事件)。支持按\x20startDate/endDate\x20或\x20timeRange(this_week/last_week)\x20查询,不与今日订单/预抵/在住/预离混用。支持关键词:订单查询、查询订单、某时间段订单。','3658655VcgZUu','日期,格式:YYYY-MM-DD,默认为当天','permissionChecker','number','roomId','从\x20date\x20起连续天数;与\x20timeRange\x20互斥(传\x20timeRange\x20时固定为自然周\x207\x20天)','query_room_status_new','38013AkphEA','date','自定义统计区间终点,需与\x20startDate\x20同时传','2XvzULo','模糊搜索:房源编码、房源简称、房源名称(可选)','查询运营数据:夜审分页、首页实时、经营分析(含入住率\x20OCC、ADR、RevPAR\x20等)。「本周」「本周入住率」「本周经营」「上周收入」等必须按自然周传参:优先传\x20timeRange\x20为\x20this_week\x20或\x20last_week(周一~周日,上海时区);或显式传\x20startDate、endDate\x20为当周起止日。勿仅用单日\x20date\x20代替「本周」——否则经营分析区间错误。单日查询可只传\x20date(或\x20startDate=endDate=同一天)。支持关键词:当前运营情况、今天数据、数据、经营情况、运营数据、本周入住率、本周经营、上周数据等。若可呈现可视化表格则使用表格呈现','116mljWFy','查询结束日期\x20YYYY-MM-DD;与\x20startDate\x20配对','query_orders_by_date_range','今日订单(聚合事件):同时查询预抵(orderType=11)、在住(orderType=10)、预离(orderType=12)三组,并分别返回总数与明细。支持关键词:订单、今日订单情况、待办事项、待办、今日待办、待处理订单情况、订单情况。','按房型日历查询房态、可售与库存等(新接口)。与「房价/渠道价」无关:用户说「查看房态日历价」「房态日历价」指近期/渠道房价时,必须调用\x20query_room_prices,勿选本工具。用户说「本周」「上周」房态日历时必须传\x20timeRange=this_week\x20或\x20last_week(自然周周一至周日,上海时区),勿用「从今天起连续\x2030\x20天」代替本周。','Optional\x20parent\x20order\x20ID\x20for\x20preview','127073MLzJyB','array','Target\x20room\x20ID','string','extendOrderOverseas','object','在住订单(今日已入住)。固定调用\x20/orders/get\x20且\x20orderType=10。支持关键词:在住情况、在住订单、今日在住、今日已入住、已入住、今日在住订单。','query_operational_data_v2','关键字(可选)','boolean','query_today_room_status','queryTodayRoomStatusHandler','查询今日(或指定日)房态汇总:房间状态、库存与保洁等,不含渠道房价。「查看房态日历价」指房价时请用\x20query_room_prices。支持关键词:今日房态、今日房态查询、今日房态统计、今日房态分析、今日房态报表、今日房态展示、今日房态可视化、今日房态仪表盘、今日房态报告、今日房态图表、今日房态表格、房态查询、房态','this_week=本周自然周房价;last_week=上周自然周。与「滚动\x207\x20天」不同','query_pre_departure_orders','2803128zlOIpc','checkInOrderOverseas','name','Execute\x20only\x20after\x20the\x20human\x20confirms\x20this\x20exact\x20booking\x20(guest\x20+\x20dates).\x20Omit\x20to\x20preview.\x20Never\x20true\x20on\x20the\x20first\x20lookup.','check_in_order','orderDetailId','Check\x20in\x20a\x20stay','arrange_room','订单ID','queryInHouseOrdersHandler','this_week','getOrderDetailsV2Handler','queryRoomStatusNewHandler','开始日期\x20YYYY-MM-DD,默认当天;与\x20timeRange\x20联用时表示锚定日所在周','map','query_pre_arrival_orders','根据订单ID查询订单详情信息。返回中含客人姓名字段,向用户回复时必须说明客人姓名(不得省略)。支持关键词:XXX订单详情、订单详情、订单详情查询、订单详情统计、订单详情分析、订单详情报表、订单详情展示、订单详情可视化、订单详情仪表盘、订单详情报告、订单详情图表、订单详情表格。用户可先通过今日订单获得订单号再查详情','Assign\x20or\x20change\x20room','orders:read','arrangeRoomOverseas','每页数量,默认15,最大100','queryPreDepartureOrdersHandler','每页数量,默认10','Nights\x20to\x20add\x20(>=1)','与\x20timeRange\x20联用时为锚定日(默认上海当天)','finance:read','orderId','check_out_order','queryRoomPricesHandler','this_week=本周自然周;last_week=上周自然周。与仅按天数的「近30天」不同','orderDetailIds','last_week','queryTodayOrdersHandler','orders:write','If\x20true,\x20or\x20if\x20paid\x20is\x20omitted,\x20preview\x20calls\x20/bnbOrder/calcPayout.\x20Set\x20false\x20to\x20skip\x20quoting.','1362726QkJSYO','Check\x20out\x20a\x20stay','24azpMnx','6813910qMvzLB','自定义统计区间起点,需与\x20endDate\x20同时传','Stay\x20detail\x20ID','this_week=锚定日所在自然周(周一至周日);last_week=上一完整自然周。与\x20startDate/endDate\x20二选一','locale'];_0x5e71=function(){return _0x2699c5;};return _0x5e71();}export const toolDefinitions=[{'name':_0x227e(0xdb),'description':_0x227e(0xe6),'inputSchema':{'type':'object','properties':{'date':{'type':'string','format':'date','description':'开始日期,格式:YYYY-MM-DD,默认为当天;与\x20timeRange\x20联用时表示锚定日所在周'},'days':{'type':_0x227e(0xd8),'default':0x1e,'minimum':0x1,'description':'查询天数,默认30天;与\x20timeRange\x20互斥(传\x20timeRange\x20时固定为自然周\x207\x20天)'},'timeRange':{'type':'string','enum':['this_week',_0x227e(0xbb)],'description':_0x227e(0xb9)},'roomCategoryIds':{'type':'array','items':{'type':_0x227e(0xd8)},'description':'房源类型ID列表(可选)'},'roomCategoryGroupIds':{'type':_0x227e(0xe9),'items':{'type':_0x227e(0xd8)},'description':'房源分组ID列表(可选)'},'channelIds':{'type':'array','items':{'type':_0x227e(0xd8)},'description':'渠道ID列表(可选)'},'searchKey':{'type':_0x227e(0x90),'description':_0x227e(0xe0)},'pageNum':{'type':'number','default':0x1,'minimum':0x1,'description':_0x227e(0xc8)},'pageSize':{'type':_0x227e(0xd8),'default':0xf,'minimum':0x1,'maximum':0x64,'description':_0x227e(0xb0)}},'required':[]},'handler':_0x5d1855[_0x227e(0xa8)],'requiredScopes':[_0x227e(0xcb)]},{'name':_0x227e(0x97),'description':_0x227e(0x99),'inputSchema':{'type':_0x227e(0x92),'properties':{'date':{'type':_0x227e(0x90),'format':_0x227e(0xdd),'description':_0x227e(0xd6)}},'required':[]},'handler':_0x5d1855[_0x227e(0x98)],'requiredScopes':[_0x227e(0xcb)]},{'name':'query_room_prices','description':_0x227e(0xcf),'inputSchema':{'type':'object','properties':{'date':{'type':_0x227e(0x90),'format':_0x227e(0xdd),'description':_0x227e(0xa9)},'days':{'type':_0x227e(0xd8),'default':0x7,'minimum':0x1,'maximum':0x1e,'description':_0x227e(0xda)},'timeRange':{'type':_0x227e(0x90),'enum':[_0x227e(0xa6),_0x227e(0xbb)],'description':_0x227e(0x9a)}},'required':[]},'handler':_0x5d1855[_0x227e(0xb8)],'requiredScopes':[_0x227e(0xcb)]},{'name':_0x227e(0xcc),'description':_0x227e(0xe5),'inputSchema':{'type':_0x227e(0x92),'properties':{'pageNum':{'type':_0x227e(0xd8),'default':0x1,'minimum':0x1,'description':_0x227e(0xc8)},'pageSize':{'type':'number','default':0xa,'minimum':0x1,'maximum':0x32,'description':_0x227e(0xb2)},'keyword':{'type':_0x227e(0x90),'description':'关键字(可选)'}},'required':[]},'handler':_0x5ee175[_0x227e(0xbc)],'requiredScopes':[_0x227e(0xae)]},{'name':_0x227e(0xab),'description':'预抵订单(今日待入住)。固定调用\x20/orders/get\x20且\x20orderType=11。支持关键词:预抵、预抵订单、今日待入住、今日预订订单、今天待入住、剩余待入住、今日预抵。','inputSchema':{'type':_0x227e(0x92),'properties':{'pageNum':{'type':'number','default':0x1,'minimum':0x1,'description':'页码,默认1'},'pageSize':{'type':'number','default':0xa,'minimum':0x1,'maximum':0x32,'description':_0x227e(0xb2)},'keyword':{'type':_0x227e(0x90),'description':_0x227e(0x95)}},'required':[]},'handler':_0x5ee175['queryPreArrivalOrdersHandler'],'requiredScopes':[_0x227e(0xae)]},{'name':'query_in_house_orders','description':_0x227e(0x93),'inputSchema':{'type':_0x227e(0x92),'properties':{'pageNum':{'type':'number','default':0x1,'minimum':0x1,'description':_0x227e(0xc8)},'pageSize':{'type':_0x227e(0xd8),'default':0xa,'minimum':0x1,'maximum':0x32,'description':_0x227e(0xb2)},'keyword':{'type':'string','description':_0x227e(0x95)}},'required':[]},'handler':_0x5ee175[_0x227e(0xa5)],'requiredScopes':[_0x227e(0xae)]},{'name':_0x227e(0x9b),'description':'预离订单(今日待退房)。固定调用\x20/orders/get\x20且\x20orderType=12。支持关键词:预离、预离订单、今日待退房、今日预离订单、今天待退房、剩余待退房、今日预离。','inputSchema':{'type':'object','properties':{'pageNum':{'type':_0x227e(0xd8),'default':0x1,'minimum':0x1,'description':_0x227e(0xc8)},'pageSize':{'type':_0x227e(0xd8),'default':0xa,'minimum':0x1,'maximum':0x32,'description':_0x227e(0xb2)},'keyword':{'type':_0x227e(0x90),'description':_0x227e(0x95)}},'required':[]},'handler':_0x5ee175[_0x227e(0xb1)],'requiredScopes':[_0x227e(0xae)]},{'name':_0x227e(0xe4),'description':_0x227e(0xd4),'inputSchema':{'type':_0x227e(0x92),'properties':{'startDate':{'type':_0x227e(0x90),'description':_0x227e(0xce)},'endDate':{'type':_0x227e(0x90),'description':_0x227e(0xe3)},'timeRange':{'type':_0x227e(0x90),'enum':['this_week',_0x227e(0xbb)],'description':'this_week=本周自然周;last_week=上周自然周。与\x20startDate/endDate\x20二选一'},'date':{'type':'string','format':'date','description':_0x227e(0xb4)},'pageNum':{'type':'number','default':0x1,'minimum':0x1,'description':'页码,默认1'},'pageSize':{'type':_0x227e(0xd8),'default':0xa,'minimum':0x1,'maximum':0x32,'description':'每页数量,默认10'}},'required':[]},'handler':_0x5ee175['queryOrdersByDateRangeHandler'],'requiredScopes':[_0x227e(0xae)]},{'name':_0x227e(0xd3),'description':_0x227e(0xac),'inputSchema':{'type':_0x227e(0x92),'properties':{'orderId':{'type':_0x227e(0x90),'description':_0x227e(0xa4)}},'required':[_0x227e(0xb6)]},'handler':_0x5ee175[_0x227e(0xa7)],'requiredScopes':['orders:read']},{'name':_0x227e(0x94),'description':_0x227e(0xe1),'inputSchema':{'type':_0x227e(0x92),'properties':{'date':{'type':_0x227e(0x90),'format':_0x227e(0xdd),'description':_0x227e(0xca)},'startDate':{'type':'string','format':'date','description':_0x227e(0xc3)},'endDate':{'type':_0x227e(0x90),'format':_0x227e(0xdd),'description':_0x227e(0xde)},'timeRange':{'type':_0x227e(0x90),'enum':['this_week',_0x227e(0xbb)],'description':_0x227e(0xc5)}},'required':[]},'handler':_0x583227['queryOperationalDataV2Handler'],'requiredScopes':[_0x227e(0xb5)]}];function overseasWriteTools(_0x283a26){const _0x15b953=_0x283a26[_0x227e(0xc6)];return[{'name':_0x227e(0xa0),'description':getOverseasToolDescription('check_in_order',_0x15b953)||_0x227e(0xa2),'inputSchema':{'type':_0x227e(0x92),'properties':{'orderDetailIds':{'type':_0x227e(0xe9),'items':{'type':_0x227e(0x90)},'description':'Stay\x20detail\x20IDs\x20to\x20check\x20in'},'orderId':{'type':_0x227e(0x90),'description':'Optional\x20parent\x20order\x20ID\x20for\x20preview'},'confirm':{'type':_0x227e(0x96),'description':_0x227e(0x9f)}},'required':[_0x227e(0xba)]},'handler':async(_0x478e51,_0x54ad7f)=>{try{return _0x54ad7f['permissionChecker'][_0x227e(0xd1)](_0x227e(0xa0),[_0x227e(0xbd)]),await _0x1fd529[_0x227e(0x9d)](_0x478e51,_0x54ad7f);}catch(_0x4df208){return handleToolError(_0x4df208,_0x54ad7f);}},'requiredScopes':[_0x227e(0xbd)]},{'name':'check_out_order','description':getOverseasToolDescription(_0x227e(0xb7),_0x15b953)||_0x227e(0xc0),'inputSchema':{'type':_0x227e(0x92),'properties':{'orderDetailIds':{'type':_0x227e(0xe9),'items':{'type':'string'},'description':_0x227e(0xcd)},'orderId':{'type':_0x227e(0x90),'description':'Optional\x20parent\x20order\x20ID\x20for\x20preview'},'confirm':{'type':_0x227e(0x96),'description':_0x227e(0x9f)}},'required':[_0x227e(0xba)]},'handler':async(_0x324fc9,_0x286eba)=>{try{return _0x286eba[_0x227e(0xd7)]['checkPermission'](_0x227e(0xb7),[_0x227e(0xbd)]),await _0x1fd529['checkOutOrderOverseas'](_0x324fc9,_0x286eba);}catch(_0x48f8d9){return handleToolError(_0x48f8d9,_0x286eba);}},'requiredScopes':[_0x227e(0xbd)]},{'name':_0x227e(0xc7),'description':getOverseasToolDescription(_0x227e(0xc7),_0x15b953)||'Extend\x20a\x20stay','inputSchema':{'type':_0x227e(0x92),'properties':{'previousOrderId':{'type':'string','description':'Current\x20order\x20ID\x20to\x20extend'},'nights':{'type':_0x227e(0xd8),'minimum':0x1,'description':_0x227e(0xb3)},'roomId':{'type':_0x227e(0x90),'description':'Room\x20ID\x20for\x20the\x20extension'},'paid':{'type':_0x227e(0xd8),'description':'Optional\x20amount\x20already\x20paid,\x20in\x20fen'},'calcPayout':{'type':_0x227e(0x96),'description':_0x227e(0xbe)},'confirm':{'type':_0x227e(0x96),'description':'Execute\x20only\x20after\x20the\x20human\x20confirms\x20this\x20exact\x20booking\x20(guest\x20+\x20dates).\x20Omit\x20to\x20preview.\x20Never\x20true\x20on\x20the\x20first\x20lookup.'}},'required':['previousOrderId','nights',_0x227e(0xd9)]},'handler':async(_0x336fbc,_0x36cc84)=>{try{return _0x36cc84[_0x227e(0xd7)]['checkPermission'](_0x227e(0xc7),['orders:write']),await _0x1fd529[_0x227e(0x91)](_0x336fbc,_0x36cc84);}catch(_0x24bf2d){return handleToolError(_0x24bf2d,_0x36cc84);}},'requiredScopes':['orders:write']},{'name':_0x227e(0xa3),'description':getOverseasToolDescription(_0x227e(0xa3),_0x15b953)||_0x227e(0xad),'inputSchema':{'type':_0x227e(0x92),'properties':{'orderDetailId':{'type':'string','description':_0x227e(0xc4)},'roomId':{'type':_0x227e(0x90),'description':_0x227e(0x8f)},'orderId':{'type':_0x227e(0x90),'description':_0x227e(0xe7)},'confirm':{'type':_0x227e(0x96),'description':_0x227e(0x9f)}},'required':[_0x227e(0xa1),'roomId']},'handler':async(_0x41f11e,_0xd95960)=>{try{return _0xd95960[_0x227e(0xd7)]['checkPermission'](_0x227e(0xa3),['orders:write']),await _0x1fd529[_0x227e(0xaf)](_0x41f11e,_0xd95960);}catch(_0x53836f){return handleToolError(_0x53836f,_0xd95960);}},'requiredScopes':[_0x227e(0xbd)]}];}export function getActiveToolDefinitions(_0x136705){const _0x2051f5=getAuthToolDefinitions();if(_0x136705[_0x227e(0xd2)]!==_0x227e(0xd0))return[..._0x2051f5,...toolDefinitions];const _0x282cce=toolDefinitions[_0x227e(0xaa)](_0x5146ab=>{const _0x7e21f9=getOverseasToolDescription(_0x5146ab[_0x227e(0x9e)],_0x136705[_0x227e(0xc6)]);return _0x7e21f9?{..._0x5146ab,'description':_0x7e21f9}:_0x5146ab;});return[..._0x2051f5,..._0x282cce,...overseasWriteTools(_0x136705),...getHandshakeToolDefinitions(),...getOverseasOperationTools()];}
package/dist/index.js CHANGED
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- function _0x3c3f(){const _0x1778b8=['7470NYBcvl','uncaughtException','connect','1329680jPywDI','1869rLZoNR','1688HjLzly','getServer','1624502uVVdjt','933260WWopZf','Fatal\x20error','2dkqSpN','error','27LCPOTb','1393172jIlgHH','exit','Unhandled\x20rejection','3fyCvtk','start','85851eKHCyk','unhandledRejection','info'];_0x3c3f=function(){return _0x1778b8;};return _0x3c3f();}(function(_0x3c4d9a,_0x40df1d){const _0x3638b6=_0x3c4d9a();while(!![]){try{const _0x1280cd=-parseInt(_0x4ead(0x15f))/0x1*(parseInt(_0x4ead(0x157))/0x2)+-parseInt(_0x4ead(0x15d))/0x3*(-parseInt(_0x4ead(0x15a))/0x4)+-parseInt(_0x4ead(0x165))/0x5+-parseInt(_0x4ead(0x162))/0x6+-parseInt(_0x4ead(0x166))/0x7*(-parseInt(_0x4ead(0x167))/0x8)+parseInt(_0x4ead(0x159))/0x9*(parseInt(_0x4ead(0x155))/0xa)+-parseInt(_0x4ead(0x154))/0xb;if(_0x1280cd===_0x40df1d)break;else _0x3638b6['push'](_0x3638b6['shift']());}catch(_0x5bd46c){_0x3638b6['push'](_0x3638b6['shift']());}}}(_0x3c3f,0x2ce56));function _0x4ead(_0x31f6cf,_0x289946){const _0x3c3fb1=_0x3c3f();return _0x4ead=function(_0x4ead64,_0x39c7ba){_0x4ead64=_0x4ead64-0x153;let _0x3f20ae=_0x3c3fb1[_0x4ead64];return _0x3f20ae;},_0x4ead(_0x31f6cf,_0x289946);}import{StdioServerTransport}from'@modelcontextprotocol/sdk/server/stdio.js';import{LukeyunMCPServer}from'./server.js';import{logger}from'./utils/logger.js';async function main(){try{const _0x3a89f5=new LukeyunMCPServer();await _0x3a89f5[_0x4ead(0x15e)]();const _0x310593=new StdioServerTransport();await _0x3a89f5[_0x4ead(0x153)]()[_0x4ead(0x164)](_0x310593),logger[_0x4ead(0x161)]('MCP\x20Server\x20connected\x20via\x20StdIO');}catch(_0x4717ca){logger[_0x4ead(0x158)]('Failed\x20to\x20start\x20MCP\x20Server',_0x4717ca instanceof Error?_0x4717ca:new Error(String(_0x4717ca))),process[_0x4ead(0x15b)](0x1);}}process['on'](_0x4ead(0x163),_0x3522c9=>{logger[_0x4ead(0x158)]('Uncaught\x20exception',_0x3522c9),process[_0x4ead(0x15b)](0x1);}),process['on'](_0x4ead(0x160),_0x93862e=>{logger[_0x4ead(0x158)](_0x4ead(0x15c),new Error(String(_0x93862e))),process[_0x4ead(0x15b)](0x1);}),main()['catch'](_0x2bcefd=>{logger[_0x4ead(0x158)](_0x4ead(0x156),_0x2bcefd instanceof Error?_0x2bcefd:new Error(String(_0x2bcefd))),process['exit'](0x1);});
2
+ function _0x6248(){const _0x256e45=['start','2161071pkrHPf','42YoJQFA','Unhandled\x20rejection','29514kOHXFm','522056ErmvWj','138DXfLiu','48760YzgHuf','uncaughtException','3144gcTPNY','catch','info','Uncaught\x20exception','327276irHLWs','55TBULPG','Fatal\x20error','connect','error','unhandledRejection','16665nbwkot','exit'];_0x6248=function(){return _0x256e45;};return _0x6248();}(function(_0x57f789,_0x549cb2){const _0x4b5931=_0x57f789();while(!![]){try{const _0x1c30f8=parseInt(_0x138a(0x12b))/0x1+-parseInt(_0x138a(0x121))/0x2*(parseInt(_0x138a(0x133))/0x3)+parseInt(_0x138a(0x125))/0x4+-parseInt(_0x138a(0x126))/0x5*(-parseInt(_0x138a(0x131))/0x6)+parseInt(_0x138a(0x12f))/0x7*(parseInt(_0x138a(0x132))/0x8)+-parseInt(_0x138a(0x12e))/0x9+parseInt(_0x138a(0x134))/0xa;if(_0x1c30f8===_0x549cb2)break;else _0x4b5931['push'](_0x4b5931['shift']());}catch(_0x240641){_0x4b5931['push'](_0x4b5931['shift']());}}}(_0x6248,0x39c24));import{StdioServerTransport}from'@modelcontextprotocol/sdk/server/stdio.js';import{LukeyunMCPServer}from'./server.js';import{logger}from'./utils/logger.js';async function main(){try{const _0x226ba1=new LukeyunMCPServer();await _0x226ba1[_0x138a(0x12d)]();const _0x23abb7=new StdioServerTransport();await _0x226ba1['getServer']()[_0x138a(0x128)](_0x23abb7),logger[_0x138a(0x123)]('MCP\x20Server\x20connected\x20via\x20StdIO');}catch(_0x4700dc){logger[_0x138a(0x129)]('Failed\x20to\x20start\x20MCP\x20Server',_0x4700dc instanceof Error?_0x4700dc:new Error(String(_0x4700dc))),process['exit'](0x1);}}function _0x138a(_0x43f1ef,_0x2e3bf7){const _0x6248f7=_0x6248();return _0x138a=function(_0x138a4a,_0x35b85b){_0x138a4a=_0x138a4a-0x120;let _0x2022fe=_0x6248f7[_0x138a4a];return _0x2022fe;},_0x138a(_0x43f1ef,_0x2e3bf7);}process['on'](_0x138a(0x120),_0x19d5de=>{logger[_0x138a(0x129)](_0x138a(0x124),_0x19d5de),process[_0x138a(0x12c)](0x1);}),process['on'](_0x138a(0x12a),_0x1531f0=>{logger[_0x138a(0x129)](_0x138a(0x130),new Error(String(_0x1531f0))),process[_0x138a(0x12c)](0x1);}),main()[_0x138a(0x122)](_0x25682d=>{logger['error'](_0x138a(0x127),_0x25682d instanceof Error?_0x25682d:new Error(String(_0x25682d))),process[_0x138a(0x12c)](0x1);});
package/dist/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "localsbnb-mcp-server",
3
- "version": "1.0.14",
3
+ "version": "1.0.16",
4
4
  "description": "LocalsBnb MCP Server",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",
7
7
  "scripts": {
8
8
  "clean": "node scripts/clean-dist.cjs",
9
- "build": "tsc && cp dist/index.js dist/start.mjs && cp scripts/run-mcp.cjs dist/run.cjs && cp scripts/run-mcp.sh dist/run.sh && cp package.json dist/package.json && chmod +x dist/run.sh dist/start.sh 2>/dev/null || true",
10
- "build:prod": "tsc -p tsconfig.prod.json && cp dist/index.js dist/start.mjs && cp scripts/run-mcp.cjs dist/run.cjs && cp scripts/run-mcp.sh dist/run.sh && cp package.json dist/package.json && node scripts/obfuscate-dist.cjs && chmod +x dist/run.sh 2>/dev/null || true",
9
+ "build": "tsc && cp dist/index.js dist/start.mjs && cp scripts/run-mcp.cjs dist/run.cjs && cp scripts/run-mcp.sh dist/run.sh && cp package.json dist/package.json && chmod +x dist/run.cjs dist/run.sh dist/start.sh 2>/dev/null || true",
10
+ "build:prod": "tsc -p tsconfig.prod.json && cp dist/index.js dist/start.mjs && cp scripts/run-mcp.cjs dist/run.cjs && cp scripts/run-mcp.sh dist/run.sh && cp package.json dist/package.json && node scripts/obfuscate-dist.cjs && chmod +x dist/run.cjs dist/run.sh 2>/dev/null || true",
11
11
  "prebuild": "npm run clean",
12
12
  "prepublishOnly": "npm run clean && npm run build:prod",
13
13
  "dev": "tsx watch src/index.ts",
@@ -61,6 +61,8 @@
61
61
  "files": [
62
62
  "dist",
63
63
  "README.md",
64
- "mcp.sample.json"
64
+ "mcp.sample.json",
65
+ "mcp.bootstrap.sample.json",
66
+ "docs/readme/assets"
65
67
  ]
66
68
  }
@@ -1 +1 @@
1
- (function(_0x193d2d,_0x1d7d98){const _0x2924a5=_0x193d2d();while(!![]){try{const _0x4739f2=-parseInt(_0x19fa(0x1be))/0x1*(parseInt(_0x19fa(0x1c5))/0x2)+-parseInt(_0x19fa(0x1c3))/0x3+-parseInt(_0x19fa(0x1b7))/0x4+parseInt(_0x19fa(0x1bc))/0x5*(-parseInt(_0x19fa(0x1c2))/0x6)+-parseInt(_0x19fa(0x1b9))/0x7*(-parseInt(_0x19fa(0x1ca))/0x8)+parseInt(_0x19fa(0x1c0))/0x9*(-parseInt(_0x19fa(0x1c4))/0xa)+parseInt(_0x19fa(0x1c1))/0xb*(parseInt(_0x19fa(0x1cb))/0xc);if(_0x4739f2===_0x1d7d98)break;else _0x2924a5['push'](_0x2924a5['shift']());}catch(_0x1ce353){_0x2924a5['push'](_0x2924a5['shift']());}}}(_0x4e7c,0x2c3a4));import{assertApiSuccess}from'../utils/errorHandler.js';function _0x4e7c(){const _0x25d005=['367974yXZjGo','12532729Cplojv','6fAvfIV','823671yIxTat','70bNCedg','1334BnjWwz','campId','records','apiClient','object','32DRYEae','12FrKbkD','list','POST','294400xeHQfK','map','467152lnuLsa','total','isArray','1443085VEHxJw','application/json','453YdZVfj','number'];_0x4e7c=function(){return _0x25d005;};return _0x4e7c();}export function requireCampId(_0x594bba){const _0xaa6c8e=_0x594bba[_0x19fa(0x1c6)];if(!_0xaa6c8e)throw new Error('APP_ID\x20not\x20configured.\x20Please\x20set\x20APP_ID\x20environment\x20variable.');return String(_0xaa6c8e);}function _0x19fa(_0x13cae2,_0x2ae962){const _0x4e7c05=_0x4e7c();return _0x19fa=function(_0x19fadd,_0x4b4786){_0x19fadd=_0x19fadd-0x1b7;let _0x2a0af5=_0x4e7c05[_0x19fadd];return _0x2a0af5;},_0x19fa(_0x13cae2,_0x2ae962);}export async function hudsonPost(_0x55328b,_0x5a1398,_0x52995f,_0x346d3e,_0x310c43){const _0x497ee5=await _0x55328b[_0x19fa(0x1c8)]['request']({'method':_0x19fa(0x1cd),'url':_0x5a1398,'headers':{'Content-Type':_0x19fa(0x1bd)},'data':_0x52995f});return assertApiSuccess(_0x497ee5,_0x346d3e,_0x310c43),_0x497ee5['data'];}export function extractPage(_0x16f4d2){if(!_0x16f4d2||typeof _0x16f4d2!==_0x19fa(0x1c9))return{'list':[],'total':0x0};const _0x10ba8b=_0x16f4d2,_0x4d9852=_0x10ba8b[_0x19fa(0x1c7)]??_0x10ba8b[_0x19fa(0x1cc)]??_0x10ba8b['rows']??[],_0x3c45d8=Array[_0x19fa(0x1bb)](_0x4d9852)?_0x4d9852:[],_0x38d04b=Number(_0x10ba8b[_0x19fa(0x1ba)]??_0x3c45d8['length'])||0x0;return{'list':_0x3c45d8,'total':_0x38d04b};}export function toIdList(_0x5cbf5e){if(Array['isArray'](_0x5cbf5e))return _0x5cbf5e[_0x19fa(0x1b8)](_0x2d464f=>typeof _0x2d464f===_0x19fa(0x1bf)?_0x2d464f:String(_0x2d464f));if(_0x5cbf5e==null||_0x5cbf5e==='')return[];return[typeof _0x5cbf5e===_0x19fa(0x1bf)?_0x5cbf5e:String(_0x5cbf5e)];}
1
+ (function(_0x2f85fb,_0x3b36a7){const _0x531bd3=_0x2f85fb();while(!![]){try{const _0x130774=parseInt(_0x1e00(0x103))/0x1+-parseInt(_0x1e00(0x109))/0x2*(-parseInt(_0x1e00(0x104))/0x3)+-parseInt(_0x1e00(0x107))/0x4*(-parseInt(_0x1e00(0x105))/0x5)+parseInt(_0x1e00(0x101))/0x6+parseInt(_0x1e00(0x111))/0x7+-parseInt(_0x1e00(0x102))/0x8+-parseInt(_0x1e00(0xfe))/0x9;if(_0x130774===_0x3b36a7)break;else _0x531bd3['push'](_0x531bd3['shift']());}catch(_0x19ceb5){_0x531bd3['push'](_0x531bd3['shift']());}}}(_0x1cba,0x79eb3));import{assertApiSuccess}from'../utils/errorHandler.js';export function requireCampId(_0x14833e){const _0x363df2=_0x14833e[_0x1e00(0xff)];if(!_0x363df2)throw new Error('APP_ID\x20not\x20configured.\x20Please\x20set\x20APP_ID\x20environment\x20variable.');return String(_0x363df2);}export async function hudsonPost(_0x2424ef,_0x2a6547,_0x45a2e3,_0x422fe6,_0x469ec9){const _0x2799ed=await _0x2424ef[_0x1e00(0x10d)][_0x1e00(0xfd)]({'method':_0x1e00(0x100),'url':_0x2a6547,'headers':{'Content-Type':_0x1e00(0x110)},'data':_0x45a2e3});return assertApiSuccess(_0x2799ed,_0x422fe6,_0x469ec9),_0x2799ed[_0x1e00(0x108)];}export function extractPage(_0x493e36){if(!_0x493e36||typeof _0x493e36!==_0x1e00(0x10e))return{'list':[],'total':0x0};const _0x3b0101=_0x493e36,_0x39b59a=_0x3b0101[_0x1e00(0x10c)]??_0x3b0101[_0x1e00(0x10a)]??_0x3b0101[_0x1e00(0x112)]??[],_0x3c1284=Array[_0x1e00(0x113)](_0x39b59a)?_0x39b59a:[],_0x197898=Number(_0x3b0101[_0x1e00(0x10b)]??_0x3c1284[_0x1e00(0x106)])||0x0;return{'list':_0x3c1284,'total':_0x197898};}function _0x1e00(_0x3760da,_0x27ef7d){const _0x1cba7b=_0x1cba();return _0x1e00=function(_0x1e00cb,_0x59470c){_0x1e00cb=_0x1e00cb-0xfd;let _0x4b40e8=_0x1cba7b[_0x1e00cb];return _0x4b40e8;},_0x1e00(_0x3760da,_0x27ef7d);}export function toIdList(_0x6975cf){if(Array[_0x1e00(0x113)](_0x6975cf))return _0x6975cf['map'](_0x2d1fa8=>typeof _0x2d1fa8===_0x1e00(0x10f)?_0x2d1fa8:String(_0x2d1fa8));if(_0x6975cf==null||_0x6975cf==='')return[];return[typeof _0x6975cf===_0x1e00(0x10f)?_0x6975cf:String(_0x6975cf)];}function _0x1cba(){const _0x302215=['data','394328WGrPVL','list','total','records','apiClient','object','number','application/json','6169240uItBZR','rows','isArray','request','20547927VmoQAb','campId','POST','1715160rgLvjf','4399768ptzfwy','926320XsQUyp','9XeSjxT','3237305wfSlmH','length','4yYtvhr'];_0x1cba=function(){return _0x302215;};return _0x1cba();}