@axiom-lattice/core 2.1.59 → 2.1.60

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 CHANGED
@@ -6454,14 +6454,15 @@ function createAskUserClarifyMiddleware() {
6454
6454
  });
6455
6455
  }
6456
6456
  }
6457
- const input = toolCall?.args;
6458
- if (!input?.questions || input.questions.length === 0) {
6457
+ const parsed = inputSchema.safeParse(toolCall?.args);
6458
+ if (!parsed.success) {
6459
6459
  return new import_langchain46.ToolMessage({
6460
- content: "No questions provided.",
6460
+ content: `Invalid clarify tool arguments: ${parsed.error.message}`,
6461
6461
  tool_call_id: toolCall?.id,
6462
6462
  name: toolName
6463
6463
  });
6464
6464
  }
6465
+ const input = parsed.data;
6465
6466
  const uiData = {
6466
6467
  questions: input.questions.map((q) => ({
6467
6468
  question: q.question,