@xutest1/sdk 0.3.1 → 0.3.3
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/gen/client/client.gen.js +1 -3
- package/gen/client/utils.gen.d.ts +1 -1
- package/gen/client/utils.gen.js +3 -5
- package/gen/client.gen.js +1 -1
- package/gen/core/pathSerializer.gen.d.ts +1 -1
- package/gen/core/pathSerializer.gen.js +1 -1
- package/gen/sdk.gen.d.ts +1 -72
- package/gen/sdk.gen.js +0 -161
- package/gen/types.gen.d.ts +0 -536
- package/package.json +26 -15
- package/server.js +1 -5
package/gen/client/client.gen.js
CHANGED
|
@@ -72,9 +72,7 @@ export const createClient = (config = {}) => {
|
|
|
72
72
|
...result,
|
|
73
73
|
};
|
|
74
74
|
}
|
|
75
|
-
const parseAs = (opts.parseAs === "auto"
|
|
76
|
-
? getParseAs(response.headers.get("Content-Type"))
|
|
77
|
-
: opts.parseAs) ?? "json";
|
|
75
|
+
const parseAs = (opts.parseAs === "auto" ? getParseAs(response.headers.get("Content-Type")) : opts.parseAs) ?? "json";
|
|
78
76
|
let data;
|
|
79
77
|
switch (parseAs) {
|
|
80
78
|
case "arrayBuffer":
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { QuerySerializerOptions } from "../core/bodySerializer.gen.js";
|
|
2
2
|
import type { Client, ClientOptions, Config, RequestOptions } from "./types.gen.js";
|
|
3
|
-
export declare const createQuerySerializer: <T = unknown>({ allowReserved, array, object
|
|
3
|
+
export declare const createQuerySerializer: <T = unknown>({ allowReserved, array, object }?: QuerySerializerOptions) => (queryParams: T) => string;
|
|
4
4
|
/**
|
|
5
5
|
* Infers parseAs value from provided Content-Type header.
|
|
6
6
|
*/
|
package/gen/client/utils.gen.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
// This file is auto-generated by @hey-api/openapi-ts
|
|
2
2
|
import { getAuthToken } from "../core/auth.gen.js";
|
|
3
3
|
import { jsonBodySerializer } from "../core/bodySerializer.gen.js";
|
|
4
|
-
import { serializeArrayParam, serializeObjectParam, serializePrimitiveParam
|
|
4
|
+
import { serializeArrayParam, serializeObjectParam, serializePrimitiveParam } from "../core/pathSerializer.gen.js";
|
|
5
5
|
import { getUrl } from "../core/utils.gen.js";
|
|
6
|
-
export const createQuerySerializer = ({ allowReserved, array, object
|
|
6
|
+
export const createQuerySerializer = ({ allowReserved, array, object } = {}) => {
|
|
7
7
|
const querySerializer = (queryParams) => {
|
|
8
8
|
const search = [];
|
|
9
9
|
if (queryParams && typeof queryParams === "object") {
|
|
@@ -82,9 +82,7 @@ const checkForExistence = (options, name) => {
|
|
|
82
82
|
if (!name) {
|
|
83
83
|
return false;
|
|
84
84
|
}
|
|
85
|
-
if (options.headers.has(name) ||
|
|
86
|
-
options.query?.[name] ||
|
|
87
|
-
options.headers.get("Cookie")?.includes(`${name}=`)) {
|
|
85
|
+
if (options.headers.has(name) || options.query?.[name] || options.headers.get("Cookie")?.includes(`${name}=`)) {
|
|
88
86
|
return true;
|
|
89
87
|
}
|
|
90
88
|
return false;
|
package/gen/client.gen.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// This file is auto-generated by @hey-api/openapi-ts
|
|
2
|
-
import { createClient, createConfig
|
|
2
|
+
import { createClient, createConfig } from "./client/index.js";
|
|
3
3
|
export const client = createClient(createConfig({
|
|
4
4
|
baseUrl: "http://localhost:4096",
|
|
5
5
|
}));
|
|
@@ -25,7 +25,7 @@ export declare const separatorObjectExplode: (style: ObjectSeparatorStyle) => ".
|
|
|
25
25
|
export declare const serializeArrayParam: ({ allowReserved, explode, name, style, value, }: SerializeOptions<ArraySeparatorStyle> & {
|
|
26
26
|
value: unknown[];
|
|
27
27
|
}) => string;
|
|
28
|
-
export declare const serializePrimitiveParam: ({ allowReserved, name, value
|
|
28
|
+
export declare const serializePrimitiveParam: ({ allowReserved, name, value }: SerializePrimitiveParam) => string;
|
|
29
29
|
export declare const serializeObjectParam: ({ allowReserved, explode, name, style, value, valueOnly, }: SerializeOptions<ObjectSeparatorStyle> & {
|
|
30
30
|
value: Record<string, unknown> | Date;
|
|
31
31
|
valueOnly?: boolean;
|
|
@@ -64,7 +64,7 @@ export const serializeArrayParam = ({ allowReserved, explode, name, style, value
|
|
|
64
64
|
.join(separator);
|
|
65
65
|
return style === "label" || style === "matrix" ? separator + joinedValues : joinedValues;
|
|
66
66
|
};
|
|
67
|
-
export const serializePrimitiveParam = ({ allowReserved, name, value
|
|
67
|
+
export const serializePrimitiveParam = ({ allowReserved, name, value }) => {
|
|
68
68
|
if (value === undefined || value === null) {
|
|
69
69
|
return "";
|
|
70
70
|
}
|
package/gen/sdk.gen.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Options as ClientOptions, TDataShape, Client } from "./client/index.js";
|
|
2
|
-
import type { ProjectListData, ProjectListResponses, ProjectCurrentData, ProjectCurrentResponses,
|
|
2
|
+
import type { ProjectListData, ProjectListResponses, ProjectCurrentData, ProjectCurrentResponses, ConfigGetData, ConfigGetResponses, ConfigUpdateData, ConfigUpdateResponses, ConfigUpdateErrors, ToolIdsData, ToolIdsResponses, ToolIdsErrors, ToolListData, ToolListResponses, ToolListErrors, PathGetData, PathGetResponses, SessionListData, SessionListResponses, SessionCreateData, SessionCreateResponses, SessionCreateErrors, SessionDeleteData, SessionDeleteResponses, SessionDeleteErrors, SessionGetData, SessionGetResponses, SessionGetErrors, SessionUpdateData, SessionUpdateResponses, SessionUpdateErrors, SessionChildrenData, SessionChildrenResponses, SessionChildrenErrors, SessionTodoData, SessionTodoResponses, SessionTodoErrors, SessionInitData, SessionInitResponses, SessionInitErrors, SessionForkData, SessionForkResponses, SessionAbortData, SessionAbortResponses, SessionAbortErrors, SessionUnshareData, SessionUnshareResponses, SessionUnshareErrors, SessionShareData, SessionShareResponses, SessionShareErrors, SessionDiffData, SessionDiffResponses, SessionSummarizeData, SessionSummarizeResponses, SessionSummarizeErrors, SessionMessagesData, SessionMessagesResponses, SessionMessagesErrors, SessionPromptData, SessionPromptResponses, SessionPromptErrors, SessionMessageData, SessionMessageResponses, SessionMessageErrors, SessionCommandData, SessionCommandResponses, SessionCommandErrors, SessionShellData, SessionShellResponses, SessionShellErrors, SessionRevertData, SessionRevertResponses, SessionRevertErrors, SessionUnrevertData, SessionUnrevertResponses, SessionUnrevertErrors, PostSessionIdPermissionsPermissionIdData, PostSessionIdPermissionsPermissionIdResponses, PostSessionIdPermissionsPermissionIdErrors, CommandListData, CommandListResponses, ConfigProvidersData, ConfigProvidersResponses, FindTextData, FindTextResponses, FindFilesData, FindFilesResponses, FindSymbolsData, FindSymbolsResponses, FileListData, FileListResponses, FileReadData, FileReadResponses, FileStatusData, FileStatusResponses, AppLogData, AppLogResponses, AppLogErrors, AppAgentsData, AppAgentsResponses, McpStatusData, McpStatusResponses, TuiAppendPromptData, TuiAppendPromptResponses, TuiAppendPromptErrors, TuiOpenHelpData, TuiOpenHelpResponses, TuiOpenSessionsData, TuiOpenSessionsResponses, TuiOpenThemesData, TuiOpenThemesResponses, TuiOpenModelsData, TuiOpenModelsResponses, TuiSubmitPromptData, TuiSubmitPromptResponses, TuiClearPromptData, TuiClearPromptResponses, TuiExecuteCommandData, TuiExecuteCommandResponses, TuiExecuteCommandErrors, TuiShowToastData, TuiShowToastResponses, AuthSetData, AuthSetResponses, AuthSetErrors, EventSubscribeData, EventSubscribeResponses } from "./types.gen.js";
|
|
3
3
|
export type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = ClientOptions<TData, ThrowOnError> & {
|
|
4
4
|
/**
|
|
5
5
|
* You can provide a client instance returned by `createClient()` instead of
|
|
@@ -29,53 +29,6 @@ declare class Project extends _HeyApiClient {
|
|
|
29
29
|
*/
|
|
30
30
|
current<ThrowOnError extends boolean = false>(options?: Options<ProjectCurrentData, ThrowOnError>): import("./client/types.gen.js").RequestResult<ProjectCurrentResponses, unknown, ThrowOnError, "fields">;
|
|
31
31
|
}
|
|
32
|
-
declare class Current extends _HeyApiClient {
|
|
33
|
-
/**
|
|
34
|
-
* Get LLM context for the most recently loaded paper
|
|
35
|
-
*/
|
|
36
|
-
context<ThrowOnError extends boolean = false>(options?: Options<FdsPaperCurrentContextData, ThrowOnError>): import("./client/types.gen.js").RequestResult<FdsPaperCurrentContextResponses, FdsPaperCurrentContextErrors, ThrowOnError, "fields">;
|
|
37
|
-
}
|
|
38
|
-
declare class Spec extends _HeyApiClient {
|
|
39
|
-
/**
|
|
40
|
-
* Set the FDS specification for a paper
|
|
41
|
-
*/
|
|
42
|
-
set<ThrowOnError extends boolean = false>(options: Options<FdsPaperSpecSetData, ThrowOnError>): import("./client/types.gen.js").RequestResult<FdsPaperSpecSetResponses, unknown, ThrowOnError, "fields">;
|
|
43
|
-
}
|
|
44
|
-
declare class Paper extends _HeyApiClient {
|
|
45
|
-
/**
|
|
46
|
-
* Load a research paper from file path or URL
|
|
47
|
-
*/
|
|
48
|
-
load<ThrowOnError extends boolean = false>(options?: Options<FdsPaperLoadData, ThrowOnError>): import("./client/types.gen.js").RequestResult<FdsPaperLoadResponses, unknown, ThrowOnError, "fields">;
|
|
49
|
-
/**
|
|
50
|
-
* Get LLM context for a loaded paper (includes FDS extraction instructions)
|
|
51
|
-
*/
|
|
52
|
-
context<ThrowOnError extends boolean = false>(options: Options<FdsPaperContextData, ThrowOnError>): import("./client/types.gen.js").RequestResult<FdsPaperContextResponses, FdsPaperContextErrors, ThrowOnError, "fields">;
|
|
53
|
-
/**
|
|
54
|
-
* Clear a paper from memory
|
|
55
|
-
*/
|
|
56
|
-
delete<ThrowOnError extends boolean = false>(options: Options<FdsPaperDeleteData, ThrowOnError>): import("./client/types.gen.js").RequestResult<FdsPaperDeleteResponses, unknown, ThrowOnError, "fields">;
|
|
57
|
-
/**
|
|
58
|
-
* Get paper details by ID
|
|
59
|
-
*/
|
|
60
|
-
get<ThrowOnError extends boolean = false>(options: Options<FdsPaperGetData, ThrowOnError>): import("./client/types.gen.js").RequestResult<FdsPaperGetResponses, FdsPaperGetErrors, ThrowOnError, "fields">;
|
|
61
|
-
/**
|
|
62
|
-
* List all loaded papers
|
|
63
|
-
*/
|
|
64
|
-
list<ThrowOnError extends boolean = false>(options?: Options<FdsPaperListData, ThrowOnError>): import("./client/types.gen.js").RequestResult<FdsPaperListResponses, unknown, ThrowOnError, "fields">;
|
|
65
|
-
/**
|
|
66
|
-
* Update the current phase for a paper
|
|
67
|
-
*/
|
|
68
|
-
phase<ThrowOnError extends boolean = false>(options: Options<FdsPaperPhaseData, ThrowOnError>): import("./client/types.gen.js").RequestResult<FdsPaperPhaseResponses, unknown, ThrowOnError, "fields">;
|
|
69
|
-
current: Current;
|
|
70
|
-
spec: Spec;
|
|
71
|
-
}
|
|
72
|
-
declare class Fds extends _HeyApiClient {
|
|
73
|
-
/**
|
|
74
|
-
* Check if FDS dependencies (PyPDF2) are available
|
|
75
|
-
*/
|
|
76
|
-
dependencies<ThrowOnError extends boolean = false>(options?: Options<FdsDependenciesData, ThrowOnError>): import("./client/types.gen.js").RequestResult<FdsDependenciesResponses, unknown, ThrowOnError, "fields">;
|
|
77
|
-
paper: Paper;
|
|
78
|
-
}
|
|
79
32
|
declare class Config extends _HeyApiClient {
|
|
80
33
|
/**
|
|
81
34
|
* Get config info
|
|
@@ -147,10 +100,6 @@ declare class Session extends _HeyApiClient {
|
|
|
147
100
|
* Abort a session
|
|
148
101
|
*/
|
|
149
102
|
abort<ThrowOnError extends boolean = false>(options: Options<SessionAbortData, ThrowOnError>): import("./client/types.gen.js").RequestResult<SessionAbortResponses, SessionAbortErrors, ThrowOnError, "fields">;
|
|
150
|
-
/**
|
|
151
|
-
* Toggle auto-approve permission for a session
|
|
152
|
-
*/
|
|
153
|
-
togglePermission<ThrowOnError extends boolean = false>(options: Options<SessionTogglePermissionData, ThrowOnError>): import("./client/types.gen.js").RequestResult<SessionTogglePermissionResponses, SessionTogglePermissionErrors, ThrowOnError, "fields">;
|
|
154
103
|
/**
|
|
155
104
|
* Unshare the session
|
|
156
105
|
*/
|
|
@@ -240,29 +189,11 @@ declare class App extends _HeyApiClient {
|
|
|
240
189
|
*/
|
|
241
190
|
agents<ThrowOnError extends boolean = false>(options?: Options<AppAgentsData, ThrowOnError>): import("./client/types.gen.js").RequestResult<AppAgentsResponses, unknown, ThrowOnError, "fields">;
|
|
242
191
|
}
|
|
243
|
-
declare class Agent extends _HeyApiClient {
|
|
244
|
-
/**
|
|
245
|
-
* Update agent permission settings
|
|
246
|
-
*/
|
|
247
|
-
updatePermission<ThrowOnError extends boolean = false>(options: Options<AgentUpdatePermissionData, ThrowOnError>): import("./client/types.gen.js").RequestResult<AgentUpdatePermissionResponses, AgentUpdatePermissionErrors, ThrowOnError, "fields">;
|
|
248
|
-
}
|
|
249
192
|
declare class Mcp extends _HeyApiClient {
|
|
250
193
|
/**
|
|
251
194
|
* Get MCP server status
|
|
252
195
|
*/
|
|
253
196
|
status<ThrowOnError extends boolean = false>(options?: Options<McpStatusData, ThrowOnError>): import("./client/types.gen.js").RequestResult<McpStatusResponses, unknown, ThrowOnError, "fields">;
|
|
254
|
-
/**
|
|
255
|
-
* Refresh all MCP servers - reloads config and reconnects
|
|
256
|
-
*/
|
|
257
|
-
refresh<ThrowOnError extends boolean = false>(options?: Options<McpRefreshData, ThrowOnError>): import("./client/types.gen.js").RequestResult<McpRefreshResponses, unknown, ThrowOnError, "fields">;
|
|
258
|
-
/**
|
|
259
|
-
* Enable an MCP server
|
|
260
|
-
*/
|
|
261
|
-
enable<ThrowOnError extends boolean = false>(options: Options<McpEnableData, ThrowOnError>): import("./client/types.gen.js").RequestResult<McpEnableResponses, unknown, ThrowOnError, "fields">;
|
|
262
|
-
/**
|
|
263
|
-
* Disable an MCP server
|
|
264
|
-
*/
|
|
265
|
-
disable<ThrowOnError extends boolean = false>(options: Options<McpDisableData, ThrowOnError>): import("./client/types.gen.js").RequestResult<McpDisableResponses, unknown, ThrowOnError, "fields">;
|
|
266
197
|
}
|
|
267
198
|
declare class Tui extends _HeyApiClient {
|
|
268
199
|
/**
|
|
@@ -320,7 +251,6 @@ export declare class OpencodeClient extends _HeyApiClient {
|
|
|
320
251
|
*/
|
|
321
252
|
postSessionIdPermissionsPermissionId<ThrowOnError extends boolean = false>(options: Options<PostSessionIdPermissionsPermissionIdData, ThrowOnError>): import("./client/types.gen.js").RequestResult<PostSessionIdPermissionsPermissionIdResponses, PostSessionIdPermissionsPermissionIdErrors, ThrowOnError, "fields">;
|
|
322
253
|
project: Project;
|
|
323
|
-
fds: Fds;
|
|
324
254
|
config: Config;
|
|
325
255
|
tool: Tool;
|
|
326
256
|
path: Path;
|
|
@@ -329,7 +259,6 @@ export declare class OpencodeClient extends _HeyApiClient {
|
|
|
329
259
|
find: Find;
|
|
330
260
|
file: File;
|
|
331
261
|
app: App;
|
|
332
|
-
agent: Agent;
|
|
333
262
|
mcp: Mcp;
|
|
334
263
|
tui: Tui;
|
|
335
264
|
auth: Auth;
|
package/gen/sdk.gen.js
CHANGED
|
@@ -28,110 +28,6 @@ class Project extends _HeyApiClient {
|
|
|
28
28
|
});
|
|
29
29
|
}
|
|
30
30
|
}
|
|
31
|
-
class Current extends _HeyApiClient {
|
|
32
|
-
/**
|
|
33
|
-
* Get LLM context for the most recently loaded paper
|
|
34
|
-
*/
|
|
35
|
-
context(options) {
|
|
36
|
-
return (options?.client ?? this._client).get({
|
|
37
|
-
url: "/fds/paper/current/context",
|
|
38
|
-
...options,
|
|
39
|
-
});
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
class Spec extends _HeyApiClient {
|
|
43
|
-
/**
|
|
44
|
-
* Set the FDS specification for a paper
|
|
45
|
-
*/
|
|
46
|
-
set(options) {
|
|
47
|
-
return (options.client ?? this._client).put({
|
|
48
|
-
url: "/fds/paper/{id}/spec",
|
|
49
|
-
...options,
|
|
50
|
-
headers: {
|
|
51
|
-
"Content-Type": "application/json",
|
|
52
|
-
...options.headers,
|
|
53
|
-
},
|
|
54
|
-
});
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
class Paper extends _HeyApiClient {
|
|
58
|
-
/**
|
|
59
|
-
* Load a research paper from file path or URL
|
|
60
|
-
*/
|
|
61
|
-
load(options) {
|
|
62
|
-
return (options?.client ?? this._client).post({
|
|
63
|
-
url: "/fds/paper/load",
|
|
64
|
-
...options,
|
|
65
|
-
headers: {
|
|
66
|
-
"Content-Type": "application/json",
|
|
67
|
-
...options?.headers,
|
|
68
|
-
},
|
|
69
|
-
});
|
|
70
|
-
}
|
|
71
|
-
/**
|
|
72
|
-
* Get LLM context for a loaded paper (includes FDS extraction instructions)
|
|
73
|
-
*/
|
|
74
|
-
context(options) {
|
|
75
|
-
return (options.client ?? this._client).get({
|
|
76
|
-
url: "/fds/paper/{id}/context",
|
|
77
|
-
...options,
|
|
78
|
-
});
|
|
79
|
-
}
|
|
80
|
-
/**
|
|
81
|
-
* Clear a paper from memory
|
|
82
|
-
*/
|
|
83
|
-
delete(options) {
|
|
84
|
-
return (options.client ?? this._client).delete({
|
|
85
|
-
url: "/fds/paper/{id}",
|
|
86
|
-
...options,
|
|
87
|
-
});
|
|
88
|
-
}
|
|
89
|
-
/**
|
|
90
|
-
* Get paper details by ID
|
|
91
|
-
*/
|
|
92
|
-
get(options) {
|
|
93
|
-
return (options.client ?? this._client).get({
|
|
94
|
-
url: "/fds/paper/{id}",
|
|
95
|
-
...options,
|
|
96
|
-
});
|
|
97
|
-
}
|
|
98
|
-
/**
|
|
99
|
-
* List all loaded papers
|
|
100
|
-
*/
|
|
101
|
-
list(options) {
|
|
102
|
-
return (options?.client ?? this._client).get({
|
|
103
|
-
url: "/fds/paper",
|
|
104
|
-
...options,
|
|
105
|
-
});
|
|
106
|
-
}
|
|
107
|
-
/**
|
|
108
|
-
* Update the current phase for a paper
|
|
109
|
-
*/
|
|
110
|
-
phase(options) {
|
|
111
|
-
return (options.client ?? this._client).patch({
|
|
112
|
-
url: "/fds/paper/{id}/phase",
|
|
113
|
-
...options,
|
|
114
|
-
headers: {
|
|
115
|
-
"Content-Type": "application/json",
|
|
116
|
-
...options.headers,
|
|
117
|
-
},
|
|
118
|
-
});
|
|
119
|
-
}
|
|
120
|
-
current = new Current({ client: this._client });
|
|
121
|
-
spec = new Spec({ client: this._client });
|
|
122
|
-
}
|
|
123
|
-
class Fds extends _HeyApiClient {
|
|
124
|
-
/**
|
|
125
|
-
* Check if FDS dependencies (PyPDF2) are available
|
|
126
|
-
*/
|
|
127
|
-
dependencies(options) {
|
|
128
|
-
return (options?.client ?? this._client).get({
|
|
129
|
-
url: "/fds/dependencies",
|
|
130
|
-
...options,
|
|
131
|
-
});
|
|
132
|
-
}
|
|
133
|
-
paper = new Paper({ client: this._client });
|
|
134
|
-
}
|
|
135
31
|
class Config extends _HeyApiClient {
|
|
136
32
|
/**
|
|
137
33
|
* Get config info
|
|
@@ -303,19 +199,6 @@ class Session extends _HeyApiClient {
|
|
|
303
199
|
...options,
|
|
304
200
|
});
|
|
305
201
|
}
|
|
306
|
-
/**
|
|
307
|
-
* Toggle auto-approve permission for a session
|
|
308
|
-
*/
|
|
309
|
-
togglePermission(options) {
|
|
310
|
-
return (options.client ?? this._client).patch({
|
|
311
|
-
url: "/session/{id}/permission",
|
|
312
|
-
...options,
|
|
313
|
-
headers: {
|
|
314
|
-
"Content-Type": "application/json",
|
|
315
|
-
...options.headers,
|
|
316
|
-
},
|
|
317
|
-
});
|
|
318
|
-
}
|
|
319
202
|
/**
|
|
320
203
|
* Unshare the session
|
|
321
204
|
*/
|
|
@@ -529,21 +412,6 @@ class App extends _HeyApiClient {
|
|
|
529
412
|
});
|
|
530
413
|
}
|
|
531
414
|
}
|
|
532
|
-
class Agent extends _HeyApiClient {
|
|
533
|
-
/**
|
|
534
|
-
* Update agent permission settings
|
|
535
|
-
*/
|
|
536
|
-
updatePermission(options) {
|
|
537
|
-
return (options.client ?? this._client).patch({
|
|
538
|
-
url: "/agent/{name}/permission",
|
|
539
|
-
...options,
|
|
540
|
-
headers: {
|
|
541
|
-
"Content-Type": "application/json",
|
|
542
|
-
...options.headers,
|
|
543
|
-
},
|
|
544
|
-
});
|
|
545
|
-
}
|
|
546
|
-
}
|
|
547
415
|
class Mcp extends _HeyApiClient {
|
|
548
416
|
/**
|
|
549
417
|
* Get MCP server status
|
|
@@ -554,33 +422,6 @@ class Mcp extends _HeyApiClient {
|
|
|
554
422
|
...options,
|
|
555
423
|
});
|
|
556
424
|
}
|
|
557
|
-
/**
|
|
558
|
-
* Refresh all MCP servers - reloads config and reconnects
|
|
559
|
-
*/
|
|
560
|
-
refresh(options) {
|
|
561
|
-
return (options?.client ?? this._client).post({
|
|
562
|
-
url: "/mcp/refresh",
|
|
563
|
-
...options,
|
|
564
|
-
});
|
|
565
|
-
}
|
|
566
|
-
/**
|
|
567
|
-
* Enable an MCP server
|
|
568
|
-
*/
|
|
569
|
-
enable(options) {
|
|
570
|
-
return (options.client ?? this._client).post({
|
|
571
|
-
url: "/mcp/{name}/enable",
|
|
572
|
-
...options,
|
|
573
|
-
});
|
|
574
|
-
}
|
|
575
|
-
/**
|
|
576
|
-
* Disable an MCP server
|
|
577
|
-
*/
|
|
578
|
-
disable(options) {
|
|
579
|
-
return (options.client ?? this._client).post({
|
|
580
|
-
url: "/mcp/{name}/disable",
|
|
581
|
-
...options,
|
|
582
|
-
});
|
|
583
|
-
}
|
|
584
425
|
}
|
|
585
426
|
class Tui extends _HeyApiClient {
|
|
586
427
|
/**
|
|
@@ -718,7 +559,6 @@ export class OpencodeClient extends _HeyApiClient {
|
|
|
718
559
|
});
|
|
719
560
|
}
|
|
720
561
|
project = new Project({ client: this._client });
|
|
721
|
-
fds = new Fds({ client: this._client });
|
|
722
562
|
config = new Config({ client: this._client });
|
|
723
563
|
tool = new Tool({ client: this._client });
|
|
724
564
|
path = new Path({ client: this._client });
|
|
@@ -727,7 +567,6 @@ export class OpencodeClient extends _HeyApiClient {
|
|
|
727
567
|
find = new Find({ client: this._client });
|
|
728
568
|
file = new File({ client: this._client });
|
|
729
569
|
app = new App({ client: this._client });
|
|
730
|
-
agent = new Agent({ client: this._client });
|
|
731
570
|
mcp = new Mcp({ client: this._client });
|
|
732
571
|
tui = new Tui({ client: this._client });
|
|
733
572
|
auth = new Auth({ client: this._client });
|
package/gen/types.gen.d.ts
CHANGED
|
@@ -331,10 +331,6 @@ export type Config = {
|
|
|
331
331
|
* Automatically update to the latest version
|
|
332
332
|
*/
|
|
333
333
|
autoupdate?: boolean;
|
|
334
|
-
/**
|
|
335
|
-
* Custom update server URL for checking and downloading updates
|
|
336
|
-
*/
|
|
337
|
-
updateServer?: string;
|
|
338
334
|
/**
|
|
339
335
|
* Disable providers that are loaded automatically
|
|
340
336
|
*/
|
|
@@ -457,10 +453,6 @@ export type Config = {
|
|
|
457
453
|
* Additional instruction files or patterns to include
|
|
458
454
|
*/
|
|
459
455
|
instructions?: Array<string>;
|
|
460
|
-
/**
|
|
461
|
-
* System prompt preset: beast (OpenAI), qwen (default), anthropic, gemini, codex, minimal, or none
|
|
462
|
-
*/
|
|
463
|
-
systemPrompt?: "beast" | "qwen" | "anthropic" | "gemini" | "codex" | "minimal" | "none";
|
|
464
456
|
layout?: LayoutConfig;
|
|
465
457
|
permission?: {
|
|
466
458
|
edit?: "ask" | "allow" | "deny";
|
|
@@ -489,28 +481,8 @@ export type Config = {
|
|
|
489
481
|
};
|
|
490
482
|
}>;
|
|
491
483
|
};
|
|
492
|
-
/**
|
|
493
|
-
* Number of retries for chat completions on failure
|
|
494
|
-
*/
|
|
495
|
-
chatMaxRetries?: number;
|
|
496
484
|
disable_paste_summary?: boolean;
|
|
497
485
|
};
|
|
498
|
-
/**
|
|
499
|
-
* Enable data science mode for Jupyter notebook support
|
|
500
|
-
*/
|
|
501
|
-
dataScienceMode?: boolean;
|
|
502
|
-
/**
|
|
503
|
-
* Enable spec trajectory evaluation mode for improving specs based on execution feedback
|
|
504
|
-
*/
|
|
505
|
-
specTrajectoryMode?: boolean;
|
|
506
|
-
/**
|
|
507
|
-
* List of enabled MCP server IDs
|
|
508
|
-
*/
|
|
509
|
-
enabledMcps?: Array<string>;
|
|
510
|
-
/**
|
|
511
|
-
* Whether the selected model is a public model
|
|
512
|
-
*/
|
|
513
|
-
public?: boolean;
|
|
514
486
|
};
|
|
515
487
|
export type BadRequestError = {
|
|
516
488
|
data: unknown | null;
|
|
@@ -544,7 +516,6 @@ export type Session = {
|
|
|
544
516
|
projectID: string;
|
|
545
517
|
directory: string;
|
|
546
518
|
parentID?: string;
|
|
547
|
-
userContext?: string;
|
|
548
519
|
summary?: {
|
|
549
520
|
diffs: Array<FileDiff>;
|
|
550
521
|
};
|
|
@@ -1192,401 +1163,6 @@ export type ProjectCurrentResponses = {
|
|
|
1192
1163
|
200: Project;
|
|
1193
1164
|
};
|
|
1194
1165
|
export type ProjectCurrentResponse = ProjectCurrentResponses[keyof ProjectCurrentResponses];
|
|
1195
|
-
export type FdsDependenciesData = {
|
|
1196
|
-
body?: never;
|
|
1197
|
-
path?: never;
|
|
1198
|
-
query?: {
|
|
1199
|
-
directory?: string;
|
|
1200
|
-
};
|
|
1201
|
-
url: "/fds/dependencies";
|
|
1202
|
-
};
|
|
1203
|
-
export type FdsDependenciesResponses = {
|
|
1204
|
-
/**
|
|
1205
|
-
* Dependency check result
|
|
1206
|
-
*/
|
|
1207
|
-
200: {
|
|
1208
|
-
available: boolean;
|
|
1209
|
-
message: string;
|
|
1210
|
-
};
|
|
1211
|
-
};
|
|
1212
|
-
export type FdsDependenciesResponse = FdsDependenciesResponses[keyof FdsDependenciesResponses];
|
|
1213
|
-
export type FdsPaperLoadData = {
|
|
1214
|
-
body?: {
|
|
1215
|
-
/**
|
|
1216
|
-
* File path or URL to the paper
|
|
1217
|
-
*/
|
|
1218
|
-
source: string;
|
|
1219
|
-
};
|
|
1220
|
-
path?: never;
|
|
1221
|
-
query?: {
|
|
1222
|
-
directory?: string;
|
|
1223
|
-
};
|
|
1224
|
-
url: "/fds/paper/load";
|
|
1225
|
-
};
|
|
1226
|
-
export type FdsPaperLoadResponses = {
|
|
1227
|
-
/**
|
|
1228
|
-
* Paper loaded successfully
|
|
1229
|
-
*/
|
|
1230
|
-
200: {
|
|
1231
|
-
success: boolean;
|
|
1232
|
-
paperId?: string;
|
|
1233
|
-
metadata?: {
|
|
1234
|
-
title: string;
|
|
1235
|
-
authors: Array<string>;
|
|
1236
|
-
year: string;
|
|
1237
|
-
abstract: string;
|
|
1238
|
-
source: string;
|
|
1239
|
-
pages: number;
|
|
1240
|
-
arxivId?: string;
|
|
1241
|
-
};
|
|
1242
|
-
preview?: string;
|
|
1243
|
-
error?: string;
|
|
1244
|
-
};
|
|
1245
|
-
};
|
|
1246
|
-
export type FdsPaperLoadResponse = FdsPaperLoadResponses[keyof FdsPaperLoadResponses];
|
|
1247
|
-
export type FdsPaperCurrentContextData = {
|
|
1248
|
-
body?: never;
|
|
1249
|
-
path?: never;
|
|
1250
|
-
query?: {
|
|
1251
|
-
directory?: string;
|
|
1252
|
-
};
|
|
1253
|
-
url: "/fds/paper/current/context";
|
|
1254
|
-
};
|
|
1255
|
-
export type FdsPaperCurrentContextErrors = {
|
|
1256
|
-
/**
|
|
1257
|
-
* No paper loaded
|
|
1258
|
-
*/
|
|
1259
|
-
404: unknown;
|
|
1260
|
-
};
|
|
1261
|
-
export type FdsPaperCurrentContextResponses = {
|
|
1262
|
-
/**
|
|
1263
|
-
* Paper context for LLM
|
|
1264
|
-
*/
|
|
1265
|
-
200: {
|
|
1266
|
-
context: string;
|
|
1267
|
-
paperId: string;
|
|
1268
|
-
phase: "setup" | "data" | "preprocess" | "model" | "signal" | "backtest" | "validate" | "report";
|
|
1269
|
-
completedPhases: Array<"setup" | "data" | "preprocess" | "model" | "signal" | "backtest" | "validate" | "report">;
|
|
1270
|
-
};
|
|
1271
|
-
};
|
|
1272
|
-
export type FdsPaperCurrentContextResponse = FdsPaperCurrentContextResponses[keyof FdsPaperCurrentContextResponses];
|
|
1273
|
-
export type FdsPaperContextData = {
|
|
1274
|
-
body?: never;
|
|
1275
|
-
path: {
|
|
1276
|
-
/**
|
|
1277
|
-
* Paper ID
|
|
1278
|
-
*/
|
|
1279
|
-
id: string;
|
|
1280
|
-
};
|
|
1281
|
-
query?: {
|
|
1282
|
-
directory?: string;
|
|
1283
|
-
};
|
|
1284
|
-
url: "/fds/paper/{id}/context";
|
|
1285
|
-
};
|
|
1286
|
-
export type FdsPaperContextErrors = {
|
|
1287
|
-
/**
|
|
1288
|
-
* Paper not found
|
|
1289
|
-
*/
|
|
1290
|
-
404: unknown;
|
|
1291
|
-
};
|
|
1292
|
-
export type FdsPaperContextResponses = {
|
|
1293
|
-
/**
|
|
1294
|
-
* Paper context for LLM
|
|
1295
|
-
*/
|
|
1296
|
-
200: {
|
|
1297
|
-
context: string;
|
|
1298
|
-
paperId: string;
|
|
1299
|
-
phase: "setup" | "data" | "preprocess" | "model" | "signal" | "backtest" | "validate" | "report";
|
|
1300
|
-
completedPhases: Array<"setup" | "data" | "preprocess" | "model" | "signal" | "backtest" | "validate" | "report">;
|
|
1301
|
-
};
|
|
1302
|
-
};
|
|
1303
|
-
export type FdsPaperContextResponse = FdsPaperContextResponses[keyof FdsPaperContextResponses];
|
|
1304
|
-
export type FdsPaperDeleteData = {
|
|
1305
|
-
body?: never;
|
|
1306
|
-
path: {
|
|
1307
|
-
id: string;
|
|
1308
|
-
};
|
|
1309
|
-
query?: {
|
|
1310
|
-
directory?: string;
|
|
1311
|
-
};
|
|
1312
|
-
url: "/fds/paper/{id}";
|
|
1313
|
-
};
|
|
1314
|
-
export type FdsPaperDeleteResponses = {
|
|
1315
|
-
/**
|
|
1316
|
-
* Paper deleted
|
|
1317
|
-
*/
|
|
1318
|
-
200: {
|
|
1319
|
-
success: boolean;
|
|
1320
|
-
};
|
|
1321
|
-
};
|
|
1322
|
-
export type FdsPaperDeleteResponse = FdsPaperDeleteResponses[keyof FdsPaperDeleteResponses];
|
|
1323
|
-
export type FdsPaperGetData = {
|
|
1324
|
-
body?: never;
|
|
1325
|
-
path: {
|
|
1326
|
-
id: string;
|
|
1327
|
-
};
|
|
1328
|
-
query?: {
|
|
1329
|
-
directory?: string;
|
|
1330
|
-
};
|
|
1331
|
-
url: "/fds/paper/{id}";
|
|
1332
|
-
};
|
|
1333
|
-
export type FdsPaperGetErrors = {
|
|
1334
|
-
/**
|
|
1335
|
-
* Paper not found
|
|
1336
|
-
*/
|
|
1337
|
-
404: unknown;
|
|
1338
|
-
};
|
|
1339
|
-
export type FdsPaperGetResponses = {
|
|
1340
|
-
/**
|
|
1341
|
-
* Paper details
|
|
1342
|
-
*/
|
|
1343
|
-
200: {
|
|
1344
|
-
id: string;
|
|
1345
|
-
metadata: {
|
|
1346
|
-
title: string;
|
|
1347
|
-
authors: Array<string>;
|
|
1348
|
-
year: string;
|
|
1349
|
-
abstract: string;
|
|
1350
|
-
source: string;
|
|
1351
|
-
pages: number;
|
|
1352
|
-
arxivId?: string;
|
|
1353
|
-
};
|
|
1354
|
-
fdsSpec: {
|
|
1355
|
-
paper?: {
|
|
1356
|
-
title: string;
|
|
1357
|
-
arxivId?: string;
|
|
1358
|
-
source: string;
|
|
1359
|
-
};
|
|
1360
|
-
classification?: {
|
|
1361
|
-
paperType?: "forecasting" | "trading_strategy" | "hybrid";
|
|
1362
|
-
modelOutputType?: "forecast" | "signal" | "position_weight";
|
|
1363
|
-
optimizationLevel?: "pointwise" | "portfolio";
|
|
1364
|
-
};
|
|
1365
|
-
dataRequirements?: {
|
|
1366
|
-
source?: string;
|
|
1367
|
-
dateRange?: {
|
|
1368
|
-
start: string;
|
|
1369
|
-
end: string;
|
|
1370
|
-
};
|
|
1371
|
-
assets?: string;
|
|
1372
|
-
features?: Array<string>;
|
|
1373
|
-
universeFilters?: {
|
|
1374
|
-
[key: string]: unknown;
|
|
1375
|
-
};
|
|
1376
|
-
};
|
|
1377
|
-
preprocessing?: {
|
|
1378
|
-
standardization?: string;
|
|
1379
|
-
outlierHandling?: string;
|
|
1380
|
-
lookbackWindow?: number;
|
|
1381
|
-
missingData?: string;
|
|
1382
|
-
};
|
|
1383
|
-
modelArchitecture?: {
|
|
1384
|
-
type?: string;
|
|
1385
|
-
layers?: Array<string>;
|
|
1386
|
-
lossFunction?: string;
|
|
1387
|
-
hyperparameters?: {
|
|
1388
|
-
[key: string]: unknown;
|
|
1389
|
-
};
|
|
1390
|
-
};
|
|
1391
|
-
signalGeneration?: {
|
|
1392
|
-
method?: string;
|
|
1393
|
-
threshold?: string;
|
|
1394
|
-
tradingRules?: {
|
|
1395
|
-
[key: string]: unknown;
|
|
1396
|
-
};
|
|
1397
|
-
};
|
|
1398
|
-
instrumentMechanics?: {
|
|
1399
|
-
type?: "futures" | "equity" | "fx" | "crypto" | "options";
|
|
1400
|
-
rollRules?: {
|
|
1401
|
-
method?: string;
|
|
1402
|
-
rollWindow?: number;
|
|
1403
|
-
};
|
|
1404
|
-
contractMultiplier?: number;
|
|
1405
|
-
currency?: string;
|
|
1406
|
-
};
|
|
1407
|
-
positionMapping?: {
|
|
1408
|
-
type?: "linear" | "sign" | "nonlinear";
|
|
1409
|
-
leverageBounds?: [number, number];
|
|
1410
|
-
};
|
|
1411
|
-
portfolioConstruction?: {
|
|
1412
|
-
crossAssetWeighting?: "equal" | "inverse_vol" | "risk_parity";
|
|
1413
|
-
rebalanceFrequency?: "daily" | "weekly" | "monthly";
|
|
1414
|
-
grossExposureTarget?: number;
|
|
1415
|
-
};
|
|
1416
|
-
reestimationPolicy?: {
|
|
1417
|
-
type?: "fixed" | "expanding" | "rolling";
|
|
1418
|
-
retrainFrequency?: string;
|
|
1419
|
-
initialTrainWindow?: string;
|
|
1420
|
-
};
|
|
1421
|
-
transactionCosts?: {
|
|
1422
|
-
commissionBps?: number;
|
|
1423
|
-
slippageBps?: number;
|
|
1424
|
-
marketImpactModel?: string;
|
|
1425
|
-
};
|
|
1426
|
-
backtestConfig?: {
|
|
1427
|
-
methodology?: string;
|
|
1428
|
-
metrics?: Array<string>;
|
|
1429
|
-
trainTestSplit?: string;
|
|
1430
|
-
bootstrapMethod?: string;
|
|
1431
|
-
nSamples?: number;
|
|
1432
|
-
};
|
|
1433
|
-
} | null;
|
|
1434
|
-
currentPhase: "setup" | "data" | "preprocess" | "model" | "signal" | "backtest" | "validate" | "report";
|
|
1435
|
-
fullMarkdown: string;
|
|
1436
|
-
implementationStatus: {
|
|
1437
|
-
completedPhases: Array<"setup" | "data" | "preprocess" | "model" | "signal" | "backtest" | "validate" | "report">;
|
|
1438
|
-
currentPhaseStatus: string;
|
|
1439
|
-
};
|
|
1440
|
-
classification?: {
|
|
1441
|
-
paperType: "forecasting" | "trading_strategy" | "hybrid";
|
|
1442
|
-
confidence: "high" | "medium" | "low";
|
|
1443
|
-
recommendedGuide: "nixtla" | "trading" | "both";
|
|
1444
|
-
reasoning: string;
|
|
1445
|
-
};
|
|
1446
|
-
};
|
|
1447
|
-
};
|
|
1448
|
-
export type FdsPaperGetResponse = FdsPaperGetResponses[keyof FdsPaperGetResponses];
|
|
1449
|
-
export type FdsPaperListData = {
|
|
1450
|
-
body?: never;
|
|
1451
|
-
path?: never;
|
|
1452
|
-
query?: {
|
|
1453
|
-
directory?: string;
|
|
1454
|
-
};
|
|
1455
|
-
url: "/fds/paper";
|
|
1456
|
-
};
|
|
1457
|
-
export type FdsPaperListResponses = {
|
|
1458
|
-
/**
|
|
1459
|
-
* List of papers
|
|
1460
|
-
*/
|
|
1461
|
-
200: Array<{
|
|
1462
|
-
id: string;
|
|
1463
|
-
title: string;
|
|
1464
|
-
pages: number;
|
|
1465
|
-
source: string;
|
|
1466
|
-
arxivId?: string;
|
|
1467
|
-
currentPhase: "setup" | "data" | "preprocess" | "model" | "signal" | "backtest" | "validate" | "report";
|
|
1468
|
-
}>;
|
|
1469
|
-
};
|
|
1470
|
-
export type FdsPaperListResponse = FdsPaperListResponses[keyof FdsPaperListResponses];
|
|
1471
|
-
export type FdsPaperPhaseData = {
|
|
1472
|
-
body?: {
|
|
1473
|
-
phase: "setup" | "data" | "preprocess" | "model" | "signal" | "backtest" | "validate" | "report";
|
|
1474
|
-
};
|
|
1475
|
-
path: {
|
|
1476
|
-
id: string;
|
|
1477
|
-
};
|
|
1478
|
-
query?: {
|
|
1479
|
-
directory?: string;
|
|
1480
|
-
};
|
|
1481
|
-
url: "/fds/paper/{id}/phase";
|
|
1482
|
-
};
|
|
1483
|
-
export type FdsPaperPhaseResponses = {
|
|
1484
|
-
/**
|
|
1485
|
-
* Phase updated
|
|
1486
|
-
*/
|
|
1487
|
-
200: {
|
|
1488
|
-
success: boolean;
|
|
1489
|
-
};
|
|
1490
|
-
};
|
|
1491
|
-
export type FdsPaperPhaseResponse = FdsPaperPhaseResponses[keyof FdsPaperPhaseResponses];
|
|
1492
|
-
export type FdsPaperSpecSetData = {
|
|
1493
|
-
body?: {
|
|
1494
|
-
paper?: {
|
|
1495
|
-
title: string;
|
|
1496
|
-
arxivId?: string;
|
|
1497
|
-
source: string;
|
|
1498
|
-
};
|
|
1499
|
-
classification?: {
|
|
1500
|
-
paperType?: "forecasting" | "trading_strategy" | "hybrid";
|
|
1501
|
-
modelOutputType?: "forecast" | "signal" | "position_weight";
|
|
1502
|
-
optimizationLevel?: "pointwise" | "portfolio";
|
|
1503
|
-
};
|
|
1504
|
-
dataRequirements?: {
|
|
1505
|
-
source?: string;
|
|
1506
|
-
dateRange?: {
|
|
1507
|
-
start: string;
|
|
1508
|
-
end: string;
|
|
1509
|
-
};
|
|
1510
|
-
assets?: string;
|
|
1511
|
-
features?: Array<string>;
|
|
1512
|
-
universeFilters?: {
|
|
1513
|
-
[key: string]: unknown;
|
|
1514
|
-
};
|
|
1515
|
-
};
|
|
1516
|
-
preprocessing?: {
|
|
1517
|
-
standardization?: string;
|
|
1518
|
-
outlierHandling?: string;
|
|
1519
|
-
lookbackWindow?: number;
|
|
1520
|
-
missingData?: string;
|
|
1521
|
-
};
|
|
1522
|
-
modelArchitecture?: {
|
|
1523
|
-
type?: string;
|
|
1524
|
-
layers?: Array<string>;
|
|
1525
|
-
lossFunction?: string;
|
|
1526
|
-
hyperparameters?: {
|
|
1527
|
-
[key: string]: unknown;
|
|
1528
|
-
};
|
|
1529
|
-
};
|
|
1530
|
-
signalGeneration?: {
|
|
1531
|
-
method?: string;
|
|
1532
|
-
threshold?: string;
|
|
1533
|
-
tradingRules?: {
|
|
1534
|
-
[key: string]: unknown;
|
|
1535
|
-
};
|
|
1536
|
-
};
|
|
1537
|
-
instrumentMechanics?: {
|
|
1538
|
-
type?: "futures" | "equity" | "fx" | "crypto" | "options";
|
|
1539
|
-
rollRules?: {
|
|
1540
|
-
method?: string;
|
|
1541
|
-
rollWindow?: number;
|
|
1542
|
-
};
|
|
1543
|
-
contractMultiplier?: number;
|
|
1544
|
-
currency?: string;
|
|
1545
|
-
};
|
|
1546
|
-
positionMapping?: {
|
|
1547
|
-
type?: "linear" | "sign" | "nonlinear";
|
|
1548
|
-
leverageBounds?: [number, number];
|
|
1549
|
-
};
|
|
1550
|
-
portfolioConstruction?: {
|
|
1551
|
-
crossAssetWeighting?: "equal" | "inverse_vol" | "risk_parity";
|
|
1552
|
-
rebalanceFrequency?: "daily" | "weekly" | "monthly";
|
|
1553
|
-
grossExposureTarget?: number;
|
|
1554
|
-
};
|
|
1555
|
-
reestimationPolicy?: {
|
|
1556
|
-
type?: "fixed" | "expanding" | "rolling";
|
|
1557
|
-
retrainFrequency?: string;
|
|
1558
|
-
initialTrainWindow?: string;
|
|
1559
|
-
};
|
|
1560
|
-
transactionCosts?: {
|
|
1561
|
-
commissionBps?: number;
|
|
1562
|
-
slippageBps?: number;
|
|
1563
|
-
marketImpactModel?: string;
|
|
1564
|
-
};
|
|
1565
|
-
backtestConfig?: {
|
|
1566
|
-
methodology?: string;
|
|
1567
|
-
metrics?: Array<string>;
|
|
1568
|
-
trainTestSplit?: string;
|
|
1569
|
-
bootstrapMethod?: string;
|
|
1570
|
-
nSamples?: number;
|
|
1571
|
-
};
|
|
1572
|
-
};
|
|
1573
|
-
path: {
|
|
1574
|
-
id: string;
|
|
1575
|
-
};
|
|
1576
|
-
query?: {
|
|
1577
|
-
directory?: string;
|
|
1578
|
-
};
|
|
1579
|
-
url: "/fds/paper/{id}/spec";
|
|
1580
|
-
};
|
|
1581
|
-
export type FdsPaperSpecSetResponses = {
|
|
1582
|
-
/**
|
|
1583
|
-
* Spec set
|
|
1584
|
-
*/
|
|
1585
|
-
200: {
|
|
1586
|
-
success: boolean;
|
|
1587
|
-
};
|
|
1588
|
-
};
|
|
1589
|
-
export type FdsPaperSpecSetResponse = FdsPaperSpecSetResponses[keyof FdsPaperSpecSetResponses];
|
|
1590
1166
|
export type ConfigGetData = {
|
|
1591
1167
|
body?: never;
|
|
1592
1168
|
path?: never;
|
|
@@ -1952,38 +1528,6 @@ export type SessionAbortResponses = {
|
|
|
1952
1528
|
200: boolean;
|
|
1953
1529
|
};
|
|
1954
1530
|
export type SessionAbortResponse = SessionAbortResponses[keyof SessionAbortResponses];
|
|
1955
|
-
export type SessionTogglePermissionData = {
|
|
1956
|
-
body?: {
|
|
1957
|
-
enabled: boolean;
|
|
1958
|
-
};
|
|
1959
|
-
path: {
|
|
1960
|
-
id: string;
|
|
1961
|
-
};
|
|
1962
|
-
query?: {
|
|
1963
|
-
directory?: string;
|
|
1964
|
-
};
|
|
1965
|
-
url: "/session/{id}/permission";
|
|
1966
|
-
};
|
|
1967
|
-
export type SessionTogglePermissionErrors = {
|
|
1968
|
-
/**
|
|
1969
|
-
* Bad request
|
|
1970
|
-
*/
|
|
1971
|
-
400: BadRequestError;
|
|
1972
|
-
/**
|
|
1973
|
-
* Not found
|
|
1974
|
-
*/
|
|
1975
|
-
404: NotFoundError;
|
|
1976
|
-
};
|
|
1977
|
-
export type SessionTogglePermissionError = SessionTogglePermissionErrors[keyof SessionTogglePermissionErrors];
|
|
1978
|
-
export type SessionTogglePermissionResponses = {
|
|
1979
|
-
/**
|
|
1980
|
-
* Permission mode updated successfully
|
|
1981
|
-
*/
|
|
1982
|
-
200: {
|
|
1983
|
-
enabled: boolean;
|
|
1984
|
-
};
|
|
1985
|
-
};
|
|
1986
|
-
export type SessionTogglePermissionResponse = SessionTogglePermissionResponses[keyof SessionTogglePermissionResponses];
|
|
1987
1531
|
export type SessionUnshareData = {
|
|
1988
1532
|
body?: never;
|
|
1989
1533
|
path: {
|
|
@@ -2577,40 +2121,6 @@ export type AppAgentsResponses = {
|
|
|
2577
2121
|
200: Array<Agent>;
|
|
2578
2122
|
};
|
|
2579
2123
|
export type AppAgentsResponse = AppAgentsResponses[keyof AppAgentsResponses];
|
|
2580
|
-
export type AgentUpdatePermissionData = {
|
|
2581
|
-
body?: {
|
|
2582
|
-
edit?: "ask" | "allow" | "deny";
|
|
2583
|
-
bash?: {
|
|
2584
|
-
[key: string]: "ask" | "allow" | "deny";
|
|
2585
|
-
};
|
|
2586
|
-
webfetch?: "ask" | "allow" | "deny";
|
|
2587
|
-
};
|
|
2588
|
-
path: {
|
|
2589
|
-
name: string;
|
|
2590
|
-
};
|
|
2591
|
-
query?: {
|
|
2592
|
-
directory?: string;
|
|
2593
|
-
};
|
|
2594
|
-
url: "/agent/{name}/permission";
|
|
2595
|
-
};
|
|
2596
|
-
export type AgentUpdatePermissionErrors = {
|
|
2597
|
-
/**
|
|
2598
|
-
* Bad request
|
|
2599
|
-
*/
|
|
2600
|
-
400: BadRequestError;
|
|
2601
|
-
/**
|
|
2602
|
-
* Not found
|
|
2603
|
-
*/
|
|
2604
|
-
404: NotFoundError;
|
|
2605
|
-
};
|
|
2606
|
-
export type AgentUpdatePermissionError = AgentUpdatePermissionErrors[keyof AgentUpdatePermissionErrors];
|
|
2607
|
-
export type AgentUpdatePermissionResponses = {
|
|
2608
|
-
/**
|
|
2609
|
-
* Permission updated successfully
|
|
2610
|
-
*/
|
|
2611
|
-
200: Agent;
|
|
2612
|
-
};
|
|
2613
|
-
export type AgentUpdatePermissionResponse = AgentUpdatePermissionResponses[keyof AgentUpdatePermissionResponses];
|
|
2614
2124
|
export type McpStatusData = {
|
|
2615
2125
|
body?: never;
|
|
2616
2126
|
path?: never;
|
|
@@ -2625,52 +2135,6 @@ export type McpStatusResponses = {
|
|
|
2625
2135
|
*/
|
|
2626
2136
|
200: unknown;
|
|
2627
2137
|
};
|
|
2628
|
-
export type McpRefreshData = {
|
|
2629
|
-
body?: never;
|
|
2630
|
-
path?: never;
|
|
2631
|
-
query?: {
|
|
2632
|
-
directory?: string;
|
|
2633
|
-
};
|
|
2634
|
-
url: "/mcp/refresh";
|
|
2635
|
-
};
|
|
2636
|
-
export type McpRefreshResponses = {
|
|
2637
|
-
/**
|
|
2638
|
-
* MCP servers refreshed
|
|
2639
|
-
*/
|
|
2640
|
-
200: unknown;
|
|
2641
|
-
};
|
|
2642
|
-
export type McpEnableData = {
|
|
2643
|
-
body?: never;
|
|
2644
|
-
path: {
|
|
2645
|
-
name: string;
|
|
2646
|
-
};
|
|
2647
|
-
query?: {
|
|
2648
|
-
directory?: string;
|
|
2649
|
-
};
|
|
2650
|
-
url: "/mcp/{name}/enable";
|
|
2651
|
-
};
|
|
2652
|
-
export type McpEnableResponses = {
|
|
2653
|
-
/**
|
|
2654
|
-
* MCP server enabled
|
|
2655
|
-
*/
|
|
2656
|
-
200: unknown;
|
|
2657
|
-
};
|
|
2658
|
-
export type McpDisableData = {
|
|
2659
|
-
body?: never;
|
|
2660
|
-
path: {
|
|
2661
|
-
name: string;
|
|
2662
|
-
};
|
|
2663
|
-
query?: {
|
|
2664
|
-
directory?: string;
|
|
2665
|
-
};
|
|
2666
|
-
url: "/mcp/{name}/disable";
|
|
2667
|
-
};
|
|
2668
|
-
export type McpDisableResponses = {
|
|
2669
|
-
/**
|
|
2670
|
-
* MCP server disabled
|
|
2671
|
-
*/
|
|
2672
|
-
200: unknown;
|
|
2673
|
-
};
|
|
2674
2138
|
export type TuiAppendPromptData = {
|
|
2675
2139
|
body?: {
|
|
2676
2140
|
text: string;
|
package/package.json
CHANGED
|
@@ -1,22 +1,33 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xutest1/sdk",
|
|
3
|
-
"version": "0.3.
|
|
4
|
-
"description": "
|
|
5
|
-
"author": "A3Code",
|
|
6
|
-
"license": "MIT",
|
|
3
|
+
"version": "0.3.3",
|
|
4
|
+
"description": "A3CODE SDK - AI coding assistant SDK",
|
|
7
5
|
"type": "module",
|
|
8
|
-
"main": "
|
|
9
|
-
"types": "./index.d.ts",
|
|
6
|
+
"main": "index.js",
|
|
10
7
|
"exports": {
|
|
11
|
-
".":
|
|
12
|
-
"./client":
|
|
13
|
-
"./server":
|
|
8
|
+
".": "./index.js",
|
|
9
|
+
"./client": "./client.js",
|
|
10
|
+
"./server": "./server.js"
|
|
14
11
|
},
|
|
12
|
+
"files": [
|
|
13
|
+
"*.js",
|
|
14
|
+
"*.d.ts",
|
|
15
|
+
"gen/**"
|
|
16
|
+
],
|
|
17
|
+
"keywords": [
|
|
18
|
+
"a3code",
|
|
19
|
+
"ai",
|
|
20
|
+
"sdk",
|
|
21
|
+
"coding",
|
|
22
|
+
"assistant"
|
|
23
|
+
],
|
|
24
|
+
"author": "A3CODE",
|
|
25
|
+
"license": "MIT",
|
|
15
26
|
"optionalDependencies": {
|
|
16
|
-
"@xutest1/darwin-arm64": "0.3.
|
|
17
|
-
"@xutest1/darwin-x64": "0.3.
|
|
18
|
-
"@xutest1/linux-arm64": "0.3.
|
|
19
|
-
"@xutest1/linux-x64": "0.3.
|
|
20
|
-
"@xutest1/windows-x64": "0.3.
|
|
27
|
+
"@xutest1/darwin-arm64": "0.3.2",
|
|
28
|
+
"@xutest1/darwin-x64": "0.3.2",
|
|
29
|
+
"@xutest1/linux-arm64": "0.3.2",
|
|
30
|
+
"@xutest1/linux-x64": "0.3.2",
|
|
31
|
+
"@xutest1/windows-x64": "0.3.2"
|
|
21
32
|
}
|
|
22
|
-
}
|
|
33
|
+
}
|
package/server.js
CHANGED
|
@@ -7,15 +7,12 @@ function findBinary() {
|
|
|
7
7
|
const arch = process.arch === "arm64" ? "arm64" : "x64";
|
|
8
8
|
const platformKey = `${platform}-${arch}`;
|
|
9
9
|
const exe = process.platform === "win32" ? "ae3code.exe" : "ae3code";
|
|
10
|
-
// Get the directory where this SDK is installed
|
|
11
10
|
const sdkDir = dirname(fileURLToPath(import.meta.url));
|
|
12
|
-
// Go up to node_modules/@scope, then into the platform package
|
|
13
11
|
const scopeDir = dirname(sdkDir);
|
|
14
12
|
const binaryPath = join(scopeDir, platformKey, "bin", exe);
|
|
15
13
|
if (existsSync(binaryPath)) {
|
|
16
14
|
return binaryPath;
|
|
17
15
|
}
|
|
18
|
-
// Fallback to PATH
|
|
19
16
|
return "ae3code";
|
|
20
17
|
}
|
|
21
18
|
export async function createOpencodeServer(options) {
|
|
@@ -95,8 +92,7 @@ export function createOpencodeTui(options) {
|
|
|
95
92
|
if (options?.agent) {
|
|
96
93
|
args.push(`--agent=${options.agent}`);
|
|
97
94
|
}
|
|
98
|
-
const
|
|
99
|
-
const proc = spawn(binaryPath, args, {
|
|
95
|
+
const proc = spawn(`ae3code`, args, {
|
|
100
96
|
signal: options?.signal,
|
|
101
97
|
stdio: "inherit",
|
|
102
98
|
env: {
|