@ktemia/langchain 0.0.0 → 0.1.1

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.js ADDED
@@ -0,0 +1,252 @@
1
+ // src/index.ts
2
+ import { BaseToolkit, tool } from "@langchain/core/tools";
3
+ import { z } from "zod";
4
+ import {
5
+ Ktemia,
6
+ KtemiaError,
7
+ enumValues,
8
+ paramDescription as p,
9
+ toolDescription
10
+ } from "ktemia";
11
+ import { Ktemia as Ktemia2, KtemiaError as KtemiaError2 } from "ktemia";
12
+ var VERSION = "0.1.1";
13
+ var NAME = {
14
+ keyStatus: "ktemia_key_status",
15
+ lookup: "ktemia_lookup",
16
+ searchFlights: "ktemia_search_flights",
17
+ searchHotels: "ktemia_search_hotels",
18
+ searchCars: "ktemia_search_cars",
19
+ getDetails: "ktemia_get_details",
20
+ hotelReviews: "ktemia_get_hotel_reviews"
21
+ };
22
+ var SEARCH_NOTES = ["askDoNotGuessNote", "tokenLifetimeNote", "quotaNote", "searchNotBookNote"];
23
+ var id = () => z.union([z.string().min(1), z.number()]);
24
+ var price = (n, field) => z.number().refine((v) => v > 0, { message: "Must be greater than 0" }).optional().describe(p(n, field));
25
+ var country = (n) => z.string().length(2).optional().describe(p(n, "country"));
26
+ var sortOrder = (n) => z.enum(["asc", "desc"]).optional().describe(p(n, "sortOrder"));
27
+ var nextToken = (n) => z.string().optional().describe(p(n, "nextToken"));
28
+ var keyStatusSchema = z.object({});
29
+ var lookupSchema = z.object({
30
+ kind: z.enum(["airport", "airline", "hotelLocation", "carLocation"]).describe(p(NAME.lookup, "kind")),
31
+ query: z.string().min(1).describe(p(NAME.lookup, "query")),
32
+ type: z.enum(["city", "airport", "all"]).optional().describe(p(NAME.lookup, "type")),
33
+ country: country(NAME.lookup),
34
+ locale: z.string().optional().describe(p(NAME.lookup, "locale"))
35
+ });
36
+ var F = NAME.searchFlights;
37
+ var flightSchema = z.object({
38
+ nextToken: nextToken(F),
39
+ origin: z.string().optional().describe(p(F, "origin")),
40
+ destination: z.string().optional().describe(p(F, "destination")),
41
+ departureDate: z.string().optional().describe(p(F, "departureDate")),
42
+ returnDate: z.string().optional().describe(p(F, "returnDate")),
43
+ legs: z.array(z.object({ origin: z.string(), destination: z.string(), date: z.string() })).optional().describe(p(F, "legs")),
44
+ cabin: z.enum(["economy", "premiumEconomy", "business", "first"]).optional().describe(p(F, "cabin")),
45
+ passengers: z.object({
46
+ adults: z.number().int().min(0).max(9).optional(),
47
+ children: z.number().int().min(0).max(9).optional(),
48
+ infantsOnLap: z.number().int().min(0).max(9).optional()
49
+ }).optional().describe(p(F, "passengers")),
50
+ maxStops: z.number().int().min(0).max(2).optional().describe(p(F, "maxStops")),
51
+ airlines: z.array(z.string()).optional().describe(p(F, "airlines")),
52
+ alliances: z.array(z.enum(["oneworld", "skyteam", "starAlliance"])).optional().describe(p(F, "alliances")),
53
+ maxPrice: price(F, "maxPrice"),
54
+ sortBy: z.enum(["bestValue", "price", "duration", "departure", "arrival"]).optional().describe(p(F, "sortBy")),
55
+ sortOrder: sortOrder(F),
56
+ country: country(F)
57
+ });
58
+ var H = NAME.searchHotels;
59
+ var hotelSchema = z.object({
60
+ nextToken: nextToken(H),
61
+ location: id().optional().describe(p(H, "location")),
62
+ checkin: z.string().optional().describe(p(H, "checkin")),
63
+ checkout: z.string().optional().describe(p(H, "checkout")),
64
+ adults: z.number().int().min(1).max(16).optional().describe(p(H, "adults")),
65
+ rooms: z.number().int().min(1).max(8).optional().describe(p(H, "rooms")),
66
+ childAges: z.array(z.number().int().min(0).max(17)).optional().describe(p(H, "childAges")),
67
+ minStars: z.number().int().min(2).max(5).optional().describe(p(H, "minStars")),
68
+ minRating: z.number().optional().describe(p(H, "minRating")),
69
+ maxPrice: price(H, "maxPrice"),
70
+ freeCancellation: z.boolean().optional().describe(p(H, "freeCancellation")),
71
+ amenities: z.array(z.string()).optional().describe(p(H, "amenities")),
72
+ providers: z.array(z.string()).optional().describe(p(H, "providers")),
73
+ sortBy: z.enum(["bestValue", "price", "rating", "stars", "distance"]).optional().describe(p(H, "sortBy")),
74
+ sortOrder: sortOrder(H),
75
+ country: country(H)
76
+ });
77
+ var C = NAME.searchCars;
78
+ var carClasses = enumValues("carClass");
79
+ var carSchema = z.object({
80
+ nextToken: nextToken(C),
81
+ pickupLocation: id().optional().describe(p(C, "pickupLocation")),
82
+ dropoffLocation: id().optional().describe(p(C, "dropoffLocation")),
83
+ pickupDate: z.string().optional().describe(p(C, "pickupDate")),
84
+ dropoffDate: z.string().optional().describe(p(C, "dropoffDate")),
85
+ pickupTime: z.string().optional().describe(p(C, "pickupTime")),
86
+ dropoffTime: z.string().optional().describe(p(C, "dropoffTime")),
87
+ driverAge: z.number().int().min(18).max(99).optional().describe(p(C, "driverAge")),
88
+ carClass: z.enum(carClasses).optional().describe(p(C, "carClass")),
89
+ transmission: z.enum(["automatic", "manual"]).optional().describe(p(C, "transmission")),
90
+ maxPrice: price(C, "maxPrice"),
91
+ providers: z.array(z.string()).optional().describe(p(C, "providers")),
92
+ agencies: z.array(z.string()).optional().describe(p(C, "agencies")),
93
+ sortBy: z.enum(["bestValue", "price", "rating", "distance"]).optional().describe(p(C, "sortBy")),
94
+ sortOrder: sortOrder(C),
95
+ priceMode: z.enum(["total", "perDay"]).optional().describe(p(C, "priceMode")),
96
+ country: country(C)
97
+ });
98
+ var D = NAME.getDetails;
99
+ var detailsSchema = z.object({
100
+ vertical: z.enum(["flights", "hotels", "cars"]).describe(p(D, "vertical")),
101
+ token: z.string().min(1).describe(p(D, "token")),
102
+ resultId: id().describe(p(D, "resultId"))
103
+ });
104
+ var R = NAME.hotelReviews;
105
+ var reviewsSchema = z.object({
106
+ hotelId: id().describe(p(R, "hotelId")),
107
+ sortBy: z.enum(["recent", "oldest", "highestScore", "lowestScore"]).optional().describe(p(R, "sortBy")),
108
+ travelerTypes: z.array(z.enum(["families", "couples", "solo", "friends", "business"])).optional().describe(p(R, "travelerTypes")),
109
+ months: z.array(z.number().int().min(1).max(12)).optional().describe(p(R, "months")),
110
+ sources: z.array(z.enum(["booking", "agoda", "priceline"])).optional().describe(p(R, "sources")),
111
+ search: z.string().optional().describe(p(R, "search")),
112
+ page: z.number().int().min(1).max(1e3).optional().describe(p(R, "page"))
113
+ });
114
+ function resolveClient(options) {
115
+ const { client, ...rest } = options;
116
+ return client ?? new Ktemia({ userAgent: `langchain-js/${VERSION}`, ...rest });
117
+ }
118
+ async function run(fn) {
119
+ try {
120
+ return JSON.stringify(await fn());
121
+ } catch (error) {
122
+ if (error instanceof KtemiaError) return JSON.stringify({ error: error.toJSON() });
123
+ throw error;
124
+ }
125
+ }
126
+ function withHint(name, page) {
127
+ const pagingHint = page.noResults ? "The search matched nothing. Suggest other dates, a nearby airport, or fewer filters." : page.nextToken ? `More results are available. To read the next page, call ${name} with nextToken only.` : "This is the last page of results.";
128
+ return { ...page, pagingHint };
129
+ }
130
+ var str = (value) => value === void 0 ? "" : String(value);
131
+ function keyStatus(options = {}) {
132
+ const kt = resolveClient(options);
133
+ return tool(async (_input, config) => run(() => kt.keyStatus({ signal: config?.signal })), {
134
+ name: NAME.keyStatus,
135
+ description: toolDescription(NAME.keyStatus),
136
+ schema: keyStatusSchema
137
+ });
138
+ }
139
+ function lookup(options = {}) {
140
+ const kt = resolveClient(options);
141
+ return tool(async (input, config) => run(() => kt.lookup(input, { signal: config?.signal })), {
142
+ name: NAME.lookup,
143
+ description: toolDescription(NAME.lookup, ["quotaNote"]),
144
+ schema: lookupSchema
145
+ });
146
+ }
147
+ function searchFlights(options = {}) {
148
+ const kt = resolveClient(options);
149
+ return tool(
150
+ async ({ nextToken: nextToken2, ...params }, config) => run(async () => {
151
+ const signal = config?.signal;
152
+ return withHint(
153
+ F,
154
+ nextToken2 ? await kt.flights.page(nextToken2, { signal }) : await kt.flights.search(params, { signal })
155
+ );
156
+ }),
157
+ { name: F, description: toolDescription(F, SEARCH_NOTES), schema: flightSchema }
158
+ );
159
+ }
160
+ function searchHotels(options = {}) {
161
+ const kt = resolveClient(options);
162
+ return tool(
163
+ async ({ nextToken: nextToken2, location, checkin, checkout, ...rest }, config) => run(async () => {
164
+ const signal = config?.signal;
165
+ return withHint(
166
+ H,
167
+ nextToken2 ? await kt.hotels.page(nextToken2, { signal }) : await kt.hotels.search(
168
+ { ...rest, location: str(location), checkin: str(checkin), checkout: str(checkout) },
169
+ { signal }
170
+ )
171
+ );
172
+ }),
173
+ { name: H, description: toolDescription(H, SEARCH_NOTES), schema: hotelSchema }
174
+ );
175
+ }
176
+ function searchCars(options = {}) {
177
+ const kt = resolveClient(options);
178
+ return tool(
179
+ async ({ nextToken: nextToken2, pickupLocation, dropoffLocation, pickupDate, dropoffDate, ...rest }, config) => run(async () => {
180
+ const signal = config?.signal;
181
+ return withHint(
182
+ C,
183
+ nextToken2 ? await kt.cars.page(nextToken2, { signal }) : await kt.cars.search(
184
+ {
185
+ ...rest,
186
+ pickupLocation: str(pickupLocation),
187
+ ...dropoffLocation !== void 0 ? { dropoffLocation: String(dropoffLocation) } : {},
188
+ pickupDate: str(pickupDate),
189
+ dropoffDate: str(dropoffDate)
190
+ },
191
+ { signal }
192
+ )
193
+ );
194
+ }),
195
+ { name: C, description: toolDescription(C, SEARCH_NOTES), schema: carSchema }
196
+ );
197
+ }
198
+ function getDetails(options = {}) {
199
+ const kt = resolveClient(options);
200
+ return tool(
201
+ async ({ vertical, token, resultId }, config) => run(async () => ({
202
+ vertical,
203
+ ...await kt[vertical].details(token, String(resultId), { signal: config?.signal })
204
+ })),
205
+ {
206
+ name: D,
207
+ description: toolDescription(D, ["tokenLifetimeNote", "quotaNote", "searchNotBookNote"]),
208
+ schema: detailsSchema
209
+ }
210
+ );
211
+ }
212
+ function hotelReviews(options = {}) {
213
+ const kt = resolveClient(options);
214
+ return tool(
215
+ async ({ hotelId, ...rest }, config) => run(() => kt.hotels.reviews({ ...rest, hotelId: String(hotelId) }, { signal: config?.signal })),
216
+ { name: R, description: toolDescription(R, ["quotaNote"]), schema: reviewsSchema }
217
+ );
218
+ }
219
+ function ktemiaTools(options = {}) {
220
+ const shared = { client: resolveClient(options) };
221
+ return [
222
+ keyStatus(shared),
223
+ lookup(shared),
224
+ searchFlights(shared),
225
+ searchHotels(shared),
226
+ searchCars(shared),
227
+ getDetails(shared),
228
+ hotelReviews(shared)
229
+ ];
230
+ }
231
+ var KtemiaToolkit = class extends BaseToolkit {
232
+ tools;
233
+ constructor(options = {}) {
234
+ super();
235
+ this.tools = ktemiaTools(options);
236
+ }
237
+ };
238
+ export {
239
+ Ktemia2 as Ktemia,
240
+ KtemiaError2 as KtemiaError,
241
+ KtemiaToolkit,
242
+ VERSION,
243
+ getDetails,
244
+ hotelReviews,
245
+ keyStatus,
246
+ ktemiaTools,
247
+ lookup,
248
+ searchCars,
249
+ searchFlights,
250
+ searchHotels
251
+ };
252
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/index.ts"],"sourcesContent":["/**\n * Ktemia tools for LangChain.js.\n *\n * Each factory returns a LangChain `tool()`. Names and descriptions come from\n * the shared Ktemia tool spec, so a model sees the same guidance here as\n * through the Ktemia MCP server, the Vercel AI SDK tools, and the Python\n * `langchain-ktemia` package.\n *\n * Errors the model can act on (a past date, a spent quota, a rate limit) are\n * returned as `{\"error\": {...}}` JSON instead of thrown, so the model reads the\n * reason and decides what to do next, for example asking the user for a date.\n */\n\nimport { BaseToolkit, tool, type StructuredToolInterface } from \"@langchain/core/tools\";\nimport { z } from \"zod\";\nimport {\n Ktemia,\n KtemiaError,\n enumValues,\n paramDescription as p,\n toolDescription,\n type CarSearchParams,\n type KtemiaOptions,\n type SearchPage,\n type ToolName,\n} from \"ktemia\";\n\nexport const VERSION = \"0.1.1\";\n\nexport interface KtemiaToolOptions extends KtemiaOptions {\n /** Reuse an existing client instead of creating one from the options above. */\n client?: Ktemia;\n}\n\nconst NAME = {\n keyStatus: \"ktemia_key_status\",\n lookup: \"ktemia_lookup\",\n searchFlights: \"ktemia_search_flights\",\n searchHotels: \"ktemia_search_hotels\",\n searchCars: \"ktemia_search_cars\",\n getDetails: \"ktemia_get_details\",\n hotelReviews: \"ktemia_get_hotel_reviews\",\n} as const satisfies Record<string, ToolName>;\n\nconst SEARCH_NOTES = [\"askDoNotGuessNote\", \"tokenLifetimeNote\", \"quotaNote\", \"searchNotBookNote\"];\n\n// ── Schemas (limits match the live API) ──────────────────────────────────────\n\n/** Accepts ids a model copies as numbers: \"29230\" or 29230. */\nconst id = () => z.union([z.string().min(1), z.number()]);\n/**\n * A price above zero. Checked with refine, not `.positive()`: `.positive()`\n * emits `exclusiveMinimum`, which Gemini's API rejects outright (\"Unknown\n * name exclusiveMinimum\"), and @langchain/google-genai passes it through.\n */\nconst price = (n: ToolName, field: string) =>\n z\n .number()\n .refine((v) => v > 0, { message: \"Must be greater than 0\" })\n .optional()\n .describe(p(n, field));\nconst country = (n: ToolName) => z.string().length(2).optional().describe(p(n, \"country\"));\nconst sortOrder = (n: ToolName) => z.enum([\"asc\", \"desc\"]).optional().describe(p(n, \"sortOrder\"));\nconst nextToken = (n: ToolName) => z.string().optional().describe(p(n, \"nextToken\"));\n\nconst keyStatusSchema = z.object({});\n\nconst lookupSchema = z.object({\n kind: z.enum([\"airport\", \"airline\", \"hotelLocation\", \"carLocation\"]).describe(p(NAME.lookup, \"kind\")),\n query: z.string().min(1).describe(p(NAME.lookup, \"query\")),\n type: z.enum([\"city\", \"airport\", \"all\"]).optional().describe(p(NAME.lookup, \"type\")),\n country: country(NAME.lookup),\n locale: z.string().optional().describe(p(NAME.lookup, \"locale\")),\n});\n\nconst F = NAME.searchFlights;\nconst flightSchema = z.object({\n nextToken: nextToken(F),\n origin: z.string().optional().describe(p(F, \"origin\")),\n destination: z.string().optional().describe(p(F, \"destination\")),\n departureDate: z.string().optional().describe(p(F, \"departureDate\")),\n returnDate: z.string().optional().describe(p(F, \"returnDate\")),\n legs: z\n .array(z.object({ origin: z.string(), destination: z.string(), date: z.string() }))\n .optional()\n .describe(p(F, \"legs\")),\n cabin: z.enum([\"economy\", \"premiumEconomy\", \"business\", \"first\"]).optional().describe(p(F, \"cabin\")),\n passengers: z\n .object({\n adults: z.number().int().min(0).max(9).optional(),\n children: z.number().int().min(0).max(9).optional(),\n infantsOnLap: z.number().int().min(0).max(9).optional(),\n })\n .optional()\n .describe(p(F, \"passengers\")),\n maxStops: z.number().int().min(0).max(2).optional().describe(p(F, \"maxStops\")),\n airlines: z.array(z.string()).optional().describe(p(F, \"airlines\")),\n alliances: z.array(z.enum([\"oneworld\", \"skyteam\", \"starAlliance\"])).optional().describe(p(F, \"alliances\")),\n maxPrice: price(F, \"maxPrice\"),\n sortBy: z.enum([\"bestValue\", \"price\", \"duration\", \"departure\", \"arrival\"]).optional().describe(p(F, \"sortBy\")),\n sortOrder: sortOrder(F),\n country: country(F),\n});\n\nconst H = NAME.searchHotels;\nconst hotelSchema = z.object({\n nextToken: nextToken(H),\n location: id().optional().describe(p(H, \"location\")),\n checkin: z.string().optional().describe(p(H, \"checkin\")),\n checkout: z.string().optional().describe(p(H, \"checkout\")),\n adults: z.number().int().min(1).max(16).optional().describe(p(H, \"adults\")),\n rooms: z.number().int().min(1).max(8).optional().describe(p(H, \"rooms\")),\n childAges: z.array(z.number().int().min(0).max(17)).optional().describe(p(H, \"childAges\")),\n minStars: z.number().int().min(2).max(5).optional().describe(p(H, \"minStars\")),\n minRating: z.number().optional().describe(p(H, \"minRating\")),\n maxPrice: price(H, \"maxPrice\"),\n freeCancellation: z.boolean().optional().describe(p(H, \"freeCancellation\")),\n amenities: z.array(z.string()).optional().describe(p(H, \"amenities\")),\n providers: z.array(z.string()).optional().describe(p(H, \"providers\")),\n sortBy: z.enum([\"bestValue\", \"price\", \"rating\", \"stars\", \"distance\"]).optional().describe(p(H, \"sortBy\")),\n sortOrder: sortOrder(H),\n country: country(H),\n});\n\nconst C = NAME.searchCars;\nconst carClasses = enumValues(\"carClass\") as [\n NonNullable<CarSearchParams[\"carClass\"]>,\n ...NonNullable<CarSearchParams[\"carClass\"]>[],\n];\nconst carSchema = z.object({\n nextToken: nextToken(C),\n pickupLocation: id().optional().describe(p(C, \"pickupLocation\")),\n dropoffLocation: id().optional().describe(p(C, \"dropoffLocation\")),\n pickupDate: z.string().optional().describe(p(C, \"pickupDate\")),\n dropoffDate: z.string().optional().describe(p(C, \"dropoffDate\")),\n pickupTime: z.string().optional().describe(p(C, \"pickupTime\")),\n dropoffTime: z.string().optional().describe(p(C, \"dropoffTime\")),\n driverAge: z.number().int().min(18).max(99).optional().describe(p(C, \"driverAge\")),\n carClass: z.enum(carClasses).optional().describe(p(C, \"carClass\")),\n transmission: z.enum([\"automatic\", \"manual\"]).optional().describe(p(C, \"transmission\")),\n maxPrice: price(C, \"maxPrice\"),\n providers: z.array(z.string()).optional().describe(p(C, \"providers\")),\n agencies: z.array(z.string()).optional().describe(p(C, \"agencies\")),\n sortBy: z.enum([\"bestValue\", \"price\", \"rating\", \"distance\"]).optional().describe(p(C, \"sortBy\")),\n sortOrder: sortOrder(C),\n priceMode: z.enum([\"total\", \"perDay\"]).optional().describe(p(C, \"priceMode\")),\n country: country(C),\n});\n\nconst D = NAME.getDetails;\nconst detailsSchema = z.object({\n vertical: z.enum([\"flights\", \"hotels\", \"cars\"]).describe(p(D, \"vertical\")),\n token: z.string().min(1).describe(p(D, \"token\")),\n resultId: id().describe(p(D, \"resultId\")),\n});\n\nconst R = NAME.hotelReviews;\nconst reviewsSchema = z.object({\n hotelId: id().describe(p(R, \"hotelId\")),\n sortBy: z.enum([\"recent\", \"oldest\", \"highestScore\", \"lowestScore\"]).optional().describe(p(R, \"sortBy\")),\n travelerTypes: z\n .array(z.enum([\"families\", \"couples\", \"solo\", \"friends\", \"business\"]))\n .optional()\n .describe(p(R, \"travelerTypes\")),\n months: z.array(z.number().int().min(1).max(12)).optional().describe(p(R, \"months\")),\n sources: z.array(z.enum([\"booking\", \"agoda\", \"priceline\"])).optional().describe(p(R, \"sources\")),\n search: z.string().optional().describe(p(R, \"search\")),\n page: z.number().int().min(1).max(1000).optional().describe(p(R, \"page\")),\n});\n\nexport type LookupInput = z.infer<typeof lookupSchema>;\nexport type SearchFlightsInput = z.infer<typeof flightSchema>;\nexport type SearchHotelsInput = z.infer<typeof hotelSchema>;\nexport type SearchCarsInput = z.infer<typeof carSchema>;\nexport type GetDetailsInput = z.infer<typeof detailsSchema>;\nexport type HotelReviewsInput = z.infer<typeof reviewsSchema>;\n\n// ── Helpers ──────────────────────────────────────────────────────────────────\n\nfunction resolveClient(options: KtemiaToolOptions): Ktemia {\n const { client, ...rest } = options;\n return client ?? new Ktemia({ userAgent: `langchain-js/${VERSION}`, ...rest });\n}\n\n/** Runs a call and returns JSON for the model: the result, or the error it can act on. */\nasync function run(fn: () => Promise<unknown>): Promise<string> {\n try {\n return JSON.stringify(await fn());\n } catch (error) {\n if (error instanceof KtemiaError) return JSON.stringify({ error: error.toJSON() });\n throw error;\n }\n}\n\nfunction withHint(name: ToolName, page: SearchPage): SearchPage & { pagingHint: string } {\n const pagingHint = page.noResults\n ? \"The search matched nothing. Suggest other dates, a nearby airport, or fewer filters.\"\n : page.nextToken\n ? `More results are available. To read the next page, call ${name} with nextToken only.`\n : \"This is the last page of results.\";\n return { ...page, pagingHint };\n}\n\nconst str = (value: string | number | undefined): string => (value === undefined ? \"\" : String(value));\n\n// ── Tools ────────────────────────────────────────────────────────────────────\n\n/** Plan, rate limits, and remaining monthly quota. Free: never counts against the quota. */\nexport function keyStatus(options: KtemiaToolOptions = {}) {\n const kt = resolveClient(options);\n return tool(async (_input, config) => run(() => kt.keyStatus({ signal: config?.signal })), {\n name: NAME.keyStatus,\n description: toolDescription(NAME.keyStatus),\n schema: keyStatusSchema,\n });\n}\n\n/** Resolves place and airline names to the codes and location ids searches need. */\nexport function lookup(options: KtemiaToolOptions = {}) {\n const kt = resolveClient(options);\n return tool(async (input, config) => run(() => kt.lookup(input, { signal: config?.signal })), {\n name: NAME.lookup,\n description: toolDescription(NAME.lookup, [\"quotaNote\"]),\n schema: lookupSchema,\n });\n}\n\n/** Searches flights. Pass nextToken alone to read the next page. */\nexport function searchFlights(options: KtemiaToolOptions = {}) {\n const kt = resolveClient(options);\n return tool(\n async ({ nextToken, ...params }, config) =>\n run(async () => {\n const signal = config?.signal;\n return withHint(\n F,\n nextToken ? await kt.flights.page(nextToken, { signal }) : await kt.flights.search(params, { signal }),\n );\n }),\n { name: F, description: toolDescription(F, SEARCH_NOTES), schema: flightSchema },\n );\n}\n\n/** Searches hotels by locationId. Pass nextToken alone to read the next page. */\nexport function searchHotels(options: KtemiaToolOptions = {}) {\n const kt = resolveClient(options);\n return tool(\n async ({ nextToken, location, checkin, checkout, ...rest }, config) =>\n run(async () => {\n const signal = config?.signal;\n return withHint(\n H,\n nextToken\n ? await kt.hotels.page(nextToken, { signal })\n : await kt.hotels.search(\n { ...rest, location: str(location), checkin: str(checkin), checkout: str(checkout) },\n { signal },\n ),\n );\n }),\n { name: H, description: toolDescription(H, SEARCH_NOTES), schema: hotelSchema },\n );\n}\n\n/** Searches rental cars by locationId. Pass nextToken alone to read the next page. */\nexport function searchCars(options: KtemiaToolOptions = {}) {\n const kt = resolveClient(options);\n return tool(\n async ({ nextToken, pickupLocation, dropoffLocation, pickupDate, dropoffDate, ...rest }, config) =>\n run(async () => {\n const signal = config?.signal;\n return withHint(\n C,\n nextToken\n ? await kt.cars.page(nextToken, { signal })\n : await kt.cars.search(\n {\n ...rest,\n pickupLocation: str(pickupLocation),\n ...(dropoffLocation !== undefined ? { dropoffLocation: String(dropoffLocation) } : {}),\n pickupDate: str(pickupDate),\n dropoffDate: str(dropoffDate),\n },\n { signal },\n ),\n );\n }),\n { name: C, description: toolDescription(C, SEARCH_NOTES), schema: carSchema },\n );\n}\n\n/** Every price and booking link for one chosen result. */\nexport function getDetails(options: KtemiaToolOptions = {}) {\n const kt = resolveClient(options);\n return tool(\n async ({ vertical, token, resultId }, config) =>\n run(async () => ({\n vertical,\n ...(await kt[vertical].details(token, String(resultId), { signal: config?.signal })),\n })),\n {\n name: D,\n description: toolDescription(D, [\"tokenLifetimeNote\", \"quotaNote\", \"searchNotBookNote\"]),\n schema: detailsSchema,\n },\n );\n}\n\n/** Guest reviews for one hotel, with filters and numbered pages. */\nexport function hotelReviews(options: KtemiaToolOptions = {}) {\n const kt = resolveClient(options);\n return tool(\n async ({ hotelId, ...rest }, config) =>\n run(() => kt.hotels.reviews({ ...rest, hotelId: String(hotelId) }, { signal: config?.signal })),\n { name: R, description: toolDescription(R, [\"quotaNote\"]), schema: reviewsSchema },\n );\n}\n\n/**\n * All seven Ktemia tools, sharing one client.\n *\n * ```ts\n * import { createAgent } from \"langchain\";\n * import { ktemiaTools } from \"@ktemia/langchain\";\n *\n * const agent = createAgent({ model: \"openai:gpt-5-mini\", tools: ktemiaTools() });\n * ```\n */\nexport function ktemiaTools(options: KtemiaToolOptions = {}): StructuredToolInterface[] {\n const shared = { client: resolveClient(options) };\n return [\n keyStatus(shared),\n lookup(shared),\n searchFlights(shared),\n searchHotels(shared),\n searchCars(shared),\n getDetails(shared),\n hotelReviews(shared),\n ];\n}\n\n/** The seven Ktemia tools as a LangChain toolkit. Same tools as {@link ktemiaTools}. */\nexport class KtemiaToolkit extends BaseToolkit {\n tools: StructuredToolInterface[];\n\n constructor(options: KtemiaToolOptions = {}) {\n super();\n this.tools = ktemiaTools(options);\n }\n}\n\nexport { Ktemia, KtemiaError } from \"ktemia\";\n"],"mappings":";AAaA,SAAS,aAAa,YAA0C;AAChE,SAAS,SAAS;AAClB;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA,oBAAoB;AAAA,EACpB;AAAA,OAKK;AAsUP,SAAS,UAAAA,SAAQ,eAAAC,oBAAmB;AApU7B,IAAM,UAAU;AAOvB,IAAM,OAAO;AAAA,EACX,WAAW;AAAA,EACX,QAAQ;AAAA,EACR,eAAe;AAAA,EACf,cAAc;AAAA,EACd,YAAY;AAAA,EACZ,YAAY;AAAA,EACZ,cAAc;AAChB;A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f;AAAA,MACA,GAAI,MAAM,GAAG,QAAQ,EAAE,QAAQ,OAAO,OAAO,QAAQ,GAAG,EAAE,QAAQ,QAAQ,OAAO,CAAC;AAAA,IACpF,EAAE;AAAA,IACJ;AAAA,MACE,MAAM;AAAA,MACN,aAAa,gBAAgB,GAAG,CAAC,qBAAqB,aAAa,mBAAmB,CAAC;AAAA,MACvF,QAAQ;AAAA,IACV;AAAA,EACF;AACF;AAGO,SAAS,aAAa,UAA6B,CAAC,GAAG;AAC5D,QAAM,KAAK,cAAc,OAAO;AAChC,SAAO;AAAA,IACL,OAAO,EAAE,SAAS,GAAG,KAAK,GAAG,WAC3B,IAAI,MAAM,GAAG,OAAO,QAAQ,EAAE,GAAG,MAAM,SAAS,OAAO,OAAO,EAAE,GAAG,EAAE,QAAQ,QAAQ,OAAO,CAAC,CAAC;AAAA,IAChG,EAAE,MAAM,GAAG,aAAa,gBAAgB,GAAG,CAAC,WAAW,CAAC,GAAG,QAAQ,cAAc;AAAA,EACnF;AACF;AAYO,SAAS,YAAY,UAA6B,CAAC,GAA8B;AACtF,QAAM,SAAS,EAAE,QAAQ,cAAc,OAAO,EAAE;AAChD,SAAO;AAAA,IACL,UAAU,MAAM;AAAA,IAChB,OAAO,MAAM;AAAA,IACb,cAAc,MAAM;AAAA,IACpB,aAAa,MAAM;AAAA,IACnB,WAAW,MAAM;AAAA,IACjB,WAAW,MAAM;AAAA,IACjB,aAAa,MAAM;AAAA,EACrB;AACF;AAGO,IAAM,gBAAN,cAA4B,YAAY;AAAA,EAC7C;AAAA,EAEA,YAAY,UAA6B,CAAC,GAAG;AAC3C,UAAM;AACN,SAAK,QAAQ,YAAY,OAAO;AAAA,EAClC;AACF;","names":["Ktemia","KtemiaError","nextToken"]}
package/package.json CHANGED
@@ -1,5 +1,74 @@
1
1
  {
2
2
  "name": "@ktemia/langchain",
3
- "version": "0.0.0",
4
- "description": "Placeholder. Real releases are published from GitHub Actions."
3
+ "version": "0.1.1",
4
+ "description": "Ktemia travel search tools for LangChain.js: let your agent compare flights, hotels, and rental cars across 100+ providers",
5
+ "license": "MIT",
6
+ "author": "Ktemia <contact@ktemia.com>",
7
+ "homepage": "https://www.ktemia.com/docs/langchain/",
8
+ "repository": {
9
+ "type": "git",
10
+ "url": "git+https://github.com/Ktemiaa/ktemia-agent-toolkit.git",
11
+ "directory": "packages/langchain"
12
+ },
13
+ "bugs": {
14
+ "url": "https://github.com/Ktemiaa/ktemia-agent-toolkit/issues"
15
+ },
16
+ "keywords": [
17
+ "langchain",
18
+ "langchainjs",
19
+ "@langchain/core",
20
+ "agent",
21
+ "tools",
22
+ "ktemia",
23
+ "travel",
24
+ "flights",
25
+ "hotels",
26
+ "car-rental",
27
+ "flight-search"
28
+ ],
29
+ "type": "module",
30
+ "sideEffects": false,
31
+ "main": "./dist/index.cjs",
32
+ "module": "./dist/index.js",
33
+ "types": "./dist/index.d.ts",
34
+ "exports": {
35
+ ".": {
36
+ "import": {
37
+ "types": "./dist/index.d.ts",
38
+ "default": "./dist/index.js"
39
+ },
40
+ "require": {
41
+ "types": "./dist/index.d.cts",
42
+ "default": "./dist/index.cjs"
43
+ }
44
+ },
45
+ "./package.json": "./package.json"
46
+ },
47
+ "files": [
48
+ "dist",
49
+ "README.md",
50
+ "LICENSE"
51
+ ],
52
+ "engines": {
53
+ "node": ">=20"
54
+ },
55
+ "scripts": {
56
+ "build": "tsup",
57
+ "typecheck": "tsc --noEmit"
58
+ },
59
+ "dependencies": {
60
+ "ktemia": "^0.1.1"
61
+ },
62
+ "peerDependencies": {
63
+ "@langchain/core": "^1.0.0",
64
+ "zod": "^3.25.76 || ^4.1.8"
65
+ },
66
+ "devDependencies": {
67
+ "@langchain/core": "^1.5.1",
68
+ "zod": "^4.1.8"
69
+ },
70
+ "publishConfig": {
71
+ "access": "public",
72
+ "provenance": true
73
+ }
5
74
  }