feat: harden local shell, SFTP, and desktop session reliability
Finder-launched terminals now inherit a login PATH so tools like ollama resolve, destructive SFTP/editor actions require confirmation, and terminal search plus window dragging work again. SSH forwards and RDP sessions keep listeners and survive reconnect without FastPath crashes. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
188f3556ed
commit
08696896f9
223 files changed
+13493
-3423
No files matched your search
@@ -25,6 +25,7 @@ export const mockDesktopApi: DesktopApiContract = {
|
||||
sshBackend: 'libssh2 / ssh2 0.9',
|
||||
dataPath: '/tmp/opsxshell-data.json',
|
||||
credentialPath: '/tmp/.opsxshell/master.key',
|
||||
logPath: '/tmp/opsxshell/logs/opsxshell.log',
|
||||
}),
|
||||
// SSH
|
||||
sshConnect: vi.fn().mockResolvedValue({ success: true, connectionId: 'test-conn-1' }),
|
||||
@@ -46,11 +47,13 @@ export const mockDesktopApi: DesktopApiContract = {
|
||||
|
||||
// SFTP
|
||||
sftpConnect: vi.fn().mockResolvedValue({ success: true, sftpId: 'test-sftp-1' }),
|
||||
sftpDisconnect: vi.fn().mockResolvedValue({ success: true }),
|
||||
sftpListDirectory: vi.fn().mockResolvedValue({ success: true, files: [] }),
|
||||
sftpUpload: vi.fn().mockResolvedValue({ success: true }),
|
||||
sftpUploadDir: vi.fn().mockResolvedValue({ success: true }),
|
||||
sftpDownload: vi.fn().mockResolvedValue({ success: true }),
|
||||
sftpDownloadDir: vi.fn().mockResolvedValue({ success: true }),
|
||||
sftpCancelTransfer: vi.fn().mockResolvedValue({ success: true }),
|
||||
sftpRename: vi.fn().mockResolvedValue({ success: true }),
|
||||
sftpDelete: vi.fn().mockResolvedValue({ success: true }),
|
||||
sftpMkdir: vi.fn().mockResolvedValue({ success: true }),
|
||||
@@ -95,6 +98,17 @@ export const mockDesktopApi: DesktopApiContract = {
|
||||
features: [],
|
||||
}),
|
||||
licenseDeviceId: vi.fn().mockResolvedValue('test-device'),
|
||||
licenseSetEmail: vi.fn().mockResolvedValue({
|
||||
plan: 'free',
|
||||
deviceId: 'test-device',
|
||||
activated: false,
|
||||
features: [],
|
||||
email: '',
|
||||
}),
|
||||
licenseCheckout: vi.fn().mockResolvedValue({
|
||||
orderNo: 'ORD-TEST',
|
||||
checkoutUrl: 'https://pancake.waffo.ai/store/opsxshell-pwsi6m4n/product/PROD_TEST?test=true',
|
||||
}),
|
||||
aiProviderSaveKey: vi.fn().mockResolvedValue({ success: true }),
|
||||
aiProviderHasKey: vi.fn().mockResolvedValue(false),
|
||||
aiProviderDeleteKey: vi.fn().mockResolvedValue({ success: true }),
|
||||
@@ -127,7 +141,10 @@ export const mockDesktopApi: DesktopApiContract = {
|
||||
clipboardReadText: vi.fn().mockResolvedValue(''),
|
||||
clipboardWriteText: vi.fn().mockResolvedValue(undefined),
|
||||
toggleMaximize: vi.fn().mockResolvedValue(undefined),
|
||||
setFullscreen: vi.fn().mockResolvedValue(undefined),
|
||||
isFullscreen: vi.fn().mockResolvedValue(false),
|
||||
toggleDevtools: vi.fn().mockResolvedValue(false),
|
||||
applyNativeMenuLocale: vi.fn().mockResolvedValue('en'),
|
||||
|
||||
// Local terminal
|
||||
localListShells: vi.fn().mockResolvedValue({
|
||||
|
||||
Reference in new issue
Block a user