MCPcopy Create free account
hub / github.com/tiann/hapi / createCursorAcpBackend

Function createCursorAcpBackend

cli/src/cursor/utils/cursorAcpBackend.ts:19–30  ·  view source on GitHub ↗
(opts: { cwd: string; model?: string | null })

Source from the content-addressed store, hash-verified

17}
18
19export function createCursorAcpBackend(opts: { cwd: string; model?: string | null }): AcpSdkBackend {
20 const args = ['acp'];
21 if (!isDefaultSpawnModel(opts.model)) {
22 args.unshift('--model', opts.model!.trim());
23 }
24
25 return new AcpSdkBackend({
26 command: 'agent',
27 args,
28 env: filterEnv(process.env)
29 });
30}
31
32export const CURSOR_ACP_REQUIRED_MESSAGE =
33 'Cursor ACP mode is required for new Cursor remote sessions. Run `agent update` and verify `agent help acp`.';

Callers 3

runCursorAcpModelProbeFunction · 0.90
runMainLoopMethod · 0.90

Calls 3

isDefaultSpawnModelFunction · 0.85
unshiftMethod · 0.80
filterEnvFunction · 0.70

Tested by

no test coverage detected