fortrip 6.1.0 → 6.2.0
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.
|
@@ -14840,7 +14840,9 @@ var destination = external_exports.discriminatedUnion(
|
|
|
14840
14840
|
radiusMeters
|
|
14841
14841
|
}),
|
|
14842
14842
|
strictInput({
|
|
14843
|
-
kind: external_exports.literal("point", { error: "kind must be point" }).describe(
|
|
14843
|
+
kind: external_exports.literal("point", { error: "kind must be point" }).describe(
|
|
14844
|
+
"A point the user asked to stay near: a landmark or an address they named, or the coordinates hotel details showed. Never a position the user did not give."
|
|
14845
|
+
),
|
|
14844
14846
|
location: strictInput({
|
|
14845
14847
|
lat: bounded("lat", -90, 90).describe("Latitude, WGS84."),
|
|
14846
14848
|
lng: bounded("lng", -180, 180).describe("Longitude, WGS84.")
|
|
@@ -16510,7 +16512,7 @@ var TOOLS = [
|
|
|
16510
16512
|
{
|
|
16511
16513
|
name: "search_hotels",
|
|
16512
16514
|
title: "Search hotels",
|
|
16513
|
-
description: "
|
|
16515
|
+
description: "Use this when the user wants hotels in a place they name, or a hotel by its name or brand. It finds hotels by destination and/or text, with an indicative per-room-night price when a stay is given. destination is the place the user asked for, never a location they did not give: a place_name with its countryCode, a place or locality by placeId from an earlier answer, a point (a landmark or an address the user named, or the coordinates hotel details showed), or a country. text matches hotel names, brands and areas word for word. Indicative prices are estimates and not bookable: get_hotel_offers returns what the user pays. A name several places bear answers destination_ambiguous, and a search too broad to price answers search_too_broad with its localities; each error says what to do next. The answer states what was searched, the counts and notes; a next page is the cursor and, optionally, limit.",
|
|
16514
16516
|
annotations: READ,
|
|
16515
16517
|
input: searchHotelsInput,
|
|
16516
16518
|
output: searchResult
|
|
@@ -16518,7 +16520,7 @@ var TOOLS = [
|
|
|
16518
16520
|
{
|
|
16519
16521
|
name: "get_hotel",
|
|
16520
16522
|
title: "Hotel details",
|
|
16521
|
-
description: `
|
|
16523
|
+
description: `Use this when the user asks about one hotel itself: where it is, its check-in and check-out times, its policies, amenities or room types. It returns the hotel's catalogue facts: names, address, coordinates, time zone, check-in and check-out times, the full description, every policy and the amenities, and its room types with include: "roomTypes". "Not listed" is not "no". No prices or availability: get_hotel_offers has those.`,
|
|
16522
16524
|
annotations: READ,
|
|
16523
16525
|
input: getHotelInput,
|
|
16524
16526
|
output: hotel
|
|
@@ -16526,7 +16528,7 @@ var TOOLS = [
|
|
|
16526
16528
|
{
|
|
16527
16529
|
name: "get_hotel_offers",
|
|
16528
16530
|
title: "Live offers",
|
|
16529
|
-
description: `
|
|
16531
|
+
description: `Use this when the user wants what a stay really costs or whether it can be booked, at hotels already found, and before create_order. It returns live, bookable offers for up to ${LIMITS.offersHotels} hotels and one stay. Every room in stay.rooms must have the same party: for different parties, call once per party. Each offer has the room type, the meals included, the total, in the request's currency, for the whole stay and every room (what is charged), with its average per room-night for comparison, fees payable at the property, the cancellation terms with times in UTC and the hotel's time zone, the confirmation mode, and an offerId for create_order with the time it expires. Hotels with nothing to offer are listed as unavailable with the reason. Up to limitPerHotel offers per hotel (default ${LIMITS.offersPerHotelDefault}, fewer when the call's hotels share its ${LIMITS.offersPerCallDefault} offers), picked to span price, free cancellation, breakfast and rooms, listed cheapest first; the answer says, per hotel, how many more a call for that hotel alone would show.`,
|
|
16530
16532
|
annotations: READ,
|
|
16531
16533
|
input: hotelOffersInput,
|
|
16532
16534
|
output: hotelOffersResult
|
|
@@ -16534,7 +16536,7 @@ var TOOLS = [
|
|
|
16534
16536
|
{
|
|
16535
16537
|
name: "create_order",
|
|
16536
16538
|
title: "Create order",
|
|
16537
|
-
description: `Create an unpaid order
|
|
16539
|
+
description: `Create an unpaid order when the user asks to book one offer from get_hotel_offers. It takes items, one item with the offer's offerId inside it (nowhere else in the arguments) and hotel.rooms, and contact. The answer is the order, awaiting payment: its reference, the total, the stay and its terms, and a payment link, a Fortrip page to pay on. Nothing is charged until the order is paid${PAID_WHERE}; anyone holding the link can pay. Send the contact and, for each room of the offer, at least one guest. If the price or terms changed since the offer, the answer is offer_changed with every change and a new offer: show the changes and ask the user again before ordering it. Sending the same details again returns the same order. An offer is ordered once: another order of the stay (another party, or a corrected guest name or contact) takes a new offer. cancel_order cancels or closes an order; for changes, or a cancellation it can't make, the user emails ${SUPPORT_EMAIL} with the order's reference.`,
|
|
16538
16540
|
// Destructive: Claude's connector review asks `destructiveHint: true`
|
|
16539
16541
|
// "for tools that modify or delete data", and a per-call confirmation
|
|
16540
16542
|
// before an order is created is the behaviour wanted. Idempotent: the
|
|
@@ -16551,7 +16553,7 @@ var TOOLS = [
|
|
|
16551
16553
|
{
|
|
16552
16554
|
name: "get_order",
|
|
16553
16555
|
title: "Get order",
|
|
16554
|
-
description: "
|
|
16556
|
+
description: "Use this when the user asks about one order of theirs: whether it is paid or confirmed, its terms, or what cancelling it would cost. It returns the order by orderId: its status, the payment status and, while it awaits payment, its payment link; the stay, its guests and its terms; whether it can be cancelled now, for which penalty and refund, or closed; why a failed order booked nothing and what a cancellation kept; and the hotel's confirmation number once there is one. It shows whether a payment went through.",
|
|
16555
16557
|
annotations: READ_OWN,
|
|
16556
16558
|
input: getOrderInput,
|
|
16557
16559
|
output: order
|
|
@@ -16559,7 +16561,7 @@ var TOOLS = [
|
|
|
16559
16561
|
{
|
|
16560
16562
|
name: "list_orders",
|
|
16561
16563
|
title: "List orders",
|
|
16562
|
-
description: "
|
|
16564
|
+
description: "Use this when the user asks what they have booked, or about an order whose orderId you do not have. It returns the user's hotel orders, newest first, including those made on the Fortrip website, each as get_order shows it. A next page is the cursor the answer gives.",
|
|
16563
16565
|
annotations: READ_OWN,
|
|
16564
16566
|
input: listOrdersInput,
|
|
16565
16567
|
output: orderList
|
|
@@ -16567,7 +16569,7 @@ var TOOLS = [
|
|
|
16567
16569
|
{
|
|
16568
16570
|
name: "cancel_order",
|
|
16569
16571
|
title: "Cancel order",
|
|
16570
|
-
description: "
|
|
16572
|
+
description: "Use this when the user asks to cancel a paid order or to close an unpaid one. It cancels a paid order under its terms, or closes an unpaid one. It takes the orderId and exactly one of maximumPenalty (a paid order) and close: true (an unpaid one). Paid (the order's Cancel line says it can be cancelled): pass maximumPenalty, the penalty on that line exactly as shown. The order becomes cancelling, then cancelled with the refund on its way, or confirmed again if the hotel refuses. If the penalty rose above maximumPenalty, the answer is cancellation_changed and nothing changed. Unpaid (the Cancel line says it can be closed): close: true closes it: nothing is charged, and it can no longer be paid. A mode that does not fit the order (close on an order paid meanwhile) answers order_not_cancellable, which says which mode applies now or what blocks both: nothing is cancelled or closed by the other mode. While a payment is under way the answer is payment_in_progress. The same call again answers the order as it is.",
|
|
16571
16573
|
annotations: {
|
|
16572
16574
|
readOnlyHint: false,
|
|
16573
16575
|
idempotentHint: true,
|
|
@@ -17797,7 +17799,7 @@ function notCancellable(d, surface) {
|
|
|
17797
17799
|
ours`This order can be neither cancelled nor closed now: ${blockerText(c)}.`
|
|
17798
17800
|
];
|
|
17799
17801
|
}
|
|
17800
|
-
function detailLines(e, surface) {
|
|
17802
|
+
function detailLines(e, surface, tokenPay) {
|
|
17801
17803
|
const getOrder = (id) => surface === "cli" ? ours`\`fortrip orders get ${id}\`` : ours`get_order`;
|
|
17802
17804
|
switch (e.code) {
|
|
17803
17805
|
case "invalid_request": {
|
|
@@ -17902,7 +17904,7 @@ function detailLines(e, surface) {
|
|
|
17902
17904
|
];
|
|
17903
17905
|
case "service_unavailable":
|
|
17904
17906
|
return [
|
|
17905
|
-
ours`Retry once with the same details (a payment with the same token, never a new one); if it fails again, tell the user.`
|
|
17907
|
+
tokenPay ? ours`Retry once with the same details (a payment with the same token, never a new one); if it fails again, tell the user.` : ours`Retry once with the same details; if it fails again, tell the user.`
|
|
17906
17908
|
];
|
|
17907
17909
|
case "supplier_unavailable":
|
|
17908
17910
|
return [
|
|
@@ -17923,7 +17925,7 @@ function retryLine(retryable, after) {
|
|
|
17923
17925
|
}
|
|
17924
17926
|
return retryable === false ? ours`Not retryable.` : ours`Retryable: unknown.`;
|
|
17925
17927
|
}
|
|
17926
|
-
function renderError(envelope, status, surface = "mcp") {
|
|
17928
|
+
function renderError(envelope, status, surface = "mcp", options = {}) {
|
|
17927
17929
|
let known = null;
|
|
17928
17930
|
let body = null;
|
|
17929
17931
|
try {
|
|
@@ -17948,9 +17950,11 @@ function renderError(envelope, status, surface = "mcp") {
|
|
|
17948
17950
|
retryLine(body.retryable, body.retryAfterSeconds)
|
|
17949
17951
|
];
|
|
17950
17952
|
if (typeof body.pointer === "string") lines.push(ours`Field: ${token("pointer", body.pointer)}`);
|
|
17951
|
-
if (known) lines.push(...detailLines(known, surface));
|
|
17953
|
+
if (known) lines.push(...detailLines(known, surface, options.tokenPay !== false));
|
|
17952
17954
|
else if (body.details !== void 0) lines.push(ours`Details: ${raw(body.details)}`);
|
|
17953
|
-
if (typeof body.requestId === "string"
|
|
17955
|
+
if (typeof body.requestId === "string" && (surface === "cli" || body.code === "internal")) {
|
|
17956
|
+
lines.push(ours`Request id: ${token("id", body.requestId)}`);
|
|
17957
|
+
}
|
|
17954
17958
|
return lines.join("\n");
|
|
17955
17959
|
}
|
|
17956
17960
|
|
|
@@ -18203,7 +18207,7 @@ function withRules(text2, surface, applies) {
|
|
|
18203
18207
|
// ../contract/package.json
|
|
18204
18208
|
var package_default = {
|
|
18205
18209
|
name: "@fortrip/agent-contract",
|
|
18206
|
-
version: "6.
|
|
18210
|
+
version: "6.2.0",
|
|
18207
18211
|
license: "Apache-2.0",
|
|
18208
18212
|
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.",
|
|
18209
18213
|
type: "module",
|
package/dist/cli.js
CHANGED
|
@@ -31,7 +31,7 @@ import {
|
|
|
31
31
|
unwrap,
|
|
32
32
|
usageError,
|
|
33
33
|
whoami
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-22QPWLDP.js";
|
|
35
35
|
|
|
36
36
|
// src/commands.ts
|
|
37
37
|
import { readFileSync } from "fs";
|
|
@@ -587,7 +587,7 @@ async function run(argv) {
|
|
|
587
587
|
case "mcp": {
|
|
588
588
|
parseOptions(spec, rest);
|
|
589
589
|
const mcpUrl = resolveMcpUrl(apiUrl);
|
|
590
|
-
const { runMcpBridge } = await import("./mcp-bridge-
|
|
590
|
+
const { runMcpBridge } = await import("./mcp-bridge-BBYKYAWY.js");
|
|
591
591
|
await runMcpBridge(mcpUrl, apiUrl);
|
|
592
592
|
return void 0;
|
|
593
593
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "fortrip",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.2.0",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"description": "Search, price and book Fortrip hotels from the terminal or an AI agent.",
|
|
6
6
|
"mcpName": "io.github.FortripEngineering/fortrip",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"tsx": "^4.20.0",
|
|
33
33
|
"typescript": "^5.9.0",
|
|
34
34
|
"zod": "4.4.3",
|
|
35
|
-
"@fortrip/agent-contract": "6.
|
|
35
|
+
"@fortrip/agent-contract": "6.2.0"
|
|
36
36
|
},
|
|
37
37
|
"scripts": {
|
|
38
38
|
"build": "tsup",
|