@fortrip/agent-contract 5.0.0-rc.1 → 5.0.0-rc.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -1336,7 +1336,7 @@ declare const money: z.ZodType<Money>;
1336
1336
  * A Money a caller sends: USD or CNY, no unknown fields. `name` is the field
1337
1337
  * it is the value of, which the refusal names.
1338
1338
  */
1339
- declare function requestMoney(name: string): z.ZodType<Money>;
1339
+ declare function requestMoney(name: string): z.ZodType<Money, Money>;
1340
1340
  declare function formatMoney(m: Money): string;
1341
1341
 
1342
1342
  /** RFC 3339 in UTC, ending in `Z`; names for these fields end in `At`. */
@@ -1469,7 +1469,7 @@ declare function createSearchHotelsInput(now?: () => number): z.ZodObject<{
1469
1469
  other: "other";
1470
1470
  }>>>;
1471
1471
  price: z.ZodOptional<z.ZodObject<{
1472
- maxPerRoomNight: z.ZodType<Money, unknown, z.core.$ZodTypeInternals<Money, unknown>>;
1472
+ maxPerRoomNight: z.ZodType<Money, Money, z.core.$ZodTypeInternals<Money, Money>>;
1473
1473
  }, z.core.$strict>>;
1474
1474
  }, z.core.$strict>>;
1475
1475
  sort: z.ZodOptional<z.ZodEnum<{
@@ -1555,7 +1555,7 @@ declare const searchHotelsInput: z.ZodObject<{
1555
1555
  other: "other";
1556
1556
  }>>>;
1557
1557
  price: z.ZodOptional<z.ZodObject<{
1558
- maxPerRoomNight: z.ZodType<Money, unknown, z.core.$ZodTypeInternals<Money, unknown>>;
1558
+ maxPerRoomNight: z.ZodType<Money, Money, z.core.$ZodTypeInternals<Money, Money>>;
1559
1559
  }, z.core.$strict>>;
1560
1560
  }, z.core.$strict>>;
1561
1561
  sort: z.ZodOptional<z.ZodEnum<{
@@ -1663,7 +1663,7 @@ type ListOrdersInput = z.input<typeof listOrdersInput>;
1663
1663
  * computes the refund; a higher penalty now answers `cancellation_changed`. */
1664
1664
  declare const cancelOrderInput: z.ZodObject<{
1665
1665
  orderId: z.ZodString;
1666
- maximumPenalty: z.ZodOptional<z.ZodType<Money, unknown, z.core.$ZodTypeInternals<Money, unknown>>>;
1666
+ maximumPenalty: z.ZodOptional<z.ZodType<Money, Money, z.core.$ZodTypeInternals<Money, Money>>>;
1667
1667
  }, z.core.$strict>;
1668
1668
  type CancelOrderInput = z.input<typeof cancelOrderInput>;
1669
1669
  /** The ways an order is paid: the order's own link, or through `pay_order`
@@ -1699,7 +1699,7 @@ declare const payOrderInput: z.ZodObject<{
1699
1699
  method: z.ZodOptional<z.ZodEnum<{
1700
1700
  stripe_alipay_wechat_pay: "stripe_alipay_wechat_pay";
1701
1701
  }>>;
1702
- total: z.ZodType<Money, unknown, z.core.$ZodTypeInternals<Money, unknown>>;
1702
+ total: z.ZodType<Money, Money, z.core.$ZodTypeInternals<Money, Money>>;
1703
1703
  }, z.core.$strict>;
1704
1704
  type PayOrderInput = z.input<typeof payOrderInput>;
1705
1705
  /** The shared payment token a `pay_order` call pays with: `sharedPaymentToken`,
@@ -1745,9 +1745,6 @@ declare const LIMITS: {
1745
1745
  readonly payCutoffMinutes: 2;
1746
1746
  readonly tokensPerOrder: 5;
1747
1747
  readonly wechatCodeMinutes: 120;
1748
- /** Orders one account can make for one stay (the same room, rate, dates
1749
- * and party); past it, ordering the stay answers `order_exists`. */
1750
- readonly ordersPerStay: 20;
1751
1748
  };
1752
1749
  /** Currencies a v1 request can price and charge in (USD is the default). */
1753
1750
  declare const CURRENCIES: readonly ["USD", "CNY"];
@@ -1818,7 +1815,7 @@ declare const stayEcho: z.ZodObject<{
1818
1815
  }, z.core.$strip>;
1819
1816
 
1820
1817
  /** Every code the v1 error envelope can carry (spec §11). */
1821
- type ErrorCode = "invalid_request" | "cursor_invalid" | "unauthenticated" | "forbidden" | "not_found" | "order_removed" | "offer_expired" | "offer_changed" | "offer_already_ordered" | "order_exists" | "order_in_progress" | "order_attempts_exhausted" | "cancellation_changed" | "order_not_cancellable" | "order_not_payable" | "payment_in_progress" | "payment_total_changed" | "payment_credential_invalid" | "payment_declined" | "payment_action_required" | "payment_method_unavailable" | "destination_ambiguous" | "destination_not_found" | "search_too_broad" | "stay_unsupported" | "stay_in_past" | "offer_unavailable" | "currency_unavailable" | "rate_limited" | "ordering_paused" | "service_unavailable" | "supplier_unavailable" | "internal";
1818
+ type ErrorCode = "invalid_request" | "cursor_invalid" | "unauthenticated" | "forbidden" | "not_found" | "offer_expired" | "offer_changed" | "offer_already_ordered" | "order_in_progress" | "cancellation_changed" | "order_not_cancellable" | "order_not_payable" | "payment_in_progress" | "payment_total_changed" | "payment_credential_invalid" | "payment_declined" | "payment_action_required" | "payment_method_unavailable" | "destination_ambiguous" | "destination_not_found" | "search_too_broad" | "stay_unsupported" | "stay_in_past" | "offer_unavailable" | "currency_unavailable" | "rate_limited" | "ordering_paused" | "service_unavailable" | "supplier_unavailable" | "internal";
1822
1819
  /** The statuses `supplier_unavailable` is sent with (by its `details.outcome`:
1823
1820
  * `SUPPLIER_OUTCOME_STATUS`). */
1824
1821
  declare const SUPPLIER_STATUSES: readonly [503, 504];
@@ -1852,10 +1849,6 @@ declare const ERROR_DETAILS: {
1852
1849
  unauthenticated: null;
1853
1850
  forbidden: null;
1854
1851
  not_found: null;
1855
- order_removed: z.ZodObject<{
1856
- orderId: z.ZodString;
1857
- reference: z.ZodString;
1858
- }, z.core.$strip>;
1859
1852
  offer_expired: z.ZodObject<{
1860
1853
  offerId: z.ZodString;
1861
1854
  expiredAt: z.ZodString;
@@ -2119,16 +2112,9 @@ declare const ERROR_DETAILS: {
2119
2112
  offer_already_ordered: z.ZodObject<{
2120
2113
  orderId: z.ZodString;
2121
2114
  }, z.core.$strip>;
2122
- order_exists: z.ZodObject<{
2123
- orderId: z.ZodString;
2124
- status: z.ZodType<(string & {}) | "awaiting_payment" | "expired" | "confirming" | "confirmed" | "failed" | "cancelling" | "cancelled" | "needs_attention", unknown, z.core.$ZodTypeInternals<(string & {}) | "awaiting_payment" | "expired" | "confirming" | "confirmed" | "failed" | "cancelling" | "cancelled" | "needs_attention", unknown>>;
2125
- }, z.core.$strip>;
2126
2115
  order_in_progress: z.ZodObject<{
2127
2116
  orderId: z.ZodString;
2128
2117
  }, z.core.$strip>;
2129
- order_attempts_exhausted: z.ZodObject<{
2130
- orderId: z.ZodString;
2131
- }, z.core.$strip>;
2132
2118
  cancellation_changed: null;
2133
2119
  order_not_cancellable: z.ZodObject<{
2134
2120
  reason: z.ZodType<(string & {}) | "non_refundable" | "needs_attention" | "unpaid" | "cancellable" | "already_cancelled" | "in_progress" | "not_confirmed" | "stay_started" | "refused" | "terms_unknown", unknown, z.core.$ZodTypeInternals<(string & {}) | "non_refundable" | "needs_attention" | "unpaid" | "cancellable" | "already_cancelled" | "in_progress" | "not_confirmed" | "stay_started" | "refused" | "terms_unknown", unknown>>;
package/dist/index.js CHANGED
@@ -132,10 +132,7 @@ var LIMITS = {
132
132
  * minutes. */
133
133
  payCutoffMinutes: 2,
134
134
  tokensPerOrder: 5,
135
- wechatCodeMinutes: 120,
136
- /** Orders one account can make for one stay (the same room, rate, dates
137
- * and party); past it, ordering the stay answers `order_exists`. */
138
- ordersPerStay: 20
135
+ wechatCodeMinutes: 120
139
136
  };
140
137
  var CURRENCIES = ["USD", "CNY"];
141
138
  var SUPPORT_EMAIL = "info@fortrip.ai";
@@ -1266,7 +1263,7 @@ function strictify(schema) {
1266
1263
  // src/guide-data.generated.ts
1267
1264
  var FRAGMENTS = {
1268
1265
  "booking": "{{#if claude-skill cli}}\n## Ordering\n\n{{/if}}\n- Call `{{tool:hotels book}}` only for the offer the user picked, with at least one guest per room{{#if claude-skill cli}}, named as the user gave them{{/if}}; never invent guests.{{#if claude-skill cli}} Room 1 is the offer's first room, and a room takes no more guests than it sleeps.{{/if}}\n- Guest names: Latin letters as on the passport (M\xFCller \u2192 Mueller), first and last name 1\u2013{{limit:guestName}} characters each{{#if cli}}, as `--guest 1:John:Smith` (room 1, first name, last name){{/if}}.\n{{#if claude-skill cli}}\n- The contact's first and last name (up to {{limit:contactFirstName}} characters each), email and phone (with its country code) are all required. Special requests must be in English and aren't guaranteed.\n{{/if}}\n- `{{tool:hotels book}}` can take about two minutes{{#if cli}}: allow the command at least 3 minutes{{/if}}. If it times out, {{#if cli}}run it again with identical flags{{/if}}{{#if mcp claude-skill}}call it again with the same details{{/if}}: it returns the same order.\n{{#if mcp}}\n- On `offer_changed`, show the user every change and ask again before ordering the new offer.\n{{/if}}\n{{#if cli}}\n- `{{tool:hotels book}}` takes only these fields: a `--body` with any other field (such as `nationality`) is rejected with exit 2.\n{{/if}}\n",
1269
- "errors": "{{#if claude-skill cli}}\n## Errors\n\n{{#if claude-skill}}A tool error{{/if}}{{#if cli}}An error on stderr{{/if}} carries `code`, `message` and `retryable`, and `retryAfterSeconds` when waiting helps; many carry `details`. Search errors are under Search. Ordering errors:\n\n| `code` | Do this |\n|---|---|\n| `offer_changed` (409) | The price or terms changed since the offer: `changes` lists every change (`worse` says which are worse for the user) and `offer` is the new offer. Show the user every change and ask again; if they still want it, order the new offer, and confirm the new order before giving its link |\n| `offer_expired` (409) | Get offers again and let the user choose again |\n| `offer_unavailable` (422) | The offer is sold out or was refused: get offers again and let the user choose again |\n| `order_in_progress` (409) | The same order is still being created: wait `retryAfterSeconds`, then {{#if claude-skill}}call again with the same details{{/if}}{{#if cli}}run the command again with identical flags{{/if}} |\n| `offer_already_ordered` (409) | This offer was already ordered with other details: show that order (`orderId`) instead. An offer is ordered once |\n| `order_exists` (409) | This stay already has an open order for one of these guests (`orderId`, `status`): show it instead of ordering again. A party with none of its guests can order the stay from a new offer (get offers again), and so can the user once the stay's order is confirmed, cancelled or refused by the hotel. It also answers when the stay's earlier order failed at the hotel with its outcome unknown, or the stay has had {{limit:ordersPerStay}} orders; for those, the user emails {{support}} |\n| `order_attempts_exhausted` (409) | This order can't be tried again: the user emails {{support}} with its `reference` |\n| `order_removed` (410) | The order was never completed and no payment is held: get offers again and order the new offer (the order keeps its `orderId`) |\n| `stay_unsupported` (422) | `mixed_occupancy`: order once per party; `max_nights`: at most `max` nights per order |\n| `currency_unavailable` (422) | Prices in `details.currency` aren't available yet: tell the user, and ask whether to see USD prices |\n| `stay_in_past` (422) | Check-in has passed in the hotel's time zone: ask for new dates |\n| `ordering_paused` (503) | Ordering is paused on Fortrip's side: tell the user, and try again only after `retryAfterSeconds` |\n\nAny code:\n\n- `invalid_request` (400): `details.issues` lists each bad field; fix them. For amenities, `details.filterable` lists those that can filter.\n- `cursor_invalid` (400): the page is gone; search again from the first page.\n- `not_found` (404): no such hotel, or no such order for this user.\n- `rate_limited` (429): wait `retryAfterSeconds`, then retry once.\n- `service_unavailable` (503) and `supplier_unavailable` (503 or 504): wait `retryAfterSeconds`, then retry once with the same details; if it fails again, tell the user.\n- Any other code: read `message`. If `retryable` is true, wait `retryAfterSeconds` and retry once; otherwise tell the user instead of guessing.\n{{/if}}\n",
1266
+ "errors": "{{#if claude-skill cli}}\n## Errors\n\n{{#if claude-skill}}A tool error{{/if}}{{#if cli}}An error on stderr{{/if}} carries `code`, `message` and `retryable`, and `retryAfterSeconds` when waiting helps; many carry `details`. Search errors are under Search. Ordering errors:\n\n| `code` | Do this |\n|---|---|\n| `offer_changed` (409) | The price or terms changed since the offer: `changes` lists every change (`worse` says which are worse for the user) and `offer` is the new offer. Show the user every change and ask again; if they still want it, order the new offer, and confirm the new order before giving its link |\n| `offer_expired` (409) | Get offers again and let the user choose again |\n| `offer_unavailable` (422) | The offer is sold out or was refused: get offers again and let the user choose again |\n| `order_in_progress` (409) | The same order is still being created: wait `retryAfterSeconds`, then {{#if claude-skill}}call again with the same details{{/if}}{{#if cli}}run the command again with identical flags{{/if}} |\n| `offer_already_ordered` (409) | This offer was already ordered with other details: show that order (`orderId`) instead. An offer is ordered once, even when its order failed or expired: to order with other details, get offers again |\n| `stay_unsupported` (422) | `mixed_occupancy`: order once per party; `max_nights`: at most `max` nights per order |\n| `currency_unavailable` (422) | Prices in `details.currency` aren't available yet: tell the user, and ask whether to see USD prices |\n| `stay_in_past` (422) | Check-in has passed in the hotel's time zone: ask for new dates |\n| `ordering_paused` (503) | Ordering is paused on Fortrip's side: tell the user, and try again only after `retryAfterSeconds` |\n\nAny code:\n\n- `invalid_request` (400): `details.issues` lists each bad field; fix them. For amenities, `details.filterable` lists those that can filter.\n- `cursor_invalid` (400): the page is gone; search again from the first page.\n- `not_found` (404): no such hotel, or no such order for this user.\n- `rate_limited` (429): wait `retryAfterSeconds`, then retry once.\n- `service_unavailable` (503) and `supplier_unavailable` (503 or 504): wait `retryAfterSeconds`, then retry once with the same details; if it fails again, tell the user.\n- Any other code: read `message`. If `retryable` is true, wait `retryAfterSeconds` and retry once; otherwise tell the user instead of guessing.\n{{/if}}\n",
1270
1267
  "meals": '{{#if claude-skill cli}}\n## Presenting an offer\n\nGive the user, for each offer:\n\n- the room (`room.name`, beds, size) and the total, as above;\n- the meals: `meals.included` (breakfast, lunch, dinner) or `allInclusive`, with `guestsCoveredPerRoom`. Fewer than the guests per room means not everyone gets the meals (breakfast for 1 with 2 adults in the room): say who is covered. `unspecifiedMainMeals` counts main meals the hotel didn\'t name. With `known: false`, the meals are unknown: say so, and don\'t call it room only;\n- cancellation: `status` (`free`, `partial_penalty`, `non_refundable` or `unknown`), `freeCancellationEndsAt` (null with `free`: free until check-in) and the `penalties`. Times are in UTC: also give them in the hotel\'s `timeZone`;\n- confirmation: `mode` `instant` or `on_request` (within `withinMinutes`);\n- fees payable at the property (`payAtProperty.items`), in the property\'s currency. `disclosure: "incomplete"` means there can be fees not listed: say so.\n\nAn offer expires at `expiresAt`, about 30 minutes after it was made; after that, get offers again.\n\n"Not listed" is not "no": `listed: false` (amenities, policies, rooms), `null` and `unknown` mean the source didn\'t say. Tell the user it\'s unknown instead of turning it into "no".\n{{/if}}\n{{#if mcp}}\n- "Not listed" or "unknown" is not "no".\n{{/if}}\n',
1271
1268
  "occupancy": "{{#if claude-skill cli}}\n## Rooms and guests\n\n- {{#if mcp claude-skill}}`stay.rooms` lists each room's party as `{ adults, childrenAges }`: two rooms of 2 adults, one with a child of 6, is `[{ adults: 2, childrenAges: [6] }, { adults: 2, childrenAges: [] }]`{{/if}}{{#if cli}}`--room <adults[:age,\u2026]>`, once per room, gives each room's party: two rooms of 2 adults, one with a child of 6, is `--room 2:6 --room 2`{{/if}}.\n- Ask each child's age; offers need it.\n- If the party doesn't split evenly across the rooms (3 adults in 2 rooms), ask the user how it splits.\n{{/if}}\n- Offers and orders take one party per call, every room the same: for different parties, order once per party.{{#if claude-skill cli}} `{{tool:hotels offers}}` answers `stay_unsupported` (`mixed_occupancy`) for mixed rooms; `{{tool:hotels search}}` accepts them but prices only from the dates, with the note `party_split_required`.{{/if}}\n{{#if claude-skill cli}}\n- Limits: 1\u2013{{limit:rooms}} rooms, 1\u2013{{limit:adultsPerRoom}} adults and 0\u2013{{limit:childrenPerRoom}} children (aged 0\u2013{{limit:childAgeMax}}) per room, 1\u2013{{limit:nightsSupplier}} nights, up to {{limit:offersHotels}} hotels per `{{tool:hotels offers}}` call. A longer stay answers `stay_unsupported` (`max_nights`): ask the user whether to split it into consecutive stays, each its own order.\n{{/if}}\n",
1272
1269
  "order": '{{#if claude-skill cli}}\n## Workflow\n\n1. **Search** with `{{tool:hotels search}}` for candidate hotels: a destination, `{{arg:text}}` or both, and the stay\'s dates and rooms for indicative prices.\n{{#if cli}}\n\n ```bash\n {{tool:hotels search}} --place-name Bangkok --country TH --check-in 2026-11-10 \\\n --check-out 2026-11-12 --room 2 --stars-min 4 --sort price_asc --limit 10\n ```\n\n{{/if}}\n2. **Details** (optional) with `{{tool:hotels get}}`, when the user asks about a hotel or a stated preference needs evidence (a pool, a policy, room size). For a details-only question, call it directly when you know the hotel\'s `hotelId`; otherwise find the hotel with `{{tool:hotels search}}`.\n{{#if cli}}\n\n ```bash\n {{tool:hotels get}} <hotelId> [--rooms]\n ```\n\n{{/if}}\n3. **Offers** with `{{tool:hotels offers}}` for a few shortlisted hotels, with the dates and rooms the user will order. It takes about 15 seconds. A hotel is available only once this returns an offer for it.\n{{#if cli}}\n\n ```bash\n {{tool:hotels offers}} --hotel <hotelId> --hotel <hotelId> --check-in 2026-11-10 \\\n --check-out 2026-11-12 --room 2 --room 2 [--require-free-cancellation]\n ```\n\n{{/if}}\n4. **Order** with `{{tool:hotels book}}`, once the user has picked one offer and given the guests and the contact (see Ordering).\n{{#if cli}}\n\n ```bash\n {{tool:hotels book}} --offer <offerId> --guest 1:John:Smith --guest 2:Mary:Smith \\\n --first-name John --last-name Smith --email john@example.com \\\n --phone "+8613800000000"\n ```\n\n{{/if}}\n5. **Confirm, then give the payment link**, as in "Before giving the payment link" below.\n6. **After payment**, check the order with `{{tool:orders get}}` (see After payment).\n\n## Search\n\n### Where\n\n- **A place by name:** {{#if mcp claude-skill}}`{ kind: "place_name", name, countryCode }`{{/if}}{{#if cli}}`--place-name <name> --country <CC>`{{/if}}, in any language (Kyoto or \u4EAC\u90FD). The country is required: ask the user when it isn\'t clear. Names match exactly, ignoring only case and spacing: accents, hyphens, apostrophes and periods count ("K\xF6ln" or "Cologne", not "Koln"; "St. Moritz", not "St Moritz").\n- If several places bear the name, the answer is `destination_ambiguous` with up to {{limit:candidatesShown}} candidates and their hotel counts: ask the user which one they mean, then search it by its `placeId`; never pick one yourself.\n- `destination_not_found` with `no_match` means no place of that name in that country: check the spelling and accents, or try another name for the place. Its `nameAsText` counts the hotels that a `{{arg:text}}` search for the name would find.\n- **A place from an earlier answer:** {{#if mcp claude-skill}}`{ kind: "place", placeId }`{{/if}}{{#if cli}}`--place <placeId>`{{/if}}.\n- **Near a point:** {{#if mcp claude-skill}}`{ kind: "point", location: { lat, lng } }`{{/if}}{{#if cli}}`--point <lat,lng>`{{/if}}, for "near X" when you know where X is.\n- **A whole country:** {{#if mcp claude-skill}}`{ kind: "country", countryCode }`{{/if}}{{#if cli}}`--country-only <CC>`{{/if}}, as for the Maldives.\n- Countries, regions (states, provinces), prefecture-level cities in China and main islands cover their whole area. Towns, neighbourhoods, districts, small islands and points cover a circle of {{limit:radiusMetersDefault}} meters; `{{arg:destination.radiusMeters}}` sets another, up to {{limit:radiusMetersMax}} meters, and narrows an area to a circle around its center.\n- **Localities:** an area search lists its `localities`, the towns its hotels belong to, each with a `placeId`, its hotel `count` and the places it `includes` (Patong is part of Phuket). To search one, pass it as {{#if mcp claude-skill}}`{ kind: "locality", placeId }`{{/if}}{{#if cli}}`--locality <placeId>`{{/if}}. A town that isn\'t a locality answers `destination_not_found` with `not_a_locality` and, in `hub`, the locality it belongs to: search that locality, or the town itself with {{#if mcp claude-skill}}`kind: "place"`{{/if}}{{#if cli}}`--place`{{/if}} for a circle around it.\n- A price sort or price filter over more than {{limit:poolLimit}} hotels (in an area, or for text alone) answers `search_too_broad` with `matched` and the top `localities`: show them and ask the user which they prefer, unless the request already names one of them; search that one by its `placeId` as a locality, never by its name.\n\n### Text\n\n`{{arg:text}}` matches exact words in hotel names and addresses, in Chinese or English:\n\n- Every word must match as written: plurals, accents, spacing and abbreviations count ("hostel" and "hostels", "St Regis" and "Saint Regis" find different hotels). Hyphens and apostrophes don\'t (Ritz-Carlton finds Ritz Carlton).\n- In Chinese, matching follows word segmentation, so part of a name can match unrelated hotels (\u5E0C\u5C14 is not \u5E0C\u5C14\u987F).\n- Use only distinctive words: a hotel or brand name, a district or a landmark. Not "hotel", "near", "cheap" or "best".\n- Typos return nothing: "Shangahi" finds no hotel.\n- Place names belong in the destination: "Maldives" as text finds a hotel named Maldives in China.\n\n### Filters\n\n- Stars run from 1 to 5 in half steps{{#if mcp claude-skill}} (`filters.stars`){{/if}}. "4 stars" as {{#if mcp claude-skill}}`{ min: 4, max: 4 }`{{/if}}{{#if cli}}`--stars-min 4 --stars-max 4`{{/if}} leaves out 4.5: unless the user means exactly 4, use {{#if mcp claude-skill}}`{ min: 4 }`{{/if}}{{#if cli}}`--stars-min 4`{{/if}} or ask. Unrated hotels are left out whenever stars are filtered.\n- `{{arg:filters.amenities}}` takes only the amenities that can filter (such as pool, parking, wifi); others, such as gym or spa, show in `{{tool:hotels get}}` but can\'t filter. A hotel matches only when it lists the amenity, and about half the hotels list no amenities at all (`coverage.excludedNoFacilityData` counts those left out): "not listed" is not "absent".\n- `{{arg:filters.price.maxPerRoomNight}}` bounds the indicative price per room per night, in the search\'s currency; hotels without one are left out and counted.\n\n### Results\n\n- `notes` explain the answer (a limited pool, a circle around an island, more hotels just outside it): pass on what matters to the user.\n- `coverage` has the counts: `matched` hotels, how many were priced and how many have a price.\n- A next page is {{#if mcp claude-skill}}`cursor` set to `nextCursor` and, optionally, `limit`{{/if}}{{#if cli}}`--cursor <nextCursor>` and, optionally, `--limit`{{/if}}; nothing else.\n{{/if}}\n{{#if mcp}}\n- A place name needs its `countryCode` (ask the user if unclear) and matches exactly (accents and periods count). On `destination_ambiguous`, ask the user which they mean, then search its `placeId`; never pick one yourself.\n- On `search_too_broad`, show its `localities` and ask the user which, unless they already named one; search it as `{ kind: "locality", placeId }`, never by name.\n- `text` matches whole words of hotel names and addresses: use a distinctive name, brand or landmark.\n{{/if}}\n',
@@ -1448,13 +1445,10 @@ var ERROR_CODES = {
1448
1445
  unauthenticated: { status: [401], retryable: false },
1449
1446
  forbidden: { status: [403], retryable: false },
1450
1447
  not_found: { status: [404], retryable: false },
1451
- order_removed: { status: [410], retryable: false },
1452
1448
  offer_expired: { status: [409], retryable: false },
1453
1449
  offer_changed: { status: [409], retryable: false },
1454
1450
  offer_already_ordered: { status: [409], retryable: false },
1455
- order_exists: { status: [409], retryable: false },
1456
1451
  order_in_progress: { status: [409], retryable: true },
1457
- order_attempts_exhausted: { status: [409], retryable: false },
1458
1452
  cancellation_changed: { status: [409], retryable: false },
1459
1453
  order_not_cancellable: { status: [409], retryable: false },
1460
1454
  order_not_payable: { status: [409], retryable: false },
@@ -2047,13 +2041,10 @@ var ERROR_DETAILS = {
2047
2041
  unauthenticated: null,
2048
2042
  forbidden: null,
2049
2043
  not_found: null,
2050
- order_removed: openObject({ orderId, reference: orderReference }),
2051
2044
  offer_expired: openObject({ offerId, expiredAt: instant }),
2052
2045
  offer_changed: openObject({ changes: z15.array(offerChange).min(1), offer }),
2053
2046
  offer_already_ordered: openObject({ orderId }),
2054
- order_exists: openObject({ orderId, status: openEnum(ORDER_STATUSES) }),
2055
2047
  order_in_progress: openObject({ orderId }),
2056
- order_attempts_exhausted: openObject({ orderId }),
2057
2048
  cancellation_changed: null,
2058
2049
  order_not_cancellable: openObject({ reason: openEnum(CANCEL_REASONS) }),
2059
2050
  order_not_payable: openObject({ orderId, status: openEnum(ORDER_STATUSES) }),
@@ -3086,8 +3077,6 @@ function detailLines(e, surface) {
3086
3077
  }
3087
3078
  case "cursor_invalid":
3088
3079
  return [`The cursor is ${e.details.reason}: search again without a cursor.`];
3089
- case "order_removed":
3090
- return [`Order ${e.details.orderId}, reference ${e.details.reference}.`];
3091
3080
  case "offer_expired":
3092
3081
  return [`Offer ${e.details.offerId} expired at ${when(e.details.expiredAt, null)}: get fresh offers.`];
3093
3082
  case "offer_changed":
@@ -3100,10 +3089,7 @@ function detailLines(e, surface) {
3100
3089
  ];
3101
3090
  case "offer_already_ordered":
3102
3091
  case "order_in_progress":
3103
- case "order_attempts_exhausted":
3104
3092
  return [`Order ${e.details.orderId}.`];
3105
- case "order_exists":
3106
- return [`Order ${e.details.orderId}, ${label(ORDER_STATUS_WORDS, e.details.status)}.`];
3107
3093
  case "order_not_cancellable":
3108
3094
  return [`Not cancellable: ${label(CANCEL_REASON_WORDS, e.details.reason)}.`];
3109
3095
  case "order_not_payable":
@@ -3326,7 +3312,7 @@ var ME_SCOPES = { email: "email", name: "profile" };
3326
3312
  // package.json
3327
3313
  var package_default = {
3328
3314
  name: "@fortrip/agent-contract",
3329
- version: "5.0.0-rc.1",
3315
+ version: "5.0.0-rc.2",
3330
3316
  license: "Apache-2.0",
3331
3317
  description: "The contract of Fortrip's agent API (https://api.fortrip.ai/v1) and its MCP server: limits, paths, request and response schemas, error codes and field rules.",
3332
3318
  type: "module",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fortrip/agent-contract",
3
- "version": "5.0.0-rc.1",
3
+ "version": "5.0.0-rc.2",
4
4
  "license": "Apache-2.0",
5
5
  "description": "The contract of Fortrip's agent API (https://api.fortrip.ai/v1) and its MCP server: limits, paths, request and response schemas, error codes and field rules.",
6
6
  "type": "module",