agent.libx.js 0.87.1 → 0.87.3

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.
@@ -235,6 +235,8 @@ declare class AgentOptions {
235
235
  command: string;
236
236
  tools?: string[];
237
237
  };
238
+ /** Provider-specific options forwarded to ai.chat() (e.g. cursor mcpServers, cwd). */
239
+ providerOptions?: Record<string, unknown>;
238
240
  }
239
241
  /**
240
242
  * The agentic loop: chat() -> dispatch tool_calls over the VFS -> thread results
package/dist/cli.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env bun
2
- import { g as RunResult } from './Agent-WTkHB8RY.js';
2
+ import { g as RunResult } from './Agent-tfPQy4k5.js';
3
3
  import { IFilesystem } from '@livx.cc/wcli/core';
4
4
  import { M as Message, c as ContentPart } from './tools-Ch-OzOU8.js';
5
5
 
package/dist/cli.js CHANGED
@@ -2557,6 +2557,8 @@ var AgentOptions = class {
2557
2557
  /** Opt-in: after a write-class tool runs, run `command` over the VFS and append any failure to the tool result.
2558
2558
  * `tools` defaults to ['Write','Edit','MultiEdit','ApplyEdits']. */
2559
2559
  autoTest;
2560
+ /** Provider-specific options forwarded to ai.chat() (e.g. cursor mcpServers, cwd). */
2561
+ providerOptions;
2560
2562
  };
2561
2563
  var Agent = class _Agent {
2562
2564
  options;
@@ -2755,10 +2757,10 @@ var Agent = class _Agent {
2755
2757
  const sent = this.trimContext();
2756
2758
  try {
2757
2759
  if (useStream) {
2758
- const r = await o.ai.chat({ model: o.model, messages: sent, tools: wireTools, stream: true, signal: o.signal });
2760
+ const r = await o.ai.chat({ model: o.model, messages: sent, tools: wireTools, stream: true, signal: o.signal, providerOptions: o.providerOptions });
2759
2761
  res = await this.consumeStream(r);
2760
2762
  } else {
2761
- const r = await o.ai.chat({ model: o.model, messages: sent, tools: wireTools, stream: false, signal: o.signal });
2763
+ const r = await o.ai.chat({ model: o.model, messages: sent, tools: wireTools, stream: false, signal: o.signal, providerOptions: o.providerOptions });
2762
2764
  res = r;
2763
2765
  }
2764
2766
  } catch (err2) {