@zyraxon-ai/sdk 19.0.2 → 19.0.4
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/dist/client.d.ts +8 -0
- package/dist/client.d.ts.map +1 -0
- package/dist/client.js +54 -0
- package/dist/client.js.map +1 -0
- package/dist/error-interceptor.d.ts +16 -0
- package/dist/error-interceptor.d.ts.map +1 -0
- package/dist/error-interceptor.js +44 -0
- package/dist/error-interceptor.js.map +1 -0
- package/dist/gen/client/client.gen.d.ts +3 -0
- package/dist/gen/client/client.gen.d.ts.map +1 -0
- package/dist/gen/client/client.gen.js +166 -0
- package/dist/gen/client/client.gen.js.map +1 -0
- package/dist/gen/client/index.d.ts +8 -0
- package/dist/gen/client/index.d.ts.map +1 -0
- package/dist/gen/client/index.js +6 -0
- package/dist/gen/client/index.js.map +1 -0
- package/dist/gen/client/types.gen.d.ts +128 -0
- package/dist/gen/client/types.gen.d.ts.map +1 -0
- package/dist/gen/client/types.gen.js +3 -0
- package/dist/gen/client/types.gen.js.map +1 -0
- package/dist/gen/client/utils.gen.d.ts +39 -0
- package/dist/gen/client/utils.gen.d.ts.map +1 -0
- package/dist/gen/client/utils.gen.js +227 -0
- package/dist/gen/client/utils.gen.js.map +1 -0
- package/{src/gen/client.gen.ts → dist/gen/client.gen.d.ts} +5 -14
- package/dist/gen/client.gen.d.ts.map +1 -0
- package/dist/gen/client.gen.js +6 -0
- package/dist/gen/client.gen.js.map +1 -0
- package/dist/gen/core/auth.gen.d.ts +19 -0
- package/dist/gen/core/auth.gen.d.ts.map +1 -0
- package/dist/gen/core/auth.gen.js +15 -0
- package/dist/gen/core/auth.gen.js.map +1 -0
- package/dist/gen/core/bodySerializer.gen.d.ts +18 -0
- package/dist/gen/core/bodySerializer.gen.d.ts.map +1 -0
- package/dist/gen/core/bodySerializer.gen.js +58 -0
- package/dist/gen/core/bodySerializer.gen.js.map +1 -0
- package/dist/gen/core/params.gen.d.ts +34 -0
- package/dist/gen/core/params.gen.d.ts.map +1 -0
- package/dist/gen/core/params.gen.js +90 -0
- package/dist/gen/core/params.gen.js.map +1 -0
- package/dist/gen/core/pathSerializer.gen.d.ts +34 -0
- package/dist/gen/core/pathSerializer.gen.d.ts.map +1 -0
- package/dist/gen/core/pathSerializer.gen.js +107 -0
- package/dist/gen/core/pathSerializer.gen.js.map +1 -0
- package/dist/gen/core/queryKeySerializer.gen.d.ts +19 -0
- package/dist/gen/core/queryKeySerializer.gen.d.ts.map +1 -0
- package/dist/gen/core/queryKeySerializer.gen.js +94 -0
- package/dist/gen/core/queryKeySerializer.gen.js.map +1 -0
- package/dist/gen/core/serverSentEvents.gen.d.ts +60 -0
- package/dist/gen/core/serverSentEvents.gen.d.ts.map +1 -0
- package/dist/gen/core/serverSentEvents.gen.js +118 -0
- package/dist/gen/core/serverSentEvents.gen.js.map +1 -0
- package/dist/gen/core/types.gen.d.ts +79 -0
- package/dist/gen/core/types.gen.d.ts.map +1 -0
- package/dist/gen/core/types.gen.js +3 -0
- package/dist/gen/core/types.gen.js.map +1 -0
- package/dist/gen/core/utils.gen.d.ts +15 -0
- package/dist/gen/core/utils.gen.d.ts.map +1 -0
- package/dist/gen/core/utils.gen.js +70 -0
- package/dist/gen/core/utils.gen.js.map +1 -0
- package/dist/gen/sdk.gen.d.ts +404 -0
- package/dist/gen/sdk.gen.d.ts.map +1 -0
- package/dist/gen/sdk.gen.js +882 -0
- package/dist/gen/sdk.gen.js.map +1 -0
- package/dist/gen/types.gen.d.ts +3384 -0
- package/dist/gen/types.gen.d.ts.map +1 -0
- package/dist/gen/types.gen.js +3 -0
- package/dist/gen/types.gen.js.map +1 -0
- package/dist/index.d.ts +11 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +17 -0
- package/dist/index.js.map +1 -0
- package/dist/process.d.ts +4 -0
- package/dist/process.d.ts.map +1 -0
- package/dist/process.js +34 -0
- package/dist/process.js.map +1 -0
- package/dist/server.d.ts +24 -0
- package/dist/server.d.ts.map +1 -0
- package/dist/server.js +106 -0
- package/dist/server.js.map +1 -0
- package/dist/v2/client.d.ts +10 -0
- package/dist/v2/client.d.ts.map +1 -0
- package/dist/v2/client.js +81 -0
- package/dist/v2/client.js.map +1 -0
- package/dist/v2/data.d.ts +10 -0
- package/dist/v2/data.d.ts.map +1 -0
- package/dist/v2/data.js +23 -0
- package/dist/v2/data.js.map +1 -0
- package/dist/v2/gen/client/client.gen.d.ts +3 -0
- package/dist/v2/gen/client/client.gen.d.ts.map +1 -0
- package/dist/v2/gen/client/client.gen.js +233 -0
- package/dist/v2/gen/client/client.gen.js.map +1 -0
- package/dist/v2/gen/client/index.d.ts +9 -0
- package/dist/v2/gen/client/index.d.ts.map +1 -0
- package/dist/v2/gen/client/index.js +7 -0
- package/dist/v2/gen/client/index.js.map +1 -0
- package/dist/v2/gen/client/types.gen.d.ts +118 -0
- package/dist/v2/gen/client/types.gen.d.ts.map +1 -0
- package/dist/v2/gen/client/types.gen.js +3 -0
- package/dist/v2/gen/client/types.gen.js.map +1 -0
- package/dist/v2/gen/client/utils.gen.d.ts +34 -0
- package/dist/v2/gen/client/utils.gen.d.ts.map +1 -0
- package/dist/v2/gen/client/utils.gen.js +227 -0
- package/dist/v2/gen/client/utils.gen.js.map +1 -0
- package/{src/v2/gen/client.gen.ts → dist/v2/gen/client.gen.d.ts} +5 -10
- package/dist/v2/gen/client.gen.d.ts.map +1 -0
- package/dist/v2/gen/client.gen.js +4 -0
- package/dist/v2/gen/client.gen.js.map +1 -0
- package/dist/v2/gen/core/auth.gen.d.ts +19 -0
- package/dist/v2/gen/core/auth.gen.d.ts.map +1 -0
- package/dist/v2/gen/core/auth.gen.js +15 -0
- package/dist/v2/gen/core/auth.gen.js.map +1 -0
- package/dist/v2/gen/core/bodySerializer.gen.d.ts +26 -0
- package/dist/v2/gen/core/bodySerializer.gen.d.ts.map +1 -0
- package/dist/v2/gen/core/bodySerializer.gen.js +58 -0
- package/dist/v2/gen/core/bodySerializer.gen.js.map +1 -0
- package/dist/v2/gen/core/params.gen.d.ts +44 -0
- package/dist/v2/gen/core/params.gen.d.ts.map +1 -0
- package/dist/v2/gen/core/params.gen.js +103 -0
- package/dist/v2/gen/core/params.gen.js.map +1 -0
- package/dist/v2/gen/core/pathSerializer.gen.d.ts +34 -0
- package/dist/v2/gen/core/pathSerializer.gen.d.ts.map +1 -0
- package/dist/v2/gen/core/pathSerializer.gen.js +107 -0
- package/dist/v2/gen/core/pathSerializer.gen.js.map +1 -0
- package/dist/v2/gen/core/queryKeySerializer.gen.d.ts +19 -0
- package/dist/v2/gen/core/queryKeySerializer.gen.d.ts.map +1 -0
- package/dist/v2/gen/core/queryKeySerializer.gen.js +94 -0
- package/dist/v2/gen/core/queryKeySerializer.gen.js.map +1 -0
- package/dist/v2/gen/core/serverSentEvents.gen.d.ts +72 -0
- package/dist/v2/gen/core/serverSentEvents.gen.d.ts.map +1 -0
- package/dist/v2/gen/core/serverSentEvents.gen.js +134 -0
- package/dist/v2/gen/core/serverSentEvents.gen.js.map +1 -0
- package/dist/v2/gen/core/types.gen.d.ts +79 -0
- package/dist/v2/gen/core/types.gen.d.ts.map +1 -0
- package/dist/v2/gen/core/types.gen.js +3 -0
- package/dist/v2/gen/core/types.gen.js.map +1 -0
- package/dist/v2/gen/core/utils.gen.d.ts +20 -0
- package/dist/v2/gen/core/utils.gen.d.ts.map +1 -0
- package/dist/v2/gen/core/utils.gen.js +88 -0
- package/dist/v2/gen/core/utils.gen.js.map +1 -0
- package/dist/v2/gen/sdk.gen.d.ts +2303 -0
- package/dist/v2/gen/sdk.gen.d.ts.map +1 -0
- package/dist/v2/gen/sdk.gen.js +4457 -0
- package/dist/v2/gen/sdk.gen.js.map +1 -0
- package/dist/v2/gen/types.gen.d.ts +11654 -0
- package/dist/v2/gen/types.gen.d.ts.map +1 -0
- package/dist/v2/gen/types.gen.js +3 -0
- package/dist/v2/gen/types.gen.js.map +1 -0
- package/dist/v2/index.d.ts +12 -0
- package/dist/v2/index.d.ts.map +1 -0
- package/dist/v2/index.js +18 -0
- package/dist/v2/index.js.map +1 -0
- package/dist/v2/server.d.ts +24 -0
- package/dist/v2/server.d.ts.map +1 -0
- package/dist/v2/server.js +106 -0
- package/dist/v2/server.js.map +1 -0
- package/package.json +44 -19
- package/src/client.ts +0 -57
- package/src/error-interceptor.ts +0 -51
- package/src/gen/client/client.gen.ts +0 -212
- package/src/gen/client/index.ts +0 -25
- package/src/gen/client/types.gen.ts +0 -222
- package/src/gen/client/utils.gen.ts +0 -287
- package/src/gen/core/auth.gen.ts +0 -41
- package/src/gen/core/bodySerializer.gen.ts +0 -74
- package/src/gen/core/params.gen.ts +0 -144
- package/src/gen/core/pathSerializer.gen.ts +0 -167
- package/src/gen/core/queryKeySerializer.gen.ts +0 -111
- package/src/gen/core/serverSentEvents.gen.ts +0 -210
- package/src/gen/core/types.gen.ts +0 -91
- package/src/gen/core/utils.gen.ts +0 -109
- package/src/gen/sdk.gen.ts +0 -1197
- package/src/gen/types.gen.ts +0 -3907
- package/src/index.ts +0 -21
- package/src/process.ts +0 -31
- package/src/server.ts +0 -134
- package/src/v2/client.ts +0 -93
- package/src/v2/data.ts +0 -32
- package/src/v2/gen/client/client.gen.ts +0 -285
- package/src/v2/gen/client/index.ts +0 -25
- package/src/v2/gen/client/types.gen.ts +0 -202
- package/src/v2/gen/client/utils.gen.ts +0 -289
- package/src/v2/gen/core/auth.gen.ts +0 -41
- package/src/v2/gen/core/bodySerializer.gen.ts +0 -82
- package/src/v2/gen/core/params.gen.ts +0 -169
- package/src/v2/gen/core/pathSerializer.gen.ts +0 -167
- package/src/v2/gen/core/queryKeySerializer.gen.ts +0 -111
- package/src/v2/gen/core/serverSentEvents.gen.ts +0 -239
- package/src/v2/gen/core/types.gen.ts +0 -86
- package/src/v2/gen/core/utils.gen.ts +0 -137
- package/src/v2/gen/sdk.gen.ts +0 -7219
- package/src/v2/gen/types.gen.ts +0 -13618
- package/src/v2/index.ts +0 -23
- package/src/v2/server.ts +0 -134
|
@@ -0,0 +1,4457 @@
|
|
|
1
|
+
// This file is auto-generated by @hey-api/openapi-ts
|
|
2
|
+
import { client } from "./client.gen.js";
|
|
3
|
+
import { buildClientParams } from "./client/index.js";
|
|
4
|
+
class HeyApiClient {
|
|
5
|
+
client;
|
|
6
|
+
constructor(args) {
|
|
7
|
+
this.client = args?.client ?? client;
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
class HeyApiRegistry {
|
|
11
|
+
defaultKey = "default";
|
|
12
|
+
instances = new Map();
|
|
13
|
+
get(key) {
|
|
14
|
+
const instance = this.instances.get(key ?? this.defaultKey);
|
|
15
|
+
if (!instance) {
|
|
16
|
+
throw new Error(`No SDK client found. Create one with "new ZyraxonClient()" to fix this error.`);
|
|
17
|
+
}
|
|
18
|
+
return instance;
|
|
19
|
+
}
|
|
20
|
+
set(value, key) {
|
|
21
|
+
this.instances.set(key ?? this.defaultKey, value);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
export class Auth extends HeyApiClient {
|
|
25
|
+
/**
|
|
26
|
+
* Remove auth credentials
|
|
27
|
+
*
|
|
28
|
+
* Remove authentication credentials
|
|
29
|
+
*/
|
|
30
|
+
remove(parameters, options) {
|
|
31
|
+
const params = buildClientParams([parameters], [{ args: [{ in: "path", key: "providerID" }] }]);
|
|
32
|
+
return (options?.client ?? this.client).delete({
|
|
33
|
+
url: "/auth/{providerID}",
|
|
34
|
+
...options,
|
|
35
|
+
...params,
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Set auth credentials
|
|
40
|
+
*
|
|
41
|
+
* Set authentication credentials
|
|
42
|
+
*/
|
|
43
|
+
set(parameters, options) {
|
|
44
|
+
const params = buildClientParams([parameters], [
|
|
45
|
+
{
|
|
46
|
+
args: [
|
|
47
|
+
{ in: "path", key: "providerID" },
|
|
48
|
+
{ key: "auth", map: "body" },
|
|
49
|
+
],
|
|
50
|
+
},
|
|
51
|
+
]);
|
|
52
|
+
return (options?.client ?? this.client).put({
|
|
53
|
+
url: "/auth/{providerID}",
|
|
54
|
+
...options,
|
|
55
|
+
...params,
|
|
56
|
+
headers: {
|
|
57
|
+
"Content-Type": "application/json",
|
|
58
|
+
...options?.headers,
|
|
59
|
+
...params.headers,
|
|
60
|
+
},
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
export class App extends HeyApiClient {
|
|
65
|
+
/**
|
|
66
|
+
* Write log
|
|
67
|
+
*
|
|
68
|
+
* Write a log entry to the server logs with specified level and metadata.
|
|
69
|
+
*/
|
|
70
|
+
log(parameters, options) {
|
|
71
|
+
const params = buildClientParams([parameters], [
|
|
72
|
+
{
|
|
73
|
+
args: [
|
|
74
|
+
{ in: "query", key: "directory" },
|
|
75
|
+
{ in: "query", key: "workspace" },
|
|
76
|
+
{ in: "body", key: "service" },
|
|
77
|
+
{ in: "body", key: "level" },
|
|
78
|
+
{ in: "body", key: "message" },
|
|
79
|
+
{ in: "body", key: "extra" },
|
|
80
|
+
],
|
|
81
|
+
},
|
|
82
|
+
]);
|
|
83
|
+
return (options?.client ?? this.client).post({
|
|
84
|
+
url: "/log",
|
|
85
|
+
...options,
|
|
86
|
+
...params,
|
|
87
|
+
headers: {
|
|
88
|
+
"Content-Type": "application/json",
|
|
89
|
+
...options?.headers,
|
|
90
|
+
...params.headers,
|
|
91
|
+
},
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* List agents
|
|
96
|
+
*
|
|
97
|
+
* Get a list of all available AI agents in the ZYRAXON system.
|
|
98
|
+
*/
|
|
99
|
+
agents(parameters, options) {
|
|
100
|
+
const params = buildClientParams([parameters], [
|
|
101
|
+
{
|
|
102
|
+
args: [
|
|
103
|
+
{ in: "query", key: "directory" },
|
|
104
|
+
{ in: "query", key: "workspace" },
|
|
105
|
+
],
|
|
106
|
+
},
|
|
107
|
+
]);
|
|
108
|
+
return (options?.client ?? this.client).get({
|
|
109
|
+
url: "/agent",
|
|
110
|
+
...options,
|
|
111
|
+
...params,
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* List skills
|
|
116
|
+
*
|
|
117
|
+
* Get a list of all available skills in the ZYRAXON system.
|
|
118
|
+
*/
|
|
119
|
+
skills(parameters, options) {
|
|
120
|
+
const params = buildClientParams([parameters], [
|
|
121
|
+
{
|
|
122
|
+
args: [
|
|
123
|
+
{ in: "query", key: "directory" },
|
|
124
|
+
{ in: "query", key: "workspace" },
|
|
125
|
+
],
|
|
126
|
+
},
|
|
127
|
+
]);
|
|
128
|
+
return (options?.client ?? this.client).get({
|
|
129
|
+
url: "/skill",
|
|
130
|
+
...options,
|
|
131
|
+
...params,
|
|
132
|
+
});
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
export class ControlPlane extends HeyApiClient {
|
|
136
|
+
/**
|
|
137
|
+
* Move session
|
|
138
|
+
*
|
|
139
|
+
* Move a session to another project directory, optionally transferring local changes.
|
|
140
|
+
*/
|
|
141
|
+
moveSession(parameters, options) {
|
|
142
|
+
const params = buildClientParams([parameters], [
|
|
143
|
+
{
|
|
144
|
+
args: [
|
|
145
|
+
{ in: "body", key: "sessionID" },
|
|
146
|
+
{ in: "body", key: "destination" },
|
|
147
|
+
{ in: "body", key: "moveChanges" },
|
|
148
|
+
],
|
|
149
|
+
},
|
|
150
|
+
]);
|
|
151
|
+
return (options?.client ?? this.client).post({
|
|
152
|
+
url: "/experimental/control-plane/move-session",
|
|
153
|
+
...options,
|
|
154
|
+
...params,
|
|
155
|
+
headers: {
|
|
156
|
+
"Content-Type": "application/json",
|
|
157
|
+
...options?.headers,
|
|
158
|
+
...params.headers,
|
|
159
|
+
},
|
|
160
|
+
});
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
export class Capabilities extends HeyApiClient {
|
|
164
|
+
/**
|
|
165
|
+
* Get experimental capabilities
|
|
166
|
+
*
|
|
167
|
+
* Get experimental features enabled on the ZYRAXON server.
|
|
168
|
+
*/
|
|
169
|
+
get(parameters, options) {
|
|
170
|
+
const params = buildClientParams([parameters], [
|
|
171
|
+
{
|
|
172
|
+
args: [
|
|
173
|
+
{ in: "query", key: "directory" },
|
|
174
|
+
{ in: "query", key: "workspace" },
|
|
175
|
+
],
|
|
176
|
+
},
|
|
177
|
+
]);
|
|
178
|
+
return (options?.client ?? this.client).get({
|
|
179
|
+
url: "/experimental/capabilities",
|
|
180
|
+
...options,
|
|
181
|
+
...params,
|
|
182
|
+
});
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
export class Console extends HeyApiClient {
|
|
186
|
+
/**
|
|
187
|
+
* Get active Console provider metadata
|
|
188
|
+
*
|
|
189
|
+
* Get the active Console org name and the set of provider IDs managed by that Console org.
|
|
190
|
+
*/
|
|
191
|
+
get(parameters, options) {
|
|
192
|
+
const params = buildClientParams([parameters], [
|
|
193
|
+
{
|
|
194
|
+
args: [
|
|
195
|
+
{ in: "query", key: "directory" },
|
|
196
|
+
{ in: "query", key: "workspace" },
|
|
197
|
+
],
|
|
198
|
+
},
|
|
199
|
+
]);
|
|
200
|
+
return (options?.client ?? this.client).get({
|
|
201
|
+
url: "/experimental/console",
|
|
202
|
+
...options,
|
|
203
|
+
...params,
|
|
204
|
+
});
|
|
205
|
+
}
|
|
206
|
+
/**
|
|
207
|
+
* List switchable Console orgs
|
|
208
|
+
*
|
|
209
|
+
* Get the available Console orgs across logged-in accounts, including the current active org.
|
|
210
|
+
*/
|
|
211
|
+
listOrgs(parameters, options) {
|
|
212
|
+
const params = buildClientParams([parameters], [
|
|
213
|
+
{
|
|
214
|
+
args: [
|
|
215
|
+
{ in: "query", key: "directory" },
|
|
216
|
+
{ in: "query", key: "workspace" },
|
|
217
|
+
],
|
|
218
|
+
},
|
|
219
|
+
]);
|
|
220
|
+
return (options?.client ?? this.client).get({
|
|
221
|
+
url: "/experimental/console/orgs",
|
|
222
|
+
...options,
|
|
223
|
+
...params,
|
|
224
|
+
});
|
|
225
|
+
}
|
|
226
|
+
/**
|
|
227
|
+
* Switch active Console org
|
|
228
|
+
*
|
|
229
|
+
* Persist a new active Console account/org selection for the current local ZYRAXON state.
|
|
230
|
+
*/
|
|
231
|
+
switchOrg(parameters, options) {
|
|
232
|
+
const params = buildClientParams([parameters], [
|
|
233
|
+
{
|
|
234
|
+
args: [
|
|
235
|
+
{ in: "query", key: "directory" },
|
|
236
|
+
{ in: "query", key: "workspace" },
|
|
237
|
+
{ in: "body", key: "accountID" },
|
|
238
|
+
{ in: "body", key: "orgID" },
|
|
239
|
+
],
|
|
240
|
+
},
|
|
241
|
+
]);
|
|
242
|
+
return (options?.client ?? this.client).post({
|
|
243
|
+
url: "/experimental/console/switch",
|
|
244
|
+
...options,
|
|
245
|
+
...params,
|
|
246
|
+
headers: {
|
|
247
|
+
"Content-Type": "application/json",
|
|
248
|
+
...options?.headers,
|
|
249
|
+
...params.headers,
|
|
250
|
+
},
|
|
251
|
+
});
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
export class Session extends HeyApiClient {
|
|
255
|
+
/**
|
|
256
|
+
* List sessions
|
|
257
|
+
*
|
|
258
|
+
* Get a list of all ZYRAXON sessions across projects, sorted by most recently updated. Archived sessions are excluded by default.
|
|
259
|
+
*/
|
|
260
|
+
list(parameters, options) {
|
|
261
|
+
const params = buildClientParams([parameters], [
|
|
262
|
+
{
|
|
263
|
+
args: [
|
|
264
|
+
{ in: "query", key: "directory" },
|
|
265
|
+
{ in: "query", key: "workspace" },
|
|
266
|
+
{ in: "query", key: "roots" },
|
|
267
|
+
{ in: "query", key: "start" },
|
|
268
|
+
{ in: "query", key: "cursor" },
|
|
269
|
+
{ in: "query", key: "search" },
|
|
270
|
+
{ in: "query", key: "limit" },
|
|
271
|
+
{ in: "query", key: "archived" },
|
|
272
|
+
],
|
|
273
|
+
},
|
|
274
|
+
]);
|
|
275
|
+
return (options?.client ?? this.client).get({
|
|
276
|
+
url: "/experimental/session",
|
|
277
|
+
...options,
|
|
278
|
+
...params,
|
|
279
|
+
});
|
|
280
|
+
}
|
|
281
|
+
/**
|
|
282
|
+
* Background subagents
|
|
283
|
+
*
|
|
284
|
+
* Detach any synchronous subagents currently blocking the session and continue them in the background.
|
|
285
|
+
*/
|
|
286
|
+
background(parameters, options) {
|
|
287
|
+
const params = buildClientParams([parameters], [
|
|
288
|
+
{
|
|
289
|
+
args: [
|
|
290
|
+
{ in: "path", key: "sessionID" },
|
|
291
|
+
{ in: "query", key: "directory" },
|
|
292
|
+
{ in: "query", key: "workspace" },
|
|
293
|
+
],
|
|
294
|
+
},
|
|
295
|
+
]);
|
|
296
|
+
return (options?.client ?? this.client).post({
|
|
297
|
+
url: "/experimental/session/{sessionID}/background",
|
|
298
|
+
...options,
|
|
299
|
+
...params,
|
|
300
|
+
});
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
export class Resource extends HeyApiClient {
|
|
304
|
+
/**
|
|
305
|
+
* Get MCP resources
|
|
306
|
+
*
|
|
307
|
+
* Get all available MCP resources from connected servers. Optionally filter by name.
|
|
308
|
+
*/
|
|
309
|
+
list(parameters, options) {
|
|
310
|
+
const params = buildClientParams([parameters], [
|
|
311
|
+
{
|
|
312
|
+
args: [
|
|
313
|
+
{ in: "query", key: "directory" },
|
|
314
|
+
{ in: "query", key: "workspace" },
|
|
315
|
+
],
|
|
316
|
+
},
|
|
317
|
+
]);
|
|
318
|
+
return (options?.client ?? this.client).get({
|
|
319
|
+
url: "/experimental/resource",
|
|
320
|
+
...options,
|
|
321
|
+
...params,
|
|
322
|
+
});
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
export class ProjectCopy extends HeyApiClient {
|
|
326
|
+
/**
|
|
327
|
+
* Generate project copy name
|
|
328
|
+
*
|
|
329
|
+
* Generate a short name for a project copy from task context.
|
|
330
|
+
*/
|
|
331
|
+
generateName(parameters, options) {
|
|
332
|
+
const params = buildClientParams([parameters], [
|
|
333
|
+
{
|
|
334
|
+
args: [
|
|
335
|
+
{ in: "path", key: "projectID" },
|
|
336
|
+
{ in: "query", key: "directory" },
|
|
337
|
+
{ in: "query", key: "workspace" },
|
|
338
|
+
{ in: "body", key: "context" },
|
|
339
|
+
],
|
|
340
|
+
},
|
|
341
|
+
]);
|
|
342
|
+
return (options?.client ?? this.client).post({
|
|
343
|
+
url: "/experimental/project/{projectID}/copy/generate-name",
|
|
344
|
+
...options,
|
|
345
|
+
...params,
|
|
346
|
+
headers: {
|
|
347
|
+
"Content-Type": "application/json",
|
|
348
|
+
...options?.headers,
|
|
349
|
+
...params.headers,
|
|
350
|
+
},
|
|
351
|
+
});
|
|
352
|
+
}
|
|
353
|
+
}
|
|
354
|
+
export class Adapter extends HeyApiClient {
|
|
355
|
+
/**
|
|
356
|
+
* List workspace adapters
|
|
357
|
+
*
|
|
358
|
+
* List all available workspace adapters for the current project.
|
|
359
|
+
*/
|
|
360
|
+
list(parameters, options) {
|
|
361
|
+
const params = buildClientParams([parameters], [
|
|
362
|
+
{
|
|
363
|
+
args: [
|
|
364
|
+
{ in: "query", key: "directory" },
|
|
365
|
+
{ in: "query", key: "workspace" },
|
|
366
|
+
],
|
|
367
|
+
},
|
|
368
|
+
]);
|
|
369
|
+
return (options?.client ?? this.client).get({
|
|
370
|
+
url: "/experimental/workspace/adapter",
|
|
371
|
+
...options,
|
|
372
|
+
...params,
|
|
373
|
+
});
|
|
374
|
+
}
|
|
375
|
+
}
|
|
376
|
+
export class Workspace extends HeyApiClient {
|
|
377
|
+
/**
|
|
378
|
+
* List workspaces
|
|
379
|
+
*
|
|
380
|
+
* List all workspaces.
|
|
381
|
+
*/
|
|
382
|
+
list(parameters, options) {
|
|
383
|
+
const params = buildClientParams([parameters], [
|
|
384
|
+
{
|
|
385
|
+
args: [
|
|
386
|
+
{ in: "query", key: "directory" },
|
|
387
|
+
{ in: "query", key: "workspace" },
|
|
388
|
+
],
|
|
389
|
+
},
|
|
390
|
+
]);
|
|
391
|
+
return (options?.client ?? this.client).get({
|
|
392
|
+
url: "/experimental/workspace",
|
|
393
|
+
...options,
|
|
394
|
+
...params,
|
|
395
|
+
});
|
|
396
|
+
}
|
|
397
|
+
/**
|
|
398
|
+
* Create workspace
|
|
399
|
+
*
|
|
400
|
+
* Create a workspace for the current project.
|
|
401
|
+
*/
|
|
402
|
+
create(parameters, options) {
|
|
403
|
+
const params = buildClientParams([parameters], [
|
|
404
|
+
{
|
|
405
|
+
args: [
|
|
406
|
+
{ in: "query", key: "directory" },
|
|
407
|
+
{ in: "query", key: "workspace" },
|
|
408
|
+
{ in: "body", key: "id" },
|
|
409
|
+
{ in: "body", key: "type" },
|
|
410
|
+
{ in: "body", key: "branch" },
|
|
411
|
+
{ in: "body", key: "extra" },
|
|
412
|
+
],
|
|
413
|
+
},
|
|
414
|
+
]);
|
|
415
|
+
return (options?.client ?? this.client).post({
|
|
416
|
+
url: "/experimental/workspace",
|
|
417
|
+
...options,
|
|
418
|
+
...params,
|
|
419
|
+
headers: {
|
|
420
|
+
"Content-Type": "application/json",
|
|
421
|
+
...options?.headers,
|
|
422
|
+
...params.headers,
|
|
423
|
+
},
|
|
424
|
+
});
|
|
425
|
+
}
|
|
426
|
+
/**
|
|
427
|
+
* Sync workspace list
|
|
428
|
+
*
|
|
429
|
+
* Register missing workspaces returned by workspace adapters.
|
|
430
|
+
*/
|
|
431
|
+
syncList(parameters, options) {
|
|
432
|
+
const params = buildClientParams([parameters], [
|
|
433
|
+
{
|
|
434
|
+
args: [
|
|
435
|
+
{ in: "query", key: "directory" },
|
|
436
|
+
{ in: "query", key: "workspace" },
|
|
437
|
+
],
|
|
438
|
+
},
|
|
439
|
+
]);
|
|
440
|
+
return (options?.client ?? this.client).post({
|
|
441
|
+
url: "/experimental/workspace/sync-list",
|
|
442
|
+
...options,
|
|
443
|
+
...params,
|
|
444
|
+
});
|
|
445
|
+
}
|
|
446
|
+
/**
|
|
447
|
+
* Workspace status
|
|
448
|
+
*
|
|
449
|
+
* Get connection status for workspaces in the current project.
|
|
450
|
+
*/
|
|
451
|
+
status(parameters, options) {
|
|
452
|
+
const params = buildClientParams([parameters], [
|
|
453
|
+
{
|
|
454
|
+
args: [
|
|
455
|
+
{ in: "query", key: "directory" },
|
|
456
|
+
{ in: "query", key: "workspace" },
|
|
457
|
+
],
|
|
458
|
+
},
|
|
459
|
+
]);
|
|
460
|
+
return (options?.client ?? this.client).get({
|
|
461
|
+
url: "/experimental/workspace/status",
|
|
462
|
+
...options,
|
|
463
|
+
...params,
|
|
464
|
+
});
|
|
465
|
+
}
|
|
466
|
+
/**
|
|
467
|
+
* Remove workspace
|
|
468
|
+
*
|
|
469
|
+
* Remove an existing workspace.
|
|
470
|
+
*/
|
|
471
|
+
remove(parameters, options) {
|
|
472
|
+
const params = buildClientParams([parameters], [
|
|
473
|
+
{
|
|
474
|
+
args: [
|
|
475
|
+
{ in: "path", key: "id" },
|
|
476
|
+
{ in: "query", key: "directory" },
|
|
477
|
+
{ in: "query", key: "workspace" },
|
|
478
|
+
],
|
|
479
|
+
},
|
|
480
|
+
]);
|
|
481
|
+
return (options?.client ?? this.client).delete({
|
|
482
|
+
url: "/experimental/workspace/{id}",
|
|
483
|
+
...options,
|
|
484
|
+
...params,
|
|
485
|
+
});
|
|
486
|
+
}
|
|
487
|
+
/**
|
|
488
|
+
* Warp session into workspace
|
|
489
|
+
*
|
|
490
|
+
* Move a session's sync history into the target workspace, or detach it to the local project.
|
|
491
|
+
*/
|
|
492
|
+
warp(parameters, options) {
|
|
493
|
+
const params = buildClientParams([parameters], [
|
|
494
|
+
{
|
|
495
|
+
args: [
|
|
496
|
+
{ in: "query", key: "directory" },
|
|
497
|
+
{ in: "query", key: "workspace" },
|
|
498
|
+
{ in: "body", key: "id" },
|
|
499
|
+
{ in: "body", key: "sessionID" },
|
|
500
|
+
{ in: "body", key: "copyChanges" },
|
|
501
|
+
],
|
|
502
|
+
},
|
|
503
|
+
]);
|
|
504
|
+
return (options?.client ?? this.client).post({
|
|
505
|
+
url: "/experimental/workspace/warp",
|
|
506
|
+
...options,
|
|
507
|
+
...params,
|
|
508
|
+
headers: {
|
|
509
|
+
"Content-Type": "application/json",
|
|
510
|
+
...options?.headers,
|
|
511
|
+
...params.headers,
|
|
512
|
+
},
|
|
513
|
+
});
|
|
514
|
+
}
|
|
515
|
+
_adapter;
|
|
516
|
+
get adapter() {
|
|
517
|
+
return (this._adapter ??= new Adapter({ client: this.client }));
|
|
518
|
+
}
|
|
519
|
+
}
|
|
520
|
+
export class Experimental extends HeyApiClient {
|
|
521
|
+
_controlPlane;
|
|
522
|
+
get controlPlane() {
|
|
523
|
+
return (this._controlPlane ??= new ControlPlane({ client: this.client }));
|
|
524
|
+
}
|
|
525
|
+
_capabilities;
|
|
526
|
+
get capabilities() {
|
|
527
|
+
return (this._capabilities ??= new Capabilities({ client: this.client }));
|
|
528
|
+
}
|
|
529
|
+
_console;
|
|
530
|
+
get console() {
|
|
531
|
+
return (this._console ??= new Console({ client: this.client }));
|
|
532
|
+
}
|
|
533
|
+
_session;
|
|
534
|
+
get session() {
|
|
535
|
+
return (this._session ??= new Session({ client: this.client }));
|
|
536
|
+
}
|
|
537
|
+
_resource;
|
|
538
|
+
get resource() {
|
|
539
|
+
return (this._resource ??= new Resource({ client: this.client }));
|
|
540
|
+
}
|
|
541
|
+
_projectCopy;
|
|
542
|
+
get projectCopy() {
|
|
543
|
+
return (this._projectCopy ??= new ProjectCopy({ client: this.client }));
|
|
544
|
+
}
|
|
545
|
+
_workspace;
|
|
546
|
+
get workspace() {
|
|
547
|
+
return (this._workspace ??= new Workspace({ client: this.client }));
|
|
548
|
+
}
|
|
549
|
+
}
|
|
550
|
+
export class Config extends HeyApiClient {
|
|
551
|
+
/**
|
|
552
|
+
* Get global configuration
|
|
553
|
+
*
|
|
554
|
+
* Retrieve the current global ZYRAXON configuration settings and preferences.
|
|
555
|
+
*/
|
|
556
|
+
get(options) {
|
|
557
|
+
return (options?.client ?? this.client).get({
|
|
558
|
+
url: "/global/config",
|
|
559
|
+
...options,
|
|
560
|
+
});
|
|
561
|
+
}
|
|
562
|
+
/**
|
|
563
|
+
* Update global configuration
|
|
564
|
+
*
|
|
565
|
+
* Update global ZYRAXON configuration settings and preferences.
|
|
566
|
+
*/
|
|
567
|
+
update(parameters, options) {
|
|
568
|
+
const params = buildClientParams([parameters], [{ args: [{ key: "config", map: "body" }] }]);
|
|
569
|
+
return (options?.client ?? this.client).patch({
|
|
570
|
+
url: "/global/config",
|
|
571
|
+
...options,
|
|
572
|
+
...params,
|
|
573
|
+
headers: {
|
|
574
|
+
"Content-Type": "application/json",
|
|
575
|
+
...options?.headers,
|
|
576
|
+
...params.headers,
|
|
577
|
+
},
|
|
578
|
+
});
|
|
579
|
+
}
|
|
580
|
+
}
|
|
581
|
+
export class Global extends HeyApiClient {
|
|
582
|
+
/**
|
|
583
|
+
* Get health
|
|
584
|
+
*
|
|
585
|
+
* Get health information about the ZYRAXON server.
|
|
586
|
+
*/
|
|
587
|
+
health(options) {
|
|
588
|
+
return (options?.client ?? this.client).get({
|
|
589
|
+
url: "/global/health",
|
|
590
|
+
...options,
|
|
591
|
+
});
|
|
592
|
+
}
|
|
593
|
+
/**
|
|
594
|
+
* Get global events
|
|
595
|
+
*
|
|
596
|
+
* Subscribe to global events from the ZYRAXON system using server-sent events.
|
|
597
|
+
*/
|
|
598
|
+
event(options) {
|
|
599
|
+
return (options?.client ?? this.client).sse.get({
|
|
600
|
+
url: "/global/event",
|
|
601
|
+
...options,
|
|
602
|
+
});
|
|
603
|
+
}
|
|
604
|
+
/**
|
|
605
|
+
* Dispose instance
|
|
606
|
+
*
|
|
607
|
+
* Clean up and dispose all ZYRAXON instances, releasing all resources.
|
|
608
|
+
*/
|
|
609
|
+
dispose(options) {
|
|
610
|
+
return (options?.client ?? this.client).post({
|
|
611
|
+
url: "/global/dispose",
|
|
612
|
+
...options,
|
|
613
|
+
});
|
|
614
|
+
}
|
|
615
|
+
/**
|
|
616
|
+
* Upgrade zyraxon
|
|
617
|
+
*
|
|
618
|
+
* Upgrade zyraxon to the specified version or latest if not specified.
|
|
619
|
+
*/
|
|
620
|
+
upgrade(parameters, options) {
|
|
621
|
+
const params = buildClientParams([parameters], [{ args: [{ in: "body", key: "target" }] }]);
|
|
622
|
+
return (options?.client ?? this.client).post({
|
|
623
|
+
url: "/global/upgrade",
|
|
624
|
+
...options,
|
|
625
|
+
...params,
|
|
626
|
+
headers: {
|
|
627
|
+
"Content-Type": "application/json",
|
|
628
|
+
...options?.headers,
|
|
629
|
+
...params.headers,
|
|
630
|
+
},
|
|
631
|
+
});
|
|
632
|
+
}
|
|
633
|
+
_config;
|
|
634
|
+
get config() {
|
|
635
|
+
return (this._config ??= new Config({ client: this.client }));
|
|
636
|
+
}
|
|
637
|
+
}
|
|
638
|
+
export class Event extends HeyApiClient {
|
|
639
|
+
/**
|
|
640
|
+
* Subscribe to events
|
|
641
|
+
*
|
|
642
|
+
* Get events
|
|
643
|
+
*/
|
|
644
|
+
subscribe(parameters, options) {
|
|
645
|
+
const params = buildClientParams([parameters], [
|
|
646
|
+
{
|
|
647
|
+
args: [
|
|
648
|
+
{ in: "query", key: "directory" },
|
|
649
|
+
{ in: "query", key: "workspace" },
|
|
650
|
+
],
|
|
651
|
+
},
|
|
652
|
+
]);
|
|
653
|
+
return (options?.client ?? this.client).sse.get({
|
|
654
|
+
url: "/event",
|
|
655
|
+
...options,
|
|
656
|
+
...params,
|
|
657
|
+
});
|
|
658
|
+
}
|
|
659
|
+
}
|
|
660
|
+
export class Config2 extends HeyApiClient {
|
|
661
|
+
/**
|
|
662
|
+
* Get configuration
|
|
663
|
+
*
|
|
664
|
+
* Retrieve the current ZYRAXON configuration settings and preferences.
|
|
665
|
+
*/
|
|
666
|
+
get(parameters, options) {
|
|
667
|
+
const params = buildClientParams([parameters], [
|
|
668
|
+
{
|
|
669
|
+
args: [
|
|
670
|
+
{ in: "query", key: "directory" },
|
|
671
|
+
{ in: "query", key: "workspace" },
|
|
672
|
+
],
|
|
673
|
+
},
|
|
674
|
+
]);
|
|
675
|
+
return (options?.client ?? this.client).get({
|
|
676
|
+
url: "/config",
|
|
677
|
+
...options,
|
|
678
|
+
...params,
|
|
679
|
+
});
|
|
680
|
+
}
|
|
681
|
+
/**
|
|
682
|
+
* Update configuration
|
|
683
|
+
*
|
|
684
|
+
* Update ZYRAXON configuration settings and preferences.
|
|
685
|
+
*/
|
|
686
|
+
update(parameters, options) {
|
|
687
|
+
const params = buildClientParams([parameters], [
|
|
688
|
+
{
|
|
689
|
+
args: [
|
|
690
|
+
{ in: "query", key: "directory" },
|
|
691
|
+
{ in: "query", key: "workspace" },
|
|
692
|
+
{ key: "config", map: "body" },
|
|
693
|
+
],
|
|
694
|
+
},
|
|
695
|
+
]);
|
|
696
|
+
return (options?.client ?? this.client).patch({
|
|
697
|
+
url: "/config",
|
|
698
|
+
...options,
|
|
699
|
+
...params,
|
|
700
|
+
headers: {
|
|
701
|
+
"Content-Type": "application/json",
|
|
702
|
+
...options?.headers,
|
|
703
|
+
...params.headers,
|
|
704
|
+
},
|
|
705
|
+
});
|
|
706
|
+
}
|
|
707
|
+
/**
|
|
708
|
+
* List config providers
|
|
709
|
+
*
|
|
710
|
+
* Get a list of all configured AI providers and their default models.
|
|
711
|
+
*/
|
|
712
|
+
providers(parameters, options) {
|
|
713
|
+
const params = buildClientParams([parameters], [
|
|
714
|
+
{
|
|
715
|
+
args: [
|
|
716
|
+
{ in: "query", key: "directory" },
|
|
717
|
+
{ in: "query", key: "workspace" },
|
|
718
|
+
],
|
|
719
|
+
},
|
|
720
|
+
]);
|
|
721
|
+
return (options?.client ?? this.client).get({
|
|
722
|
+
url: "/config/providers",
|
|
723
|
+
...options,
|
|
724
|
+
...params,
|
|
725
|
+
});
|
|
726
|
+
}
|
|
727
|
+
}
|
|
728
|
+
export class Tool extends HeyApiClient {
|
|
729
|
+
/**
|
|
730
|
+
* List tools
|
|
731
|
+
*
|
|
732
|
+
* Get a list of available tools with their JSON schema parameters for a specific provider and model combination.
|
|
733
|
+
*/
|
|
734
|
+
list(parameters, options) {
|
|
735
|
+
const params = buildClientParams([parameters], [
|
|
736
|
+
{
|
|
737
|
+
args: [
|
|
738
|
+
{ in: "query", key: "directory" },
|
|
739
|
+
{ in: "query", key: "workspace" },
|
|
740
|
+
{ in: "query", key: "provider" },
|
|
741
|
+
{ in: "query", key: "model" },
|
|
742
|
+
],
|
|
743
|
+
},
|
|
744
|
+
]);
|
|
745
|
+
return (options?.client ?? this.client).get({
|
|
746
|
+
url: "/experimental/tool",
|
|
747
|
+
...options,
|
|
748
|
+
...params,
|
|
749
|
+
});
|
|
750
|
+
}
|
|
751
|
+
/**
|
|
752
|
+
* List tool IDs
|
|
753
|
+
*
|
|
754
|
+
* Get a list of all available tool IDs, including both built-in tools and dynamically registered tools.
|
|
755
|
+
*/
|
|
756
|
+
ids(parameters, options) {
|
|
757
|
+
const params = buildClientParams([parameters], [
|
|
758
|
+
{
|
|
759
|
+
args: [
|
|
760
|
+
{ in: "query", key: "directory" },
|
|
761
|
+
{ in: "query", key: "workspace" },
|
|
762
|
+
],
|
|
763
|
+
},
|
|
764
|
+
]);
|
|
765
|
+
return (options?.client ?? this.client).get({
|
|
766
|
+
url: "/experimental/tool/ids",
|
|
767
|
+
...options,
|
|
768
|
+
...params,
|
|
769
|
+
});
|
|
770
|
+
}
|
|
771
|
+
}
|
|
772
|
+
export class Worktree extends HeyApiClient {
|
|
773
|
+
/**
|
|
774
|
+
* Remove worktree
|
|
775
|
+
*
|
|
776
|
+
* Remove a git worktree and delete its branch.
|
|
777
|
+
*/
|
|
778
|
+
remove(parameters, options) {
|
|
779
|
+
const params = buildClientParams([parameters], [
|
|
780
|
+
{
|
|
781
|
+
args: [
|
|
782
|
+
{ in: "query", key: "directory" },
|
|
783
|
+
{ in: "query", key: "workspace" },
|
|
784
|
+
{ key: "worktreeRemoveInput", map: "body" },
|
|
785
|
+
],
|
|
786
|
+
},
|
|
787
|
+
]);
|
|
788
|
+
return (options?.client ?? this.client).delete({
|
|
789
|
+
url: "/experimental/worktree",
|
|
790
|
+
...options,
|
|
791
|
+
...params,
|
|
792
|
+
headers: {
|
|
793
|
+
"Content-Type": "application/json",
|
|
794
|
+
...options?.headers,
|
|
795
|
+
...params.headers,
|
|
796
|
+
},
|
|
797
|
+
});
|
|
798
|
+
}
|
|
799
|
+
/**
|
|
800
|
+
* List worktrees
|
|
801
|
+
*
|
|
802
|
+
* List all sandbox worktrees for the current project.
|
|
803
|
+
*/
|
|
804
|
+
list(parameters, options) {
|
|
805
|
+
const params = buildClientParams([parameters], [
|
|
806
|
+
{
|
|
807
|
+
args: [
|
|
808
|
+
{ in: "query", key: "directory" },
|
|
809
|
+
{ in: "query", key: "workspace" },
|
|
810
|
+
],
|
|
811
|
+
},
|
|
812
|
+
]);
|
|
813
|
+
return (options?.client ?? this.client).get({
|
|
814
|
+
url: "/experimental/worktree",
|
|
815
|
+
...options,
|
|
816
|
+
...params,
|
|
817
|
+
});
|
|
818
|
+
}
|
|
819
|
+
/**
|
|
820
|
+
* Create worktree
|
|
821
|
+
*
|
|
822
|
+
* Create a new git worktree for the current project and run any configured startup scripts.
|
|
823
|
+
*/
|
|
824
|
+
create(parameters, options) {
|
|
825
|
+
const params = buildClientParams([parameters], [
|
|
826
|
+
{
|
|
827
|
+
args: [
|
|
828
|
+
{ in: "query", key: "directory" },
|
|
829
|
+
{ in: "query", key: "workspace" },
|
|
830
|
+
{ key: "worktreeCreateInput", map: "body" },
|
|
831
|
+
],
|
|
832
|
+
},
|
|
833
|
+
]);
|
|
834
|
+
return (options?.client ?? this.client).post({
|
|
835
|
+
url: "/experimental/worktree",
|
|
836
|
+
...options,
|
|
837
|
+
...params,
|
|
838
|
+
headers: {
|
|
839
|
+
"Content-Type": "application/json",
|
|
840
|
+
...options?.headers,
|
|
841
|
+
...params.headers,
|
|
842
|
+
},
|
|
843
|
+
});
|
|
844
|
+
}
|
|
845
|
+
/**
|
|
846
|
+
* Reset worktree
|
|
847
|
+
*
|
|
848
|
+
* Reset a worktree branch to the primary default branch.
|
|
849
|
+
*/
|
|
850
|
+
reset(parameters, options) {
|
|
851
|
+
const params = buildClientParams([parameters], [
|
|
852
|
+
{
|
|
853
|
+
args: [
|
|
854
|
+
{ in: "query", key: "directory" },
|
|
855
|
+
{ in: "query", key: "workspace" },
|
|
856
|
+
{ key: "worktreeResetInput", map: "body" },
|
|
857
|
+
],
|
|
858
|
+
},
|
|
859
|
+
]);
|
|
860
|
+
return (options?.client ?? this.client).post({
|
|
861
|
+
url: "/experimental/worktree/reset",
|
|
862
|
+
...options,
|
|
863
|
+
...params,
|
|
864
|
+
headers: {
|
|
865
|
+
"Content-Type": "application/json",
|
|
866
|
+
...options?.headers,
|
|
867
|
+
...params.headers,
|
|
868
|
+
},
|
|
869
|
+
});
|
|
870
|
+
}
|
|
871
|
+
}
|
|
872
|
+
export class Find extends HeyApiClient {
|
|
873
|
+
/**
|
|
874
|
+
* Find text
|
|
875
|
+
*
|
|
876
|
+
* Search for text patterns across files in the project using ripgrep.
|
|
877
|
+
*/
|
|
878
|
+
text(parameters, options) {
|
|
879
|
+
const params = buildClientParams([parameters], [
|
|
880
|
+
{
|
|
881
|
+
args: [
|
|
882
|
+
{ in: "query", key: "directory" },
|
|
883
|
+
{ in: "query", key: "workspace" },
|
|
884
|
+
{ in: "query", key: "pattern" },
|
|
885
|
+
],
|
|
886
|
+
},
|
|
887
|
+
]);
|
|
888
|
+
return (options?.client ?? this.client).get({
|
|
889
|
+
url: "/find",
|
|
890
|
+
...options,
|
|
891
|
+
...params,
|
|
892
|
+
});
|
|
893
|
+
}
|
|
894
|
+
/**
|
|
895
|
+
* Find files
|
|
896
|
+
*
|
|
897
|
+
* Search for files or directories by name or pattern in the project directory.
|
|
898
|
+
*/
|
|
899
|
+
files(parameters, options) {
|
|
900
|
+
const params = buildClientParams([parameters], [
|
|
901
|
+
{
|
|
902
|
+
args: [
|
|
903
|
+
{ in: "query", key: "directory" },
|
|
904
|
+
{ in: "query", key: "workspace" },
|
|
905
|
+
{ in: "query", key: "query" },
|
|
906
|
+
{ in: "query", key: "dirs" },
|
|
907
|
+
{ in: "query", key: "type" },
|
|
908
|
+
{ in: "query", key: "limit" },
|
|
909
|
+
],
|
|
910
|
+
},
|
|
911
|
+
]);
|
|
912
|
+
return (options?.client ?? this.client).get({
|
|
913
|
+
url: "/find/file",
|
|
914
|
+
...options,
|
|
915
|
+
...params,
|
|
916
|
+
});
|
|
917
|
+
}
|
|
918
|
+
/**
|
|
919
|
+
* Find symbols
|
|
920
|
+
*
|
|
921
|
+
* Search for workspace symbols like functions, classes, and variables using LSP.
|
|
922
|
+
*/
|
|
923
|
+
symbols(parameters, options) {
|
|
924
|
+
const params = buildClientParams([parameters], [
|
|
925
|
+
{
|
|
926
|
+
args: [
|
|
927
|
+
{ in: "query", key: "directory" },
|
|
928
|
+
{ in: "query", key: "workspace" },
|
|
929
|
+
{ in: "query", key: "query" },
|
|
930
|
+
],
|
|
931
|
+
},
|
|
932
|
+
]);
|
|
933
|
+
return (options?.client ?? this.client).get({
|
|
934
|
+
url: "/find/symbol",
|
|
935
|
+
...options,
|
|
936
|
+
...params,
|
|
937
|
+
});
|
|
938
|
+
}
|
|
939
|
+
}
|
|
940
|
+
export class File extends HeyApiClient {
|
|
941
|
+
/**
|
|
942
|
+
* List files
|
|
943
|
+
*
|
|
944
|
+
* List files and directories in a specified path.
|
|
945
|
+
*/
|
|
946
|
+
list(parameters, options) {
|
|
947
|
+
const params = buildClientParams([parameters], [
|
|
948
|
+
{
|
|
949
|
+
args: [
|
|
950
|
+
{ in: "query", key: "directory" },
|
|
951
|
+
{ in: "query", key: "workspace" },
|
|
952
|
+
{ in: "query", key: "path" },
|
|
953
|
+
],
|
|
954
|
+
},
|
|
955
|
+
]);
|
|
956
|
+
return (options?.client ?? this.client).get({
|
|
957
|
+
url: "/file",
|
|
958
|
+
...options,
|
|
959
|
+
...params,
|
|
960
|
+
});
|
|
961
|
+
}
|
|
962
|
+
/**
|
|
963
|
+
* Read file
|
|
964
|
+
*
|
|
965
|
+
* Read the content of a specified file.
|
|
966
|
+
*/
|
|
967
|
+
read(parameters, options) {
|
|
968
|
+
const params = buildClientParams([parameters], [
|
|
969
|
+
{
|
|
970
|
+
args: [
|
|
971
|
+
{ in: "query", key: "directory" },
|
|
972
|
+
{ in: "query", key: "workspace" },
|
|
973
|
+
{ in: "query", key: "path" },
|
|
974
|
+
],
|
|
975
|
+
},
|
|
976
|
+
]);
|
|
977
|
+
return (options?.client ?? this.client).get({
|
|
978
|
+
url: "/file/content",
|
|
979
|
+
...options,
|
|
980
|
+
...params,
|
|
981
|
+
});
|
|
982
|
+
}
|
|
983
|
+
/**
|
|
984
|
+
* Get file status
|
|
985
|
+
*
|
|
986
|
+
* Get the git status of all files in the project.
|
|
987
|
+
*/
|
|
988
|
+
status(parameters, options) {
|
|
989
|
+
const params = buildClientParams([parameters], [
|
|
990
|
+
{
|
|
991
|
+
args: [
|
|
992
|
+
{ in: "query", key: "directory" },
|
|
993
|
+
{ in: "query", key: "workspace" },
|
|
994
|
+
],
|
|
995
|
+
},
|
|
996
|
+
]);
|
|
997
|
+
return (options?.client ?? this.client).get({
|
|
998
|
+
url: "/file/status",
|
|
999
|
+
...options,
|
|
1000
|
+
...params,
|
|
1001
|
+
});
|
|
1002
|
+
}
|
|
1003
|
+
}
|
|
1004
|
+
export class Instance extends HeyApiClient {
|
|
1005
|
+
/**
|
|
1006
|
+
* Dispose instance
|
|
1007
|
+
*
|
|
1008
|
+
* Clean up and dispose the current ZYRAXON instance, releasing all resources.
|
|
1009
|
+
*/
|
|
1010
|
+
dispose(parameters, options) {
|
|
1011
|
+
const params = buildClientParams([parameters], [
|
|
1012
|
+
{
|
|
1013
|
+
args: [
|
|
1014
|
+
{ in: "query", key: "directory" },
|
|
1015
|
+
{ in: "query", key: "workspace" },
|
|
1016
|
+
],
|
|
1017
|
+
},
|
|
1018
|
+
]);
|
|
1019
|
+
return (options?.client ?? this.client).post({
|
|
1020
|
+
url: "/instance/dispose",
|
|
1021
|
+
...options,
|
|
1022
|
+
...params,
|
|
1023
|
+
});
|
|
1024
|
+
}
|
|
1025
|
+
}
|
|
1026
|
+
export class Path extends HeyApiClient {
|
|
1027
|
+
/**
|
|
1028
|
+
* Get paths
|
|
1029
|
+
*
|
|
1030
|
+
* Retrieve the current working directory and related path information for the ZYRAXON instance.
|
|
1031
|
+
*/
|
|
1032
|
+
get(parameters, options) {
|
|
1033
|
+
const params = buildClientParams([parameters], [
|
|
1034
|
+
{
|
|
1035
|
+
args: [
|
|
1036
|
+
{ in: "query", key: "directory" },
|
|
1037
|
+
{ in: "query", key: "workspace" },
|
|
1038
|
+
],
|
|
1039
|
+
},
|
|
1040
|
+
]);
|
|
1041
|
+
return (options?.client ?? this.client).get({
|
|
1042
|
+
url: "/path",
|
|
1043
|
+
...options,
|
|
1044
|
+
...params,
|
|
1045
|
+
});
|
|
1046
|
+
}
|
|
1047
|
+
}
|
|
1048
|
+
export class Diff extends HeyApiClient {
|
|
1049
|
+
/**
|
|
1050
|
+
* Get raw VCS diff
|
|
1051
|
+
*
|
|
1052
|
+
* Retrieve a raw patch for current uncommitted changes.
|
|
1053
|
+
*/
|
|
1054
|
+
raw(parameters, options) {
|
|
1055
|
+
const params = buildClientParams([parameters], [
|
|
1056
|
+
{
|
|
1057
|
+
args: [
|
|
1058
|
+
{ in: "query", key: "directory" },
|
|
1059
|
+
{ in: "query", key: "workspace" },
|
|
1060
|
+
],
|
|
1061
|
+
},
|
|
1062
|
+
]);
|
|
1063
|
+
return (options?.client ?? this.client).get({
|
|
1064
|
+
url: "/vcs/diff/raw",
|
|
1065
|
+
...options,
|
|
1066
|
+
...params,
|
|
1067
|
+
});
|
|
1068
|
+
}
|
|
1069
|
+
}
|
|
1070
|
+
export class Vcs extends HeyApiClient {
|
|
1071
|
+
/**
|
|
1072
|
+
* Get VCS info
|
|
1073
|
+
*
|
|
1074
|
+
* Retrieve version control system (VCS) information for the current project, such as git branch.
|
|
1075
|
+
*/
|
|
1076
|
+
get(parameters, options) {
|
|
1077
|
+
const params = buildClientParams([parameters], [
|
|
1078
|
+
{
|
|
1079
|
+
args: [
|
|
1080
|
+
{ in: "query", key: "directory" },
|
|
1081
|
+
{ in: "query", key: "workspace" },
|
|
1082
|
+
],
|
|
1083
|
+
},
|
|
1084
|
+
]);
|
|
1085
|
+
return (options?.client ?? this.client).get({
|
|
1086
|
+
url: "/vcs",
|
|
1087
|
+
...options,
|
|
1088
|
+
...params,
|
|
1089
|
+
});
|
|
1090
|
+
}
|
|
1091
|
+
/**
|
|
1092
|
+
* Get VCS status
|
|
1093
|
+
*
|
|
1094
|
+
* Retrieve changed files in the current working tree without patches.
|
|
1095
|
+
*/
|
|
1096
|
+
status(parameters, options) {
|
|
1097
|
+
const params = buildClientParams([parameters], [
|
|
1098
|
+
{
|
|
1099
|
+
args: [
|
|
1100
|
+
{ in: "query", key: "directory" },
|
|
1101
|
+
{ in: "query", key: "workspace" },
|
|
1102
|
+
],
|
|
1103
|
+
},
|
|
1104
|
+
]);
|
|
1105
|
+
return (options?.client ?? this.client).get({
|
|
1106
|
+
url: "/vcs/status",
|
|
1107
|
+
...options,
|
|
1108
|
+
...params,
|
|
1109
|
+
});
|
|
1110
|
+
}
|
|
1111
|
+
/**
|
|
1112
|
+
* Get VCS diff
|
|
1113
|
+
*
|
|
1114
|
+
* Retrieve the current git diff for the working tree or against the default branch.
|
|
1115
|
+
*/
|
|
1116
|
+
diff(parameters, options) {
|
|
1117
|
+
const params = buildClientParams([parameters], [
|
|
1118
|
+
{
|
|
1119
|
+
args: [
|
|
1120
|
+
{ in: "query", key: "directory" },
|
|
1121
|
+
{ in: "query", key: "workspace" },
|
|
1122
|
+
{ in: "query", key: "mode" },
|
|
1123
|
+
{ in: "query", key: "context" },
|
|
1124
|
+
],
|
|
1125
|
+
},
|
|
1126
|
+
]);
|
|
1127
|
+
return (options?.client ?? this.client).get({
|
|
1128
|
+
url: "/vcs/diff",
|
|
1129
|
+
...options,
|
|
1130
|
+
...params,
|
|
1131
|
+
});
|
|
1132
|
+
}
|
|
1133
|
+
/**
|
|
1134
|
+
* Apply VCS patch
|
|
1135
|
+
*
|
|
1136
|
+
* Apply a raw patch to the current working tree.
|
|
1137
|
+
*/
|
|
1138
|
+
apply(parameters, options) {
|
|
1139
|
+
const params = buildClientParams([parameters], [
|
|
1140
|
+
{
|
|
1141
|
+
args: [
|
|
1142
|
+
{ in: "query", key: "directory" },
|
|
1143
|
+
{ in: "query", key: "workspace" },
|
|
1144
|
+
{ in: "body", key: "patch" },
|
|
1145
|
+
],
|
|
1146
|
+
},
|
|
1147
|
+
]);
|
|
1148
|
+
return (options?.client ?? this.client).post({
|
|
1149
|
+
url: "/vcs/apply",
|
|
1150
|
+
...options,
|
|
1151
|
+
...params,
|
|
1152
|
+
headers: {
|
|
1153
|
+
"Content-Type": "application/json",
|
|
1154
|
+
...options?.headers,
|
|
1155
|
+
...params.headers,
|
|
1156
|
+
},
|
|
1157
|
+
});
|
|
1158
|
+
}
|
|
1159
|
+
_diff;
|
|
1160
|
+
get diff2() {
|
|
1161
|
+
return (this._diff ??= new Diff({ client: this.client }));
|
|
1162
|
+
}
|
|
1163
|
+
}
|
|
1164
|
+
export class Command extends HeyApiClient {
|
|
1165
|
+
/**
|
|
1166
|
+
* List commands
|
|
1167
|
+
*
|
|
1168
|
+
* Get a list of all available commands in the ZYRAXON system.
|
|
1169
|
+
*/
|
|
1170
|
+
list(parameters, options) {
|
|
1171
|
+
const params = buildClientParams([parameters], [
|
|
1172
|
+
{
|
|
1173
|
+
args: [
|
|
1174
|
+
{ in: "query", key: "directory" },
|
|
1175
|
+
{ in: "query", key: "workspace" },
|
|
1176
|
+
],
|
|
1177
|
+
},
|
|
1178
|
+
]);
|
|
1179
|
+
return (options?.client ?? this.client).get({
|
|
1180
|
+
url: "/command",
|
|
1181
|
+
...options,
|
|
1182
|
+
...params,
|
|
1183
|
+
});
|
|
1184
|
+
}
|
|
1185
|
+
}
|
|
1186
|
+
export class Lsp extends HeyApiClient {
|
|
1187
|
+
/**
|
|
1188
|
+
* Get LSP status
|
|
1189
|
+
*
|
|
1190
|
+
* Get LSP server status
|
|
1191
|
+
*/
|
|
1192
|
+
status(parameters, options) {
|
|
1193
|
+
const params = buildClientParams([parameters], [
|
|
1194
|
+
{
|
|
1195
|
+
args: [
|
|
1196
|
+
{ in: "query", key: "directory" },
|
|
1197
|
+
{ in: "query", key: "workspace" },
|
|
1198
|
+
],
|
|
1199
|
+
},
|
|
1200
|
+
]);
|
|
1201
|
+
return (options?.client ?? this.client).get({
|
|
1202
|
+
url: "/lsp",
|
|
1203
|
+
...options,
|
|
1204
|
+
...params,
|
|
1205
|
+
});
|
|
1206
|
+
}
|
|
1207
|
+
}
|
|
1208
|
+
export class Formatter extends HeyApiClient {
|
|
1209
|
+
/**
|
|
1210
|
+
* Get formatter status
|
|
1211
|
+
*
|
|
1212
|
+
* Get formatter status
|
|
1213
|
+
*/
|
|
1214
|
+
status(parameters, options) {
|
|
1215
|
+
const params = buildClientParams([parameters], [
|
|
1216
|
+
{
|
|
1217
|
+
args: [
|
|
1218
|
+
{ in: "query", key: "directory" },
|
|
1219
|
+
{ in: "query", key: "workspace" },
|
|
1220
|
+
],
|
|
1221
|
+
},
|
|
1222
|
+
]);
|
|
1223
|
+
return (options?.client ?? this.client).get({
|
|
1224
|
+
url: "/formatter",
|
|
1225
|
+
...options,
|
|
1226
|
+
...params,
|
|
1227
|
+
});
|
|
1228
|
+
}
|
|
1229
|
+
}
|
|
1230
|
+
export class Auth2 extends HeyApiClient {
|
|
1231
|
+
/**
|
|
1232
|
+
* Remove MCP OAuth
|
|
1233
|
+
*
|
|
1234
|
+
* Remove OAuth credentials for an MCP server.
|
|
1235
|
+
*/
|
|
1236
|
+
remove(parameters, options) {
|
|
1237
|
+
const params = buildClientParams([parameters], [
|
|
1238
|
+
{
|
|
1239
|
+
args: [
|
|
1240
|
+
{ in: "path", key: "name" },
|
|
1241
|
+
{ in: "query", key: "directory" },
|
|
1242
|
+
{ in: "query", key: "workspace" },
|
|
1243
|
+
],
|
|
1244
|
+
},
|
|
1245
|
+
]);
|
|
1246
|
+
return (options?.client ?? this.client).delete({
|
|
1247
|
+
url: "/mcp/{name}/auth",
|
|
1248
|
+
...options,
|
|
1249
|
+
...params,
|
|
1250
|
+
});
|
|
1251
|
+
}
|
|
1252
|
+
/**
|
|
1253
|
+
* Start MCP OAuth
|
|
1254
|
+
*
|
|
1255
|
+
* Start OAuth authentication flow for a Model Context Protocol (MCP) server.
|
|
1256
|
+
*/
|
|
1257
|
+
start(parameters, options) {
|
|
1258
|
+
const params = buildClientParams([parameters], [
|
|
1259
|
+
{
|
|
1260
|
+
args: [
|
|
1261
|
+
{ in: "path", key: "name" },
|
|
1262
|
+
{ in: "query", key: "directory" },
|
|
1263
|
+
{ in: "query", key: "workspace" },
|
|
1264
|
+
],
|
|
1265
|
+
},
|
|
1266
|
+
]);
|
|
1267
|
+
return (options?.client ?? this.client).post({
|
|
1268
|
+
url: "/mcp/{name}/auth",
|
|
1269
|
+
...options,
|
|
1270
|
+
...params,
|
|
1271
|
+
});
|
|
1272
|
+
}
|
|
1273
|
+
/**
|
|
1274
|
+
* Complete MCP OAuth
|
|
1275
|
+
*
|
|
1276
|
+
* Complete OAuth authentication for a Model Context Protocol (MCP) server using the authorization code.
|
|
1277
|
+
*/
|
|
1278
|
+
callback(parameters, options) {
|
|
1279
|
+
const params = buildClientParams([parameters], [
|
|
1280
|
+
{
|
|
1281
|
+
args: [
|
|
1282
|
+
{ in: "path", key: "name" },
|
|
1283
|
+
{ in: "query", key: "directory" },
|
|
1284
|
+
{ in: "query", key: "workspace" },
|
|
1285
|
+
{ in: "body", key: "code" },
|
|
1286
|
+
],
|
|
1287
|
+
},
|
|
1288
|
+
]);
|
|
1289
|
+
return (options?.client ?? this.client).post({
|
|
1290
|
+
url: "/mcp/{name}/auth/callback",
|
|
1291
|
+
...options,
|
|
1292
|
+
...params,
|
|
1293
|
+
headers: {
|
|
1294
|
+
"Content-Type": "application/json",
|
|
1295
|
+
...options?.headers,
|
|
1296
|
+
...params.headers,
|
|
1297
|
+
},
|
|
1298
|
+
});
|
|
1299
|
+
}
|
|
1300
|
+
/**
|
|
1301
|
+
* Authenticate MCP OAuth
|
|
1302
|
+
*
|
|
1303
|
+
* Start OAuth flow and wait for callback (opens browser).
|
|
1304
|
+
*/
|
|
1305
|
+
authenticate(parameters, options) {
|
|
1306
|
+
const params = buildClientParams([parameters], [
|
|
1307
|
+
{
|
|
1308
|
+
args: [
|
|
1309
|
+
{ in: "path", key: "name" },
|
|
1310
|
+
{ in: "query", key: "directory" },
|
|
1311
|
+
{ in: "query", key: "workspace" },
|
|
1312
|
+
],
|
|
1313
|
+
},
|
|
1314
|
+
]);
|
|
1315
|
+
return (options?.client ?? this.client).post({
|
|
1316
|
+
url: "/mcp/{name}/auth/authenticate",
|
|
1317
|
+
...options,
|
|
1318
|
+
...params,
|
|
1319
|
+
});
|
|
1320
|
+
}
|
|
1321
|
+
}
|
|
1322
|
+
export class Mcp extends HeyApiClient {
|
|
1323
|
+
/**
|
|
1324
|
+
* Get MCP status
|
|
1325
|
+
*
|
|
1326
|
+
* Get the status of all Model Context Protocol (MCP) servers.
|
|
1327
|
+
*/
|
|
1328
|
+
status(parameters, options) {
|
|
1329
|
+
const params = buildClientParams([parameters], [
|
|
1330
|
+
{
|
|
1331
|
+
args: [
|
|
1332
|
+
{ in: "query", key: "directory" },
|
|
1333
|
+
{ in: "query", key: "workspace" },
|
|
1334
|
+
],
|
|
1335
|
+
},
|
|
1336
|
+
]);
|
|
1337
|
+
return (options?.client ?? this.client).get({
|
|
1338
|
+
url: "/mcp",
|
|
1339
|
+
...options,
|
|
1340
|
+
...params,
|
|
1341
|
+
});
|
|
1342
|
+
}
|
|
1343
|
+
/**
|
|
1344
|
+
* Add MCP server
|
|
1345
|
+
*
|
|
1346
|
+
* Dynamically add a new Model Context Protocol (MCP) server to the system.
|
|
1347
|
+
*/
|
|
1348
|
+
add(parameters, options) {
|
|
1349
|
+
const params = buildClientParams([parameters], [
|
|
1350
|
+
{
|
|
1351
|
+
args: [
|
|
1352
|
+
{ in: "query", key: "directory" },
|
|
1353
|
+
{ in: "query", key: "workspace" },
|
|
1354
|
+
{ in: "body", key: "name" },
|
|
1355
|
+
{ in: "body", key: "config" },
|
|
1356
|
+
],
|
|
1357
|
+
},
|
|
1358
|
+
]);
|
|
1359
|
+
return (options?.client ?? this.client).post({
|
|
1360
|
+
url: "/mcp",
|
|
1361
|
+
...options,
|
|
1362
|
+
...params,
|
|
1363
|
+
headers: {
|
|
1364
|
+
"Content-Type": "application/json",
|
|
1365
|
+
...options?.headers,
|
|
1366
|
+
...params.headers,
|
|
1367
|
+
},
|
|
1368
|
+
});
|
|
1369
|
+
}
|
|
1370
|
+
/**
|
|
1371
|
+
* Connect an MCP server.
|
|
1372
|
+
*/
|
|
1373
|
+
connect(parameters, options) {
|
|
1374
|
+
const params = buildClientParams([parameters], [
|
|
1375
|
+
{
|
|
1376
|
+
args: [
|
|
1377
|
+
{ in: "path", key: "name" },
|
|
1378
|
+
{ in: "query", key: "directory" },
|
|
1379
|
+
{ in: "query", key: "workspace" },
|
|
1380
|
+
],
|
|
1381
|
+
},
|
|
1382
|
+
]);
|
|
1383
|
+
return (options?.client ?? this.client).post({
|
|
1384
|
+
url: "/mcp/{name}/connect",
|
|
1385
|
+
...options,
|
|
1386
|
+
...params,
|
|
1387
|
+
});
|
|
1388
|
+
}
|
|
1389
|
+
/**
|
|
1390
|
+
* Disconnect an MCP server.
|
|
1391
|
+
*/
|
|
1392
|
+
disconnect(parameters, options) {
|
|
1393
|
+
const params = buildClientParams([parameters], [
|
|
1394
|
+
{
|
|
1395
|
+
args: [
|
|
1396
|
+
{ in: "path", key: "name" },
|
|
1397
|
+
{ in: "query", key: "directory" },
|
|
1398
|
+
{ in: "query", key: "workspace" },
|
|
1399
|
+
],
|
|
1400
|
+
},
|
|
1401
|
+
]);
|
|
1402
|
+
return (options?.client ?? this.client).post({
|
|
1403
|
+
url: "/mcp/{name}/disconnect",
|
|
1404
|
+
...options,
|
|
1405
|
+
...params,
|
|
1406
|
+
});
|
|
1407
|
+
}
|
|
1408
|
+
_auth;
|
|
1409
|
+
get auth() {
|
|
1410
|
+
return (this._auth ??= new Auth2({ client: this.client }));
|
|
1411
|
+
}
|
|
1412
|
+
}
|
|
1413
|
+
export class Project extends HeyApiClient {
|
|
1414
|
+
/**
|
|
1415
|
+
* List all projects
|
|
1416
|
+
*
|
|
1417
|
+
* Get a list of projects that have been opened with ZYRAXON.
|
|
1418
|
+
*/
|
|
1419
|
+
list(parameters, options) {
|
|
1420
|
+
const params = buildClientParams([parameters], [
|
|
1421
|
+
{
|
|
1422
|
+
args: [
|
|
1423
|
+
{ in: "query", key: "directory" },
|
|
1424
|
+
{ in: "query", key: "workspace" },
|
|
1425
|
+
],
|
|
1426
|
+
},
|
|
1427
|
+
]);
|
|
1428
|
+
return (options?.client ?? this.client).get({
|
|
1429
|
+
url: "/project",
|
|
1430
|
+
...options,
|
|
1431
|
+
...params,
|
|
1432
|
+
});
|
|
1433
|
+
}
|
|
1434
|
+
/**
|
|
1435
|
+
* Get current project
|
|
1436
|
+
*
|
|
1437
|
+
* Retrieve the currently active project that ZYRAXON is working with.
|
|
1438
|
+
*/
|
|
1439
|
+
current(parameters, options) {
|
|
1440
|
+
const params = buildClientParams([parameters], [
|
|
1441
|
+
{
|
|
1442
|
+
args: [
|
|
1443
|
+
{ in: "query", key: "directory" },
|
|
1444
|
+
{ in: "query", key: "workspace" },
|
|
1445
|
+
],
|
|
1446
|
+
},
|
|
1447
|
+
]);
|
|
1448
|
+
return (options?.client ?? this.client).get({
|
|
1449
|
+
url: "/project/current",
|
|
1450
|
+
...options,
|
|
1451
|
+
...params,
|
|
1452
|
+
});
|
|
1453
|
+
}
|
|
1454
|
+
/**
|
|
1455
|
+
* Initialize git repository
|
|
1456
|
+
*
|
|
1457
|
+
* Create a git repository for the current project and return the refreshed project info.
|
|
1458
|
+
*/
|
|
1459
|
+
initGit(parameters, options) {
|
|
1460
|
+
const params = buildClientParams([parameters], [
|
|
1461
|
+
{
|
|
1462
|
+
args: [
|
|
1463
|
+
{ in: "query", key: "directory" },
|
|
1464
|
+
{ in: "query", key: "workspace" },
|
|
1465
|
+
],
|
|
1466
|
+
},
|
|
1467
|
+
]);
|
|
1468
|
+
return (options?.client ?? this.client).post({
|
|
1469
|
+
url: "/project/git/init",
|
|
1470
|
+
...options,
|
|
1471
|
+
...params,
|
|
1472
|
+
});
|
|
1473
|
+
}
|
|
1474
|
+
/**
|
|
1475
|
+
* Update project
|
|
1476
|
+
*
|
|
1477
|
+
* Update project properties such as name, icon, and commands.
|
|
1478
|
+
*/
|
|
1479
|
+
update(parameters, options) {
|
|
1480
|
+
const params = buildClientParams([parameters], [
|
|
1481
|
+
{
|
|
1482
|
+
args: [
|
|
1483
|
+
{ in: "path", key: "projectID" },
|
|
1484
|
+
{ in: "query", key: "directory" },
|
|
1485
|
+
{ in: "query", key: "workspace" },
|
|
1486
|
+
{ in: "body", key: "name" },
|
|
1487
|
+
{ in: "body", key: "icon" },
|
|
1488
|
+
{ in: "body", key: "commands" },
|
|
1489
|
+
],
|
|
1490
|
+
},
|
|
1491
|
+
]);
|
|
1492
|
+
return (options?.client ?? this.client).patch({
|
|
1493
|
+
url: "/project/{projectID}",
|
|
1494
|
+
...options,
|
|
1495
|
+
...params,
|
|
1496
|
+
headers: {
|
|
1497
|
+
"Content-Type": "application/json",
|
|
1498
|
+
...options?.headers,
|
|
1499
|
+
...params.headers,
|
|
1500
|
+
},
|
|
1501
|
+
});
|
|
1502
|
+
}
|
|
1503
|
+
/**
|
|
1504
|
+
* List project directories
|
|
1505
|
+
*
|
|
1506
|
+
* List known local absolute directories for a project.
|
|
1507
|
+
*/
|
|
1508
|
+
directories(parameters, options) {
|
|
1509
|
+
const params = buildClientParams([parameters], [
|
|
1510
|
+
{
|
|
1511
|
+
args: [
|
|
1512
|
+
{ in: "path", key: "projectID" },
|
|
1513
|
+
{ in: "query", key: "directory" },
|
|
1514
|
+
{ in: "query", key: "workspace" },
|
|
1515
|
+
],
|
|
1516
|
+
},
|
|
1517
|
+
]);
|
|
1518
|
+
return (options?.client ?? this.client).get({
|
|
1519
|
+
url: "/project/{projectID}/directories",
|
|
1520
|
+
...options,
|
|
1521
|
+
...params,
|
|
1522
|
+
});
|
|
1523
|
+
}
|
|
1524
|
+
}
|
|
1525
|
+
export class Pty extends HeyApiClient {
|
|
1526
|
+
/**
|
|
1527
|
+
* List available shells
|
|
1528
|
+
*
|
|
1529
|
+
* Get a list of available shells on the system.
|
|
1530
|
+
*/
|
|
1531
|
+
shells(parameters, options) {
|
|
1532
|
+
const params = buildClientParams([parameters], [
|
|
1533
|
+
{
|
|
1534
|
+
args: [
|
|
1535
|
+
{ in: "query", key: "directory" },
|
|
1536
|
+
{ in: "query", key: "workspace" },
|
|
1537
|
+
],
|
|
1538
|
+
},
|
|
1539
|
+
]);
|
|
1540
|
+
return (options?.client ?? this.client).get({
|
|
1541
|
+
url: "/pty/shells",
|
|
1542
|
+
...options,
|
|
1543
|
+
...params,
|
|
1544
|
+
});
|
|
1545
|
+
}
|
|
1546
|
+
/**
|
|
1547
|
+
* List PTY sessions
|
|
1548
|
+
*
|
|
1549
|
+
* Get a list of all active pseudo-terminal (PTY) sessions managed by ZYRAXON.
|
|
1550
|
+
*/
|
|
1551
|
+
list(parameters, options) {
|
|
1552
|
+
const params = buildClientParams([parameters], [
|
|
1553
|
+
{
|
|
1554
|
+
args: [
|
|
1555
|
+
{ in: "query", key: "directory" },
|
|
1556
|
+
{ in: "query", key: "workspace" },
|
|
1557
|
+
],
|
|
1558
|
+
},
|
|
1559
|
+
]);
|
|
1560
|
+
return (options?.client ?? this.client).get({
|
|
1561
|
+
url: "/pty",
|
|
1562
|
+
...options,
|
|
1563
|
+
...params,
|
|
1564
|
+
});
|
|
1565
|
+
}
|
|
1566
|
+
/**
|
|
1567
|
+
* Create PTY session
|
|
1568
|
+
*
|
|
1569
|
+
* Create a new pseudo-terminal (PTY) session for running shell commands and processes.
|
|
1570
|
+
*/
|
|
1571
|
+
create(parameters, options) {
|
|
1572
|
+
const params = buildClientParams([parameters], [
|
|
1573
|
+
{
|
|
1574
|
+
args: [
|
|
1575
|
+
{ in: "query", key: "directory" },
|
|
1576
|
+
{ in: "query", key: "workspace" },
|
|
1577
|
+
{ in: "body", key: "command" },
|
|
1578
|
+
{ in: "body", key: "args" },
|
|
1579
|
+
{ in: "body", key: "cwd" },
|
|
1580
|
+
{ in: "body", key: "title" },
|
|
1581
|
+
{ in: "body", key: "env" },
|
|
1582
|
+
],
|
|
1583
|
+
},
|
|
1584
|
+
]);
|
|
1585
|
+
return (options?.client ?? this.client).post({
|
|
1586
|
+
url: "/pty",
|
|
1587
|
+
...options,
|
|
1588
|
+
...params,
|
|
1589
|
+
headers: {
|
|
1590
|
+
"Content-Type": "application/json",
|
|
1591
|
+
...options?.headers,
|
|
1592
|
+
...params.headers,
|
|
1593
|
+
},
|
|
1594
|
+
});
|
|
1595
|
+
}
|
|
1596
|
+
/**
|
|
1597
|
+
* Remove PTY session
|
|
1598
|
+
*
|
|
1599
|
+
* Remove and terminate a specific pseudo-terminal (PTY) session.
|
|
1600
|
+
*/
|
|
1601
|
+
remove(parameters, options) {
|
|
1602
|
+
const params = buildClientParams([parameters], [
|
|
1603
|
+
{
|
|
1604
|
+
args: [
|
|
1605
|
+
{ in: "path", key: "ptyID" },
|
|
1606
|
+
{ in: "query", key: "directory" },
|
|
1607
|
+
{ in: "query", key: "workspace" },
|
|
1608
|
+
],
|
|
1609
|
+
},
|
|
1610
|
+
]);
|
|
1611
|
+
return (options?.client ?? this.client).delete({
|
|
1612
|
+
url: "/pty/{ptyID}",
|
|
1613
|
+
...options,
|
|
1614
|
+
...params,
|
|
1615
|
+
});
|
|
1616
|
+
}
|
|
1617
|
+
/**
|
|
1618
|
+
* Get PTY session
|
|
1619
|
+
*
|
|
1620
|
+
* Retrieve detailed information about a specific pseudo-terminal (PTY) session.
|
|
1621
|
+
*/
|
|
1622
|
+
get(parameters, options) {
|
|
1623
|
+
const params = buildClientParams([parameters], [
|
|
1624
|
+
{
|
|
1625
|
+
args: [
|
|
1626
|
+
{ in: "path", key: "ptyID" },
|
|
1627
|
+
{ in: "query", key: "directory" },
|
|
1628
|
+
{ in: "query", key: "workspace" },
|
|
1629
|
+
],
|
|
1630
|
+
},
|
|
1631
|
+
]);
|
|
1632
|
+
return (options?.client ?? this.client).get({
|
|
1633
|
+
url: "/pty/{ptyID}",
|
|
1634
|
+
...options,
|
|
1635
|
+
...params,
|
|
1636
|
+
});
|
|
1637
|
+
}
|
|
1638
|
+
/**
|
|
1639
|
+
* Update PTY session
|
|
1640
|
+
*
|
|
1641
|
+
* Update properties of an existing pseudo-terminal (PTY) session.
|
|
1642
|
+
*/
|
|
1643
|
+
update(parameters, options) {
|
|
1644
|
+
const params = buildClientParams([parameters], [
|
|
1645
|
+
{
|
|
1646
|
+
args: [
|
|
1647
|
+
{ in: "path", key: "ptyID" },
|
|
1648
|
+
{ in: "query", key: "directory" },
|
|
1649
|
+
{ in: "query", key: "workspace" },
|
|
1650
|
+
{ in: "body", key: "title" },
|
|
1651
|
+
{ in: "body", key: "size" },
|
|
1652
|
+
],
|
|
1653
|
+
},
|
|
1654
|
+
]);
|
|
1655
|
+
return (options?.client ?? this.client).put({
|
|
1656
|
+
url: "/pty/{ptyID}",
|
|
1657
|
+
...options,
|
|
1658
|
+
...params,
|
|
1659
|
+
headers: {
|
|
1660
|
+
"Content-Type": "application/json",
|
|
1661
|
+
...options?.headers,
|
|
1662
|
+
...params.headers,
|
|
1663
|
+
},
|
|
1664
|
+
});
|
|
1665
|
+
}
|
|
1666
|
+
/**
|
|
1667
|
+
* Create PTY WebSocket token
|
|
1668
|
+
*
|
|
1669
|
+
* Create a short-lived ticket for opening a PTY WebSocket connection.
|
|
1670
|
+
*/
|
|
1671
|
+
connectToken(parameters, options) {
|
|
1672
|
+
const params = buildClientParams([parameters], [
|
|
1673
|
+
{
|
|
1674
|
+
args: [
|
|
1675
|
+
{ in: "path", key: "ptyID" },
|
|
1676
|
+
{ in: "query", key: "directory" },
|
|
1677
|
+
{ in: "query", key: "workspace" },
|
|
1678
|
+
],
|
|
1679
|
+
},
|
|
1680
|
+
]);
|
|
1681
|
+
return (options?.client ?? this.client).post({
|
|
1682
|
+
url: "/pty/{ptyID}/connect-token",
|
|
1683
|
+
...options,
|
|
1684
|
+
...params,
|
|
1685
|
+
});
|
|
1686
|
+
}
|
|
1687
|
+
/**
|
|
1688
|
+
* Connect to PTY session
|
|
1689
|
+
*
|
|
1690
|
+
* Establish a WebSocket connection to interact with a pseudo-terminal (PTY) session in real-time.
|
|
1691
|
+
*/
|
|
1692
|
+
connect(parameters, options) {
|
|
1693
|
+
const params = buildClientParams([parameters], [
|
|
1694
|
+
{
|
|
1695
|
+
args: [
|
|
1696
|
+
{ in: "path", key: "ptyID" },
|
|
1697
|
+
{ in: "query", key: "directory" },
|
|
1698
|
+
{ in: "query", key: "workspace" },
|
|
1699
|
+
{ in: "query", key: "cursor" },
|
|
1700
|
+
{ in: "query", key: "ticket" },
|
|
1701
|
+
],
|
|
1702
|
+
},
|
|
1703
|
+
]);
|
|
1704
|
+
return (options?.client ?? this.client).get({
|
|
1705
|
+
url: "/pty/{ptyID}/connect",
|
|
1706
|
+
...options,
|
|
1707
|
+
...params,
|
|
1708
|
+
});
|
|
1709
|
+
}
|
|
1710
|
+
}
|
|
1711
|
+
export class Question extends HeyApiClient {
|
|
1712
|
+
/**
|
|
1713
|
+
* List pending questions
|
|
1714
|
+
*
|
|
1715
|
+
* Get all pending question requests across all sessions.
|
|
1716
|
+
*/
|
|
1717
|
+
list(parameters, options) {
|
|
1718
|
+
const params = buildClientParams([parameters], [
|
|
1719
|
+
{
|
|
1720
|
+
args: [
|
|
1721
|
+
{ in: "query", key: "directory" },
|
|
1722
|
+
{ in: "query", key: "workspace" },
|
|
1723
|
+
],
|
|
1724
|
+
},
|
|
1725
|
+
]);
|
|
1726
|
+
return (options?.client ?? this.client).get({
|
|
1727
|
+
url: "/question",
|
|
1728
|
+
...options,
|
|
1729
|
+
...params,
|
|
1730
|
+
});
|
|
1731
|
+
}
|
|
1732
|
+
/**
|
|
1733
|
+
* Reply to question request
|
|
1734
|
+
*
|
|
1735
|
+
* Provide answers to a question request from the AI assistant.
|
|
1736
|
+
*/
|
|
1737
|
+
reply(parameters, options) {
|
|
1738
|
+
const params = buildClientParams([parameters], [
|
|
1739
|
+
{
|
|
1740
|
+
args: [
|
|
1741
|
+
{ in: "path", key: "requestID" },
|
|
1742
|
+
{ in: "query", key: "directory" },
|
|
1743
|
+
{ in: "query", key: "workspace" },
|
|
1744
|
+
{ in: "body", key: "answers" },
|
|
1745
|
+
],
|
|
1746
|
+
},
|
|
1747
|
+
]);
|
|
1748
|
+
return (options?.client ?? this.client).post({
|
|
1749
|
+
url: "/question/{requestID}/reply",
|
|
1750
|
+
...options,
|
|
1751
|
+
...params,
|
|
1752
|
+
headers: {
|
|
1753
|
+
"Content-Type": "application/json",
|
|
1754
|
+
...options?.headers,
|
|
1755
|
+
...params.headers,
|
|
1756
|
+
},
|
|
1757
|
+
});
|
|
1758
|
+
}
|
|
1759
|
+
/**
|
|
1760
|
+
* Reject question request
|
|
1761
|
+
*
|
|
1762
|
+
* Reject a question request from the AI assistant.
|
|
1763
|
+
*/
|
|
1764
|
+
reject(parameters, options) {
|
|
1765
|
+
const params = buildClientParams([parameters], [
|
|
1766
|
+
{
|
|
1767
|
+
args: [
|
|
1768
|
+
{ in: "path", key: "requestID" },
|
|
1769
|
+
{ in: "query", key: "directory" },
|
|
1770
|
+
{ in: "query", key: "workspace" },
|
|
1771
|
+
],
|
|
1772
|
+
},
|
|
1773
|
+
]);
|
|
1774
|
+
return (options?.client ?? this.client).post({
|
|
1775
|
+
url: "/question/{requestID}/reject",
|
|
1776
|
+
...options,
|
|
1777
|
+
...params,
|
|
1778
|
+
});
|
|
1779
|
+
}
|
|
1780
|
+
}
|
|
1781
|
+
export class Permission extends HeyApiClient {
|
|
1782
|
+
/**
|
|
1783
|
+
* List pending permissions
|
|
1784
|
+
*
|
|
1785
|
+
* Get all pending permission requests across all sessions.
|
|
1786
|
+
*/
|
|
1787
|
+
list(parameters, options) {
|
|
1788
|
+
const params = buildClientParams([parameters], [
|
|
1789
|
+
{
|
|
1790
|
+
args: [
|
|
1791
|
+
{ in: "query", key: "directory" },
|
|
1792
|
+
{ in: "query", key: "workspace" },
|
|
1793
|
+
],
|
|
1794
|
+
},
|
|
1795
|
+
]);
|
|
1796
|
+
return (options?.client ?? this.client).get({
|
|
1797
|
+
url: "/permission",
|
|
1798
|
+
...options,
|
|
1799
|
+
...params,
|
|
1800
|
+
});
|
|
1801
|
+
}
|
|
1802
|
+
/**
|
|
1803
|
+
* Respond to permission request
|
|
1804
|
+
*
|
|
1805
|
+
* Approve or deny a permission request from the AI assistant.
|
|
1806
|
+
*/
|
|
1807
|
+
reply(parameters, options) {
|
|
1808
|
+
const params = buildClientParams([parameters], [
|
|
1809
|
+
{
|
|
1810
|
+
args: [
|
|
1811
|
+
{ in: "path", key: "requestID" },
|
|
1812
|
+
{ in: "query", key: "directory" },
|
|
1813
|
+
{ in: "query", key: "workspace" },
|
|
1814
|
+
{ in: "body", key: "reply" },
|
|
1815
|
+
{ in: "body", key: "message" },
|
|
1816
|
+
],
|
|
1817
|
+
},
|
|
1818
|
+
]);
|
|
1819
|
+
return (options?.client ?? this.client).post({
|
|
1820
|
+
url: "/permission/{requestID}/reply",
|
|
1821
|
+
...options,
|
|
1822
|
+
...params,
|
|
1823
|
+
headers: {
|
|
1824
|
+
"Content-Type": "application/json",
|
|
1825
|
+
...options?.headers,
|
|
1826
|
+
...params.headers,
|
|
1827
|
+
},
|
|
1828
|
+
});
|
|
1829
|
+
}
|
|
1830
|
+
/**
|
|
1831
|
+
* Respond to permission
|
|
1832
|
+
*
|
|
1833
|
+
* Approve or deny a permission request from the AI assistant.
|
|
1834
|
+
*
|
|
1835
|
+
* @deprecated
|
|
1836
|
+
*/
|
|
1837
|
+
respond(parameters, options) {
|
|
1838
|
+
const params = buildClientParams([parameters], [
|
|
1839
|
+
{
|
|
1840
|
+
args: [
|
|
1841
|
+
{ in: "path", key: "sessionID" },
|
|
1842
|
+
{ in: "path", key: "permissionID" },
|
|
1843
|
+
{ in: "query", key: "directory" },
|
|
1844
|
+
{ in: "query", key: "workspace" },
|
|
1845
|
+
{ in: "body", key: "response" },
|
|
1846
|
+
],
|
|
1847
|
+
},
|
|
1848
|
+
]);
|
|
1849
|
+
return (options?.client ?? this.client).post({
|
|
1850
|
+
url: "/session/{sessionID}/permissions/{permissionID}",
|
|
1851
|
+
...options,
|
|
1852
|
+
...params,
|
|
1853
|
+
headers: {
|
|
1854
|
+
"Content-Type": "application/json",
|
|
1855
|
+
...options?.headers,
|
|
1856
|
+
...params.headers,
|
|
1857
|
+
},
|
|
1858
|
+
});
|
|
1859
|
+
}
|
|
1860
|
+
}
|
|
1861
|
+
export class Oauth extends HeyApiClient {
|
|
1862
|
+
/**
|
|
1863
|
+
* Start OAuth authorization
|
|
1864
|
+
*
|
|
1865
|
+
* Start the OAuth authorization flow for a provider.
|
|
1866
|
+
*/
|
|
1867
|
+
authorize(parameters, options) {
|
|
1868
|
+
const params = buildClientParams([parameters], [
|
|
1869
|
+
{
|
|
1870
|
+
args: [
|
|
1871
|
+
{ in: "path", key: "providerID" },
|
|
1872
|
+
{ in: "query", key: "directory" },
|
|
1873
|
+
{ in: "query", key: "workspace" },
|
|
1874
|
+
{ in: "body", key: "method" },
|
|
1875
|
+
{ in: "body", key: "inputs" },
|
|
1876
|
+
],
|
|
1877
|
+
},
|
|
1878
|
+
]);
|
|
1879
|
+
return (options?.client ?? this.client).post({
|
|
1880
|
+
url: "/provider/{providerID}/oauth/authorize",
|
|
1881
|
+
...options,
|
|
1882
|
+
...params,
|
|
1883
|
+
headers: {
|
|
1884
|
+
"Content-Type": "application/json",
|
|
1885
|
+
...options?.headers,
|
|
1886
|
+
...params.headers,
|
|
1887
|
+
},
|
|
1888
|
+
});
|
|
1889
|
+
}
|
|
1890
|
+
/**
|
|
1891
|
+
* Handle OAuth callback
|
|
1892
|
+
*
|
|
1893
|
+
* Handle the OAuth callback from a provider after user authorization.
|
|
1894
|
+
*/
|
|
1895
|
+
callback(parameters, options) {
|
|
1896
|
+
const params = buildClientParams([parameters], [
|
|
1897
|
+
{
|
|
1898
|
+
args: [
|
|
1899
|
+
{ in: "path", key: "providerID" },
|
|
1900
|
+
{ in: "query", key: "directory" },
|
|
1901
|
+
{ in: "query", key: "workspace" },
|
|
1902
|
+
{ in: "body", key: "method" },
|
|
1903
|
+
{ in: "body", key: "code" },
|
|
1904
|
+
],
|
|
1905
|
+
},
|
|
1906
|
+
]);
|
|
1907
|
+
return (options?.client ?? this.client).post({
|
|
1908
|
+
url: "/provider/{providerID}/oauth/callback",
|
|
1909
|
+
...options,
|
|
1910
|
+
...params,
|
|
1911
|
+
headers: {
|
|
1912
|
+
"Content-Type": "application/json",
|
|
1913
|
+
...options?.headers,
|
|
1914
|
+
...params.headers,
|
|
1915
|
+
},
|
|
1916
|
+
});
|
|
1917
|
+
}
|
|
1918
|
+
}
|
|
1919
|
+
export class Provider extends HeyApiClient {
|
|
1920
|
+
/**
|
|
1921
|
+
* List providers
|
|
1922
|
+
*
|
|
1923
|
+
* Get a list of all available AI providers, including both available and connected ones.
|
|
1924
|
+
*/
|
|
1925
|
+
list(parameters, options) {
|
|
1926
|
+
const params = buildClientParams([parameters], [
|
|
1927
|
+
{
|
|
1928
|
+
args: [
|
|
1929
|
+
{ in: "query", key: "directory" },
|
|
1930
|
+
{ in: "query", key: "workspace" },
|
|
1931
|
+
],
|
|
1932
|
+
},
|
|
1933
|
+
]);
|
|
1934
|
+
return (options?.client ?? this.client).get({
|
|
1935
|
+
url: "/provider",
|
|
1936
|
+
...options,
|
|
1937
|
+
...params,
|
|
1938
|
+
});
|
|
1939
|
+
}
|
|
1940
|
+
/**
|
|
1941
|
+
* Get provider auth methods
|
|
1942
|
+
*
|
|
1943
|
+
* Retrieve available authentication methods for all AI providers.
|
|
1944
|
+
*/
|
|
1945
|
+
auth(parameters, options) {
|
|
1946
|
+
const params = buildClientParams([parameters], [
|
|
1947
|
+
{
|
|
1948
|
+
args: [
|
|
1949
|
+
{ in: "query", key: "directory" },
|
|
1950
|
+
{ in: "query", key: "workspace" },
|
|
1951
|
+
],
|
|
1952
|
+
},
|
|
1953
|
+
]);
|
|
1954
|
+
return (options?.client ?? this.client).get({
|
|
1955
|
+
url: "/provider/auth",
|
|
1956
|
+
...options,
|
|
1957
|
+
...params,
|
|
1958
|
+
});
|
|
1959
|
+
}
|
|
1960
|
+
_oauth;
|
|
1961
|
+
get oauth() {
|
|
1962
|
+
return (this._oauth ??= new Oauth({ client: this.client }));
|
|
1963
|
+
}
|
|
1964
|
+
}
|
|
1965
|
+
export class Session2 extends HeyApiClient {
|
|
1966
|
+
/**
|
|
1967
|
+
* List sessions
|
|
1968
|
+
*
|
|
1969
|
+
* Get a list of all ZYRAXON sessions, sorted by most recently updated.
|
|
1970
|
+
*/
|
|
1971
|
+
list(parameters, options) {
|
|
1972
|
+
const params = buildClientParams([parameters], [
|
|
1973
|
+
{
|
|
1974
|
+
args: [
|
|
1975
|
+
{ in: "query", key: "directory" },
|
|
1976
|
+
{ in: "query", key: "workspace" },
|
|
1977
|
+
{ in: "query", key: "scope" },
|
|
1978
|
+
{ in: "query", key: "path" },
|
|
1979
|
+
{ in: "query", key: "roots" },
|
|
1980
|
+
{ in: "query", key: "start" },
|
|
1981
|
+
{ in: "query", key: "search" },
|
|
1982
|
+
{ in: "query", key: "limit" },
|
|
1983
|
+
],
|
|
1984
|
+
},
|
|
1985
|
+
]);
|
|
1986
|
+
return (options?.client ?? this.client).get({
|
|
1987
|
+
url: "/session",
|
|
1988
|
+
...options,
|
|
1989
|
+
...params,
|
|
1990
|
+
});
|
|
1991
|
+
}
|
|
1992
|
+
/**
|
|
1993
|
+
* Create session
|
|
1994
|
+
*
|
|
1995
|
+
* Create a new ZYRAXON session for interacting with AI assistants and managing conversations.
|
|
1996
|
+
*/
|
|
1997
|
+
create(parameters, options) {
|
|
1998
|
+
const params = buildClientParams([parameters], [
|
|
1999
|
+
{
|
|
2000
|
+
args: [
|
|
2001
|
+
{ in: "query", key: "directory" },
|
|
2002
|
+
{ in: "query", key: "workspace" },
|
|
2003
|
+
{ in: "body", key: "parentID" },
|
|
2004
|
+
{ in: "body", key: "title" },
|
|
2005
|
+
{ in: "body", key: "agent" },
|
|
2006
|
+
{ in: "body", key: "model" },
|
|
2007
|
+
{ in: "body", key: "metadata" },
|
|
2008
|
+
{ in: "body", key: "permission" },
|
|
2009
|
+
{ in: "body", key: "workspaceID" },
|
|
2010
|
+
],
|
|
2011
|
+
},
|
|
2012
|
+
]);
|
|
2013
|
+
return (options?.client ?? this.client).post({
|
|
2014
|
+
url: "/session",
|
|
2015
|
+
...options,
|
|
2016
|
+
...params,
|
|
2017
|
+
headers: {
|
|
2018
|
+
"Content-Type": "application/json",
|
|
2019
|
+
...options?.headers,
|
|
2020
|
+
...params.headers,
|
|
2021
|
+
},
|
|
2022
|
+
});
|
|
2023
|
+
}
|
|
2024
|
+
/**
|
|
2025
|
+
* Get session status
|
|
2026
|
+
*
|
|
2027
|
+
* Retrieve the current status of all sessions, including active, idle, and completed states.
|
|
2028
|
+
*/
|
|
2029
|
+
status(parameters, options) {
|
|
2030
|
+
const params = buildClientParams([parameters], [
|
|
2031
|
+
{
|
|
2032
|
+
args: [
|
|
2033
|
+
{ in: "query", key: "directory" },
|
|
2034
|
+
{ in: "query", key: "workspace" },
|
|
2035
|
+
],
|
|
2036
|
+
},
|
|
2037
|
+
]);
|
|
2038
|
+
return (options?.client ?? this.client).get({
|
|
2039
|
+
url: "/session/status",
|
|
2040
|
+
...options,
|
|
2041
|
+
...params,
|
|
2042
|
+
});
|
|
2043
|
+
}
|
|
2044
|
+
/**
|
|
2045
|
+
* Delete session
|
|
2046
|
+
*
|
|
2047
|
+
* Delete a session and permanently remove all associated data, including messages and history.
|
|
2048
|
+
*/
|
|
2049
|
+
delete(parameters, options) {
|
|
2050
|
+
const params = buildClientParams([parameters], [
|
|
2051
|
+
{
|
|
2052
|
+
args: [
|
|
2053
|
+
{ in: "path", key: "sessionID" },
|
|
2054
|
+
{ in: "query", key: "directory" },
|
|
2055
|
+
{ in: "query", key: "workspace" },
|
|
2056
|
+
],
|
|
2057
|
+
},
|
|
2058
|
+
]);
|
|
2059
|
+
return (options?.client ?? this.client).delete({
|
|
2060
|
+
url: "/session/{sessionID}",
|
|
2061
|
+
...options,
|
|
2062
|
+
...params,
|
|
2063
|
+
});
|
|
2064
|
+
}
|
|
2065
|
+
/**
|
|
2066
|
+
* Get session
|
|
2067
|
+
*
|
|
2068
|
+
* Retrieve detailed information about a specific ZYRAXON session.
|
|
2069
|
+
*/
|
|
2070
|
+
get(parameters, options) {
|
|
2071
|
+
const params = buildClientParams([parameters], [
|
|
2072
|
+
{
|
|
2073
|
+
args: [
|
|
2074
|
+
{ in: "path", key: "sessionID" },
|
|
2075
|
+
{ in: "query", key: "directory" },
|
|
2076
|
+
{ in: "query", key: "workspace" },
|
|
2077
|
+
],
|
|
2078
|
+
},
|
|
2079
|
+
]);
|
|
2080
|
+
return (options?.client ?? this.client).get({
|
|
2081
|
+
url: "/session/{sessionID}",
|
|
2082
|
+
...options,
|
|
2083
|
+
...params,
|
|
2084
|
+
});
|
|
2085
|
+
}
|
|
2086
|
+
/**
|
|
2087
|
+
* Update session
|
|
2088
|
+
*
|
|
2089
|
+
* Update properties of an existing session, such as title or other metadata.
|
|
2090
|
+
*/
|
|
2091
|
+
update(parameters, options) {
|
|
2092
|
+
const params = buildClientParams([parameters], [
|
|
2093
|
+
{
|
|
2094
|
+
args: [
|
|
2095
|
+
{ in: "path", key: "sessionID" },
|
|
2096
|
+
{ in: "query", key: "directory" },
|
|
2097
|
+
{ in: "query", key: "workspace" },
|
|
2098
|
+
{ in: "body", key: "title" },
|
|
2099
|
+
{ in: "body", key: "metadata" },
|
|
2100
|
+
{ in: "body", key: "permission" },
|
|
2101
|
+
{ in: "body", key: "time" },
|
|
2102
|
+
],
|
|
2103
|
+
},
|
|
2104
|
+
]);
|
|
2105
|
+
return (options?.client ?? this.client).patch({
|
|
2106
|
+
url: "/session/{sessionID}",
|
|
2107
|
+
...options,
|
|
2108
|
+
...params,
|
|
2109
|
+
headers: {
|
|
2110
|
+
"Content-Type": "application/json",
|
|
2111
|
+
...options?.headers,
|
|
2112
|
+
...params.headers,
|
|
2113
|
+
},
|
|
2114
|
+
});
|
|
2115
|
+
}
|
|
2116
|
+
/**
|
|
2117
|
+
* Get session children
|
|
2118
|
+
*
|
|
2119
|
+
* Retrieve all child sessions that were forked from the specified parent session.
|
|
2120
|
+
*/
|
|
2121
|
+
children(parameters, options) {
|
|
2122
|
+
const params = buildClientParams([parameters], [
|
|
2123
|
+
{
|
|
2124
|
+
args: [
|
|
2125
|
+
{ in: "path", key: "sessionID" },
|
|
2126
|
+
{ in: "query", key: "directory" },
|
|
2127
|
+
{ in: "query", key: "workspace" },
|
|
2128
|
+
],
|
|
2129
|
+
},
|
|
2130
|
+
]);
|
|
2131
|
+
return (options?.client ?? this.client).get({
|
|
2132
|
+
url: "/session/{sessionID}/children",
|
|
2133
|
+
...options,
|
|
2134
|
+
...params,
|
|
2135
|
+
});
|
|
2136
|
+
}
|
|
2137
|
+
/**
|
|
2138
|
+
* Get session todos
|
|
2139
|
+
*
|
|
2140
|
+
* Retrieve the todo list associated with a specific session, showing tasks and action items.
|
|
2141
|
+
*/
|
|
2142
|
+
todo(parameters, options) {
|
|
2143
|
+
const params = buildClientParams([parameters], [
|
|
2144
|
+
{
|
|
2145
|
+
args: [
|
|
2146
|
+
{ in: "path", key: "sessionID" },
|
|
2147
|
+
{ in: "query", key: "directory" },
|
|
2148
|
+
{ in: "query", key: "workspace" },
|
|
2149
|
+
],
|
|
2150
|
+
},
|
|
2151
|
+
]);
|
|
2152
|
+
return (options?.client ?? this.client).get({
|
|
2153
|
+
url: "/session/{sessionID}/todo",
|
|
2154
|
+
...options,
|
|
2155
|
+
...params,
|
|
2156
|
+
});
|
|
2157
|
+
}
|
|
2158
|
+
/**
|
|
2159
|
+
* Get message diff
|
|
2160
|
+
*
|
|
2161
|
+
* Get the file changes (diff) that resulted from a specific user message in the session.
|
|
2162
|
+
*/
|
|
2163
|
+
diff(parameters, options) {
|
|
2164
|
+
const params = buildClientParams([parameters], [
|
|
2165
|
+
{
|
|
2166
|
+
args: [
|
|
2167
|
+
{ in: "path", key: "sessionID" },
|
|
2168
|
+
{ in: "query", key: "directory" },
|
|
2169
|
+
{ in: "query", key: "workspace" },
|
|
2170
|
+
{ in: "query", key: "messageID" },
|
|
2171
|
+
],
|
|
2172
|
+
},
|
|
2173
|
+
]);
|
|
2174
|
+
return (options?.client ?? this.client).get({
|
|
2175
|
+
url: "/session/{sessionID}/diff",
|
|
2176
|
+
...options,
|
|
2177
|
+
...params,
|
|
2178
|
+
});
|
|
2179
|
+
}
|
|
2180
|
+
/**
|
|
2181
|
+
* Get session messages
|
|
2182
|
+
*
|
|
2183
|
+
* Retrieve all messages in a session, including user prompts and AI responses.
|
|
2184
|
+
*/
|
|
2185
|
+
messages(parameters, options) {
|
|
2186
|
+
const params = buildClientParams([parameters], [
|
|
2187
|
+
{
|
|
2188
|
+
args: [
|
|
2189
|
+
{ in: "path", key: "sessionID" },
|
|
2190
|
+
{ in: "query", key: "directory" },
|
|
2191
|
+
{ in: "query", key: "workspace" },
|
|
2192
|
+
{ in: "query", key: "limit" },
|
|
2193
|
+
{ in: "query", key: "before" },
|
|
2194
|
+
],
|
|
2195
|
+
},
|
|
2196
|
+
]);
|
|
2197
|
+
return (options?.client ?? this.client).get({
|
|
2198
|
+
url: "/session/{sessionID}/message",
|
|
2199
|
+
...options,
|
|
2200
|
+
...params,
|
|
2201
|
+
});
|
|
2202
|
+
}
|
|
2203
|
+
/**
|
|
2204
|
+
* Send message
|
|
2205
|
+
*
|
|
2206
|
+
* Create and send a new message to a session, streaming the AI response.
|
|
2207
|
+
*/
|
|
2208
|
+
prompt(parameters, options) {
|
|
2209
|
+
const params = buildClientParams([parameters], [
|
|
2210
|
+
{
|
|
2211
|
+
args: [
|
|
2212
|
+
{ in: "path", key: "sessionID" },
|
|
2213
|
+
{ in: "query", key: "directory" },
|
|
2214
|
+
{ in: "query", key: "workspace" },
|
|
2215
|
+
{ in: "body", key: "messageID" },
|
|
2216
|
+
{ in: "body", key: "model" },
|
|
2217
|
+
{ in: "body", key: "agent" },
|
|
2218
|
+
{ in: "body", key: "noReply" },
|
|
2219
|
+
{ in: "body", key: "tools" },
|
|
2220
|
+
{ in: "body", key: "format" },
|
|
2221
|
+
{ in: "body", key: "system" },
|
|
2222
|
+
{ in: "body", key: "variant" },
|
|
2223
|
+
{ in: "body", key: "parts" },
|
|
2224
|
+
],
|
|
2225
|
+
},
|
|
2226
|
+
]);
|
|
2227
|
+
return (options?.client ?? this.client).post({
|
|
2228
|
+
url: "/session/{sessionID}/message",
|
|
2229
|
+
...options,
|
|
2230
|
+
...params,
|
|
2231
|
+
headers: {
|
|
2232
|
+
"Content-Type": "application/json",
|
|
2233
|
+
...options?.headers,
|
|
2234
|
+
...params.headers,
|
|
2235
|
+
},
|
|
2236
|
+
});
|
|
2237
|
+
}
|
|
2238
|
+
/**
|
|
2239
|
+
* Delete message
|
|
2240
|
+
*
|
|
2241
|
+
* Permanently delete a specific message and all of its parts from a session without reverting file changes.
|
|
2242
|
+
*/
|
|
2243
|
+
deleteMessage(parameters, options) {
|
|
2244
|
+
const params = buildClientParams([parameters], [
|
|
2245
|
+
{
|
|
2246
|
+
args: [
|
|
2247
|
+
{ in: "path", key: "sessionID" },
|
|
2248
|
+
{ in: "path", key: "messageID" },
|
|
2249
|
+
{ in: "query", key: "directory" },
|
|
2250
|
+
{ in: "query", key: "workspace" },
|
|
2251
|
+
],
|
|
2252
|
+
},
|
|
2253
|
+
]);
|
|
2254
|
+
return (options?.client ?? this.client).delete({
|
|
2255
|
+
url: "/session/{sessionID}/message/{messageID}",
|
|
2256
|
+
...options,
|
|
2257
|
+
...params,
|
|
2258
|
+
});
|
|
2259
|
+
}
|
|
2260
|
+
/**
|
|
2261
|
+
* Get message
|
|
2262
|
+
*
|
|
2263
|
+
* Retrieve a specific message from a session by its message ID.
|
|
2264
|
+
*/
|
|
2265
|
+
message(parameters, options) {
|
|
2266
|
+
const params = buildClientParams([parameters], [
|
|
2267
|
+
{
|
|
2268
|
+
args: [
|
|
2269
|
+
{ in: "path", key: "sessionID" },
|
|
2270
|
+
{ in: "path", key: "messageID" },
|
|
2271
|
+
{ in: "query", key: "directory" },
|
|
2272
|
+
{ in: "query", key: "workspace" },
|
|
2273
|
+
],
|
|
2274
|
+
},
|
|
2275
|
+
]);
|
|
2276
|
+
return (options?.client ?? this.client).get({
|
|
2277
|
+
url: "/session/{sessionID}/message/{messageID}",
|
|
2278
|
+
...options,
|
|
2279
|
+
...params,
|
|
2280
|
+
});
|
|
2281
|
+
}
|
|
2282
|
+
/**
|
|
2283
|
+
* Fork session
|
|
2284
|
+
*
|
|
2285
|
+
* Create a new session by forking an existing session at a specific message point.
|
|
2286
|
+
*/
|
|
2287
|
+
fork(parameters, options) {
|
|
2288
|
+
const params = buildClientParams([parameters], [
|
|
2289
|
+
{
|
|
2290
|
+
args: [
|
|
2291
|
+
{ in: "path", key: "sessionID" },
|
|
2292
|
+
{ in: "query", key: "directory" },
|
|
2293
|
+
{ in: "query", key: "workspace" },
|
|
2294
|
+
{ in: "body", key: "messageID" },
|
|
2295
|
+
],
|
|
2296
|
+
},
|
|
2297
|
+
]);
|
|
2298
|
+
return (options?.client ?? this.client).post({
|
|
2299
|
+
url: "/session/{sessionID}/fork",
|
|
2300
|
+
...options,
|
|
2301
|
+
...params,
|
|
2302
|
+
headers: {
|
|
2303
|
+
"Content-Type": "application/json",
|
|
2304
|
+
...options?.headers,
|
|
2305
|
+
...params.headers,
|
|
2306
|
+
},
|
|
2307
|
+
});
|
|
2308
|
+
}
|
|
2309
|
+
/**
|
|
2310
|
+
* Abort session
|
|
2311
|
+
*
|
|
2312
|
+
* Abort an active session and stop any ongoing AI processing or command execution.
|
|
2313
|
+
*/
|
|
2314
|
+
abort(parameters, options) {
|
|
2315
|
+
const params = buildClientParams([parameters], [
|
|
2316
|
+
{
|
|
2317
|
+
args: [
|
|
2318
|
+
{ in: "path", key: "sessionID" },
|
|
2319
|
+
{ in: "query", key: "directory" },
|
|
2320
|
+
{ in: "query", key: "workspace" },
|
|
2321
|
+
],
|
|
2322
|
+
},
|
|
2323
|
+
]);
|
|
2324
|
+
return (options?.client ?? this.client).post({
|
|
2325
|
+
url: "/session/{sessionID}/abort",
|
|
2326
|
+
...options,
|
|
2327
|
+
...params,
|
|
2328
|
+
});
|
|
2329
|
+
}
|
|
2330
|
+
/**
|
|
2331
|
+
* Initialize session
|
|
2332
|
+
*
|
|
2333
|
+
* Analyze the current application and create an AGENTS.md file with project-specific agent configurations.
|
|
2334
|
+
*/
|
|
2335
|
+
init(parameters, options) {
|
|
2336
|
+
const params = buildClientParams([parameters], [
|
|
2337
|
+
{
|
|
2338
|
+
args: [
|
|
2339
|
+
{ in: "path", key: "sessionID" },
|
|
2340
|
+
{ in: "query", key: "directory" },
|
|
2341
|
+
{ in: "query", key: "workspace" },
|
|
2342
|
+
{ in: "body", key: "modelID" },
|
|
2343
|
+
{ in: "body", key: "providerID" },
|
|
2344
|
+
{ in: "body", key: "messageID" },
|
|
2345
|
+
],
|
|
2346
|
+
},
|
|
2347
|
+
]);
|
|
2348
|
+
return (options?.client ?? this.client).post({
|
|
2349
|
+
url: "/session/{sessionID}/init",
|
|
2350
|
+
...options,
|
|
2351
|
+
...params,
|
|
2352
|
+
headers: {
|
|
2353
|
+
"Content-Type": "application/json",
|
|
2354
|
+
...options?.headers,
|
|
2355
|
+
...params.headers,
|
|
2356
|
+
},
|
|
2357
|
+
});
|
|
2358
|
+
}
|
|
2359
|
+
/**
|
|
2360
|
+
* Unshare session
|
|
2361
|
+
*
|
|
2362
|
+
* Remove the shareable link for a session, making it private again.
|
|
2363
|
+
*/
|
|
2364
|
+
unshare(parameters, options) {
|
|
2365
|
+
const params = buildClientParams([parameters], [
|
|
2366
|
+
{
|
|
2367
|
+
args: [
|
|
2368
|
+
{ in: "path", key: "sessionID" },
|
|
2369
|
+
{ in: "query", key: "directory" },
|
|
2370
|
+
{ in: "query", key: "workspace" },
|
|
2371
|
+
],
|
|
2372
|
+
},
|
|
2373
|
+
]);
|
|
2374
|
+
return (options?.client ?? this.client).delete({
|
|
2375
|
+
url: "/session/{sessionID}/share",
|
|
2376
|
+
...options,
|
|
2377
|
+
...params,
|
|
2378
|
+
});
|
|
2379
|
+
}
|
|
2380
|
+
/**
|
|
2381
|
+
* Share session
|
|
2382
|
+
*
|
|
2383
|
+
* Create a shareable link for a session, allowing others to view the conversation.
|
|
2384
|
+
*/
|
|
2385
|
+
share(parameters, options) {
|
|
2386
|
+
const params = buildClientParams([parameters], [
|
|
2387
|
+
{
|
|
2388
|
+
args: [
|
|
2389
|
+
{ in: "path", key: "sessionID" },
|
|
2390
|
+
{ in: "query", key: "directory" },
|
|
2391
|
+
{ in: "query", key: "workspace" },
|
|
2392
|
+
],
|
|
2393
|
+
},
|
|
2394
|
+
]);
|
|
2395
|
+
return (options?.client ?? this.client).post({
|
|
2396
|
+
url: "/session/{sessionID}/share",
|
|
2397
|
+
...options,
|
|
2398
|
+
...params,
|
|
2399
|
+
});
|
|
2400
|
+
}
|
|
2401
|
+
/**
|
|
2402
|
+
* Summarize session
|
|
2403
|
+
*
|
|
2404
|
+
* Generate a concise summary of the session using AI compaction to preserve key information.
|
|
2405
|
+
*/
|
|
2406
|
+
summarize(parameters, options) {
|
|
2407
|
+
const params = buildClientParams([parameters], [
|
|
2408
|
+
{
|
|
2409
|
+
args: [
|
|
2410
|
+
{ in: "path", key: "sessionID" },
|
|
2411
|
+
{ in: "query", key: "directory" },
|
|
2412
|
+
{ in: "query", key: "workspace" },
|
|
2413
|
+
{ in: "body", key: "providerID" },
|
|
2414
|
+
{ in: "body", key: "modelID" },
|
|
2415
|
+
{ in: "body", key: "auto" },
|
|
2416
|
+
],
|
|
2417
|
+
},
|
|
2418
|
+
]);
|
|
2419
|
+
return (options?.client ?? this.client).post({
|
|
2420
|
+
url: "/session/{sessionID}/summarize",
|
|
2421
|
+
...options,
|
|
2422
|
+
...params,
|
|
2423
|
+
headers: {
|
|
2424
|
+
"Content-Type": "application/json",
|
|
2425
|
+
...options?.headers,
|
|
2426
|
+
...params.headers,
|
|
2427
|
+
},
|
|
2428
|
+
});
|
|
2429
|
+
}
|
|
2430
|
+
/**
|
|
2431
|
+
* Send async message
|
|
2432
|
+
*
|
|
2433
|
+
* Create and send a new message to a session asynchronously, starting the session if needed and returning immediately.
|
|
2434
|
+
*/
|
|
2435
|
+
promptAsync(parameters, options) {
|
|
2436
|
+
const params = buildClientParams([parameters], [
|
|
2437
|
+
{
|
|
2438
|
+
args: [
|
|
2439
|
+
{ in: "path", key: "sessionID" },
|
|
2440
|
+
{ in: "query", key: "directory" },
|
|
2441
|
+
{ in: "query", key: "workspace" },
|
|
2442
|
+
{ in: "body", key: "messageID" },
|
|
2443
|
+
{ in: "body", key: "model" },
|
|
2444
|
+
{ in: "body", key: "agent" },
|
|
2445
|
+
{ in: "body", key: "noReply" },
|
|
2446
|
+
{ in: "body", key: "tools" },
|
|
2447
|
+
{ in: "body", key: "format" },
|
|
2448
|
+
{ in: "body", key: "system" },
|
|
2449
|
+
{ in: "body", key: "variant" },
|
|
2450
|
+
{ in: "body", key: "parts" },
|
|
2451
|
+
],
|
|
2452
|
+
},
|
|
2453
|
+
]);
|
|
2454
|
+
return (options?.client ?? this.client).post({
|
|
2455
|
+
url: "/session/{sessionID}/prompt_async",
|
|
2456
|
+
...options,
|
|
2457
|
+
...params,
|
|
2458
|
+
headers: {
|
|
2459
|
+
"Content-Type": "application/json",
|
|
2460
|
+
...options?.headers,
|
|
2461
|
+
...params.headers,
|
|
2462
|
+
},
|
|
2463
|
+
});
|
|
2464
|
+
}
|
|
2465
|
+
/**
|
|
2466
|
+
* Send command
|
|
2467
|
+
*
|
|
2468
|
+
* Send a new command to a session for execution by the AI assistant.
|
|
2469
|
+
*/
|
|
2470
|
+
command(parameters, options) {
|
|
2471
|
+
const params = buildClientParams([parameters], [
|
|
2472
|
+
{
|
|
2473
|
+
args: [
|
|
2474
|
+
{ in: "path", key: "sessionID" },
|
|
2475
|
+
{ in: "query", key: "directory" },
|
|
2476
|
+
{ in: "query", key: "workspace" },
|
|
2477
|
+
{ in: "body", key: "messageID" },
|
|
2478
|
+
{ in: "body", key: "agent" },
|
|
2479
|
+
{ in: "body", key: "model" },
|
|
2480
|
+
{ in: "body", key: "arguments" },
|
|
2481
|
+
{ in: "body", key: "command" },
|
|
2482
|
+
{ in: "body", key: "variant" },
|
|
2483
|
+
{ in: "body", key: "parts" },
|
|
2484
|
+
],
|
|
2485
|
+
},
|
|
2486
|
+
]);
|
|
2487
|
+
return (options?.client ?? this.client).post({
|
|
2488
|
+
url: "/session/{sessionID}/command",
|
|
2489
|
+
...options,
|
|
2490
|
+
...params,
|
|
2491
|
+
headers: {
|
|
2492
|
+
"Content-Type": "application/json",
|
|
2493
|
+
...options?.headers,
|
|
2494
|
+
...params.headers,
|
|
2495
|
+
},
|
|
2496
|
+
});
|
|
2497
|
+
}
|
|
2498
|
+
/**
|
|
2499
|
+
* Run shell command
|
|
2500
|
+
*
|
|
2501
|
+
* Execute a shell command within the session context and return the AI's response.
|
|
2502
|
+
*/
|
|
2503
|
+
shell(parameters, options) {
|
|
2504
|
+
const params = buildClientParams([parameters], [
|
|
2505
|
+
{
|
|
2506
|
+
args: [
|
|
2507
|
+
{ in: "path", key: "sessionID" },
|
|
2508
|
+
{ in: "query", key: "directory" },
|
|
2509
|
+
{ in: "query", key: "workspace" },
|
|
2510
|
+
{ in: "body", key: "messageID" },
|
|
2511
|
+
{ in: "body", key: "agent" },
|
|
2512
|
+
{ in: "body", key: "model" },
|
|
2513
|
+
{ in: "body", key: "command" },
|
|
2514
|
+
],
|
|
2515
|
+
},
|
|
2516
|
+
]);
|
|
2517
|
+
return (options?.client ?? this.client).post({
|
|
2518
|
+
url: "/session/{sessionID}/shell",
|
|
2519
|
+
...options,
|
|
2520
|
+
...params,
|
|
2521
|
+
headers: {
|
|
2522
|
+
"Content-Type": "application/json",
|
|
2523
|
+
...options?.headers,
|
|
2524
|
+
...params.headers,
|
|
2525
|
+
},
|
|
2526
|
+
});
|
|
2527
|
+
}
|
|
2528
|
+
/**
|
|
2529
|
+
* Revert message
|
|
2530
|
+
*
|
|
2531
|
+
* Revert a specific message in a session, undoing its effects and restoring the previous state.
|
|
2532
|
+
*/
|
|
2533
|
+
revert(parameters, options) {
|
|
2534
|
+
const params = buildClientParams([parameters], [
|
|
2535
|
+
{
|
|
2536
|
+
args: [
|
|
2537
|
+
{ in: "path", key: "sessionID" },
|
|
2538
|
+
{ in: "query", key: "directory" },
|
|
2539
|
+
{ in: "query", key: "workspace" },
|
|
2540
|
+
{ in: "body", key: "messageID" },
|
|
2541
|
+
{ in: "body", key: "partID" },
|
|
2542
|
+
],
|
|
2543
|
+
},
|
|
2544
|
+
]);
|
|
2545
|
+
return (options?.client ?? this.client).post({
|
|
2546
|
+
url: "/session/{sessionID}/revert",
|
|
2547
|
+
...options,
|
|
2548
|
+
...params,
|
|
2549
|
+
headers: {
|
|
2550
|
+
"Content-Type": "application/json",
|
|
2551
|
+
...options?.headers,
|
|
2552
|
+
...params.headers,
|
|
2553
|
+
},
|
|
2554
|
+
});
|
|
2555
|
+
}
|
|
2556
|
+
/**
|
|
2557
|
+
* Restore reverted messages
|
|
2558
|
+
*
|
|
2559
|
+
* Restore all previously reverted messages in a session.
|
|
2560
|
+
*/
|
|
2561
|
+
unrevert(parameters, options) {
|
|
2562
|
+
const params = buildClientParams([parameters], [
|
|
2563
|
+
{
|
|
2564
|
+
args: [
|
|
2565
|
+
{ in: "path", key: "sessionID" },
|
|
2566
|
+
{ in: "query", key: "directory" },
|
|
2567
|
+
{ in: "query", key: "workspace" },
|
|
2568
|
+
],
|
|
2569
|
+
},
|
|
2570
|
+
]);
|
|
2571
|
+
return (options?.client ?? this.client).post({
|
|
2572
|
+
url: "/session/{sessionID}/unrevert",
|
|
2573
|
+
...options,
|
|
2574
|
+
...params,
|
|
2575
|
+
});
|
|
2576
|
+
}
|
|
2577
|
+
}
|
|
2578
|
+
export class Part extends HeyApiClient {
|
|
2579
|
+
/**
|
|
2580
|
+
* Delete a part from a message.
|
|
2581
|
+
*/
|
|
2582
|
+
delete(parameters, options) {
|
|
2583
|
+
const params = buildClientParams([parameters], [
|
|
2584
|
+
{
|
|
2585
|
+
args: [
|
|
2586
|
+
{ in: "path", key: "sessionID" },
|
|
2587
|
+
{ in: "path", key: "messageID" },
|
|
2588
|
+
{ in: "path", key: "partID" },
|
|
2589
|
+
{ in: "query", key: "directory" },
|
|
2590
|
+
{ in: "query", key: "workspace" },
|
|
2591
|
+
],
|
|
2592
|
+
},
|
|
2593
|
+
]);
|
|
2594
|
+
return (options?.client ?? this.client).delete({
|
|
2595
|
+
url: "/session/{sessionID}/message/{messageID}/part/{partID}",
|
|
2596
|
+
...options,
|
|
2597
|
+
...params,
|
|
2598
|
+
});
|
|
2599
|
+
}
|
|
2600
|
+
/**
|
|
2601
|
+
* Update a part in a message.
|
|
2602
|
+
*/
|
|
2603
|
+
update(parameters, options) {
|
|
2604
|
+
const params = buildClientParams([parameters], [
|
|
2605
|
+
{
|
|
2606
|
+
args: [
|
|
2607
|
+
{ in: "path", key: "sessionID" },
|
|
2608
|
+
{ in: "path", key: "messageID" },
|
|
2609
|
+
{ in: "path", key: "partID" },
|
|
2610
|
+
{ in: "query", key: "directory" },
|
|
2611
|
+
{ in: "query", key: "workspace" },
|
|
2612
|
+
{ key: "part", map: "body" },
|
|
2613
|
+
],
|
|
2614
|
+
},
|
|
2615
|
+
]);
|
|
2616
|
+
return (options?.client ?? this.client).patch({
|
|
2617
|
+
url: "/session/{sessionID}/message/{messageID}/part/{partID}",
|
|
2618
|
+
...options,
|
|
2619
|
+
...params,
|
|
2620
|
+
headers: {
|
|
2621
|
+
"Content-Type": "application/json",
|
|
2622
|
+
...options?.headers,
|
|
2623
|
+
...params.headers,
|
|
2624
|
+
},
|
|
2625
|
+
});
|
|
2626
|
+
}
|
|
2627
|
+
}
|
|
2628
|
+
export class History extends HeyApiClient {
|
|
2629
|
+
/**
|
|
2630
|
+
* List sync events
|
|
2631
|
+
*
|
|
2632
|
+
* List sync events for all aggregates. Keys are aggregate IDs the client already knows about, values are the last known sequence ID. Events with seq > value are returned for those aggregates. Aggregates not listed in the input get their full history.
|
|
2633
|
+
*/
|
|
2634
|
+
list(parameters, options) {
|
|
2635
|
+
const params = buildClientParams([parameters], [
|
|
2636
|
+
{
|
|
2637
|
+
args: [
|
|
2638
|
+
{ in: "query", key: "directory" },
|
|
2639
|
+
{ in: "query", key: "workspace" },
|
|
2640
|
+
{ key: "body", map: "body" },
|
|
2641
|
+
],
|
|
2642
|
+
},
|
|
2643
|
+
]);
|
|
2644
|
+
return (options?.client ?? this.client).post({
|
|
2645
|
+
url: "/sync/history",
|
|
2646
|
+
...options,
|
|
2647
|
+
...params,
|
|
2648
|
+
headers: {
|
|
2649
|
+
"Content-Type": "application/json",
|
|
2650
|
+
...options?.headers,
|
|
2651
|
+
...params.headers,
|
|
2652
|
+
},
|
|
2653
|
+
});
|
|
2654
|
+
}
|
|
2655
|
+
}
|
|
2656
|
+
export class Sync extends HeyApiClient {
|
|
2657
|
+
/**
|
|
2658
|
+
* Start workspace sync
|
|
2659
|
+
*
|
|
2660
|
+
* Start sync loops for workspaces in the current project that have active sessions.
|
|
2661
|
+
*/
|
|
2662
|
+
start(parameters, options) {
|
|
2663
|
+
const params = buildClientParams([parameters], [
|
|
2664
|
+
{
|
|
2665
|
+
args: [
|
|
2666
|
+
{ in: "query", key: "directory" },
|
|
2667
|
+
{ in: "query", key: "workspace" },
|
|
2668
|
+
],
|
|
2669
|
+
},
|
|
2670
|
+
]);
|
|
2671
|
+
return (options?.client ?? this.client).post({
|
|
2672
|
+
url: "/sync/start",
|
|
2673
|
+
...options,
|
|
2674
|
+
...params,
|
|
2675
|
+
});
|
|
2676
|
+
}
|
|
2677
|
+
/**
|
|
2678
|
+
* Replay sync events
|
|
2679
|
+
*
|
|
2680
|
+
* Validate and replay a complete sync event history.
|
|
2681
|
+
*/
|
|
2682
|
+
replay(parameters, options) {
|
|
2683
|
+
const params = buildClientParams([parameters], [
|
|
2684
|
+
{
|
|
2685
|
+
args: [
|
|
2686
|
+
{
|
|
2687
|
+
in: "query",
|
|
2688
|
+
key: "query_directory",
|
|
2689
|
+
map: "directory",
|
|
2690
|
+
},
|
|
2691
|
+
{ in: "query", key: "workspace" },
|
|
2692
|
+
{
|
|
2693
|
+
in: "body",
|
|
2694
|
+
key: "body_directory",
|
|
2695
|
+
map: "directory",
|
|
2696
|
+
},
|
|
2697
|
+
{ in: "body", key: "events" },
|
|
2698
|
+
],
|
|
2699
|
+
},
|
|
2700
|
+
]);
|
|
2701
|
+
return (options?.client ?? this.client).post({
|
|
2702
|
+
url: "/sync/replay",
|
|
2703
|
+
...options,
|
|
2704
|
+
...params,
|
|
2705
|
+
headers: {
|
|
2706
|
+
"Content-Type": "application/json",
|
|
2707
|
+
...options?.headers,
|
|
2708
|
+
...params.headers,
|
|
2709
|
+
},
|
|
2710
|
+
});
|
|
2711
|
+
}
|
|
2712
|
+
/**
|
|
2713
|
+
* Steal session into workspace
|
|
2714
|
+
*
|
|
2715
|
+
* Update a session to belong to the current workspace through the sync event system.
|
|
2716
|
+
*/
|
|
2717
|
+
steal(parameters, options) {
|
|
2718
|
+
const params = buildClientParams([parameters], [
|
|
2719
|
+
{
|
|
2720
|
+
args: [
|
|
2721
|
+
{ in: "query", key: "directory" },
|
|
2722
|
+
{ in: "query", key: "workspace" },
|
|
2723
|
+
{ in: "body", key: "sessionID" },
|
|
2724
|
+
],
|
|
2725
|
+
},
|
|
2726
|
+
]);
|
|
2727
|
+
return (options?.client ?? this.client).post({
|
|
2728
|
+
url: "/sync/steal",
|
|
2729
|
+
...options,
|
|
2730
|
+
...params,
|
|
2731
|
+
headers: {
|
|
2732
|
+
"Content-Type": "application/json",
|
|
2733
|
+
...options?.headers,
|
|
2734
|
+
...params.headers,
|
|
2735
|
+
},
|
|
2736
|
+
});
|
|
2737
|
+
}
|
|
2738
|
+
_history;
|
|
2739
|
+
get history() {
|
|
2740
|
+
return (this._history ??= new History({ client: this.client }));
|
|
2741
|
+
}
|
|
2742
|
+
}
|
|
2743
|
+
export class Control extends HeyApiClient {
|
|
2744
|
+
/**
|
|
2745
|
+
* Get next TUI request
|
|
2746
|
+
*
|
|
2747
|
+
* Retrieve the next TUI request from the queue for processing.
|
|
2748
|
+
*/
|
|
2749
|
+
next(parameters, options) {
|
|
2750
|
+
const params = buildClientParams([parameters], [
|
|
2751
|
+
{
|
|
2752
|
+
args: [
|
|
2753
|
+
{ in: "query", key: "directory" },
|
|
2754
|
+
{ in: "query", key: "workspace" },
|
|
2755
|
+
],
|
|
2756
|
+
},
|
|
2757
|
+
]);
|
|
2758
|
+
return (options?.client ?? this.client).get({
|
|
2759
|
+
url: "/tui/control/next",
|
|
2760
|
+
...options,
|
|
2761
|
+
...params,
|
|
2762
|
+
});
|
|
2763
|
+
}
|
|
2764
|
+
/**
|
|
2765
|
+
* Submit TUI response
|
|
2766
|
+
*
|
|
2767
|
+
* Submit a response to the TUI request queue to complete a pending request.
|
|
2768
|
+
*/
|
|
2769
|
+
response(parameters, options) {
|
|
2770
|
+
const params = buildClientParams([parameters], [
|
|
2771
|
+
{
|
|
2772
|
+
args: [
|
|
2773
|
+
{ in: "query", key: "directory" },
|
|
2774
|
+
{ in: "query", key: "workspace" },
|
|
2775
|
+
{ key: "body", map: "body" },
|
|
2776
|
+
],
|
|
2777
|
+
},
|
|
2778
|
+
]);
|
|
2779
|
+
return (options?.client ?? this.client).post({
|
|
2780
|
+
url: "/tui/control/response",
|
|
2781
|
+
...options,
|
|
2782
|
+
...params,
|
|
2783
|
+
headers: {
|
|
2784
|
+
"Content-Type": "application/json",
|
|
2785
|
+
...options?.headers,
|
|
2786
|
+
...params.headers,
|
|
2787
|
+
},
|
|
2788
|
+
});
|
|
2789
|
+
}
|
|
2790
|
+
}
|
|
2791
|
+
export class Tui extends HeyApiClient {
|
|
2792
|
+
/**
|
|
2793
|
+
* Append TUI prompt
|
|
2794
|
+
*
|
|
2795
|
+
* Append prompt to the TUI.
|
|
2796
|
+
*/
|
|
2797
|
+
appendPrompt(parameters, options) {
|
|
2798
|
+
const params = buildClientParams([parameters], [
|
|
2799
|
+
{
|
|
2800
|
+
args: [
|
|
2801
|
+
{ in: "query", key: "directory" },
|
|
2802
|
+
{ in: "query", key: "workspace" },
|
|
2803
|
+
{ in: "body", key: "text" },
|
|
2804
|
+
],
|
|
2805
|
+
},
|
|
2806
|
+
]);
|
|
2807
|
+
return (options?.client ?? this.client).post({
|
|
2808
|
+
url: "/tui/append-prompt",
|
|
2809
|
+
...options,
|
|
2810
|
+
...params,
|
|
2811
|
+
headers: {
|
|
2812
|
+
"Content-Type": "application/json",
|
|
2813
|
+
...options?.headers,
|
|
2814
|
+
...params.headers,
|
|
2815
|
+
},
|
|
2816
|
+
});
|
|
2817
|
+
}
|
|
2818
|
+
/**
|
|
2819
|
+
* Open help dialog
|
|
2820
|
+
*
|
|
2821
|
+
* Open the help dialog in the TUI to display user assistance information.
|
|
2822
|
+
*/
|
|
2823
|
+
openHelp(parameters, options) {
|
|
2824
|
+
const params = buildClientParams([parameters], [
|
|
2825
|
+
{
|
|
2826
|
+
args: [
|
|
2827
|
+
{ in: "query", key: "directory" },
|
|
2828
|
+
{ in: "query", key: "workspace" },
|
|
2829
|
+
],
|
|
2830
|
+
},
|
|
2831
|
+
]);
|
|
2832
|
+
return (options?.client ?? this.client).post({
|
|
2833
|
+
url: "/tui/open-help",
|
|
2834
|
+
...options,
|
|
2835
|
+
...params,
|
|
2836
|
+
});
|
|
2837
|
+
}
|
|
2838
|
+
/**
|
|
2839
|
+
* Open sessions dialog
|
|
2840
|
+
*
|
|
2841
|
+
* Open the session dialog.
|
|
2842
|
+
*/
|
|
2843
|
+
openSessions(parameters, options) {
|
|
2844
|
+
const params = buildClientParams([parameters], [
|
|
2845
|
+
{
|
|
2846
|
+
args: [
|
|
2847
|
+
{ in: "query", key: "directory" },
|
|
2848
|
+
{ in: "query", key: "workspace" },
|
|
2849
|
+
],
|
|
2850
|
+
},
|
|
2851
|
+
]);
|
|
2852
|
+
return (options?.client ?? this.client).post({
|
|
2853
|
+
url: "/tui/open-sessions",
|
|
2854
|
+
...options,
|
|
2855
|
+
...params,
|
|
2856
|
+
});
|
|
2857
|
+
}
|
|
2858
|
+
/**
|
|
2859
|
+
* Open themes dialog
|
|
2860
|
+
*
|
|
2861
|
+
* Open the theme dialog.
|
|
2862
|
+
*/
|
|
2863
|
+
openThemes(parameters, options) {
|
|
2864
|
+
const params = buildClientParams([parameters], [
|
|
2865
|
+
{
|
|
2866
|
+
args: [
|
|
2867
|
+
{ in: "query", key: "directory" },
|
|
2868
|
+
{ in: "query", key: "workspace" },
|
|
2869
|
+
],
|
|
2870
|
+
},
|
|
2871
|
+
]);
|
|
2872
|
+
return (options?.client ?? this.client).post({
|
|
2873
|
+
url: "/tui/open-themes",
|
|
2874
|
+
...options,
|
|
2875
|
+
...params,
|
|
2876
|
+
});
|
|
2877
|
+
}
|
|
2878
|
+
/**
|
|
2879
|
+
* Open models dialog
|
|
2880
|
+
*
|
|
2881
|
+
* Open the model dialog.
|
|
2882
|
+
*/
|
|
2883
|
+
openModels(parameters, options) {
|
|
2884
|
+
const params = buildClientParams([parameters], [
|
|
2885
|
+
{
|
|
2886
|
+
args: [
|
|
2887
|
+
{ in: "query", key: "directory" },
|
|
2888
|
+
{ in: "query", key: "workspace" },
|
|
2889
|
+
],
|
|
2890
|
+
},
|
|
2891
|
+
]);
|
|
2892
|
+
return (options?.client ?? this.client).post({
|
|
2893
|
+
url: "/tui/open-models",
|
|
2894
|
+
...options,
|
|
2895
|
+
...params,
|
|
2896
|
+
});
|
|
2897
|
+
}
|
|
2898
|
+
/**
|
|
2899
|
+
* Submit TUI prompt
|
|
2900
|
+
*
|
|
2901
|
+
* Submit the prompt.
|
|
2902
|
+
*/
|
|
2903
|
+
submitPrompt(parameters, options) {
|
|
2904
|
+
const params = buildClientParams([parameters], [
|
|
2905
|
+
{
|
|
2906
|
+
args: [
|
|
2907
|
+
{ in: "query", key: "directory" },
|
|
2908
|
+
{ in: "query", key: "workspace" },
|
|
2909
|
+
],
|
|
2910
|
+
},
|
|
2911
|
+
]);
|
|
2912
|
+
return (options?.client ?? this.client).post({
|
|
2913
|
+
url: "/tui/submit-prompt",
|
|
2914
|
+
...options,
|
|
2915
|
+
...params,
|
|
2916
|
+
});
|
|
2917
|
+
}
|
|
2918
|
+
/**
|
|
2919
|
+
* Clear TUI prompt
|
|
2920
|
+
*
|
|
2921
|
+
* Clear the prompt.
|
|
2922
|
+
*/
|
|
2923
|
+
clearPrompt(parameters, options) {
|
|
2924
|
+
const params = buildClientParams([parameters], [
|
|
2925
|
+
{
|
|
2926
|
+
args: [
|
|
2927
|
+
{ in: "query", key: "directory" },
|
|
2928
|
+
{ in: "query", key: "workspace" },
|
|
2929
|
+
],
|
|
2930
|
+
},
|
|
2931
|
+
]);
|
|
2932
|
+
return (options?.client ?? this.client).post({
|
|
2933
|
+
url: "/tui/clear-prompt",
|
|
2934
|
+
...options,
|
|
2935
|
+
...params,
|
|
2936
|
+
});
|
|
2937
|
+
}
|
|
2938
|
+
/**
|
|
2939
|
+
* Execute TUI command
|
|
2940
|
+
*
|
|
2941
|
+
* Execute a TUI command.
|
|
2942
|
+
*/
|
|
2943
|
+
executeCommand(parameters, options) {
|
|
2944
|
+
const params = buildClientParams([parameters], [
|
|
2945
|
+
{
|
|
2946
|
+
args: [
|
|
2947
|
+
{ in: "query", key: "directory" },
|
|
2948
|
+
{ in: "query", key: "workspace" },
|
|
2949
|
+
{ in: "body", key: "command" },
|
|
2950
|
+
],
|
|
2951
|
+
},
|
|
2952
|
+
]);
|
|
2953
|
+
return (options?.client ?? this.client).post({
|
|
2954
|
+
url: "/tui/execute-command",
|
|
2955
|
+
...options,
|
|
2956
|
+
...params,
|
|
2957
|
+
headers: {
|
|
2958
|
+
"Content-Type": "application/json",
|
|
2959
|
+
...options?.headers,
|
|
2960
|
+
...params.headers,
|
|
2961
|
+
},
|
|
2962
|
+
});
|
|
2963
|
+
}
|
|
2964
|
+
/**
|
|
2965
|
+
* Show TUI toast
|
|
2966
|
+
*
|
|
2967
|
+
* Show a toast notification in the TUI.
|
|
2968
|
+
*/
|
|
2969
|
+
showToast(parameters, options) {
|
|
2970
|
+
const params = buildClientParams([parameters], [
|
|
2971
|
+
{
|
|
2972
|
+
args: [
|
|
2973
|
+
{ in: "query", key: "directory" },
|
|
2974
|
+
{ in: "query", key: "workspace" },
|
|
2975
|
+
{ in: "body", key: "title" },
|
|
2976
|
+
{ in: "body", key: "message" },
|
|
2977
|
+
{ in: "body", key: "variant" },
|
|
2978
|
+
{ in: "body", key: "duration" },
|
|
2979
|
+
],
|
|
2980
|
+
},
|
|
2981
|
+
]);
|
|
2982
|
+
return (options?.client ?? this.client).post({
|
|
2983
|
+
url: "/tui/show-toast",
|
|
2984
|
+
...options,
|
|
2985
|
+
...params,
|
|
2986
|
+
headers: {
|
|
2987
|
+
"Content-Type": "application/json",
|
|
2988
|
+
...options?.headers,
|
|
2989
|
+
...params.headers,
|
|
2990
|
+
},
|
|
2991
|
+
});
|
|
2992
|
+
}
|
|
2993
|
+
/**
|
|
2994
|
+
* Publish TUI event
|
|
2995
|
+
*
|
|
2996
|
+
* Publish a TUI event.
|
|
2997
|
+
*/
|
|
2998
|
+
publish(parameters, options) {
|
|
2999
|
+
const params = buildClientParams([parameters], [
|
|
3000
|
+
{
|
|
3001
|
+
args: [
|
|
3002
|
+
{ in: "query", key: "directory" },
|
|
3003
|
+
{ in: "query", key: "workspace" },
|
|
3004
|
+
{ key: "body", map: "body" },
|
|
3005
|
+
],
|
|
3006
|
+
},
|
|
3007
|
+
]);
|
|
3008
|
+
return (options?.client ?? this.client).post({
|
|
3009
|
+
url: "/tui/publish",
|
|
3010
|
+
...options,
|
|
3011
|
+
...params,
|
|
3012
|
+
headers: {
|
|
3013
|
+
"Content-Type": "application/json",
|
|
3014
|
+
...options?.headers,
|
|
3015
|
+
...params.headers,
|
|
3016
|
+
},
|
|
3017
|
+
});
|
|
3018
|
+
}
|
|
3019
|
+
/**
|
|
3020
|
+
* Select session
|
|
3021
|
+
*
|
|
3022
|
+
* Navigate the TUI to display the specified session.
|
|
3023
|
+
*/
|
|
3024
|
+
selectSession(parameters, options) {
|
|
3025
|
+
const params = buildClientParams([parameters], [
|
|
3026
|
+
{
|
|
3027
|
+
args: [
|
|
3028
|
+
{ in: "query", key: "directory" },
|
|
3029
|
+
{ in: "query", key: "workspace" },
|
|
3030
|
+
{ in: "body", key: "sessionID" },
|
|
3031
|
+
],
|
|
3032
|
+
},
|
|
3033
|
+
]);
|
|
3034
|
+
return (options?.client ?? this.client).post({
|
|
3035
|
+
url: "/tui/select-session",
|
|
3036
|
+
...options,
|
|
3037
|
+
...params,
|
|
3038
|
+
headers: {
|
|
3039
|
+
"Content-Type": "application/json",
|
|
3040
|
+
...options?.headers,
|
|
3041
|
+
...params.headers,
|
|
3042
|
+
},
|
|
3043
|
+
});
|
|
3044
|
+
}
|
|
3045
|
+
_control;
|
|
3046
|
+
get control() {
|
|
3047
|
+
return (this._control ??= new Control({ client: this.client }));
|
|
3048
|
+
}
|
|
3049
|
+
}
|
|
3050
|
+
export class Health extends HeyApiClient {
|
|
3051
|
+
/**
|
|
3052
|
+
* Check server health
|
|
3053
|
+
*
|
|
3054
|
+
* Check whether the API server is ready to accept requests.
|
|
3055
|
+
*/
|
|
3056
|
+
get(options) {
|
|
3057
|
+
return (options?.client ?? this.client).get({
|
|
3058
|
+
url: "/api/health",
|
|
3059
|
+
...options,
|
|
3060
|
+
});
|
|
3061
|
+
}
|
|
3062
|
+
}
|
|
3063
|
+
export class Location extends HeyApiClient {
|
|
3064
|
+
/**
|
|
3065
|
+
* Get location
|
|
3066
|
+
*
|
|
3067
|
+
* Resolve the requested location or the server default location.
|
|
3068
|
+
*/
|
|
3069
|
+
get(parameters, options) {
|
|
3070
|
+
const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "location" }] }]);
|
|
3071
|
+
return (options?.client ?? this.client).get({
|
|
3072
|
+
url: "/api/location",
|
|
3073
|
+
...options,
|
|
3074
|
+
...params,
|
|
3075
|
+
});
|
|
3076
|
+
}
|
|
3077
|
+
}
|
|
3078
|
+
export class Agent extends HeyApiClient {
|
|
3079
|
+
/**
|
|
3080
|
+
* List agents
|
|
3081
|
+
*
|
|
3082
|
+
* Retrieve currently registered agents.
|
|
3083
|
+
*/
|
|
3084
|
+
list(parameters, options) {
|
|
3085
|
+
const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "location" }] }]);
|
|
3086
|
+
return (options?.client ?? this.client).get({
|
|
3087
|
+
url: "/api/agent",
|
|
3088
|
+
...options,
|
|
3089
|
+
...params,
|
|
3090
|
+
});
|
|
3091
|
+
}
|
|
3092
|
+
}
|
|
3093
|
+
export class Revert extends HeyApiClient {
|
|
3094
|
+
/**
|
|
3095
|
+
* Stage session revert
|
|
3096
|
+
*
|
|
3097
|
+
* Stage or move a reversible session boundary and optionally apply its file changes.
|
|
3098
|
+
*/
|
|
3099
|
+
stage(parameters, options) {
|
|
3100
|
+
const params = buildClientParams([parameters], [
|
|
3101
|
+
{
|
|
3102
|
+
args: [
|
|
3103
|
+
{ in: "path", key: "sessionID" },
|
|
3104
|
+
{ in: "body", key: "messageID" },
|
|
3105
|
+
{ in: "body", key: "files" },
|
|
3106
|
+
],
|
|
3107
|
+
},
|
|
3108
|
+
]);
|
|
3109
|
+
return (options?.client ?? this.client).post({
|
|
3110
|
+
url: "/api/session/{sessionID}/revert/stage",
|
|
3111
|
+
...options,
|
|
3112
|
+
...params,
|
|
3113
|
+
headers: {
|
|
3114
|
+
"Content-Type": "application/json",
|
|
3115
|
+
...options?.headers,
|
|
3116
|
+
...params.headers,
|
|
3117
|
+
},
|
|
3118
|
+
});
|
|
3119
|
+
}
|
|
3120
|
+
/**
|
|
3121
|
+
* Clear staged revert
|
|
3122
|
+
*/
|
|
3123
|
+
clear(parameters, options) {
|
|
3124
|
+
const params = buildClientParams([parameters], [{ args: [{ in: "path", key: "sessionID" }] }]);
|
|
3125
|
+
return (options?.client ?? this.client).post({
|
|
3126
|
+
url: "/api/session/{sessionID}/revert/clear",
|
|
3127
|
+
...options,
|
|
3128
|
+
...params,
|
|
3129
|
+
});
|
|
3130
|
+
}
|
|
3131
|
+
/**
|
|
3132
|
+
* Commit staged revert
|
|
3133
|
+
*/
|
|
3134
|
+
commit(parameters, options) {
|
|
3135
|
+
const params = buildClientParams([parameters], [{ args: [{ in: "path", key: "sessionID" }] }]);
|
|
3136
|
+
return (options?.client ?? this.client).post({
|
|
3137
|
+
url: "/api/session/{sessionID}/revert/commit",
|
|
3138
|
+
...options,
|
|
3139
|
+
...params,
|
|
3140
|
+
});
|
|
3141
|
+
}
|
|
3142
|
+
}
|
|
3143
|
+
export class Permission2 extends HeyApiClient {
|
|
3144
|
+
/**
|
|
3145
|
+
* List session permission requests
|
|
3146
|
+
*
|
|
3147
|
+
* Retrieve pending permission requests owned by a session.
|
|
3148
|
+
*/
|
|
3149
|
+
list(parameters, options) {
|
|
3150
|
+
const params = buildClientParams([parameters], [{ args: [{ in: "path", key: "sessionID" }] }]);
|
|
3151
|
+
return (options?.client ?? this.client).get({
|
|
3152
|
+
url: "/api/session/{sessionID}/permission",
|
|
3153
|
+
...options,
|
|
3154
|
+
...params,
|
|
3155
|
+
});
|
|
3156
|
+
}
|
|
3157
|
+
/**
|
|
3158
|
+
* Create permission request
|
|
3159
|
+
*
|
|
3160
|
+
* Evaluate and, when approval is required, create a permission request for a session.
|
|
3161
|
+
*/
|
|
3162
|
+
create(parameters, options) {
|
|
3163
|
+
const params = buildClientParams([parameters], [
|
|
3164
|
+
{
|
|
3165
|
+
args: [
|
|
3166
|
+
{ in: "path", key: "sessionID" },
|
|
3167
|
+
{ in: "body", key: "id" },
|
|
3168
|
+
{ in: "body", key: "action" },
|
|
3169
|
+
{ in: "body", key: "resources" },
|
|
3170
|
+
{ in: "body", key: "save" },
|
|
3171
|
+
{ in: "body", key: "metadata" },
|
|
3172
|
+
{ in: "body", key: "source" },
|
|
3173
|
+
{ in: "body", key: "agent" },
|
|
3174
|
+
],
|
|
3175
|
+
},
|
|
3176
|
+
]);
|
|
3177
|
+
return (options?.client ?? this.client).post({
|
|
3178
|
+
url: "/api/session/{sessionID}/permission",
|
|
3179
|
+
...options,
|
|
3180
|
+
...params,
|
|
3181
|
+
headers: {
|
|
3182
|
+
"Content-Type": "application/json",
|
|
3183
|
+
...options?.headers,
|
|
3184
|
+
...params.headers,
|
|
3185
|
+
},
|
|
3186
|
+
});
|
|
3187
|
+
}
|
|
3188
|
+
/**
|
|
3189
|
+
* Get permission request
|
|
3190
|
+
*
|
|
3191
|
+
* Retrieve a pending permission request owned by a session.
|
|
3192
|
+
*/
|
|
3193
|
+
get(parameters, options) {
|
|
3194
|
+
const params = buildClientParams([parameters], [
|
|
3195
|
+
{
|
|
3196
|
+
args: [
|
|
3197
|
+
{ in: "path", key: "sessionID" },
|
|
3198
|
+
{ in: "path", key: "requestID" },
|
|
3199
|
+
],
|
|
3200
|
+
},
|
|
3201
|
+
]);
|
|
3202
|
+
return (options?.client ?? this.client).get({
|
|
3203
|
+
url: "/api/session/{sessionID}/permission/{requestID}",
|
|
3204
|
+
...options,
|
|
3205
|
+
...params,
|
|
3206
|
+
});
|
|
3207
|
+
}
|
|
3208
|
+
/**
|
|
3209
|
+
* Reply to pending permission request
|
|
3210
|
+
*
|
|
3211
|
+
* Respond to a pending permission request owned by a session.
|
|
3212
|
+
*/
|
|
3213
|
+
reply(parameters, options) {
|
|
3214
|
+
const params = buildClientParams([parameters], [
|
|
3215
|
+
{
|
|
3216
|
+
args: [
|
|
3217
|
+
{ in: "path", key: "sessionID" },
|
|
3218
|
+
{ in: "path", key: "requestID" },
|
|
3219
|
+
{ in: "body", key: "reply" },
|
|
3220
|
+
{ in: "body", key: "message" },
|
|
3221
|
+
],
|
|
3222
|
+
},
|
|
3223
|
+
]);
|
|
3224
|
+
return (options?.client ?? this.client).post({
|
|
3225
|
+
url: "/api/session/{sessionID}/permission/{requestID}/reply",
|
|
3226
|
+
...options,
|
|
3227
|
+
...params,
|
|
3228
|
+
headers: {
|
|
3229
|
+
"Content-Type": "application/json",
|
|
3230
|
+
...options?.headers,
|
|
3231
|
+
...params.headers,
|
|
3232
|
+
},
|
|
3233
|
+
});
|
|
3234
|
+
}
|
|
3235
|
+
}
|
|
3236
|
+
export class Question2 extends HeyApiClient {
|
|
3237
|
+
/**
|
|
3238
|
+
* List session question requests
|
|
3239
|
+
*
|
|
3240
|
+
* Retrieve pending question requests owned by a session.
|
|
3241
|
+
*/
|
|
3242
|
+
list(parameters, options) {
|
|
3243
|
+
const params = buildClientParams([parameters], [{ args: [{ in: "path", key: "sessionID" }] }]);
|
|
3244
|
+
return (options?.client ?? this.client).get({
|
|
3245
|
+
url: "/api/session/{sessionID}/question",
|
|
3246
|
+
...options,
|
|
3247
|
+
...params,
|
|
3248
|
+
});
|
|
3249
|
+
}
|
|
3250
|
+
/**
|
|
3251
|
+
* Reply to pending question request
|
|
3252
|
+
*
|
|
3253
|
+
* Answer a pending question request owned by a session.
|
|
3254
|
+
*/
|
|
3255
|
+
reply(parameters, options) {
|
|
3256
|
+
const params = buildClientParams([parameters], [
|
|
3257
|
+
{
|
|
3258
|
+
args: [
|
|
3259
|
+
{ in: "path", key: "sessionID" },
|
|
3260
|
+
{ in: "path", key: "requestID" },
|
|
3261
|
+
{ key: "questionV2Reply", map: "body" },
|
|
3262
|
+
],
|
|
3263
|
+
},
|
|
3264
|
+
]);
|
|
3265
|
+
return (options?.client ?? this.client).post({
|
|
3266
|
+
url: "/api/session/{sessionID}/question/{requestID}/reply",
|
|
3267
|
+
...options,
|
|
3268
|
+
...params,
|
|
3269
|
+
headers: {
|
|
3270
|
+
"Content-Type": "application/json",
|
|
3271
|
+
...options?.headers,
|
|
3272
|
+
...params.headers,
|
|
3273
|
+
},
|
|
3274
|
+
});
|
|
3275
|
+
}
|
|
3276
|
+
/**
|
|
3277
|
+
* Reject pending question request
|
|
3278
|
+
*
|
|
3279
|
+
* Reject a pending question request owned by a session.
|
|
3280
|
+
*/
|
|
3281
|
+
reject(parameters, options) {
|
|
3282
|
+
const params = buildClientParams([parameters], [
|
|
3283
|
+
{
|
|
3284
|
+
args: [
|
|
3285
|
+
{ in: "path", key: "sessionID" },
|
|
3286
|
+
{ in: "path", key: "requestID" },
|
|
3287
|
+
],
|
|
3288
|
+
},
|
|
3289
|
+
]);
|
|
3290
|
+
return (options?.client ?? this.client).post({
|
|
3291
|
+
url: "/api/session/{sessionID}/question/{requestID}/reject",
|
|
3292
|
+
...options,
|
|
3293
|
+
...params,
|
|
3294
|
+
});
|
|
3295
|
+
}
|
|
3296
|
+
}
|
|
3297
|
+
export class Session3 extends HeyApiClient {
|
|
3298
|
+
/**
|
|
3299
|
+
* List sessions
|
|
3300
|
+
*
|
|
3301
|
+
* Retrieve sessions in the requested order. Items keep that order across pages; use cursor.next or cursor.previous to move through the ordered list.
|
|
3302
|
+
*/
|
|
3303
|
+
list(parameters, options) {
|
|
3304
|
+
const params = buildClientParams([parameters], [
|
|
3305
|
+
{
|
|
3306
|
+
args: [
|
|
3307
|
+
{ in: "query", key: "workspace" },
|
|
3308
|
+
{ in: "query", key: "limit" },
|
|
3309
|
+
{ in: "query", key: "order" },
|
|
3310
|
+
{ in: "query", key: "search" },
|
|
3311
|
+
{ in: "query", key: "directory" },
|
|
3312
|
+
{ in: "query", key: "project" },
|
|
3313
|
+
{ in: "query", key: "subpath" },
|
|
3314
|
+
{ in: "query", key: "cursor" },
|
|
3315
|
+
],
|
|
3316
|
+
},
|
|
3317
|
+
]);
|
|
3318
|
+
return (options?.client ?? this.client).get({
|
|
3319
|
+
url: "/api/session",
|
|
3320
|
+
...options,
|
|
3321
|
+
...params,
|
|
3322
|
+
});
|
|
3323
|
+
}
|
|
3324
|
+
/**
|
|
3325
|
+
* Create session
|
|
3326
|
+
*
|
|
3327
|
+
* Create a session at the requested location.
|
|
3328
|
+
*/
|
|
3329
|
+
create(parameters, options) {
|
|
3330
|
+
const params = buildClientParams([parameters], [
|
|
3331
|
+
{
|
|
3332
|
+
args: [
|
|
3333
|
+
{ in: "body", key: "id" },
|
|
3334
|
+
{ in: "body", key: "agent" },
|
|
3335
|
+
{ in: "body", key: "model" },
|
|
3336
|
+
{ in: "body", key: "location" },
|
|
3337
|
+
],
|
|
3338
|
+
},
|
|
3339
|
+
]);
|
|
3340
|
+
return (options?.client ?? this.client).post({
|
|
3341
|
+
url: "/api/session",
|
|
3342
|
+
...options,
|
|
3343
|
+
...params,
|
|
3344
|
+
headers: {
|
|
3345
|
+
"Content-Type": "application/json",
|
|
3346
|
+
...options?.headers,
|
|
3347
|
+
...params.headers,
|
|
3348
|
+
},
|
|
3349
|
+
});
|
|
3350
|
+
}
|
|
3351
|
+
/**
|
|
3352
|
+
* List active sessions
|
|
3353
|
+
*
|
|
3354
|
+
* Retrieve foreground Session drains currently owned by this Zyraxon process. Sessions absent from the result are inactive.
|
|
3355
|
+
*/
|
|
3356
|
+
active(options) {
|
|
3357
|
+
return (options?.client ?? this.client).get({
|
|
3358
|
+
url: "/api/session/active",
|
|
3359
|
+
...options,
|
|
3360
|
+
});
|
|
3361
|
+
}
|
|
3362
|
+
/**
|
|
3363
|
+
* Get session
|
|
3364
|
+
*
|
|
3365
|
+
* Retrieve a session by ID.
|
|
3366
|
+
*/
|
|
3367
|
+
get(parameters, options) {
|
|
3368
|
+
const params = buildClientParams([parameters], [{ args: [{ in: "path", key: "sessionID" }] }]);
|
|
3369
|
+
return (options?.client ?? this.client).get({
|
|
3370
|
+
url: "/api/session/{sessionID}",
|
|
3371
|
+
...options,
|
|
3372
|
+
...params,
|
|
3373
|
+
});
|
|
3374
|
+
}
|
|
3375
|
+
/**
|
|
3376
|
+
* Switch session agent
|
|
3377
|
+
*
|
|
3378
|
+
* Switch the agent used by subsequent provider turns.
|
|
3379
|
+
*/
|
|
3380
|
+
switchAgent(parameters, options) {
|
|
3381
|
+
const params = buildClientParams([parameters], [
|
|
3382
|
+
{
|
|
3383
|
+
args: [
|
|
3384
|
+
{ in: "path", key: "sessionID" },
|
|
3385
|
+
{ in: "body", key: "agent" },
|
|
3386
|
+
],
|
|
3387
|
+
},
|
|
3388
|
+
]);
|
|
3389
|
+
return (options?.client ?? this.client).post({
|
|
3390
|
+
url: "/api/session/{sessionID}/agent",
|
|
3391
|
+
...options,
|
|
3392
|
+
...params,
|
|
3393
|
+
headers: {
|
|
3394
|
+
"Content-Type": "application/json",
|
|
3395
|
+
...options?.headers,
|
|
3396
|
+
...params.headers,
|
|
3397
|
+
},
|
|
3398
|
+
});
|
|
3399
|
+
}
|
|
3400
|
+
/**
|
|
3401
|
+
* Switch session model
|
|
3402
|
+
*
|
|
3403
|
+
* Switch the model used by subsequent provider turns.
|
|
3404
|
+
*/
|
|
3405
|
+
switchModel(parameters, options) {
|
|
3406
|
+
const params = buildClientParams([parameters], [
|
|
3407
|
+
{
|
|
3408
|
+
args: [
|
|
3409
|
+
{ in: "path", key: "sessionID" },
|
|
3410
|
+
{ in: "body", key: "model" },
|
|
3411
|
+
],
|
|
3412
|
+
},
|
|
3413
|
+
]);
|
|
3414
|
+
return (options?.client ?? this.client).post({
|
|
3415
|
+
url: "/api/session/{sessionID}/model",
|
|
3416
|
+
...options,
|
|
3417
|
+
...params,
|
|
3418
|
+
headers: {
|
|
3419
|
+
"Content-Type": "application/json",
|
|
3420
|
+
...options?.headers,
|
|
3421
|
+
...params.headers,
|
|
3422
|
+
},
|
|
3423
|
+
});
|
|
3424
|
+
}
|
|
3425
|
+
/**
|
|
3426
|
+
* Send message
|
|
3427
|
+
*
|
|
3428
|
+
* Durably admit one session input and schedule agent-loop execution unless resume is false.
|
|
3429
|
+
*/
|
|
3430
|
+
prompt(parameters, options) {
|
|
3431
|
+
const params = buildClientParams([parameters], [
|
|
3432
|
+
{
|
|
3433
|
+
args: [
|
|
3434
|
+
{ in: "path", key: "sessionID" },
|
|
3435
|
+
{ in: "body", key: "id" },
|
|
3436
|
+
{ in: "body", key: "prompt" },
|
|
3437
|
+
{ in: "body", key: "delivery" },
|
|
3438
|
+
{ in: "body", key: "resume" },
|
|
3439
|
+
],
|
|
3440
|
+
},
|
|
3441
|
+
]);
|
|
3442
|
+
return (options?.client ?? this.client).post({
|
|
3443
|
+
url: "/api/session/{sessionID}/prompt",
|
|
3444
|
+
...options,
|
|
3445
|
+
...params,
|
|
3446
|
+
headers: {
|
|
3447
|
+
"Content-Type": "application/json",
|
|
3448
|
+
...options?.headers,
|
|
3449
|
+
...params.headers,
|
|
3450
|
+
},
|
|
3451
|
+
});
|
|
3452
|
+
}
|
|
3453
|
+
/**
|
|
3454
|
+
* Compact session
|
|
3455
|
+
*
|
|
3456
|
+
* Compact a session conversation.
|
|
3457
|
+
*/
|
|
3458
|
+
compact(parameters, options) {
|
|
3459
|
+
const params = buildClientParams([parameters], [{ args: [{ in: "path", key: "sessionID" }] }]);
|
|
3460
|
+
return (options?.client ?? this.client).post({
|
|
3461
|
+
url: "/api/session/{sessionID}/compact",
|
|
3462
|
+
...options,
|
|
3463
|
+
...params,
|
|
3464
|
+
});
|
|
3465
|
+
}
|
|
3466
|
+
/**
|
|
3467
|
+
* Wait for session
|
|
3468
|
+
*
|
|
3469
|
+
* Wait for a session agent loop to become idle.
|
|
3470
|
+
*/
|
|
3471
|
+
wait(parameters, options) {
|
|
3472
|
+
const params = buildClientParams([parameters], [{ args: [{ in: "path", key: "sessionID" }] }]);
|
|
3473
|
+
return (options?.client ?? this.client).post({
|
|
3474
|
+
url: "/api/session/{sessionID}/wait",
|
|
3475
|
+
...options,
|
|
3476
|
+
...params,
|
|
3477
|
+
});
|
|
3478
|
+
}
|
|
3479
|
+
/**
|
|
3480
|
+
* Get session context
|
|
3481
|
+
*
|
|
3482
|
+
* Retrieve the active context messages for a session (all messages after the last compaction).
|
|
3483
|
+
*/
|
|
3484
|
+
context(parameters, options) {
|
|
3485
|
+
const params = buildClientParams([parameters], [{ args: [{ in: "path", key: "sessionID" }] }]);
|
|
3486
|
+
return (options?.client ?? this.client).get({
|
|
3487
|
+
url: "/api/session/{sessionID}/context",
|
|
3488
|
+
...options,
|
|
3489
|
+
...params,
|
|
3490
|
+
});
|
|
3491
|
+
}
|
|
3492
|
+
/**
|
|
3493
|
+
* Get session history
|
|
3494
|
+
*
|
|
3495
|
+
* Read one finite page of public durable Session events after an exclusive aggregate sequence. Newly committed events may appear on later pages.
|
|
3496
|
+
*/
|
|
3497
|
+
history(parameters, options) {
|
|
3498
|
+
const params = buildClientParams([parameters], [
|
|
3499
|
+
{
|
|
3500
|
+
args: [
|
|
3501
|
+
{ in: "path", key: "sessionID" },
|
|
3502
|
+
{ in: "query", key: "limit" },
|
|
3503
|
+
{ in: "query", key: "after" },
|
|
3504
|
+
],
|
|
3505
|
+
},
|
|
3506
|
+
]);
|
|
3507
|
+
return (options?.client ?? this.client).get({
|
|
3508
|
+
url: "/api/session/{sessionID}/history",
|
|
3509
|
+
...options,
|
|
3510
|
+
...params,
|
|
3511
|
+
});
|
|
3512
|
+
}
|
|
3513
|
+
/**
|
|
3514
|
+
* Subscribe to session events
|
|
3515
|
+
*
|
|
3516
|
+
* Replay durable events after an aggregate sequence, then continue with new durable events.
|
|
3517
|
+
*/
|
|
3518
|
+
events(parameters, options) {
|
|
3519
|
+
const params = buildClientParams([parameters], [
|
|
3520
|
+
{
|
|
3521
|
+
args: [
|
|
3522
|
+
{ in: "path", key: "sessionID" },
|
|
3523
|
+
{ in: "query", key: "after" },
|
|
3524
|
+
],
|
|
3525
|
+
},
|
|
3526
|
+
]);
|
|
3527
|
+
return (options?.client ?? this.client).sse.get({
|
|
3528
|
+
url: "/api/session/{sessionID}/event",
|
|
3529
|
+
...options,
|
|
3530
|
+
...params,
|
|
3531
|
+
});
|
|
3532
|
+
}
|
|
3533
|
+
/**
|
|
3534
|
+
* Interrupt session execution
|
|
3535
|
+
*
|
|
3536
|
+
* Interrupt active execution owned by this Zyraxon process. Idle interruption is a no-op.
|
|
3537
|
+
*/
|
|
3538
|
+
interrupt(parameters, options) {
|
|
3539
|
+
const params = buildClientParams([parameters], [{ args: [{ in: "path", key: "sessionID" }] }]);
|
|
3540
|
+
return (options?.client ?? this.client).post({
|
|
3541
|
+
url: "/api/session/{sessionID}/interrupt",
|
|
3542
|
+
...options,
|
|
3543
|
+
...params,
|
|
3544
|
+
});
|
|
3545
|
+
}
|
|
3546
|
+
/**
|
|
3547
|
+
* Get session message
|
|
3548
|
+
*
|
|
3549
|
+
* Retrieve one projected message owned by the Session.
|
|
3550
|
+
*/
|
|
3551
|
+
message(parameters, options) {
|
|
3552
|
+
const params = buildClientParams([parameters], [
|
|
3553
|
+
{
|
|
3554
|
+
args: [
|
|
3555
|
+
{ in: "path", key: "sessionID" },
|
|
3556
|
+
{ in: "path", key: "messageID" },
|
|
3557
|
+
],
|
|
3558
|
+
},
|
|
3559
|
+
]);
|
|
3560
|
+
return (options?.client ?? this.client).get({
|
|
3561
|
+
url: "/api/session/{sessionID}/message/{messageID}",
|
|
3562
|
+
...options,
|
|
3563
|
+
...params,
|
|
3564
|
+
});
|
|
3565
|
+
}
|
|
3566
|
+
/**
|
|
3567
|
+
* Get session messages
|
|
3568
|
+
*
|
|
3569
|
+
* Retrieve projected messages for a session. Items keep the requested order across pages; use cursor.next or cursor.previous to move through the ordered timeline.
|
|
3570
|
+
*/
|
|
3571
|
+
messages(parameters, options) {
|
|
3572
|
+
const params = buildClientParams([parameters], [
|
|
3573
|
+
{
|
|
3574
|
+
args: [
|
|
3575
|
+
{ in: "path", key: "sessionID" },
|
|
3576
|
+
{ in: "query", key: "limit" },
|
|
3577
|
+
{ in: "query", key: "order" },
|
|
3578
|
+
{ in: "query", key: "cursor" },
|
|
3579
|
+
],
|
|
3580
|
+
},
|
|
3581
|
+
]);
|
|
3582
|
+
return (options?.client ?? this.client).get({
|
|
3583
|
+
url: "/api/session/{sessionID}/message",
|
|
3584
|
+
...options,
|
|
3585
|
+
...params,
|
|
3586
|
+
});
|
|
3587
|
+
}
|
|
3588
|
+
_revert;
|
|
3589
|
+
get revert() {
|
|
3590
|
+
return (this._revert ??= new Revert({ client: this.client }));
|
|
3591
|
+
}
|
|
3592
|
+
_permission;
|
|
3593
|
+
get permission() {
|
|
3594
|
+
return (this._permission ??= new Permission2({ client: this.client }));
|
|
3595
|
+
}
|
|
3596
|
+
_question;
|
|
3597
|
+
get question() {
|
|
3598
|
+
return (this._question ??= new Question2({ client: this.client }));
|
|
3599
|
+
}
|
|
3600
|
+
}
|
|
3601
|
+
export class Model extends HeyApiClient {
|
|
3602
|
+
/**
|
|
3603
|
+
* List models
|
|
3604
|
+
*
|
|
3605
|
+
* Retrieve available models ordered by release date.
|
|
3606
|
+
*/
|
|
3607
|
+
list(parameters, options) {
|
|
3608
|
+
const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "location" }] }]);
|
|
3609
|
+
return (options?.client ?? this.client).get({
|
|
3610
|
+
url: "/api/model",
|
|
3611
|
+
...options,
|
|
3612
|
+
...params,
|
|
3613
|
+
});
|
|
3614
|
+
}
|
|
3615
|
+
}
|
|
3616
|
+
export class Provider2 extends HeyApiClient {
|
|
3617
|
+
/**
|
|
3618
|
+
* List providers
|
|
3619
|
+
*
|
|
3620
|
+
* Retrieve active AI providers so clients can show provider availability and configuration.
|
|
3621
|
+
*/
|
|
3622
|
+
list(parameters, options) {
|
|
3623
|
+
const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "location" }] }]);
|
|
3624
|
+
return (options?.client ?? this.client).get({
|
|
3625
|
+
url: "/api/provider",
|
|
3626
|
+
...options,
|
|
3627
|
+
...params,
|
|
3628
|
+
});
|
|
3629
|
+
}
|
|
3630
|
+
/**
|
|
3631
|
+
* Get provider
|
|
3632
|
+
*
|
|
3633
|
+
* Retrieve a single AI provider so clients can inspect its availability and endpoint settings.
|
|
3634
|
+
*/
|
|
3635
|
+
get(parameters, options) {
|
|
3636
|
+
const params = buildClientParams([parameters], [
|
|
3637
|
+
{
|
|
3638
|
+
args: [
|
|
3639
|
+
{ in: "path", key: "providerID" },
|
|
3640
|
+
{ in: "query", key: "location" },
|
|
3641
|
+
],
|
|
3642
|
+
},
|
|
3643
|
+
]);
|
|
3644
|
+
return (options?.client ?? this.client).get({
|
|
3645
|
+
url: "/api/provider/{providerID}",
|
|
3646
|
+
...options,
|
|
3647
|
+
...params,
|
|
3648
|
+
});
|
|
3649
|
+
}
|
|
3650
|
+
}
|
|
3651
|
+
export class Connect extends HeyApiClient {
|
|
3652
|
+
/**
|
|
3653
|
+
* Connect with key
|
|
3654
|
+
*
|
|
3655
|
+
* Run a key authentication method and store the resulting credential.
|
|
3656
|
+
*/
|
|
3657
|
+
key(parameters, options) {
|
|
3658
|
+
const params = buildClientParams([parameters], [
|
|
3659
|
+
{
|
|
3660
|
+
args: [
|
|
3661
|
+
{ in: "path", key: "integrationID" },
|
|
3662
|
+
{ in: "query", key: "location" },
|
|
3663
|
+
{ in: "body", key: "key" },
|
|
3664
|
+
{ in: "body", key: "label" },
|
|
3665
|
+
],
|
|
3666
|
+
},
|
|
3667
|
+
]);
|
|
3668
|
+
return (options?.client ?? this.client).post({
|
|
3669
|
+
url: "/api/integration/{integrationID}/connect/key",
|
|
3670
|
+
...options,
|
|
3671
|
+
...params,
|
|
3672
|
+
headers: {
|
|
3673
|
+
"Content-Type": "application/json",
|
|
3674
|
+
...options?.headers,
|
|
3675
|
+
...params.headers,
|
|
3676
|
+
},
|
|
3677
|
+
});
|
|
3678
|
+
}
|
|
3679
|
+
/**
|
|
3680
|
+
* Begin OAuth connection
|
|
3681
|
+
*
|
|
3682
|
+
* Start an OAuth attempt and return the authorization details.
|
|
3683
|
+
*/
|
|
3684
|
+
oauth(parameters, options) {
|
|
3685
|
+
const params = buildClientParams([parameters], [
|
|
3686
|
+
{
|
|
3687
|
+
args: [
|
|
3688
|
+
{ in: "path", key: "integrationID" },
|
|
3689
|
+
{ in: "query", key: "location" },
|
|
3690
|
+
{ in: "body", key: "methodID" },
|
|
3691
|
+
{ in: "body", key: "inputs" },
|
|
3692
|
+
{ in: "body", key: "label" },
|
|
3693
|
+
],
|
|
3694
|
+
},
|
|
3695
|
+
]);
|
|
3696
|
+
return (options?.client ?? this.client).post({
|
|
3697
|
+
url: "/api/integration/{integrationID}/connect/oauth",
|
|
3698
|
+
...options,
|
|
3699
|
+
...params,
|
|
3700
|
+
headers: {
|
|
3701
|
+
"Content-Type": "application/json",
|
|
3702
|
+
...options?.headers,
|
|
3703
|
+
...params.headers,
|
|
3704
|
+
},
|
|
3705
|
+
});
|
|
3706
|
+
}
|
|
3707
|
+
}
|
|
3708
|
+
export class Attempt extends HeyApiClient {
|
|
3709
|
+
/**
|
|
3710
|
+
* Cancel OAuth connection
|
|
3711
|
+
*
|
|
3712
|
+
* Cancel an OAuth attempt and release its resources.
|
|
3713
|
+
*/
|
|
3714
|
+
cancel(parameters, options) {
|
|
3715
|
+
const params = buildClientParams([parameters], [
|
|
3716
|
+
{
|
|
3717
|
+
args: [
|
|
3718
|
+
{ in: "path", key: "attemptID" },
|
|
3719
|
+
{ in: "query", key: "location" },
|
|
3720
|
+
],
|
|
3721
|
+
},
|
|
3722
|
+
]);
|
|
3723
|
+
return (options?.client ?? this.client).delete({
|
|
3724
|
+
url: "/api/integration/attempt/{attemptID}",
|
|
3725
|
+
...options,
|
|
3726
|
+
...params,
|
|
3727
|
+
});
|
|
3728
|
+
}
|
|
3729
|
+
/**
|
|
3730
|
+
* Get OAuth attempt status
|
|
3731
|
+
*
|
|
3732
|
+
* Poll the current status of an OAuth attempt.
|
|
3733
|
+
*/
|
|
3734
|
+
status(parameters, options) {
|
|
3735
|
+
const params = buildClientParams([parameters], [
|
|
3736
|
+
{
|
|
3737
|
+
args: [
|
|
3738
|
+
{ in: "path", key: "attemptID" },
|
|
3739
|
+
{ in: "query", key: "location" },
|
|
3740
|
+
],
|
|
3741
|
+
},
|
|
3742
|
+
]);
|
|
3743
|
+
return (options?.client ?? this.client).get({
|
|
3744
|
+
url: "/api/integration/attempt/{attemptID}",
|
|
3745
|
+
...options,
|
|
3746
|
+
...params,
|
|
3747
|
+
});
|
|
3748
|
+
}
|
|
3749
|
+
/**
|
|
3750
|
+
* Complete OAuth connection
|
|
3751
|
+
*
|
|
3752
|
+
* Complete a code-based OAuth attempt and store the resulting credential.
|
|
3753
|
+
*/
|
|
3754
|
+
complete(parameters, options) {
|
|
3755
|
+
const params = buildClientParams([parameters], [
|
|
3756
|
+
{
|
|
3757
|
+
args: [
|
|
3758
|
+
{ in: "path", key: "attemptID" },
|
|
3759
|
+
{ in: "query", key: "location" },
|
|
3760
|
+
{ in: "body", key: "code" },
|
|
3761
|
+
],
|
|
3762
|
+
},
|
|
3763
|
+
]);
|
|
3764
|
+
return (options?.client ?? this.client).post({
|
|
3765
|
+
url: "/api/integration/attempt/{attemptID}/complete",
|
|
3766
|
+
...options,
|
|
3767
|
+
...params,
|
|
3768
|
+
headers: {
|
|
3769
|
+
"Content-Type": "application/json",
|
|
3770
|
+
...options?.headers,
|
|
3771
|
+
...params.headers,
|
|
3772
|
+
},
|
|
3773
|
+
});
|
|
3774
|
+
}
|
|
3775
|
+
}
|
|
3776
|
+
export class Integration extends HeyApiClient {
|
|
3777
|
+
/**
|
|
3778
|
+
* List integrations
|
|
3779
|
+
*
|
|
3780
|
+
* Retrieve available integrations and their authentication methods.
|
|
3781
|
+
*/
|
|
3782
|
+
list(parameters, options) {
|
|
3783
|
+
const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "location" }] }]);
|
|
3784
|
+
return (options?.client ?? this.client).get({
|
|
3785
|
+
url: "/api/integration",
|
|
3786
|
+
...options,
|
|
3787
|
+
...params,
|
|
3788
|
+
});
|
|
3789
|
+
}
|
|
3790
|
+
/**
|
|
3791
|
+
* Get integration
|
|
3792
|
+
*
|
|
3793
|
+
* Retrieve one integration and its authentication methods.
|
|
3794
|
+
*/
|
|
3795
|
+
get(parameters, options) {
|
|
3796
|
+
const params = buildClientParams([parameters], [
|
|
3797
|
+
{
|
|
3798
|
+
args: [
|
|
3799
|
+
{ in: "path", key: "integrationID" },
|
|
3800
|
+
{ in: "query", key: "location" },
|
|
3801
|
+
],
|
|
3802
|
+
},
|
|
3803
|
+
]);
|
|
3804
|
+
return (options?.client ?? this.client).get({
|
|
3805
|
+
url: "/api/integration/{integrationID}",
|
|
3806
|
+
...options,
|
|
3807
|
+
...params,
|
|
3808
|
+
});
|
|
3809
|
+
}
|
|
3810
|
+
_connect;
|
|
3811
|
+
get connect() {
|
|
3812
|
+
return (this._connect ??= new Connect({ client: this.client }));
|
|
3813
|
+
}
|
|
3814
|
+
_attempt;
|
|
3815
|
+
get attempt() {
|
|
3816
|
+
return (this._attempt ??= new Attempt({ client: this.client }));
|
|
3817
|
+
}
|
|
3818
|
+
}
|
|
3819
|
+
export class Credential extends HeyApiClient {
|
|
3820
|
+
/**
|
|
3821
|
+
* Remove credential
|
|
3822
|
+
*
|
|
3823
|
+
* Remove a stored integration credential.
|
|
3824
|
+
*/
|
|
3825
|
+
remove(parameters, options) {
|
|
3826
|
+
const params = buildClientParams([parameters], [
|
|
3827
|
+
{
|
|
3828
|
+
args: [
|
|
3829
|
+
{ in: "path", key: "credentialID" },
|
|
3830
|
+
{ in: "query", key: "location" },
|
|
3831
|
+
],
|
|
3832
|
+
},
|
|
3833
|
+
]);
|
|
3834
|
+
return (options?.client ?? this.client).delete({
|
|
3835
|
+
url: "/api/credential/{credentialID}",
|
|
3836
|
+
...options,
|
|
3837
|
+
...params,
|
|
3838
|
+
});
|
|
3839
|
+
}
|
|
3840
|
+
/**
|
|
3841
|
+
* Update credential
|
|
3842
|
+
*
|
|
3843
|
+
* Update a stored credential label.
|
|
3844
|
+
*/
|
|
3845
|
+
update(parameters, options) {
|
|
3846
|
+
const params = buildClientParams([parameters], [
|
|
3847
|
+
{
|
|
3848
|
+
args: [
|
|
3849
|
+
{ in: "path", key: "credentialID" },
|
|
3850
|
+
{ in: "query", key: "location" },
|
|
3851
|
+
{ in: "body", key: "label" },
|
|
3852
|
+
],
|
|
3853
|
+
},
|
|
3854
|
+
]);
|
|
3855
|
+
return (options?.client ?? this.client).patch({
|
|
3856
|
+
url: "/api/credential/{credentialID}",
|
|
3857
|
+
...options,
|
|
3858
|
+
...params,
|
|
3859
|
+
headers: {
|
|
3860
|
+
"Content-Type": "application/json",
|
|
3861
|
+
...options?.headers,
|
|
3862
|
+
...params.headers,
|
|
3863
|
+
},
|
|
3864
|
+
});
|
|
3865
|
+
}
|
|
3866
|
+
}
|
|
3867
|
+
export class Request extends HeyApiClient {
|
|
3868
|
+
/**
|
|
3869
|
+
* List pending permission requests
|
|
3870
|
+
*
|
|
3871
|
+
* Retrieve pending permission requests for a location.
|
|
3872
|
+
*/
|
|
3873
|
+
list(parameters, options) {
|
|
3874
|
+
const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "location" }] }]);
|
|
3875
|
+
return (options?.client ?? this.client).get({
|
|
3876
|
+
url: "/api/permission/request",
|
|
3877
|
+
...options,
|
|
3878
|
+
...params,
|
|
3879
|
+
});
|
|
3880
|
+
}
|
|
3881
|
+
}
|
|
3882
|
+
export class Saved extends HeyApiClient {
|
|
3883
|
+
/**
|
|
3884
|
+
* List saved permissions
|
|
3885
|
+
*
|
|
3886
|
+
* Retrieve saved permissions, optionally filtered by project.
|
|
3887
|
+
*/
|
|
3888
|
+
list(parameters, options) {
|
|
3889
|
+
const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "projectID" }] }]);
|
|
3890
|
+
return (options?.client ?? this.client).get({
|
|
3891
|
+
url: "/api/permission/saved",
|
|
3892
|
+
...options,
|
|
3893
|
+
...params,
|
|
3894
|
+
});
|
|
3895
|
+
}
|
|
3896
|
+
/**
|
|
3897
|
+
* Remove saved permission
|
|
3898
|
+
*
|
|
3899
|
+
* Remove a saved permission by ID.
|
|
3900
|
+
*/
|
|
3901
|
+
remove(parameters, options) {
|
|
3902
|
+
const params = buildClientParams([parameters], [{ args: [{ in: "path", key: "id" }] }]);
|
|
3903
|
+
return (options?.client ?? this.client).delete({
|
|
3904
|
+
url: "/api/permission/saved/{id}",
|
|
3905
|
+
...options,
|
|
3906
|
+
...params,
|
|
3907
|
+
});
|
|
3908
|
+
}
|
|
3909
|
+
}
|
|
3910
|
+
export class Permission3 extends HeyApiClient {
|
|
3911
|
+
_request;
|
|
3912
|
+
get request() {
|
|
3913
|
+
return (this._request ??= new Request({ client: this.client }));
|
|
3914
|
+
}
|
|
3915
|
+
_saved;
|
|
3916
|
+
get saved() {
|
|
3917
|
+
return (this._saved ??= new Saved({ client: this.client }));
|
|
3918
|
+
}
|
|
3919
|
+
}
|
|
3920
|
+
export class Fs extends HeyApiClient {
|
|
3921
|
+
/**
|
|
3922
|
+
* Read file
|
|
3923
|
+
*
|
|
3924
|
+
* Serve one file relative to the requested location.
|
|
3925
|
+
*/
|
|
3926
|
+
read(parameters, options) {
|
|
3927
|
+
const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "location" }] }]);
|
|
3928
|
+
return (options?.client ?? this.client).get({
|
|
3929
|
+
url: "/api/fs/read/*",
|
|
3930
|
+
...options,
|
|
3931
|
+
...params,
|
|
3932
|
+
});
|
|
3933
|
+
}
|
|
3934
|
+
/**
|
|
3935
|
+
* List directory
|
|
3936
|
+
*
|
|
3937
|
+
* List direct children of one directory relative to the requested location.
|
|
3938
|
+
*/
|
|
3939
|
+
list(parameters, options) {
|
|
3940
|
+
const params = buildClientParams([parameters], [
|
|
3941
|
+
{
|
|
3942
|
+
args: [
|
|
3943
|
+
{ in: "query", key: "location" },
|
|
3944
|
+
{ in: "query", key: "path" },
|
|
3945
|
+
],
|
|
3946
|
+
},
|
|
3947
|
+
]);
|
|
3948
|
+
return (options?.client ?? this.client).get({
|
|
3949
|
+
url: "/api/fs/list",
|
|
3950
|
+
...options,
|
|
3951
|
+
...params,
|
|
3952
|
+
});
|
|
3953
|
+
}
|
|
3954
|
+
/**
|
|
3955
|
+
* Find files
|
|
3956
|
+
*
|
|
3957
|
+
* Find recursively ranked filesystem entries relative to the requested location.
|
|
3958
|
+
*/
|
|
3959
|
+
find(parameters, options) {
|
|
3960
|
+
const params = buildClientParams([parameters], [
|
|
3961
|
+
{
|
|
3962
|
+
args: [
|
|
3963
|
+
{ in: "query", key: "location" },
|
|
3964
|
+
{ in: "query", key: "query" },
|
|
3965
|
+
{ in: "query", key: "type" },
|
|
3966
|
+
{ in: "query", key: "limit" },
|
|
3967
|
+
],
|
|
3968
|
+
},
|
|
3969
|
+
]);
|
|
3970
|
+
return (options?.client ?? this.client).get({
|
|
3971
|
+
url: "/api/fs/find",
|
|
3972
|
+
...options,
|
|
3973
|
+
...params,
|
|
3974
|
+
});
|
|
3975
|
+
}
|
|
3976
|
+
}
|
|
3977
|
+
export class Command2 extends HeyApiClient {
|
|
3978
|
+
/**
|
|
3979
|
+
* List commands
|
|
3980
|
+
*
|
|
3981
|
+
* Retrieve currently registered commands.
|
|
3982
|
+
*/
|
|
3983
|
+
list(parameters, options) {
|
|
3984
|
+
const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "location" }] }]);
|
|
3985
|
+
return (options?.client ?? this.client).get({
|
|
3986
|
+
url: "/api/command",
|
|
3987
|
+
...options,
|
|
3988
|
+
...params,
|
|
3989
|
+
});
|
|
3990
|
+
}
|
|
3991
|
+
}
|
|
3992
|
+
export class Skill extends HeyApiClient {
|
|
3993
|
+
/**
|
|
3994
|
+
* List skills
|
|
3995
|
+
*
|
|
3996
|
+
* Retrieve currently registered skills.
|
|
3997
|
+
*/
|
|
3998
|
+
list(parameters, options) {
|
|
3999
|
+
const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "location" }] }]);
|
|
4000
|
+
return (options?.client ?? this.client).get({
|
|
4001
|
+
url: "/api/skill",
|
|
4002
|
+
...options,
|
|
4003
|
+
...params,
|
|
4004
|
+
});
|
|
4005
|
+
}
|
|
4006
|
+
}
|
|
4007
|
+
export class Event2 extends HeyApiClient {
|
|
4008
|
+
/**
|
|
4009
|
+
* Subscribe to events
|
|
4010
|
+
*
|
|
4011
|
+
* Subscribe to native event payloads for the server.
|
|
4012
|
+
*/
|
|
4013
|
+
subscribe(options) {
|
|
4014
|
+
return (options?.client ?? this.client).sse.get({
|
|
4015
|
+
url: "/api/event",
|
|
4016
|
+
...options,
|
|
4017
|
+
});
|
|
4018
|
+
}
|
|
4019
|
+
}
|
|
4020
|
+
export class Pty2 extends HeyApiClient {
|
|
4021
|
+
/**
|
|
4022
|
+
* List PTY sessions
|
|
4023
|
+
*
|
|
4024
|
+
* List PTY sessions for a location, including exited sessions retained until removal.
|
|
4025
|
+
*/
|
|
4026
|
+
list(parameters, options) {
|
|
4027
|
+
const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "location" }] }]);
|
|
4028
|
+
return (options?.client ?? this.client).get({
|
|
4029
|
+
url: "/api/pty",
|
|
4030
|
+
...options,
|
|
4031
|
+
...params,
|
|
4032
|
+
});
|
|
4033
|
+
}
|
|
4034
|
+
/**
|
|
4035
|
+
* Create PTY session
|
|
4036
|
+
*
|
|
4037
|
+
* Create a pseudo-terminal session for a location.
|
|
4038
|
+
*/
|
|
4039
|
+
create(parameters, options) {
|
|
4040
|
+
const params = buildClientParams([parameters], [
|
|
4041
|
+
{
|
|
4042
|
+
args: [
|
|
4043
|
+
{ in: "query", key: "location" },
|
|
4044
|
+
{ in: "body", key: "command" },
|
|
4045
|
+
{ in: "body", key: "args" },
|
|
4046
|
+
{ in: "body", key: "cwd" },
|
|
4047
|
+
{ in: "body", key: "title" },
|
|
4048
|
+
{ in: "body", key: "env" },
|
|
4049
|
+
],
|
|
4050
|
+
},
|
|
4051
|
+
]);
|
|
4052
|
+
return (options?.client ?? this.client).post({
|
|
4053
|
+
url: "/api/pty",
|
|
4054
|
+
...options,
|
|
4055
|
+
...params,
|
|
4056
|
+
headers: {
|
|
4057
|
+
"Content-Type": "application/json",
|
|
4058
|
+
...options?.headers,
|
|
4059
|
+
...params.headers,
|
|
4060
|
+
},
|
|
4061
|
+
});
|
|
4062
|
+
}
|
|
4063
|
+
/**
|
|
4064
|
+
* Remove PTY session
|
|
4065
|
+
*
|
|
4066
|
+
* Terminate and remove one PTY session.
|
|
4067
|
+
*/
|
|
4068
|
+
remove(parameters, options) {
|
|
4069
|
+
const params = buildClientParams([parameters], [
|
|
4070
|
+
{
|
|
4071
|
+
args: [
|
|
4072
|
+
{ in: "path", key: "ptyID" },
|
|
4073
|
+
{ in: "query", key: "location" },
|
|
4074
|
+
],
|
|
4075
|
+
},
|
|
4076
|
+
]);
|
|
4077
|
+
return (options?.client ?? this.client).delete({
|
|
4078
|
+
url: "/api/pty/{ptyID}",
|
|
4079
|
+
...options,
|
|
4080
|
+
...params,
|
|
4081
|
+
});
|
|
4082
|
+
}
|
|
4083
|
+
/**
|
|
4084
|
+
* Get PTY session
|
|
4085
|
+
*
|
|
4086
|
+
* Get one PTY session, including its exit code once exited.
|
|
4087
|
+
*/
|
|
4088
|
+
get(parameters, options) {
|
|
4089
|
+
const params = buildClientParams([parameters], [
|
|
4090
|
+
{
|
|
4091
|
+
args: [
|
|
4092
|
+
{ in: "path", key: "ptyID" },
|
|
4093
|
+
{ in: "query", key: "location" },
|
|
4094
|
+
],
|
|
4095
|
+
},
|
|
4096
|
+
]);
|
|
4097
|
+
return (options?.client ?? this.client).get({
|
|
4098
|
+
url: "/api/pty/{ptyID}",
|
|
4099
|
+
...options,
|
|
4100
|
+
...params,
|
|
4101
|
+
});
|
|
4102
|
+
}
|
|
4103
|
+
/**
|
|
4104
|
+
* Update PTY session
|
|
4105
|
+
*
|
|
4106
|
+
* Update the title or viewport size of one PTY session.
|
|
4107
|
+
*/
|
|
4108
|
+
update(parameters, options) {
|
|
4109
|
+
const params = buildClientParams([parameters], [
|
|
4110
|
+
{
|
|
4111
|
+
args: [
|
|
4112
|
+
{ in: "path", key: "ptyID" },
|
|
4113
|
+
{ in: "query", key: "location" },
|
|
4114
|
+
{ in: "body", key: "title" },
|
|
4115
|
+
{ in: "body", key: "size" },
|
|
4116
|
+
],
|
|
4117
|
+
},
|
|
4118
|
+
]);
|
|
4119
|
+
return (options?.client ?? this.client).put({
|
|
4120
|
+
url: "/api/pty/{ptyID}",
|
|
4121
|
+
...options,
|
|
4122
|
+
...params,
|
|
4123
|
+
headers: {
|
|
4124
|
+
"Content-Type": "application/json",
|
|
4125
|
+
...options?.headers,
|
|
4126
|
+
...params.headers,
|
|
4127
|
+
},
|
|
4128
|
+
});
|
|
4129
|
+
}
|
|
4130
|
+
/**
|
|
4131
|
+
* Create PTY WebSocket token
|
|
4132
|
+
*
|
|
4133
|
+
* Create a short-lived single-use ticket for opening a PTY WebSocket connection.
|
|
4134
|
+
*/
|
|
4135
|
+
connectToken(parameters, options) {
|
|
4136
|
+
const params = buildClientParams([parameters], [
|
|
4137
|
+
{
|
|
4138
|
+
args: [
|
|
4139
|
+
{ in: "path", key: "ptyID" },
|
|
4140
|
+
{ in: "query", key: "location" },
|
|
4141
|
+
],
|
|
4142
|
+
},
|
|
4143
|
+
]);
|
|
4144
|
+
return (options?.client ?? this.client).post({
|
|
4145
|
+
url: "/api/pty/{ptyID}/connect-token",
|
|
4146
|
+
...options,
|
|
4147
|
+
...params,
|
|
4148
|
+
});
|
|
4149
|
+
}
|
|
4150
|
+
/**
|
|
4151
|
+
* Connect to PTY session
|
|
4152
|
+
*
|
|
4153
|
+
* Establish a WebSocket connection streaming PTY output and accepting terminal input.
|
|
4154
|
+
*/
|
|
4155
|
+
connect(parameters, options) {
|
|
4156
|
+
const params = buildClientParams([parameters], [
|
|
4157
|
+
{
|
|
4158
|
+
args: [
|
|
4159
|
+
{ in: "path", key: "ptyID" },
|
|
4160
|
+
{ in: "query", key: "location[directory]" },
|
|
4161
|
+
{ in: "query", key: "location[workspace]" },
|
|
4162
|
+
{ in: "query", key: "cursor" },
|
|
4163
|
+
{ in: "query", key: "ticket" },
|
|
4164
|
+
],
|
|
4165
|
+
},
|
|
4166
|
+
]);
|
|
4167
|
+
return (options?.client ?? this.client).get({
|
|
4168
|
+
url: "/api/pty/{ptyID}/connect",
|
|
4169
|
+
...options,
|
|
4170
|
+
...params,
|
|
4171
|
+
});
|
|
4172
|
+
}
|
|
4173
|
+
}
|
|
4174
|
+
export class Request2 extends HeyApiClient {
|
|
4175
|
+
/**
|
|
4176
|
+
* List pending question requests
|
|
4177
|
+
*
|
|
4178
|
+
* Retrieve pending question requests for a location.
|
|
4179
|
+
*/
|
|
4180
|
+
list(parameters, options) {
|
|
4181
|
+
const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "location" }] }]);
|
|
4182
|
+
return (options?.client ?? this.client).get({
|
|
4183
|
+
url: "/api/question/request",
|
|
4184
|
+
...options,
|
|
4185
|
+
...params,
|
|
4186
|
+
});
|
|
4187
|
+
}
|
|
4188
|
+
}
|
|
4189
|
+
export class Question3 extends HeyApiClient {
|
|
4190
|
+
_request;
|
|
4191
|
+
get request() {
|
|
4192
|
+
return (this._request ??= new Request2({ client: this.client }));
|
|
4193
|
+
}
|
|
4194
|
+
}
|
|
4195
|
+
export class Reference extends HeyApiClient {
|
|
4196
|
+
/**
|
|
4197
|
+
* List references
|
|
4198
|
+
*
|
|
4199
|
+
* List references available in the requested location.
|
|
4200
|
+
*/
|
|
4201
|
+
list(parameters, options) {
|
|
4202
|
+
const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "location" }] }]);
|
|
4203
|
+
return (options?.client ?? this.client).get({
|
|
4204
|
+
url: "/api/reference",
|
|
4205
|
+
...options,
|
|
4206
|
+
...params,
|
|
4207
|
+
});
|
|
4208
|
+
}
|
|
4209
|
+
}
|
|
4210
|
+
export class ProjectCopy2 extends HeyApiClient {
|
|
4211
|
+
remove(parameters, options) {
|
|
4212
|
+
const params = buildClientParams([parameters], [
|
|
4213
|
+
{
|
|
4214
|
+
args: [
|
|
4215
|
+
{ in: "path", key: "projectID" },
|
|
4216
|
+
{ in: "query", key: "location" },
|
|
4217
|
+
{ in: "body", key: "directory" },
|
|
4218
|
+
{ in: "body", key: "force" },
|
|
4219
|
+
],
|
|
4220
|
+
},
|
|
4221
|
+
]);
|
|
4222
|
+
return (options?.client ?? this.client).delete({
|
|
4223
|
+
url: "/experimental/project/{projectID}/copy",
|
|
4224
|
+
...options,
|
|
4225
|
+
...params,
|
|
4226
|
+
headers: {
|
|
4227
|
+
"Content-Type": "application/json",
|
|
4228
|
+
...options?.headers,
|
|
4229
|
+
...params.headers,
|
|
4230
|
+
},
|
|
4231
|
+
});
|
|
4232
|
+
}
|
|
4233
|
+
create(parameters, options) {
|
|
4234
|
+
const params = buildClientParams([parameters], [
|
|
4235
|
+
{
|
|
4236
|
+
args: [
|
|
4237
|
+
{ in: "path", key: "projectID" },
|
|
4238
|
+
{ in: "query", key: "location" },
|
|
4239
|
+
{ in: "body", key: "strategy" },
|
|
4240
|
+
{ in: "body", key: "directory" },
|
|
4241
|
+
{ in: "body", key: "name" },
|
|
4242
|
+
],
|
|
4243
|
+
},
|
|
4244
|
+
]);
|
|
4245
|
+
return (options?.client ?? this.client).post({
|
|
4246
|
+
url: "/experimental/project/{projectID}/copy",
|
|
4247
|
+
...options,
|
|
4248
|
+
...params,
|
|
4249
|
+
headers: {
|
|
4250
|
+
"Content-Type": "application/json",
|
|
4251
|
+
...options?.headers,
|
|
4252
|
+
...params.headers,
|
|
4253
|
+
},
|
|
4254
|
+
});
|
|
4255
|
+
}
|
|
4256
|
+
refresh(parameters, options) {
|
|
4257
|
+
const params = buildClientParams([parameters], [
|
|
4258
|
+
{
|
|
4259
|
+
args: [
|
|
4260
|
+
{ in: "path", key: "projectID" },
|
|
4261
|
+
{ in: "query", key: "location" },
|
|
4262
|
+
],
|
|
4263
|
+
},
|
|
4264
|
+
]);
|
|
4265
|
+
return (options?.client ?? this.client).post({
|
|
4266
|
+
url: "/experimental/project/{projectID}/copy/refresh",
|
|
4267
|
+
...options,
|
|
4268
|
+
...params,
|
|
4269
|
+
});
|
|
4270
|
+
}
|
|
4271
|
+
}
|
|
4272
|
+
export class V2 extends HeyApiClient {
|
|
4273
|
+
_health;
|
|
4274
|
+
get health() {
|
|
4275
|
+
return (this._health ??= new Health({ client: this.client }));
|
|
4276
|
+
}
|
|
4277
|
+
_location;
|
|
4278
|
+
get location() {
|
|
4279
|
+
return (this._location ??= new Location({ client: this.client }));
|
|
4280
|
+
}
|
|
4281
|
+
_agent;
|
|
4282
|
+
get agent() {
|
|
4283
|
+
return (this._agent ??= new Agent({ client: this.client }));
|
|
4284
|
+
}
|
|
4285
|
+
_session;
|
|
4286
|
+
get session() {
|
|
4287
|
+
return (this._session ??= new Session3({ client: this.client }));
|
|
4288
|
+
}
|
|
4289
|
+
_model;
|
|
4290
|
+
get model() {
|
|
4291
|
+
return (this._model ??= new Model({ client: this.client }));
|
|
4292
|
+
}
|
|
4293
|
+
_provider;
|
|
4294
|
+
get provider() {
|
|
4295
|
+
return (this._provider ??= new Provider2({ client: this.client }));
|
|
4296
|
+
}
|
|
4297
|
+
_integration;
|
|
4298
|
+
get integration() {
|
|
4299
|
+
return (this._integration ??= new Integration({ client: this.client }));
|
|
4300
|
+
}
|
|
4301
|
+
_credential;
|
|
4302
|
+
get credential() {
|
|
4303
|
+
return (this._credential ??= new Credential({ client: this.client }));
|
|
4304
|
+
}
|
|
4305
|
+
_permission;
|
|
4306
|
+
get permission() {
|
|
4307
|
+
return (this._permission ??= new Permission3({ client: this.client }));
|
|
4308
|
+
}
|
|
4309
|
+
_fs;
|
|
4310
|
+
get fs() {
|
|
4311
|
+
return (this._fs ??= new Fs({ client: this.client }));
|
|
4312
|
+
}
|
|
4313
|
+
_command;
|
|
4314
|
+
get command() {
|
|
4315
|
+
return (this._command ??= new Command2({ client: this.client }));
|
|
4316
|
+
}
|
|
4317
|
+
_skill;
|
|
4318
|
+
get skill() {
|
|
4319
|
+
return (this._skill ??= new Skill({ client: this.client }));
|
|
4320
|
+
}
|
|
4321
|
+
_event;
|
|
4322
|
+
get event() {
|
|
4323
|
+
return (this._event ??= new Event2({ client: this.client }));
|
|
4324
|
+
}
|
|
4325
|
+
_pty;
|
|
4326
|
+
get pty() {
|
|
4327
|
+
return (this._pty ??= new Pty2({ client: this.client }));
|
|
4328
|
+
}
|
|
4329
|
+
_question;
|
|
4330
|
+
get question() {
|
|
4331
|
+
return (this._question ??= new Question3({ client: this.client }));
|
|
4332
|
+
}
|
|
4333
|
+
_reference;
|
|
4334
|
+
get reference() {
|
|
4335
|
+
return (this._reference ??= new Reference({ client: this.client }));
|
|
4336
|
+
}
|
|
4337
|
+
_projectCopy;
|
|
4338
|
+
get projectCopy() {
|
|
4339
|
+
return (this._projectCopy ??= new ProjectCopy2({ client: this.client }));
|
|
4340
|
+
}
|
|
4341
|
+
}
|
|
4342
|
+
export class ZyraxonClient extends HeyApiClient {
|
|
4343
|
+
static __registry = new HeyApiRegistry();
|
|
4344
|
+
constructor(args) {
|
|
4345
|
+
super(args);
|
|
4346
|
+
ZyraxonClient.__registry.set(this, args?.key);
|
|
4347
|
+
}
|
|
4348
|
+
_auth;
|
|
4349
|
+
get auth() {
|
|
4350
|
+
return (this._auth ??= new Auth({ client: this.client }));
|
|
4351
|
+
}
|
|
4352
|
+
_app;
|
|
4353
|
+
get app() {
|
|
4354
|
+
return (this._app ??= new App({ client: this.client }));
|
|
4355
|
+
}
|
|
4356
|
+
_experimental;
|
|
4357
|
+
get experimental() {
|
|
4358
|
+
return (this._experimental ??= new Experimental({ client: this.client }));
|
|
4359
|
+
}
|
|
4360
|
+
_global;
|
|
4361
|
+
get global() {
|
|
4362
|
+
return (this._global ??= new Global({ client: this.client }));
|
|
4363
|
+
}
|
|
4364
|
+
_event;
|
|
4365
|
+
get event() {
|
|
4366
|
+
return (this._event ??= new Event({ client: this.client }));
|
|
4367
|
+
}
|
|
4368
|
+
_config;
|
|
4369
|
+
get config() {
|
|
4370
|
+
return (this._config ??= new Config2({ client: this.client }));
|
|
4371
|
+
}
|
|
4372
|
+
_tool;
|
|
4373
|
+
get tool() {
|
|
4374
|
+
return (this._tool ??= new Tool({ client: this.client }));
|
|
4375
|
+
}
|
|
4376
|
+
_worktree;
|
|
4377
|
+
get worktree() {
|
|
4378
|
+
return (this._worktree ??= new Worktree({ client: this.client }));
|
|
4379
|
+
}
|
|
4380
|
+
_find;
|
|
4381
|
+
get find() {
|
|
4382
|
+
return (this._find ??= new Find({ client: this.client }));
|
|
4383
|
+
}
|
|
4384
|
+
_file;
|
|
4385
|
+
get file() {
|
|
4386
|
+
return (this._file ??= new File({ client: this.client }));
|
|
4387
|
+
}
|
|
4388
|
+
_instance;
|
|
4389
|
+
get instance() {
|
|
4390
|
+
return (this._instance ??= new Instance({ client: this.client }));
|
|
4391
|
+
}
|
|
4392
|
+
_path;
|
|
4393
|
+
get path() {
|
|
4394
|
+
return (this._path ??= new Path({ client: this.client }));
|
|
4395
|
+
}
|
|
4396
|
+
_vcs;
|
|
4397
|
+
get vcs() {
|
|
4398
|
+
return (this._vcs ??= new Vcs({ client: this.client }));
|
|
4399
|
+
}
|
|
4400
|
+
_command;
|
|
4401
|
+
get command() {
|
|
4402
|
+
return (this._command ??= new Command({ client: this.client }));
|
|
4403
|
+
}
|
|
4404
|
+
_lsp;
|
|
4405
|
+
get lsp() {
|
|
4406
|
+
return (this._lsp ??= new Lsp({ client: this.client }));
|
|
4407
|
+
}
|
|
4408
|
+
_formatter;
|
|
4409
|
+
get formatter() {
|
|
4410
|
+
return (this._formatter ??= new Formatter({ client: this.client }));
|
|
4411
|
+
}
|
|
4412
|
+
_mcp;
|
|
4413
|
+
get mcp() {
|
|
4414
|
+
return (this._mcp ??= new Mcp({ client: this.client }));
|
|
4415
|
+
}
|
|
4416
|
+
_project;
|
|
4417
|
+
get project() {
|
|
4418
|
+
return (this._project ??= new Project({ client: this.client }));
|
|
4419
|
+
}
|
|
4420
|
+
_pty;
|
|
4421
|
+
get pty() {
|
|
4422
|
+
return (this._pty ??= new Pty({ client: this.client }));
|
|
4423
|
+
}
|
|
4424
|
+
_question;
|
|
4425
|
+
get question() {
|
|
4426
|
+
return (this._question ??= new Question({ client: this.client }));
|
|
4427
|
+
}
|
|
4428
|
+
_permission;
|
|
4429
|
+
get permission() {
|
|
4430
|
+
return (this._permission ??= new Permission({ client: this.client }));
|
|
4431
|
+
}
|
|
4432
|
+
_provider;
|
|
4433
|
+
get provider() {
|
|
4434
|
+
return (this._provider ??= new Provider({ client: this.client }));
|
|
4435
|
+
}
|
|
4436
|
+
_session;
|
|
4437
|
+
get session() {
|
|
4438
|
+
return (this._session ??= new Session2({ client: this.client }));
|
|
4439
|
+
}
|
|
4440
|
+
_part;
|
|
4441
|
+
get part() {
|
|
4442
|
+
return (this._part ??= new Part({ client: this.client }));
|
|
4443
|
+
}
|
|
4444
|
+
_sync;
|
|
4445
|
+
get sync() {
|
|
4446
|
+
return (this._sync ??= new Sync({ client: this.client }));
|
|
4447
|
+
}
|
|
4448
|
+
_tui;
|
|
4449
|
+
get tui() {
|
|
4450
|
+
return (this._tui ??= new Tui({ client: this.client }));
|
|
4451
|
+
}
|
|
4452
|
+
_v2;
|
|
4453
|
+
get v2() {
|
|
4454
|
+
return (this._v2 ??= new V2({ client: this.client }));
|
|
4455
|
+
}
|
|
4456
|
+
}
|
|
4457
|
+
//# sourceMappingURL=sdk.gen.js.map
|