@neovate/code 0.23.1 → 0.25.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/cli.mjs +983 -947
- package/dist/index.d.ts +182 -2
- package/dist/index.mjs +983 -947
- package/package.json +8 -6
- package/vendor/ripgrep/arm64-darwin/rg +0 -0
- package/vendor/ripgrep/arm64-linux/rg +0 -0
- package/vendor/ripgrep/x64-darwin/rg +0 -0
- package/vendor/ripgrep/x64-linux/rg +0 -0
- package/vendor/ripgrep/x64-win32/rg.exe +0 -0
package/dist/index.d.ts
CHANGED
|
@@ -8,6 +8,7 @@ import { z as _zod } from 'zod';
|
|
|
8
8
|
|
|
9
9
|
declare interface AddSkillOptions {
|
|
10
10
|
global?: boolean;
|
|
11
|
+
claude?: boolean;
|
|
11
12
|
overwrite?: boolean;
|
|
12
13
|
name?: string;
|
|
13
14
|
targetDir?: string;
|
|
@@ -80,6 +81,7 @@ declare class AgentManager {
|
|
|
80
81
|
tools: Tool[];
|
|
81
82
|
cwd: string;
|
|
82
83
|
signal?: AbortSignal;
|
|
84
|
+
parentSessionId?: string;
|
|
83
85
|
forkContextMessages?: NormalizedMessage[];
|
|
84
86
|
onMessage?: (message: NormalizedMessage, agentId: string, model: string) => void | Promise<void>;
|
|
85
87
|
onToolApprove?: (opts: {
|
|
@@ -139,6 +141,32 @@ declare type ApprovalContext = {
|
|
|
139
141
|
|
|
140
142
|
declare type ApprovalMode = 'default' | 'autoEdit' | 'yolo';
|
|
141
143
|
|
|
144
|
+
export declare type Argv = {
|
|
145
|
+
_: string[];
|
|
146
|
+
help: boolean;
|
|
147
|
+
mcp: boolean;
|
|
148
|
+
quiet: boolean;
|
|
149
|
+
continue?: boolean;
|
|
150
|
+
version: boolean;
|
|
151
|
+
appendSystemPrompt?: string;
|
|
152
|
+
approvalMode?: string;
|
|
153
|
+
cwd?: string;
|
|
154
|
+
host?: string;
|
|
155
|
+
language?: string;
|
|
156
|
+
model?: string;
|
|
157
|
+
outputFormat?: string;
|
|
158
|
+
outputStyle?: string;
|
|
159
|
+
planModel?: string;
|
|
160
|
+
smallModel?: string;
|
|
161
|
+
visionModel?: string;
|
|
162
|
+
resume?: string;
|
|
163
|
+
systemPrompt?: string;
|
|
164
|
+
tools?: string;
|
|
165
|
+
port?: number;
|
|
166
|
+
plugin: string[];
|
|
167
|
+
mcpConfig: string[];
|
|
168
|
+
};
|
|
169
|
+
|
|
142
170
|
declare type AssistantContent = string | Array<TextPart | ReasoningPart | ToolUsePart>;
|
|
143
171
|
|
|
144
172
|
declare type AssistantMessage = {
|
|
@@ -236,6 +264,20 @@ declare type Config = {
|
|
|
236
264
|
* Example: { explore: { model: "anthropic/claude-haiku-4" } }
|
|
237
265
|
*/
|
|
238
266
|
agent?: Record<string, AgentConfig>;
|
|
267
|
+
/**
|
|
268
|
+
* Extra SKILL.md file paths for user-defined skills.
|
|
269
|
+
* Accepts absolute paths to SKILL.md files or directories containing SKILL.md.
|
|
270
|
+
* Example: ["/path/to/my-skill/SKILL.md", "/path/to/skill-dir"]
|
|
271
|
+
*/
|
|
272
|
+
skills?: string[];
|
|
273
|
+
/**
|
|
274
|
+
* Notification configuration.
|
|
275
|
+
* - true: play default sound (Funk/warning)
|
|
276
|
+
* - false: disabled
|
|
277
|
+
* - string: custom sound name (e.g., "Glass", "Ping")
|
|
278
|
+
* - object: extended notification config (reserved for future use, e.g., url)
|
|
279
|
+
*/
|
|
280
|
+
notification?: boolean | string;
|
|
239
281
|
};
|
|
240
282
|
|
|
241
283
|
declare type ConfigGetInput = {
|
|
@@ -308,6 +350,7 @@ export declare class Context {
|
|
|
308
350
|
messageBus?: MessageBus;
|
|
309
351
|
agentManager?: AgentManager;
|
|
310
352
|
plugins: (string | Plugin_2)[];
|
|
353
|
+
fetch?: typeof globalThis.fetch;
|
|
311
354
|
constructor(opts: ContextOpts);
|
|
312
355
|
apply(applyOpts: Omit<PluginApplyOpts, 'pluginContext'>): Promise<any>;
|
|
313
356
|
destroy(): Promise<void>;
|
|
@@ -322,6 +365,7 @@ declare type ContextCreateOpts = {
|
|
|
322
365
|
argvConfig: Record<string, any>;
|
|
323
366
|
plugins: (string | Plugin_2)[];
|
|
324
367
|
messageBus?: MessageBus;
|
|
368
|
+
fetch?: typeof globalThis.fetch;
|
|
325
369
|
};
|
|
326
370
|
|
|
327
371
|
declare type ContextOpts = {
|
|
@@ -339,6 +383,7 @@ declare type ContextOpts = {
|
|
|
339
383
|
messageBus?: MessageBus;
|
|
340
384
|
agentManager?: AgentManager;
|
|
341
385
|
plugins: (string | Plugin_2)[];
|
|
386
|
+
fetch?: typeof globalThis.fetch;
|
|
342
387
|
};
|
|
343
388
|
|
|
344
389
|
export declare function createSession(options: SDKSessionOptions): Promise<SDKSession>;
|
|
@@ -569,6 +614,10 @@ declare type HandlerMap = {
|
|
|
569
614
|
input: ModelsListInput;
|
|
570
615
|
output: ModelsListOutput;
|
|
571
616
|
};
|
|
617
|
+
'models.test': {
|
|
618
|
+
input: ModelsTestInput;
|
|
619
|
+
output: ModelsTestOutput;
|
|
620
|
+
};
|
|
572
621
|
'outputStyles.list': {
|
|
573
622
|
input: OutputStylesListInput;
|
|
574
623
|
output: OutputStylesListOutput;
|
|
@@ -741,6 +790,10 @@ declare type HandlerMap = {
|
|
|
741
790
|
input: UtilsGetPathsInput;
|
|
742
791
|
output: UtilsGetPathsOutput;
|
|
743
792
|
};
|
|
793
|
+
'utils.searchPaths': {
|
|
794
|
+
input: UtilsSearchPathsInput;
|
|
795
|
+
output: UtilsSearchPathsOutput;
|
|
796
|
+
};
|
|
744
797
|
'utils.telemetry': {
|
|
745
798
|
input: UtilsTelemetryInput;
|
|
746
799
|
output: SuccessResponse;
|
|
@@ -1040,9 +1093,43 @@ declare type ModelsListOutput = {
|
|
|
1040
1093
|
modelId: string;
|
|
1041
1094
|
modelContextLimit: number;
|
|
1042
1095
|
} | null;
|
|
1096
|
+
nullModels: Array<{
|
|
1097
|
+
providerId: string;
|
|
1098
|
+
modelId: string;
|
|
1099
|
+
}>;
|
|
1043
1100
|
};
|
|
1044
1101
|
};
|
|
1045
1102
|
|
|
1103
|
+
declare type ModelsTestInput = {
|
|
1104
|
+
cwd?: string;
|
|
1105
|
+
model: string;
|
|
1106
|
+
timeout?: number;
|
|
1107
|
+
prompt?: string;
|
|
1108
|
+
};
|
|
1109
|
+
|
|
1110
|
+
declare type ModelsTestOutput = {
|
|
1111
|
+
success: true;
|
|
1112
|
+
data: {
|
|
1113
|
+
model: string;
|
|
1114
|
+
provider: string;
|
|
1115
|
+
modelName: string;
|
|
1116
|
+
prompt: string;
|
|
1117
|
+
response: string;
|
|
1118
|
+
responseTime: number;
|
|
1119
|
+
usage: {
|
|
1120
|
+
input_tokens: number;
|
|
1121
|
+
output_tokens: number;
|
|
1122
|
+
} | null;
|
|
1123
|
+
};
|
|
1124
|
+
} | {
|
|
1125
|
+
success: false;
|
|
1126
|
+
error: string;
|
|
1127
|
+
};
|
|
1128
|
+
|
|
1129
|
+
declare type NodeBridgeHandlers = Partial<{
|
|
1130
|
+
[K in keyof HandlerMap]: (data: HandlerMap[K]['input'], context: Context) => Promise<HandlerMap[K]['output']> | HandlerMap[K]['output'];
|
|
1131
|
+
}>;
|
|
1132
|
+
|
|
1046
1133
|
declare type NormalizedMessage = Message_2 & {
|
|
1047
1134
|
type: 'message';
|
|
1048
1135
|
timestamp: string;
|
|
@@ -1087,6 +1174,8 @@ declare type OutputStylesListOutput = {
|
|
|
1087
1174
|
};
|
|
1088
1175
|
};
|
|
1089
1176
|
|
|
1177
|
+
export declare function parseArgs(argv: any): Promise<Argv>;
|
|
1178
|
+
|
|
1090
1179
|
declare class Paths {
|
|
1091
1180
|
globalConfigDir: string;
|
|
1092
1181
|
globalProjectDir: string;
|
|
@@ -1176,6 +1265,29 @@ declare type Plugin_2 = {
|
|
|
1176
1265
|
name: string;
|
|
1177
1266
|
payload: Record<string, any>;
|
|
1178
1267
|
}) => Promise<void> | void;
|
|
1268
|
+
stop?: (this: PluginContext, opts: {
|
|
1269
|
+
sessionId: string;
|
|
1270
|
+
result: LoopResult;
|
|
1271
|
+
usage: Usage;
|
|
1272
|
+
turnsCount: number;
|
|
1273
|
+
toolCallsCount: number;
|
|
1274
|
+
duration: number;
|
|
1275
|
+
model: string;
|
|
1276
|
+
}) => Promise<void> | void;
|
|
1277
|
+
subagentStop?: (this: PluginContext, opts: {
|
|
1278
|
+
parentSessionId: string;
|
|
1279
|
+
agentId: string;
|
|
1280
|
+
agentType: string;
|
|
1281
|
+
result: AgentExecutionResult;
|
|
1282
|
+
usage: {
|
|
1283
|
+
inputTokens: number;
|
|
1284
|
+
outputTokens: number;
|
|
1285
|
+
};
|
|
1286
|
+
totalToolCalls: number;
|
|
1287
|
+
totalDuration: number;
|
|
1288
|
+
model: string;
|
|
1289
|
+
}) => Promise<void> | void;
|
|
1290
|
+
nodeBridgeHandler?: (this: PluginContext) => Promise<NodeBridgeHandlers> | NodeBridgeHandlers;
|
|
1179
1291
|
};
|
|
1180
1292
|
export { Plugin_2 as Plugin }
|
|
1181
1293
|
|
|
@@ -1207,6 +1319,12 @@ declare class PluginManager {
|
|
|
1207
1319
|
apply({ hook, args, memo, type, pluginContext, }: PluginApplyOpts): Promise<any>;
|
|
1208
1320
|
}
|
|
1209
1321
|
|
|
1322
|
+
declare interface PreviewSkillsResult {
|
|
1323
|
+
tempDir: string;
|
|
1324
|
+
skills: SkillPreview[];
|
|
1325
|
+
errors: SkillError[];
|
|
1326
|
+
}
|
|
1327
|
+
|
|
1210
1328
|
declare type ProjectAddHistoryInput = {
|
|
1211
1329
|
cwd: string;
|
|
1212
1330
|
history: string;
|
|
@@ -1413,7 +1531,7 @@ declare interface Provider {
|
|
|
1413
1531
|
};
|
|
1414
1532
|
}
|
|
1415
1533
|
|
|
1416
|
-
declare type ProviderConfig = Partial<Omit<Provider, 'createModel'>>;
|
|
1534
|
+
export declare type ProviderConfig = Partial<Omit<Provider, 'createModel'>>;
|
|
1417
1535
|
|
|
1418
1536
|
declare type ProvidersListInput = {
|
|
1419
1537
|
cwd: string;
|
|
@@ -1428,8 +1546,19 @@ declare type ProvidersListOutput = {
|
|
|
1428
1546
|
doc?: string;
|
|
1429
1547
|
env?: string[];
|
|
1430
1548
|
apiEnv?: string[];
|
|
1549
|
+
api?: string;
|
|
1550
|
+
options?: {
|
|
1551
|
+
baseURL?: string;
|
|
1552
|
+
apiKey?: string;
|
|
1553
|
+
headers?: Record<string, string>;
|
|
1554
|
+
httpProxy?: string;
|
|
1555
|
+
};
|
|
1431
1556
|
validEnvs: string[];
|
|
1432
1557
|
hasApiKey: boolean;
|
|
1558
|
+
maskedApiKey?: string;
|
|
1559
|
+
apiKeyOrigin?: 'env' | 'config';
|
|
1560
|
+
apiKeyEnvName?: string;
|
|
1561
|
+
oauthUser?: string;
|
|
1433
1562
|
}>;
|
|
1434
1563
|
};
|
|
1435
1564
|
};
|
|
@@ -1485,7 +1614,11 @@ export declare function runNeovate(opts: {
|
|
|
1485
1614
|
version: string;
|
|
1486
1615
|
plugins: Plugin_2[];
|
|
1487
1616
|
upgrade?: UpgradeOptions;
|
|
1488
|
-
|
|
1617
|
+
argv: Argv;
|
|
1618
|
+
fetch?: typeof globalThis.fetch;
|
|
1619
|
+
}): Promise<{
|
|
1620
|
+
shutdown?: () => Promise<void>;
|
|
1621
|
+
}>;
|
|
1489
1622
|
|
|
1490
1623
|
export declare type SDKMessage = NormalizedMessage | SDKSystemMessage | SDKResultMessage;
|
|
1491
1624
|
|
|
@@ -1515,6 +1648,24 @@ export declare type SDKSessionOptions = {
|
|
|
1515
1648
|
cwd?: string;
|
|
1516
1649
|
productName?: string;
|
|
1517
1650
|
plugins?: Plugin_2[];
|
|
1651
|
+
/**
|
|
1652
|
+
* Custom provider configurations to add or override built-in providers.
|
|
1653
|
+
* Allows specifying custom API endpoints and model definitions.
|
|
1654
|
+
*
|
|
1655
|
+
* @example
|
|
1656
|
+
* ```typescript
|
|
1657
|
+
* providers: {
|
|
1658
|
+
* "my-custom-provider": {
|
|
1659
|
+
* api: "https://my-api.example.com/v1",
|
|
1660
|
+
* env: ["MY_API_KEY"],
|
|
1661
|
+
* models: {
|
|
1662
|
+
* "my-model": "deepseek-v3.2" // Reference existing model
|
|
1663
|
+
* }
|
|
1664
|
+
* }
|
|
1665
|
+
* }
|
|
1666
|
+
* ```
|
|
1667
|
+
*/
|
|
1668
|
+
providers?: Record<string, ProviderConfig>;
|
|
1518
1669
|
};
|
|
1519
1670
|
|
|
1520
1671
|
declare type SDKSystemMessage = {
|
|
@@ -1773,6 +1924,10 @@ declare class SkillManager {
|
|
|
1773
1924
|
loadSkills(): Promise<void>;
|
|
1774
1925
|
private loadSkillsFromDirectory;
|
|
1775
1926
|
private loadSkillFile;
|
|
1927
|
+
/**
|
|
1928
|
+
* Load skill from a path that can be either a SKILL.md file or a directory containing SKILL.md.
|
|
1929
|
+
*/
|
|
1930
|
+
private loadSkillPath;
|
|
1776
1931
|
private parseSkillFile;
|
|
1777
1932
|
addSkill(source: string, options?: AddSkillOptions): Promise<AddSkillResult>;
|
|
1778
1933
|
private normalizeSource;
|
|
@@ -1780,6 +1935,9 @@ declare class SkillManager {
|
|
|
1780
1935
|
private scanForSkills;
|
|
1781
1936
|
private copyDirectory;
|
|
1782
1937
|
private parseSkillFileForAdd;
|
|
1938
|
+
previewSkills(source: string): Promise<PreviewSkillsResult>;
|
|
1939
|
+
installFromPreview(preview: PreviewSkillsResult, selectedSkills: SkillPreview[], source: string, options?: AddSkillOptions): Promise<AddSkillResult>;
|
|
1940
|
+
cleanupPreview(preview: PreviewSkillsResult): void;
|
|
1783
1941
|
removeSkill(name: string, targetDir?: string): Promise<{
|
|
1784
1942
|
success: boolean;
|
|
1785
1943
|
error?: string;
|
|
@@ -1797,8 +1955,16 @@ declare interface SkillMetadata {
|
|
|
1797
1955
|
source: SkillSource;
|
|
1798
1956
|
}
|
|
1799
1957
|
|
|
1958
|
+
declare interface SkillPreview {
|
|
1959
|
+
name: string;
|
|
1960
|
+
description: string;
|
|
1961
|
+
skillPath: string;
|
|
1962
|
+
skillDir: string;
|
|
1963
|
+
}
|
|
1964
|
+
|
|
1800
1965
|
declare enum SkillSource {
|
|
1801
1966
|
Plugin = "plugin",
|
|
1967
|
+
Config = "config",
|
|
1802
1968
|
GlobalClaude = "global-claude",
|
|
1803
1969
|
Global = "global",
|
|
1804
1970
|
ProjectClaude = "project-claude",
|
|
@@ -2111,6 +2277,20 @@ declare type UtilsQuickQueryInput = {
|
|
|
2111
2277
|
|
|
2112
2278
|
declare type UtilsQuickQueryOutput = any;
|
|
2113
2279
|
|
|
2280
|
+
declare type UtilsSearchPathsInput = {
|
|
2281
|
+
cwd: string;
|
|
2282
|
+
query: string;
|
|
2283
|
+
maxResults?: number;
|
|
2284
|
+
};
|
|
2285
|
+
|
|
2286
|
+
declare type UtilsSearchPathsOutput = {
|
|
2287
|
+
success: boolean;
|
|
2288
|
+
data: {
|
|
2289
|
+
paths: string[];
|
|
2290
|
+
truncated: boolean;
|
|
2291
|
+
};
|
|
2292
|
+
};
|
|
2293
|
+
|
|
2114
2294
|
declare type UtilsSummarizeMessageInput = {
|
|
2115
2295
|
message: string;
|
|
2116
2296
|
cwd: string;
|