@agentfield/sdk 0.1.85-rc.7 → 0.1.85-rc.9

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
@@ -572,15 +572,15 @@ var init_opencode = __esm({
572
572
  this.bin = binPath;
573
573
  }
574
574
  async execute(prompt, options) {
575
- const cmd = [this.bin];
575
+ const cmd = [this.bin, "run"];
576
576
  if (options.cwd && typeof options.cwd === "string") {
577
- cmd.push("-c", options.cwd);
577
+ cmd.push("--dir", options.cwd);
578
578
  } else if (options.project_dir && typeof options.project_dir === "string") {
579
- cmd.push("-c", options.project_dir);
579
+ cmd.push("--dir", options.project_dir);
580
580
  }
581
581
  const env = { ...options.env };
582
582
  if (options.model) {
583
- env["MODEL"] = String(options.model);
583
+ cmd.push("-m", String(options.model));
584
584
  }
585
585
  let effectivePrompt = prompt;
586
586
  if (options.system_prompt && typeof options.system_prompt === "string" && options.system_prompt.trim()) {
@@ -592,7 +592,7 @@ ${options.system_prompt.trim()}
592
592
  USER REQUEST:
593
593
  ${prompt}`;
594
594
  }
595
- cmd.push("-p", effectivePrompt);
595
+ cmd.push(effectivePrompt);
596
596
  const startApi = Date.now();
597
597
  try {
598
598
  const { stdout, stderr, exitCode } = await runCli(cmd, { env });