@riverintel/stayfinder-plugin 0.2.1 → 0.2.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.
@@ -1 +1 @@
1
- {"version":3,"file":"search-stays.d.ts","sourceRoot":"","sources":["../../src/tools/search-stays.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAeH,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;EAgHnC,CAAC;AA4BF,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,GAAG,GAAG,GAAG,CA4EnD"}
1
+ {"version":3,"file":"search-stays.d.ts","sourceRoot":"","sources":["../../src/tools/search-stays.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAeH,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;EA6HnC,CAAC;AA4BF,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,GAAG,GAAG,GAAG,CA4EnD"}
@@ -79,12 +79,24 @@ export const SearchStaysParamsSchema = Type.Object({
79
79
  Type.Literal('price_desc'),
80
80
  Type.Literal('rating_desc'),
81
81
  Type.Literal('distance'),
82
- ], { default: 'recommended', description: 'Sort order for results.' })),
82
+ ], {
83
+ default: 'recommended',
84
+ description: "Sort order for results. Pick based on what the user has said:\n" +
85
+ "- 'recommended' (DEFAULT): adapter-chosen balance of price and value. " +
86
+ "Use this for generic queries with no explicit sort preference. When hotel_name is also set, the adapter " +
87
+ "internally substitutes a rating-based sort so chain flagships surface; you don't need to override.\n" +
88
+ "- 'price_asc': cheapest first. Use when the user said 'cheapest', 'budget', 'under $X', 'most affordable'.\n" +
89
+ "- 'price_desc': most expensive first. Use when the user said 'splurge', 'luxury', 'high-end', 'best available'.\n" +
90
+ "- 'rating_desc': highest guest rating first. Use when the user said 'best reviewed', 'highly rated', 'top-rated'.\n" +
91
+ "- 'distance': closest to the destination center first. Use when the user said 'central', 'downtown', 'closest', 'walking distance', 'near [landmark]'.\n" +
92
+ "Don't pick a non-default sort unless the user's words clearly signal it.",
93
+ })),
83
94
  limit: Type.Optional(Type.Integer({
84
95
  minimum: 1,
85
- maximum: 25,
96
+ maximum: 100,
86
97
  default: 10,
87
- description: 'Maximum number of results to return. Use smaller values (5-10) for chat responses, larger (15-25) for detailed comparison.',
98
+ description: 'Maximum number of results to return. Use 10 (default) for generic destination searches. ' +
99
+ 'When using hotel_name to find a specific property, use 50 to widen the candidate pool.',
88
100
  })),
89
101
  intent: Type.Optional(Type.String({
90
102
  maxLength: 280,
@@ -1 +1 @@
1
- {"version":3,"file":"search-stays.js","sourceRoot":"","sources":["../../src/tools/search-stays.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAEzC,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,YAAY,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AACjE,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAEnD,OAAO,EAAE,0BAA0B,EAAE,MAAM,kBAAkB,CAAC;AAE9D,MAAM,SAAS,GAAG,cAAc,CAAC;AAEjC,MAAM,CAAC,MAAM,uBAAuB,GAAG,IAAI,CAAC,MAAM,CAChD;IACE,WAAW,EAAE,IAAI,CAAC,MAAM,CAAC;QACvB,SAAS,EAAE,CAAC;QACZ,SAAS,EAAE,GAAG;QACd,WAAW,EACT,oGAAoG;YACpG,gDAAgD;KACnD,CAAC;IACF,QAAQ,EAAE,IAAI,CAAC,MAAM,CAAC;QACpB,OAAO,EAAE,wBAAwB;QACjC,WAAW,EACT,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,IAAI,KAAK,CAAC,eAAe,CAAC,CAAC;YAEtD,+BAA+B;YAE/B,MAAM,MAAM,GAAG,IAAI,aAAa,CAAC;gBAC/B,MAAM;gBACN,QAAQ,EAAE,UAAU,CAAC,SAAS;gBAC9B,aAAa,EAAE,GAAG,CAAC,OAAO,IAAI,OAAO;aACtC,CAAC,CAAC;YAEH,IAAI,QAAQ,CAAC;YACb,IAAI,CAAC;gBACH,QAAQ,GAAG,MAAM,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;YAC5C,CAAC;YAAC,OAAO,GAAG,EAAE,CAAC;gBACb,IAAI,GAAG,YAAY,YAAY,EAAE,CAAC;oBAChC,MAAM,IAAI,KAAK,CAAC,mBAAmB,CAAC,GAAG,CAAC,CAAC,CAAC;gBAC5C,CAAC;gBACD,MAAM,GAAG,CAAC;YACZ,CAAC;YAED,8DAA8D;YAE9D,KAAK,MAAM,QAAQ,IAAI,QAAQ,CAAC,OAAO,EAAE,CAAC;gBACxC,IAAI,QAAQ,CAAC,aAAa,EAAE,CAAC;oBAC3B,QAAQ,CAAC,aAAa,GAAG,mBAAmB,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAC;gBACvE,CAAC;YACH,CAAC;YAED,4CAA4C;YAE5C,MAAM,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;YAC/C,OAAO,cAAc,CAAC,IAAI,GAAG,UAAU,EAAE,QAAQ,CAAC,CAAC;QACrD,CAAC;KACF,CAAC;AACJ,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riverintel/stayfinder-plugin",
3
- "version": "0.2.1",
3
+ "version": "0.2.2",
4
4
  "description": "OpenClaw plugin for live hotel and vacation rental search via the StayFinder service. Returns real-time pricing, availability, and Expedia booking redirect links — no scraping, no browser automation.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -79,20 +79,34 @@ Triggers include:
79
79
 
80
80
  2. **Ask for missing required fields** before calling the tool. Don't guess dates. Don't assume party size. A typical follow-up: *"What dates are you looking at, and how many guests?"*
81
81
 
82
- 3. **Set `hotel_name`** when the user asks about a specific property by name — e.g., "Is the Four Seasons available?", "Find me a Hilton in Seattle." This searches across hotel name, description, address, and amenities. It can be combined with `destination` to narrow results within a city, or used alone. Do NOT put the hotel name in the `destination` field — that's for locations only.
82
+ 3. **Set `hotel_name`** when the user asks about a specific property by name — e.g., "Is the Four Seasons available?", "Find me a Hilton in Seattle." This searches across hotel name, description, address, and amenities. It can be combined with `destination` to narrow results within a city, or used alone. Do NOT put the hotel name in the `destination` field — that's for locations only. When you set `hotel_name`, also pass `limit: 50` — see the limit guidance below.
83
83
 
84
- 4. **Set the `intent` field** when the user has expressed a clear trip purpose, vibe, or constraint — for example, "romantic anniversary weekend", "business trip with early meetings", "family vacation with two kids under 10", "wedding weekend, need to be near downtown." Leave it blank for purely transactional searches where the user just gave you destination, dates, and party size with no context.
84
+ 4. **Set `limit` based on query type:**
85
+ - **Default (10)** for typical destination queries ("hotels in Seattle, May 15-17"). The agent surfaces 3-5 cards regardless of how many candidates come back; 10 is plenty for that.
86
+ - **`limit: 50`** when `hotel_name` is set or the user is searching by property name. The specific property often doesn't rank in the top 10 by the default sort; a wider candidate pool makes it much more likely the property surfaces.
87
+ - **`limit: 100`** only for very broad surveys ("show me every Marriott in Manhattan"). Each result costs ~500-1000 tokens of context; don't ask for 100 unless you'll use it.
85
88
 
86
- 5. **Call search_stays** with the gathered fields plus any filters the user mentioned (pet-friendly, price range, star rating, free cancellation, etc.).
89
+ 5. **Set `sort` only when the user's words clearly signal a preference:**
90
+ - **Don't pass `sort`** for most queries — the default (`recommended`) is correct.
91
+ - **`sort: 'price_asc'`** when the user said "cheapest," "budget," "under $X," "most affordable."
92
+ - **`sort: 'price_desc'`** when the user said "splurge," "luxury," "high-end," "best available."
93
+ - **`sort: 'rating_desc'`** when the user said "best reviewed," "highly rated," "top-rated."
94
+ - **`sort: 'distance'`** when the user said "central," "downtown," "closest," "walking distance," "near [landmark]."
87
95
 
88
- 6. **If the search returns zero results**, try these before giving up:
96
+ Special interaction with `hotel_name`: when `hotel_name` is set and you don't pass `sort`, the adapter automatically prefers a rating-based sort internally (chain flagships rank higher by guest rating than by deals). You don't need to override `sort` yourself in that case. If the user explicitly said "cheapest Hyatt," pass `sort: 'price_asc'` and the adapter respects your choice.
97
+
98
+ 6. **Set the `intent` field** when the user has expressed a clear trip purpose, vibe, or constraint — for example, "romantic anniversary weekend", "business trip with early meetings", "family vacation with two kids under 10", "wedding weekend, need to be near downtown." Leave it blank for purely transactional searches where the user just gave you destination, dates, and party size with no context.
99
+
100
+ 7. **Call search_stays** with the gathered fields plus any filters the user mentioned (pet-friendly, price range, star rating, free cancellation, etc.).
101
+
102
+ 8. **If the search returns zero results**, try these before giving up:
89
103
  - Use a more specific destination (e.g., "Kihei, Maui" instead of "Maui") — the service resolves free-text destinations and specific town names work better than broad region names
90
104
  - For vacation rentals in resort/rural areas, the inventory may be spread across a wider area than city hotels — some destinations just have limited coverage
91
105
  - Tell the user honestly if nothing came back and suggest a nearby alternative or different dates
92
106
 
93
- 7. **Present 3-5 top options** to the user, not all 25. Focus on price, location, and the most distinctive feature. Include the redirect_link for each so the user can book.
107
+ 9. **Present 3-5 top options** to the user, not all 25. Focus on price, location, and the most distinctive feature. Include the redirect_link for each so the user can book.
94
108
 
95
- 8. **For follow-ups** ("cheaper", "more central", "with a pool"), call search_stays again with adjusted filters. Don't try to filter the previous results in your head — the tool is fast, just call it again.
109
+ 10. **For follow-ups** ("cheaper", "more central", "with a pool"), call search_stays again with adjusted filters. Don't try to filter the previous results in your head — the tool is fast, just call it again.
96
110
 
97
111
  ## Output format for the user
98
112