@neovate/code 0.18.2 → 0.20.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -4,7 +4,10 @@ import type { OpenAIProvider } from '@ai-sdk/openai';
4
4
  import * as z from 'zod';
5
5
  import { z as _zod } from 'zod';
6
6
 
7
- declare type ApprovalCategory = 'read' | 'write' | 'command' | 'network';
7
+ /** Supported application types for open and detect operations */
8
+ declare type App = 'cursor' | 'vscode' | 'vscode-insiders' | 'zed' | 'windsurf' | 'iterm' | 'warp' | 'terminal' | 'antigravity' | 'finder' | 'sourcetree';
9
+
10
+ declare type ApprovalCategory = 'read' | 'write' | 'command' | 'network' | 'ask';
8
11
 
9
12
  declare type ApprovalContext = {
10
13
  toolName: string;
@@ -96,6 +99,44 @@ declare type Config = {
96
99
  autoUpdate?: boolean;
97
100
  browser?: boolean;
98
101
  temperature?: number;
102
+ httpProxy?: string;
103
+ desktop?: DesktopConfig;
104
+ /**
105
+ * Extensions configuration for third-party custom agents.
106
+ * Allows arbitrary nested configuration without validation.
107
+ */
108
+ extensions?: Record<string, any>;
109
+ /**
110
+ * Tools configuration for enabling/disabling specific tools.
111
+ * Key is the tool name, value is boolean (false to disable).
112
+ */
113
+ tools?: Record<string, boolean>;
114
+ };
115
+
116
+ declare type ConfigGetInput = {
117
+ cwd: string;
118
+ isGlobal: boolean;
119
+ key: string;
120
+ };
121
+
122
+ declare type ConfigGetOutput = {
123
+ success: boolean;
124
+ data: {
125
+ value: any;
126
+ };
127
+ };
128
+
129
+ declare type ConfigListInput = {
130
+ cwd: string;
131
+ };
132
+
133
+ declare type ConfigListOutput = {
134
+ success: boolean;
135
+ data: {
136
+ globalConfigDir: string;
137
+ projectConfigDir: string;
138
+ config: any;
139
+ };
99
140
  };
100
141
 
101
142
  export declare class _ConfigManager {
@@ -113,6 +154,20 @@ export declare class _ConfigManager {
113
154
  updateConfig(global: boolean, newConfig: Partial<Config>): void;
114
155
  }
115
156
 
157
+ declare type ConfigRemoveInput = {
158
+ cwd: string;
159
+ isGlobal: boolean;
160
+ key: string;
161
+ values?: string[];
162
+ };
163
+
164
+ declare type ConfigSetInput = {
165
+ cwd: string;
166
+ isGlobal: boolean;
167
+ key: string;
168
+ value: string;
169
+ };
170
+
116
171
  export declare class Context {
117
172
  #private;
118
173
  cwd: string;
@@ -163,6 +218,7 @@ declare interface CreateTaskInput {
163
218
 
164
219
  export declare function createTool<TSchema extends z.ZodTypeAny>(config: {
165
220
  name: string;
221
+ displayName?: string;
166
222
  description: string;
167
223
  parameters: TSchema;
168
224
  execute: (params: z.output<TSchema>) => Promise<ToolResult> | ToolResult;
@@ -173,6 +229,13 @@ export declare function createTool<TSchema extends z.ZodTypeAny>(config: {
173
229
  }) => string;
174
230
  }): Tool<TSchema>;
175
231
 
232
+ declare type DesktopConfig = {
233
+ theme?: 'light' | 'dark' | 'system';
234
+ sendMessageWith?: 'enter' | 'cmdEnter';
235
+ terminalFont?: string;
236
+ terminalFontSize?: number;
237
+ };
238
+
176
239
  declare type DiffViewerReturnDisplay = {
177
240
  type: 'diff_viewer';
178
241
  originalContent: string | {
@@ -187,6 +250,12 @@ declare type DiffViewerReturnDisplay = {
187
250
 
188
251
  declare type Enforce = 'pre' | 'post';
189
252
 
253
+ /** Standard error response */
254
+ declare type ErrorResponse = {
255
+ success: false;
256
+ error: string;
257
+ };
258
+
190
259
  declare type EventHandler = (data: any) => void;
191
260
 
192
261
  declare type EventMessage = BaseMessage & {
@@ -195,6 +264,333 @@ declare type EventMessage = BaseMessage & {
195
264
  data: any;
196
265
  };
197
266
 
267
+ declare type GitCloneInput = {
268
+ url: string;
269
+ destination: string;
270
+ taskId?: string;
271
+ };
272
+
273
+ declare type GitCloneOutput = {
274
+ success: boolean;
275
+ data?: {
276
+ clonePath: string;
277
+ repoName: string;
278
+ };
279
+ error?: string;
280
+ errorCode?: string;
281
+ needsCredentials?: boolean;
282
+ };
283
+
284
+ declare type GitCommitInput = {
285
+ cwd: string;
286
+ message: string;
287
+ noVerify?: boolean;
288
+ };
289
+
290
+ declare type GitCreateBranchInput = {
291
+ cwd: string;
292
+ name: string;
293
+ };
294
+
295
+ declare type GitCreateBranchOutput = {
296
+ success: boolean;
297
+ data?: {
298
+ branchName: string;
299
+ wasRenamed: boolean;
300
+ };
301
+ error?: string;
302
+ };
303
+
304
+ declare type GitPushInput = {
305
+ cwd: string;
306
+ };
307
+
308
+ declare type GitStageInput = {
309
+ cwd: string;
310
+ all?: boolean;
311
+ };
312
+
313
+ declare type GitStatusInput = {
314
+ cwd: string;
315
+ };
316
+
317
+ declare type GitStatusOutput = {
318
+ success: boolean;
319
+ data?: {
320
+ isRepo: boolean;
321
+ hasUncommittedChanges: boolean;
322
+ hasStagedChanges: boolean;
323
+ isGitInstalled: boolean;
324
+ isUserConfigured: {
325
+ name: boolean;
326
+ email: boolean;
327
+ };
328
+ isMerging: boolean;
329
+ };
330
+ error?: string;
331
+ };
332
+
333
+ /**
334
+ * Central type registry for all message bus handlers.
335
+ * Maps handler method names to their input and output types.
336
+ */
337
+ declare type HandlerMap = {
338
+ 'config.get': {
339
+ input: ConfigGetInput;
340
+ output: ConfigGetOutput;
341
+ };
342
+ 'config.set': {
343
+ input: ConfigSetInput;
344
+ output: SuccessResponse;
345
+ };
346
+ 'config.remove': {
347
+ input: ConfigRemoveInput;
348
+ output: SuccessResponse;
349
+ };
350
+ 'config.list': {
351
+ input: ConfigListInput;
352
+ output: ConfigListOutput;
353
+ };
354
+ 'git.clone': {
355
+ input: GitCloneInput;
356
+ output: GitCloneOutput;
357
+ };
358
+ 'git.clone.cancel': {
359
+ input: {
360
+ taskId: string;
361
+ };
362
+ output: SuccessResponse;
363
+ };
364
+ 'git.status': {
365
+ input: GitStatusInput;
366
+ output: GitStatusOutput;
367
+ };
368
+ 'git.stage': {
369
+ input: GitStageInput;
370
+ output: SuccessResponse | ErrorResponse;
371
+ };
372
+ 'git.commit': {
373
+ input: GitCommitInput;
374
+ output: SuccessResponse | ErrorResponse;
375
+ };
376
+ 'git.push': {
377
+ input: GitPushInput;
378
+ output: SuccessResponse | ErrorResponse;
379
+ };
380
+ 'git.createBranch': {
381
+ input: GitCreateBranchInput;
382
+ output: GitCreateBranchOutput;
383
+ };
384
+ 'mcp.getStatus': {
385
+ input: McpGetStatusInput;
386
+ output: McpGetStatusOutput;
387
+ };
388
+ 'mcp.reconnect': {
389
+ input: McpReconnectInput;
390
+ output: McpReconnectOutput;
391
+ };
392
+ 'mcp.list': {
393
+ input: McpListInput;
394
+ output: McpListOutput;
395
+ };
396
+ 'models.list': {
397
+ input: ModelsListInput;
398
+ output: ModelsListOutput;
399
+ };
400
+ 'outputStyles.list': {
401
+ input: OutputStylesListInput;
402
+ output: OutputStylesListOutput;
403
+ };
404
+ 'project.addHistory': {
405
+ input: ProjectAddHistoryInput;
406
+ output: SuccessResponse;
407
+ };
408
+ 'project.clearContext': {
409
+ input: ProjectClearContextInput;
410
+ output: SuccessResponse;
411
+ };
412
+ 'project.addMemory': {
413
+ input: ProjectAddMemoryInput;
414
+ output: SuccessResponse;
415
+ };
416
+ 'project.analyzeContext': {
417
+ input: ProjectAnalyzeContextInput;
418
+ output: ProjectAnalyzeContextOutput;
419
+ };
420
+ 'project.getRepoInfo': {
421
+ input: ProjectGetRepoInfoInput;
422
+ output: ProjectGetRepoInfoOutput;
423
+ };
424
+ 'project.workspaces.list': {
425
+ input: ProjectWorkspacesListInput;
426
+ output: ProjectWorkspacesListOutput;
427
+ };
428
+ 'project.workspaces.get': {
429
+ input: ProjectWorkspacesGetInput;
430
+ output: ProjectWorkspacesGetOutput;
431
+ };
432
+ 'project.workspaces.create': {
433
+ input: ProjectWorkspacesCreateInput;
434
+ output: ProjectWorkspacesCreateOutput;
435
+ };
436
+ 'project.workspaces.delete': {
437
+ input: ProjectWorkspacesDeleteInput;
438
+ output: ProjectWorkspacesDeleteOutput;
439
+ };
440
+ 'project.workspaces.merge': {
441
+ input: ProjectWorkspacesMergeInput;
442
+ output: ProjectWorkspacesMergeOutput;
443
+ };
444
+ 'project.workspaces.createGithubPR': {
445
+ input: ProjectWorkspacesCreateGithubPRInput;
446
+ output: ProjectWorkspacesCreateGithubPROutput;
447
+ };
448
+ 'project.generateCommit': {
449
+ input: ProjectGenerateCommitInput;
450
+ output: ProjectGenerateCommitOutput;
451
+ };
452
+ 'providers.list': {
453
+ input: ProvidersListInput;
454
+ output: ProvidersListOutput;
455
+ };
456
+ 'session.initialize': {
457
+ input: SessionInitializeInput;
458
+ output: SessionInitializeOutput;
459
+ };
460
+ 'session.messages.list': {
461
+ input: SessionMessagesListInput;
462
+ output: SessionMessagesListOutput;
463
+ };
464
+ 'session.getModel': {
465
+ input: SessionGetModelInput;
466
+ output: SessionGetModelOutput;
467
+ };
468
+ 'session.send': {
469
+ input: SessionSendInput;
470
+ output: SessionSendOutput;
471
+ };
472
+ 'session.cancel': {
473
+ input: SessionCancelInput;
474
+ output: SuccessResponse;
475
+ };
476
+ 'session.addMessages': {
477
+ input: SessionAddMessagesInput;
478
+ output: SuccessResponse;
479
+ };
480
+ 'session.compact': {
481
+ input: SessionCompactInput;
482
+ output: SessionCompactOutput;
483
+ };
484
+ 'session.config.setApprovalMode': {
485
+ input: SessionConfigSetApprovalModeInput;
486
+ output: SuccessResponse;
487
+ };
488
+ 'session.config.addApprovalTools': {
489
+ input: SessionConfigAddApprovalToolsInput;
490
+ output: SuccessResponse;
491
+ };
492
+ 'session.config.setSummary': {
493
+ input: SessionConfigSetSummaryInput;
494
+ output: SuccessResponse;
495
+ };
496
+ 'session.config.setPastedTextMap': {
497
+ input: SessionConfigSetPastedTextMapInput;
498
+ output: SuccessResponse;
499
+ };
500
+ 'session.config.setPastedImageMap': {
501
+ input: SessionConfigSetPastedImageMapInput;
502
+ output: SuccessResponse;
503
+ };
504
+ 'session.config.getAdditionalDirectories': {
505
+ input: SessionConfigGetAdditionalDirectoriesInput;
506
+ output: SessionConfigGetAdditionalDirectoriesOutput;
507
+ };
508
+ 'session.config.addDirectory': {
509
+ input: SessionConfigAddDirectoryInput;
510
+ output: SuccessResponse;
511
+ };
512
+ 'session.config.removeDirectory': {
513
+ input: SessionConfigRemoveDirectoryInput;
514
+ output: SuccessResponse;
515
+ };
516
+ 'session.config.set': {
517
+ input: SessionConfigSetInput;
518
+ output: SuccessResponse;
519
+ };
520
+ 'session.config.get': {
521
+ input: SessionConfigGetInput;
522
+ output: SessionConfigGetOutput;
523
+ };
524
+ 'session.config.remove': {
525
+ input: SessionConfigRemoveInput;
526
+ output: SuccessResponse;
527
+ };
528
+ 'sessions.list': {
529
+ input: SessionsListInput;
530
+ output: SessionsListOutput;
531
+ };
532
+ 'sessions.resume': {
533
+ input: SessionsResumeInput;
534
+ output: SessionsResumeOutput;
535
+ };
536
+ 'slashCommand.list': {
537
+ input: SlashCommandListInput;
538
+ output: SlashCommandListOutput;
539
+ };
540
+ 'slashCommand.get': {
541
+ input: SlashCommandGetInput;
542
+ output: SlashCommandGetOutput;
543
+ };
544
+ 'slashCommand.execute': {
545
+ input: SlashCommandExecuteInput;
546
+ output: SlashCommandExecuteOutput;
547
+ };
548
+ 'status.get': {
549
+ input: StatusGetInput;
550
+ output: StatusGetOutput;
551
+ };
552
+ 'utils.query': {
553
+ input: UtilsQueryInput;
554
+ output: UtilsQueryOutput;
555
+ };
556
+ 'utils.quickQuery': {
557
+ input: UtilsQuickQueryInput;
558
+ output: UtilsQuickQueryOutput;
559
+ };
560
+ 'utils.summarizeMessage': {
561
+ input: UtilsSummarizeMessageInput;
562
+ output: UtilsSummarizeMessageOutput;
563
+ };
564
+ 'utils.getPaths': {
565
+ input: UtilsGetPathsInput;
566
+ output: UtilsGetPathsOutput;
567
+ };
568
+ 'utils.telemetry': {
569
+ input: UtilsTelemetryInput;
570
+ output: SuccessResponse;
571
+ };
572
+ 'utils.files.list': {
573
+ input: UtilsFilesListInput;
574
+ output: UtilsFilesListOutput;
575
+ };
576
+ 'utils.tool.executeBash': {
577
+ input: UtilsToolExecuteBashInput;
578
+ output: UtilsToolExecuteBashOutput;
579
+ };
580
+ 'utils.open': {
581
+ input: UtilsOpenInput;
582
+ output: SuccessResponse;
583
+ };
584
+ 'utils.detectApps': {
585
+ input: UtilsDetectAppsInput;
586
+ output: UtilsDetectAppsOutput;
587
+ };
588
+ toolApproval: {
589
+ input: ToolApprovalInput;
590
+ output: ToolApprovalOutput;
591
+ };
592
+ };
593
+
198
594
  declare type ImagePart = {
199
595
  type: 'image';
200
596
  data: string;
@@ -242,6 +638,28 @@ declare interface MCPConfig {
242
638
  headers?: Record<string, string>;
243
639
  }
244
640
 
641
+ declare type McpGetStatusInput = {
642
+ cwd: string;
643
+ };
644
+
645
+ declare type McpGetStatusOutput = {
646
+ success: boolean;
647
+ error?: string;
648
+ data: {
649
+ servers: Record<string, {
650
+ status: string;
651
+ error?: string;
652
+ toolCount: number;
653
+ tools: string[];
654
+ }>;
655
+ configs: Record<string, McpServerConfig>;
656
+ globalConfigPath: string;
657
+ projectConfigPath: string;
658
+ isReady: boolean;
659
+ isLoading: boolean;
660
+ };
661
+ };
662
+
245
663
  declare type McpHttpServerConfig = {
246
664
  type: 'http';
247
665
  url: string;
@@ -249,6 +667,30 @@ declare type McpHttpServerConfig = {
249
667
  headers?: Record<string, string>;
250
668
  };
251
669
 
670
+ declare type McpListInput = {
671
+ cwd: string;
672
+ };
673
+
674
+ declare type McpListOutput = {
675
+ success: boolean;
676
+ data: {
677
+ projectServers: Record<string, McpServerConfig>;
678
+ globalServers: Record<string, McpServerConfig>;
679
+ activeServers: Record<string, {
680
+ status: 'pending' | 'connecting' | 'connected' | 'failed' | 'disconnected';
681
+ config: McpServerConfig;
682
+ error?: string;
683
+ toolCount?: number;
684
+ tools: string[];
685
+ scope: 'global' | 'project';
686
+ }>;
687
+ projectConfigPath: string;
688
+ globalConfigPath: string;
689
+ isReady: boolean;
690
+ isLoading: boolean;
691
+ };
692
+ };
693
+
252
694
  declare class MCPManager {
253
695
  #private;
254
696
  private servers;
@@ -280,6 +722,17 @@ declare class MCPManager {
280
722
  private _isTemporaryError;
281
723
  }
282
724
 
725
+ declare type McpReconnectInput = {
726
+ cwd: string;
727
+ serverName: string;
728
+ };
729
+
730
+ declare type McpReconnectOutput = {
731
+ success: boolean;
732
+ message?: string;
733
+ error?: string;
734
+ };
735
+
283
736
  declare type McpServerConfig = McpStdioServerConfig | McpSSEServerConfig | McpHttpServerConfig;
284
737
 
285
738
  declare type MCPServerStatus = 'pending' | 'connecting' | 'connected' | 'failed' | 'disconnected';
@@ -304,16 +757,20 @@ declare type Message = RequestMessage | ResponseMessage | EventMessage;
304
757
  declare type Message_2 = SystemMessage | UserMessage | AssistantMessage | ToolMessage | ToolMessage2;
305
758
 
306
759
  declare class MessageBus extends EventEmitter {
760
+ messageHandlers: Map<string, MessageHandler>;
307
761
  private transport?;
308
762
  private pendingRequests;
309
- private messageHandlers;
310
763
  private eventHandlers;
311
764
  constructor();
312
765
  setTransport(transport: MessageTransport): void;
313
766
  isConnected(): boolean;
767
+ request<K extends keyof HandlerMap>(method: K, params: HandlerMap[K]['input'], options?: {
768
+ timeout?: number;
769
+ }): Promise<HandlerMap[K]['output']>;
314
770
  request(method: string, params: any, options?: {
315
771
  timeout?: number;
316
772
  }): Promise<any>;
773
+ registerHandler<K extends keyof HandlerMap>(method: K, handler: (data: HandlerMap[K]['input']) => Promise<HandlerMap[K]['output']>): void;
317
774
  registerHandler(method: string, handler: MessageHandler): void;
318
775
  unregisterHandler(method: string): void;
319
776
  emitEvent(event: string, data: any): Promise<void>;
@@ -384,6 +841,32 @@ declare interface ModelModalities {
384
841
  output: ('text' | 'audio' | 'image')[];
385
842
  }
386
843
 
844
+ declare type ModelsListInput = {
845
+ cwd: string;
846
+ };
847
+
848
+ declare type ModelsListOutput = {
849
+ success: boolean;
850
+ data: {
851
+ groupedModels: Array<{
852
+ provider: string;
853
+ providerId: string;
854
+ models: Array<{
855
+ name: string;
856
+ modelId: string;
857
+ value: string;
858
+ }>;
859
+ }>;
860
+ currentModel: any;
861
+ currentModelInfo: {
862
+ providerName: string;
863
+ modelName: string;
864
+ modelId: string;
865
+ modelContextLimit: number;
866
+ } | null;
867
+ };
868
+ };
869
+
387
870
  declare type NormalizedMessage = Message_2 & {
388
871
  type: 'message';
389
872
  timestamp: string;
@@ -408,6 +891,21 @@ declare type OutputStyleOpts = {
408
891
  prompt: string;
409
892
  };
410
893
 
894
+ declare type OutputStylesListInput = {
895
+ cwd: string;
896
+ };
897
+
898
+ declare type OutputStylesListOutput = {
899
+ success: boolean;
900
+ data: {
901
+ outputStyles: Array<{
902
+ name: string;
903
+ description: string;
904
+ }>;
905
+ currentOutputStyle: any;
906
+ };
907
+ };
908
+
411
909
  declare class Paths {
412
910
  globalConfigDir: string;
413
911
  globalProjectDir: string;
@@ -538,6 +1036,178 @@ declare class PluginManager {
538
1036
  apply({ hook, args, memo, type, pluginContext, }: PluginApplyOpts): Promise<any>;
539
1037
  }
540
1038
 
1039
+ declare type ProjectAddHistoryInput = {
1040
+ cwd: string;
1041
+ history: string;
1042
+ };
1043
+
1044
+ declare type ProjectAddMemoryInput = {
1045
+ cwd: string;
1046
+ global: boolean;
1047
+ rule: string;
1048
+ };
1049
+
1050
+ declare type ProjectAnalyzeContextInput = {
1051
+ cwd: string;
1052
+ sessionId: string;
1053
+ };
1054
+
1055
+ declare type ProjectAnalyzeContextOutput = {
1056
+ success: boolean;
1057
+ error?: string;
1058
+ data?: {
1059
+ systemPrompt: {
1060
+ tokens: number;
1061
+ percentage: number;
1062
+ };
1063
+ systemTools: {
1064
+ tokens: number;
1065
+ percentage: number;
1066
+ };
1067
+ mcpTools: {
1068
+ tokens: number;
1069
+ percentage: number;
1070
+ };
1071
+ messages: {
1072
+ tokens: number;
1073
+ percentage: number;
1074
+ };
1075
+ freeSpace: {
1076
+ tokens: number;
1077
+ percentage: number;
1078
+ };
1079
+ totalContextWindow: number;
1080
+ };
1081
+ };
1082
+
1083
+ declare type ProjectClearContextInput = {
1084
+ cwd?: string;
1085
+ };
1086
+
1087
+ declare type ProjectGenerateCommitInput = {
1088
+ cwd: string;
1089
+ language?: string;
1090
+ systemPrompt?: string;
1091
+ model?: string;
1092
+ diff?: string;
1093
+ fileList?: string;
1094
+ };
1095
+
1096
+ declare type ProjectGenerateCommitOutput = {
1097
+ success: boolean;
1098
+ error?: string;
1099
+ data?: {
1100
+ commitMessage: string;
1101
+ branchName: string;
1102
+ isBreakingChange: boolean;
1103
+ summary: string;
1104
+ };
1105
+ };
1106
+
1107
+ declare type ProjectGetRepoInfoInput = {
1108
+ cwd: string;
1109
+ };
1110
+
1111
+ declare type ProjectGetRepoInfoOutput = {
1112
+ success: boolean;
1113
+ error?: string;
1114
+ data?: {
1115
+ repoData: {
1116
+ path: string;
1117
+ name: string;
1118
+ workspaceIds: string[];
1119
+ metadata: {
1120
+ lastAccessed: number;
1121
+ settings: any;
1122
+ };
1123
+ gitRemote: {
1124
+ originUrl: string | null;
1125
+ defaultBranch: string | null;
1126
+ syncStatus: any;
1127
+ };
1128
+ };
1129
+ };
1130
+ };
1131
+
1132
+ declare type ProjectWorkspacesCreateGithubPRInput = {
1133
+ cwd: string;
1134
+ name: string;
1135
+ title?: string;
1136
+ description?: string;
1137
+ baseBranch?: string;
1138
+ };
1139
+
1140
+ declare type ProjectWorkspacesCreateGithubPROutput = {
1141
+ success: boolean;
1142
+ error?: string;
1143
+ data?: {
1144
+ prUrl: string;
1145
+ prNumber: number;
1146
+ };
1147
+ };
1148
+
1149
+ declare type ProjectWorkspacesCreateInput = {
1150
+ cwd: string;
1151
+ name?: string;
1152
+ skipUpdate?: boolean;
1153
+ };
1154
+
1155
+ declare type ProjectWorkspacesCreateOutput = {
1156
+ success: boolean;
1157
+ error?: string;
1158
+ data?: {
1159
+ workspace: {
1160
+ name: string;
1161
+ path: string;
1162
+ branch: string;
1163
+ };
1164
+ };
1165
+ };
1166
+
1167
+ declare type ProjectWorkspacesDeleteInput = {
1168
+ cwd: string;
1169
+ name: string;
1170
+ force?: boolean;
1171
+ };
1172
+
1173
+ declare type ProjectWorkspacesDeleteOutput = {
1174
+ success: boolean;
1175
+ error?: string;
1176
+ };
1177
+
1178
+ declare type ProjectWorkspacesGetInput = {
1179
+ cwd: string;
1180
+ workspaceId: string;
1181
+ };
1182
+
1183
+ declare type ProjectWorkspacesGetOutput = {
1184
+ success: boolean;
1185
+ error?: string;
1186
+ data?: WorkspaceData;
1187
+ };
1188
+
1189
+ declare type ProjectWorkspacesListInput = {
1190
+ cwd: string;
1191
+ };
1192
+
1193
+ declare type ProjectWorkspacesListOutput = {
1194
+ success: boolean;
1195
+ error?: string;
1196
+ data?: {
1197
+ workspaces: WorkspaceData[];
1198
+ };
1199
+ };
1200
+
1201
+ declare type ProjectWorkspacesMergeInput = {
1202
+ cwd: string;
1203
+ name: string;
1204
+ };
1205
+
1206
+ declare type ProjectWorkspacesMergeOutput = {
1207
+ success: boolean;
1208
+ error?: string;
1209
+ };
1210
+
541
1211
  declare interface PromptCommand extends BaseSlashCommand {
542
1212
  type: 'prompt';
543
1213
  progressMessage?: string;
@@ -564,11 +1234,31 @@ declare interface Provider {
564
1234
  baseURL?: string;
565
1235
  apiKey?: string;
566
1236
  headers?: Record<string, string>;
1237
+ httpProxy?: string;
567
1238
  };
568
1239
  }
569
1240
 
570
1241
  declare type ProviderConfig = Partial<Omit<Provider, 'createModel'>>;
571
1242
 
1243
+ declare type ProvidersListInput = {
1244
+ cwd: string;
1245
+ };
1246
+
1247
+ declare type ProvidersListOutput = {
1248
+ success: boolean;
1249
+ data: {
1250
+ providers: Array<{
1251
+ id: string;
1252
+ name: string;
1253
+ doc?: string;
1254
+ env?: string[];
1255
+ apiEnv?: string[];
1256
+ validEnvs: string[];
1257
+ hasApiKey: boolean;
1258
+ }>;
1259
+ };
1260
+ };
1261
+
572
1262
  declare type ProvidersMap = Record<string, Provider>;
573
1263
 
574
1264
  export declare function _query(opts: {
@@ -578,8 +1268,12 @@ export declare function _query(opts: {
578
1268
  model?: ModelInfo;
579
1269
  systemPrompt?: string;
580
1270
  onMessage?: (message: NormalizedMessage) => Promise<void>;
1271
+ thinking?: ThinkingConfig | false;
1272
+ responseFormat?: ResponseFormat;
581
1273
  }): Promise<LoopResult>;
582
1274
 
1275
+ declare type ReasoningEffort = 'low' | 'medium' | 'high';
1276
+
583
1277
  declare type ReasoningPart = {
584
1278
  type: 'reasoning';
585
1279
  text: string;
@@ -591,6 +1285,15 @@ declare type RequestMessage = BaseMessage & {
591
1285
  params: any;
592
1286
  };
593
1287
 
1288
+ declare type ResponseFormat = {
1289
+ type: 'text';
1290
+ } | {
1291
+ type: 'json';
1292
+ schema?: any;
1293
+ name?: string;
1294
+ description?: string;
1295
+ };
1296
+
594
1297
  declare type ResponseMessage = BaseMessage & {
595
1298
  type: 'response';
596
1299
  result?: any;
@@ -607,13 +1310,276 @@ export declare function runNeovate(opts: {
607
1310
  upgrade?: UpgradeOptions;
608
1311
  }): Promise<void>;
609
1312
 
1313
+ declare type SessionAddMessagesInput = {
1314
+ cwd: string;
1315
+ sessionId: string;
1316
+ messages: Message_2[];
1317
+ parentUuid?: string;
1318
+ };
1319
+
1320
+ declare type SessionCancelInput = {
1321
+ cwd: string;
1322
+ sessionId: string;
1323
+ };
1324
+
1325
+ declare type SessionCompactInput = {
1326
+ cwd: string;
1327
+ sessionId: string;
1328
+ messages: NormalizedMessage[];
1329
+ };
1330
+
1331
+ declare type SessionCompactOutput = {
1332
+ success: boolean;
1333
+ data: {
1334
+ summary: string;
1335
+ };
1336
+ };
1337
+
1338
+ declare type SessionConfigAddApprovalToolsInput = {
1339
+ cwd: string;
1340
+ sessionId: string;
1341
+ approvalTool: string;
1342
+ };
1343
+
1344
+ declare type SessionConfigAddDirectoryInput = {
1345
+ cwd: string;
1346
+ sessionId: string;
1347
+ directory: string;
1348
+ };
1349
+
1350
+ declare type SessionConfigGetAdditionalDirectoriesInput = {
1351
+ cwd: string;
1352
+ sessionId: string;
1353
+ };
1354
+
1355
+ declare type SessionConfigGetAdditionalDirectoriesOutput = {
1356
+ success: boolean;
1357
+ data: {
1358
+ directories: string[];
1359
+ };
1360
+ };
1361
+
1362
+ declare type SessionConfigGetInput = {
1363
+ cwd: string;
1364
+ sessionId: string;
1365
+ key?: string;
1366
+ };
1367
+
1368
+ declare type SessionConfigGetOutput = {
1369
+ success: boolean;
1370
+ data: {
1371
+ value: any;
1372
+ };
1373
+ };
1374
+
1375
+ declare type SessionConfigRemoveDirectoryInput = {
1376
+ cwd: string;
1377
+ sessionId: string;
1378
+ directory: string;
1379
+ };
1380
+
1381
+ declare type SessionConfigRemoveInput = {
1382
+ cwd: string;
1383
+ sessionId: string;
1384
+ key: string;
1385
+ };
1386
+
1387
+ declare type SessionConfigSetApprovalModeInput = {
1388
+ cwd: string;
1389
+ sessionId: string;
1390
+ approvalMode: ApprovalMode;
1391
+ };
1392
+
1393
+ declare type SessionConfigSetInput = {
1394
+ cwd: string;
1395
+ sessionId: string;
1396
+ key: string;
1397
+ value: any;
1398
+ };
1399
+
1400
+ declare type SessionConfigSetPastedImageMapInput = {
1401
+ cwd: string;
1402
+ sessionId: string;
1403
+ pastedImageMap: Record<string, string>;
1404
+ };
1405
+
1406
+ declare type SessionConfigSetPastedTextMapInput = {
1407
+ cwd: string;
1408
+ sessionId: string;
1409
+ pastedTextMap: Record<string, string>;
1410
+ };
1411
+
1412
+ declare type SessionConfigSetSummaryInput = {
1413
+ cwd: string;
1414
+ sessionId: string;
1415
+ summary: string;
1416
+ };
1417
+
1418
+ declare type SessionGetModelInput = {
1419
+ cwd: string;
1420
+ sessionId: string;
1421
+ includeModelInfo?: boolean;
1422
+ };
1423
+
1424
+ declare type SessionGetModelOutput = {
1425
+ success: true;
1426
+ data: {
1427
+ model: string | null;
1428
+ };
1429
+ } | {
1430
+ success: true;
1431
+ data: {
1432
+ model: string | null;
1433
+ modelInfo: ModelInfo | null;
1434
+ providers: ProvidersMap;
1435
+ };
1436
+ } | {
1437
+ success: false;
1438
+ error: any;
1439
+ };
1440
+
1441
+ declare type SessionInitializeInput = {
1442
+ cwd: string;
1443
+ sessionId?: string;
1444
+ };
1445
+
1446
+ declare type SessionInitializeOutput = {
1447
+ success: boolean;
1448
+ error?: any;
1449
+ data: {
1450
+ productName: string;
1451
+ productASCIIArt: string | undefined;
1452
+ version: string;
1453
+ model: any;
1454
+ planModel: string | undefined;
1455
+ initializeModelError: string | null;
1456
+ providers: any;
1457
+ approvalMode: ApprovalMode;
1458
+ sessionSummary: string | undefined;
1459
+ pastedTextMap: Record<string, string>;
1460
+ pastedImageMap: Record<string, string>;
1461
+ };
1462
+ };
1463
+
1464
+ declare type SessionMessagesListInput = {
1465
+ cwd: string;
1466
+ sessionId: string;
1467
+ };
1468
+
1469
+ declare type SessionMessagesListOutput = {
1470
+ success: boolean;
1471
+ data: {
1472
+ messages: NormalizedMessage[];
1473
+ };
1474
+ };
1475
+
1476
+ declare type SessionSendInput = {
1477
+ message: string | null;
1478
+ cwd: string;
1479
+ sessionId: string | undefined;
1480
+ planMode: boolean;
1481
+ model?: string;
1482
+ attachments?: ImagePart[];
1483
+ parentUuid?: string;
1484
+ thinking?: ThinkingConfig;
1485
+ };
1486
+
1487
+ declare type SessionSendOutput = any;
1488
+
1489
+ declare type SessionsListInput = {
1490
+ cwd: string;
1491
+ };
1492
+
1493
+ declare type SessionsListOutput = {
1494
+ success: boolean;
1495
+ data: {
1496
+ sessions: Array<{
1497
+ sessionId: string;
1498
+ modified: Date;
1499
+ created: Date;
1500
+ messageCount: number;
1501
+ summary: string;
1502
+ }>;
1503
+ };
1504
+ };
1505
+
1506
+ declare type SessionsResumeInput = {
1507
+ cwd: string;
1508
+ sessionId: string;
1509
+ };
1510
+
1511
+ declare type SessionsResumeOutput = {
1512
+ success: boolean;
1513
+ data: {
1514
+ sessionId: string;
1515
+ logFile: string;
1516
+ };
1517
+ };
1518
+
610
1519
  declare type SlashCommand = LocalCommand | LocalJSXCommand | PromptCommand;
611
1520
 
1521
+ declare type SlashCommandExecuteInput = {
1522
+ cwd: string;
1523
+ sessionId: string;
1524
+ command: string;
1525
+ args: string;
1526
+ };
1527
+
1528
+ declare type SlashCommandExecuteOutput = {
1529
+ success: boolean;
1530
+ data: {
1531
+ messages: any[];
1532
+ };
1533
+ };
1534
+
1535
+ declare type SlashCommandGetInput = {
1536
+ cwd: string;
1537
+ command: string;
1538
+ };
1539
+
1540
+ declare type SlashCommandGetOutput = {
1541
+ success: boolean;
1542
+ data: {
1543
+ commandEntry: any;
1544
+ };
1545
+ };
1546
+
1547
+ declare type SlashCommandListInput = {
1548
+ cwd: string;
1549
+ };
1550
+
1551
+ declare type SlashCommandListOutput = {
1552
+ success: boolean;
1553
+ data: {
1554
+ slashCommands: any[];
1555
+ };
1556
+ };
1557
+
612
1558
  declare type Status = Record<string, {
613
1559
  description?: string;
614
1560
  items: string[];
615
1561
  }>;
616
1562
 
1563
+ declare type StatusGetInput = {
1564
+ cwd: string;
1565
+ sessionId: string;
1566
+ };
1567
+
1568
+ declare type StatusGetOutput = {
1569
+ success: boolean;
1570
+ data: {
1571
+ status: Record<string, {
1572
+ description?: string;
1573
+ items: string[];
1574
+ }>;
1575
+ };
1576
+ };
1577
+
1578
+ /** Standard success response without data */
1579
+ declare type SuccessResponse = {
1580
+ success: true;
1581
+ };
1582
+
617
1583
  declare type SystemMessage = {
618
1584
  role: 'system';
619
1585
  content: string;
@@ -630,6 +1596,10 @@ declare type TextPart = {
630
1596
  text: string;
631
1597
  };
632
1598
 
1599
+ declare type ThinkingConfig = {
1600
+ effort: ReasoningEffort;
1601
+ };
1602
+
633
1603
  declare type TodoItem = _zod.infer<typeof TodoItemSchema>;
634
1604
 
635
1605
  declare const TodoItemSchema: _zod.ZodObject<{
@@ -676,6 +1646,16 @@ declare type ToolApprovalInfo = {
676
1646
  category?: ApprovalCategory;
677
1647
  };
678
1648
 
1649
+ declare type ToolApprovalInput = {
1650
+ toolUse: ToolUse;
1651
+ category?: ApprovalCategory;
1652
+ };
1653
+
1654
+ declare type ToolApprovalOutput = {
1655
+ approved: boolean;
1656
+ params?: Record<string, unknown>;
1657
+ };
1658
+
679
1659
  declare type ToolContent = Array<ToolResultPart>;
680
1660
 
681
1661
  declare type ToolMessage = {
@@ -757,6 +1737,120 @@ declare type UserMessage = {
757
1737
  hidden?: boolean;
758
1738
  };
759
1739
 
1740
+ declare type UtilsDetectAppsInput = {
1741
+ cwd: string;
1742
+ apps?: App[];
1743
+ };
1744
+
1745
+ declare type UtilsDetectAppsOutput = {
1746
+ success: boolean;
1747
+ data: {
1748
+ apps: App[];
1749
+ };
1750
+ };
1751
+
1752
+ declare type UtilsFilesListInput = {
1753
+ cwd: string;
1754
+ query?: string;
1755
+ };
1756
+
1757
+ declare type UtilsFilesListOutput = {
1758
+ success: boolean;
1759
+ data: {
1760
+ files: any[];
1761
+ };
1762
+ };
1763
+
1764
+ declare type UtilsGetPathsInput = {
1765
+ cwd: string;
1766
+ maxFiles?: number;
1767
+ };
1768
+
1769
+ declare type UtilsGetPathsOutput = {
1770
+ success: boolean;
1771
+ data: {
1772
+ paths: string[];
1773
+ };
1774
+ };
1775
+
1776
+ declare type UtilsOpenInput = {
1777
+ cwd: string;
1778
+ sessionId?: string;
1779
+ app: App;
1780
+ };
1781
+
1782
+ declare type UtilsQueryInput = {
1783
+ userPrompt: string;
1784
+ cwd: string;
1785
+ systemPrompt?: string;
1786
+ model?: string;
1787
+ thinking?: ThinkingConfig;
1788
+ responseFormat?: ResponseFormat;
1789
+ };
1790
+
1791
+ declare type UtilsQueryOutput = any;
1792
+
1793
+ declare type UtilsQuickQueryInput = {
1794
+ userPrompt: string;
1795
+ cwd: string;
1796
+ systemPrompt?: string;
1797
+ model?: string;
1798
+ thinking?: ThinkingConfig;
1799
+ responseFormat?: ResponseFormat;
1800
+ };
1801
+
1802
+ declare type UtilsQuickQueryOutput = any;
1803
+
1804
+ declare type UtilsSummarizeMessageInput = {
1805
+ message: string;
1806
+ cwd: string;
1807
+ model?: string;
1808
+ };
1809
+
1810
+ declare type UtilsSummarizeMessageOutput = any;
1811
+
1812
+ declare type UtilsTelemetryInput = {
1813
+ cwd: string;
1814
+ name: string;
1815
+ payload: Record<string, any>;
1816
+ };
1817
+
1818
+ declare type UtilsToolExecuteBashInput = {
1819
+ cwd: string;
1820
+ command: string;
1821
+ };
1822
+
1823
+ declare type UtilsToolExecuteBashOutput = {
1824
+ success: boolean;
1825
+ data?: any;
1826
+ error?: {
1827
+ message: string;
1828
+ };
1829
+ };
1830
+
1831
+ declare type WorkspaceData = {
1832
+ id: string;
1833
+ repoPath: string;
1834
+ branch: string;
1835
+ worktreePath: string;
1836
+ sessionIds: string[];
1837
+ gitState: {
1838
+ currentCommit: string;
1839
+ isDirty: boolean;
1840
+ pendingChanges: string[];
1841
+ };
1842
+ metadata: {
1843
+ createdAt: number;
1844
+ description: string;
1845
+ status: 'active' | 'archived' | 'stale';
1846
+ };
1847
+ context: {
1848
+ activeFiles: string[];
1849
+ settings: any;
1850
+ preferences: Record<string, unknown>;
1851
+ };
1852
+ };
1853
+
760
1854
  export { _zod }
761
1855
 
762
1856
  export { }