@neovate/code 0.22.3 → 0.22.5
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/README.md +0 -2
- package/dist/cli.mjs +907 -818
- package/dist/index.d.ts +115 -27
- package/dist/index.mjs +907 -818
- package/package.json +6 -18
- package/dist/mcps/chrome-devtools-mcp.mjs +0 -668
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { AnthropicProvider } from '@ai-sdk/anthropic';
|
|
1
2
|
import EventEmitter from 'events';
|
|
2
3
|
import { LanguageModelV2 } from '@openrouter/ai-sdk-provider';
|
|
3
4
|
import type { OpenAICompatibleProvider } from '@ai-sdk/openai-compatible';
|
|
@@ -5,6 +6,22 @@ import type { OpenAIProvider } from '@ai-sdk/openai';
|
|
|
5
6
|
import * as z from 'zod';
|
|
6
7
|
import { z as _zod } from 'zod';
|
|
7
8
|
|
|
9
|
+
declare interface AddSkillOptions {
|
|
10
|
+
global?: boolean;
|
|
11
|
+
overwrite?: boolean;
|
|
12
|
+
name?: string;
|
|
13
|
+
targetDir?: string;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
declare interface AddSkillResult {
|
|
17
|
+
installed: SkillMetadata[];
|
|
18
|
+
skipped: {
|
|
19
|
+
name: string;
|
|
20
|
+
reason: string;
|
|
21
|
+
}[];
|
|
22
|
+
errors: SkillError[];
|
|
23
|
+
}
|
|
24
|
+
|
|
8
25
|
declare interface AgentDefinition {
|
|
9
26
|
agentType: string;
|
|
10
27
|
whenToUse: string;
|
|
@@ -15,6 +32,7 @@ declare interface AgentDefinition {
|
|
|
15
32
|
disallowedTools?: string[];
|
|
16
33
|
forkContext?: boolean;
|
|
17
34
|
color?: string;
|
|
35
|
+
path?: string;
|
|
18
36
|
}
|
|
19
37
|
|
|
20
38
|
declare interface AgentExecutionResult {
|
|
@@ -29,9 +47,15 @@ declare interface AgentExecutionResult {
|
|
|
29
47
|
};
|
|
30
48
|
}
|
|
31
49
|
|
|
50
|
+
declare interface AgentLoadError {
|
|
51
|
+
path: string;
|
|
52
|
+
message: string;
|
|
53
|
+
}
|
|
54
|
+
|
|
32
55
|
declare class AgentManager {
|
|
33
56
|
private agents;
|
|
34
57
|
private context;
|
|
58
|
+
private errors;
|
|
35
59
|
constructor(opts: {
|
|
36
60
|
context: Context;
|
|
37
61
|
});
|
|
@@ -46,10 +70,38 @@ declare class AgentManager {
|
|
|
46
70
|
signal?: AbortSignal;
|
|
47
71
|
forkContextMessages?: NormalizedMessage[];
|
|
48
72
|
onMessage?: (message: NormalizedMessage, agentId: string) => void | Promise<void>;
|
|
73
|
+
onToolApprove?: (opts: {
|
|
74
|
+
toolUse: ToolUse;
|
|
75
|
+
category?: ApprovalCategory;
|
|
76
|
+
}) => Promise<boolean | ToolApprovalResult>;
|
|
49
77
|
}): Promise<AgentExecutionResult>;
|
|
50
78
|
getAgentDescriptions(): string;
|
|
79
|
+
loadAgentsFromFiles(): Promise<void>;
|
|
80
|
+
getErrors(): AgentLoadError[];
|
|
81
|
+
private loadAgentsFromDirectory;
|
|
82
|
+
private loadAgentFile;
|
|
83
|
+
private convertToolNames;
|
|
84
|
+
private parseAgentFile;
|
|
51
85
|
}
|
|
52
86
|
|
|
87
|
+
declare type AgentResultReturnDisplay = {
|
|
88
|
+
type: 'agent_result';
|
|
89
|
+
agentId: string;
|
|
90
|
+
agentType: string;
|
|
91
|
+
description: string;
|
|
92
|
+
prompt: string;
|
|
93
|
+
content: string;
|
|
94
|
+
stats: {
|
|
95
|
+
toolCalls: number;
|
|
96
|
+
duration: number;
|
|
97
|
+
tokens: {
|
|
98
|
+
input: number;
|
|
99
|
+
output: number;
|
|
100
|
+
};
|
|
101
|
+
};
|
|
102
|
+
status: 'completed' | 'failed';
|
|
103
|
+
};
|
|
104
|
+
|
|
53
105
|
declare enum AgentSource {
|
|
54
106
|
BuiltIn = "built-in",
|
|
55
107
|
Plugin = "plugin",
|
|
@@ -153,7 +205,6 @@ declare type Config = {
|
|
|
153
205
|
outputStyle?: string;
|
|
154
206
|
outputFormat?: 'text' | 'stream-json' | 'json';
|
|
155
207
|
autoUpdate?: boolean;
|
|
156
|
-
browser?: boolean;
|
|
157
208
|
temperature?: number;
|
|
158
209
|
httpProxy?: string;
|
|
159
210
|
desktop?: DesktopConfig;
|
|
@@ -365,6 +416,33 @@ declare type GitCreateBranchOutput = {
|
|
|
365
416
|
error?: string;
|
|
366
417
|
};
|
|
367
418
|
|
|
419
|
+
declare type GitCreatePRInput = {
|
|
420
|
+
cwd: string;
|
|
421
|
+
branchName: string;
|
|
422
|
+
body?: string;
|
|
423
|
+
};
|
|
424
|
+
|
|
425
|
+
declare type GitCreatePROutput = {
|
|
426
|
+
success: boolean;
|
|
427
|
+
data?: {
|
|
428
|
+
prUrl: string;
|
|
429
|
+
};
|
|
430
|
+
error?: string;
|
|
431
|
+
};
|
|
432
|
+
|
|
433
|
+
declare type GitDetectGitHubInput = {
|
|
434
|
+
cwd: string;
|
|
435
|
+
};
|
|
436
|
+
|
|
437
|
+
declare type GitDetectGitHubOutput = {
|
|
438
|
+
success: boolean;
|
|
439
|
+
data?: {
|
|
440
|
+
hasGhCli: boolean;
|
|
441
|
+
isGitHubRemote: boolean;
|
|
442
|
+
};
|
|
443
|
+
error?: string;
|
|
444
|
+
};
|
|
445
|
+
|
|
368
446
|
declare type GitPushInput = {
|
|
369
447
|
cwd: string;
|
|
370
448
|
};
|
|
@@ -390,6 +468,10 @@ declare type GitStatusOutput = {
|
|
|
390
468
|
email: boolean;
|
|
391
469
|
};
|
|
392
470
|
isMerging: boolean;
|
|
471
|
+
unstagedFiles: Array<{
|
|
472
|
+
status: string;
|
|
473
|
+
file: string;
|
|
474
|
+
}>;
|
|
393
475
|
};
|
|
394
476
|
error?: string;
|
|
395
477
|
};
|
|
@@ -445,6 +527,14 @@ declare type HandlerMap = {
|
|
|
445
527
|
input: GitCreateBranchInput;
|
|
446
528
|
output: GitCreateBranchOutput;
|
|
447
529
|
};
|
|
530
|
+
'git.detectGitHub': {
|
|
531
|
+
input: GitDetectGitHubInput;
|
|
532
|
+
output: GitDetectGitHubOutput;
|
|
533
|
+
};
|
|
534
|
+
'git.createPR': {
|
|
535
|
+
input: GitCreatePRInput;
|
|
536
|
+
output: GitCreatePROutput;
|
|
537
|
+
};
|
|
448
538
|
'mcp.getStatus': {
|
|
449
539
|
input: McpGetStatusInput;
|
|
450
540
|
output: McpGetStatusOutput;
|
|
@@ -993,11 +1083,6 @@ declare class Paths {
|
|
|
993
1083
|
summary: string;
|
|
994
1084
|
}[];
|
|
995
1085
|
getGlobalDataPath(): string;
|
|
996
|
-
/**
|
|
997
|
-
* Get the dedicated log path for a sub-agent.
|
|
998
|
-
* Format: ~/.neovate/projects/{project}/agent-{agentId}.jsonl
|
|
999
|
-
*/
|
|
1000
|
-
getAgentLogPath(agentId: string): string;
|
|
1001
1086
|
}
|
|
1002
1087
|
|
|
1003
1088
|
declare type Plugin_2 = {
|
|
@@ -1014,6 +1099,7 @@ declare type Plugin_2 = {
|
|
|
1014
1099
|
defaultModelCreator: (name: string, provider: Provider) => LanguageModelV2;
|
|
1015
1100
|
createOpenAI: (options: any) => OpenAIProvider;
|
|
1016
1101
|
createOpenAICompatible: (options: any) => OpenAICompatibleProvider;
|
|
1102
|
+
createAnthropic: (options: any) => AnthropicProvider;
|
|
1017
1103
|
}) => Promise<ProvidersMap> | ProvidersMap;
|
|
1018
1104
|
modelAlias?: (this: PluginContext, modelAlias: ModelAlias) => Promise<ModelAlias> | ModelAlias;
|
|
1019
1105
|
initialized?: (this: PluginContext, opts: {
|
|
@@ -1066,24 +1152,6 @@ declare type Plugin_2 = {
|
|
|
1066
1152
|
name: string;
|
|
1067
1153
|
payload: Record<string, any>;
|
|
1068
1154
|
}) => Promise<void> | void;
|
|
1069
|
-
_serverAppData?: (this: PluginContext, opts: {
|
|
1070
|
-
context: any;
|
|
1071
|
-
cwd: string;
|
|
1072
|
-
}) => Promise<any> | any;
|
|
1073
|
-
_serverRoutes?: (this: PluginContext, opts: {
|
|
1074
|
-
app: any;
|
|
1075
|
-
prefix: string;
|
|
1076
|
-
opts: any;
|
|
1077
|
-
}) => Promise<any> | any;
|
|
1078
|
-
_serverRouteCompletions?: (this: PluginContext, opts: {
|
|
1079
|
-
message: {
|
|
1080
|
-
role: 'user';
|
|
1081
|
-
content: string;
|
|
1082
|
-
attachedContexts: any[];
|
|
1083
|
-
contextContent: string;
|
|
1084
|
-
};
|
|
1085
|
-
attachedContexts: any[];
|
|
1086
|
-
}) => Promise<any> | any;
|
|
1087
1155
|
};
|
|
1088
1156
|
export { Plugin_2 as Plugin }
|
|
1089
1157
|
|
|
@@ -1304,10 +1372,11 @@ declare interface Provider {
|
|
|
1304
1372
|
api?: string;
|
|
1305
1373
|
doc: string;
|
|
1306
1374
|
models: Record<string, string | Omit<Model, 'id' | 'cost'>>;
|
|
1307
|
-
createModel(name: string, provider: Provider, options: {
|
|
1375
|
+
createModel?: (name: string, provider: Provider, options: {
|
|
1308
1376
|
globalConfigDir: string;
|
|
1309
1377
|
setGlobalConfig: (key: string, value: string, isGlobal: boolean) => void;
|
|
1310
|
-
})
|
|
1378
|
+
}) => Promise<LanguageModelV2> | LanguageModelV2;
|
|
1379
|
+
createModelType?: 'anthropic';
|
|
1311
1380
|
options?: {
|
|
1312
1381
|
baseURL?: string;
|
|
1313
1382
|
apiKey?: string;
|
|
@@ -1380,7 +1449,7 @@ declare type ResponseMessage = BaseMessage & {
|
|
|
1380
1449
|
|
|
1381
1450
|
export declare function resumeSession(sessionId: string, options: SDKSessionOptions): Promise<SDKSession>;
|
|
1382
1451
|
|
|
1383
|
-
declare type ReturnDisplay = string | DiffViewerReturnDisplay | TodoReadReturnDisplay | TodoWriteReturnDisplay;
|
|
1452
|
+
declare type ReturnDisplay = string | DiffViewerReturnDisplay | TodoReadReturnDisplay | TodoWriteReturnDisplay | AgentResultReturnDisplay;
|
|
1384
1453
|
|
|
1385
1454
|
export declare function runNeovate(opts: {
|
|
1386
1455
|
productName: string;
|
|
@@ -1661,6 +1730,16 @@ declare class SkillManager {
|
|
|
1661
1730
|
private loadSkillsFromDirectory;
|
|
1662
1731
|
private loadSkillFile;
|
|
1663
1732
|
private parseSkillFile;
|
|
1733
|
+
addSkill(source: string, options?: AddSkillOptions): Promise<AddSkillResult>;
|
|
1734
|
+
private normalizeSource;
|
|
1735
|
+
private extractFolderName;
|
|
1736
|
+
private scanForSkills;
|
|
1737
|
+
private copyDirectory;
|
|
1738
|
+
private parseSkillFileForAdd;
|
|
1739
|
+
removeSkill(name: string, targetDir?: string): Promise<{
|
|
1740
|
+
success: boolean;
|
|
1741
|
+
error?: string;
|
|
1742
|
+
}>;
|
|
1664
1743
|
}
|
|
1665
1744
|
|
|
1666
1745
|
declare interface SkillManagerOpts {
|
|
@@ -1827,6 +1906,13 @@ declare type ToolApprovalInput = {
|
|
|
1827
1906
|
declare type ToolApprovalOutput = {
|
|
1828
1907
|
approved: boolean;
|
|
1829
1908
|
params?: Record<string, unknown>;
|
|
1909
|
+
denyReason?: string;
|
|
1910
|
+
};
|
|
1911
|
+
|
|
1912
|
+
declare type ToolApprovalResult = boolean | {
|
|
1913
|
+
approved: boolean;
|
|
1914
|
+
params?: ToolParams;
|
|
1915
|
+
denyReason?: string;
|
|
1830
1916
|
};
|
|
1831
1917
|
|
|
1832
1918
|
declare type ToolContent = Array<ToolResultPart>;
|
|
@@ -1841,6 +1927,8 @@ declare type ToolMessage2 = {
|
|
|
1841
1927
|
content: ToolResultPart2[];
|
|
1842
1928
|
};
|
|
1843
1929
|
|
|
1930
|
+
declare type ToolParams = Record<string, unknown>;
|
|
1931
|
+
|
|
1844
1932
|
declare type ToolResult = {
|
|
1845
1933
|
llmContent: string | (TextPart | ImagePart)[];
|
|
1846
1934
|
returnDisplay?: ReturnDisplay;
|