@kilocode/sdk 7.2.14 → 7.2.17
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/v2/client.js +7 -2
- package/dist/v2/gen/sdk.gen.d.ts +24 -11
- package/dist/v2/gen/sdk.gen.js +47 -17
- package/dist/v2/gen/types.gen.d.ts +186 -111
- package/package.json +1 -1
package/dist/v2/client.js
CHANGED
|
@@ -75,6 +75,11 @@ export function createKiloClient(config) {
|
|
|
75
75
|
directory: config?.directory,
|
|
76
76
|
workspace: config?.experimental_workspaceID,
|
|
77
77
|
}));
|
|
78
|
-
|
|
79
|
-
|
|
78
|
+
client.interceptors.response.use((response) => {
|
|
79
|
+
const contentType = response.headers.get("content-type");
|
|
80
|
+
if (contentType === "text/html")
|
|
81
|
+
throw new Error("Request is not supported by this version of OpenCode Server (Server responded with text/html)");
|
|
82
|
+
return response;
|
|
83
|
+
});
|
|
84
|
+
return new KiloClient({ client });
|
|
80
85
|
}
|
package/dist/v2/gen/sdk.gen.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type Client, type Options as Options2, type TDataShape } from "./client/index.js";
|
|
2
|
-
import type { AgentPartInput, AppAgentsResponses, AppLogErrors, AppLogResponses, AppSkillsResponses, Auth as Auth3, AuthRemoveErrors, AuthRemoveResponses, AuthSetErrors, AuthSetResponses, CommandListResponses, CommitMessageGenerateErrors, CommitMessageGenerateResponses, Config as Config3, ConfigGetResponses, ConfigProvidersResponses, ConfigUpdateErrors, ConfigUpdateResponses, ConfigWarningsResponses, EnhancePromptEnhanceErrors, EnhancePromptEnhanceResponses, EventSubscribeResponses, EventTuiCommandExecute, EventTuiPromptAppend, EventTuiSessionSelect, EventTuiToastShow, ExperimentalConsoleGetResponses, ExperimentalConsoleListOrgsResponses, ExperimentalConsoleSwitchOrgResponses, ExperimentalResourceListResponses, ExperimentalSessionListResponses, ExperimentalWorkspaceCreateErrors, ExperimentalWorkspaceCreateResponses, ExperimentalWorkspaceListResponses, ExperimentalWorkspaceRemoveErrors, ExperimentalWorkspaceRemoveResponses, FileListResponses, FilePartInput, FilePartSource, FileReadResponses, FileStatusResponses, FindFilesResponses, FindSymbolsResponses, FindTextResponses, FormatterStatusResponses, GlobalConfigGetResponses, GlobalConfigUpdateErrors, GlobalConfigUpdateResponses, GlobalDisposeResponses, GlobalEventResponses, GlobalHealthResponses,
|
|
2
|
+
import type { AgentPartInput, AppAgentsResponses, AppLogErrors, AppLogResponses, AppSkillsResponses, Auth as Auth3, AuthRemoveErrors, AuthRemoveResponses, AuthSetErrors, AuthSetResponses, CommandListResponses, CommitMessageGenerateErrors, CommitMessageGenerateResponses, Config as Config3, ConfigGetResponses, ConfigProvidersResponses, ConfigUpdateErrors, ConfigUpdateResponses, ConfigWarningsResponses, EnhancePromptEnhanceErrors, EnhancePromptEnhanceResponses, EventSubscribeResponses, EventTuiCommandExecute, EventTuiPromptAppend, EventTuiSessionSelect, EventTuiToastShow, ExperimentalConsoleGetResponses, ExperimentalConsoleListOrgsResponses, ExperimentalConsoleSwitchOrgResponses, ExperimentalResourceListResponses, ExperimentalSessionListResponses, ExperimentalWorkspaceAdaptorListResponses, ExperimentalWorkspaceCreateErrors, ExperimentalWorkspaceCreateResponses, ExperimentalWorkspaceListResponses, ExperimentalWorkspaceRemoveErrors, ExperimentalWorkspaceRemoveResponses, ExperimentalWorkspaceStatusResponses, FileListResponses, FilePartInput, FilePartSource, FileReadResponses, FileStatusResponses, FindFilesResponses, FindSymbolsResponses, FindTextResponses, FormatterStatusResponses, GlobalConfigGetResponses, GlobalConfigUpdateErrors, GlobalConfigUpdateResponses, GlobalDisposeResponses, GlobalEventResponses, GlobalHealthResponses, GlobalUpgradeErrors, GlobalUpgradeResponses, InstanceDisposeResponses, KiloClawChatCredentialsResponses, KiloClawStatusResponses, KiloCloudSessionGetErrors, KiloCloudSessionGetResponses, KiloCloudSessionImportErrors, KiloCloudSessionImportResponses, KiloCloudSessionsErrors, KiloCloudSessionsResponses, KilocodeHeapSnapshotErrors, KilocodeHeapSnapshotResponses, KilocodeRemoveAgentErrors, KilocodeRemoveAgentResponses, KilocodeRemoveSkillErrors, KilocodeRemoveSkillResponses, KilocodeSessionImportMessageErrors, KilocodeSessionImportMessageResponses, KilocodeSessionImportPartErrors, KilocodeSessionImportPartResponses, KilocodeSessionImportProjectErrors, KilocodeSessionImportProjectResponses, KilocodeSessionImportSessionErrors, KilocodeSessionImportSessionResponses, KiloFimErrors, KiloFimResponses, KiloModesResponses, KiloNotificationsErrors, KiloNotificationsResponses, KiloOrganizationSetErrors, KiloOrganizationSetResponses, KiloProfileErrors, KiloProfileResponses, LspStatusResponses, McpAddErrors, McpAddResponses, McpAuthAuthenticateErrors, McpAuthAuthenticateResponses, McpAuthCallbackErrors, McpAuthCallbackResponses, McpAuthRemoveErrors, McpAuthRemoveResponses, McpAuthStartErrors, McpAuthStartResponses, McpConnectResponses, McpDisconnectResponses, McpLocalConfig, McpRemoteConfig, McpStatusResponses, NetworkListResponses, NetworkRejectErrors, NetworkRejectResponses, NetworkReplyErrors, NetworkReplyResponses, OutputFormat, Part as Part2, PartDeleteErrors, PartDeleteResponses, PartUpdateErrors, PartUpdateResponses, PathGetResponses, PermissionAllowEverythingErrors, PermissionAllowEverythingResponses, PermissionListResponses, PermissionReplyErrors, PermissionReplyResponses, PermissionRespondErrors, PermissionRespondResponses, PermissionRuleset, PermissionSaveAlwaysRulesErrors, PermissionSaveAlwaysRulesResponses, ProjectCurrentResponses, ProjectInitGitResponses, ProjectListResponses, ProjectUpdateErrors, ProjectUpdateResponses, ProviderAuthResponses, ProviderListResponses, ProviderOauthAuthorizeErrors, ProviderOauthAuthorizeResponses, ProviderOauthCallbackErrors, ProviderOauthCallbackResponses, PtyConnectErrors, PtyConnectResponses, PtyCreateErrors, PtyCreateResponses, PtyGetErrors, PtyGetResponses, PtyListResponses, PtyRemoveErrors, PtyRemoveResponses, PtyUpdateErrors, PtyUpdateResponses, QuestionAnswer, QuestionListResponses, QuestionRejectErrors, QuestionRejectResponses, QuestionReplyErrors, QuestionReplyResponses, RemoteDisableResponses, RemoteEnableResponses, RemoteStatusResponses, SessionAbortErrors, SessionAbortResponses, SessionChildrenErrors, SessionChildrenResponses, SessionCommandErrors, SessionCommandResponses, SessionCreateErrors, SessionCreateResponses, SessionDeleteErrors, SessionDeleteMessageErrors, SessionDeleteMessageResponses, SessionDeleteResponses, SessionDiffResponses, SessionForkResponses, SessionGetErrors, SessionGetResponses, SessionInitErrors, SessionInitResponses, SessionListResponses, SessionMessageErrors, SessionMessageResponses, SessionMessagesErrors, SessionMessagesResponses, SessionPromptAsyncErrors, SessionPromptAsyncResponses, SessionPromptErrors, SessionPromptResponses, SessionRevertErrors, SessionRevertResponses, SessionShareErrors, SessionShareResponses, SessionShellErrors, SessionShellResponses, SessionStatusErrors, SessionStatusResponses, SessionSummarizeErrors, SessionSummarizeResponses, SessionTodoErrors, SessionTodoResponses, SessionUnrevertErrors, SessionUnrevertResponses, SessionUnshareErrors, SessionUnshareResponses, SessionUpdateErrors, SessionUpdateResponses, SessionViewedResponses, SubtaskPartInput, SuggestionAcceptErrors, SuggestionAcceptResponses, SuggestionDismissErrors, SuggestionDismissResponses, SuggestionListResponses, TelemetryCaptureErrors, TelemetryCaptureResponses, TextPartInput, ToolIdsErrors, ToolIdsResponses, ToolListErrors, ToolListResponses, TuiAppendPromptErrors, TuiAppendPromptResponses, TuiClearPromptResponses, TuiControlNextResponses, TuiControlResponseResponses, TuiExecuteCommandErrors, TuiExecuteCommandResponses, TuiOpenHelpResponses, TuiOpenModelsResponses, TuiOpenSessionsResponses, TuiOpenThemesResponses, TuiPublishErrors, TuiPublishResponses, TuiSelectSessionErrors, TuiSelectSessionResponses, TuiShowToastResponses, TuiSubmitPromptResponses, VcsDiffResponses, VcsGetResponses, WorktreeCreateErrors, WorktreeCreateInput, WorktreeCreateResponses, WorktreeDiffErrors, WorktreeDiffFileErrors, WorktreeDiffFileResponses, WorktreeDiffResponses, WorktreeDiffSummaryErrors, WorktreeDiffSummaryResponses, WorktreeListResponses, WorktreeRemoveErrors, WorktreeRemoveInput, WorktreeRemoveResponses, WorktreeResetErrors, WorktreeResetInput, WorktreeResetResponses } from "./types.gen.js";
|
|
3
3
|
export type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {
|
|
4
4
|
/**
|
|
5
5
|
* You can provide a client instance returned by `createClient()` instead of
|
|
@@ -25,14 +25,6 @@ declare class HeyApiRegistry<T> {
|
|
|
25
25
|
get(key?: string): T;
|
|
26
26
|
set(value: T, key?: string): void;
|
|
27
27
|
}
|
|
28
|
-
export declare class SyncEvent extends HeyApiClient {
|
|
29
|
-
/**
|
|
30
|
-
* Subscribe to global sync events
|
|
31
|
-
*
|
|
32
|
-
* Get global sync events
|
|
33
|
-
*/
|
|
34
|
-
subscribe<ThrowOnError extends boolean = false>(options?: Options<never, ThrowOnError>): Promise<import("./core/serverSentEvents.gen.js").ServerSentEventsResult<GlobalSyncEventSubscribeResponses, unknown>>;
|
|
35
|
-
}
|
|
36
28
|
export declare class Config extends HeyApiClient {
|
|
37
29
|
/**
|
|
38
30
|
* Get global configuration
|
|
@@ -76,8 +68,6 @@ export declare class Global extends HeyApiClient {
|
|
|
76
68
|
upgrade<ThrowOnError extends boolean = false>(parameters?: {
|
|
77
69
|
target?: string;
|
|
78
70
|
}, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<GlobalUpgradeResponses, GlobalUpgradeErrors, ThrowOnError, "fields">;
|
|
79
|
-
private _syncEvent?;
|
|
80
|
-
get syncEvent(): SyncEvent;
|
|
81
71
|
private _config?;
|
|
82
72
|
get config(): Config;
|
|
83
73
|
}
|
|
@@ -328,6 +318,17 @@ export declare class Console extends HeyApiClient {
|
|
|
328
318
|
orgID?: string;
|
|
329
319
|
}, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<ExperimentalConsoleSwitchOrgResponses, unknown, ThrowOnError, "fields">;
|
|
330
320
|
}
|
|
321
|
+
export declare class Adaptor extends HeyApiClient {
|
|
322
|
+
/**
|
|
323
|
+
* List workspace adaptors
|
|
324
|
+
*
|
|
325
|
+
* List all available workspace adaptors for the current project.
|
|
326
|
+
*/
|
|
327
|
+
list<ThrowOnError extends boolean = false>(parameters?: {
|
|
328
|
+
directory?: string;
|
|
329
|
+
workspace?: string;
|
|
330
|
+
}, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<ExperimentalWorkspaceAdaptorListResponses, unknown, ThrowOnError, "fields">;
|
|
331
|
+
}
|
|
331
332
|
export declare class Workspace extends HeyApiClient {
|
|
332
333
|
/**
|
|
333
334
|
* List workspaces
|
|
@@ -351,6 +352,15 @@ export declare class Workspace extends HeyApiClient {
|
|
|
351
352
|
branch?: string | null;
|
|
352
353
|
extra?: unknown | null;
|
|
353
354
|
}, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<ExperimentalWorkspaceCreateResponses, ExperimentalWorkspaceCreateErrors, ThrowOnError, "fields">;
|
|
355
|
+
/**
|
|
356
|
+
* Workspace status
|
|
357
|
+
*
|
|
358
|
+
* Get connection status for workspaces in the current project.
|
|
359
|
+
*/
|
|
360
|
+
status<ThrowOnError extends boolean = false>(parameters?: {
|
|
361
|
+
directory?: string;
|
|
362
|
+
workspace?: string;
|
|
363
|
+
}, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<ExperimentalWorkspaceStatusResponses, unknown, ThrowOnError, "fields">;
|
|
354
364
|
/**
|
|
355
365
|
* Remove workspace
|
|
356
366
|
*
|
|
@@ -361,6 +371,8 @@ export declare class Workspace extends HeyApiClient {
|
|
|
361
371
|
directory?: string;
|
|
362
372
|
workspace?: string;
|
|
363
373
|
}, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<ExperimentalWorkspaceRemoveResponses, ExperimentalWorkspaceRemoveErrors, ThrowOnError, "fields">;
|
|
374
|
+
private _adaptor?;
|
|
375
|
+
get adaptor(): Adaptor;
|
|
364
376
|
}
|
|
365
377
|
export declare class Session extends HeyApiClient {
|
|
366
378
|
/**
|
|
@@ -563,6 +575,7 @@ export declare class Session2 extends HeyApiClient {
|
|
|
563
575
|
directory?: string;
|
|
564
576
|
workspace?: string;
|
|
565
577
|
title?: string;
|
|
578
|
+
permission?: PermissionRuleset;
|
|
566
579
|
time?: {
|
|
567
580
|
archived?: number;
|
|
568
581
|
};
|
package/dist/v2/gen/sdk.gen.js
CHANGED
|
@@ -21,19 +21,6 @@ class HeyApiRegistry {
|
|
|
21
21
|
this.instances.set(key ?? this.defaultKey, value);
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
|
-
export class SyncEvent extends HeyApiClient {
|
|
25
|
-
/**
|
|
26
|
-
* Subscribe to global sync events
|
|
27
|
-
*
|
|
28
|
-
* Get global sync events
|
|
29
|
-
*/
|
|
30
|
-
subscribe(options) {
|
|
31
|
-
return (options?.client ?? this.client).sse.get({
|
|
32
|
-
url: "/global/sync-event",
|
|
33
|
-
...options,
|
|
34
|
-
});
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
24
|
export class Config extends HeyApiClient {
|
|
38
25
|
/**
|
|
39
26
|
* Get global configuration
|
|
@@ -117,10 +104,6 @@ export class Global extends HeyApiClient {
|
|
|
117
104
|
},
|
|
118
105
|
});
|
|
119
106
|
}
|
|
120
|
-
_syncEvent;
|
|
121
|
-
get syncEvent() {
|
|
122
|
-
return (this._syncEvent ??= new SyncEvent({ client: this.client }));
|
|
123
|
-
}
|
|
124
107
|
_config;
|
|
125
108
|
get config() {
|
|
126
109
|
return (this._config ??= new Config({ client: this.client }));
|
|
@@ -628,6 +611,28 @@ export class Console extends HeyApiClient {
|
|
|
628
611
|
});
|
|
629
612
|
}
|
|
630
613
|
}
|
|
614
|
+
export class Adaptor extends HeyApiClient {
|
|
615
|
+
/**
|
|
616
|
+
* List workspace adaptors
|
|
617
|
+
*
|
|
618
|
+
* List all available workspace adaptors for the current project.
|
|
619
|
+
*/
|
|
620
|
+
list(parameters, options) {
|
|
621
|
+
const params = buildClientParams([parameters], [
|
|
622
|
+
{
|
|
623
|
+
args: [
|
|
624
|
+
{ in: "query", key: "directory" },
|
|
625
|
+
{ in: "query", key: "workspace" },
|
|
626
|
+
],
|
|
627
|
+
},
|
|
628
|
+
]);
|
|
629
|
+
return (options?.client ?? this.client).get({
|
|
630
|
+
url: "/experimental/workspace/adaptor",
|
|
631
|
+
...options,
|
|
632
|
+
...params,
|
|
633
|
+
});
|
|
634
|
+
}
|
|
635
|
+
}
|
|
631
636
|
export class Workspace extends HeyApiClient {
|
|
632
637
|
/**
|
|
633
638
|
* List workspaces
|
|
@@ -678,6 +683,26 @@ export class Workspace extends HeyApiClient {
|
|
|
678
683
|
},
|
|
679
684
|
});
|
|
680
685
|
}
|
|
686
|
+
/**
|
|
687
|
+
* Workspace status
|
|
688
|
+
*
|
|
689
|
+
* Get connection status for workspaces in the current project.
|
|
690
|
+
*/
|
|
691
|
+
status(parameters, options) {
|
|
692
|
+
const params = buildClientParams([parameters], [
|
|
693
|
+
{
|
|
694
|
+
args: [
|
|
695
|
+
{ in: "query", key: "directory" },
|
|
696
|
+
{ in: "query", key: "workspace" },
|
|
697
|
+
],
|
|
698
|
+
},
|
|
699
|
+
]);
|
|
700
|
+
return (options?.client ?? this.client).get({
|
|
701
|
+
url: "/experimental/workspace/status",
|
|
702
|
+
...options,
|
|
703
|
+
...params,
|
|
704
|
+
});
|
|
705
|
+
}
|
|
681
706
|
/**
|
|
682
707
|
* Remove workspace
|
|
683
708
|
*
|
|
@@ -699,6 +724,10 @@ export class Workspace extends HeyApiClient {
|
|
|
699
724
|
...params,
|
|
700
725
|
});
|
|
701
726
|
}
|
|
727
|
+
_adaptor;
|
|
728
|
+
get adaptor() {
|
|
729
|
+
return (this._adaptor ??= new Adaptor({ client: this.client }));
|
|
730
|
+
}
|
|
702
731
|
}
|
|
703
732
|
export class Session extends HeyApiClient {
|
|
704
733
|
/**
|
|
@@ -1108,6 +1137,7 @@ export class Session2 extends HeyApiClient {
|
|
|
1108
1137
|
{ in: "query", key: "directory" },
|
|
1109
1138
|
{ in: "query", key: "workspace" },
|
|
1110
1139
|
{ in: "body", key: "title" },
|
|
1140
|
+
{ in: "body", key: "permission" },
|
|
1111
1141
|
{ in: "body", key: "time" },
|
|
1112
1142
|
],
|
|
1113
1143
|
},
|
|
@@ -64,6 +64,19 @@ export type EventGlobalConfigUpdated = {
|
|
|
64
64
|
[key: string]: unknown;
|
|
65
65
|
};
|
|
66
66
|
};
|
|
67
|
+
export type EventFileEdited = {
|
|
68
|
+
type: "file.edited";
|
|
69
|
+
properties: {
|
|
70
|
+
file: string;
|
|
71
|
+
};
|
|
72
|
+
};
|
|
73
|
+
export type EventFileWatcherUpdated = {
|
|
74
|
+
type: "file.watcher.updated";
|
|
75
|
+
properties: {
|
|
76
|
+
file: string;
|
|
77
|
+
event: "add" | "change" | "unlink";
|
|
78
|
+
};
|
|
79
|
+
};
|
|
67
80
|
export type EventLspClientDiagnostics = {
|
|
68
81
|
type: "lsp.client.diagnostics";
|
|
69
82
|
properties: {
|
|
@@ -281,34 +294,6 @@ export type EventSessionError = {
|
|
|
281
294
|
error?: ProviderAuthError | UnknownError | MessageOutputLengthError | MessageAbortedError | StructuredOutputError | ContextOverflowError | ApiError;
|
|
282
295
|
};
|
|
283
296
|
};
|
|
284
|
-
export type EventFileEdited = {
|
|
285
|
-
type: "file.edited";
|
|
286
|
-
properties: {
|
|
287
|
-
file: string;
|
|
288
|
-
};
|
|
289
|
-
};
|
|
290
|
-
export type EventFileWatcherUpdated = {
|
|
291
|
-
type: "file.watcher.updated";
|
|
292
|
-
properties: {
|
|
293
|
-
file: string;
|
|
294
|
-
event: "add" | "change" | "unlink";
|
|
295
|
-
};
|
|
296
|
-
};
|
|
297
|
-
export type EventVcsBranchUpdated = {
|
|
298
|
-
type: "vcs.branch.updated";
|
|
299
|
-
properties: {
|
|
300
|
-
branch?: string;
|
|
301
|
-
};
|
|
302
|
-
};
|
|
303
|
-
export type EventCommandExecuted = {
|
|
304
|
-
type: "command.executed";
|
|
305
|
-
properties: {
|
|
306
|
-
name: string;
|
|
307
|
-
sessionID: string;
|
|
308
|
-
arguments: string;
|
|
309
|
-
messageID: string;
|
|
310
|
-
};
|
|
311
|
-
};
|
|
312
297
|
export type QuestionOption = {
|
|
313
298
|
/**
|
|
314
299
|
* Display text (1-5 words, concise)
|
|
@@ -318,6 +303,14 @@ export type QuestionOption = {
|
|
|
318
303
|
* Explanation of choice
|
|
319
304
|
*/
|
|
320
305
|
description: string;
|
|
306
|
+
/**
|
|
307
|
+
* Optional i18n key for the label; clients translate and still reply with `label`
|
|
308
|
+
*/
|
|
309
|
+
labelKey?: string;
|
|
310
|
+
/**
|
|
311
|
+
* Optional i18n key for the description
|
|
312
|
+
*/
|
|
313
|
+
descriptionKey?: string;
|
|
321
314
|
};
|
|
322
315
|
export type QuestionInfo = {
|
|
323
316
|
/**
|
|
@@ -336,11 +329,23 @@ export type QuestionInfo = {
|
|
|
336
329
|
* Allow selecting multiple choices
|
|
337
330
|
*/
|
|
338
331
|
multiple?: boolean;
|
|
332
|
+
/**
|
|
333
|
+
* Optional i18n key for the question text; clients fall back to `question` when missing
|
|
334
|
+
*/
|
|
335
|
+
questionKey?: string;
|
|
336
|
+
/**
|
|
337
|
+
* Optional i18n key for the header; clients fall back to `header` when missing
|
|
338
|
+
*/
|
|
339
|
+
headerKey?: string;
|
|
339
340
|
/**
|
|
340
341
|
* Allow typing a custom answer (default: true)
|
|
341
342
|
*/
|
|
342
343
|
custom?: boolean;
|
|
343
344
|
};
|
|
345
|
+
export type QuestionTool = {
|
|
346
|
+
messageID: string;
|
|
347
|
+
callID: string;
|
|
348
|
+
};
|
|
344
349
|
export type QuestionRequest = {
|
|
345
350
|
id: string;
|
|
346
351
|
sessionID: string;
|
|
@@ -352,30 +357,29 @@ export type QuestionRequest = {
|
|
|
352
357
|
* Whether this question blocks prompt input (default: true)
|
|
353
358
|
*/
|
|
354
359
|
blocking?: boolean;
|
|
355
|
-
tool?:
|
|
356
|
-
messageID: string;
|
|
357
|
-
callID: string;
|
|
358
|
-
};
|
|
360
|
+
tool?: QuestionTool;
|
|
359
361
|
};
|
|
360
362
|
export type EventQuestionAsked = {
|
|
361
363
|
type: "question.asked";
|
|
362
364
|
properties: QuestionRequest;
|
|
363
365
|
};
|
|
364
366
|
export type QuestionAnswer = Array<string>;
|
|
367
|
+
export type QuestionReplied = {
|
|
368
|
+
sessionID: string;
|
|
369
|
+
requestID: string;
|
|
370
|
+
answers: Array<QuestionAnswer>;
|
|
371
|
+
};
|
|
365
372
|
export type EventQuestionReplied = {
|
|
366
373
|
type: "question.replied";
|
|
367
|
-
properties:
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
374
|
+
properties: QuestionReplied;
|
|
375
|
+
};
|
|
376
|
+
export type QuestionRejected = {
|
|
377
|
+
sessionID: string;
|
|
378
|
+
requestID: string;
|
|
372
379
|
};
|
|
373
380
|
export type EventQuestionRejected = {
|
|
374
381
|
type: "question.rejected";
|
|
375
|
-
properties:
|
|
376
|
-
sessionID: string;
|
|
377
|
-
requestID: string;
|
|
378
|
-
};
|
|
382
|
+
properties: QuestionRejected;
|
|
379
383
|
};
|
|
380
384
|
export type Todo = {
|
|
381
385
|
/**
|
|
@@ -398,6 +402,33 @@ export type EventTodoUpdated = {
|
|
|
398
402
|
todos: Array<Todo>;
|
|
399
403
|
};
|
|
400
404
|
};
|
|
405
|
+
export type SessionStatus = {
|
|
406
|
+
type: "idle";
|
|
407
|
+
} | {
|
|
408
|
+
type: "retry";
|
|
409
|
+
attempt: number;
|
|
410
|
+
message: string;
|
|
411
|
+
next: number;
|
|
412
|
+
} | {
|
|
413
|
+
type: "busy";
|
|
414
|
+
} | {
|
|
415
|
+
type: "offline";
|
|
416
|
+
requestID: string;
|
|
417
|
+
message: string;
|
|
418
|
+
};
|
|
419
|
+
export type EventSessionStatus = {
|
|
420
|
+
type: "session.status";
|
|
421
|
+
properties: {
|
|
422
|
+
sessionID: string;
|
|
423
|
+
status: SessionStatus;
|
|
424
|
+
};
|
|
425
|
+
};
|
|
426
|
+
export type EventSessionIdle = {
|
|
427
|
+
type: "session.idle";
|
|
428
|
+
properties: {
|
|
429
|
+
sessionID: string;
|
|
430
|
+
};
|
|
431
|
+
};
|
|
401
432
|
export type SuggestionAction = {
|
|
402
433
|
/**
|
|
403
434
|
* Button or option label (1-5 words)
|
|
@@ -452,37 +483,25 @@ export type EventSuggestionDismissed = {
|
|
|
452
483
|
requestID: string;
|
|
453
484
|
};
|
|
454
485
|
};
|
|
455
|
-
export type
|
|
456
|
-
type: "
|
|
457
|
-
} | {
|
|
458
|
-
type: "retry";
|
|
459
|
-
attempt: number;
|
|
460
|
-
message: string;
|
|
461
|
-
next: number;
|
|
462
|
-
} | {
|
|
463
|
-
type: "busy";
|
|
464
|
-
} | {
|
|
465
|
-
type: "offline";
|
|
466
|
-
requestID: string;
|
|
467
|
-
message: string;
|
|
468
|
-
};
|
|
469
|
-
export type EventSessionStatus = {
|
|
470
|
-
type: "session.status";
|
|
486
|
+
export type EventSessionCompacted = {
|
|
487
|
+
type: "session.compacted";
|
|
471
488
|
properties: {
|
|
472
489
|
sessionID: string;
|
|
473
|
-
status: SessionStatus;
|
|
474
490
|
};
|
|
475
491
|
};
|
|
476
|
-
export type
|
|
477
|
-
type: "
|
|
492
|
+
export type EventCommandExecuted = {
|
|
493
|
+
type: "command.executed";
|
|
478
494
|
properties: {
|
|
495
|
+
name: string;
|
|
479
496
|
sessionID: string;
|
|
497
|
+
arguments: string;
|
|
498
|
+
messageID: string;
|
|
480
499
|
};
|
|
481
500
|
};
|
|
482
|
-
export type
|
|
483
|
-
type: "
|
|
501
|
+
export type EventVcsBranchUpdated = {
|
|
502
|
+
type: "vcs.branch.updated";
|
|
484
503
|
properties: {
|
|
485
|
-
|
|
504
|
+
branch?: string;
|
|
486
505
|
};
|
|
487
506
|
};
|
|
488
507
|
export type EventKiloSessionsRemoteStatusChanged = {
|
|
@@ -492,14 +511,15 @@ export type EventKiloSessionsRemoteStatusChanged = {
|
|
|
492
511
|
connected: boolean;
|
|
493
512
|
};
|
|
494
513
|
};
|
|
495
|
-
export type
|
|
496
|
-
type: "
|
|
514
|
+
export type EventWorktreeReady = {
|
|
515
|
+
type: "worktree.ready";
|
|
497
516
|
properties: {
|
|
498
517
|
name: string;
|
|
518
|
+
branch: string;
|
|
499
519
|
};
|
|
500
520
|
};
|
|
501
|
-
export type
|
|
502
|
-
type: "
|
|
521
|
+
export type EventWorktreeFailed = {
|
|
522
|
+
type: "worktree.failed";
|
|
503
523
|
properties: {
|
|
504
524
|
message: string;
|
|
505
525
|
};
|
|
@@ -538,19 +558,26 @@ export type EventPtyDeleted = {
|
|
|
538
558
|
id: string;
|
|
539
559
|
};
|
|
540
560
|
};
|
|
541
|
-
export type
|
|
542
|
-
type: "
|
|
561
|
+
export type EventWorkspaceReady = {
|
|
562
|
+
type: "workspace.ready";
|
|
543
563
|
properties: {
|
|
544
564
|
name: string;
|
|
545
|
-
branch: string;
|
|
546
565
|
};
|
|
547
566
|
};
|
|
548
|
-
export type
|
|
549
|
-
type: "
|
|
567
|
+
export type EventWorkspaceFailed = {
|
|
568
|
+
type: "workspace.failed";
|
|
550
569
|
properties: {
|
|
551
570
|
message: string;
|
|
552
571
|
};
|
|
553
572
|
};
|
|
573
|
+
export type EventWorkspaceStatus = {
|
|
574
|
+
type: "workspace.status";
|
|
575
|
+
properties: {
|
|
576
|
+
workspaceID: string;
|
|
577
|
+
status: "connected" | "connecting" | "disconnected" | "error";
|
|
578
|
+
error?: string;
|
|
579
|
+
};
|
|
580
|
+
};
|
|
554
581
|
export type OutputFormatText = {
|
|
555
582
|
type: "text";
|
|
556
583
|
};
|
|
@@ -949,30 +976,34 @@ export type EventSessionDeleted = {
|
|
|
949
976
|
info: Session;
|
|
950
977
|
};
|
|
951
978
|
};
|
|
952
|
-
export type Event = EventProjectUpdated | EventServerInstanceDisposed | EventInstallationUpdated | EventInstallationUpdateAvailable | EventServerConnected | EventGlobalDisposed | EventGlobalConfigUpdated | EventLspClientDiagnostics | EventLspUpdated | EventTuiPromptAppend | EventTuiCommandExecute | EventTuiToastShow | EventTuiSessionSelect | EventMcpToolsChanged | EventMcpBrowserOpenFailed | EventSessionNetworkAsked | EventSessionNetworkReplied | EventSessionNetworkRejected | EventSessionNetworkRestored | EventMessagePartDelta | EventSessionTurnOpen | EventSessionTurnClose | EventPermissionAsked | EventPermissionReplied | EventSessionDiff | EventSessionError | EventFileEdited | EventFileWatcherUpdated | EventVcsBranchUpdated | EventCommandExecuted | EventQuestionAsked | EventQuestionReplied | EventQuestionRejected | EventTodoUpdated | EventSuggestionShown | EventSuggestionAccepted | EventSuggestionDismissed | EventSessionStatus | EventSessionIdle | EventSessionCompacted | EventKiloSessionsRemoteStatusChanged | EventWorkspaceReady | EventWorkspaceFailed | EventPtyCreated | EventPtyUpdated | EventPtyExited | EventPtyDeleted | EventWorktreeReady | EventWorktreeFailed | EventMessageUpdated | EventMessageRemoved | EventMessagePartUpdated | EventMessagePartRemoved | EventSessionCreated | EventSessionUpdated | EventSessionDeleted;
|
|
953
|
-
export type GlobalEvent = {
|
|
954
|
-
directory: string;
|
|
955
|
-
payload: Event;
|
|
956
|
-
};
|
|
957
979
|
export type SyncEventMessageUpdated = {
|
|
958
|
-
type: "
|
|
959
|
-
|
|
980
|
+
type: "sync";
|
|
981
|
+
name: "message.updated.1";
|
|
982
|
+
id: string;
|
|
983
|
+
seq: number;
|
|
984
|
+
aggregateID: "sessionID";
|
|
960
985
|
data: {
|
|
961
986
|
sessionID: string;
|
|
962
987
|
info: Message;
|
|
963
988
|
};
|
|
964
989
|
};
|
|
965
990
|
export type SyncEventMessageRemoved = {
|
|
966
|
-
type: "
|
|
967
|
-
|
|
991
|
+
type: "sync";
|
|
992
|
+
name: "message.removed.1";
|
|
993
|
+
id: string;
|
|
994
|
+
seq: number;
|
|
995
|
+
aggregateID: "sessionID";
|
|
968
996
|
data: {
|
|
969
997
|
sessionID: string;
|
|
970
998
|
messageID: string;
|
|
971
999
|
};
|
|
972
1000
|
};
|
|
973
1001
|
export type SyncEventMessagePartUpdated = {
|
|
974
|
-
type: "
|
|
975
|
-
|
|
1002
|
+
type: "sync";
|
|
1003
|
+
name: "message.part.updated.1";
|
|
1004
|
+
id: string;
|
|
1005
|
+
seq: number;
|
|
1006
|
+
aggregateID: "sessionID";
|
|
976
1007
|
data: {
|
|
977
1008
|
sessionID: string;
|
|
978
1009
|
part: Part;
|
|
@@ -980,8 +1011,11 @@ export type SyncEventMessagePartUpdated = {
|
|
|
980
1011
|
};
|
|
981
1012
|
};
|
|
982
1013
|
export type SyncEventMessagePartRemoved = {
|
|
983
|
-
type: "
|
|
984
|
-
|
|
1014
|
+
type: "sync";
|
|
1015
|
+
name: "message.part.removed.1";
|
|
1016
|
+
id: string;
|
|
1017
|
+
seq: number;
|
|
1018
|
+
aggregateID: "sessionID";
|
|
985
1019
|
data: {
|
|
986
1020
|
sessionID: string;
|
|
987
1021
|
messageID: string;
|
|
@@ -989,16 +1023,22 @@ export type SyncEventMessagePartRemoved = {
|
|
|
989
1023
|
};
|
|
990
1024
|
};
|
|
991
1025
|
export type SyncEventSessionCreated = {
|
|
992
|
-
type: "
|
|
993
|
-
|
|
1026
|
+
type: "sync";
|
|
1027
|
+
name: "session.created.1";
|
|
1028
|
+
id: string;
|
|
1029
|
+
seq: number;
|
|
1030
|
+
aggregateID: "sessionID";
|
|
994
1031
|
data: {
|
|
995
1032
|
sessionID: string;
|
|
996
1033
|
info: Session;
|
|
997
1034
|
};
|
|
998
1035
|
};
|
|
999
1036
|
export type SyncEventSessionUpdated = {
|
|
1000
|
-
type: "
|
|
1001
|
-
|
|
1037
|
+
type: "sync";
|
|
1038
|
+
name: "session.updated.1";
|
|
1039
|
+
id: string;
|
|
1040
|
+
seq: number;
|
|
1041
|
+
aggregateID: "sessionID";
|
|
1002
1042
|
data: {
|
|
1003
1043
|
sessionID: string;
|
|
1004
1044
|
info: {
|
|
@@ -1041,15 +1081,21 @@ export type SyncEventSessionUpdated = {
|
|
|
1041
1081
|
};
|
|
1042
1082
|
};
|
|
1043
1083
|
export type SyncEventSessionDeleted = {
|
|
1044
|
-
type: "
|
|
1045
|
-
|
|
1084
|
+
type: "sync";
|
|
1085
|
+
name: "session.deleted.1";
|
|
1086
|
+
id: string;
|
|
1087
|
+
seq: number;
|
|
1088
|
+
aggregateID: "sessionID";
|
|
1046
1089
|
data: {
|
|
1047
1090
|
sessionID: string;
|
|
1048
1091
|
info: Session;
|
|
1049
1092
|
};
|
|
1050
1093
|
};
|
|
1051
|
-
export type
|
|
1052
|
-
|
|
1094
|
+
export type GlobalEvent = {
|
|
1095
|
+
directory: string;
|
|
1096
|
+
project?: string;
|
|
1097
|
+
workspace?: string;
|
|
1098
|
+
payload: EventProjectUpdated | EventServerInstanceDisposed | EventInstallationUpdated | EventInstallationUpdateAvailable | EventServerConnected | EventGlobalDisposed | EventGlobalConfigUpdated | EventFileEdited | EventFileWatcherUpdated | EventLspClientDiagnostics | EventLspUpdated | EventTuiPromptAppend | EventTuiCommandExecute | EventTuiToastShow | EventTuiSessionSelect | EventMcpToolsChanged | EventMcpBrowserOpenFailed | EventSessionNetworkAsked | EventSessionNetworkReplied | EventSessionNetworkRejected | EventSessionNetworkRestored | EventMessagePartDelta | EventSessionTurnOpen | EventSessionTurnClose | EventPermissionAsked | EventPermissionReplied | EventSessionDiff | EventSessionError | EventQuestionAsked | EventQuestionReplied | EventQuestionRejected | EventTodoUpdated | EventSessionStatus | EventSessionIdle | EventSuggestionShown | EventSuggestionAccepted | EventSuggestionDismissed | EventSessionCompacted | EventCommandExecuted | EventVcsBranchUpdated | EventKiloSessionsRemoteStatusChanged | EventWorktreeReady | EventWorktreeFailed | EventPtyCreated | EventPtyUpdated | EventPtyExited | EventPtyDeleted | EventWorkspaceReady | EventWorkspaceFailed | EventWorkspaceStatus | EventMessageUpdated | EventMessageRemoved | EventMessagePartUpdated | EventMessagePartRemoved | EventSessionCreated | EventSessionUpdated | EventSessionDeleted | SyncEventMessageUpdated | SyncEventMessageRemoved | SyncEventMessagePartUpdated | SyncEventMessagePartRemoved | SyncEventSessionCreated | SyncEventSessionUpdated | SyncEventSessionDeleted;
|
|
1053
1099
|
};
|
|
1054
1100
|
/**
|
|
1055
1101
|
* Log level
|
|
@@ -1237,9 +1283,9 @@ export type ProviderConfig = {
|
|
|
1237
1283
|
*/
|
|
1238
1284
|
disabled?: boolean;
|
|
1239
1285
|
[key: string]: unknown | boolean | undefined;
|
|
1240
|
-
};
|
|
1286
|
+
} | null;
|
|
1241
1287
|
};
|
|
1242
|
-
};
|
|
1288
|
+
} | null;
|
|
1243
1289
|
};
|
|
1244
1290
|
};
|
|
1245
1291
|
export type McpLocalConfig = {
|
|
@@ -1632,9 +1678,9 @@ export type Model = {
|
|
|
1632
1678
|
};
|
|
1633
1679
|
};
|
|
1634
1680
|
recommendedIndex?: number;
|
|
1635
|
-
prompt?: "codex" | "gemini" | "beast" | "anthropic" | "trinity" | "anthropic_without_todo";
|
|
1681
|
+
prompt?: "codex" | "gemini" | "beast" | "anthropic" | "trinity" | "anthropic_without_todo" | "ling";
|
|
1636
1682
|
isFree?: boolean;
|
|
1637
|
-
ai_sdk_provider?: "anthropic" | "openai" | "openai-compatible" | "openrouter";
|
|
1683
|
+
ai_sdk_provider?: "alibaba" | "anthropic" | "openai" | "openai-compatible" | "openrouter";
|
|
1638
1684
|
};
|
|
1639
1685
|
export type Provider = {
|
|
1640
1686
|
id: string;
|
|
@@ -1659,8 +1705,8 @@ export type ToolList = Array<ToolListItem>;
|
|
|
1659
1705
|
export type Workspace = {
|
|
1660
1706
|
id: string;
|
|
1661
1707
|
type: string;
|
|
1708
|
+
name: string;
|
|
1662
1709
|
branch: string | null;
|
|
1663
|
-
name: string | null;
|
|
1664
1710
|
directory: string | null;
|
|
1665
1711
|
extra: unknown | null;
|
|
1666
1712
|
projectID: string;
|
|
@@ -1867,6 +1913,7 @@ export type File = {
|
|
|
1867
1913
|
removed: number;
|
|
1868
1914
|
status: "added" | "deleted" | "modified";
|
|
1869
1915
|
};
|
|
1916
|
+
export type Event = EventProjectUpdated | EventServerInstanceDisposed | EventInstallationUpdated | EventInstallationUpdateAvailable | EventServerConnected | EventGlobalDisposed | EventGlobalConfigUpdated | EventFileEdited | EventFileWatcherUpdated | EventLspClientDiagnostics | EventLspUpdated | EventTuiPromptAppend | EventTuiCommandExecute | EventTuiToastShow | EventTuiSessionSelect | EventMcpToolsChanged | EventMcpBrowserOpenFailed | EventSessionNetworkAsked | EventSessionNetworkReplied | EventSessionNetworkRejected | EventSessionNetworkRestored | EventMessagePartDelta | EventSessionTurnOpen | EventSessionTurnClose | EventPermissionAsked | EventPermissionReplied | EventSessionDiff | EventSessionError | EventQuestionAsked | EventQuestionReplied | EventQuestionRejected | EventTodoUpdated | EventSessionStatus | EventSessionIdle | EventSuggestionShown | EventSuggestionAccepted | EventSuggestionDismissed | EventSessionCompacted | EventCommandExecuted | EventVcsBranchUpdated | EventKiloSessionsRemoteStatusChanged | EventWorktreeReady | EventWorktreeFailed | EventPtyCreated | EventPtyUpdated | EventPtyExited | EventPtyDeleted | EventWorkspaceReady | EventWorkspaceFailed | EventWorkspaceStatus | EventMessageUpdated | EventMessageRemoved | EventMessagePartUpdated | EventMessagePartRemoved | EventSessionCreated | EventSessionUpdated | EventSessionDeleted;
|
|
1870
1917
|
export type McpStatusConnected = {
|
|
1871
1918
|
status: "connected";
|
|
1872
1919
|
};
|
|
@@ -1976,19 +2023,6 @@ export type GlobalEventResponses = {
|
|
|
1976
2023
|
200: GlobalEvent;
|
|
1977
2024
|
};
|
|
1978
2025
|
export type GlobalEventResponse = GlobalEventResponses[keyof GlobalEventResponses];
|
|
1979
|
-
export type GlobalSyncEventSubscribeData = {
|
|
1980
|
-
body?: never;
|
|
1981
|
-
path?: never;
|
|
1982
|
-
query?: never;
|
|
1983
|
-
url: "/global/sync-event";
|
|
1984
|
-
};
|
|
1985
|
-
export type GlobalSyncEventSubscribeResponses = {
|
|
1986
|
-
/**
|
|
1987
|
-
* Event stream
|
|
1988
|
-
*/
|
|
1989
|
-
200: SyncEvent;
|
|
1990
|
-
};
|
|
1991
|
-
export type GlobalSyncEventSubscribeResponse = GlobalSyncEventSubscribeResponses[keyof GlobalSyncEventSubscribeResponses];
|
|
1992
2026
|
export type GlobalConfigGetData = {
|
|
1993
2027
|
body?: never;
|
|
1994
2028
|
path?: never;
|
|
@@ -2584,6 +2618,26 @@ export type ToolListResponses = {
|
|
|
2584
2618
|
200: ToolList;
|
|
2585
2619
|
};
|
|
2586
2620
|
export type ToolListResponse = ToolListResponses[keyof ToolListResponses];
|
|
2621
|
+
export type ExperimentalWorkspaceAdaptorListData = {
|
|
2622
|
+
body?: never;
|
|
2623
|
+
path?: never;
|
|
2624
|
+
query?: {
|
|
2625
|
+
directory?: string;
|
|
2626
|
+
workspace?: string;
|
|
2627
|
+
};
|
|
2628
|
+
url: "/experimental/workspace/adaptor";
|
|
2629
|
+
};
|
|
2630
|
+
export type ExperimentalWorkspaceAdaptorListResponses = {
|
|
2631
|
+
/**
|
|
2632
|
+
* Workspace adaptors
|
|
2633
|
+
*/
|
|
2634
|
+
200: Array<{
|
|
2635
|
+
type: string;
|
|
2636
|
+
name: string;
|
|
2637
|
+
description: string;
|
|
2638
|
+
}>;
|
|
2639
|
+
};
|
|
2640
|
+
export type ExperimentalWorkspaceAdaptorListResponse = ExperimentalWorkspaceAdaptorListResponses[keyof ExperimentalWorkspaceAdaptorListResponses];
|
|
2587
2641
|
export type ExperimentalWorkspaceListData = {
|
|
2588
2642
|
body?: never;
|
|
2589
2643
|
path?: never;
|
|
@@ -2628,6 +2682,26 @@ export type ExperimentalWorkspaceCreateResponses = {
|
|
|
2628
2682
|
200: Workspace;
|
|
2629
2683
|
};
|
|
2630
2684
|
export type ExperimentalWorkspaceCreateResponse = ExperimentalWorkspaceCreateResponses[keyof ExperimentalWorkspaceCreateResponses];
|
|
2685
|
+
export type ExperimentalWorkspaceStatusData = {
|
|
2686
|
+
body?: never;
|
|
2687
|
+
path?: never;
|
|
2688
|
+
query?: {
|
|
2689
|
+
directory?: string;
|
|
2690
|
+
workspace?: string;
|
|
2691
|
+
};
|
|
2692
|
+
url: "/experimental/workspace/status";
|
|
2693
|
+
};
|
|
2694
|
+
export type ExperimentalWorkspaceStatusResponses = {
|
|
2695
|
+
/**
|
|
2696
|
+
* Workspace status
|
|
2697
|
+
*/
|
|
2698
|
+
200: Array<{
|
|
2699
|
+
workspaceID: string;
|
|
2700
|
+
status: "connected" | "connecting" | "disconnected" | "error";
|
|
2701
|
+
error?: string;
|
|
2702
|
+
}>;
|
|
2703
|
+
};
|
|
2704
|
+
export type ExperimentalWorkspaceStatusResponse = ExperimentalWorkspaceStatusResponses[keyof ExperimentalWorkspaceStatusResponses];
|
|
2631
2705
|
export type ExperimentalWorkspaceRemoveData = {
|
|
2632
2706
|
body?: never;
|
|
2633
2707
|
path: {
|
|
@@ -3042,6 +3116,7 @@ export type SessionGetResponse = SessionGetResponses[keyof SessionGetResponses];
|
|
|
3042
3116
|
export type SessionUpdateData = {
|
|
3043
3117
|
body?: {
|
|
3044
3118
|
title?: string;
|
|
3119
|
+
permission?: PermissionRuleset;
|
|
3045
3120
|
time?: {
|
|
3046
3121
|
archived?: number;
|
|
3047
3122
|
};
|