shuvcode 2.0.0-alpha-7 → 2.0.0-alpha-9

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