@livx.cc/agentx 0.99.49 → 0.99.51

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/cli.js CHANGED
@@ -13716,6 +13716,11 @@ function parseArgs(argv) {
13716
13716
  const f = argv[++i];
13717
13717
  if (f !== "text" && f !== "json" && f !== "stream-json") throw new Error(`invalid --output-format: ${f ?? "(missing)"} (use text|json|stream-json)`);
13718
13718
  a.outputFormat = f;
13719
+ } else if (x === "--") {
13720
+ rest.push(...argv.slice(i + 1));
13721
+ break;
13722
+ } else if (x.length > 1 && x.startsWith("-")) {
13723
+ throw new Error(`unknown flag: ${x} (see --help; to pass it as prompt text, put it after \`--\`)`);
13719
13724
  } else rest.push(x);
13720
13725
  }
13721
13726
  if (!a.task && rest.length) a.task = rest.join(" ");
@@ -17114,6 +17119,10 @@ async function main() {
17114
17119
  }
17115
17120
  if (args.debug) process.env.DEBUG ||= "*";
17116
17121
  if (args.print && !args.task && !process.stdin.isTTY) args.task = (await readAllStdin()).trim();
17122
+ if (args.print && !args.task) {
17123
+ console.error(red(" -p: empty prompt (no task argument and nothing on stdin)"));
17124
+ process.exit(2);
17125
+ }
17117
17126
  let worktreeCleanup;
17118
17127
  if (args.worktree) {
17119
17128
  const { enterWorktree: enterWorktree2, exitWorktree: exitWorktree2 } = await Promise.resolve().then(() => (init_worktree(), worktree_exports));