@neovate/code 0.22.2 → 0.22.3
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 +865 -731
- package/dist/index.d.ts +86 -2
- package/dist/index.mjs +865 -731
- package/package.json +2 -1
package/dist/index.d.ts
CHANGED
|
@@ -5,6 +5,61 @@ import type { OpenAIProvider } from '@ai-sdk/openai';
|
|
|
5
5
|
import * as z from 'zod';
|
|
6
6
|
import { z as _zod } from 'zod';
|
|
7
7
|
|
|
8
|
+
declare interface AgentDefinition {
|
|
9
|
+
agentType: string;
|
|
10
|
+
whenToUse: string;
|
|
11
|
+
systemPrompt: string;
|
|
12
|
+
model: string;
|
|
13
|
+
source: AgentSource;
|
|
14
|
+
tools?: string[];
|
|
15
|
+
disallowedTools?: string[];
|
|
16
|
+
forkContext?: boolean;
|
|
17
|
+
color?: string;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
declare interface AgentExecutionResult {
|
|
21
|
+
status: 'completed' | 'failed';
|
|
22
|
+
agentId: string;
|
|
23
|
+
content: string;
|
|
24
|
+
totalToolCalls: number;
|
|
25
|
+
totalDuration: number;
|
|
26
|
+
usage: {
|
|
27
|
+
inputTokens: number;
|
|
28
|
+
outputTokens: number;
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
declare class AgentManager {
|
|
33
|
+
private agents;
|
|
34
|
+
private context;
|
|
35
|
+
constructor(opts: {
|
|
36
|
+
context: Context;
|
|
37
|
+
});
|
|
38
|
+
private registerBuiltinAgents;
|
|
39
|
+
registerAgent(definition: AgentDefinition): void;
|
|
40
|
+
getAgent(agentType: string): AgentDefinition | undefined;
|
|
41
|
+
getAllAgents(): AgentDefinition[];
|
|
42
|
+
getAgentTypes(): string[];
|
|
43
|
+
executeTask(input: TaskToolInput, context: {
|
|
44
|
+
tools: Tool[];
|
|
45
|
+
cwd: string;
|
|
46
|
+
signal?: AbortSignal;
|
|
47
|
+
forkContextMessages?: NormalizedMessage[];
|
|
48
|
+
onMessage?: (message: NormalizedMessage, agentId: string) => void | Promise<void>;
|
|
49
|
+
}): Promise<AgentExecutionResult>;
|
|
50
|
+
getAgentDescriptions(): string;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
declare enum AgentSource {
|
|
54
|
+
BuiltIn = "built-in",
|
|
55
|
+
Plugin = "plugin",
|
|
56
|
+
User = "user",
|
|
57
|
+
ProjectClaude = "project-claude",
|
|
58
|
+
Project = "project",
|
|
59
|
+
GlobalClaude = "global-claude",
|
|
60
|
+
Global = "global"
|
|
61
|
+
}
|
|
62
|
+
|
|
8
63
|
/** Supported application types for open and detect operations */
|
|
9
64
|
declare type App = 'cursor' | 'vscode' | 'vscode-insiders' | 'zed' | 'windsurf' | 'iterm' | 'warp' | 'terminal' | 'antigravity' | 'finder' | 'sourcetree' | 'fork';
|
|
10
65
|
|
|
@@ -182,6 +237,7 @@ export declare class Context {
|
|
|
182
237
|
backgroundTaskManager: BackgroundTaskManager;
|
|
183
238
|
skillManager: SkillManager;
|
|
184
239
|
messageBus?: MessageBus;
|
|
240
|
+
agentManager?: AgentManager;
|
|
185
241
|
plugins: (string | Plugin_2)[];
|
|
186
242
|
constructor(opts: ContextOpts);
|
|
187
243
|
apply(applyOpts: Omit<PluginApplyOpts, 'pluginContext'>): Promise<any>;
|
|
@@ -212,6 +268,7 @@ declare type ContextOpts = {
|
|
|
212
268
|
backgroundTaskManager: BackgroundTaskManager;
|
|
213
269
|
skillManager: SkillManager;
|
|
214
270
|
messageBus?: MessageBus;
|
|
271
|
+
agentManager?: AgentManager;
|
|
215
272
|
plugins: (string | Plugin_2)[];
|
|
216
273
|
};
|
|
217
274
|
|
|
@@ -228,7 +285,7 @@ export declare function createTool<TSchema extends z.ZodTypeAny>(config: {
|
|
|
228
285
|
displayName?: string;
|
|
229
286
|
description: string;
|
|
230
287
|
parameters: TSchema;
|
|
231
|
-
execute: (params: z.output<TSchema
|
|
288
|
+
execute: (params: z.output<TSchema>, toolCallId?: string) => Promise<ToolResult> | ToolResult;
|
|
232
289
|
approval?: ToolApprovalInfo;
|
|
233
290
|
getDescription?: ({ params, cwd, }: {
|
|
234
291
|
params: z.output<TSchema>;
|
|
@@ -880,6 +937,11 @@ declare type NormalizedMessage = Message_2 & {
|
|
|
880
937
|
uuid: string;
|
|
881
938
|
parentUuid: string | null;
|
|
882
939
|
uiContent?: string;
|
|
940
|
+
metadata?: {
|
|
941
|
+
agentId?: string;
|
|
942
|
+
agentType?: string;
|
|
943
|
+
[key: string]: any;
|
|
944
|
+
};
|
|
883
945
|
};
|
|
884
946
|
|
|
885
947
|
declare class OutputStyle {
|
|
@@ -931,6 +993,11 @@ declare class Paths {
|
|
|
931
993
|
summary: string;
|
|
932
994
|
}[];
|
|
933
995
|
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;
|
|
934
1001
|
}
|
|
935
1002
|
|
|
936
1003
|
declare type Plugin_2 = {
|
|
@@ -1683,6 +1750,14 @@ declare type SystemMessage = {
|
|
|
1683
1750
|
content: string;
|
|
1684
1751
|
};
|
|
1685
1752
|
|
|
1753
|
+
declare interface TaskToolInput {
|
|
1754
|
+
description: string;
|
|
1755
|
+
prompt: string;
|
|
1756
|
+
subagent_type: string;
|
|
1757
|
+
model?: string;
|
|
1758
|
+
resume?: string;
|
|
1759
|
+
}
|
|
1760
|
+
|
|
1686
1761
|
declare type TempPluginContext = ContextCreateOpts & {
|
|
1687
1762
|
pluginManager: PluginManager;
|
|
1688
1763
|
config: Config;
|
|
@@ -1734,7 +1809,7 @@ declare interface Tool<TSchema extends z.ZodTypeAny = z.ZodTypeAny> {
|
|
|
1734
1809
|
cwd: string;
|
|
1735
1810
|
}) => string;
|
|
1736
1811
|
displayName?: string;
|
|
1737
|
-
execute: (params: z.output<TSchema
|
|
1812
|
+
execute: (params: z.output<TSchema>, toolCallId?: string) => Promise<ToolResult> | ToolResult;
|
|
1738
1813
|
approval?: ToolApprovalInfo;
|
|
1739
1814
|
parameters: TSchema;
|
|
1740
1815
|
}
|
|
@@ -1770,6 +1845,11 @@ declare type ToolResult = {
|
|
|
1770
1845
|
llmContent: string | (TextPart | ImagePart)[];
|
|
1771
1846
|
returnDisplay?: ReturnDisplay;
|
|
1772
1847
|
isError?: boolean;
|
|
1848
|
+
metadata?: {
|
|
1849
|
+
agentId?: string;
|
|
1850
|
+
agentType?: string;
|
|
1851
|
+
[key: string]: any;
|
|
1852
|
+
};
|
|
1773
1853
|
};
|
|
1774
1854
|
|
|
1775
1855
|
declare type ToolResultPart = {
|
|
@@ -1778,6 +1858,8 @@ declare type ToolResultPart = {
|
|
|
1778
1858
|
name: string;
|
|
1779
1859
|
input: Record<string, any>;
|
|
1780
1860
|
result: ToolResult;
|
|
1861
|
+
agentId?: string;
|
|
1862
|
+
agentType?: string;
|
|
1781
1863
|
};
|
|
1782
1864
|
|
|
1783
1865
|
declare type ToolResultPart2 = {
|
|
@@ -1786,6 +1868,8 @@ declare type ToolResultPart2 = {
|
|
|
1786
1868
|
toolName: string;
|
|
1787
1869
|
input: Record<string, any>;
|
|
1788
1870
|
result: ToolResult;
|
|
1871
|
+
agentId?: string;
|
|
1872
|
+
agentType?: string;
|
|
1789
1873
|
};
|
|
1790
1874
|
|
|
1791
1875
|
declare type ToolUse = {
|