@botbotgo/better-call 0.1.43 → 0.1.44

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/scripts/demo.mjs +9 -3
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@botbotgo/better-call",
3
- "version": "0.1.43",
3
+ "version": "0.1.44",
4
4
  "description": "Small-model tool-call reliability layer for LangChain and custom agent runtimes.",
5
5
  "type": "module",
6
6
  "license": "Apache-2.0",
package/scripts/demo.mjs CHANGED
@@ -113,10 +113,13 @@ function repairDemoStockCall(repairInput = {}) {
113
113
  ? attemptedArgs.symbol
114
114
  : "AAPL";
115
115
  const normalizedTicker = attemptedTicker.trim().toLowerCase();
116
+ // This demo falls back to AAPL when no ticker-like value is available.
116
117
  const ticker =
117
- normalizedTicker === "apple" || normalizedTicker === ""
118
+ normalizedTicker === ""
118
119
  ? "AAPL"
119
- : normalizedTicker.toUpperCase();
120
+ : normalizedTicker === "apple"
121
+ ? "AAPL"
122
+ : normalizedTicker.toUpperCase();
120
123
 
121
124
  const attemptedMarket = typeof attemptedArgs.market === "string" ? attemptedArgs.market : null;
122
125
  const market =
@@ -202,7 +205,10 @@ try {
202
205
  const gatewayRepair =
203
206
  gatewayResult != null && typeof gatewayResult === "object"
204
207
  ? gatewayResult
205
- : createGatewayErrorResult("research", "repairToolCall returned no result.");
208
+ : createGatewayErrorResult(
209
+ "research",
210
+ "repairToolCall returned an invalid result (expected object)."
211
+ );
206
212
 
207
213
  // Missing or empty calls are expected in some demo/error paths; normalize to null for reporting.
208
214
  // This demo reports only the first repaired call so the summary stays compact and stable.