@ofoundation/opencode-sdk 0.0.0-dev-202603011725

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.
Files changed (73) hide show
  1. package/dist/client.d.ts +7 -0
  2. package/dist/client.js +25 -0
  3. package/dist/gen/client/client.gen.d.ts +2 -0
  4. package/dist/gen/client/client.gen.js +165 -0
  5. package/dist/gen/client/index.d.ts +7 -0
  6. package/dist/gen/client/index.js +5 -0
  7. package/dist/gen/client/types.gen.d.ts +127 -0
  8. package/dist/gen/client/types.gen.js +2 -0
  9. package/dist/gen/client/utils.gen.d.ts +38 -0
  10. package/dist/gen/client/utils.gen.js +226 -0
  11. package/dist/gen/client.gen.d.ts +12 -0
  12. package/dist/gen/client.gen.js +5 -0
  13. package/dist/gen/core/auth.gen.d.ts +18 -0
  14. package/dist/gen/core/auth.gen.js +14 -0
  15. package/dist/gen/core/bodySerializer.gen.d.ts +17 -0
  16. package/dist/gen/core/bodySerializer.gen.js +57 -0
  17. package/dist/gen/core/params.gen.d.ts +33 -0
  18. package/dist/gen/core/params.gen.js +89 -0
  19. package/dist/gen/core/pathSerializer.gen.d.ts +33 -0
  20. package/dist/gen/core/pathSerializer.gen.js +106 -0
  21. package/dist/gen/core/queryKeySerializer.gen.d.ts +18 -0
  22. package/dist/gen/core/queryKeySerializer.gen.js +93 -0
  23. package/dist/gen/core/serverSentEvents.gen.d.ts +59 -0
  24. package/dist/gen/core/serverSentEvents.gen.js +117 -0
  25. package/dist/gen/core/types.gen.d.ts +78 -0
  26. package/dist/gen/core/types.gen.js +2 -0
  27. package/dist/gen/core/utils.gen.d.ts +14 -0
  28. package/dist/gen/core/utils.gen.js +69 -0
  29. package/dist/gen/sdk.gen.d.ts +403 -0
  30. package/dist/gen/sdk.gen.js +881 -0
  31. package/dist/gen/types.gen.d.ts +3380 -0
  32. package/dist/gen/types.gen.js +2 -0
  33. package/dist/index.d.ts +10 -0
  34. package/dist/index.js +16 -0
  35. package/dist/server.d.ts +23 -0
  36. package/dist/server.js +94 -0
  37. package/dist/v2/client.d.ts +7 -0
  38. package/dist/v2/client.js +27 -0
  39. package/dist/v2/gen/client/client.gen.d.ts +2 -0
  40. package/dist/v2/gen/client/client.gen.js +232 -0
  41. package/dist/v2/gen/client/index.d.ts +8 -0
  42. package/dist/v2/gen/client/index.js +6 -0
  43. package/dist/v2/gen/client/types.gen.d.ts +117 -0
  44. package/dist/v2/gen/client/types.gen.js +2 -0
  45. package/dist/v2/gen/client/utils.gen.d.ts +33 -0
  46. package/dist/v2/gen/client/utils.gen.js +226 -0
  47. package/dist/v2/gen/client.gen.d.ts +12 -0
  48. package/dist/v2/gen/client.gen.js +3 -0
  49. package/dist/v2/gen/core/auth.gen.d.ts +18 -0
  50. package/dist/v2/gen/core/auth.gen.js +14 -0
  51. package/dist/v2/gen/core/bodySerializer.gen.d.ts +25 -0
  52. package/dist/v2/gen/core/bodySerializer.gen.js +57 -0
  53. package/dist/v2/gen/core/params.gen.d.ts +43 -0
  54. package/dist/v2/gen/core/params.gen.js +102 -0
  55. package/dist/v2/gen/core/pathSerializer.gen.d.ts +33 -0
  56. package/dist/v2/gen/core/pathSerializer.gen.js +106 -0
  57. package/dist/v2/gen/core/queryKeySerializer.gen.d.ts +18 -0
  58. package/dist/v2/gen/core/queryKeySerializer.gen.js +93 -0
  59. package/dist/v2/gen/core/serverSentEvents.gen.d.ts +71 -0
  60. package/dist/v2/gen/core/serverSentEvents.gen.js +133 -0
  61. package/dist/v2/gen/core/types.gen.d.ts +78 -0
  62. package/dist/v2/gen/core/types.gen.js +2 -0
  63. package/dist/v2/gen/core/utils.gen.d.ts +19 -0
  64. package/dist/v2/gen/core/utils.gen.js +87 -0
  65. package/dist/v2/gen/sdk.gen.d.ts +1168 -0
  66. package/dist/v2/gen/sdk.gen.js +2266 -0
  67. package/dist/v2/gen/types.gen.d.ts +4178 -0
  68. package/dist/v2/gen/types.gen.js +2 -0
  69. package/dist/v2/index.d.ts +10 -0
  70. package/dist/v2/index.js +16 -0
  71. package/dist/v2/server.d.ts +23 -0
  72. package/dist/v2/server.js +94 -0
  73. package/package.json +73 -0
@@ -0,0 +1,1168 @@
1
+ import { type Client, type Options as Options2, type TDataShape } from "./client/index.js";
2
+ import type { AgentPartInput, AppAgentsResponses, AppLogErrors, AppLogResponses, AppSkillsResponses, Auth as Auth3, AuthRemoveErrors, AuthRemoveResponses, AuthSetErrors, AuthSetResponses, CommandListResponses, Config as Config3, ConfigGetResponses, ConfigProvidersResponses, ConfigUpdateErrors, ConfigUpdateResponses, EventSubscribeResponses, EventTuiCommandExecute, EventTuiPromptAppend, EventTuiSessionSelect, EventTuiToastShow, ExperimentalResourceListResponses, ExperimentalSessionListResponses, ExperimentalWorkspaceCreateErrors, ExperimentalWorkspaceCreateResponses, ExperimentalWorkspaceListResponses, ExperimentalWorkspaceRemoveErrors, ExperimentalWorkspaceRemoveResponses, FileListResponses, FilePartInput, FilePartSource, FileReadResponses, FileStatusResponses, FindFilesResponses, FindSymbolsResponses, FindTextResponses, FormatterStatusResponses, GlobalConfigGetResponses, GlobalConfigUpdateErrors, GlobalConfigUpdateResponses, GlobalDisposeResponses, GlobalEventResponses, GlobalHealthResponses, InstanceDisposeResponses, LspStatusResponses, McpAddErrors, McpAddResponses, McpAuthAuthenticateErrors, McpAuthAuthenticateResponses, McpAuthCallbackErrors, McpAuthCallbackResponses, McpAuthRemoveErrors, McpAuthRemoveResponses, McpAuthStartErrors, McpAuthStartResponses, McpConnectResponses, McpDisconnectResponses, McpLocalConfig, McpRemoteConfig, McpStatusResponses, OutputFormat, Part as Part2, PartDeleteErrors, PartDeleteResponses, PartUpdateErrors, PartUpdateResponses, PathGetResponses, PermissionListResponses, PermissionReplyErrors, PermissionReplyResponses, PermissionRespondErrors, PermissionRespondResponses, PermissionRuleset, ProjectCurrentResponses, ProjectListResponses, ProjectUpdateErrors, ProjectUpdateResponses, ProviderAuthResponses, ProviderListResponses, ProviderOauthAuthorizeErrors, ProviderOauthAuthorizeResponses, ProviderOauthCallbackErrors, ProviderOauthCallbackResponses, PtyConnectErrors, PtyConnectResponses, PtyCreateErrors, PtyCreateResponses, PtyGetErrors, PtyGetResponses, PtyListResponses, PtyRemoveErrors, PtyRemoveResponses, PtyUpdateErrors, PtyUpdateResponses, QuestionAnswer, QuestionListResponses, QuestionRejectErrors, QuestionRejectResponses, QuestionReplyErrors, QuestionReplyResponses, SessionAbortErrors, SessionAbortResponses, SessionChildrenErrors, SessionChildrenResponses, SessionCommandErrors, SessionCommandResponses, SessionCreateErrors, SessionCreateResponses, SessionDeleteErrors, SessionDeleteMessageErrors, SessionDeleteMessageResponses, SessionDeleteResponses, SessionDiffResponses, SessionForkResponses, SessionGetErrors, SessionGetResponses, SessionInitErrors, SessionInitResponses, SessionListResponses, SessionMessageErrors, SessionMessageResponses, SessionMessagesErrors, SessionMessagesResponses, SessionPromptAsyncErrors, SessionPromptAsyncResponses, SessionPromptErrors, SessionPromptResponses, SessionRevertErrors, SessionRevertResponses, SessionShareErrors, SessionShareResponses, SessionShellErrors, SessionShellResponses, SessionStatusErrors, SessionStatusResponses, SessionSummarizeErrors, SessionSummarizeResponses, SessionTodoErrors, SessionTodoResponses, SessionUnrevertErrors, SessionUnrevertResponses, SessionUnshareErrors, SessionUnshareResponses, SessionUpdateErrors, SessionUpdateResponses, SubtaskPartInput, TextPartInput, ToolIdsErrors, ToolIdsResponses, ToolListErrors, ToolListResponses, TuiAppendPromptErrors, TuiAppendPromptResponses, TuiClearPromptResponses, TuiControlNextResponses, TuiControlResponseResponses, TuiExecuteCommandErrors, TuiExecuteCommandResponses, TuiOpenHelpResponses, TuiOpenModelsResponses, TuiOpenSessionsResponses, TuiOpenThemesResponses, TuiPublishErrors, TuiPublishResponses, TuiSelectSessionErrors, TuiSelectSessionResponses, TuiShowToastResponses, TuiSubmitPromptResponses, VcsGetResponses, WorktreeCreateErrors, WorktreeCreateInput, WorktreeCreateResponses, WorktreeListResponses, WorktreeRemoveErrors, WorktreeRemoveInput, WorktreeRemoveResponses, WorktreeResetErrors, WorktreeResetInput, WorktreeResetResponses } from "./types.gen.js";
3
+ export type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {
4
+ /**
5
+ * You can provide a client instance returned by `createClient()` instead of
6
+ * individual options. This might be also useful if you want to implement a
7
+ * custom client.
8
+ */
9
+ client?: Client;
10
+ /**
11
+ * You can pass arbitrary values through the `meta` object. This can be
12
+ * used to access values that aren't defined as part of the SDK function.
13
+ */
14
+ meta?: Record<string, unknown>;
15
+ };
16
+ declare class HeyApiClient {
17
+ protected client: Client;
18
+ constructor(args?: {
19
+ client?: Client;
20
+ });
21
+ }
22
+ declare class HeyApiRegistry<T> {
23
+ private readonly defaultKey;
24
+ private readonly instances;
25
+ get(key?: string): T;
26
+ set(value: T, key?: string): void;
27
+ }
28
+ export declare class Config extends HeyApiClient {
29
+ /**
30
+ * Get global configuration
31
+ *
32
+ * Retrieve the current global OpenCode configuration settings and preferences.
33
+ */
34
+ get<ThrowOnError extends boolean = false>(options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<GlobalConfigGetResponses, unknown, ThrowOnError, "fields">;
35
+ /**
36
+ * Update global configuration
37
+ *
38
+ * Update global OpenCode configuration settings and preferences.
39
+ */
40
+ update<ThrowOnError extends boolean = false>(parameters?: {
41
+ config?: Config3;
42
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<GlobalConfigUpdateResponses, GlobalConfigUpdateErrors, ThrowOnError, "fields">;
43
+ }
44
+ export declare class Global extends HeyApiClient {
45
+ /**
46
+ * Get health
47
+ *
48
+ * Get health information about the OpenCode server.
49
+ */
50
+ health<ThrowOnError extends boolean = false>(options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<GlobalHealthResponses, unknown, ThrowOnError, "fields">;
51
+ /**
52
+ * Get global events
53
+ *
54
+ * Subscribe to global events from the OpenCode system using server-sent events.
55
+ */
56
+ event<ThrowOnError extends boolean = false>(options?: Options<never, ThrowOnError>): Promise<import("./core/serverSentEvents.gen.js").ServerSentEventsResult<GlobalEventResponses, unknown>>;
57
+ /**
58
+ * Dispose instance
59
+ *
60
+ * Clean up and dispose all OpenCode instances, releasing all resources.
61
+ */
62
+ dispose<ThrowOnError extends boolean = false>(options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<GlobalDisposeResponses, unknown, ThrowOnError, "fields">;
63
+ private _config?;
64
+ get config(): Config;
65
+ }
66
+ export declare class Auth extends HeyApiClient {
67
+ /**
68
+ * Remove auth credentials
69
+ *
70
+ * Remove authentication credentials
71
+ */
72
+ remove<ThrowOnError extends boolean = false>(parameters: {
73
+ providerID: string;
74
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<AuthRemoveResponses, AuthRemoveErrors, ThrowOnError, "fields">;
75
+ /**
76
+ * Set auth credentials
77
+ *
78
+ * Set authentication credentials
79
+ */
80
+ set<ThrowOnError extends boolean = false>(parameters: {
81
+ providerID: string;
82
+ auth?: Auth3;
83
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<AuthSetResponses, AuthSetErrors, ThrowOnError, "fields">;
84
+ }
85
+ export declare class Project extends HeyApiClient {
86
+ /**
87
+ * List all projects
88
+ *
89
+ * Get a list of projects that have been opened with OpenCode.
90
+ */
91
+ list<ThrowOnError extends boolean = false>(parameters?: {
92
+ directory?: string;
93
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<ProjectListResponses, unknown, ThrowOnError, "fields">;
94
+ /**
95
+ * Get current project
96
+ *
97
+ * Retrieve the currently active project that OpenCode is working with.
98
+ */
99
+ current<ThrowOnError extends boolean = false>(parameters?: {
100
+ directory?: string;
101
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<ProjectCurrentResponses, unknown, ThrowOnError, "fields">;
102
+ /**
103
+ * Update project
104
+ *
105
+ * Update project properties such as name, icon, and commands.
106
+ */
107
+ update<ThrowOnError extends boolean = false>(parameters: {
108
+ projectID: string;
109
+ directory?: string;
110
+ name?: string;
111
+ icon?: {
112
+ url?: string;
113
+ override?: string;
114
+ color?: string;
115
+ };
116
+ commands?: {
117
+ /**
118
+ * Startup script to run when creating a new workspace (worktree)
119
+ */
120
+ start?: string;
121
+ };
122
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<ProjectUpdateResponses, ProjectUpdateErrors, ThrowOnError, "fields">;
123
+ }
124
+ export declare class Pty extends HeyApiClient {
125
+ /**
126
+ * List PTY sessions
127
+ *
128
+ * Get a list of all active pseudo-terminal (PTY) sessions managed by OpenCode.
129
+ */
130
+ list<ThrowOnError extends boolean = false>(parameters?: {
131
+ directory?: string;
132
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<PtyListResponses, unknown, ThrowOnError, "fields">;
133
+ /**
134
+ * Create PTY session
135
+ *
136
+ * Create a new pseudo-terminal (PTY) session for running shell commands and processes.
137
+ */
138
+ create<ThrowOnError extends boolean = false>(parameters?: {
139
+ directory?: string;
140
+ command?: string;
141
+ args?: Array<string>;
142
+ cwd?: string;
143
+ title?: string;
144
+ env?: {
145
+ [key: string]: string;
146
+ };
147
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<PtyCreateResponses, PtyCreateErrors, ThrowOnError, "fields">;
148
+ /**
149
+ * Remove PTY session
150
+ *
151
+ * Remove and terminate a specific pseudo-terminal (PTY) session.
152
+ */
153
+ remove<ThrowOnError extends boolean = false>(parameters: {
154
+ ptyID: string;
155
+ directory?: string;
156
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<PtyRemoveResponses, PtyRemoveErrors, ThrowOnError, "fields">;
157
+ /**
158
+ * Get PTY session
159
+ *
160
+ * Retrieve detailed information about a specific pseudo-terminal (PTY) session.
161
+ */
162
+ get<ThrowOnError extends boolean = false>(parameters: {
163
+ ptyID: string;
164
+ directory?: string;
165
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<PtyGetResponses, PtyGetErrors, ThrowOnError, "fields">;
166
+ /**
167
+ * Update PTY session
168
+ *
169
+ * Update properties of an existing pseudo-terminal (PTY) session.
170
+ */
171
+ update<ThrowOnError extends boolean = false>(parameters: {
172
+ ptyID: string;
173
+ directory?: string;
174
+ title?: string;
175
+ size?: {
176
+ rows: number;
177
+ cols: number;
178
+ };
179
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<PtyUpdateResponses, PtyUpdateErrors, ThrowOnError, "fields">;
180
+ /**
181
+ * Connect to PTY session
182
+ *
183
+ * Establish a WebSocket connection to interact with a pseudo-terminal (PTY) session in real-time.
184
+ */
185
+ connect<ThrowOnError extends boolean = false>(parameters: {
186
+ ptyID: string;
187
+ directory?: string;
188
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<PtyConnectResponses, PtyConnectErrors, ThrowOnError, "fields">;
189
+ }
190
+ export declare class Config2 extends HeyApiClient {
191
+ /**
192
+ * Get configuration
193
+ *
194
+ * Retrieve the current OpenCode configuration settings and preferences.
195
+ */
196
+ get<ThrowOnError extends boolean = false>(parameters?: {
197
+ directory?: string;
198
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<ConfigGetResponses, unknown, ThrowOnError, "fields">;
199
+ /**
200
+ * Update configuration
201
+ *
202
+ * Update OpenCode configuration settings and preferences.
203
+ */
204
+ update<ThrowOnError extends boolean = false>(parameters?: {
205
+ directory?: string;
206
+ config?: Config3;
207
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<ConfigUpdateResponses, ConfigUpdateErrors, ThrowOnError, "fields">;
208
+ /**
209
+ * List config providers
210
+ *
211
+ * Get a list of all configured AI providers and their default models.
212
+ */
213
+ providers<ThrowOnError extends boolean = false>(parameters?: {
214
+ directory?: string;
215
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<ConfigProvidersResponses, unknown, ThrowOnError, "fields">;
216
+ }
217
+ export declare class Tool extends HeyApiClient {
218
+ /**
219
+ * List tool IDs
220
+ *
221
+ * Get a list of all available tool IDs, including both built-in tools and dynamically registered tools.
222
+ */
223
+ ids<ThrowOnError extends boolean = false>(parameters?: {
224
+ directory?: string;
225
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<ToolIdsResponses, ToolIdsErrors, ThrowOnError, "fields">;
226
+ /**
227
+ * List tools
228
+ *
229
+ * Get a list of available tools with their JSON schema parameters for a specific provider and model combination.
230
+ */
231
+ list<ThrowOnError extends boolean = false>(parameters: {
232
+ directory?: string;
233
+ provider: string;
234
+ model: string;
235
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<ToolListResponses, ToolListErrors, ThrowOnError, "fields">;
236
+ }
237
+ export declare class Worktree extends HeyApiClient {
238
+ /**
239
+ * Remove worktree
240
+ *
241
+ * Remove a git worktree and delete its branch.
242
+ */
243
+ remove<ThrowOnError extends boolean = false>(parameters?: {
244
+ directory?: string;
245
+ worktreeRemoveInput?: WorktreeRemoveInput;
246
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<WorktreeRemoveResponses, WorktreeRemoveErrors, ThrowOnError, "fields">;
247
+ /**
248
+ * List worktrees
249
+ *
250
+ * List all sandbox worktrees for the current project.
251
+ */
252
+ list<ThrowOnError extends boolean = false>(parameters?: {
253
+ directory?: string;
254
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<WorktreeListResponses, unknown, ThrowOnError, "fields">;
255
+ /**
256
+ * Create worktree
257
+ *
258
+ * Create a new git worktree for the current project and run any configured startup scripts.
259
+ */
260
+ create<ThrowOnError extends boolean = false>(parameters?: {
261
+ directory?: string;
262
+ worktreeCreateInput?: WorktreeCreateInput;
263
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<WorktreeCreateResponses, WorktreeCreateErrors, ThrowOnError, "fields">;
264
+ /**
265
+ * Reset worktree
266
+ *
267
+ * Reset a worktree branch to the primary default branch.
268
+ */
269
+ reset<ThrowOnError extends boolean = false>(parameters?: {
270
+ directory?: string;
271
+ worktreeResetInput?: WorktreeResetInput;
272
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<WorktreeResetResponses, WorktreeResetErrors, ThrowOnError, "fields">;
273
+ }
274
+ export declare class Workspace extends HeyApiClient {
275
+ /**
276
+ * Remove workspace
277
+ *
278
+ * Remove an existing workspace.
279
+ */
280
+ remove<ThrowOnError extends boolean = false>(parameters: {
281
+ id: string;
282
+ directory?: string;
283
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<ExperimentalWorkspaceRemoveResponses, ExperimentalWorkspaceRemoveErrors, ThrowOnError, "fields">;
284
+ /**
285
+ * Create workspace
286
+ *
287
+ * Create a workspace for the current project.
288
+ */
289
+ create<ThrowOnError extends boolean = false>(parameters: {
290
+ id: string;
291
+ directory?: string;
292
+ branch?: string | null;
293
+ config?: {
294
+ directory: string;
295
+ type: "worktree";
296
+ };
297
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<ExperimentalWorkspaceCreateResponses, ExperimentalWorkspaceCreateErrors, ThrowOnError, "fields">;
298
+ /**
299
+ * List workspaces
300
+ *
301
+ * List all workspaces.
302
+ */
303
+ list<ThrowOnError extends boolean = false>(parameters?: {
304
+ directory?: string;
305
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<ExperimentalWorkspaceListResponses, unknown, ThrowOnError, "fields">;
306
+ }
307
+ export declare class Session extends HeyApiClient {
308
+ /**
309
+ * List sessions
310
+ *
311
+ * Get a list of all OpenCode sessions across projects, sorted by most recently updated. Archived sessions are excluded by default.
312
+ */
313
+ list<ThrowOnError extends boolean = false>(parameters?: {
314
+ directory?: string;
315
+ roots?: boolean;
316
+ start?: number;
317
+ cursor?: number;
318
+ search?: string;
319
+ limit?: number;
320
+ archived?: boolean;
321
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<ExperimentalSessionListResponses, unknown, ThrowOnError, "fields">;
322
+ }
323
+ export declare class Resource extends HeyApiClient {
324
+ /**
325
+ * Get MCP resources
326
+ *
327
+ * Get all available MCP resources from connected servers. Optionally filter by name.
328
+ */
329
+ list<ThrowOnError extends boolean = false>(parameters?: {
330
+ directory?: string;
331
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<ExperimentalResourceListResponses, unknown, ThrowOnError, "fields">;
332
+ }
333
+ export declare class Experimental extends HeyApiClient {
334
+ private _workspace?;
335
+ get workspace(): Workspace;
336
+ private _session?;
337
+ get session(): Session;
338
+ private _resource?;
339
+ get resource(): Resource;
340
+ }
341
+ export declare class Session2 extends HeyApiClient {
342
+ /**
343
+ * List sessions
344
+ *
345
+ * Get a list of all OpenCode sessions, sorted by most recently updated.
346
+ */
347
+ list<ThrowOnError extends boolean = false>(parameters?: {
348
+ directory?: string;
349
+ roots?: boolean;
350
+ start?: number;
351
+ search?: string;
352
+ limit?: number;
353
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<SessionListResponses, unknown, ThrowOnError, "fields">;
354
+ /**
355
+ * Create session
356
+ *
357
+ * Create a new OpenCode session for interacting with AI assistants and managing conversations.
358
+ */
359
+ create<ThrowOnError extends boolean = false>(parameters?: {
360
+ directory?: string;
361
+ parentID?: string;
362
+ title?: string;
363
+ permission?: PermissionRuleset;
364
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<SessionCreateResponses, SessionCreateErrors, ThrowOnError, "fields">;
365
+ /**
366
+ * Get session status
367
+ *
368
+ * Retrieve the current status of all sessions, including active, idle, and completed states.
369
+ */
370
+ status<ThrowOnError extends boolean = false>(parameters?: {
371
+ directory?: string;
372
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<SessionStatusResponses, SessionStatusErrors, ThrowOnError, "fields">;
373
+ /**
374
+ * Delete session
375
+ *
376
+ * Delete a session and permanently remove all associated data, including messages and history.
377
+ */
378
+ delete<ThrowOnError extends boolean = false>(parameters: {
379
+ sessionID: string;
380
+ directory?: string;
381
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<SessionDeleteResponses, SessionDeleteErrors, ThrowOnError, "fields">;
382
+ /**
383
+ * Get session
384
+ *
385
+ * Retrieve detailed information about a specific OpenCode session.
386
+ */
387
+ get<ThrowOnError extends boolean = false>(parameters: {
388
+ sessionID: string;
389
+ directory?: string;
390
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<SessionGetResponses, SessionGetErrors, ThrowOnError, "fields">;
391
+ /**
392
+ * Update session
393
+ *
394
+ * Update properties of an existing session, such as title or other metadata.
395
+ */
396
+ update<ThrowOnError extends boolean = false>(parameters: {
397
+ sessionID: string;
398
+ directory?: string;
399
+ title?: string;
400
+ time?: {
401
+ archived?: number;
402
+ };
403
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<SessionUpdateResponses, SessionUpdateErrors, ThrowOnError, "fields">;
404
+ /**
405
+ * Get session children
406
+ *
407
+ * Retrieve all child sessions that were forked from the specified parent session.
408
+ */
409
+ children<ThrowOnError extends boolean = false>(parameters: {
410
+ sessionID: string;
411
+ directory?: string;
412
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<SessionChildrenResponses, SessionChildrenErrors, ThrowOnError, "fields">;
413
+ /**
414
+ * Get session todos
415
+ *
416
+ * Retrieve the todo list associated with a specific session, showing tasks and action items.
417
+ */
418
+ todo<ThrowOnError extends boolean = false>(parameters: {
419
+ sessionID: string;
420
+ directory?: string;
421
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<SessionTodoResponses, SessionTodoErrors, ThrowOnError, "fields">;
422
+ /**
423
+ * Initialize session
424
+ *
425
+ * Analyze the current application and create an AGENTS.md file with project-specific agent configurations.
426
+ */
427
+ init<ThrowOnError extends boolean = false>(parameters: {
428
+ sessionID: string;
429
+ directory?: string;
430
+ modelID?: string;
431
+ providerID?: string;
432
+ messageID?: string;
433
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<SessionInitResponses, SessionInitErrors, ThrowOnError, "fields">;
434
+ /**
435
+ * Fork session
436
+ *
437
+ * Create a new session by forking an existing session at a specific message point.
438
+ */
439
+ fork<ThrowOnError extends boolean = false>(parameters: {
440
+ sessionID: string;
441
+ directory?: string;
442
+ messageID?: string;
443
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<SessionForkResponses, unknown, ThrowOnError, "fields">;
444
+ /**
445
+ * Abort session
446
+ *
447
+ * Abort an active session and stop any ongoing AI processing or command execution.
448
+ */
449
+ abort<ThrowOnError extends boolean = false>(parameters: {
450
+ sessionID: string;
451
+ directory?: string;
452
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<SessionAbortResponses, SessionAbortErrors, ThrowOnError, "fields">;
453
+ /**
454
+ * Unshare session
455
+ *
456
+ * Remove the shareable link for a session, making it private again.
457
+ */
458
+ unshare<ThrowOnError extends boolean = false>(parameters: {
459
+ sessionID: string;
460
+ directory?: string;
461
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<SessionUnshareResponses, SessionUnshareErrors, ThrowOnError, "fields">;
462
+ /**
463
+ * Share session
464
+ *
465
+ * Create a shareable link for a session, allowing others to view the conversation.
466
+ */
467
+ share<ThrowOnError extends boolean = false>(parameters: {
468
+ sessionID: string;
469
+ directory?: string;
470
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<SessionShareResponses, SessionShareErrors, ThrowOnError, "fields">;
471
+ /**
472
+ * Get message diff
473
+ *
474
+ * Get the file changes (diff) that resulted from a specific user message in the session.
475
+ */
476
+ diff<ThrowOnError extends boolean = false>(parameters: {
477
+ sessionID: string;
478
+ directory?: string;
479
+ messageID?: string;
480
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<SessionDiffResponses, unknown, ThrowOnError, "fields">;
481
+ /**
482
+ * Summarize session
483
+ *
484
+ * Generate a concise summary of the session using AI compaction to preserve key information.
485
+ */
486
+ summarize<ThrowOnError extends boolean = false>(parameters: {
487
+ sessionID: string;
488
+ directory?: string;
489
+ providerID?: string;
490
+ modelID?: string;
491
+ auto?: boolean;
492
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<SessionSummarizeResponses, SessionSummarizeErrors, ThrowOnError, "fields">;
493
+ /**
494
+ * Get session messages
495
+ *
496
+ * Retrieve all messages in a session, including user prompts and AI responses.
497
+ */
498
+ messages<ThrowOnError extends boolean = false>(parameters: {
499
+ sessionID: string;
500
+ directory?: string;
501
+ limit?: number;
502
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<SessionMessagesResponses, SessionMessagesErrors, ThrowOnError, "fields">;
503
+ /**
504
+ * Send message
505
+ *
506
+ * Create and send a new message to a session, streaming the AI response.
507
+ */
508
+ prompt<ThrowOnError extends boolean = false>(parameters: {
509
+ sessionID: string;
510
+ directory?: string;
511
+ messageID?: string;
512
+ model?: {
513
+ providerID: string;
514
+ modelID: string;
515
+ };
516
+ agent?: string;
517
+ noReply?: boolean;
518
+ tools?: {
519
+ [key: string]: boolean;
520
+ };
521
+ format?: OutputFormat;
522
+ system?: string;
523
+ variant?: string;
524
+ parts?: Array<TextPartInput | FilePartInput | AgentPartInput | SubtaskPartInput>;
525
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<SessionPromptResponses, SessionPromptErrors, ThrowOnError, "fields">;
526
+ /**
527
+ * Delete message
528
+ *
529
+ * Permanently delete a specific message (and all of its parts) from a session. This does not revert any file changes that may have been made while processing the message.
530
+ */
531
+ deleteMessage<ThrowOnError extends boolean = false>(parameters: {
532
+ sessionID: string;
533
+ messageID: string;
534
+ directory?: string;
535
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<SessionDeleteMessageResponses, SessionDeleteMessageErrors, ThrowOnError, "fields">;
536
+ /**
537
+ * Get message
538
+ *
539
+ * Retrieve a specific message from a session by its message ID.
540
+ */
541
+ message<ThrowOnError extends boolean = false>(parameters: {
542
+ sessionID: string;
543
+ messageID: string;
544
+ directory?: string;
545
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<SessionMessageResponses, SessionMessageErrors, ThrowOnError, "fields">;
546
+ /**
547
+ * Send async message
548
+ *
549
+ * Create and send a new message to a session asynchronously, starting the session if needed and returning immediately.
550
+ */
551
+ promptAsync<ThrowOnError extends boolean = false>(parameters: {
552
+ sessionID: string;
553
+ directory?: string;
554
+ messageID?: string;
555
+ model?: {
556
+ providerID: string;
557
+ modelID: string;
558
+ };
559
+ agent?: string;
560
+ noReply?: boolean;
561
+ tools?: {
562
+ [key: string]: boolean;
563
+ };
564
+ format?: OutputFormat;
565
+ system?: string;
566
+ variant?: string;
567
+ parts?: Array<TextPartInput | FilePartInput | AgentPartInput | SubtaskPartInput>;
568
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<SessionPromptAsyncResponses, SessionPromptAsyncErrors, ThrowOnError, "fields">;
569
+ /**
570
+ * Send command
571
+ *
572
+ * Send a new command to a session for execution by the AI assistant.
573
+ */
574
+ command<ThrowOnError extends boolean = false>(parameters: {
575
+ sessionID: string;
576
+ directory?: string;
577
+ messageID?: string;
578
+ agent?: string;
579
+ model?: string;
580
+ arguments?: string;
581
+ command?: string;
582
+ variant?: string;
583
+ parts?: Array<{
584
+ id?: string;
585
+ type: "file";
586
+ mime: string;
587
+ filename?: string;
588
+ url: string;
589
+ source?: FilePartSource;
590
+ }>;
591
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<SessionCommandResponses, SessionCommandErrors, ThrowOnError, "fields">;
592
+ /**
593
+ * Run shell command
594
+ *
595
+ * Execute a shell command within the session context and return the AI's response.
596
+ */
597
+ shell<ThrowOnError extends boolean = false>(parameters: {
598
+ sessionID: string;
599
+ directory?: string;
600
+ agent?: string;
601
+ model?: {
602
+ providerID: string;
603
+ modelID: string;
604
+ };
605
+ command?: string;
606
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<SessionShellResponses, SessionShellErrors, ThrowOnError, "fields">;
607
+ /**
608
+ * Revert message
609
+ *
610
+ * Revert a specific message in a session, undoing its effects and restoring the previous state.
611
+ */
612
+ revert<ThrowOnError extends boolean = false>(parameters: {
613
+ sessionID: string;
614
+ directory?: string;
615
+ messageID?: string;
616
+ partID?: string;
617
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<SessionRevertResponses, SessionRevertErrors, ThrowOnError, "fields">;
618
+ /**
619
+ * Restore reverted messages
620
+ *
621
+ * Restore all previously reverted messages in a session.
622
+ */
623
+ unrevert<ThrowOnError extends boolean = false>(parameters: {
624
+ sessionID: string;
625
+ directory?: string;
626
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<SessionUnrevertResponses, SessionUnrevertErrors, ThrowOnError, "fields">;
627
+ }
628
+ export declare class Part extends HeyApiClient {
629
+ /**
630
+ * Delete a part from a message
631
+ */
632
+ delete<ThrowOnError extends boolean = false>(parameters: {
633
+ sessionID: string;
634
+ messageID: string;
635
+ partID: string;
636
+ directory?: string;
637
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<PartDeleteResponses, PartDeleteErrors, ThrowOnError, "fields">;
638
+ /**
639
+ * Update a part in a message
640
+ */
641
+ update<ThrowOnError extends boolean = false>(parameters: {
642
+ sessionID: string;
643
+ messageID: string;
644
+ partID: string;
645
+ directory?: string;
646
+ part?: Part2;
647
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<PartUpdateResponses, PartUpdateErrors, ThrowOnError, "fields">;
648
+ }
649
+ export declare class Permission extends HeyApiClient {
650
+ /**
651
+ * Respond to permission
652
+ *
653
+ * Approve or deny a permission request from the AI assistant.
654
+ *
655
+ * @deprecated
656
+ */
657
+ respond<ThrowOnError extends boolean = false>(parameters: {
658
+ sessionID: string;
659
+ permissionID: string;
660
+ directory?: string;
661
+ response?: "once" | "always" | "reject";
662
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<PermissionRespondResponses, PermissionRespondErrors, ThrowOnError, "fields">;
663
+ /**
664
+ * Respond to permission request
665
+ *
666
+ * Approve or deny a permission request from the AI assistant.
667
+ */
668
+ reply<ThrowOnError extends boolean = false>(parameters: {
669
+ requestID: string;
670
+ directory?: string;
671
+ reply?: "once" | "always" | "reject";
672
+ message?: string;
673
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<PermissionReplyResponses, PermissionReplyErrors, ThrowOnError, "fields">;
674
+ /**
675
+ * List pending permissions
676
+ *
677
+ * Get all pending permission requests across all sessions.
678
+ */
679
+ list<ThrowOnError extends boolean = false>(parameters?: {
680
+ directory?: string;
681
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<PermissionListResponses, unknown, ThrowOnError, "fields">;
682
+ }
683
+ export declare class Question extends HeyApiClient {
684
+ /**
685
+ * List pending questions
686
+ *
687
+ * Get all pending question requests across all sessions.
688
+ */
689
+ list<ThrowOnError extends boolean = false>(parameters?: {
690
+ directory?: string;
691
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<QuestionListResponses, unknown, ThrowOnError, "fields">;
692
+ /**
693
+ * Reply to question request
694
+ *
695
+ * Provide answers to a question request from the AI assistant.
696
+ */
697
+ reply<ThrowOnError extends boolean = false>(parameters: {
698
+ requestID: string;
699
+ directory?: string;
700
+ answers?: Array<QuestionAnswer>;
701
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<QuestionReplyResponses, QuestionReplyErrors, ThrowOnError, "fields">;
702
+ /**
703
+ * Reject question request
704
+ *
705
+ * Reject a question request from the AI assistant.
706
+ */
707
+ reject<ThrowOnError extends boolean = false>(parameters: {
708
+ requestID: string;
709
+ directory?: string;
710
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<QuestionRejectResponses, QuestionRejectErrors, ThrowOnError, "fields">;
711
+ }
712
+ export declare class Oauth extends HeyApiClient {
713
+ /**
714
+ * OAuth authorize
715
+ *
716
+ * Initiate OAuth authorization for a specific AI provider to get an authorization URL.
717
+ */
718
+ authorize<ThrowOnError extends boolean = false>(parameters: {
719
+ providerID: string;
720
+ directory?: string;
721
+ method?: number;
722
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<ProviderOauthAuthorizeResponses, ProviderOauthAuthorizeErrors, ThrowOnError, "fields">;
723
+ /**
724
+ * OAuth callback
725
+ *
726
+ * Handle the OAuth callback from a provider after user authorization.
727
+ */
728
+ callback<ThrowOnError extends boolean = false>(parameters: {
729
+ providerID: string;
730
+ directory?: string;
731
+ method?: number;
732
+ code?: string;
733
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<ProviderOauthCallbackResponses, ProviderOauthCallbackErrors, ThrowOnError, "fields">;
734
+ }
735
+ export declare class Provider extends HeyApiClient {
736
+ /**
737
+ * List providers
738
+ *
739
+ * Get a list of all available AI providers, including both available and connected ones.
740
+ */
741
+ list<ThrowOnError extends boolean = false>(parameters?: {
742
+ directory?: string;
743
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<ProviderListResponses, unknown, ThrowOnError, "fields">;
744
+ /**
745
+ * Get provider auth methods
746
+ *
747
+ * Retrieve available authentication methods for all AI providers.
748
+ */
749
+ auth<ThrowOnError extends boolean = false>(parameters?: {
750
+ directory?: string;
751
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<ProviderAuthResponses, unknown, ThrowOnError, "fields">;
752
+ private _oauth?;
753
+ get oauth(): Oauth;
754
+ }
755
+ export declare class Find extends HeyApiClient {
756
+ /**
757
+ * Find text
758
+ *
759
+ * Search for text patterns across files in the project using ripgrep.
760
+ */
761
+ text<ThrowOnError extends boolean = false>(parameters: {
762
+ directory?: string;
763
+ pattern: string;
764
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<FindTextResponses, unknown, ThrowOnError, "fields">;
765
+ /**
766
+ * Find files
767
+ *
768
+ * Search for files or directories by name or pattern in the project directory.
769
+ */
770
+ files<ThrowOnError extends boolean = false>(parameters: {
771
+ directory?: string;
772
+ query: string;
773
+ dirs?: "true" | "false";
774
+ type?: "file" | "directory";
775
+ limit?: number;
776
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<FindFilesResponses, unknown, ThrowOnError, "fields">;
777
+ /**
778
+ * Find symbols
779
+ *
780
+ * Search for workspace symbols like functions, classes, and variables using LSP.
781
+ */
782
+ symbols<ThrowOnError extends boolean = false>(parameters: {
783
+ directory?: string;
784
+ query: string;
785
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<FindSymbolsResponses, unknown, ThrowOnError, "fields">;
786
+ }
787
+ export declare class File extends HeyApiClient {
788
+ /**
789
+ * List files
790
+ *
791
+ * List files and directories in a specified path.
792
+ */
793
+ list<ThrowOnError extends boolean = false>(parameters: {
794
+ directory?: string;
795
+ path: string;
796
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<FileListResponses, unknown, ThrowOnError, "fields">;
797
+ /**
798
+ * Read file
799
+ *
800
+ * Read the content of a specified file.
801
+ */
802
+ read<ThrowOnError extends boolean = false>(parameters: {
803
+ directory?: string;
804
+ path: string;
805
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<FileReadResponses, unknown, ThrowOnError, "fields">;
806
+ /**
807
+ * Get file status
808
+ *
809
+ * Get the git status of all files in the project.
810
+ */
811
+ status<ThrowOnError extends boolean = false>(parameters?: {
812
+ directory?: string;
813
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<FileStatusResponses, unknown, ThrowOnError, "fields">;
814
+ }
815
+ export declare class Auth2 extends HeyApiClient {
816
+ /**
817
+ * Remove MCP OAuth
818
+ *
819
+ * Remove OAuth credentials for an MCP server
820
+ */
821
+ remove<ThrowOnError extends boolean = false>(parameters: {
822
+ name: string;
823
+ directory?: string;
824
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<McpAuthRemoveResponses, McpAuthRemoveErrors, ThrowOnError, "fields">;
825
+ /**
826
+ * Start MCP OAuth
827
+ *
828
+ * Start OAuth authentication flow for a Model Context Protocol (MCP) server.
829
+ */
830
+ start<ThrowOnError extends boolean = false>(parameters: {
831
+ name: string;
832
+ directory?: string;
833
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<McpAuthStartResponses, McpAuthStartErrors, ThrowOnError, "fields">;
834
+ /**
835
+ * Complete MCP OAuth
836
+ *
837
+ * Complete OAuth authentication for a Model Context Protocol (MCP) server using the authorization code.
838
+ */
839
+ callback<ThrowOnError extends boolean = false>(parameters: {
840
+ name: string;
841
+ directory?: string;
842
+ code?: string;
843
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<McpAuthCallbackResponses, McpAuthCallbackErrors, ThrowOnError, "fields">;
844
+ /**
845
+ * Authenticate MCP OAuth
846
+ *
847
+ * Start OAuth flow and wait for callback (opens browser)
848
+ */
849
+ authenticate<ThrowOnError extends boolean = false>(parameters: {
850
+ name: string;
851
+ directory?: string;
852
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<McpAuthAuthenticateResponses, McpAuthAuthenticateErrors, ThrowOnError, "fields">;
853
+ }
854
+ export declare class Mcp extends HeyApiClient {
855
+ /**
856
+ * Get MCP status
857
+ *
858
+ * Get the status of all Model Context Protocol (MCP) servers.
859
+ */
860
+ status<ThrowOnError extends boolean = false>(parameters?: {
861
+ directory?: string;
862
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<McpStatusResponses, unknown, ThrowOnError, "fields">;
863
+ /**
864
+ * Add MCP server
865
+ *
866
+ * Dynamically add a new Model Context Protocol (MCP) server to the system.
867
+ */
868
+ add<ThrowOnError extends boolean = false>(parameters?: {
869
+ directory?: string;
870
+ name?: string;
871
+ config?: McpLocalConfig | McpRemoteConfig;
872
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<McpAddResponses, McpAddErrors, ThrowOnError, "fields">;
873
+ /**
874
+ * Connect an MCP server
875
+ */
876
+ connect<ThrowOnError extends boolean = false>(parameters: {
877
+ name: string;
878
+ directory?: string;
879
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<McpConnectResponses, unknown, ThrowOnError, "fields">;
880
+ /**
881
+ * Disconnect an MCP server
882
+ */
883
+ disconnect<ThrowOnError extends boolean = false>(parameters: {
884
+ name: string;
885
+ directory?: string;
886
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<McpDisconnectResponses, unknown, ThrowOnError, "fields">;
887
+ private _auth?;
888
+ get auth(): Auth2;
889
+ }
890
+ export declare class Control extends HeyApiClient {
891
+ /**
892
+ * Get next TUI request
893
+ *
894
+ * Retrieve the next TUI (Terminal User Interface) request from the queue for processing.
895
+ */
896
+ next<ThrowOnError extends boolean = false>(parameters?: {
897
+ directory?: string;
898
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<TuiControlNextResponses, unknown, ThrowOnError, "fields">;
899
+ /**
900
+ * Submit TUI response
901
+ *
902
+ * Submit a response to the TUI request queue to complete a pending request.
903
+ */
904
+ response<ThrowOnError extends boolean = false>(parameters?: {
905
+ directory?: string;
906
+ body?: unknown;
907
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<TuiControlResponseResponses, unknown, ThrowOnError, "fields">;
908
+ }
909
+ export declare class Tui extends HeyApiClient {
910
+ /**
911
+ * Append TUI prompt
912
+ *
913
+ * Append prompt to the TUI
914
+ */
915
+ appendPrompt<ThrowOnError extends boolean = false>(parameters?: {
916
+ directory?: string;
917
+ text?: string;
918
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<TuiAppendPromptResponses, TuiAppendPromptErrors, ThrowOnError, "fields">;
919
+ /**
920
+ * Open help dialog
921
+ *
922
+ * Open the help dialog in the TUI to display user assistance information.
923
+ */
924
+ openHelp<ThrowOnError extends boolean = false>(parameters?: {
925
+ directory?: string;
926
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<TuiOpenHelpResponses, unknown, ThrowOnError, "fields">;
927
+ /**
928
+ * Open sessions dialog
929
+ *
930
+ * Open the session dialog
931
+ */
932
+ openSessions<ThrowOnError extends boolean = false>(parameters?: {
933
+ directory?: string;
934
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<TuiOpenSessionsResponses, unknown, ThrowOnError, "fields">;
935
+ /**
936
+ * Open themes dialog
937
+ *
938
+ * Open the theme dialog
939
+ */
940
+ openThemes<ThrowOnError extends boolean = false>(parameters?: {
941
+ directory?: string;
942
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<TuiOpenThemesResponses, unknown, ThrowOnError, "fields">;
943
+ /**
944
+ * Open models dialog
945
+ *
946
+ * Open the model dialog
947
+ */
948
+ openModels<ThrowOnError extends boolean = false>(parameters?: {
949
+ directory?: string;
950
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<TuiOpenModelsResponses, unknown, ThrowOnError, "fields">;
951
+ /**
952
+ * Submit TUI prompt
953
+ *
954
+ * Submit the prompt
955
+ */
956
+ submitPrompt<ThrowOnError extends boolean = false>(parameters?: {
957
+ directory?: string;
958
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<TuiSubmitPromptResponses, unknown, ThrowOnError, "fields">;
959
+ /**
960
+ * Clear TUI prompt
961
+ *
962
+ * Clear the prompt
963
+ */
964
+ clearPrompt<ThrowOnError extends boolean = false>(parameters?: {
965
+ directory?: string;
966
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<TuiClearPromptResponses, unknown, ThrowOnError, "fields">;
967
+ /**
968
+ * Execute TUI command
969
+ *
970
+ * Execute a TUI command (e.g. agent_cycle)
971
+ */
972
+ executeCommand<ThrowOnError extends boolean = false>(parameters?: {
973
+ directory?: string;
974
+ command?: string;
975
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<TuiExecuteCommandResponses, TuiExecuteCommandErrors, ThrowOnError, "fields">;
976
+ /**
977
+ * Show TUI toast
978
+ *
979
+ * Show a toast notification in the TUI
980
+ */
981
+ showToast<ThrowOnError extends boolean = false>(parameters?: {
982
+ directory?: string;
983
+ title?: string;
984
+ message?: string;
985
+ variant?: "info" | "success" | "warning" | "error";
986
+ duration?: number;
987
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<TuiShowToastResponses, unknown, ThrowOnError, "fields">;
988
+ /**
989
+ * Publish TUI event
990
+ *
991
+ * Publish a TUI event
992
+ */
993
+ publish<ThrowOnError extends boolean = false>(parameters?: {
994
+ directory?: string;
995
+ body?: EventTuiPromptAppend | EventTuiCommandExecute | EventTuiToastShow | EventTuiSessionSelect;
996
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<TuiPublishResponses, TuiPublishErrors, ThrowOnError, "fields">;
997
+ /**
998
+ * Select session
999
+ *
1000
+ * Navigate the TUI to display the specified session.
1001
+ */
1002
+ selectSession<ThrowOnError extends boolean = false>(parameters?: {
1003
+ directory?: string;
1004
+ sessionID?: string;
1005
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<TuiSelectSessionResponses, TuiSelectSessionErrors, ThrowOnError, "fields">;
1006
+ private _control?;
1007
+ get control(): Control;
1008
+ }
1009
+ export declare class Instance extends HeyApiClient {
1010
+ /**
1011
+ * Dispose instance
1012
+ *
1013
+ * Clean up and dispose the current OpenCode instance, releasing all resources.
1014
+ */
1015
+ dispose<ThrowOnError extends boolean = false>(parameters?: {
1016
+ directory?: string;
1017
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<InstanceDisposeResponses, unknown, ThrowOnError, "fields">;
1018
+ }
1019
+ export declare class Path extends HeyApiClient {
1020
+ /**
1021
+ * Get paths
1022
+ *
1023
+ * Retrieve the current working directory and related path information for the OpenCode instance.
1024
+ */
1025
+ get<ThrowOnError extends boolean = false>(parameters?: {
1026
+ directory?: string;
1027
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<PathGetResponses, unknown, ThrowOnError, "fields">;
1028
+ }
1029
+ export declare class Vcs extends HeyApiClient {
1030
+ /**
1031
+ * Get VCS info
1032
+ *
1033
+ * Retrieve version control system (VCS) information for the current project, such as git branch.
1034
+ */
1035
+ get<ThrowOnError extends boolean = false>(parameters?: {
1036
+ directory?: string;
1037
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<VcsGetResponses, unknown, ThrowOnError, "fields">;
1038
+ }
1039
+ export declare class Command extends HeyApiClient {
1040
+ /**
1041
+ * List commands
1042
+ *
1043
+ * Get a list of all available commands in the OpenCode system.
1044
+ */
1045
+ list<ThrowOnError extends boolean = false>(parameters?: {
1046
+ directory?: string;
1047
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<CommandListResponses, unknown, ThrowOnError, "fields">;
1048
+ }
1049
+ export declare class App extends HeyApiClient {
1050
+ /**
1051
+ * Write log
1052
+ *
1053
+ * Write a log entry to the server logs with specified level and metadata.
1054
+ */
1055
+ log<ThrowOnError extends boolean = false>(parameters?: {
1056
+ directory?: string;
1057
+ service?: string;
1058
+ level?: "debug" | "info" | "error" | "warn";
1059
+ message?: string;
1060
+ extra?: {
1061
+ [key: string]: unknown;
1062
+ };
1063
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<AppLogResponses, AppLogErrors, ThrowOnError, "fields">;
1064
+ /**
1065
+ * List agents
1066
+ *
1067
+ * Get a list of all available AI agents in the OpenCode system.
1068
+ */
1069
+ agents<ThrowOnError extends boolean = false>(parameters?: {
1070
+ directory?: string;
1071
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<AppAgentsResponses, unknown, ThrowOnError, "fields">;
1072
+ /**
1073
+ * List skills
1074
+ *
1075
+ * Get a list of all available skills in the OpenCode system.
1076
+ */
1077
+ skills<ThrowOnError extends boolean = false>(parameters?: {
1078
+ directory?: string;
1079
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<AppSkillsResponses, unknown, ThrowOnError, "fields">;
1080
+ }
1081
+ export declare class Lsp extends HeyApiClient {
1082
+ /**
1083
+ * Get LSP status
1084
+ *
1085
+ * Get LSP server status
1086
+ */
1087
+ status<ThrowOnError extends boolean = false>(parameters?: {
1088
+ directory?: string;
1089
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<LspStatusResponses, unknown, ThrowOnError, "fields">;
1090
+ }
1091
+ export declare class Formatter extends HeyApiClient {
1092
+ /**
1093
+ * Get formatter status
1094
+ *
1095
+ * Get formatter status
1096
+ */
1097
+ status<ThrowOnError extends boolean = false>(parameters?: {
1098
+ directory?: string;
1099
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<FormatterStatusResponses, unknown, ThrowOnError, "fields">;
1100
+ }
1101
+ export declare class Event extends HeyApiClient {
1102
+ /**
1103
+ * Subscribe to events
1104
+ *
1105
+ * Get events
1106
+ */
1107
+ subscribe<ThrowOnError extends boolean = false>(parameters?: {
1108
+ directory?: string;
1109
+ }, options?: Options<never, ThrowOnError>): Promise<import("./core/serverSentEvents.gen.js").ServerSentEventsResult<EventSubscribeResponses, unknown>>;
1110
+ }
1111
+ export declare class OpencodeClient extends HeyApiClient {
1112
+ static readonly __registry: HeyApiRegistry<OpencodeClient>;
1113
+ constructor(args?: {
1114
+ client?: Client;
1115
+ key?: string;
1116
+ });
1117
+ private _global?;
1118
+ get global(): Global;
1119
+ private _auth?;
1120
+ get auth(): Auth;
1121
+ private _project?;
1122
+ get project(): Project;
1123
+ private _pty?;
1124
+ get pty(): Pty;
1125
+ private _config?;
1126
+ get config(): Config2;
1127
+ private _tool?;
1128
+ get tool(): Tool;
1129
+ private _worktree?;
1130
+ get worktree(): Worktree;
1131
+ private _experimental?;
1132
+ get experimental(): Experimental;
1133
+ private _session?;
1134
+ get session(): Session2;
1135
+ private _part?;
1136
+ get part(): Part;
1137
+ private _permission?;
1138
+ get permission(): Permission;
1139
+ private _question?;
1140
+ get question(): Question;
1141
+ private _provider?;
1142
+ get provider(): Provider;
1143
+ private _find?;
1144
+ get find(): Find;
1145
+ private _file?;
1146
+ get file(): File;
1147
+ private _mcp?;
1148
+ get mcp(): Mcp;
1149
+ private _tui?;
1150
+ get tui(): Tui;
1151
+ private _instance?;
1152
+ get instance(): Instance;
1153
+ private _path?;
1154
+ get path(): Path;
1155
+ private _vcs?;
1156
+ get vcs(): Vcs;
1157
+ private _command?;
1158
+ get command(): Command;
1159
+ private _app?;
1160
+ get app(): App;
1161
+ private _lsp?;
1162
+ get lsp(): Lsp;
1163
+ private _formatter?;
1164
+ get formatter(): Formatter;
1165
+ private _event?;
1166
+ get event(): Event;
1167
+ }
1168
+ export {};