diff --git a/apps/server/package.json b/apps/server/package.json index a6e11d0fa1..555519bbc8 100644 --- a/apps/server/package.json +++ b/apps/server/package.json @@ -30,7 +30,7 @@ "@anthropic-ai/claude-agent-sdk": "^0.3.170", "@connectrpc/connect": "1.7.0", "@connectrpc/connect-node": "1.7.0", - "@cursor/sdk": "1.0.19", + "@cursor/sdk": "1.0.22", "@effect/platform-bun": "catalog:", "@effect/platform-node": "catalog:", "@effect/platform-node-shared": "catalog:", diff --git a/apps/server/src/orchestration-v2/Adapters/CursorAgentSdk.test.ts b/apps/server/src/orchestration-v2/Adapters/CursorAgentSdk.test.ts new file mode 100644 index 0000000000..754ca76d79 --- /dev/null +++ b/apps/server/src/orchestration-v2/Adapters/CursorAgentSdk.test.ts @@ -0,0 +1,119 @@ +import * as NodeServices from "@effect/platform-node/NodeServices"; +import { assert, describe, it } from "@effect/vitest"; +import { ProviderSessionId, ThreadId } from "@t3tools/contracts"; +import * as Effect from "effect/Effect"; +import * as Layer from "effect/Layer"; +import { vi } from "vite-plus/test"; + +import { ServerConfig } from "../../config.ts"; +import { + CursorAgentSdkRunner, + CursorAgentSdkRunnerError, + cursorAgentSdkRunnerLiveLayer, +} from "./CursorAgentSdk.ts"; + +const cursorSdkMock = vi.hoisted(() => { + const runWait = vi.fn(async () => ({ + id: "run-cursor-agent-sdk-test", + requestId: "request-cursor-agent-sdk-test", + status: "finished", + result: "ok", + model: { id: "default" }, + durationMs: 1, + })); + const runCancel = vi.fn(async () => {}); + const agentClose = vi.fn(() => {}); + const send = vi.fn( + async ( + _message: unknown, + options: { readonly onDelta?: (input: { readonly update: unknown }) => Promise }, + ) => { + await options.onDelta?.({ + update: { + type: "assistant-message-chunk", + text: "hello", + }, + }); + return { + id: "run-cursor-agent-sdk-test", + agentId: "agent-cursor-agent-sdk-test", + wait: runWait, + cancel: runCancel, + }; + }, + ); + const create = vi.fn(async () => ({ + agentId: "agent-cursor-agent-sdk-test", + send, + close: agentClose, + })); + + return { + agentClose, + create, + runCancel, + runWait, + send, + }; +}); + +vi.mock("@cursor/sdk", () => ({ + Agent: { + create: cursorSdkMock.create, + resume: vi.fn(), + messages: { + list: vi.fn(async () => []), + }, + }, +})); + +const testLayer = cursorAgentSdkRunnerLiveLayer.pipe( + Layer.provide( + ServerConfig.layerTest(process.cwd(), { + prefix: "t3-cursor-agent-sdk-runner-", + }), + ), + Layer.provide(NodeServices.layer), +); + +describe("CursorAgentSdkRunner", () => { + it.effect("surfaces interaction callback failures through run.wait", () => + Effect.gen(function* () { + cursorSdkMock.create.mockClear(); + cursorSdkMock.runWait.mockClear(); + cursorSdkMock.send.mockClear(); + + const runner = yield* CursorAgentSdkRunner; + const session = yield* runner.open({ + operation: "create", + options: { + model: { id: "default" }, + mode: "agent", + local: { + cwd: process.cwd(), + autoReview: false, + sandboxOptions: { enabled: false }, + enableAgentRetries: true, + }, + }, + threadId: ThreadId.make("thread-cursor-agent-sdk-test"), + providerSessionId: ProviderSessionId.make("provider-session-cursor-agent-sdk-test"), + }); + + const callbackFailure = new Error("delta callback failed"); + const run = yield* session.send({ + message: "hello", + onDelta: () => Effect.fail(callbackFailure), + }); + + const error = yield* Effect.flip(run.wait); + + assert.instanceOf(error, CursorAgentSdkRunnerError); + assert.equal(error.method, "run.wait"); + assert.strictEqual(error.cause, callbackFailure); + assert.equal(cursorSdkMock.create.mock.calls.length, 1); + assert.equal(cursorSdkMock.send.mock.calls.length, 1); + assert.equal(cursorSdkMock.runWait.mock.calls.length, 1); + }).pipe(Effect.provide(testLayer)), + ); +}); diff --git a/apps/server/src/orchestration-v2/Adapters/CursorAgentSdk.ts b/apps/server/src/orchestration-v2/Adapters/CursorAgentSdk.ts index 5c474d9207..ab96f548af 100644 --- a/apps/server/src/orchestration-v2/Adapters/CursorAgentSdk.ts +++ b/apps/server/src/orchestration-v2/Adapters/CursorAgentSdk.ts @@ -366,22 +366,30 @@ export const cursorAgentSdkRunnerLiveLayer: Layer.Layer = []; + let callbackFailure: { readonly cause: unknown } | undefined; let callbackChain = Promise.resolve(); let runId = ""; const dispatchUpdate = (update: InteractionUpdate): Promise => { - callbackChain = callbackChain.then(() => - Effect.runPromiseWith(context)( - log({ - direction: "incoming", - stage: "decoded", - payload: { - type: "interaction.update", - runId, - update, - }, - }).pipe(Effect.andThen(sendInput.onDelta?.(update) ?? Effect.void)), - ), - ); + callbackChain = callbackChain + .then(() => { + if (callbackFailure !== undefined) { + return; + } + return Effect.runPromiseWith(context)( + log({ + direction: "incoming", + stage: "decoded", + payload: { + type: "interaction.update", + runId, + update, + }, + }).pipe(Effect.andThen(sendInput.onDelta?.(update) ?? Effect.void)), + ); + }) + .catch((cause) => { + callbackFailure ??= { cause }; + }); return callbackChain; }; @@ -424,6 +432,9 @@ export const cursorAgentSdkRunnerLiveLayer: Layer.Layer { const result = await run.wait(); await callbackChain; + if (callbackFailure !== undefined) { + throw callbackFailure.cause; + } return result; }, catch: (cause) => runnerError(cause, "run.wait"), diff --git a/apps/server/src/provider/Drivers/CursorDriver.ts b/apps/server/src/provider/Drivers/CursorDriver.ts index e071c8a374..220b727897 100644 --- a/apps/server/src/provider/Drivers/CursorDriver.ts +++ b/apps/server/src/provider/Drivers/CursorDriver.ts @@ -1,9 +1,8 @@ /** - * CursorDriver — `ProviderDriver` for the Cursor Agent (`cursor-agent`) runtime. + * CursorDriver — `ProviderDriver` for the Cursor Agent SDK runtime. * - * Provider status and model discovery use the official Cursor SDK when an API - * key is configured. The ACP CLI remains the compatibility fallback for - * installations that authenticate through the local Cursor binary. + * Provider status, model discovery, and orchestration use the official Cursor + * SDK and require CURSOR_API_KEY in the provider instance environment. * * Text generation is supported via the ACP runtime — `makeCursorTextGeneration` * drives `runtime.prompt` with a structured-output schema and collects the @@ -103,10 +102,6 @@ export const CursorDriver: ProviderDriver = { defaultConfig: (): CursorSettings => decodeCursorSettings({}), create: ({ instanceId, displayName, accentColor, environment, enabled, config }) => Effect.gen(function* () { - const crypto = yield* Crypto.Crypto; - const spawner = yield* ChildProcessSpawner.ChildProcessSpawner; - const fileSystem = yield* FileSystem.FileSystem; - const path = yield* Path.Path; const httpClient = yield* HttpClient.HttpClient; const serverSettings = yield* ServerSettingsService; const processEnv = mergeProviderInstanceEnvironment(environment); @@ -149,9 +144,6 @@ export const CursorDriver: ProviderDriver = { const checkProvider = checkCursorProviderStatus(effectiveConfig, processEnv).pipe( Effect.map(stampIdentity), Effect.provide(CursorSdkCatalogLive), - Effect.provideService(ChildProcessSpawner.ChildProcessSpawner, spawner), - Effect.provideService(FileSystem.FileSystem, fileSystem), - Effect.provideService(Path.Path, path), ); const snapshotSettings = makeProviderSnapshotSettingsSource(effectiveConfig, serverSettings); @@ -163,8 +155,8 @@ export const CursorDriver: ProviderDriver = { initialSnapshot: (settings) => buildInitialCursorProviderSnapshot(settings.provider).pipe(Effect.map(stampIdentity)), checkProvider, - // Model catalog and capabilities come exclusively from Cursor's - // list_available_models extension method during provider checks. + // Model catalog and capabilities come from Cursor's SDK catalog during + // provider checks. enrichSnapshot: ({ settings, snapshot: currentSnapshot, publishSnapshot }) => enrichCursorSnapshot({ settings: settings.provider, diff --git a/apps/server/src/provider/Layers/CursorProvider.test.ts b/apps/server/src/provider/Layers/CursorProvider.test.ts index 78a9573114..6611bdd842 100644 --- a/apps/server/src/provider/Layers/CursorProvider.test.ts +++ b/apps/server/src/provider/Layers/CursorProvider.test.ts @@ -30,11 +30,46 @@ import { } from "./CursorProvider.ts"; import { CursorSdkCatalogError, makeCursorSdkCatalogTestLayer } from "./CursorSdkCatalog.ts"; -const __dirname = path.dirname(fileURLToPath(import.meta.url)); -const mockAgentPath = path.join(__dirname, "../../../scripts/acp-mock-agent.ts"); +const resolveMockAgentPath = Effect.fn("resolveMockAgentPath")(function* () { + const path = yield* Path.Path; + return yield* path.fromFileUrl(new URL("../../../scripts/acp-mock-agent.ts", import.meta.url)); +}); -async function makeMockAgentWrapper(extraEnv?: Record) { - const dir = await mkdtemp(path.join(os.tmpdir(), "cursor-provider-mock-")); +function selectDescriptor( + id: string, + label: string, + options: ReadonlyArray<{ id: string; label: string; isDefault?: boolean }>, +) { + return { + id, + label, + type: "select" as const, + options: [...options], + ...(options.find((option) => option.isDefault)?.id + ? { currentValue: options.find((option) => option.isDefault)?.id } + : {}), + }; +} + +function booleanDescriptor(id: string, label: string, currentValue?: boolean) { + return { + id, + label, + type: "boolean" as const, + ...(typeof currentValue === "boolean" ? { currentValue } : {}), + }; +} + +const makeMockAgentWrapper = Effect.fn("makeMockAgentWrapper")(function* ( + extraEnv?: Record, +) { + const fileSystem = yield* FileSystem.FileSystem; + const path = yield* Path.Path; + const mockAgentPath = yield* resolveMockAgentPath(); + const dir = yield* fileSystem.makeTempDirectory({ + directory: NodeOS.tmpdir(), + prefix: "cursor-provider-mock-", + }); const wrapperPath = path.join(dir, "fake-agent.sh"); const envExports = Object.entries(extraEnv ?? {}) .map(([key, value]) => `export ${key}=${JSON.stringify(value)}`) @@ -244,6 +279,13 @@ const baseCursorSettings: CursorSettings = { apiEndpoint: "", customModels: [], }; +const cursorAcpDiscoveryFailedMessage = [ + "Cursor ACP model discovery failed.", + "Cursor CLI setup may be incomplete; install or enable the Cursor CLI, restart T3 Code, and try again.", + "See https://cursor.com/docs/cli/installation.", + "Check server logs for ACP details.", +].join(" "); +const missingCursorBinaryPath = "/definitely/not/installed/t3-cursor-agent"; const sdkParameterizedModel = { id: "claude-opus-4-8", @@ -515,23 +557,14 @@ describe("checkCursorProviderStatus", () => { }); }); - it("passes the injected environment to ACP model discovery", async () => { - const { requestLogPath, wrapperPath } = await runNode(makeProviderStatusEnvFixture()); - - const provider = await runNode( - checkCursorProviderStatus( - { - enabled: true, - binaryPath: wrapperPath, - apiEndpoint: "", - customModels: [], - }, - { - ...process.env, - CURSOR_API_KEY: "", - T3_ACP_REQUEST_LOG_PATH: requestLogPath, - }, - ).pipe( + it("requires a Cursor API key without probing the legacy CLI fallback", async () => { + const provider = await Effect.runPromise( + checkCursorProviderStatus({ + enabled: true, + binaryPath: missingCursorBinaryPath, + apiEndpoint: "", + customModels: [], + }).pipe( Effect.provide( Layer.mergeAll( makeCursorSdkCatalogTestLayer(() => @@ -543,17 +576,44 @@ describe("checkCursorProviderStatus", () => { ), ); - expect(provider.models.map((model) => model.slug)).toEqual([ - "default", - "composer-2", - "gpt-5.4", - "claude-opus-4-6", - ]); - await expect(runNode(waitForFileContent(requestLogPath))).resolves.toContain("initialize"); + expect(provider).toMatchObject({ + installed: true, + status: "error", + auth: { status: "unauthenticated" }, + message: "Cursor API key is required. Add CURSOR_API_KEY in provider settings.", + }); }); }); describe("discoverCursorModelsViaAcp", () => { + it.effect("passes the injected environment to ACP model discovery", () => + Effect.gen(function* () { + const { requestLogPath, wrapperPath } = yield* makeProviderStatusEnvFixture(); + const models = yield* discoverCursorModelsViaAcp( + { + enabled: true, + binaryPath: wrapperPath, + apiEndpoint: "", + customModels: [], + }, + { + ...process.env, + T3_ACP_REQUEST_LOG_PATH: requestLogPath, + }, + ); + + expect(models.map((model) => model.slug)).toEqual([ + "default", + "composer-2", + "gpt-5.4", + "claude-opus-4-6", + ]); + yield* waitForFileContent(requestLogPath).pipe( + Effect.tap((content) => Effect.sync(() => expect(content).toContain("initialize"))), + ); + }).pipe(Effect.provide(NodeServices.layer)), + ); + it.effect("keeps the ACP probe runtime alive long enough to discover models", () => Effect.gen(function* () { const wrapperPath = yield* makeMockAgentWrapper(); diff --git a/apps/server/src/provider/Layers/CursorProvider.ts b/apps/server/src/provider/Layers/CursorProvider.ts index 32dc0f36ea..e924edf33f 100644 --- a/apps/server/src/provider/Layers/CursorProvider.ts +++ b/apps/server/src/provider/Layers/CursorProvider.ts @@ -1,4 +1,3 @@ -import * as NodeOs from "node:os"; import type { SDKModel, SDKUser } from "@cursor/sdk"; import type { CursorSettings, @@ -15,29 +14,22 @@ import { causeErrorTag } from "@t3tools/shared/observability"; import * as Crypto from "effect/Crypto"; import * as DateTime from "effect/DateTime"; import * as Effect from "effect/Effect"; -import * as Exit from "effect/Exit"; -import * as FileSystem from "effect/FileSystem"; import * as Layer from "effect/Layer"; import * as Option from "effect/Option"; -import * as Path from "effect/Path"; import * as Result from "effect/Result"; import * as Schema from "effect/Schema"; import { HttpClient } from "effect/unstable/http"; -import * as ChildProcess from "effect/unstable/process/ChildProcess"; import * as ChildProcessSpawner from "effect/unstable/process/ChildProcessSpawner"; import { createModelCapabilities, getProviderOptionBooleanSelectionValue, getProviderOptionStringSelectionValue, } from "@t3tools/shared/model"; -import { resolveSpawnCommand } from "@t3tools/shared/shell"; import { buildBooleanOptionDescriptor, buildSelectOptionDescriptor, buildServerProvider, - collectStreamAsString, - isCommandMissingCause, providerModelsFromSettings, type CommandResult, type ServerProviderDraft, @@ -63,16 +55,8 @@ const EMPTY_CAPABILITIES: ModelCapabilities = createModelCapabilities({ optionDescriptors: [], }); -const CURSOR_ACP_MODEL_DISCOVERY_TIMEOUT_MS = 15_000; const CURSOR_SDK_CATALOG_TIMEOUT_MS = 15_000; const CURSOR_PARAMETERIZED_MODEL_PICKER_MIN_VERSION_DATE = 2026_04_08; -const CURSOR_CLI_INSTALLATION_DOCS_URL = "https://cursor.com/docs/cli/installation"; -const CURSOR_ACP_MODEL_DISCOVERY_FAILED_MESSAGE = [ - "Cursor ACP model discovery failed.", - "Cursor CLI setup may be incomplete; install or enable the Cursor CLI, restart T3 Code, and try again.", - `See ${CURSOR_CLI_INSTALLATION_DOCS_URL}.`, - "Check server logs for ACP details.", -].join(" "); export const CURSOR_PARAMETERIZED_MODEL_PICKER_CAPABILITIES = { _meta: { parameterizedModelPicker: true, @@ -688,9 +672,6 @@ export function getCursorFallbackModels( return providerModelsFromSettings([], cursorSettings.customModels, EMPTY_CAPABILITIES); } -/** Timeout for `agent about` — it's slower than a simple `--version` probe. */ -const ABOUT_TIMEOUT_MS = 8_000; - /** Strip ANSI escape sequences so we can parse plain key-value lines. */ function stripAnsi(text: string): string { // eslint-disable-next-line no-control-regex @@ -725,14 +706,6 @@ function joinProviderMessages(...messages: ReadonlyArray): s return parts.length > 0 ? parts.join(" ") : undefined; } -function buildCursorCliCommandMissingMessage(binaryPath: string): string { - return [ - `Cursor CLI command \`${binaryPath}\` was not found.`, - `Install or enable the Cursor CLI, make sure \`${binaryPath}\` is on PATH, then restart T3 Code.`, - `See ${CURSOR_CLI_INSTALLATION_DOCS_URL}.`, - ].join(" "); -} - export function buildCursorProviderSnapshot(input: { readonly checkedAt: string; readonly cursorSettings: CursorSettings; @@ -857,24 +830,6 @@ function hasOwn(record: object, key: string): boolean { return Object.prototype.hasOwnProperty.call(record, key); } -function isCursorAboutJsonFormatUnsupported(result: CommandResult): boolean { - const lowerOutput = `${result.stdout}\n${result.stderr}`.toLowerCase(); - return ( - lowerOutput.includes("unknown option '--format'") || - lowerOutput.includes("unexpected argument '--format'") || - lowerOutput.includes("unrecognized option '--format'") || - lowerOutput.includes("unknown argument '--format'") - ); -} - -const readCursorCliConfigChannel = Effect.fn("readCursorCliConfigChannel")(function* () { - const fileSystem = yield* FileSystem.FileSystem; - const path = yield* Path.Path; - const configPath = path.join(NodeOS.homedir(), ".cursor", "cli-config.json"); - const raw = yield* fileSystem.readFileString(configPath).pipe(Effect.orElseSucceed(() => "")); - return parseCursorCliConfigChannel(raw); -}); - export function getCursorParameterizedModelPickerUnsupportedMessage(input: { readonly version: string | null | undefined; readonly channel: string | null | undefined; @@ -1052,57 +1007,10 @@ export function parseCursorAboutOutput(result: CommandResult): CursorAboutResult }; } -const runCursorCommand = ( - cursorSettings: CursorSettings, - args: ReadonlyArray, - environment?: NodeJS.ProcessEnv, -) => - Effect.gen(function* () { - const spawner = yield* ChildProcessSpawner.ChildProcessSpawner; - const spawnCommand = yield* resolveSpawnCommand( - cursorSettings.binaryPath, - args, - environment ? { env: environment } : {}, - ); - const command = ChildProcess.make(spawnCommand.command, spawnCommand.args, { - ...(environment ? { env: environment } : { extendEnv: true }), - shell: spawnCommand.shell, - }); - - const child = yield* spawner.spawn(command); - const [stdout, stderr, exitCode] = yield* Effect.all( - [ - collectStreamAsString(child.stdout), - collectStreamAsString(child.stderr), - child.exitCode.pipe(Effect.map(Number)), - ], - { concurrency: "unbounded" }, - ); - - return { stdout, stderr, code: exitCode } satisfies CommandResult; - }).pipe(Effect.scoped); - -const runCursorAboutCommand = (cursorSettings: CursorSettings, environment?: NodeJS.ProcessEnv) => - Effect.gen(function* () { - const jsonResult = yield* runCursorCommand( - cursorSettings, - ["about", "--format", "json"], - environment, - ); - if (!isCursorAboutJsonFormatUnsupported(jsonResult)) { - return jsonResult; - } - return yield* runCursorCommand(cursorSettings, ["about"], environment); - }); - export const checkCursorProviderStatus = Effect.fn("checkCursorProviderStatus")(function* ( cursorSettings: CursorSettings, environment?: NodeJS.ProcessEnv, -): Effect.fn.Return< - ServerProviderDraft, - never, - ChildProcessSpawner.ChildProcessSpawner | CursorSdkCatalog | FileSystem.FileSystem | Path.Path -> { +): Effect.fn.Return { const checkedAt = DateTime.formatIso(yield* DateTime.now); const fallbackModels = getCursorFallbackModels(cursorSettings); @@ -1184,105 +1092,18 @@ export const checkCursorProviderStatus = Effect.fn("checkCursorProviderStatus")( }); } - // Single `agent about` probe: returns version + auth status in one call. - const aboutProbe = yield* runCursorAboutCommand(cursorSettings, environment).pipe( - Effect.timeoutOption(ABOUT_TIMEOUT_MS), - Effect.result, - ); - - if (Result.isFailure(aboutProbe)) { - const error = aboutProbe.failure; - yield* Effect.logWarning("Cursor Agent CLI health check failed.", { - errorTag: error._tag, - }); - return buildServerProvider({ - presentation: CURSOR_PRESENTATION, - enabled: cursorSettings.enabled, - checkedAt, - models: fallbackModels, - probe: { - installed: !isCommandMissingCause(error), - version: null, - status: "error", - auth: { status: "unknown" }, - message: isCommandMissingCause(error) - ? buildCursorCliCommandMissingMessage(cursorSettings.binaryPath) - : "Failed to execute Cursor Agent CLI health check.", - }, - }); - } - - if (Option.isNone(aboutProbe.success)) { - return buildServerProvider({ - presentation: CURSOR_PRESENTATION, - enabled: cursorSettings.enabled, - checkedAt, - models: fallbackModels, - probe: { - installed: true, - version: null, - status: "error", - auth: { status: "unknown" }, - message: "Cursor Agent CLI is installed but timed out while running `agent about`.", - }, - }); - } - - const parsed = parseCursorAboutOutput(aboutProbe.success.value); - const cursorCliConfigChannel = yield* readCursorCliConfigChannel(); - const parameterizedModelPickerUnsupportedMessage = - getCursorParameterizedModelPickerUnsupportedMessage({ - version: parsed.version, - channel: cursorCliConfigChannel, - }); - if (parameterizedModelPickerUnsupportedMessage) { - return buildServerProvider({ - presentation: CURSOR_PRESENTATION, - enabled: cursorSettings.enabled, - checkedAt, - models: fallbackModels, - probe: { - installed: true, - version: parsed.version, - status: "error", - auth: parsed.auth, - message: - parsed.auth.status === "unauthenticated" && parsed.message - ? `${parameterizedModelPickerUnsupportedMessage} ${parsed.message}` - : parameterizedModelPickerUnsupportedMessage, - }, - }); - } - let discoveredModels = Option.none>(); - let discoveryWarning: string | undefined; - if (parsed.auth.status !== "unauthenticated") { - const discoveryExit = yield* Effect.exit( - discoverCursorModelsViaAcp(cursorSettings, environment).pipe( - Effect.timeoutOption(CURSOR_ACP_MODEL_DISCOVERY_TIMEOUT_MS), - ), - ); - if (Exit.isFailure(discoveryExit)) { - yield* Effect.logWarning("Cursor ACP model discovery failed", { - errorTag: causeErrorTag(discoveryExit.cause), - }); - discoveryWarning = CURSOR_ACP_MODEL_DISCOVERY_FAILED_MESSAGE; - } else if (Option.isNone(discoveryExit.value)) { - discoveryWarning = `Cursor ACP model discovery timed out after ${CURSOR_ACP_MODEL_DISCOVERY_TIMEOUT_MS}ms.`; - } else if (discoveryExit.value.value.length === 0) { - discoveryWarning = "Cursor ACP model discovery returned no built-in models."; - } else { - discoveredModels = discoveryExit.value; - } - } - return buildCursorProviderSnapshot({ + return buildServerProvider({ + presentation: CURSOR_PRESENTATION, + enabled: cursorSettings.enabled, checkedAt, - cursorSettings, - parsed, - discoveredModels: Option.getOrElse( - Option.filter(discoveredModels, (models) => models.length > 0), - () => [] as const, - ), - ...(discoveryWarning ? { discoveryWarning } : {}), + models: fallbackModels, + probe: { + installed: true, + version: null, + status: "error", + auth: { status: "unauthenticated" }, + message: "Cursor API key is required. Add CURSOR_API_KEY in provider settings.", + }, }); }); @@ -1291,9 +1112,8 @@ export const checkCursorProviderStatus = Effect.fn("checkCursorProviderStatus")( * * Used by `CursorDriver` as the `makeManagedServerProvider.enrichSnapshot` * hook: republishes update/version advisory metadata without performing any - * model or capability discovery. Provider status checks source Cursor model - * data from the SDK when an API key is configured, with ACP discovery as the - * compatibility fallback. + * model or capability discovery. Provider status and model data come from + * the Cursor SDK catalog and require CURSOR_API_KEY. */ export const enrichCursorSnapshot = (input: { readonly settings: CursorSettings; diff --git a/apps/web/src/components/ChatView.tsx b/apps/web/src/components/ChatView.tsx index f92ac6faff..b94a857101 100644 --- a/apps/web/src/components/ChatView.tsx +++ b/apps/web/src/components/ChatView.tsx @@ -5927,7 +5927,7 @@ function ChatViewContent(props: ChatViewProps) { ref={attachDraftHeroTransitionGroupRef} className="chat-composer-horizontal-inset w-full" > -
+
diff --git a/apps/web/src/components/chat/ChatComposer.tsx b/apps/web/src/components/chat/ChatComposer.tsx index 35c304beff..ff084080fc 100644 --- a/apps/web/src/components/chat/ChatComposer.tsx +++ b/apps/web/src/components/chat/ChatComposer.tsx @@ -2679,7 +2679,7 @@ export const ChatComposer = memo(function ChatComposer(props: ChatComposerProps)
+
- onOpenThread(parentThreadLink.threadId)} - /> +
+
+ onOpenThread(parentThreadLink.threadId)} + /> +
), [onOpenThread, parentThreadLink], @@ -528,8 +530,10 @@ export const MessagesTimeline = memo(function MessagesTimeline({ // from TimelineRowCtx, which propagates through LegendList's memo. const renderItem = useCallback( ({ item }: { item: MessagesTimelineRow }) => ( -
- +
+
+ +
), [], @@ -548,24 +552,50 @@ export const MessagesTimeline = memo(function MessagesTimeline({ return ( - - ref={listRef} - data={rows} - keyExtractor={keyExtractor} - getItemType={getItemType} - renderItem={renderItem} - estimatedItemSize={90} - initialScrollAtEnd - {...(anchoredEndSpace ? { anchoredEndSpace } : {})} - contentInsetEndAdjustment={contentInsetEndAdjustment} - maintainScrollAtEnd={!foldToggleSettling} - maintainScrollAtEndThreshold={0.1} - maintainVisibleContentPosition - onScroll={handleScroll} - className="messages-timeline-scroll scrollbar-gutter-both h-full min-h-0 overflow-x-hidden overscroll-y-contain" - ListHeaderComponent={listHeader} - ListFooterComponent={TIMELINE_LIST_FOOTER} - /> +
+ + ref={listRef} + data={rows} + keyExtractor={keyExtractor} + getItemType={getItemType} + renderItem={renderItem} + estimatedItemSize={90} + initialScrollAtEnd + {...(anchoredEndSpace ? { anchoredEndSpace } : {})} + contentInsetEndAdjustment={contentInsetEndAdjustment} + maintainScrollAtEnd={ + anchoredEndSpace + ? false + : { + animated: false, + on: { + dataChange: true, + itemLayout: true, + layout: true, + }, + } + } + maintainVisibleContentPosition={maintainVisibleContentPosition} + onScroll={handleScroll} + className="messages-timeline-scroll scrollbar-gutter-both h-full min-h-0 overflow-x-hidden overscroll-y-contain [overflow-anchor:none]" + ListHeaderComponent={listHeader} + ListFooterComponent={TIMELINE_LIST_FOOTER} + /> + { + onManualNavigation(); + void listRef.current?.scrollToIndex({ + index: item.rowIndex, + animated: true, + viewOffset: 24, + }); + }} + /> +
); diff --git a/apps/web/src/components/chat/PanelLayoutControls.tsx b/apps/web/src/components/chat/PanelLayoutControls.tsx index bc0fcf9ed5..7f51310192 100644 --- a/apps/web/src/components/chat/PanelLayoutControls.tsx +++ b/apps/web/src/components/chat/PanelLayoutControls.tsx @@ -104,7 +104,7 @@ export const PanelLayoutControls = memo(function PanelLayoutControls({ collisionAvoidance={{ side: "shift", align: "shift", fallbackAxisSide: "none" }} side="bottom" sideOffset={0} - positionerClassName="w-[min(21rem,var(--anchor-width))] !transition-none" + positionerClassName="w-[min(var(--thread-details-panel-width),var(--anchor-width))] !transition-none" className="w-full !overflow-visible rounded-none border-0 bg-transparent shadow-none before:hidden [--viewport-inline-padding:0]" viewportClassName="!overflow-visible p-2" > diff --git a/apps/web/src/components/chat/ThreadErrorBanner.tsx b/apps/web/src/components/chat/ThreadErrorBanner.tsx index 51bfb62667..a8059047ae 100644 --- a/apps/web/src/components/chat/ThreadErrorBanner.tsx +++ b/apps/web/src/components/chat/ThreadErrorBanner.tsx @@ -13,7 +13,7 @@ export const ThreadErrorBanner = memo(function ThreadErrorBanner({ }) { if (!error) return null; return ( -
+
diff --git a/apps/web/src/components/settings/ProviderInstanceCard.test.ts b/apps/web/src/components/settings/ProviderInstanceCard.test.ts index 051045b030..29ca2b2278 100644 --- a/apps/web/src/components/settings/ProviderInstanceCard.test.ts +++ b/apps/web/src/components/settings/ProviderInstanceCard.test.ts @@ -1,7 +1,12 @@ import { describe, expect, it } from "vite-plus/test"; import type { ServerProviderModel } from "@t3tools/contracts"; -import { deriveProviderModelsForDisplay } from "./ProviderInstanceCard"; +import { + deriveProviderModelsForDisplay, + nextProviderEnvironmentWithFieldValue, + providerEnvironmentWithoutNames, + readProviderEnvironmentVariable, +} from "./ProviderInstanceCard"; describe("deriveProviderModelsForDisplay", () => { it("uses current config custom models instead of stale live custom rows", () => { @@ -34,3 +39,55 @@ describe("deriveProviderModelsForDisplay", () => { ).toEqual(["server-model", "kept-custom"]); }); }); + +describe("provider environment helpers", () => { + const cursorApiKeyField = { + name: "CURSOR_API_KEY", + label: "Cursor API key", + sensitive: true, + }; + + it("writes dedicated provider secrets as sensitive environment variables", () => { + expect( + nextProviderEnvironmentWithFieldValue( + [{ name: "EXTRA_FLAG", value: "1", sensitive: false }], + cursorApiKeyField, + " cursor-key ", + ), + ).toEqual([ + { name: "EXTRA_FLAG", value: "1", sensitive: false }, + { name: "CURSOR_API_KEY", value: "cursor-key", sensitive: true }, + ]); + }); + + it("replaces redacted provider secrets without preserving redaction markers", () => { + expect( + nextProviderEnvironmentWithFieldValue( + [ + { + name: "CURSOR_API_KEY", + value: "", + sensitive: true, + valueRedacted: true, + }, + ], + cursorApiKeyField, + "new-key", + ), + ).toEqual([{ name: "CURSOR_API_KEY", value: "new-key", sensitive: true }]); + }); + + it("separates dedicated provider secrets from the generic environment table", () => { + const environment = [ + { name: "CURSOR_API_KEY", value: "cursor-key", sensitive: true }, + { name: "EXTRA_FLAG", value: "1", sensitive: false }, + ]; + + expect(readProviderEnvironmentVariable(environment, "CURSOR_API_KEY")?.value).toBe( + "cursor-key", + ); + expect(providerEnvironmentWithoutNames(environment, new Set(["CURSOR_API_KEY"]))).toEqual([ + { name: "EXTRA_FLAG", value: "1", sensitive: false }, + ]); + }); +}); diff --git a/apps/web/src/components/settings/ProviderInstanceCard.tsx b/apps/web/src/components/settings/ProviderInstanceCard.tsx index 2a691943df..0f9cfa4df6 100644 --- a/apps/web/src/components/settings/ProviderInstanceCard.tsx +++ b/apps/web/src/components/settings/ProviderInstanceCard.tsx @@ -37,7 +37,7 @@ import { Switch } from "../ui/switch"; import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from "../ui/table"; import { stackedThreadToast, toastManager } from "../ui/toast"; import { Tooltip, TooltipPopup, TooltipTrigger } from "../ui/tooltip"; -import type { DriverOption } from "./providerDriverMeta"; +import type { DriverOption, ProviderEnvironmentFieldDefinition } from "./providerDriverMeta"; import { ProviderSettingsForm } from "./ProviderSettingsForm"; import { ProviderModelsSection } from "./ProviderModelsSection"; import { ProviderInstanceIcon } from "../chat/ProviderInstanceIcon"; @@ -109,6 +109,55 @@ function nextConfigBlobWithValue( return base; } +export function readProviderEnvironmentVariable( + environment: ReadonlyArray | undefined, + name: string, +): ProviderInstanceEnvironmentVariable | undefined { + return environment?.find((variable) => variable.name === name); +} + +export function providerEnvironmentWithoutNames( + environment: ReadonlyArray | undefined, + names: ReadonlySet, +): ReadonlyArray { + return (environment ?? []).filter((variable) => !names.has(variable.name)); +} + +export function nextProviderEnvironmentWithFieldValue( + environment: ReadonlyArray | undefined, + field: ProviderEnvironmentFieldDefinition, + value: string, +): ReadonlyArray { + const trimmed = value.trim(); + const next: ProviderInstanceEnvironmentVariable[] = []; + let found = false; + + for (const variable of environment ?? []) { + if (variable.name !== field.name) { + next.push(variable); + continue; + } + found = true; + if (trimmed.length > 0) { + next.push({ + name: variable.name, + value: trimmed, + sensitive: field.sensitive ?? variable.sensitive, + }); + } + } + + if (!found && trimmed.length > 0) { + next.push({ + name: field.name, + value: trimmed, + sensitive: field.sensitive ?? true, + }); + } + + return next; +} + export function deriveProviderModelsForDisplay(input: { readonly liveModels: ReadonlyArray | undefined; readonly customModels: ReadonlyArray; @@ -318,6 +367,53 @@ function ProviderEnvironmentSection(props: { ); } +function ProviderEnvironmentFieldRow(props: { + readonly field: ProviderEnvironmentFieldDefinition; + readonly variable: ProviderInstanceEnvironmentVariable | undefined; + readonly idPrefix: string; + readonly onCommit: (field: ProviderEnvironmentFieldDefinition, value: string) => void; + readonly onRemove: (field: ProviderEnvironmentFieldDefinition) => void; +}) { + const inputId = `${props.idPrefix}-environment-${props.field.name}`; + const value = props.variable?.valueRedacted ? "" : (props.variable?.value ?? ""); + const placeholder = props.variable?.valueRedacted + ? "Stored secret - enter a new value to replace" + : props.field.placeholder; + + return ( + + ); +} + interface ProviderInstanceCardProps { readonly instanceId: ProviderInstanceId; readonly instance: ProviderInstanceConfig; @@ -444,6 +540,12 @@ export function ProviderInstanceCard({ : null; const customModels = readConfigStringArray(instance.config, "customModels"); + const environmentFields = driverOption?.environmentFields ?? []; + const environmentFieldNames = new Set(environmentFields.map((field) => field.name)); + const genericEnvironment = providerEnvironmentWithoutNames( + instance.environment, + environmentFieldNames, + ); // Server-returned models may lag behind settings writes. Treat probe // models as the source for built-ins only; custom rows come directly // from the current instance config so add/remove reflects immediately. @@ -501,6 +603,23 @@ export function ProviderInstanceCard({ ); }; + const updateGenericEnvironment = ( + environment: ReadonlyArray, + ) => { + const dedicatedEnvironment = (instance.environment ?? []).filter((variable) => + environmentFieldNames.has(variable.name), + ); + updateEnvironment([...dedicatedEnvironment, ...environment]); + }; + + const updateEnvironmentField = (field: ProviderEnvironmentFieldDefinition, value: string) => { + updateEnvironment(nextProviderEnvironmentWithFieldValue(instance.environment, field, value)); + }; + + const removeEnvironmentField = (field: ProviderEnvironmentFieldDefinition) => { + updateEnvironment(providerEnvironmentWithoutNames(instance.environment, new Set([field.name]))); + }; + const titleIconNode = driverKind ? (
-
+
+ {environmentFields.length > 0 ? ( +
+ {environmentFields.map((field) => ( + + ))} +
+ ) : null}
diff --git a/apps/web/src/components/settings/ProviderSettingsForm.test.ts b/apps/web/src/components/settings/ProviderSettingsForm.test.ts index 2819a7ca32..26bba5c983 100644 --- a/apps/web/src/components/settings/ProviderSettingsForm.test.ts +++ b/apps/web/src/components/settings/ProviderSettingsForm.test.ts @@ -37,6 +37,22 @@ describe("ProviderSettingsForm helpers", () => { }); }); + it("uses a dedicated environment field instead of legacy Cursor CLI settings", () => { + const cursor = DRIVER_OPTION_BY_VALUE[ProviderDriverKind.make("cursor")]; + + expect(cursor).toBeDefined(); + expect(deriveProviderSettingsFields(cursor!)).toEqual([]); + expect(cursor?.environmentFields).toEqual([ + { + name: "CURSOR_API_KEY", + label: "Cursor API key", + description: "Required by the Cursor Agent SDK.", + placeholder: "Paste API key", + sensitive: true, + }, + ]); + }); + it("exposes ACP Registry as an instance-only configurable driver", () => { const acpRegistry = DRIVER_OPTION_BY_VALUE[ProviderDriverKind.make("acpRegistry")]; diff --git a/apps/web/src/components/settings/providerDriverMeta.ts b/apps/web/src/components/settings/providerDriverMeta.ts index fd4f72e4c3..bdc6223f1e 100644 --- a/apps/web/src/components/settings/providerDriverMeta.ts +++ b/apps/web/src/components/settings/providerDriverMeta.ts @@ -33,6 +33,7 @@ export interface ProviderClientDefinition { readonly label: string; readonly icon: Icon; readonly settingsSchema: ProviderSettingsSchema; + readonly environmentFields?: readonly ProviderEnvironmentFieldDefinition[]; /** Whether this driver has a built-in default instance backed by legacy settings. */ readonly hasDefaultInstance?: boolean; /** @@ -45,6 +46,14 @@ export interface ProviderClientDefinition { readonly badgeLabel?: string; } +export interface ProviderEnvironmentFieldDefinition { + readonly name: string; + readonly label: string; + readonly description?: string; + readonly placeholder?: string; + readonly sensitive?: boolean; +} + export const PROVIDER_CLIENT_DEFINITIONS: readonly ProviderClientDefinition[] = [ { value: ProviderDriverKind.make("codex"), @@ -64,6 +73,15 @@ export const PROVIDER_CLIENT_DEFINITIONS: readonly ProviderClientDefinition[] = icon: CursorIcon, badgeLabel: "Early Access", settingsSchema: CursorSettings, + environmentFields: [ + { + name: "CURSOR_API_KEY", + label: "Cursor API key", + description: "Required by the Cursor Agent SDK.", + placeholder: "Paste API key", + sensitive: true, + }, + ], }, { value: ProviderDriverKind.make("grok"), diff --git a/apps/web/src/index.css b/apps/web/src/index.css index 64ffab20a8..e2dd129e8c 100644 --- a/apps/web/src/index.css +++ b/apps/web/src/index.css @@ -102,7 +102,8 @@ html[data-mobile-composer-route-transition="true"]::view-transition-old(t3-mobil --workspace-native-controls-inset: 0px; --workspace-titlebar-control-size: 1.75rem; --workspace-titlebar-control-gap: 0.75rem; - --thread-details-panel-width: clamp(18rem, 24vw, 21rem); + --chat-content-max-width: 46rem; + --thread-details-panel-width: 19.5rem; --thread-details-panel-inset: 0px; } @@ -408,11 +409,18 @@ html[data-mobile-composer-route-transition="true"]::view-transition-old(t3-mobil @apply flex h-10 min-h-10 shrink-0 items-center border-b border-border/60 bg-background; } + .chat-content-lane { + margin-inline: auto; + width: 100%; + min-width: 0; + max-width: var(--chat-content-max-width); + } + [data-thread-details-inline-reserved="true"] { --thread-details-panel-inset: var(--thread-details-panel-width); } - .messages-timeline-scroll { + .messages-timeline-row-frame { padding-inline-start: 0.75rem; padding-inline-end: calc(0.75rem + var(--thread-details-panel-inset)); } @@ -491,7 +499,7 @@ html[data-mobile-composer-route-transition="true"]::view-transition-old(t3-mobil } @media (min-width: 40rem) { - .messages-timeline-scroll { + .messages-timeline-row-frame { padding-inline-start: 1.25rem; padding-inline-end: calc(1.25rem + var(--thread-details-panel-inset)); } diff --git a/apps/web/src/rightPanelLayout.test.ts b/apps/web/src/rightPanelLayout.test.ts index 1440aa9a17..803fb8657d 100644 --- a/apps/web/src/rightPanelLayout.test.ts +++ b/apps/web/src/rightPanelLayout.test.ts @@ -5,12 +5,12 @@ import { resolveThreadPanelPresentation } from "./rightPanelLayout"; describe("resolveThreadPanelPresentation", () => { it("uses the stable workspace width minus the real right panel width", () => { expect(resolveThreadPanelPresentation(null, 0, false)).toBe("inline"); - expect(resolveThreadPanelPresentation(960, 0, false)).toBe("inline"); - expect(resolveThreadPanelPresentation(959, 0, false)).toBe("popover"); + expect(resolveThreadPanelPresentation(1_104, 0, false)).toBe("inline"); + expect(resolveThreadPanelPresentation(1_103, 0, false)).toBe("popover"); expect(resolveThreadPanelPresentation(1_400, 0, false)).toBe("inline"); expect(resolveThreadPanelPresentation(1_400, 540, false)).toBe("popover"); - expect(resolveThreadPanelPresentation(1_500, 540, false)).toBe("inline"); + expect(resolveThreadPanelPresentation(1_644, 540, false)).toBe("inline"); }); it("uses a popover while the real right panel is maximized", () => { diff --git a/apps/web/src/rightPanelLayout.ts b/apps/web/src/rightPanelLayout.ts index e85f24e4a4..2183ee7ee8 100644 --- a/apps/web/src/rightPanelLayout.ts +++ b/apps/web/src/rightPanelLayout.ts @@ -1,5 +1,5 @@ export const RIGHT_PANEL_INLINE_LAYOUT_MEDIA_QUERY = "(max-width: 980px)"; -export const THREAD_PANEL_INLINE_MIN_WIDTH = 960; +export const THREAD_PANEL_INLINE_MIN_WIDTH = 1_104; export const RIGHT_PANEL_SHEET_CLASS_NAME = "w-[min(42vw,28rem)] min-w-80 max-w-[28rem] p-0 max-[760px]:w-[min(88vw,24rem)] max-[760px]:min-w-0 wco:mt-[env(titlebar-area-height)] wco:h-[calc(100%-env(titlebar-area-height))] wco:max-h-[calc(100%-env(titlebar-area-height))]"; diff --git a/packages/contracts/src/settings.ts b/packages/contracts/src/settings.ts index 8f9fe40ba6..1a5a680ed5 100644 --- a/packages/contracts/src/settings.ts +++ b/packages/contracts/src/settings.ts @@ -292,12 +292,40 @@ export const ClaudeSettings = makeProviderSettingsSchema( ); export type ClaudeSettings = typeof ClaudeSettings.Type; -export const CursorSettings = Schema.Struct({ - enabled: Schema.Boolean.pipe(Schema.withDecodingDefault(Effect.succeed(false))), - binaryPath: makeBinaryPathSetting("agent"), - apiEndpoint: TrimmedString.pipe(Schema.withDecodingDefault(Effect.succeed(""))), - customModels: Schema.Array(Schema.String).pipe(Schema.withDecodingDefault(Effect.succeed([]))), -}); +export const CursorSettings = makeProviderSettingsSchema( + { + enabled: Schema.Boolean.pipe( + Schema.withDecodingDefault(Effect.succeed(false)), + Schema.annotateKey({ providerSettingsForm: { hidden: true } }), + ), + binaryPath: makeBinaryPathSetting("agent").pipe( + Schema.annotateKey({ + title: "Binary path", + description: "Legacy Cursor Agent CLI path.", + providerSettingsForm: { hidden: true, placeholder: "agent", clearWhenEmpty: "omit" }, + }), + ), + apiEndpoint: TrimmedString.pipe( + Schema.withDecodingDefault(Effect.succeed("")), + Schema.annotateKey({ + title: "API endpoint", + description: "Legacy Cursor Agent CLI API endpoint override.", + providerSettingsForm: { + hidden: true, + placeholder: "https://...", + clearWhenEmpty: "omit", + }, + }), + ), + customModels: Schema.Array(Schema.String).pipe( + Schema.withDecodingDefault(Effect.succeed([])), + Schema.annotateKey({ providerSettingsForm: { hidden: true } }), + ), + }, + { + order: [], + }, +); export type CursorSettings = typeof CursorSettings.Type; export const GrokSettings = makeProviderSettingsSchema( diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 4c535af16c..ac4c96d0eb 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -453,8 +453,8 @@ importers: specifier: 1.7.0 version: 1.7.0(@bufbuild/protobuf@1.10.0)(@connectrpc/connect@1.7.0(@bufbuild/protobuf@1.10.0)) '@cursor/sdk': - specifier: 1.0.19 - version: 1.0.19 + specifier: 1.0.22 + version: 1.0.22 '@effect/platform-bun': specifier: 4.0.0-beta.102 version: 4.0.0-beta.102(patch_hash=9f7cfa69ef19b624ac7704fe505a6775dc272d734208883f3decc7e5201a3d23)(bufferutil@4.1.0)(effect@4.0.0-beta.102(patch_hash=71215759e1ac0a7f65d7b75d816986687ae6c3a6cba02d928d184ca71790d488))(utf-8-validate@6.0.6) @@ -1816,38 +1816,38 @@ packages: peerDependencies: '@bufbuild/protobuf': ^1.10.0 - '@cursor/sdk-darwin-arm64@1.0.19': - resolution: {integrity: sha512-CPhqcpDaqjjqkkVGMLsdfXv7PGznL5L6U5CJXps/oaGW5mtHoxDpsRNj1rszCRQXNAvmMU+EFxLWnBwlE8mUNg==} + '@cursor/sdk-darwin-arm64@1.0.22': + resolution: {integrity: sha512-BdGH+cd2VtxbfwYQ52a6mHlPoJkbjpjKfUrmhFQTN3a/A0h/n2Iv6ZCfnzT+IiLv99lYDaQfqzikM2EAzEx+Qw==} cpu: [arm64] os: [darwin] hasBin: true - '@cursor/sdk-darwin-x64@1.0.19': - resolution: {integrity: sha512-6/Jj0hxrxEs9V9wtYEApSkMcJwYAaT4Vwna9xBzgN6CK1K4Ws0E1/PfiddahAAFZpkp9pgjb8wQXwG7qJ2g77A==} + '@cursor/sdk-darwin-x64@1.0.22': + resolution: {integrity: sha512-60rL0tYdJ8LYbOq/3cz5xlRyJsWn+LMkG8YQG6CckLsLyMFCzkK3POU0w7jIsRoC17cpSj2miJGtX2dEGSg8tg==} cpu: [x64] os: [darwin] hasBin: true - '@cursor/sdk-linux-arm64@1.0.19': - resolution: {integrity: sha512-Dq/BhGT1jAZ6eHJwy1Vugi/Upc+yoL0X/LN6ppd9cVPM9OAB1xX5KIbvIwsGlNiZccPLVXFv/1KOp5SBK+y+jQ==} + '@cursor/sdk-linux-arm64@1.0.22': + resolution: {integrity: sha512-tpywB5MiBSvGUr9kErfcbG4bOmtHqOsiK+CNOVhjlUFMQ+iCRPfu0VCj+1VGAo258/V6a2GS/1d5CuR14Hq+Ow==} cpu: [arm64] os: [linux] hasBin: true - '@cursor/sdk-linux-x64@1.0.19': - resolution: {integrity: sha512-ZHgHH+SdEwYwfPg/uVKqZRVOIMCV3/3vghxc/usOMYMrhbY9TYXZxYqwWTduVLzCXH7Dz0aT19mSJHmhwkQ1CA==} + '@cursor/sdk-linux-x64@1.0.22': + resolution: {integrity: sha512-tmX1kH/pyxhv0dQaJIcCQbdouLrPbKvv8iuALwMzh42piCI51q5pdRzUaWUUtH8VMdFjwZdVsDfumuSwqTlAIA==} cpu: [x64] os: [linux] hasBin: true - '@cursor/sdk-win32-x64@1.0.19': - resolution: {integrity: sha512-XGIQmx3J0K8uKkA00qnoy1FJHFdFdwNdcmUqtRF1PXLcYup91YYetAHk9afXM7S/v1t0L4EatydsirL8uz7SIw==} + '@cursor/sdk-win32-x64@1.0.22': + resolution: {integrity: sha512-Dy5aI6YN/9rWvGl78kG+UqqTCwdC/eT9SKf9NSPeLXriPaCRYs7JHH/93yuAUmO9IaX+mt/0tKl+CqsYaGimVg==} cpu: [x64] os: [win32] hasBin: true - '@cursor/sdk@1.0.19': - resolution: {integrity: sha512-DJbVnGeRJq7iwt9mz1cMACqVfAYP15IB+Q8Iz2eDtEN4A8Dp83yB0Y31YREj1jeA9EPUEdRZJRIYch/s+Wi9Ow==} + '@cursor/sdk@1.0.22': + resolution: {integrity: sha512-xn99xoMvq/JwIXmWrpmEGMSY88zPr6dgxGSZYv3m9PytOBrawkwx9CHKosXs8m3ihVcQ+Wrt+TaEIUsgSNc5YA==} engines: {node: '>=22.13'} '@develar/schema-utils@2.6.5': @@ -11666,34 +11666,35 @@ snapshots: dependencies: '@bufbuild/protobuf': 1.10.0 - '@cursor/sdk-darwin-arm64@1.0.19': + '@cursor/sdk-darwin-arm64@1.0.22': optional: true - '@cursor/sdk-darwin-x64@1.0.19': + '@cursor/sdk-darwin-x64@1.0.22': optional: true - '@cursor/sdk-linux-arm64@1.0.19': + '@cursor/sdk-linux-arm64@1.0.22': optional: true - '@cursor/sdk-linux-x64@1.0.19': + '@cursor/sdk-linux-x64@1.0.22': optional: true - '@cursor/sdk-win32-x64@1.0.19': + '@cursor/sdk-win32-x64@1.0.22': optional: true - '@cursor/sdk@1.0.19': + '@cursor/sdk@1.0.22': dependencies: '@bufbuild/protobuf': 1.10.0 '@connectrpc/connect': 1.7.0(@bufbuild/protobuf@1.10.0) + '@connectrpc/connect-node': 1.7.0(@bufbuild/protobuf@1.10.0)(@connectrpc/connect@1.7.0(@bufbuild/protobuf@1.10.0)) '@connectrpc/connect-web': 1.7.0(@bufbuild/protobuf@1.10.0)(@connectrpc/connect@1.7.0(@bufbuild/protobuf@1.10.0)) '@statsig/js-client': 3.31.0 zod: 3.25.76 optionalDependencies: - '@cursor/sdk-darwin-arm64': 1.0.19 - '@cursor/sdk-darwin-x64': 1.0.19 - '@cursor/sdk-linux-arm64': 1.0.19 - '@cursor/sdk-linux-x64': 1.0.19 - '@cursor/sdk-win32-x64': 1.0.19 + '@cursor/sdk-darwin-arm64': 1.0.22 + '@cursor/sdk-darwin-x64': 1.0.22 + '@cursor/sdk-linux-arm64': 1.0.22 + '@cursor/sdk-linux-x64': 1.0.22 + '@cursor/sdk-win32-x64': 1.0.22 '@develar/schema-utils@2.6.5': dependencies: @@ -15157,19 +15158,19 @@ snapshots: '@rolldown/plugin-babel': 0.2.3(@babel/core@7.29.7)(@babel/plugin-transform-runtime@7.29.7(@babel/core@7.29.7))(@babel/runtime@7.29.7)(@voidzero-dev/vite-plus-core@0.2.2(@types/node@24.12.4)(esbuild@0.28.1)(jiti@2.7.0)(terser@5.48.0)(typescript@6.0.3)(unrun@0.2.39)(yaml@2.9.0))(rolldown@1.1.5) babel-plugin-react-compiler: 1.0.0 - '@vitest/browser-preview@4.1.9(@voidzero-dev/vite-plus-core@0.2.2(@types/node@24.12.4)(esbuild@0.28.1)(jiti@2.7.0)(terser@5.48.0)(typescript@6.0.3)(unrun@0.2.39)(yaml@2.9.0))(bufferutil@4.1.0)(msw@2.12.11(@types/node@24.12.4)(typescript@6.0.3))(utf-8-validate@6.0.6)(vitest@4.1.9)': + '@vitest/browser-preview@4.1.9(@voidzero-dev/vite-plus-core@0.2.1(@types/node@24.12.4)(esbuild@0.28.1)(jiti@2.7.0)(terser@5.48.0)(typescript@6.0.3)(unrun@0.2.39)(yaml@2.9.0))(bufferutil@4.1.0)(msw@2.12.11(@types/node@24.12.4)(typescript@6.0.3))(utf-8-validate@6.0.6)(vitest@4.1.9)': dependencies: '@testing-library/dom': 10.4.1 '@testing-library/user-event': 14.6.1(@testing-library/dom@10.4.1) - '@vitest/browser': 4.1.9(@voidzero-dev/vite-plus-core@0.2.2(@types/node@24.12.4)(esbuild@0.28.1)(jiti@2.7.0)(terser@5.48.0)(typescript@6.0.3)(unrun@0.2.39)(yaml@2.9.0))(bufferutil@4.1.0)(msw@2.12.11(@types/node@24.12.4)(typescript@6.0.3))(utf-8-validate@6.0.6)(vitest@4.1.9) - vitest: 4.1.9(@types/node@24.12.4)(@vitest/browser-preview@4.1.9)(@voidzero-dev/vite-plus-core@0.2.2(@types/node@24.12.4)(esbuild@0.28.1)(jiti@2.7.0)(terser@5.48.0)(typescript@6.0.3)(unrun@0.2.39)(yaml@2.9.0))(msw@2.12.11(@types/node@24.12.4)(typescript@6.0.3)) + '@vitest/browser': 4.1.9(@voidzero-dev/vite-plus-core@0.2.1(@types/node@24.12.4)(esbuild@0.28.1)(jiti@2.7.0)(terser@5.48.0)(typescript@6.0.3)(unrun@0.2.39)(yaml@2.9.0))(bufferutil@4.1.0)(msw@2.12.11(@types/node@24.12.4)(typescript@6.0.3))(utf-8-validate@6.0.6)(vitest@4.1.9) + vitest: 4.1.9(@types/node@24.12.4)(@vitest/browser-preview@4.1.9)(@voidzero-dev/vite-plus-core@0.2.1(@types/node@24.12.4)(esbuild@0.28.1)(jiti@2.7.0)(terser@5.48.0)(typescript@6.0.3)(unrun@0.2.39)(yaml@2.9.0))(msw@2.12.11(@types/node@24.12.4)(typescript@6.0.3)) transitivePeerDependencies: - bufferutil - msw - utf-8-validate - vite - '@vitest/browser@4.1.9(@voidzero-dev/vite-plus-core@0.2.2(@types/node@24.12.4)(esbuild@0.28.1)(jiti@2.7.0)(terser@5.48.0)(typescript@6.0.3)(unrun@0.2.39)(yaml@2.9.0))(bufferutil@4.1.0)(msw@2.12.11(@types/node@24.12.4)(typescript@6.0.3))(utf-8-validate@6.0.6)(vitest@4.1.9)': + '@vitest/browser@4.1.9(@voidzero-dev/vite-plus-core@0.2.1(@types/node@24.12.4)(esbuild@0.28.1)(jiti@2.7.0)(terser@5.48.0)(typescript@6.0.3)(unrun@0.2.39)(yaml@2.9.0))(bufferutil@4.1.0)(msw@2.12.11(@types/node@24.12.4)(typescript@6.0.3))(utf-8-validate@6.0.6)(vitest@4.1.9)': dependencies: '@blazediff/core': 1.9.1 '@vitest/mocker': 4.1.9(@voidzero-dev/vite-plus-core@0.2.2(@types/node@24.12.4)(esbuild@0.28.1)(jiti@2.7.0)(terser@5.48.0)(typescript@6.0.3)(unrun@0.2.39)(yaml@2.9.0))(msw@2.12.11(@types/node@24.12.4)(typescript@6.0.3)) @@ -15178,7 +15179,7 @@ snapshots: pngjs: 7.0.0 sirv: 3.0.2 tinyrainbow: 3.1.0 - vitest: 4.1.9(@types/node@24.12.4)(@vitest/browser-preview@4.1.9)(@voidzero-dev/vite-plus-core@0.2.2(@types/node@24.12.4)(esbuild@0.28.1)(jiti@2.7.0)(terser@5.48.0)(typescript@6.0.3)(unrun@0.2.39)(yaml@2.9.0))(msw@2.12.11(@types/node@24.12.4)(typescript@6.0.3)) + vitest: 4.1.9(@types/node@24.12.4)(@vitest/browser-preview@4.1.9)(@voidzero-dev/vite-plus-core@0.2.1(@types/node@24.12.4)(esbuild@0.28.1)(jiti@2.7.0)(terser@5.48.0)(typescript@6.0.3)(unrun@0.2.39)(yaml@2.9.0))(msw@2.12.11(@types/node@24.12.4)(typescript@6.0.3)) ws: 8.21.0(bufferutil@4.1.0)(utf-8-validate@6.0.6) transitivePeerDependencies: - bufferutil @@ -21390,8 +21391,8 @@ snapshots: dependencies: '@oxc-project/types': 0.138.0 '@oxlint/plugins': 1.68.0 - '@vitest/browser': 4.1.9(@voidzero-dev/vite-plus-core@0.2.2(@types/node@24.12.4)(esbuild@0.28.1)(jiti@2.7.0)(terser@5.48.0)(typescript@6.0.3)(unrun@0.2.39)(yaml@2.9.0))(bufferutil@4.1.0)(msw@2.12.11(@types/node@24.12.4)(typescript@6.0.3))(utf-8-validate@6.0.6)(vitest@4.1.9) - '@vitest/browser-preview': 4.1.9(@voidzero-dev/vite-plus-core@0.2.2(@types/node@24.12.4)(esbuild@0.28.1)(jiti@2.7.0)(terser@5.48.0)(typescript@6.0.3)(unrun@0.2.39)(yaml@2.9.0))(bufferutil@4.1.0)(msw@2.12.11(@types/node@24.12.4)(typescript@6.0.3))(utf-8-validate@6.0.6)(vitest@4.1.9) + '@vitest/browser': 4.1.9(@voidzero-dev/vite-plus-core@0.2.1(@types/node@24.12.4)(esbuild@0.28.1)(jiti@2.7.0)(terser@5.48.0)(typescript@6.0.3)(unrun@0.2.39)(yaml@2.9.0))(bufferutil@4.1.0)(msw@2.12.11(@types/node@24.12.4)(typescript@6.0.3))(utf-8-validate@6.0.6)(vitest@4.1.9) + '@vitest/browser-preview': 4.1.9(@voidzero-dev/vite-plus-core@0.2.1(@types/node@24.12.4)(esbuild@0.28.1)(jiti@2.7.0)(terser@5.48.0)(typescript@6.0.3)(unrun@0.2.39)(yaml@2.9.0))(bufferutil@4.1.0)(msw@2.12.11(@types/node@24.12.4)(typescript@6.0.3))(utf-8-validate@6.0.6)(vitest@4.1.9) '@vitest/expect': 4.1.9 '@vitest/mocker': 4.1.9(@voidzero-dev/vite-plus-core@0.2.2(@types/node@24.12.4)(esbuild@0.28.1)(jiti@2.7.0)(terser@5.48.0)(typescript@6.0.3)(unrun@0.2.39)(yaml@2.9.0))(msw@2.12.11(@types/node@24.12.4)(typescript@6.0.3)) '@vitest/pretty-format': 4.1.9 @@ -21399,12 +21400,12 @@ snapshots: '@vitest/snapshot': 4.1.9 '@vitest/spy': 4.1.9 '@vitest/utils': 4.1.9 - '@voidzero-dev/vite-plus-core': 0.2.2(@types/node@24.12.4)(esbuild@0.28.1)(jiti@2.7.0)(terser@5.48.0)(typescript@6.0.3)(unrun@0.2.39)(yaml@2.9.0) - oxfmt: 0.57.0(vite-plus@0.2.2(@types/node@24.12.4)(bufferutil@4.1.0)(esbuild@0.28.1)(jiti@2.7.0)(msw@2.12.11(@types/node@24.12.4)(typescript@6.0.3))(terser@5.48.0)(typescript@6.0.3)(unrun@0.2.39)(utf-8-validate@6.0.6)(yaml@2.9.0)) - oxlint: 1.72.0(oxlint-tsgolint@0.24.0)(vite-plus@0.2.2(@types/node@24.12.4)(bufferutil@4.1.0)(esbuild@0.28.1)(jiti@2.7.0)(msw@2.12.11(@types/node@24.12.4)(typescript@6.0.3))(terser@5.48.0)(typescript@6.0.3)(unrun@0.2.39)(utf-8-validate@6.0.6)(yaml@2.9.0)) - oxlint-tsgolint: 0.24.0 - vite: '@voidzero-dev/vite-plus-core@0.2.2(@types/node@24.12.4)(esbuild@0.28.1)(jiti@2.7.0)(terser@5.48.0)(typescript@6.0.3)(unrun@0.2.39)(yaml@2.9.0)' - vitest: 4.1.9(@types/node@24.12.4)(@vitest/browser-preview@4.1.9)(@voidzero-dev/vite-plus-core@0.2.2(@types/node@24.12.4)(esbuild@0.28.1)(jiti@2.7.0)(terser@5.48.0)(typescript@6.0.3)(unrun@0.2.39)(yaml@2.9.0))(msw@2.12.11(@types/node@24.12.4)(typescript@6.0.3)) + '@voidzero-dev/vite-plus-core': 0.2.1(@types/node@24.12.4)(esbuild@0.28.1)(jiti@2.7.0)(terser@5.48.0)(typescript@6.0.3)(unrun@0.2.39)(yaml@2.9.0) + oxfmt: 0.55.0(vite-plus@0.2.1(@types/node@24.12.4)(bufferutil@4.1.0)(esbuild@0.28.1)(jiti@2.7.0)(msw@2.12.11(@types/node@24.12.4)(typescript@6.0.3))(terser@5.48.0)(typescript@6.0.3)(unrun@0.2.39)(utf-8-validate@6.0.6)(yaml@2.9.0)) + oxlint: 1.70.0(oxlint-tsgolint@0.23.0)(vite-plus@0.2.1(@types/node@24.12.4)(bufferutil@4.1.0)(esbuild@0.28.1)(jiti@2.7.0)(msw@2.12.11(@types/node@24.12.4)(typescript@6.0.3))(terser@5.48.0)(typescript@6.0.3)(unrun@0.2.39)(utf-8-validate@6.0.6)(yaml@2.9.0)) + oxlint-tsgolint: 0.23.0 + vite: '@voidzero-dev/vite-plus-core@0.2.1(@types/node@24.12.4)(esbuild@0.28.1)(jiti@2.7.0)(terser@5.48.0)(typescript@6.0.3)(unrun@0.2.39)(yaml@2.9.0)' + vitest: 4.1.9(@types/node@24.12.4)(@vitest/browser-preview@4.1.9)(@voidzero-dev/vite-plus-core@0.2.1(@types/node@24.12.4)(esbuild@0.28.1)(jiti@2.7.0)(terser@5.48.0)(typescript@6.0.3)(unrun@0.2.39)(yaml@2.9.0))(msw@2.12.11(@types/node@24.12.4)(typescript@6.0.3)) optionalDependencies: '@voidzero-dev/vite-plus-darwin-arm64': 0.2.2 '@voidzero-dev/vite-plus-darwin-x64': 0.2.2 @@ -21448,7 +21449,7 @@ snapshots: optionalDependencies: vite: '@voidzero-dev/vite-plus-core@0.2.2(@types/node@24.12.4)(esbuild@0.28.1)(jiti@2.7.0)(terser@5.48.0)(typescript@6.0.3)(unrun@0.2.39)(yaml@2.9.0)' - vitest@4.1.9(@types/node@24.12.4)(@vitest/browser-preview@4.1.9)(@voidzero-dev/vite-plus-core@0.2.2(@types/node@24.12.4)(esbuild@0.28.1)(jiti@2.7.0)(terser@5.48.0)(typescript@6.0.3)(unrun@0.2.39)(yaml@2.9.0))(msw@2.12.11(@types/node@24.12.4)(typescript@6.0.3)): + vitest@4.1.9(@types/node@24.12.4)(@vitest/browser-preview@4.1.9)(@voidzero-dev/vite-plus-core@0.2.1(@types/node@24.12.4)(esbuild@0.28.1)(jiti@2.7.0)(terser@5.48.0)(typescript@6.0.3)(unrun@0.2.39)(yaml@2.9.0))(msw@2.12.11(@types/node@24.12.4)(typescript@6.0.3)): dependencies: '@vitest/expect': 4.1.9 '@vitest/mocker': 4.1.9(@voidzero-dev/vite-plus-core@0.2.2(@types/node@24.12.4)(esbuild@0.28.1)(jiti@2.7.0)(terser@5.48.0)(typescript@6.0.3)(unrun@0.2.39)(yaml@2.9.0))(msw@2.12.11(@types/node@24.12.4)(typescript@6.0.3)) @@ -21472,7 +21473,7 @@ snapshots: why-is-node-running: 2.3.0 optionalDependencies: '@types/node': 24.12.4 - '@vitest/browser-preview': 4.1.9(@voidzero-dev/vite-plus-core@0.2.2(@types/node@24.12.4)(esbuild@0.28.1)(jiti@2.7.0)(terser@5.48.0)(typescript@6.0.3)(unrun@0.2.39)(yaml@2.9.0))(bufferutil@4.1.0)(msw@2.12.11(@types/node@24.12.4)(typescript@6.0.3))(utf-8-validate@6.0.6)(vitest@4.1.9) + '@vitest/browser-preview': 4.1.9(@voidzero-dev/vite-plus-core@0.2.1(@types/node@24.12.4)(esbuild@0.28.1)(jiti@2.7.0)(terser@5.48.0)(typescript@6.0.3)(unrun@0.2.39)(yaml@2.9.0))(bufferutil@4.1.0)(msw@2.12.11(@types/node@24.12.4)(typescript@6.0.3))(utf-8-validate@6.0.6)(vitest@4.1.9) transitivePeerDependencies: - msw