@livx.cc/agentx 0.99.53 → 0.99.55

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
@@ -2798,15 +2798,25 @@ var askUserQuestionTool = {
2798
2798
  multiSelect: { type: "boolean" }
2799
2799
  }
2800
2800
  },
2801
- async run(args, ctx) {
2801
+ async run(input, ctx) {
2802
+ const args = normalizeQuestion(input);
2803
+ if (typeof args === "string") return args;
2802
2804
  if (!ctx.host?.ask) {
2803
2805
  ctx.needsInput = args;
2804
2806
  return "PAUSED \u2014 no interactive user is reachable from this run, so your question has been raised to the caller that delegated this task. The run stops here; do not guess and do not continue. Their answer will arrive as the next user message when the run resumes.";
2805
2807
  }
2806
2808
  const answer = ctx.host.ask(args);
2807
- return ctx.parkHuman ? ctx.parkHuman(answer) : answer;
2809
+ return String(await (ctx.parkHuman ? ctx.parkHuman(answer) : answer) ?? "");
2808
2810
  }
2809
2811
  };
2812
+ function normalizeQuestion(input) {
2813
+ const raw = input?.questions?.[0] ?? input;
2814
+ const q = raw ?? {};
2815
+ const options = (Array.isArray(q.options) ? q.options : []).map((o) => typeof o === "string" ? { label: o } : { label: String(o?.label ?? ""), description: o?.description }).filter((o) => o.label.trim());
2816
+ if (typeof q.question !== "string" || !q.question.trim() || !options.length)
2817
+ return "Error: AskUserQuestion needs {question: string, options: [{label, description?}] (non-empty)}.";
2818
+ return { question: q.question, header: typeof q.header === "string" ? q.header : void 0, options, multiSelect: q.multiSelect === true };
2819
+ }
2810
2820
  var ScriptedHostBridge = class {
2811
2821
  constructor(answers = [], confirmDefault = true) {
2812
2822
  this.answers = answers;
@@ -3366,7 +3376,9 @@ import { join as join3 } from "path";
3366
3376
  var MODEL_ALIASES = {
3367
3377
  fable: "claude-fable-5",
3368
3378
  "fable-5": "claude-fable-5",
3369
- opus: "claude-opus-4-8",
3379
+ opus: "claude-opus-5-5",
3380
+ "opus-5-5": "claude-opus-5-5",
3381
+ "opus-5": "claude-opus-5",
3370
3382
  "opus-4-8": "claude-opus-4-8",
3371
3383
  "opus-4-7": "claude-opus-4-7",
3372
3384
  "opus-4-6": "claude-opus-4-6",