@neovate/code 0.20.2 → 0.22.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 +611 -595
- package/dist/index.d.ts +93 -0
- package/dist/index.mjs +619 -603
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -179,6 +179,7 @@ export declare class Context {
|
|
|
179
179
|
argvConfig: Record<string, any>;
|
|
180
180
|
mcpManager: MCPManager;
|
|
181
181
|
backgroundTaskManager: BackgroundTaskManager;
|
|
182
|
+
skillManager: SkillManager;
|
|
182
183
|
messageBus?: MessageBus;
|
|
183
184
|
plugins: (string | Plugin_2)[];
|
|
184
185
|
constructor(opts: ContextOpts);
|
|
@@ -208,10 +209,13 @@ declare type ContextOpts = {
|
|
|
208
209
|
argvConfig: Record<string, any>;
|
|
209
210
|
mcpManager: MCPManager;
|
|
210
211
|
backgroundTaskManager: BackgroundTaskManager;
|
|
212
|
+
skillManager: SkillManager;
|
|
211
213
|
messageBus?: MessageBus;
|
|
212
214
|
plugins: (string | Plugin_2)[];
|
|
213
215
|
};
|
|
214
216
|
|
|
217
|
+
export declare function createSession(options: SDKSessionOptions): Promise<SDKSession>;
|
|
218
|
+
|
|
215
219
|
declare interface CreateTaskInput {
|
|
216
220
|
command: string;
|
|
217
221
|
pid: number;
|
|
@@ -1210,6 +1214,9 @@ declare type ProjectWorkspacesMergeOutput = {
|
|
|
1210
1214
|
error?: string;
|
|
1211
1215
|
};
|
|
1212
1216
|
|
|
1217
|
+
declare function prompt_2(message: string, options: SDKSessionOptions): Promise<SDKResultMessage>;
|
|
1218
|
+
export { prompt_2 as prompt }
|
|
1219
|
+
|
|
1213
1220
|
declare interface PromptCommand extends BaseSlashCommand {
|
|
1214
1221
|
type: 'prompt';
|
|
1215
1222
|
progressMessage?: string;
|
|
@@ -1302,6 +1309,8 @@ declare type ResponseMessage = BaseMessage & {
|
|
|
1302
1309
|
error?: any;
|
|
1303
1310
|
};
|
|
1304
1311
|
|
|
1312
|
+
export declare function resumeSession(sessionId: string, options: SDKSessionOptions): Promise<SDKSession>;
|
|
1313
|
+
|
|
1305
1314
|
declare type ReturnDisplay = string | DiffViewerReturnDisplay | TodoReadReturnDisplay | TodoWriteReturnDisplay;
|
|
1306
1315
|
|
|
1307
1316
|
export declare function runNeovate(opts: {
|
|
@@ -1312,6 +1321,52 @@ export declare function runNeovate(opts: {
|
|
|
1312
1321
|
upgrade?: UpgradeOptions;
|
|
1313
1322
|
}): Promise<void>;
|
|
1314
1323
|
|
|
1324
|
+
export declare type SDKMessage = NormalizedMessage | SDKSystemMessage | SDKResultMessage;
|
|
1325
|
+
|
|
1326
|
+
declare type SDKResultMessage = {
|
|
1327
|
+
type: 'result';
|
|
1328
|
+
subtype: 'success' | 'error';
|
|
1329
|
+
isError: boolean;
|
|
1330
|
+
content: string;
|
|
1331
|
+
sessionId: string;
|
|
1332
|
+
__result?: any;
|
|
1333
|
+
usage?: {
|
|
1334
|
+
input_tokens: number;
|
|
1335
|
+
output_tokens: number;
|
|
1336
|
+
};
|
|
1337
|
+
};
|
|
1338
|
+
|
|
1339
|
+
export declare interface SDKSession {
|
|
1340
|
+
readonly sessionId: string;
|
|
1341
|
+
send(message: string | SDKUserMessage): Promise<void>;
|
|
1342
|
+
receive(): AsyncGenerator<SDKMessage, void>;
|
|
1343
|
+
close(): void;
|
|
1344
|
+
[Symbol.asyncDispose](): Promise<void>;
|
|
1345
|
+
}
|
|
1346
|
+
|
|
1347
|
+
export declare type SDKSessionOptions = {
|
|
1348
|
+
model: string;
|
|
1349
|
+
cwd?: string;
|
|
1350
|
+
productName?: string;
|
|
1351
|
+
};
|
|
1352
|
+
|
|
1353
|
+
declare type SDKSystemMessage = {
|
|
1354
|
+
type: 'system';
|
|
1355
|
+
subtype: 'init';
|
|
1356
|
+
sessionId: string;
|
|
1357
|
+
model: string;
|
|
1358
|
+
cwd: string;
|
|
1359
|
+
tools: string[];
|
|
1360
|
+
};
|
|
1361
|
+
|
|
1362
|
+
export declare type SDKUserMessage = {
|
|
1363
|
+
type: 'user';
|
|
1364
|
+
message: UserContent;
|
|
1365
|
+
parentUuid: string | null;
|
|
1366
|
+
uuid: string;
|
|
1367
|
+
sessionId: string;
|
|
1368
|
+
};
|
|
1369
|
+
|
|
1315
1370
|
declare type SessionAddMessagesInput = {
|
|
1316
1371
|
cwd: string;
|
|
1317
1372
|
sessionId: string;
|
|
@@ -1518,6 +1573,44 @@ declare type SessionsResumeOutput = {
|
|
|
1518
1573
|
};
|
|
1519
1574
|
};
|
|
1520
1575
|
|
|
1576
|
+
declare interface SkillError {
|
|
1577
|
+
path: string;
|
|
1578
|
+
message: string;
|
|
1579
|
+
}
|
|
1580
|
+
|
|
1581
|
+
declare class SkillManager {
|
|
1582
|
+
private skillsMap;
|
|
1583
|
+
private errors;
|
|
1584
|
+
private paths;
|
|
1585
|
+
constructor(opts: SkillManagerOpts);
|
|
1586
|
+
getSkills(): SkillMetadata[];
|
|
1587
|
+
getSkill(name: string): SkillMetadata | undefined;
|
|
1588
|
+
getErrors(): SkillError[];
|
|
1589
|
+
readSkillBody(skill: SkillMetadata): Promise<string>;
|
|
1590
|
+
loadSkills(): Promise<void>;
|
|
1591
|
+
private loadSkillsFromDirectory;
|
|
1592
|
+
private loadSkillFile;
|
|
1593
|
+
private parseSkillFile;
|
|
1594
|
+
}
|
|
1595
|
+
|
|
1596
|
+
declare interface SkillManagerOpts {
|
|
1597
|
+
paths: Paths;
|
|
1598
|
+
}
|
|
1599
|
+
|
|
1600
|
+
declare interface SkillMetadata {
|
|
1601
|
+
name: string;
|
|
1602
|
+
description: string;
|
|
1603
|
+
path: string;
|
|
1604
|
+
source: SkillSource;
|
|
1605
|
+
}
|
|
1606
|
+
|
|
1607
|
+
declare enum SkillSource {
|
|
1608
|
+
GlobalClaude = "global-claude",
|
|
1609
|
+
Global = "global",
|
|
1610
|
+
ProjectClaude = "project-claude",
|
|
1611
|
+
Project = "project"
|
|
1612
|
+
}
|
|
1613
|
+
|
|
1521
1614
|
declare type SlashCommand = LocalCommand | LocalJSXCommand | PromptCommand;
|
|
1522
1615
|
|
|
1523
1616
|
declare type SlashCommandExecuteInput = {
|