boostedtravel 0.2.4 → 0.2.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,6 +1,8 @@
1
1
  # BoostedTravel — Agent-Native Flight Search & Booking (Node.js)
2
2
 
3
- Search 400+ airlines at raw airline prices — **$20-50 cheaper** than Booking.com, Kayak, and other OTAs. Zero dependencies. Built for autonomous AI agents.
3
+ Search 400+ airlines at raw airline prices — **$20-50 cheaper** than Booking.com, Kayak, and other OTAs. Zero dependencies. Built for autonomous AI agents — works with OpenClaw, Perplexity Computer, Claude, Cursor, Windsurf, and any MCP-compatible client.
4
+
5
+ > 🎥 **[Watch the demo](https://github.com/Boosted-Chat/BoostedTravel#demo-boostedtravel-vs-default-agent-search)** — side-by-side comparison of default agent search vs BoostedTravel CLI.
4
6
 
5
7
  ## Install
6
8
 
@@ -72,10 +74,48 @@ boostedtravel book off_xxx -p '{"id":"pas_xxx","given_name":"John",...}' -e john
72
74
  - `offerSummary(offer)` — One-line string summary
73
75
  - `cheapestOffer(result)` — Get cheapest offer from search
74
76
 
77
+ ### `searchLocal(origin, destination, dateFrom, options?)`
78
+
79
+ Search 75 airline connectors locally (no API key needed). Requires Python + `boostedtravel` installed.
80
+
81
+ ```typescript
82
+ import { searchLocal } from 'boostedtravel';
83
+
84
+ const result = await searchLocal('GDN', 'BCN', '2026-06-15');
85
+ console.log(result.total_results);
86
+
87
+ // Limit browser concurrency for constrained environments
88
+ const result2 = await searchLocal('GDN', 'BCN', '2026-06-15', { maxBrowsers: 4 });
89
+ ```
90
+
91
+ ### `systemInfo()`
92
+
93
+ Get system resource profile and recommended concurrency settings.
94
+
95
+ ```typescript
96
+ import { systemInfo } from 'boostedtravel';
97
+
98
+ const info = await systemInfo();
99
+ console.log(info);
100
+ // { platform: 'win32', cpu_cores: 16, ram_total_gb: 31.2, ram_available_gb: 14.7,
101
+ // tier: 'standard', recommended_max_browsers: 8, current_max_browsers: 8 }
102
+ ```
103
+
75
104
  ## Zero Dependencies
76
105
 
77
106
  Uses native `fetch` (Node 18+). No `axios`, no `node-fetch`, nothing. Safe for sandboxed environments.
78
107
 
108
+ ## Performance Tuning
109
+
110
+ Local search auto-scales browser concurrency based on available RAM. Override with `maxBrowsers`:
111
+
112
+ ```typescript
113
+ // Limit to 4 concurrent browsers
114
+ await searchLocal('LHR', 'BCN', '2026-04-15', { maxBrowsers: 4 });
115
+ ```
116
+
117
+ Or set the `BOOSTEDTRAVEL_MAX_BROWSERS` environment variable globally.
118
+
79
119
  ## License
80
120
 
81
121
  MIT
@@ -137,7 +137,8 @@ async function searchLocal(origin, destination, dateFrom, options = {}) {
137
137
  currency: options.currency ?? "EUR",
138
138
  limit: options.limit ?? 50,
139
139
  return_date: options.returnDate,
140
- cabin_class: options.cabinClass
140
+ cabin_class: options.cabinClass,
141
+ ...options.maxBrowsers != null && { max_browsers: options.maxBrowsers }
141
142
  });
142
143
  return new Promise((resolve, reject) => {
143
144
  const pythonCmd = process.platform === "win32" ? "python" : "python3";
@@ -334,6 +335,42 @@ var BoostedTravel = class {
334
335
  }
335
336
  }
336
337
  };
338
+ async function systemInfo() {
339
+ const { spawn } = await import("child_process");
340
+ return new Promise((resolve, reject) => {
341
+ const pythonCmd = process.platform === "win32" ? "python" : "python3";
342
+ const child = spawn(pythonCmd, ["-m", "boostedtravel.local"], {
343
+ stdio: ["pipe", "pipe", "pipe"]
344
+ });
345
+ let stdout = "";
346
+ let stderr = "";
347
+ child.stdout.on("data", (d) => {
348
+ stdout += d.toString();
349
+ });
350
+ child.stderr.on("data", (d) => {
351
+ stderr += d.toString();
352
+ });
353
+ child.on("close", (code) => {
354
+ try {
355
+ const data = JSON.parse(stdout);
356
+ if (data.error) reject(new BoostedTravelError(data.error));
357
+ else resolve(data);
358
+ } catch {
359
+ reject(new BoostedTravelError(
360
+ `Python system-info failed (code ${code}): ${stdout || stderr}`
361
+ ));
362
+ }
363
+ });
364
+ child.on("error", (err) => {
365
+ reject(new BoostedTravelError(
366
+ `Cannot start Python: ${err.message}
367
+ Install: pip install boostedtravel`
368
+ ));
369
+ });
370
+ child.stdin.write(JSON.stringify({ __system_info: true }));
371
+ child.stdin.end();
372
+ });
373
+ }
337
374
  var index_default = BoostedTravel;
338
375
 
339
376
  export {
@@ -348,5 +385,6 @@ export {
348
385
  cheapestOffer,
349
386
  searchLocal,
350
387
  BoostedTravel,
388
+ systemInfo,
351
389
  index_default
352
390
  };
package/dist/cli.mjs CHANGED
@@ -3,7 +3,7 @@ import {
3
3
  BoostedTravel,
4
4
  BoostedTravelError,
5
5
  offerSummary
6
- } from "./chunk-RJB7OAS2.mjs";
6
+ } from "./chunk-UY6AN74O.mjs";
7
7
 
8
8
  // src/cli.ts
9
9
  function getFlag(args, flag, alias) {
package/dist/index.d.mts CHANGED
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * BoostedTravel — Agent-native flight search & booking SDK for Node.js/TypeScript.
3
3
  *
4
- * 53 airline connectors run locally via Python + backend API for enterprise GDS/NDC sources.
4
+ * 75 airline connectors run locally via Python + backend API for enterprise GDS/NDC sources.
5
5
  * Zero external JS dependencies. Uses native fetch (Node 18+).
6
6
  *
7
7
  * @example
@@ -112,6 +112,24 @@ interface SearchOptions {
112
112
  currency?: string;
113
113
  limit?: number;
114
114
  sort?: 'price' | 'duration';
115
+ /** Max concurrent browser instances (1-32). Omit for auto-detect based on system RAM. */
116
+ maxBrowsers?: number;
117
+ }
118
+ interface CheckoutProgress {
119
+ status: string;
120
+ step: string;
121
+ step_index: number;
122
+ airline: string;
123
+ source: string;
124
+ offer_id: string;
125
+ total_price: number;
126
+ currency: string;
127
+ booking_url: string;
128
+ screenshot_b64: string;
129
+ message: string;
130
+ can_complete_manually: boolean;
131
+ elapsed_seconds: number;
132
+ details: Record<string, unknown>;
115
133
  }
116
134
  interface BoostedTravelConfig {
117
135
  apiKey?: string;
@@ -170,7 +188,7 @@ declare function offerSummary(offer: FlightOffer): string;
170
188
  /** Get cheapest offer from search results */
171
189
  declare function cheapestOffer(result: FlightSearchResult): FlightOffer | null;
172
190
  /**
173
- * Search flights using 53 local airline connectors — FREE, no API key needed.
191
+ * Search flights using 73 local airline connectors — FREE, no API key needed.
174
192
  *
175
193
  * Requires: pip install boostedtravel && playwright install chromium
176
194
  *
@@ -227,5 +245,10 @@ declare class BoostedTravel {
227
245
  private get;
228
246
  private request;
229
247
  }
248
+ /**
249
+ * Get system resource profile and recommended concurrency settings.
250
+ * Calls the Python backend's system-info detection.
251
+ */
252
+ declare function systemInfo(): Promise<Record<string, unknown>>;
230
253
 
231
- export { AuthenticationError, type BookingResult, BoostedTravel, type BoostedTravelConfig, BoostedTravelError, ErrorCategory, type ErrorCategoryType, ErrorCode, type ErrorCodeType, type FlightOffer, type FlightRoute, type FlightSearchResult, type FlightSegment, OfferExpiredError, type Passenger, PaymentRequiredError, type SearchOptions, type UnlockResult, ValidationError, cheapestOffer, BoostedTravel as default, searchLocal as localSearch, offerSummary, searchLocal };
254
+ export { AuthenticationError, type BookingResult, BoostedTravel, type BoostedTravelConfig, BoostedTravelError, type CheckoutProgress, ErrorCategory, type ErrorCategoryType, ErrorCode, type ErrorCodeType, type FlightOffer, type FlightRoute, type FlightSearchResult, type FlightSegment, OfferExpiredError, type Passenger, PaymentRequiredError, type SearchOptions, type UnlockResult, ValidationError, cheapestOffer, BoostedTravel as default, systemInfo as getSystemInfo, searchLocal as localSearch, offerSummary, searchLocal, systemInfo };
package/dist/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * BoostedTravel — Agent-native flight search & booking SDK for Node.js/TypeScript.
3
3
  *
4
- * 53 airline connectors run locally via Python + backend API for enterprise GDS/NDC sources.
4
+ * 75 airline connectors run locally via Python + backend API for enterprise GDS/NDC sources.
5
5
  * Zero external JS dependencies. Uses native fetch (Node 18+).
6
6
  *
7
7
  * @example
@@ -112,6 +112,24 @@ interface SearchOptions {
112
112
  currency?: string;
113
113
  limit?: number;
114
114
  sort?: 'price' | 'duration';
115
+ /** Max concurrent browser instances (1-32). Omit for auto-detect based on system RAM. */
116
+ maxBrowsers?: number;
117
+ }
118
+ interface CheckoutProgress {
119
+ status: string;
120
+ step: string;
121
+ step_index: number;
122
+ airline: string;
123
+ source: string;
124
+ offer_id: string;
125
+ total_price: number;
126
+ currency: string;
127
+ booking_url: string;
128
+ screenshot_b64: string;
129
+ message: string;
130
+ can_complete_manually: boolean;
131
+ elapsed_seconds: number;
132
+ details: Record<string, unknown>;
115
133
  }
116
134
  interface BoostedTravelConfig {
117
135
  apiKey?: string;
@@ -170,7 +188,7 @@ declare function offerSummary(offer: FlightOffer): string;
170
188
  /** Get cheapest offer from search results */
171
189
  declare function cheapestOffer(result: FlightSearchResult): FlightOffer | null;
172
190
  /**
173
- * Search flights using 53 local airline connectors — FREE, no API key needed.
191
+ * Search flights using 73 local airline connectors — FREE, no API key needed.
174
192
  *
175
193
  * Requires: pip install boostedtravel && playwright install chromium
176
194
  *
@@ -227,5 +245,10 @@ declare class BoostedTravel {
227
245
  private get;
228
246
  private request;
229
247
  }
248
+ /**
249
+ * Get system resource profile and recommended concurrency settings.
250
+ * Calls the Python backend's system-info detection.
251
+ */
252
+ declare function systemInfo(): Promise<Record<string, unknown>>;
230
253
 
231
- export { AuthenticationError, type BookingResult, BoostedTravel, type BoostedTravelConfig, BoostedTravelError, ErrorCategory, type ErrorCategoryType, ErrorCode, type ErrorCodeType, type FlightOffer, type FlightRoute, type FlightSearchResult, type FlightSegment, OfferExpiredError, type Passenger, PaymentRequiredError, type SearchOptions, type UnlockResult, ValidationError, cheapestOffer, BoostedTravel as default, searchLocal as localSearch, offerSummary, searchLocal };
254
+ export { AuthenticationError, type BookingResult, BoostedTravel, type BoostedTravelConfig, BoostedTravelError, type CheckoutProgress, ErrorCategory, type ErrorCategoryType, ErrorCode, type ErrorCodeType, type FlightOffer, type FlightRoute, type FlightSearchResult, type FlightSegment, OfferExpiredError, type Passenger, PaymentRequiredError, type SearchOptions, type UnlockResult, ValidationError, cheapestOffer, BoostedTravel as default, systemInfo as getSystemInfo, searchLocal as localSearch, offerSummary, searchLocal, systemInfo };
package/dist/index.js CHANGED
@@ -40,9 +40,11 @@ __export(index_exports, {
40
40
  ValidationError: () => ValidationError,
41
41
  cheapestOffer: () => cheapestOffer,
42
42
  default: () => index_default,
43
+ getSystemInfo: () => systemInfo,
43
44
  localSearch: () => searchLocal,
44
45
  offerSummary: () => offerSummary,
45
- searchLocal: () => searchLocal
46
+ searchLocal: () => searchLocal,
47
+ systemInfo: () => systemInfo
46
48
  });
47
49
  module.exports = __toCommonJS(index_exports);
48
50
  var ErrorCode = {
@@ -183,7 +185,8 @@ async function searchLocal(origin, destination, dateFrom, options = {}) {
183
185
  currency: options.currency ?? "EUR",
184
186
  limit: options.limit ?? 50,
185
187
  return_date: options.returnDate,
186
- cabin_class: options.cabinClass
188
+ cabin_class: options.cabinClass,
189
+ ...options.maxBrowsers != null && { max_browsers: options.maxBrowsers }
187
190
  });
188
191
  return new Promise((resolve, reject) => {
189
192
  const pythonCmd = process.platform === "win32" ? "python" : "python3";
@@ -380,6 +383,42 @@ var BoostedTravel = class {
380
383
  }
381
384
  }
382
385
  };
386
+ async function systemInfo() {
387
+ const { spawn } = await import("child_process");
388
+ return new Promise((resolve, reject) => {
389
+ const pythonCmd = process.platform === "win32" ? "python" : "python3";
390
+ const child = spawn(pythonCmd, ["-m", "boostedtravel.local"], {
391
+ stdio: ["pipe", "pipe", "pipe"]
392
+ });
393
+ let stdout = "";
394
+ let stderr = "";
395
+ child.stdout.on("data", (d) => {
396
+ stdout += d.toString();
397
+ });
398
+ child.stderr.on("data", (d) => {
399
+ stderr += d.toString();
400
+ });
401
+ child.on("close", (code) => {
402
+ try {
403
+ const data = JSON.parse(stdout);
404
+ if (data.error) reject(new BoostedTravelError(data.error));
405
+ else resolve(data);
406
+ } catch {
407
+ reject(new BoostedTravelError(
408
+ `Python system-info failed (code ${code}): ${stdout || stderr}`
409
+ ));
410
+ }
411
+ });
412
+ child.on("error", (err) => {
413
+ reject(new BoostedTravelError(
414
+ `Cannot start Python: ${err.message}
415
+ Install: pip install boostedtravel`
416
+ ));
417
+ });
418
+ child.stdin.write(JSON.stringify({ __system_info: true }));
419
+ child.stdin.end();
420
+ });
421
+ }
383
422
  var index_default = BoostedTravel;
384
423
  // Annotate the CommonJS export names for ESM import in node:
385
424
  0 && (module.exports = {
@@ -392,7 +431,9 @@ var index_default = BoostedTravel;
392
431
  PaymentRequiredError,
393
432
  ValidationError,
394
433
  cheapestOffer,
434
+ getSystemInfo,
395
435
  localSearch,
396
436
  offerSummary,
397
- searchLocal
437
+ searchLocal,
438
+ systemInfo
398
439
  });
package/dist/index.mjs CHANGED
@@ -10,8 +10,9 @@ import {
10
10
  cheapestOffer,
11
11
  index_default,
12
12
  offerSummary,
13
- searchLocal
14
- } from "./chunk-RJB7OAS2.mjs";
13
+ searchLocal,
14
+ systemInfo
15
+ } from "./chunk-UY6AN74O.mjs";
15
16
  export {
16
17
  AuthenticationError,
17
18
  BoostedTravel,
@@ -23,7 +24,9 @@ export {
23
24
  ValidationError,
24
25
  cheapestOffer,
25
26
  index_default as default,
27
+ systemInfo as getSystemInfo,
26
28
  searchLocal as localSearch,
27
29
  offerSummary,
28
- searchLocal
30
+ searchLocal,
31
+ systemInfo
29
32
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "boostedtravel",
3
- "version": "0.2.4",
4
- "description": "Agent-native flight search & booking. 53 airline connectors run locally + enterprise GDS/NDC APIs. Built for autonomous AI agents.",
3
+ "version": "0.2.5",
4
+ "description": "Agent-native flight search & booking. 75 airline connectors run locally + enterprise GDS/NDC APIs. Built for autonomous AI agents.",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
7
7
  "types": "dist/index.d.ts",
@@ -36,7 +36,7 @@
36
36
  "license": "MIT",
37
37
  "repository": {
38
38
  "type": "git",
39
- "url": "https://github.com/boostedtravel/boostedtravel-js"
39
+ "url": "https://github.com/Boosted-Chat/BoostedTravel.git"
40
40
  },
41
41
  "homepage": "https://boostedchat.com",
42
42
  "devDependencies": {