agent.libx.js 0.89.5 → 0.89.6
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 +13 -1
- package/dist/cli.js.map +1 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -3838,6 +3838,11 @@ async function buildAgent(o) {
|
|
|
3838
3838
|
const jailedDisk = new JailedFilesystem(disk);
|
|
3839
3839
|
jailedDisk.setCwd(cwd);
|
|
3840
3840
|
const virtual = o.sandbox || !!o.boddb;
|
|
3841
|
+
const isCursor = (o.model ?? "").startsWith("cursor/");
|
|
3842
|
+
if (virtual && isCursor)
|
|
3843
|
+
throw new Error(
|
|
3844
|
+
"cursor/* models cannot run in --sandbox/--boddb: the Cursor agent runs its own real-disk tools and bypasses the VFS jail. Use disk mode (default)."
|
|
3845
|
+
);
|
|
3841
3846
|
let fs = jailedDisk;
|
|
3842
3847
|
if (o.sandbox) {
|
|
3843
3848
|
const mem = new MemFilesystem2();
|
|
@@ -3899,6 +3904,10 @@ Reference files in them by their mount path (the left side).`;
|
|
|
3899
3904
|
ai: o.ai,
|
|
3900
3905
|
fs,
|
|
3901
3906
|
model: o.model ?? "anthropic/claude-sonnet-4-6",
|
|
3907
|
+
// Anchor cursor to the launch dir (its adapter defaults to TMPDIR otherwise). Gated to cursor:
|
|
3908
|
+
// openai/google adapters Object.assign providerOptions into the request body, so a blanket cwd
|
|
3909
|
+
// would corrupt those calls.
|
|
3910
|
+
...isCursor ? { providerOptions: { cwd } } : {},
|
|
3902
3911
|
...(() => {
|
|
3903
3912
|
const now = /* @__PURE__ */ new Date();
|
|
3904
3913
|
const platformNames = { darwin: "macOS", linux: "Linux", win32: "Windows" };
|
|
@@ -5980,7 +5989,10 @@ function makeHost(format = "text", opts) {
|
|
|
5980
5989
|
}
|
|
5981
5990
|
if (e.kind === "thinking_delta") {
|
|
5982
5991
|
if (streamJson) process.stdout.write(JSON.stringify({ type: "thinking", text: e.message }) + "\n");
|
|
5983
|
-
else if (!cleanStdout)
|
|
5992
|
+
else if (!cleanStdout) {
|
|
5993
|
+
if (md && md.pending()) process.stdout.write(md.flush() + "\n");
|
|
5994
|
+
process.stderr.write(dim(e.message));
|
|
5995
|
+
}
|
|
5984
5996
|
return;
|
|
5985
5997
|
}
|
|
5986
5998
|
if (md && md.pending()) process.stdout.write(md.flush() + "\n");
|