@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.mjs CHANGED
@@ -6242,14 +6242,15 @@ function createAskUserClarifyMiddleware() {
6242
6242
  });
6243
6243
  }
6244
6244
  }
6245
- const input = toolCall?.args;
6246
- if (!input?.questions || input.questions.length === 0) {
6245
+ const parsed = inputSchema.safeParse(toolCall?.args);
6246
+ if (!parsed.success) {
6247
6247
  return new ToolMessage2({
6248
- content: "No questions provided.",
6248
+ content: `Invalid clarify tool arguments: ${parsed.error.message}`,
6249
6249
  tool_call_id: toolCall?.id,
6250
6250
  name: toolName
6251
6251
  });
6252
6252
  }
6253
+ const input = parsed.data;
6253
6254
  const uiData = {
6254
6255
  questions: input.questions.map((q) => ({
6255
6256
  question: q.question,