shuvcode 2.0.0-alpha-16 → 2.0.0-alpha-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/client/api.d.ts +3 -0
- package/client/generated/client.d.ts +34 -4
- package/client/generated/client.js +205 -19
- package/client/generated/types.d.ts +1914 -1075
- package/client/generated/types.js +2 -1
- package/client/index.js +3 -3
- package/client/service.js +17 -4
- package/package.json +13 -13
package/client/api.d.ts
CHANGED
|
@@ -3,15 +3,18 @@ export type AgentApi = Client["agent"];
|
|
|
3
3
|
export type CommandApi = Client["command"];
|
|
4
4
|
export type ConfigApi = Client["config"];
|
|
5
5
|
export type EventApi = Client["event"];
|
|
6
|
+
export type GenerateApi = Client["generate"];
|
|
6
7
|
export type IntegrationApi = Client["integration"];
|
|
7
8
|
export type McpApi = Client["mcp"];
|
|
8
9
|
export type ModelApi = Client["model"];
|
|
9
10
|
export type PluginApi = Client["plugin"];
|
|
11
|
+
export type PermissionApi = Client["permission"];
|
|
10
12
|
export type ProviderApi = Client["provider"];
|
|
11
13
|
export type ReferenceApi = Client["reference"];
|
|
12
14
|
export type WebSearchApi = Client["websearch"];
|
|
13
15
|
export type SessionApi = Client["session"];
|
|
14
16
|
export type SkillApi = Client["skill"];
|
|
17
|
+
export type VcsApi = Client["vcs"];
|
|
15
18
|
export interface CatalogApi {
|
|
16
19
|
readonly provider: ProviderApi;
|
|
17
20
|
readonly model: ModelApi;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { 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, SessionInboxListInput, SessionInboxCancelInput, SessionInboxSteerInput, SessionInboxQueueInput, SessionInstructionsEntryListInput, SessionInstructionsEntryPutInput, SessionInstructionsEntryRemoveInput, SessionGenerateInput, SessionLogInput, SessionLogOutput, SessionInterruptInput, SessionBackgroundInput, SessionMessageInput, SessionEnvironmentInput, SessionViewInput, 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, 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, PtyConnectTokenInput, PtyConnectTokenOutput, ShellListInput, ShellListOutput, ShellCreateInput, ShellCreateOutput, ShellGetInput, ShellGetOutput, ShellTimeoutInput, ShellTimeoutOutput, ShellOutputInput, ShellOutputOutput, ShellRemoveInput, ReferenceListInput, ReferenceListOutput, WorktreeListInput, WorktreeCreateInput, WorktreeRemoveInput, WorktreeRefreshInput, VcsGetInput, VcsGetOutput, VcsStatusInput, VcsStatusOutput, VcsDiffInput, VcsDiffOutput, DebugLocationListOutput, DebugLocationEvictInput, MigrationV1StatusOutput, WebsearchProvidersInput, WebsearchProvidersOutput, WebsearchQueryInput, WebsearchQueryOutput, ConfigGetInput, ConfigGetOutput } from "./types.js";
|
|
1
|
+
import type { ServerGetOutput, LocationGetInput, LocationGetOutput, AgentListInput, AgentListOutput, AgentGetInput, AgentGetOutput, PluginListInput, PluginListOutput, SessionListInput, SessionStatsInput, SessionCreateInput, SessionImportInput, SessionExportInput, SessionGetInput, SessionRemoveInput, SessionForkInput, SessionSwitchAgentInput, SessionSwitchModelInput, SessionRenameInput, SessionMoveInput, SessionPromptInput, SessionCommandInput, SessionSkillInput, SessionSyntheticInput, SessionShellInput, SessionCompactInput, SessionWaitInput, SessionRevertStageInput, SessionRevertClearInput, SessionRevertCommitInput, SessionContextInput, SessionInboxListInput, SessionInboxCancelInput, SessionInboxSteerInput, SessionInboxQueueInput, SessionInstructionsEntryListInput, SessionInstructionsEntryPutInput, SessionInstructionsEntryRemoveInput, SessionToolsPutInput, SessionToolsListInput, SessionToolsCallsInput, SessionToolsReplyInput, SessionGenerateInput, SessionLogInput, SessionLogOutput, SessionInterruptInput, SessionBackgroundInput, SessionMessageInput, SessionMessageUpdateInput, SessionEnvironmentInput, SessionViewInput, 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, CredentialActivateInput, CredentialRemoveInput, ProjectListOutput, ProjectUpdateInput, ProjectCurrentInput, 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, PtyConnectTokenInput, PtyConnectTokenOutput, ExperimentalPersistentPtyReadInput, ExperimentalPersistentPtyListInput, ExperimentalPersistentPtyCreateInput, ExperimentalPersistentPtyHandoffOutput, ExperimentalPersistentPtyGetInput, ExperimentalPersistentPtyUpdateInput, ExperimentalPersistentPtySnapshotInput, ExperimentalPersistentPtyRemoveInput, ExperimentalPersistentPtyConnectTokenInput, ShellListInput, ShellListOutput, ShellCreateInput, ShellCreateOutput, ShellGetInput, ShellGetOutput, ShellTimeoutInput, ShellTimeoutOutput, ShellOutputInput, ShellOutputOutput, ShellRemoveInput, ReferenceListInput, ReferenceListOutput, WorktreeListInput, WorktreeCreateInput, WorktreeRemoveInput, WorktreeRefreshInput, WorkspaceCreateInput, WorkspaceDestroyInput, VcsGetInput, VcsGetOutput, VcsBaseInput, VcsBaseOutput, VcsStatusInput, VcsStatusOutput, VcsBranchesInput, VcsBranchesOutput, VcsDiffInput, VcsDiffOutput, DebugLocationListOutput, DebugLocationEvictInput, MigrationV1StatusOutput, WebsearchProvidersInput, WebsearchProvidersOutput, WebsearchQueryInput, WebsearchQueryOutput, ConfigGetInput, ConfigGetOutput } from "./types.js";
|
|
2
2
|
export interface ClientOptions {
|
|
3
3
|
readonly baseUrl: string;
|
|
4
4
|
readonly fetch?: typeof globalThis.fetch;
|
|
@@ -27,6 +27,7 @@ export declare function make(options: ClientOptions): {
|
|
|
27
27
|
};
|
|
28
28
|
session: {
|
|
29
29
|
list: (input?: SessionListInput, requestOptions?: RequestOptions) => Promise<import("./types.js").SessionsResponse>;
|
|
30
|
+
stats: (input?: SessionStatsInput, requestOptions?: RequestOptions) => Promise<import("./types.js").SessionStatsInfo>;
|
|
30
31
|
create: (input?: SessionCreateInput, requestOptions?: RequestOptions) => Promise<import("./types.js").SessionInfo>;
|
|
31
32
|
import: (input: SessionImportInput, requestOptions?: RequestOptions) => Promise<import("./types.js").SessionInfo>;
|
|
32
33
|
export: (input: SessionExportInput, requestOptions?: RequestOptions) => Promise<import("./types.js").SessionTransferData>;
|
|
@@ -41,7 +42,7 @@ export declare function make(options: ClientOptions): {
|
|
|
41
42
|
rename: (input: SessionRenameInput, requestOptions?: RequestOptions) => Promise<void>;
|
|
42
43
|
move: (input: SessionMoveInput, requestOptions?: RequestOptions) => Promise<void>;
|
|
43
44
|
prompt: (input: SessionPromptInput, requestOptions?: RequestOptions) => Promise<import("./types.js").SessionInboxUser>;
|
|
44
|
-
command: (input: SessionCommandInput, requestOptions?: RequestOptions) => Promise<
|
|
45
|
+
command: (input: SessionCommandInput, requestOptions?: RequestOptions) => Promise<void>;
|
|
45
46
|
skill: (input: SessionSkillInput, requestOptions?: RequestOptions) => Promise<void>;
|
|
46
47
|
synthetic: (input: SessionSyntheticInput, requestOptions?: RequestOptions) => Promise<import("./types.js").SessionInboxSynthetic>;
|
|
47
48
|
shell: (input: SessionShellInput, requestOptions?: RequestOptions) => Promise<void>;
|
|
@@ -66,13 +67,20 @@ export declare function make(options: ClientOptions): {
|
|
|
66
67
|
remove: (input: SessionInstructionsEntryRemoveInput, requestOptions?: RequestOptions) => Promise<void>;
|
|
67
68
|
};
|
|
68
69
|
};
|
|
70
|
+
tools: {
|
|
71
|
+
put: (input: SessionToolsPutInput, requestOptions?: RequestOptions) => Promise<void>;
|
|
72
|
+
list: (input: SessionToolsListInput, requestOptions?: RequestOptions) => Promise<import("./types.js").SessionDynamicToolDefinition[]>;
|
|
73
|
+
calls: (input: SessionToolsCallsInput, requestOptions?: RequestOptions) => Promise<import("./types.js").SessionDynamicToolCall[]>;
|
|
74
|
+
reply: (input: SessionToolsReplyInput, requestOptions?: RequestOptions) => Promise<void>;
|
|
75
|
+
};
|
|
69
76
|
generate: (input: SessionGenerateInput, requestOptions?: RequestOptions) => Promise<{
|
|
70
77
|
text: string;
|
|
71
78
|
}>;
|
|
72
79
|
log: (input: SessionLogInput, requestOptions?: RequestOptions) => AsyncIterable<SessionLogOutput>;
|
|
73
|
-
interrupt: (input: SessionInterruptInput, requestOptions?: RequestOptions) => Promise<
|
|
80
|
+
interrupt: (input: SessionInterruptInput, requestOptions?: RequestOptions) => Promise<import("./types.js").SessionInterruptResponse>;
|
|
74
81
|
background: (input: SessionBackgroundInput, requestOptions?: RequestOptions) => Promise<void>;
|
|
75
|
-
message: (input: SessionMessageInput, requestOptions?: RequestOptions) => Promise<import("./types.js").SessionMessageAgentSelected | import("./types.js").
|
|
82
|
+
message: (input: SessionMessageInput, requestOptions?: RequestOptions) => Promise<import("./types.js").SessionMessageAgentSelected | import("./types.js").SessionMessageSynthetic | import("./types.js").SessionMessageSystem | import("./types.js").SessionMessageSkill | import("./types.js").SessionMessageShell | import("./types.js").SessionMessageCompactionRunning | import("./types.js").SessionMessageCompactionCompleted | import("./types.js").SessionMessageLocationSwitched | import("./types.js").SessionMessageModelSelected | import("./types.js").SessionMessageCompactionFailed | import("./types.js").SessionMessageUser | import("./types.js").SessionMessageAssistant>;
|
|
83
|
+
messageUpdate: (input: SessionMessageUpdateInput, requestOptions?: RequestOptions) => Promise<import("./types.js").SessionMessageAssistant>;
|
|
76
84
|
environment: (input: SessionEnvironmentInput, requestOptions?: RequestOptions) => Promise<void>;
|
|
77
85
|
view: (input: SessionViewInput, requestOptions?: RequestOptions) => Promise<void>;
|
|
78
86
|
};
|
|
@@ -128,10 +136,12 @@ export declare function make(options: ClientOptions): {
|
|
|
128
136
|
};
|
|
129
137
|
credential: {
|
|
130
138
|
update: (input: CredentialUpdateInput, requestOptions?: RequestOptions) => Promise<void>;
|
|
139
|
+
activate: (input: CredentialActivateInput, requestOptions?: RequestOptions) => Promise<void>;
|
|
131
140
|
remove: (input: CredentialRemoveInput, requestOptions?: RequestOptions) => Promise<void>;
|
|
132
141
|
};
|
|
133
142
|
project: {
|
|
134
143
|
list: (requestOptions?: RequestOptions) => Promise<ProjectListOutput>;
|
|
144
|
+
update: (input: ProjectUpdateInput, requestOptions?: RequestOptions) => Promise<import("./types.js").Project>;
|
|
135
145
|
current: (input?: ProjectCurrentInput, requestOptions?: RequestOptions) => Promise<import("./types.js").ProjectCurrent>;
|
|
136
146
|
};
|
|
137
147
|
form: {
|
|
@@ -192,6 +202,20 @@ export declare function make(options: ClientOptions): {
|
|
|
192
202
|
token: (input: PtyConnectTokenInput, requestOptions?: RequestOptions) => Promise<PtyConnectTokenOutput>;
|
|
193
203
|
};
|
|
194
204
|
};
|
|
205
|
+
experimental: {
|
|
206
|
+
persistentPty: {
|
|
207
|
+
read: (input: ExperimentalPersistentPtyReadInput, requestOptions?: RequestOptions) => Promise<import("./types.js").PersistentPtyReadResult | null>;
|
|
208
|
+
list: (input: ExperimentalPersistentPtyListInput, requestOptions?: RequestOptions) => Promise<import("./types.js").PersistentPtyInfo[]>;
|
|
209
|
+
create: (input: ExperimentalPersistentPtyCreateInput, requestOptions?: RequestOptions) => Promise<import("./types.js").PersistentPtyInfo>;
|
|
210
|
+
shutdown: (requestOptions?: RequestOptions) => Promise<void>;
|
|
211
|
+
handoff: (requestOptions?: RequestOptions) => Promise<ExperimentalPersistentPtyHandoffOutput>;
|
|
212
|
+
get: (input: ExperimentalPersistentPtyGetInput, requestOptions?: RequestOptions) => Promise<import("./types.js").PersistentPtyInfo>;
|
|
213
|
+
update: (input: ExperimentalPersistentPtyUpdateInput, requestOptions?: RequestOptions) => Promise<import("./types.js").PersistentPtyInfo>;
|
|
214
|
+
snapshot: (input: ExperimentalPersistentPtySnapshotInput, requestOptions?: RequestOptions) => Promise<import("./types.js").PersistentPtySnapshot>;
|
|
215
|
+
remove: (input: ExperimentalPersistentPtyRemoveInput, requestOptions?: RequestOptions) => Promise<void>;
|
|
216
|
+
connectToken: (input: ExperimentalPersistentPtyConnectTokenInput, requestOptions?: RequestOptions) => Promise<import("./types.js").PtyTicketConnectToken>;
|
|
217
|
+
};
|
|
218
|
+
};
|
|
195
219
|
shell: {
|
|
196
220
|
list: (input?: ShellListInput, requestOptions?: RequestOptions) => Promise<ShellListOutput>;
|
|
197
221
|
create: (input: ShellCreateInput, requestOptions?: RequestOptions) => Promise<ShellCreateOutput>;
|
|
@@ -209,9 +233,15 @@ export declare function make(options: ClientOptions): {
|
|
|
209
233
|
remove: (input: WorktreeRemoveInput, requestOptions?: RequestOptions) => Promise<void>;
|
|
210
234
|
refresh: (input: WorktreeRefreshInput, requestOptions?: RequestOptions) => Promise<void>;
|
|
211
235
|
};
|
|
236
|
+
workspace: {
|
|
237
|
+
create: (input: WorkspaceCreateInput, requestOptions?: RequestOptions) => Promise<string>;
|
|
238
|
+
destroy: (input: WorkspaceDestroyInput, requestOptions?: RequestOptions) => Promise<import("./types.js").WorkspaceDestroyResult>;
|
|
239
|
+
};
|
|
212
240
|
vcs: {
|
|
213
241
|
get: (input?: VcsGetInput, requestOptions?: RequestOptions) => Promise<VcsGetOutput>;
|
|
242
|
+
base: (input?: VcsBaseInput, requestOptions?: RequestOptions) => Promise<VcsBaseOutput>;
|
|
214
243
|
status: (input?: VcsStatusInput, requestOptions?: RequestOptions) => Promise<VcsStatusOutput>;
|
|
244
|
+
branches: (input?: VcsBranchesInput, requestOptions?: RequestOptions) => Promise<VcsBranchesOutput>;
|
|
215
245
|
diff: (input: VcsDiffInput, requestOptions?: RequestOptions) => Promise<VcsDiffOutput>;
|
|
216
246
|
};
|
|
217
247
|
debug: {
|
|
@@ -190,6 +190,20 @@ export function make(options) {
|
|
|
190
190
|
declaredStatuses: [400, 401],
|
|
191
191
|
empty: false,
|
|
192
192
|
}, requestOptions),
|
|
193
|
+
stats: (input, requestOptions) => request({
|
|
194
|
+
method: "GET",
|
|
195
|
+
path: `/api/session/stats`,
|
|
196
|
+
query: {
|
|
197
|
+
from: input?.["from"],
|
|
198
|
+
to: input?.["to"],
|
|
199
|
+
project: input?.["project"],
|
|
200
|
+
timezone: input?.["timezone"],
|
|
201
|
+
tools: input?.["tools"],
|
|
202
|
+
},
|
|
203
|
+
successStatus: 200,
|
|
204
|
+
declaredStatuses: [400, 401],
|
|
205
|
+
empty: false,
|
|
206
|
+
}, requestOptions).then((value) => value.data),
|
|
193
207
|
create: (input, requestOptions) => request({
|
|
194
208
|
method: "POST",
|
|
195
209
|
path: `/api/session`,
|
|
@@ -200,9 +214,11 @@ export function make(options) {
|
|
|
200
214
|
model: input?.["model"],
|
|
201
215
|
location: input?.["location"],
|
|
202
216
|
policy: input?.["policy"],
|
|
217
|
+
metadata: input?.["metadata"],
|
|
218
|
+
tools: input?.["tools"],
|
|
203
219
|
},
|
|
204
220
|
successStatus: 200,
|
|
205
|
-
declaredStatuses: [
|
|
221
|
+
declaredStatuses: [400, 401],
|
|
206
222
|
empty: false,
|
|
207
223
|
}, requestOptions).then((value) => value.data),
|
|
208
224
|
import: (input, requestOptions) => request({
|
|
@@ -210,7 +226,7 @@ export function make(options) {
|
|
|
210
226
|
path: `/api/session/import`,
|
|
211
227
|
body: { info: input["info"], messages: input["messages"], location: input["location"] },
|
|
212
228
|
successStatus: 200,
|
|
213
|
-
declaredStatuses: [409, 401, 400],
|
|
229
|
+
declaredStatuses: [409, 404, 401, 400],
|
|
214
230
|
empty: false,
|
|
215
231
|
}, requestOptions).then((value) => value.data),
|
|
216
232
|
export: (input, requestOptions) => request({
|
|
@@ -245,7 +261,7 @@ export function make(options) {
|
|
|
245
261
|
fork: (input, requestOptions) => request({
|
|
246
262
|
method: "POST",
|
|
247
263
|
path: `/api/session/${encodeURIComponent(input.sessionID)}/fork`,
|
|
248
|
-
body: { boundary: input["boundary"], policy: input["policy"] },
|
|
264
|
+
body: { boundary: input["boundary"], policy: input["policy"], tools: input["tools"] },
|
|
249
265
|
successStatus: 200,
|
|
250
266
|
declaredStatuses: [404, 400, 401],
|
|
251
267
|
empty: false,
|
|
@@ -303,21 +319,17 @@ export function make(options) {
|
|
|
303
319
|
method: "POST",
|
|
304
320
|
path: `/api/session/${encodeURIComponent(input.sessionID)}/command`,
|
|
305
321
|
body: {
|
|
306
|
-
id: input["id"],
|
|
307
322
|
command: input["command"],
|
|
308
|
-
|
|
309
|
-
agent: input["agent"],
|
|
310
|
-
model: input["model"],
|
|
323
|
+
text: input["text"],
|
|
311
324
|
files: input["files"],
|
|
312
325
|
agents: input["agents"],
|
|
313
326
|
skills: input["skills"],
|
|
314
327
|
delivery: input["delivery"],
|
|
315
|
-
resume: input["resume"],
|
|
316
328
|
},
|
|
317
|
-
successStatus:
|
|
318
|
-
declaredStatuses: [
|
|
319
|
-
empty:
|
|
320
|
-
}, requestOptions)
|
|
329
|
+
successStatus: 204,
|
|
330
|
+
declaredStatuses: [404, 500, 400, 401],
|
|
331
|
+
empty: true,
|
|
332
|
+
}, requestOptions),
|
|
321
333
|
skill: (input, requestOptions) => request({
|
|
322
334
|
method: "POST",
|
|
323
335
|
path: `/api/session/${encodeURIComponent(input.sessionID)}/skill`,
|
|
@@ -451,6 +463,38 @@ export function make(options) {
|
|
|
451
463
|
}, requestOptions),
|
|
452
464
|
},
|
|
453
465
|
},
|
|
466
|
+
tools: {
|
|
467
|
+
put: (input, requestOptions) => request({
|
|
468
|
+
method: "PUT",
|
|
469
|
+
path: `/api/session/${encodeURIComponent(input.sessionID)}/tools`,
|
|
470
|
+
body: { tools: input["tools"] },
|
|
471
|
+
successStatus: 204,
|
|
472
|
+
declaredStatuses: [404, 400, 401],
|
|
473
|
+
empty: true,
|
|
474
|
+
}, requestOptions),
|
|
475
|
+
list: (input, requestOptions) => request({
|
|
476
|
+
method: "GET",
|
|
477
|
+
path: `/api/session/${encodeURIComponent(input.sessionID)}/tools`,
|
|
478
|
+
successStatus: 200,
|
|
479
|
+
declaredStatuses: [404, 400, 401],
|
|
480
|
+
empty: false,
|
|
481
|
+
}, requestOptions).then((value) => value.data),
|
|
482
|
+
calls: (input, requestOptions) => request({
|
|
483
|
+
method: "GET",
|
|
484
|
+
path: `/api/session/${encodeURIComponent(input.sessionID)}/tools/calls`,
|
|
485
|
+
successStatus: 200,
|
|
486
|
+
declaredStatuses: [404, 400, 401],
|
|
487
|
+
empty: false,
|
|
488
|
+
}, requestOptions).then((value) => value.data),
|
|
489
|
+
reply: (input, requestOptions) => request({
|
|
490
|
+
method: "POST",
|
|
491
|
+
path: `/api/session/${encodeURIComponent(input.sessionID)}/tools/calls/${encodeURIComponent(input.callID)}/reply`,
|
|
492
|
+
body: input["payload"],
|
|
493
|
+
successStatus: 204,
|
|
494
|
+
declaredStatuses: [404, 409, 400, 401],
|
|
495
|
+
empty: true,
|
|
496
|
+
}, requestOptions),
|
|
497
|
+
},
|
|
454
498
|
generate: (input, requestOptions) => request({
|
|
455
499
|
method: "POST",
|
|
456
500
|
path: `/api/session/${encodeURIComponent(input.sessionID)}/generate`,
|
|
@@ -471,9 +515,9 @@ export function make(options) {
|
|
|
471
515
|
method: "POST",
|
|
472
516
|
path: `/api/session/${encodeURIComponent(input.sessionID)}/interrupt`,
|
|
473
517
|
query: { continue: input["continue"] },
|
|
474
|
-
successStatus:
|
|
518
|
+
successStatus: 200,
|
|
475
519
|
declaredStatuses: [404, 400, 401],
|
|
476
|
-
empty:
|
|
520
|
+
empty: false,
|
|
477
521
|
}, requestOptions),
|
|
478
522
|
background: (input, requestOptions) => request({
|
|
479
523
|
method: "POST",
|
|
@@ -489,6 +533,14 @@ export function make(options) {
|
|
|
489
533
|
declaredStatuses: [404, 401, 400],
|
|
490
534
|
empty: false,
|
|
491
535
|
}, requestOptions).then((value) => value.data),
|
|
536
|
+
messageUpdate: (input, requestOptions) => request({
|
|
537
|
+
method: "PATCH",
|
|
538
|
+
path: `/api/session/${encodeURIComponent(input.sessionID)}/message/${encodeURIComponent(input.messageID)}`,
|
|
539
|
+
body: { content: input["content"] },
|
|
540
|
+
successStatus: 200,
|
|
541
|
+
declaredStatuses: [404, 400, 409, 401],
|
|
542
|
+
empty: false,
|
|
543
|
+
}, requestOptions).then((value) => value.data),
|
|
492
544
|
environment: (input, requestOptions) => request({
|
|
493
545
|
method: "PUT",
|
|
494
546
|
path: `/api/session/${encodeURIComponent(input.sessionID)}/environment`,
|
|
@@ -538,7 +590,6 @@ export function make(options) {
|
|
|
538
590
|
text: (input, requestOptions) => request({
|
|
539
591
|
method: "POST",
|
|
540
592
|
path: `/api/generate`,
|
|
541
|
-
query: { location: input["location"] },
|
|
542
593
|
body: { prompt: input["prompt"], model: input["model"] },
|
|
543
594
|
successStatus: 200,
|
|
544
595
|
declaredStatuses: [400, 503, 401],
|
|
@@ -739,6 +790,14 @@ export function make(options) {
|
|
|
739
790
|
declaredStatuses: [401, 400],
|
|
740
791
|
empty: true,
|
|
741
792
|
}, requestOptions),
|
|
793
|
+
activate: (input, requestOptions) => request({
|
|
794
|
+
method: "POST",
|
|
795
|
+
path: `/api/credential/${encodeURIComponent(input.credentialID)}/activate`,
|
|
796
|
+
query: { location: input["location"] },
|
|
797
|
+
successStatus: 204,
|
|
798
|
+
declaredStatuses: [401, 400],
|
|
799
|
+
empty: true,
|
|
800
|
+
}, requestOptions),
|
|
742
801
|
remove: (input, requestOptions) => request({
|
|
743
802
|
method: "DELETE",
|
|
744
803
|
path: `/api/credential/${encodeURIComponent(input.credentialID)}`,
|
|
@@ -750,6 +809,14 @@ export function make(options) {
|
|
|
750
809
|
},
|
|
751
810
|
project: {
|
|
752
811
|
list: (requestOptions) => request({ method: "GET", path: `/api/project`, successStatus: 200, declaredStatuses: [401, 400], empty: false }, requestOptions),
|
|
812
|
+
update: (input, requestOptions) => request({
|
|
813
|
+
method: "PATCH",
|
|
814
|
+
path: `/api/project/${encodeURIComponent(input.projectID)}`,
|
|
815
|
+
body: { name: input["name"], icon: input["icon"], commands: input["commands"] },
|
|
816
|
+
successStatus: 200,
|
|
817
|
+
declaredStatuses: [404, 401, 400],
|
|
818
|
+
empty: false,
|
|
819
|
+
}, requestOptions),
|
|
753
820
|
current: (input, requestOptions) => request({
|
|
754
821
|
method: "GET",
|
|
755
822
|
path: `/api/project/current`,
|
|
@@ -774,7 +841,7 @@ export function make(options) {
|
|
|
774
841
|
method: "GET",
|
|
775
842
|
path: `/api/session/${encodeURIComponent(input.sessionID)}/form`,
|
|
776
843
|
successStatus: 200,
|
|
777
|
-
declaredStatuses: [404,
|
|
844
|
+
declaredStatuses: [404, 401, 400],
|
|
778
845
|
empty: false,
|
|
779
846
|
}, requestOptions).then((value) => value.data),
|
|
780
847
|
create: (input, requestOptions) => request({
|
|
@@ -863,7 +930,7 @@ export function make(options) {
|
|
|
863
930
|
method: "GET",
|
|
864
931
|
path: `/api/session/${encodeURIComponent(input.sessionID)}/permission`,
|
|
865
932
|
successStatus: 200,
|
|
866
|
-
declaredStatuses: [404,
|
|
933
|
+
declaredStatuses: [404, 401, 400],
|
|
867
934
|
empty: false,
|
|
868
935
|
}, requestOptions).then((value) => value.data),
|
|
869
936
|
get: (input, requestOptions) => request({
|
|
@@ -993,6 +1060,91 @@ export function make(options) {
|
|
|
993
1060
|
}, requestOptions),
|
|
994
1061
|
},
|
|
995
1062
|
},
|
|
1063
|
+
experimental: {
|
|
1064
|
+
persistentPty: {
|
|
1065
|
+
read: (input, requestOptions) => request({
|
|
1066
|
+
method: "GET",
|
|
1067
|
+
path: `/api/experimental/session/${encodeURIComponent(input.sessionID)}/terminal/read`,
|
|
1068
|
+
query: { lines: input["lines"] },
|
|
1069
|
+
successStatus: 200,
|
|
1070
|
+
declaredStatuses: [503, 401, 400],
|
|
1071
|
+
empty: false,
|
|
1072
|
+
}, requestOptions).then((value) => value.data),
|
|
1073
|
+
list: (input, requestOptions) => request({
|
|
1074
|
+
method: "GET",
|
|
1075
|
+
path: `/api/experimental/session/${encodeURIComponent(input.sessionID)}/terminal`,
|
|
1076
|
+
successStatus: 200,
|
|
1077
|
+
declaredStatuses: [400, 503, 401],
|
|
1078
|
+
empty: false,
|
|
1079
|
+
}, requestOptions).then((value) => value.data),
|
|
1080
|
+
create: (input, requestOptions) => request({
|
|
1081
|
+
method: "POST",
|
|
1082
|
+
path: `/api/experimental/session/${encodeURIComponent(input.sessionID)}/terminal`,
|
|
1083
|
+
body: {
|
|
1084
|
+
command: input["command"],
|
|
1085
|
+
args: input["args"],
|
|
1086
|
+
cwd: input["cwd"],
|
|
1087
|
+
title: input["title"],
|
|
1088
|
+
env: input["env"],
|
|
1089
|
+
size: input["size"],
|
|
1090
|
+
},
|
|
1091
|
+
successStatus: 200,
|
|
1092
|
+
declaredStatuses: [400, 503, 401],
|
|
1093
|
+
empty: false,
|
|
1094
|
+
}, requestOptions).then((value) => value.data),
|
|
1095
|
+
shutdown: (requestOptions) => request({
|
|
1096
|
+
method: "POST",
|
|
1097
|
+
path: `/api/experimental/persistent-pty/shutdown`,
|
|
1098
|
+
successStatus: 204,
|
|
1099
|
+
declaredStatuses: [503, 401, 400],
|
|
1100
|
+
empty: true,
|
|
1101
|
+
}, requestOptions),
|
|
1102
|
+
handoff: (requestOptions) => request({
|
|
1103
|
+
method: "POST",
|
|
1104
|
+
path: `/api/experimental/persistent-pty/handoff`,
|
|
1105
|
+
successStatus: 200,
|
|
1106
|
+
declaredStatuses: [503, 401, 400],
|
|
1107
|
+
empty: false,
|
|
1108
|
+
}, requestOptions),
|
|
1109
|
+
get: (input, requestOptions) => request({
|
|
1110
|
+
method: "GET",
|
|
1111
|
+
path: `/api/experimental/persistent-pty/${encodeURIComponent(input.ptyID)}`,
|
|
1112
|
+
successStatus: 200,
|
|
1113
|
+
declaredStatuses: [404, 503, 401, 400],
|
|
1114
|
+
empty: false,
|
|
1115
|
+
}, requestOptions).then((value) => value.data),
|
|
1116
|
+
update: (input, requestOptions) => request({
|
|
1117
|
+
method: "PUT",
|
|
1118
|
+
path: `/api/experimental/persistent-pty/${encodeURIComponent(input.ptyID)}`,
|
|
1119
|
+
body: { attachmentID: input["attachmentID"], size: input["size"] },
|
|
1120
|
+
successStatus: 200,
|
|
1121
|
+
declaredStatuses: [404, 503, 401, 400],
|
|
1122
|
+
empty: false,
|
|
1123
|
+
}, requestOptions).then((value) => value.data),
|
|
1124
|
+
snapshot: (input, requestOptions) => request({
|
|
1125
|
+
method: "GET",
|
|
1126
|
+
path: `/api/experimental/persistent-pty/${encodeURIComponent(input.ptyID)}/snapshot`,
|
|
1127
|
+
successStatus: 200,
|
|
1128
|
+
declaredStatuses: [404, 503, 401, 400],
|
|
1129
|
+
empty: false,
|
|
1130
|
+
}, requestOptions).then((value) => value.data),
|
|
1131
|
+
remove: (input, requestOptions) => request({
|
|
1132
|
+
method: "DELETE",
|
|
1133
|
+
path: `/api/experimental/persistent-pty/${encodeURIComponent(input.ptyID)}`,
|
|
1134
|
+
successStatus: 204,
|
|
1135
|
+
declaredStatuses: [404, 503, 401, 400],
|
|
1136
|
+
empty: true,
|
|
1137
|
+
}, requestOptions),
|
|
1138
|
+
connectToken: (input, requestOptions) => request({
|
|
1139
|
+
method: "POST",
|
|
1140
|
+
path: `/api/experimental/persistent-pty/${encodeURIComponent(input.ptyID)}/connect-token`,
|
|
1141
|
+
headers: { "x-opencode-ticket": input["x-opencode-ticket"] },
|
|
1142
|
+
successStatus: 200,
|
|
1143
|
+
declaredStatuses: [403, 404, 503, 401, 400],
|
|
1144
|
+
empty: false,
|
|
1145
|
+
}, requestOptions).then((value) => value.data),
|
|
1146
|
+
},
|
|
1147
|
+
},
|
|
996
1148
|
shell: {
|
|
997
1149
|
list: (input, requestOptions) => request({
|
|
998
1150
|
method: "GET",
|
|
@@ -1074,6 +1226,7 @@ export function make(options) {
|
|
|
1074
1226
|
body: {
|
|
1075
1227
|
strategy: input["strategy"],
|
|
1076
1228
|
from: input["from"],
|
|
1229
|
+
branch: input["branch"],
|
|
1077
1230
|
directory: input["directory"],
|
|
1078
1231
|
name: input["name"],
|
|
1079
1232
|
},
|
|
@@ -1097,6 +1250,23 @@ export function make(options) {
|
|
|
1097
1250
|
empty: true,
|
|
1098
1251
|
}, requestOptions),
|
|
1099
1252
|
},
|
|
1253
|
+
workspace: {
|
|
1254
|
+
create: (input, requestOptions) => request({
|
|
1255
|
+
method: "POST",
|
|
1256
|
+
path: `/api/workspace`,
|
|
1257
|
+
body: { id: input["id"], provider: input["provider"] },
|
|
1258
|
+
successStatus: 200,
|
|
1259
|
+
declaredStatuses: [409, 404, 401, 400],
|
|
1260
|
+
empty: false,
|
|
1261
|
+
}, requestOptions).then((value) => value.data),
|
|
1262
|
+
destroy: (input, requestOptions) => request({
|
|
1263
|
+
method: "DELETE",
|
|
1264
|
+
path: `/api/workspace/${encodeURIComponent(input.workspaceID)}`,
|
|
1265
|
+
successStatus: 200,
|
|
1266
|
+
declaredStatuses: [500, 401, 400],
|
|
1267
|
+
empty: false,
|
|
1268
|
+
}, requestOptions),
|
|
1269
|
+
},
|
|
1100
1270
|
vcs: {
|
|
1101
1271
|
get: (input, requestOptions) => request({
|
|
1102
1272
|
method: "GET",
|
|
@@ -1106,6 +1276,14 @@ export function make(options) {
|
|
|
1106
1276
|
declaredStatuses: [401, 400],
|
|
1107
1277
|
empty: false,
|
|
1108
1278
|
}, requestOptions),
|
|
1279
|
+
base: (input, requestOptions) => request({
|
|
1280
|
+
method: "GET",
|
|
1281
|
+
path: `/api/vcs/base`,
|
|
1282
|
+
query: { location: input?.["location"] },
|
|
1283
|
+
successStatus: 200,
|
|
1284
|
+
declaredStatuses: [503, 401, 400],
|
|
1285
|
+
empty: false,
|
|
1286
|
+
}, requestOptions),
|
|
1109
1287
|
status: (input, requestOptions) => request({
|
|
1110
1288
|
method: "GET",
|
|
1111
1289
|
path: `/api/vcs/status`,
|
|
@@ -1114,12 +1292,20 @@ export function make(options) {
|
|
|
1114
1292
|
declaredStatuses: [401, 400],
|
|
1115
1293
|
empty: false,
|
|
1116
1294
|
}, requestOptions),
|
|
1295
|
+
branches: (input, requestOptions) => request({
|
|
1296
|
+
method: "GET",
|
|
1297
|
+
path: `/api/vcs/branches`,
|
|
1298
|
+
query: { location: input?.["location"], search: input?.["search"], limit: input?.["limit"] },
|
|
1299
|
+
successStatus: 200,
|
|
1300
|
+
declaredStatuses: [401, 400],
|
|
1301
|
+
empty: false,
|
|
1302
|
+
}, requestOptions),
|
|
1117
1303
|
diff: (input, requestOptions) => request({
|
|
1118
1304
|
method: "GET",
|
|
1119
1305
|
path: `/api/vcs/diff`,
|
|
1120
|
-
query: { location: input["location"], mode: input["mode"], context: input["context"] },
|
|
1306
|
+
query: { location: input["location"], mode: input["mode"], base: input["base"], context: input["context"] },
|
|
1121
1307
|
successStatus: 200,
|
|
1122
|
-
declaredStatuses: [401, 400],
|
|
1308
|
+
declaredStatuses: [503, 401, 400],
|
|
1123
1309
|
empty: false,
|
|
1124
1310
|
}, requestOptions),
|
|
1125
1311
|
},
|