shuvcode 2.0.0-alpha-8 → 2.0.0-alpha-10

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.
@@ -0,0 +1,18 @@
1
+ type Client = ReturnType<typeof import("./generated/client.js").make>;
2
+ export type AgentApi = Client["agent"];
3
+ export type CommandApi = Client["command"];
4
+ export type ConfigApi = Client["config"];
5
+ export type EventApi = Client["event"];
6
+ export type IntegrationApi = Client["integration"];
7
+ export type ModelApi = Client["model"];
8
+ export type PluginApi = Client["plugin"];
9
+ export type ProviderApi = Client["provider"];
10
+ export type ReferenceApi = Client["reference"];
11
+ export type WebSearchApi = Client["websearch"];
12
+ export type SessionApi = Client["session"];
13
+ export type SkillApi = Client["skill"];
14
+ export interface CatalogApi {
15
+ readonly provider: ProviderApi;
16
+ readonly model: ModelApi;
17
+ }
18
+ export {};
package/client/api.js ADDED
File without changes
@@ -0,0 +1,6 @@
1
+ export type ClientErrorReason = "Transport" | "UnexpectedStatus" | "UnsupportedContentType" | "MalformedResponse" | "SseEventTooLarge";
2
+ export declare class ClientError extends Error {
3
+ readonly reason: ClientErrorReason;
4
+ readonly name = "ClientError";
5
+ constructor(reason: ClientErrorReason, options?: ErrorOptions);
6
+ }
@@ -0,0 +1,8 @@
1
+ export class ClientError extends Error {
2
+ reason;
3
+ name = "ClientError";
4
+ constructor(reason, options) {
5
+ super(reason, options);
6
+ this.reason = reason;
7
+ }
8
+ }
@@ -0,0 +1,239 @@
1
+ import type { HealthStopInput, ServerGetOutput, LocationGetInput, LocationGetOutput, AgentListInput, AgentListOutput, AgentGetInput, AgentGetOutput, PluginListInput, PluginListOutput, SessionListInput, SessionCreateInput, SessionImportInput, SessionExportInput, SessionGetInput, SessionRemoveInput, SessionForkInput, SessionSwitchAgentInput, SessionSwitchModelInput, SessionRenameInput, SessionMoveInput, SessionPromptInput, SessionCommandInput, SessionSkillInput, SessionSyntheticInput, SessionShellInput, SessionCompactInput, SessionWaitInput, SessionRevertStageInput, SessionRevertClearInput, SessionRevertCommitInput, SessionContextInput, SessionPendingListInput, SessionPendingCancelInput, SessionPendingSteerInput, SessionPendingQueueInput, SessionInstructionsEntryListInput, SessionInstructionsEntryPutInput, SessionInstructionsEntryRemoveInput, SessionGenerateInput, SessionLogInput, SessionLogOutput, SessionInterruptInput, SessionBackgroundInput, SessionMessageInput, MessageListInput, ModelListInput, ModelListOutput, ModelDefaultInput, ModelDefaultOutput, GenerateTextInput, ProviderListInput, ProviderListOutput, ProviderGetInput, ProviderGetOutput, IntegrationListInput, IntegrationListOutput, IntegrationGetInput, IntegrationGetOutput, IntegrationWellknownAddInput, IntegrationConnectKeyInput, IntegrationOauthConnectInput, IntegrationOauthConnectOutput, IntegrationOauthStatusInput, IntegrationOauthStatusOutput, IntegrationOauthCompleteInput, IntegrationOauthCancelInput, IntegrationCommandConnectInput, IntegrationCommandConnectOutput, IntegrationCommandStatusInput, IntegrationCommandStatusOutput, IntegrationCommandCancelInput, AuthStatusInput, AuthStatusOutput, McpListInput, McpListOutput, McpAddInput, McpRemoveInput, McpConnectInput, McpDisconnectInput, McpResourceCatalogInput, McpResourceCatalogOutput, CredentialUpdateInput, CredentialRemoveInput, ProjectListOutput, ProjectCurrentInput, ProjectDirectoriesInput, FormRequestListInput, FormRequestListOutput, FormListInput, FormCreateInput, FormGetInput, FormStateInput, FormReplyInput, FormCancelInput, PermissionRequestListInput, PermissionRequestListOutput, PermissionSavedListInput, PermissionSavedRemoveInput, PermissionCreateInput, PermissionListInput, PermissionGetInput, PermissionReplyInput, FileReadInput, FileReadOutput, FileListInput, FileListOutput, FileFindInput, FileFindOutput, CommandListInput, CommandListOutput, SkillListInput, SkillListOutput, EventSubscribeOutput, PtyListInput, PtyListOutput, PtyCreateInput, PtyCreateOutput, PtyGetInput, PtyGetOutput, PtyUpdateInput, PtyUpdateOutput, PtyRemoveInput, ShellListInput, ShellListOutput, ShellCreateInput, ShellCreateOutput, ShellGetInput, ShellGetOutput, ShellTimeoutInput, ShellTimeoutOutput, ShellOutputInput, ShellOutputOutput, ShellRemoveInput, QuestionRequestListInput, QuestionRequestListOutput, QuestionListInput, QuestionReplyInput, QuestionRejectInput, ReferenceListInput, ReferenceListOutput, ProjectCopyCreateInput, ProjectCopyRemoveInput, ProjectCopyRefreshInput, VcsGetInput, VcsGetOutput, VcsStatusInput, VcsStatusOutput, VcsDiffInput, VcsDiffOutput, DebugLocationListOutput, DebugLocationEvictInput, MigrationV1StatusOutput, WebsearchProvidersInput, WebsearchProvidersOutput, WebsearchQueryInput, WebsearchQueryOutput, ConfigGetInput, ConfigGetOutput } from "./types";
2
+ export interface ClientOptions {
3
+ readonly baseUrl: string;
4
+ readonly fetch?: typeof globalThis.fetch;
5
+ readonly headers?: RequestInit["headers"];
6
+ }
7
+ export interface RequestOptions {
8
+ readonly signal?: AbortSignal;
9
+ readonly headers?: RequestInit["headers"];
10
+ }
11
+ export declare function make(options: ClientOptions): {
12
+ health: {
13
+ get: (requestOptions?: RequestOptions) => Promise<import("./types").ServiceHealth>;
14
+ stop: (input: HealthStopInput, requestOptions?: RequestOptions) => Promise<import("./types").ServiceStopResponse>;
15
+ };
16
+ server: {
17
+ get: (requestOptions?: RequestOptions) => Promise<ServerGetOutput>;
18
+ };
19
+ location: {
20
+ get: (input?: LocationGetInput, requestOptions?: RequestOptions) => Promise<LocationGetOutput>;
21
+ };
22
+ agent: {
23
+ list: (input?: AgentListInput, requestOptions?: RequestOptions) => Promise<AgentListOutput>;
24
+ get: (input: AgentGetInput, requestOptions?: RequestOptions) => Promise<AgentGetOutput>;
25
+ };
26
+ plugin: {
27
+ list: (input?: PluginListInput, requestOptions?: RequestOptions) => Promise<PluginListOutput>;
28
+ };
29
+ session: {
30
+ list: (input?: SessionListInput, requestOptions?: RequestOptions) => Promise<import("./types").SessionsResponse>;
31
+ create: (input?: SessionCreateInput, requestOptions?: RequestOptions) => Promise<import("./types").SessionInfo>;
32
+ import: (input: SessionImportInput, requestOptions?: RequestOptions) => Promise<import("./types").SessionInfo>;
33
+ export: (input: SessionExportInput, requestOptions?: RequestOptions) => Promise<import("./types").SessionTransferData>;
34
+ active: (requestOptions?: RequestOptions) => Promise<{
35
+ [x: string]: import("./types").SessionActive;
36
+ }>;
37
+ get: (input: SessionGetInput, requestOptions?: RequestOptions) => Promise<import("./types").SessionInfo>;
38
+ remove: (input: SessionRemoveInput, requestOptions?: RequestOptions) => Promise<void>;
39
+ fork: (input: SessionForkInput, requestOptions?: RequestOptions) => Promise<import("./types").SessionInfo>;
40
+ switchAgent: (input: SessionSwitchAgentInput, requestOptions?: RequestOptions) => Promise<void>;
41
+ switchModel: (input: SessionSwitchModelInput, requestOptions?: RequestOptions) => Promise<void>;
42
+ rename: (input: SessionRenameInput, requestOptions?: RequestOptions) => Promise<void>;
43
+ move: (input: SessionMoveInput, requestOptions?: RequestOptions) => Promise<void>;
44
+ prompt: (input: SessionPromptInput, requestOptions?: RequestOptions) => Promise<import("./types").SessionPendingUser>;
45
+ command: (input: SessionCommandInput, requestOptions?: RequestOptions) => Promise<import("./types").SessionPendingUser>;
46
+ skill: (input: SessionSkillInput, requestOptions?: RequestOptions) => Promise<void>;
47
+ synthetic: (input: SessionSyntheticInput, requestOptions?: RequestOptions) => Promise<import("./types").SessionPendingSynthetic>;
48
+ shell: (input: SessionShellInput, requestOptions?: RequestOptions) => Promise<void>;
49
+ compact: (input: SessionCompactInput, requestOptions?: RequestOptions) => Promise<import("./types").SessionPendingCompaction>;
50
+ wait: (input: SessionWaitInput, requestOptions?: RequestOptions) => Promise<void>;
51
+ revert: {
52
+ stage: (input: SessionRevertStageInput, requestOptions?: RequestOptions) => Promise<import("./types").SessionRevert>;
53
+ clear: (input: SessionRevertClearInput, requestOptions?: RequestOptions) => Promise<void>;
54
+ commit: (input: SessionRevertCommitInput, requestOptions?: RequestOptions) => Promise<void>;
55
+ };
56
+ context: (input: SessionContextInput, requestOptions?: RequestOptions) => Promise<import("./types").SessionMessageInfo[]>;
57
+ pending: {
58
+ list: (input: SessionPendingListInput, requestOptions?: RequestOptions) => Promise<import("./types").SessionPendingInfo[]>;
59
+ cancel: (input: SessionPendingCancelInput, requestOptions?: RequestOptions) => Promise<void>;
60
+ steer: (input: SessionPendingSteerInput, requestOptions?: RequestOptions) => Promise<void>;
61
+ queue: (input: SessionPendingQueueInput, requestOptions?: RequestOptions) => Promise<void>;
62
+ };
63
+ instructions: {
64
+ entry: {
65
+ list: (input: SessionInstructionsEntryListInput, requestOptions?: RequestOptions) => Promise<import("./types").InstructionEntryInfo[]>;
66
+ put: (input: SessionInstructionsEntryPutInput, requestOptions?: RequestOptions) => Promise<void>;
67
+ remove: (input: SessionInstructionsEntryRemoveInput, requestOptions?: RequestOptions) => Promise<void>;
68
+ };
69
+ };
70
+ generate: (input: SessionGenerateInput, requestOptions?: RequestOptions) => Promise<{
71
+ text: string;
72
+ }>;
73
+ log: (input: SessionLogInput, requestOptions?: RequestOptions) => AsyncIterable<SessionLogOutput>;
74
+ interrupt: (input: SessionInterruptInput, requestOptions?: RequestOptions) => Promise<void>;
75
+ background: (input: SessionBackgroundInput, requestOptions?: RequestOptions) => Promise<void>;
76
+ message: (input: SessionMessageInput, requestOptions?: RequestOptions) => Promise<import("./types").SessionMessageAgentSelected | import("./types").SessionMessageSynthetic | import("./types").SessionMessageSystem | import("./types").SessionMessageSkill | import("./types").SessionMessageShell | import("./types").SessionMessageCompactionRunning | import("./types").SessionMessageCompactionCompleted | import("./types").SessionMessageModelSelected | import("./types").SessionMessageCompactionFailed | import("./types").SessionMessageUser | import("./types").SessionMessageAssistant>;
77
+ };
78
+ message: {
79
+ list: (input: MessageListInput, requestOptions?: RequestOptions) => Promise<import("./types").SessionMessagesResponse>;
80
+ };
81
+ model: {
82
+ list: (input?: ModelListInput, requestOptions?: RequestOptions) => Promise<ModelListOutput>;
83
+ default: (input?: ModelDefaultInput, requestOptions?: RequestOptions) => Promise<ModelDefaultOutput>;
84
+ };
85
+ generate: {
86
+ text: (input: GenerateTextInput, requestOptions?: RequestOptions) => Promise<{
87
+ text: string;
88
+ }>;
89
+ };
90
+ provider: {
91
+ list: (input?: ProviderListInput, requestOptions?: RequestOptions) => Promise<ProviderListOutput>;
92
+ get: (input: ProviderGetInput, requestOptions?: RequestOptions) => Promise<ProviderGetOutput>;
93
+ };
94
+ integration: {
95
+ list: (input?: IntegrationListInput, requestOptions?: RequestOptions) => Promise<IntegrationListOutput>;
96
+ get: (input: IntegrationGetInput, requestOptions?: RequestOptions) => Promise<IntegrationGetOutput>;
97
+ wellknown: {
98
+ add: (input: IntegrationWellknownAddInput, requestOptions?: RequestOptions) => Promise<void>;
99
+ };
100
+ connect: {
101
+ key: (input: IntegrationConnectKeyInput, requestOptions?: RequestOptions) => Promise<void>;
102
+ };
103
+ oauth: {
104
+ connect: (input: IntegrationOauthConnectInput, requestOptions?: RequestOptions) => Promise<IntegrationOauthConnectOutput>;
105
+ status: (input: IntegrationOauthStatusInput, requestOptions?: RequestOptions) => Promise<IntegrationOauthStatusOutput>;
106
+ complete: (input: IntegrationOauthCompleteInput, requestOptions?: RequestOptions) => Promise<void>;
107
+ cancel: (input: IntegrationOauthCancelInput, requestOptions?: RequestOptions) => Promise<void>;
108
+ };
109
+ command: {
110
+ connect: (input: IntegrationCommandConnectInput, requestOptions?: RequestOptions) => Promise<IntegrationCommandConnectOutput>;
111
+ status: (input: IntegrationCommandStatusInput, requestOptions?: RequestOptions) => Promise<IntegrationCommandStatusOutput>;
112
+ cancel: (input: IntegrationCommandCancelInput, requestOptions?: RequestOptions) => Promise<void>;
113
+ };
114
+ };
115
+ auth: {
116
+ status: (input?: AuthStatusInput, requestOptions?: RequestOptions) => Promise<AuthStatusOutput>;
117
+ };
118
+ mcp: {
119
+ list: (input?: McpListInput, requestOptions?: RequestOptions) => Promise<McpListOutput>;
120
+ add: (input: McpAddInput, requestOptions?: RequestOptions) => Promise<void>;
121
+ remove: (input: McpRemoveInput, requestOptions?: RequestOptions) => Promise<void>;
122
+ connect: (input: McpConnectInput, requestOptions?: RequestOptions) => Promise<void>;
123
+ disconnect: (input: McpDisconnectInput, requestOptions?: RequestOptions) => Promise<void>;
124
+ resource: {
125
+ catalog: (input?: McpResourceCatalogInput, requestOptions?: RequestOptions) => Promise<McpResourceCatalogOutput>;
126
+ };
127
+ };
128
+ credential: {
129
+ update: (input: CredentialUpdateInput, requestOptions?: RequestOptions) => Promise<void>;
130
+ remove: (input: CredentialRemoveInput, requestOptions?: RequestOptions) => Promise<void>;
131
+ };
132
+ project: {
133
+ list: (requestOptions?: RequestOptions) => Promise<ProjectListOutput>;
134
+ current: (input?: ProjectCurrentInput, requestOptions?: RequestOptions) => Promise<import("./types").ProjectCurrent>;
135
+ directories: (input: ProjectDirectoriesInput, requestOptions?: RequestOptions) => Promise<import("./types").ProjectDirectories>;
136
+ };
137
+ form: {
138
+ request: {
139
+ list: (input?: FormRequestListInput, requestOptions?: RequestOptions) => Promise<FormRequestListOutput>;
140
+ };
141
+ list: (input: FormListInput, requestOptions?: RequestOptions) => Promise<import("./types").FormInfo[]>;
142
+ create: (input: FormCreateInput, requestOptions?: RequestOptions) => Promise<import("./types").FormInfo>;
143
+ get: (input: FormGetInput, requestOptions?: RequestOptions) => Promise<import("./types").FormInfo>;
144
+ state: (input: FormStateInput, requestOptions?: RequestOptions) => Promise<{
145
+ status: "pending";
146
+ } | {
147
+ status: "answered";
148
+ answer: import("./types").FormAnswer;
149
+ } | {
150
+ status: "cancelled";
151
+ }>;
152
+ reply: (input: FormReplyInput, requestOptions?: RequestOptions) => Promise<void>;
153
+ cancel: (input: FormCancelInput, requestOptions?: RequestOptions) => Promise<void>;
154
+ };
155
+ permission: {
156
+ request: {
157
+ list: (input?: PermissionRequestListInput, requestOptions?: RequestOptions) => Promise<PermissionRequestListOutput>;
158
+ };
159
+ saved: {
160
+ list: (input?: PermissionSavedListInput, requestOptions?: RequestOptions) => Promise<import("./types").PermissionSavedInfo[]>;
161
+ remove: (input: PermissionSavedRemoveInput, requestOptions?: RequestOptions) => Promise<void>;
162
+ };
163
+ create: (input: PermissionCreateInput, requestOptions?: RequestOptions) => Promise<{
164
+ id: string;
165
+ effect: import("./types").PermissionEffect;
166
+ }>;
167
+ list: (input: PermissionListInput, requestOptions?: RequestOptions) => Promise<import("./types").PermissionRequest[]>;
168
+ get: (input: PermissionGetInput, requestOptions?: RequestOptions) => Promise<import("./types").PermissionRequest>;
169
+ reply: (input: PermissionReplyInput, requestOptions?: RequestOptions) => Promise<void>;
170
+ };
171
+ file: {
172
+ read: (input: FileReadInput, requestOptions?: RequestOptions) => Promise<FileReadOutput>;
173
+ list: (input?: FileListInput, requestOptions?: RequestOptions) => Promise<FileListOutput>;
174
+ find: (input: FileFindInput, requestOptions?: RequestOptions) => Promise<FileFindOutput>;
175
+ };
176
+ command: {
177
+ list: (input?: CommandListInput, requestOptions?: RequestOptions) => Promise<CommandListOutput>;
178
+ };
179
+ skill: {
180
+ list: (input?: SkillListInput, requestOptions?: RequestOptions) => Promise<SkillListOutput>;
181
+ };
182
+ event: {
183
+ subscribe: (requestOptions?: RequestOptions) => AsyncIterable<EventSubscribeOutput>;
184
+ };
185
+ pty: {
186
+ list: (input?: PtyListInput, requestOptions?: RequestOptions) => Promise<PtyListOutput>;
187
+ create: (input?: PtyCreateInput, requestOptions?: RequestOptions) => Promise<PtyCreateOutput>;
188
+ get: (input: PtyGetInput, requestOptions?: RequestOptions) => Promise<PtyGetOutput>;
189
+ update: (input: PtyUpdateInput, requestOptions?: RequestOptions) => Promise<PtyUpdateOutput>;
190
+ remove: (input: PtyRemoveInput, requestOptions?: RequestOptions) => Promise<void>;
191
+ };
192
+ shell: {
193
+ list: (input?: ShellListInput, requestOptions?: RequestOptions) => Promise<ShellListOutput>;
194
+ create: (input: ShellCreateInput, requestOptions?: RequestOptions) => Promise<ShellCreateOutput>;
195
+ get: (input: ShellGetInput, requestOptions?: RequestOptions) => Promise<ShellGetOutput>;
196
+ timeout: (input: ShellTimeoutInput, requestOptions?: RequestOptions) => Promise<ShellTimeoutOutput>;
197
+ output: (input: ShellOutputInput, requestOptions?: RequestOptions) => Promise<ShellOutputOutput>;
198
+ remove: (input: ShellRemoveInput, requestOptions?: RequestOptions) => Promise<void>;
199
+ };
200
+ question: {
201
+ request: {
202
+ list: (input?: QuestionRequestListInput, requestOptions?: RequestOptions) => Promise<QuestionRequestListOutput>;
203
+ };
204
+ list: (input: QuestionListInput, requestOptions?: RequestOptions) => Promise<import("./types").QuestionRequest[]>;
205
+ reply: (input: QuestionReplyInput, requestOptions?: RequestOptions) => Promise<void>;
206
+ reject: (input: QuestionRejectInput, requestOptions?: RequestOptions) => Promise<void>;
207
+ };
208
+ reference: {
209
+ list: (input?: ReferenceListInput, requestOptions?: RequestOptions) => Promise<ReferenceListOutput>;
210
+ };
211
+ projectCopy: {
212
+ create: (input: ProjectCopyCreateInput, requestOptions?: RequestOptions) => Promise<import("./types").ProjectCopyCopy>;
213
+ remove: (input: ProjectCopyRemoveInput, requestOptions?: RequestOptions) => Promise<void>;
214
+ refresh: (input: ProjectCopyRefreshInput, requestOptions?: RequestOptions) => Promise<void>;
215
+ };
216
+ vcs: {
217
+ get: (input?: VcsGetInput, requestOptions?: RequestOptions) => Promise<VcsGetOutput>;
218
+ status: (input?: VcsStatusInput, requestOptions?: RequestOptions) => Promise<VcsStatusOutput>;
219
+ diff: (input: VcsDiffInput, requestOptions?: RequestOptions) => Promise<VcsDiffOutput>;
220
+ };
221
+ debug: {
222
+ location: {
223
+ list: (requestOptions?: RequestOptions) => Promise<DebugLocationListOutput>;
224
+ evict: (input?: DebugLocationEvictInput, requestOptions?: RequestOptions) => Promise<void>;
225
+ };
226
+ };
227
+ migration: {
228
+ v1: {
229
+ status: (requestOptions?: RequestOptions) => Promise<MigrationV1StatusOutput>;
230
+ };
231
+ };
232
+ websearch: {
233
+ providers: (input?: WebsearchProvidersInput, requestOptions?: RequestOptions) => Promise<WebsearchProvidersOutput>;
234
+ query: (input: WebsearchQueryInput, requestOptions?: RequestOptions) => Promise<WebsearchQueryOutput>;
235
+ };
236
+ config: {
237
+ get: (input?: ConfigGetInput, requestOptions?: RequestOptions) => Promise<ConfigGetOutput>;
238
+ };
239
+ };