cursor adapter: use --yolo instead of --trust
The --yolo flag bypasses interactive prompts more broadly than --trust. Updated execute, test probe, docs, and test expectations. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
e31d77bc47
commit
69b2875060
4 changed files with 7 additions and 7 deletions
|
|
@ -79,5 +79,5 @@ Notes:
|
||||||
- Prompts are piped to Cursor via stdin.
|
- Prompts are piped to Cursor via stdin.
|
||||||
- Sessions are resumed with --resume when stored session cwd matches current cwd.
|
- Sessions are resumed with --resume when stored session cwd matches current cwd.
|
||||||
- Paperclip auto-injects local skills into "~/.cursor/skills" when missing, so Cursor can discover "$paperclip" and related skills on local runs.
|
- Paperclip auto-injects local skills into "~/.cursor/skills" when missing, so Cursor can discover "$paperclip" and related skills on local runs.
|
||||||
- Paperclip auto-adds --trust unless one of --trust/--yolo/-f is already present in extraArgs.
|
- Paperclip auto-adds --yolo unless one of --trust/--yolo/-f is already present in extraArgs.
|
||||||
`;
|
`;
|
||||||
|
|
|
||||||
|
|
@ -299,7 +299,7 @@ export async function execute(ctx: AdapterExecutionContext): Promise<AdapterExec
|
||||||
const commandNotes = (() => {
|
const commandNotes = (() => {
|
||||||
const notes: string[] = [];
|
const notes: string[] = [];
|
||||||
if (autoTrustEnabled) {
|
if (autoTrustEnabled) {
|
||||||
notes.push("Auto-added --trust to bypass interactive workspace trust prompt.");
|
notes.push("Auto-added --yolo to bypass interactive prompts.");
|
||||||
}
|
}
|
||||||
notes.push("Prompt is piped to Cursor via stdin.");
|
notes.push("Prompt is piped to Cursor via stdin.");
|
||||||
if (!instructionsFilePath) return notes;
|
if (!instructionsFilePath) return notes;
|
||||||
|
|
@ -333,7 +333,7 @@ export async function execute(ctx: AdapterExecutionContext): Promise<AdapterExec
|
||||||
if (resumeSessionId) args.push("--resume", resumeSessionId);
|
if (resumeSessionId) args.push("--resume", resumeSessionId);
|
||||||
if (model) args.push("--model", model);
|
if (model) args.push("--model", model);
|
||||||
if (mode) args.push("--mode", mode);
|
if (mode) args.push("--mode", mode);
|
||||||
if (autoTrustEnabled) args.push("--trust");
|
if (autoTrustEnabled) args.push("--yolo");
|
||||||
if (extraArgs.length > 0) args.push(...extraArgs);
|
if (extraArgs.length > 0) args.push(...extraArgs);
|
||||||
return args;
|
return args;
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -138,7 +138,7 @@ export async function testEnvironment(
|
||||||
const autoTrustEnabled = !hasCursorTrustBypassArg(extraArgs);
|
const autoTrustEnabled = !hasCursorTrustBypassArg(extraArgs);
|
||||||
const args = ["-p", "--mode", "ask", "--output-format", "json", "--workspace", cwd];
|
const args = ["-p", "--mode", "ask", "--output-format", "json", "--workspace", cwd];
|
||||||
if (model) args.push("--model", model);
|
if (model) args.push("--model", model);
|
||||||
if (autoTrustEnabled) args.push("--trust");
|
if (autoTrustEnabled) args.push("--yolo");
|
||||||
if (extraArgs.length > 0) args.push(...extraArgs);
|
if (extraArgs.length > 0) args.push(...extraArgs);
|
||||||
args.push("Respond with hello.");
|
args.push("Respond with hello.");
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -53,7 +53,7 @@ describe("cursor environment diagnostics", () => {
|
||||||
await fs.rm(path.dirname(cwd), { recursive: true, force: true });
|
await fs.rm(path.dirname(cwd), { recursive: true, force: true });
|
||||||
});
|
});
|
||||||
|
|
||||||
it("adds --trust to hello probe args by default", async () => {
|
it("adds --yolo to hello probe args by default", async () => {
|
||||||
const root = path.join(
|
const root = path.join(
|
||||||
os.tmpdir(),
|
os.tmpdir(),
|
||||||
`paperclip-cursor-local-probe-${Date.now()}-${Math.random().toString(16).slice(2)}`,
|
`paperclip-cursor-local-probe-${Date.now()}-${Math.random().toString(16).slice(2)}`,
|
||||||
|
|
@ -80,11 +80,11 @@ describe("cursor environment diagnostics", () => {
|
||||||
|
|
||||||
expect(result.status).toBe("pass");
|
expect(result.status).toBe("pass");
|
||||||
const args = JSON.parse(await fs.readFile(argsCapturePath, "utf8")) as string[];
|
const args = JSON.parse(await fs.readFile(argsCapturePath, "utf8")) as string[];
|
||||||
expect(args).toContain("--trust");
|
expect(args).toContain("--yolo");
|
||||||
await fs.rm(root, { recursive: true, force: true });
|
await fs.rm(root, { recursive: true, force: true });
|
||||||
});
|
});
|
||||||
|
|
||||||
it("does not auto-add --trust when extraArgs already bypass trust", async () => {
|
it("does not auto-add --yolo when extraArgs already bypass trust", async () => {
|
||||||
const root = path.join(
|
const root = path.join(
|
||||||
os.tmpdir(),
|
os.tmpdir(),
|
||||||
`paperclip-cursor-local-probe-extra-${Date.now()}-${Math.random().toString(16).slice(2)}`,
|
`paperclip-cursor-local-probe-extra-${Date.now()}-${Math.random().toString(16).slice(2)}`,
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue