11/**
2- * CursorDriver — `ProviderDriver` for the Cursor Agent (`agent`) runtime.
2+ * CursorDriver — `ProviderDriver` for the Cursor Agent (`cursor- agent`) runtime.
33 *
44 * Cursor exposes an ACP-based CLI. Model catalog and capability refreshes
55 * happen during the managed provider status check via Cursor's
@@ -42,7 +42,7 @@ import type { ServerProviderDraft } from "../providerSnapshot.ts";
4242import { mergeProviderInstanceEnvironment } from "../ProviderInstanceEnvironment.ts" ;
4343import {
4444 makeProviderMaintenanceCapabilities ,
45- makeStaticProviderMaintenanceResolver ,
45+ type ProviderMaintenanceCapabilitiesResolver ,
4646 resolveProviderMaintenanceCapabilitiesEffect ,
4747} from "../providerMaintenance.ts" ;
4848import {
@@ -54,15 +54,16 @@ const decodeCursorSettings = Schema.decodeSync(CursorSettings);
5454
5555const DRIVER_KIND = ProviderDriverKind . make ( "cursor" ) ;
5656const SNAPSHOT_REFRESH_INTERVAL = Duration . minutes ( 5 ) ;
57- const UPDATE = makeStaticProviderMaintenanceResolver (
58- makeProviderMaintenanceCapabilities ( {
59- provider : DRIVER_KIND ,
60- packageName : null ,
61- updateExecutable : "agent" ,
62- updateArgs : [ "update" ] ,
63- updateLockKey : "cursor-agent" ,
64- } ) ,
65- ) ;
57+ const UPDATE : ProviderMaintenanceCapabilitiesResolver = {
58+ resolve : ( options ) =>
59+ makeProviderMaintenanceCapabilities ( {
60+ provider : DRIVER_KIND ,
61+ packageName : null ,
62+ updateExecutable : options ?. binaryPath ?. trim ( ) || "cursor-agent" ,
63+ updateArgs : [ "update" ] ,
64+ updateLockKey : "cursor-agent" ,
65+ } ) ,
66+ } ;
6667
6768export type CursorDriverEnv =
6869 | ChildProcessSpawner . ChildProcessSpawner
0 commit comments