shuvcode 2.0.0-alpha-14 → 2.0.0-alpha-16
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 +1 -0
- package/client/generated/client.d.ts +6 -3
- package/client/generated/client.js +19 -9
- package/client/generated/types.d.ts +1009 -1098
- package/client/generated/types.js +1 -0
- package/client/index.js +2 -2
- package/client/service.js +18 -58
- package/package.json +13 -13
package/client/api.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ export type CommandApi = Client["command"];
|
|
|
4
4
|
export type ConfigApi = Client["config"];
|
|
5
5
|
export type EventApi = Client["event"];
|
|
6
6
|
export type IntegrationApi = Client["integration"];
|
|
7
|
+
export type McpApi = Client["mcp"];
|
|
7
8
|
export type ModelApi = Client["model"];
|
|
8
9
|
export type PluginApi = Client["plugin"];
|
|
9
10
|
export type ProviderApi = Client["provider"];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
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";
|
|
2
2
|
export interface ClientOptions {
|
|
3
3
|
readonly baseUrl: string;
|
|
4
4
|
readonly fetch?: typeof globalThis.fetch;
|
|
@@ -11,7 +11,6 @@ export interface RequestOptions {
|
|
|
11
11
|
export declare function make(options: ClientOptions): {
|
|
12
12
|
health: {
|
|
13
13
|
get: (requestOptions?: RequestOptions) => Promise<import("./types.js").ServiceHealth>;
|
|
14
|
-
stop: (input: HealthStopInput, requestOptions?: RequestOptions) => Promise<import("./types.js").ServiceStopResponse>;
|
|
15
14
|
};
|
|
16
15
|
server: {
|
|
17
16
|
get: (requestOptions?: RequestOptions) => Promise<ServerGetOutput>;
|
|
@@ -73,8 +72,9 @@ export declare function make(options: ClientOptions): {
|
|
|
73
72
|
log: (input: SessionLogInput, requestOptions?: RequestOptions) => AsyncIterable<SessionLogOutput>;
|
|
74
73
|
interrupt: (input: SessionInterruptInput, requestOptions?: RequestOptions) => Promise<void>;
|
|
75
74
|
background: (input: SessionBackgroundInput, requestOptions?: RequestOptions) => Promise<void>;
|
|
76
|
-
message: (input: SessionMessageInput, requestOptions?: RequestOptions) => Promise<import("./types.js").SessionMessageAgentSelected | import("./types.js").
|
|
75
|
+
message: (input: SessionMessageInput, requestOptions?: RequestOptions) => Promise<import("./types.js").SessionMessageAgentSelected | import("./types.js").SessionMessageModelSelected | import("./types.js").SessionMessageLocationSwitched | 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").SessionMessageCompactionFailed | import("./types.js").SessionMessageUser | import("./types.js").SessionMessageAssistant>;
|
|
77
76
|
environment: (input: SessionEnvironmentInput, requestOptions?: RequestOptions) => Promise<void>;
|
|
77
|
+
view: (input: SessionViewInput, requestOptions?: RequestOptions) => Promise<void>;
|
|
78
78
|
};
|
|
79
79
|
message: {
|
|
80
80
|
list: (input: MessageListInput, requestOptions?: RequestOptions) => Promise<import("./types.js").SessionMessagesResponse>;
|
|
@@ -188,6 +188,9 @@ export declare function make(options: ClientOptions): {
|
|
|
188
188
|
get: (input: PtyGetInput, requestOptions?: RequestOptions) => Promise<PtyGetOutput>;
|
|
189
189
|
update: (input: PtyUpdateInput, requestOptions?: RequestOptions) => Promise<PtyUpdateOutput>;
|
|
190
190
|
remove: (input: PtyRemoveInput, requestOptions?: RequestOptions) => Promise<void>;
|
|
191
|
+
connect: {
|
|
192
|
+
token: (input: PtyConnectTokenInput, requestOptions?: RequestOptions) => Promise<PtyConnectTokenOutput>;
|
|
193
|
+
};
|
|
191
194
|
};
|
|
192
195
|
shell: {
|
|
193
196
|
list: (input?: ShellListInput, requestOptions?: RequestOptions) => Promise<ShellListOutput>;
|
|
@@ -129,14 +129,6 @@ export function make(options) {
|
|
|
129
129
|
return {
|
|
130
130
|
health: {
|
|
131
131
|
get: (requestOptions) => request({ method: "GET", path: `/api/health`, successStatus: 200, declaredStatuses: [401, 400], empty: false }, requestOptions),
|
|
132
|
-
stop: (input, requestOptions) => request({
|
|
133
|
-
method: "POST",
|
|
134
|
-
path: `/api/service/stop`,
|
|
135
|
-
body: { instanceID: input["instanceID"] },
|
|
136
|
-
successStatus: 200,
|
|
137
|
-
declaredStatuses: [401, 400],
|
|
138
|
-
empty: false,
|
|
139
|
-
}, requestOptions),
|
|
140
132
|
},
|
|
141
133
|
server: {
|
|
142
134
|
get: (requestOptions) => request({ method: "GET", path: `/api/server`, successStatus: 200, declaredStatuses: [401, 400], empty: false }, requestOptions),
|
|
@@ -298,7 +290,6 @@ export function make(options) {
|
|
|
298
290
|
text: input["text"],
|
|
299
291
|
files: input["files"],
|
|
300
292
|
agents: input["agents"],
|
|
301
|
-
output: input["output"],
|
|
302
293
|
skills: input["skills"],
|
|
303
294
|
metadata: input["metadata"],
|
|
304
295
|
delivery: input["delivery"],
|
|
@@ -506,6 +497,14 @@ export function make(options) {
|
|
|
506
497
|
declaredStatuses: [404, 401, 400],
|
|
507
498
|
empty: true,
|
|
508
499
|
}, requestOptions),
|
|
500
|
+
view: (input, requestOptions) => request({
|
|
501
|
+
method: "POST",
|
|
502
|
+
path: `/api/session/${encodeURIComponent(input.sessionID)}/view`,
|
|
503
|
+
body: { idle: input["idle"] },
|
|
504
|
+
successStatus: 204,
|
|
505
|
+
declaredStatuses: [404, 401, 400],
|
|
506
|
+
empty: true,
|
|
507
|
+
}, requestOptions),
|
|
509
508
|
},
|
|
510
509
|
message: {
|
|
511
510
|
list: (input, requestOptions) => request({
|
|
@@ -982,6 +981,17 @@ export function make(options) {
|
|
|
982
981
|
declaredStatuses: [404, 401, 400],
|
|
983
982
|
empty: true,
|
|
984
983
|
}, requestOptions),
|
|
984
|
+
connect: {
|
|
985
|
+
token: (input, requestOptions) => request({
|
|
986
|
+
method: "POST",
|
|
987
|
+
path: `/api/pty/${encodeURIComponent(input.ptyID)}/connect-token`,
|
|
988
|
+
query: { location: input["location"] },
|
|
989
|
+
headers: { "x-opencode-ticket": input["x-opencode-ticket"] },
|
|
990
|
+
successStatus: 200,
|
|
991
|
+
declaredStatuses: [403, 404, 401, 400],
|
|
992
|
+
empty: false,
|
|
993
|
+
}, requestOptions),
|
|
994
|
+
},
|
|
985
995
|
},
|
|
986
996
|
shell: {
|
|
987
997
|
list: (input, requestOptions) => request({
|