@wopal/ellamaka-sdk 2.0.5

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 (81) hide show
  1. package/dist/brand.d.ts +9 -0
  2. package/dist/brand.js +9 -0
  3. package/dist/client.d.ts +7 -0
  4. package/dist/client.js +53 -0
  5. package/dist/error-interceptor.d.ts +3 -0
  6. package/dist/error-interceptor.js +44 -0
  7. package/dist/gen/client/client.gen.d.ts +2 -0
  8. package/dist/gen/client/client.gen.js +165 -0
  9. package/dist/gen/client/index.d.ts +7 -0
  10. package/dist/gen/client/index.js +5 -0
  11. package/dist/gen/client/types.gen.d.ts +127 -0
  12. package/dist/gen/client/types.gen.js +2 -0
  13. package/dist/gen/client/utils.gen.d.ts +38 -0
  14. package/dist/gen/client/utils.gen.js +226 -0
  15. package/dist/gen/client.gen.d.ts +12 -0
  16. package/dist/gen/client.gen.js +5 -0
  17. package/dist/gen/core/auth.gen.d.ts +18 -0
  18. package/dist/gen/core/auth.gen.js +14 -0
  19. package/dist/gen/core/bodySerializer.gen.d.ts +17 -0
  20. package/dist/gen/core/bodySerializer.gen.js +57 -0
  21. package/dist/gen/core/params.gen.d.ts +33 -0
  22. package/dist/gen/core/params.gen.js +89 -0
  23. package/dist/gen/core/pathSerializer.gen.d.ts +33 -0
  24. package/dist/gen/core/pathSerializer.gen.js +106 -0
  25. package/dist/gen/core/queryKeySerializer.gen.d.ts +18 -0
  26. package/dist/gen/core/queryKeySerializer.gen.js +93 -0
  27. package/dist/gen/core/serverSentEvents.gen.d.ts +59 -0
  28. package/dist/gen/core/serverSentEvents.gen.js +117 -0
  29. package/dist/gen/core/types.gen.d.ts +78 -0
  30. package/dist/gen/core/types.gen.js +2 -0
  31. package/dist/gen/core/utils.gen.d.ts +14 -0
  32. package/dist/gen/core/utils.gen.js +69 -0
  33. package/dist/gen/sdk.gen.d.ts +403 -0
  34. package/dist/gen/sdk.gen.js +881 -0
  35. package/dist/gen/types.gen.d.ts +3383 -0
  36. package/dist/gen/types.gen.js +2 -0
  37. package/dist/index.d.ts +10 -0
  38. package/dist/index.js +16 -0
  39. package/dist/process.d.ts +3 -0
  40. package/dist/process.js +33 -0
  41. package/dist/server.d.ts +23 -0
  42. package/dist/server.js +106 -0
  43. package/dist/v2/client.d.ts +8 -0
  44. package/dist/v2/client.js +78 -0
  45. package/dist/v2/data.d.ts +9 -0
  46. package/dist/v2/data.js +22 -0
  47. package/dist/v2/gen/client/client.gen.d.ts +2 -0
  48. package/dist/v2/gen/client/client.gen.js +232 -0
  49. package/dist/v2/gen/client/index.d.ts +8 -0
  50. package/dist/v2/gen/client/index.js +6 -0
  51. package/dist/v2/gen/client/types.gen.d.ts +117 -0
  52. package/dist/v2/gen/client/types.gen.js +2 -0
  53. package/dist/v2/gen/client/utils.gen.d.ts +33 -0
  54. package/dist/v2/gen/client/utils.gen.js +226 -0
  55. package/dist/v2/gen/client.gen.d.ts +12 -0
  56. package/dist/v2/gen/client.gen.js +3 -0
  57. package/dist/v2/gen/core/auth.gen.d.ts +18 -0
  58. package/dist/v2/gen/core/auth.gen.js +14 -0
  59. package/dist/v2/gen/core/bodySerializer.gen.d.ts +25 -0
  60. package/dist/v2/gen/core/bodySerializer.gen.js +57 -0
  61. package/dist/v2/gen/core/params.gen.d.ts +43 -0
  62. package/dist/v2/gen/core/params.gen.js +102 -0
  63. package/dist/v2/gen/core/pathSerializer.gen.d.ts +33 -0
  64. package/dist/v2/gen/core/pathSerializer.gen.js +106 -0
  65. package/dist/v2/gen/core/queryKeySerializer.gen.d.ts +18 -0
  66. package/dist/v2/gen/core/queryKeySerializer.gen.js +93 -0
  67. package/dist/v2/gen/core/serverSentEvents.gen.d.ts +71 -0
  68. package/dist/v2/gen/core/serverSentEvents.gen.js +133 -0
  69. package/dist/v2/gen/core/types.gen.d.ts +78 -0
  70. package/dist/v2/gen/core/types.gen.js +2 -0
  71. package/dist/v2/gen/core/utils.gen.d.ts +19 -0
  72. package/dist/v2/gen/core/utils.gen.js +87 -0
  73. package/dist/v2/gen/sdk.gen.d.ts +1735 -0
  74. package/dist/v2/gen/sdk.gen.js +3440 -0
  75. package/dist/v2/gen/types.gen.d.ts +7441 -0
  76. package/dist/v2/gen/types.gen.js +2 -0
  77. package/dist/v2/index.d.ts +11 -0
  78. package/dist/v2/index.js +17 -0
  79. package/dist/v2/server.d.ts +23 -0
  80. package/dist/v2/server.js +106 -0
  81. package/package.json +66 -0
@@ -0,0 +1,1735 @@
1
+ import { type Client, type Options as Options2, type TDataShape } from "./client/index.js";
2
+ import type { AgentPartInput, AppAgentsErrors, AppAgentsResponses, AppLogErrors, AppLogResponses, AppSkillsErrors, AppSkillsResponses, Auth as Auth3, AuthRemoveErrors, AuthRemoveResponses, AuthSetErrors, AuthSetResponses, CommandListErrors, CommandListResponses, Config as Config3, ConfigGetErrors, ConfigGetResponses, ConfigProvidersErrors, ConfigProvidersResponses, ConfigUpdateErrors, ConfigUpdateResponses, EventSubscribeResponses, EventTuiCommandExecute2, EventTuiPromptAppend2, EventTuiSessionSelect2, EventTuiToastShow2, ExperimentalConsoleGetErrors, ExperimentalConsoleGetResponses, ExperimentalConsoleListOrgsErrors, ExperimentalConsoleListOrgsResponses, ExperimentalConsoleSwitchOrgResponses, ExperimentalResourceListErrors, ExperimentalResourceListResponses, ExperimentalSessionListErrors, ExperimentalSessionListResponses, ExperimentalWorkspaceAdapterListErrors, ExperimentalWorkspaceAdapterListResponses, ExperimentalWorkspaceCreateErrors, ExperimentalWorkspaceCreateResponses, ExperimentalWorkspaceListErrors, ExperimentalWorkspaceListResponses, ExperimentalWorkspaceRemoveErrors, ExperimentalWorkspaceRemoveResponses, ExperimentalWorkspaceStatusErrors, ExperimentalWorkspaceStatusResponses, ExperimentalWorkspaceSyncListErrors, ExperimentalWorkspaceSyncListResponses, ExperimentalWorkspaceWarpErrors, ExperimentalWorkspaceWarpResponses, FileListErrors, FileListResponses, FilePartInput, FilePartSource, FileReadErrors, FileReadResponses, FileStatusErrors, FileStatusResponses, FindFilesErrors, FindFilesResponses, FindSymbolsErrors, FindSymbolsResponses, FindTextErrors, FindTextResponses, FormatterStatusErrors, FormatterStatusResponses, GlobalCliRepairErrors, GlobalCliRepairResponses, GlobalConfigGetErrors, GlobalConfigGetResponses, GlobalConfigUpdateErrors, GlobalConfigUpdateResponses, GlobalDisposeErrors, GlobalDisposeResponses, GlobalEventResponses, GlobalHealthErrors, GlobalHealthResponses, GlobalUpgradeErrors, GlobalUpgradeResponses, InstanceDisposeErrors, InstanceDisposeResponses, LspStatusErrors, LspStatusResponses, McpAddErrors, McpAddResponses, McpAuthAuthenticateErrors, McpAuthAuthenticateResponses, McpAuthCallbackErrors, McpAuthCallbackResponses, McpAuthRemoveErrors, McpAuthRemoveResponses, McpAuthStartErrors, McpAuthStartResponses, McpConnectErrors, McpConnectResponses, McpDisconnectErrors, McpDisconnectResponses, McpLocalConfig, McpRemoteConfig, McpStatusErrors, McpStatusResponses, OutputFormat, Part as Part2, PartDeleteErrors, PartDeleteResponses, PartUpdateErrors, PartUpdateResponses, PathGetErrors, PathGetResponses, PermissionClearEscalationErrors, PermissionClearEscalationResponses, PermissionListErrors, PermissionListResponses, PermissionReplyErrors, PermissionReplyResponses, PermissionRespondErrors, PermissionRespondResponses, PermissionRuleset, ProjectCurrentErrors, ProjectCurrentResponses, ProjectInitGitErrors, ProjectInitGitResponses, ProjectListErrors, ProjectListResponses, ProjectUpdateErrors, ProjectUpdateResponses, Prompt, ProviderAuthErrors, ProviderAuthResponses, ProviderListErrors, ProviderListResponses, ProviderOauthAuthorizeErrors, ProviderOauthAuthorizeResponses, ProviderOauthCallbackErrors, ProviderOauthCallbackResponses, PtyConnectErrors, PtyConnectResponses, PtyConnectTokenErrors, PtyConnectTokenResponses, PtyCreateErrors, PtyCreateResponses, PtyGetErrors, PtyGetResponses, PtyListErrors, PtyListResponses, PtyRemoveErrors, PtyRemoveResponses, PtyShellsErrors, PtyShellsResponses, PtyUpdateErrors, PtyUpdateResponses, QuestionAnswer, QuestionListErrors, QuestionListResponses, QuestionRejectErrors, QuestionRejectResponses, QuestionReplyErrors, QuestionReplyResponses, SessionAbortErrors, SessionAbortResponses, SessionChildrenErrors, SessionChildrenResponses, SessionCommandErrors, SessionCommandResponses, SessionCreateErrors, SessionCreateResponses, SessionDeleteErrors, SessionDeleteMessageErrors, SessionDeleteMessageResponses, SessionDeleteResponses, SessionDelivery, SessionForkErrors, SessionForkResponses, SessionGetErrors, SessionGetResponses, SessionInitErrors, SessionInitResponses, SessionListErrors, 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, SyncHistoryListErrors, SyncHistoryListResponses, SyncReplayErrors, SyncReplayResponses, SyncStartErrors, SyncStartResponses, SyncStealErrors, SyncStealResponses, TextPartInput, ToolIdsErrors, ToolIdsResponses, ToolListErrors, ToolListResponses, TuiAppendPromptErrors, TuiAppendPromptResponses, TuiClearPromptErrors, TuiClearPromptResponses, TuiControlNextErrors, TuiControlNextResponses, TuiControlResponseErrors, TuiControlResponseResponses, TuiExecuteCommandErrors, TuiExecuteCommandResponses, TuiOpenHelpErrors, TuiOpenHelpResponses, TuiOpenModelsErrors, TuiOpenModelsResponses, TuiOpenSessionsErrors, TuiOpenSessionsResponses, TuiOpenThemesErrors, TuiOpenThemesResponses, TuiPublishErrors, TuiPublishResponses, TuiSelectSessionErrors, TuiSelectSessionResponses, TuiShowToastErrors, TuiShowToastResponses, TuiSubmitPromptErrors, TuiSubmitPromptResponses, V2ModelListErrors, V2ModelListResponses, V2ProviderGetErrors, V2ProviderGetResponses, V2ProviderListErrors, V2ProviderListResponses, V2SessionCompactErrors, V2SessionCompactResponses, V2SessionContextErrors, V2SessionContextResponses, V2SessionListErrors, V2SessionListResponses, V2SessionMessagesErrors, V2SessionMessagesResponses, V2SessionPromptErrors, V2SessionPromptResponses, V2SessionWaitErrors, V2SessionWaitResponses, VcsApplyErrors, VcsApplyResponses, VcsDiffErrors, VcsDiffRawErrors, VcsDiffRawResponses, VcsDiffResponses, VcsGetErrors, VcsGetResponses, VcsStatusErrors, VcsStatusResponses, WopalSpaceModeErrors, WopalSpaceModeResponses, WopalSpaceSpacesErrors, WopalSpaceSpacesResponses, WorkbenchCreateSessionErrors, WorkbenchCreateSessionResponses, WorkbenchDshUrlErrors, WorkbenchDshUrlResponses, WorkbenchFileContentErrors, WorkbenchFileContentResponses, WorkbenchFilesErrors, WorkbenchFilesResponses, WorkbenchLocationsErrors, WorkbenchLocationsResponses, WorkbenchSessionGroupsErrors, WorkbenchSessionGroupsResponses, WorkbenchSessionStatusesErrors, WorkbenchSessionStatusesResponses, WorkbenchSessionSummaryErrors, WorkbenchSessionSummaryResponses, WorkbenchSessionTreeErrors, WorkbenchSessionTreeResponses, WorktreeCreateErrors, WorktreeCreateInput, WorktreeCreateResponses, WorktreeListErrors, 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 Auth extends HeyApiClient {
29
+ /**
30
+ * Remove auth credentials
31
+ *
32
+ * Remove authentication credentials
33
+ */
34
+ remove<ThrowOnError extends boolean = false>(parameters: {
35
+ providerID: string;
36
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<AuthRemoveResponses, AuthRemoveErrors, ThrowOnError, "fields">;
37
+ /**
38
+ * Set auth credentials
39
+ *
40
+ * Set authentication credentials
41
+ */
42
+ set<ThrowOnError extends boolean = false>(parameters: {
43
+ providerID: string;
44
+ auth?: Auth3;
45
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<AuthSetResponses, AuthSetErrors, ThrowOnError, "fields">;
46
+ }
47
+ export declare class App extends HeyApiClient {
48
+ /**
49
+ * Write log
50
+ *
51
+ * Write a log entry to the server logs with specified level and metadata.
52
+ */
53
+ log<ThrowOnError extends boolean = false>(parameters?: {
54
+ directory?: string;
55
+ workspace?: string;
56
+ service?: string;
57
+ level?: "debug" | "info" | "error" | "warn";
58
+ message?: string;
59
+ extra?: {
60
+ [key: string]: unknown;
61
+ };
62
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<AppLogResponses, AppLogErrors, ThrowOnError, "fields">;
63
+ /**
64
+ * List agents
65
+ *
66
+ * Get a list of all available AI agents in the OpenCode system.
67
+ */
68
+ agents<ThrowOnError extends boolean = false>(parameters?: {
69
+ directory?: string;
70
+ workspace?: string;
71
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<AppAgentsResponses, AppAgentsErrors, ThrowOnError, "fields">;
72
+ /**
73
+ * List skills
74
+ *
75
+ * Get a list of all available skills in the OpenCode system.
76
+ */
77
+ skills<ThrowOnError extends boolean = false>(parameters?: {
78
+ directory?: string;
79
+ workspace?: string;
80
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<AppSkillsResponses, AppSkillsErrors, ThrowOnError, "fields">;
81
+ }
82
+ export declare class Cli extends HeyApiClient {
83
+ /**
84
+ * Repair Wopal CLI
85
+ *
86
+ * Update or reinstall the managed Wopal CLI after explicit user confirmation.
87
+ */
88
+ repair<ThrowOnError extends boolean = false>(options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<GlobalCliRepairResponses, GlobalCliRepairErrors, ThrowOnError, "fields">;
89
+ }
90
+ export declare class Config extends HeyApiClient {
91
+ /**
92
+ * Get global configuration
93
+ *
94
+ * Retrieve the current global OpenCode configuration settings and preferences.
95
+ */
96
+ get<ThrowOnError extends boolean = false>(options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<GlobalConfigGetResponses, GlobalConfigGetErrors, ThrowOnError, "fields">;
97
+ /**
98
+ * Update global configuration
99
+ *
100
+ * Update global OpenCode configuration settings and preferences.
101
+ */
102
+ update<ThrowOnError extends boolean = false>(parameters?: {
103
+ config?: Config3;
104
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<GlobalConfigUpdateResponses, GlobalConfigUpdateErrors, ThrowOnError, "fields">;
105
+ }
106
+ export declare class Global extends HeyApiClient {
107
+ /**
108
+ * Get health
109
+ *
110
+ * Get health information about the OpenCode server.
111
+ */
112
+ health<ThrowOnError extends boolean = false>(options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<GlobalHealthResponses, GlobalHealthErrors, ThrowOnError, "fields">;
113
+ /**
114
+ * Get global events
115
+ *
116
+ * Subscribe to global events from the OpenCode system using server-sent events.
117
+ */
118
+ event<ThrowOnError extends boolean = false>(options?: Options<never, ThrowOnError>): Promise<import("./core/serverSentEvents.gen.js").ServerSentEventsResult<GlobalEventResponses>>;
119
+ /**
120
+ * Dispose instance
121
+ *
122
+ * Clean up and dispose all OpenCode instances, releasing all resources.
123
+ */
124
+ dispose<ThrowOnError extends boolean = false>(options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<GlobalDisposeResponses, GlobalDisposeErrors, ThrowOnError, "fields">;
125
+ /**
126
+ * Upgrade opencode
127
+ *
128
+ * Upgrade opencode to the specified version or latest if not specified.
129
+ */
130
+ upgrade<ThrowOnError extends boolean = false>(parameters?: {
131
+ target?: string;
132
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<GlobalUpgradeResponses, GlobalUpgradeErrors, ThrowOnError, "fields">;
133
+ private _cli?;
134
+ get cli(): Cli;
135
+ private _config?;
136
+ get config(): Config;
137
+ }
138
+ export declare class WopalSpace extends HeyApiClient {
139
+ /**
140
+ * List WopalSpace spaces
141
+ *
142
+ * Read the `spaces` registry from ~/.wopal/config/settings.jsonc (managed by wopal-cli). Returns all registered WopalSpace spaces with name, path, and type.
143
+ */
144
+ spaces<ThrowOnError extends boolean = false>(options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<WopalSpaceSpacesResponses, WopalSpaceSpacesErrors, ThrowOnError, "fields">;
145
+ /**
146
+ * Get WopalSpace mode
147
+ *
148
+ * Check if the current directory instance is running in WopalSpace mode.
149
+ */
150
+ mode<ThrowOnError extends boolean = false>(parameters?: {
151
+ directory?: string;
152
+ workspace?: string;
153
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<WopalSpaceModeResponses, WopalSpaceModeErrors, ThrowOnError, "fields">;
154
+ }
155
+ export declare class Workbench extends HeyApiClient {
156
+ /**
157
+ * List legacy Workbench session groups
158
+ *
159
+ * Compatibility projection for existing consumers. New Workbench clients use session-tree.
160
+ */
161
+ sessionGroups<ThrowOnError extends boolean = false>(options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<WorkbenchSessionGroupsResponses, WorkbenchSessionGroupsErrors, ThrowOnError, "fields">;
162
+ /**
163
+ * List status snapshots for initialized sessions
164
+ *
165
+ * Returns non-idle busy or retry status snapshots from already initialized instances without loading a directory.
166
+ */
167
+ sessionStatuses<ThrowOnError extends boolean = false>(options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<WorkbenchSessionStatusesResponses, WorkbenchSessionStatusesErrors, ThrowOnError, "fields">;
168
+ /**
169
+ * Read Workbench session notification metadata
170
+ *
171
+ * Reads canonical session metadata without loading a directory. Returns null when the session does not exist.
172
+ */
173
+ sessionSummary<ThrowOnError extends boolean = false>(parameters: {
174
+ sessionID: string;
175
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<WorkbenchSessionSummaryResponses, WorkbenchSessionSummaryErrors, ThrowOnError, "fields">;
176
+ /**
177
+ * List files in a registered Space
178
+ *
179
+ * Lists a registered Space root or relative child directory without loading an instance. Traversal and symlink escapes are rejected.
180
+ */
181
+ files<ThrowOnError extends boolean = false>(parameters: {
182
+ spacePath: string;
183
+ path?: string;
184
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<WorkbenchFilesResponses, WorkbenchFilesErrors, ThrowOnError, "fields">;
185
+ /**
186
+ * Read a file in a registered Space
187
+ *
188
+ * Reads a relative file from a registered Space without loading an instance. Traversal and symlink escapes are rejected.
189
+ */
190
+ fileContent<ThrowOnError extends boolean = false>(parameters: {
191
+ spacePath: string;
192
+ path: string;
193
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<WorkbenchFileContentResponses, WorkbenchFileContentErrors, ThrowOnError, "fields">;
194
+ /**
195
+ * Resolve the authenticated DSH iframe entry
196
+ *
197
+ * Returns the launch-token iframe URL for the mounted dsh web engine, or url: undefined when the engine is disabled or not yet mounted.
198
+ */
199
+ dshUrl<ThrowOnError extends boolean = false>(options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<WorkbenchDshUrlResponses, WorkbenchDshUrlErrors, ThrowOnError, "fields">;
200
+ /**
201
+ * Create an idempotent Workbench session
202
+ *
203
+ * Creates a General or registered-Space session. New clients use target.spacePath; legacy target.space remains supported for one release.
204
+ */
205
+ createSession<ThrowOnError extends boolean = false>(parameters?: {
206
+ requestID?: string;
207
+ target?: {
208
+ type: "general";
209
+ } | {
210
+ type: "space";
211
+ spacePath: string;
212
+ directory?: string;
213
+ } | {
214
+ type: "space";
215
+ space: string;
216
+ directory?: string;
217
+ };
218
+ title?: string;
219
+ agent?: string;
220
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<WorkbenchCreateSessionResponses, WorkbenchCreateSessionErrors, ThrowOnError, "fields">;
221
+ /**
222
+ * List sessions as Scope, location, session
223
+ *
224
+ * Returns General first, registered Spaces even when empty, and only active root sessions.
225
+ */
226
+ sessionTree<ThrowOnError extends boolean = false>(parameters?: {
227
+ limitPerScope?: string;
228
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<WorkbenchSessionTreeResponses, WorkbenchSessionTreeErrors, ThrowOnError, "fields">;
229
+ /**
230
+ * List controlled locations inside a Space
231
+ *
232
+ * Candidates are Space root, registered projects, recent session directories, and the directory-search capability; arbitrary filesystem browsing is not exposed.
233
+ */
234
+ locations<ThrowOnError extends boolean = false>(parameters: {
235
+ spacePath: string;
236
+ query?: string;
237
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<WorkbenchLocationsResponses, WorkbenchLocationsErrors, ThrowOnError, "fields">;
238
+ }
239
+ export declare class Event extends HeyApiClient {
240
+ /**
241
+ * Subscribe to events
242
+ *
243
+ * Get events
244
+ */
245
+ subscribe<ThrowOnError extends boolean = false>(parameters?: {
246
+ directory?: string;
247
+ workspace?: string;
248
+ }, options?: Options<never, ThrowOnError>): Promise<import("./core/serverSentEvents.gen.js").ServerSentEventsResult<EventSubscribeResponses>>;
249
+ }
250
+ export declare class Config2 extends HeyApiClient {
251
+ /**
252
+ * Get configuration
253
+ *
254
+ * Retrieve the current OpenCode configuration settings and preferences.
255
+ */
256
+ get<ThrowOnError extends boolean = false>(parameters?: {
257
+ directory?: string;
258
+ workspace?: string;
259
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<ConfigGetResponses, ConfigGetErrors, ThrowOnError, "fields">;
260
+ /**
261
+ * Update configuration
262
+ *
263
+ * Update OpenCode configuration settings and preferences.
264
+ */
265
+ update<ThrowOnError extends boolean = false>(parameters?: {
266
+ directory?: string;
267
+ workspace?: string;
268
+ config?: Config3;
269
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<ConfigUpdateResponses, ConfigUpdateErrors, ThrowOnError, "fields">;
270
+ /**
271
+ * List config providers
272
+ *
273
+ * Get a list of all configured AI providers and their default models.
274
+ */
275
+ providers<ThrowOnError extends boolean = false>(parameters?: {
276
+ directory?: string;
277
+ workspace?: string;
278
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<ConfigProvidersResponses, ConfigProvidersErrors, ThrowOnError, "fields">;
279
+ }
280
+ export declare class Console extends HeyApiClient {
281
+ /**
282
+ * Get active Console provider metadata
283
+ *
284
+ * Get the active Console org name and the set of provider IDs managed by that Console org.
285
+ */
286
+ get<ThrowOnError extends boolean = false>(parameters?: {
287
+ directory?: string;
288
+ workspace?: string;
289
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<ExperimentalConsoleGetResponses, ExperimentalConsoleGetErrors, ThrowOnError, "fields">;
290
+ /**
291
+ * List switchable Console orgs
292
+ *
293
+ * Get the available Console orgs across logged-in accounts, including the current active org.
294
+ */
295
+ listOrgs<ThrowOnError extends boolean = false>(parameters?: {
296
+ directory?: string;
297
+ workspace?: string;
298
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<ExperimentalConsoleListOrgsResponses, ExperimentalConsoleListOrgsErrors, ThrowOnError, "fields">;
299
+ /**
300
+ * Switch active Console org
301
+ *
302
+ * Persist a new active Console account/org selection for the current local OpenCode state.
303
+ */
304
+ switchOrg<ThrowOnError extends boolean = false>(parameters?: {
305
+ directory?: string;
306
+ workspace?: string;
307
+ accountID?: string;
308
+ orgID?: string;
309
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<ExperimentalConsoleSwitchOrgResponses, unknown, ThrowOnError, "fields">;
310
+ }
311
+ export declare class Session extends HeyApiClient {
312
+ /**
313
+ * List sessions
314
+ *
315
+ * Get a list of all OpenCode sessions across projects, sorted by most recently updated. Archived sessions are excluded by default.
316
+ */
317
+ list<ThrowOnError extends boolean = false>(parameters?: {
318
+ directory?: string;
319
+ workspace?: string;
320
+ roots?: boolean | "true" | "false";
321
+ start?: number;
322
+ cursor?: number;
323
+ search?: string;
324
+ limit?: number;
325
+ archived?: boolean | "true" | "false";
326
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<ExperimentalSessionListResponses, ExperimentalSessionListErrors, ThrowOnError, "fields">;
327
+ }
328
+ export declare class Resource extends HeyApiClient {
329
+ /**
330
+ * Get MCP resources
331
+ *
332
+ * Get all available MCP resources from connected servers. Optionally filter by name.
333
+ */
334
+ list<ThrowOnError extends boolean = false>(parameters?: {
335
+ directory?: string;
336
+ workspace?: string;
337
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<ExperimentalResourceListResponses, ExperimentalResourceListErrors, ThrowOnError, "fields">;
338
+ }
339
+ export declare class Adapter extends HeyApiClient {
340
+ /**
341
+ * List workspace adapters
342
+ *
343
+ * List all available workspace adapters for the current project.
344
+ */
345
+ list<ThrowOnError extends boolean = false>(parameters?: {
346
+ directory?: string;
347
+ workspace?: string;
348
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<ExperimentalWorkspaceAdapterListResponses, ExperimentalWorkspaceAdapterListErrors, ThrowOnError, "fields">;
349
+ }
350
+ export declare class Workspace extends HeyApiClient {
351
+ /**
352
+ * List workspaces
353
+ *
354
+ * List all workspaces.
355
+ */
356
+ list<ThrowOnError extends boolean = false>(parameters?: {
357
+ directory?: string;
358
+ workspace?: string;
359
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<ExperimentalWorkspaceListResponses, ExperimentalWorkspaceListErrors, ThrowOnError, "fields">;
360
+ /**
361
+ * Create workspace
362
+ *
363
+ * Create a workspace for the current project.
364
+ */
365
+ create<ThrowOnError extends boolean = false>(parameters?: {
366
+ directory?: string;
367
+ workspace?: string;
368
+ id?: string;
369
+ type?: string;
370
+ branch?: string | null;
371
+ extra?: unknown | null;
372
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<ExperimentalWorkspaceCreateResponses, ExperimentalWorkspaceCreateErrors, ThrowOnError, "fields">;
373
+ /**
374
+ * Sync workspace list
375
+ *
376
+ * Register missing workspaces returned by workspace adapters.
377
+ */
378
+ syncList<ThrowOnError extends boolean = false>(parameters?: {
379
+ directory?: string;
380
+ workspace?: string;
381
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<ExperimentalWorkspaceSyncListResponses, ExperimentalWorkspaceSyncListErrors, ThrowOnError, "fields">;
382
+ /**
383
+ * Workspace status
384
+ *
385
+ * Get connection status for workspaces in the current project.
386
+ */
387
+ status<ThrowOnError extends boolean = false>(parameters?: {
388
+ directory?: string;
389
+ workspace?: string;
390
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<ExperimentalWorkspaceStatusResponses, ExperimentalWorkspaceStatusErrors, ThrowOnError, "fields">;
391
+ /**
392
+ * Remove workspace
393
+ *
394
+ * Remove an existing workspace.
395
+ */
396
+ remove<ThrowOnError extends boolean = false>(parameters: {
397
+ id: string;
398
+ directory?: string;
399
+ workspace?: string;
400
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<ExperimentalWorkspaceRemoveResponses, ExperimentalWorkspaceRemoveErrors, ThrowOnError, "fields">;
401
+ /**
402
+ * Warp session into workspace
403
+ *
404
+ * Move a session's sync history into the target workspace, or detach it to the local project.
405
+ */
406
+ warp<ThrowOnError extends boolean = false>(parameters?: {
407
+ directory?: string;
408
+ workspace?: string;
409
+ id?: string | null;
410
+ sessionID?: string;
411
+ copyChanges?: boolean;
412
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<ExperimentalWorkspaceWarpResponses, ExperimentalWorkspaceWarpErrors, ThrowOnError, "fields">;
413
+ private _adapter?;
414
+ get adapter(): Adapter;
415
+ }
416
+ export declare class Experimental extends HeyApiClient {
417
+ private _console?;
418
+ get console(): Console;
419
+ private _session?;
420
+ get session(): Session;
421
+ private _resource?;
422
+ get resource(): Resource;
423
+ private _workspace?;
424
+ get workspace(): Workspace;
425
+ }
426
+ export declare class Tool extends HeyApiClient {
427
+ /**
428
+ * List tools
429
+ *
430
+ * Get a list of available tools with their JSON schema parameters for a specific provider and model combination.
431
+ */
432
+ list<ThrowOnError extends boolean = false>(parameters: {
433
+ directory?: string;
434
+ workspace?: string;
435
+ provider: string;
436
+ model: string;
437
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<ToolListResponses, ToolListErrors, ThrowOnError, "fields">;
438
+ /**
439
+ * List tool IDs
440
+ *
441
+ * Get a list of all available tool IDs, including both built-in tools and dynamically registered tools.
442
+ */
443
+ ids<ThrowOnError extends boolean = false>(parameters?: {
444
+ directory?: string;
445
+ workspace?: string;
446
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<ToolIdsResponses, ToolIdsErrors, ThrowOnError, "fields">;
447
+ }
448
+ export declare class Worktree extends HeyApiClient {
449
+ /**
450
+ * Remove worktree
451
+ *
452
+ * Remove a git worktree and delete its branch.
453
+ */
454
+ remove<ThrowOnError extends boolean = false>(parameters?: {
455
+ directory?: string;
456
+ workspace?: string;
457
+ worktreeRemoveInput?: WorktreeRemoveInput;
458
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<WorktreeRemoveResponses, WorktreeRemoveErrors, ThrowOnError, "fields">;
459
+ /**
460
+ * List worktrees
461
+ *
462
+ * List all sandbox worktrees for the current project.
463
+ */
464
+ list<ThrowOnError extends boolean = false>(parameters?: {
465
+ directory?: string;
466
+ workspace?: string;
467
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<WorktreeListResponses, WorktreeListErrors, ThrowOnError, "fields">;
468
+ /**
469
+ * Create worktree
470
+ *
471
+ * Create a new git worktree for the current project and run any configured startup scripts.
472
+ */
473
+ create<ThrowOnError extends boolean = false>(parameters?: {
474
+ directory?: string;
475
+ workspace?: string;
476
+ worktreeCreateInput?: WorktreeCreateInput;
477
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<WorktreeCreateResponses, WorktreeCreateErrors, ThrowOnError, "fields">;
478
+ /**
479
+ * Reset worktree
480
+ *
481
+ * Reset a worktree branch to the primary default branch.
482
+ */
483
+ reset<ThrowOnError extends boolean = false>(parameters?: {
484
+ directory?: string;
485
+ workspace?: string;
486
+ worktreeResetInput?: WorktreeResetInput;
487
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<WorktreeResetResponses, WorktreeResetErrors, ThrowOnError, "fields">;
488
+ }
489
+ export declare class Find extends HeyApiClient {
490
+ /**
491
+ * Find text
492
+ *
493
+ * Search for text patterns across files in the project using ripgrep.
494
+ */
495
+ text<ThrowOnError extends boolean = false>(parameters: {
496
+ directory?: string;
497
+ workspace?: string;
498
+ pattern: string;
499
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<FindTextResponses, FindTextErrors, ThrowOnError, "fields">;
500
+ /**
501
+ * Find files
502
+ *
503
+ * Search for files or directories by name or pattern in the project directory.
504
+ */
505
+ files<ThrowOnError extends boolean = false>(parameters: {
506
+ directory?: string;
507
+ workspace?: string;
508
+ query: string;
509
+ dirs?: "true" | "false";
510
+ type?: "file" | "directory";
511
+ limit?: number;
512
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<FindFilesResponses, FindFilesErrors, ThrowOnError, "fields">;
513
+ /**
514
+ * Find symbols
515
+ *
516
+ * Search for workspace symbols like functions, classes, and variables using LSP.
517
+ */
518
+ symbols<ThrowOnError extends boolean = false>(parameters: {
519
+ directory?: string;
520
+ workspace?: string;
521
+ query: string;
522
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<FindSymbolsResponses, FindSymbolsErrors, ThrowOnError, "fields">;
523
+ }
524
+ export declare class File extends HeyApiClient {
525
+ /**
526
+ * List files
527
+ *
528
+ * List files and directories in a specified path.
529
+ */
530
+ list<ThrowOnError extends boolean = false>(parameters: {
531
+ directory?: string;
532
+ workspace?: string;
533
+ path: string;
534
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<FileListResponses, FileListErrors, ThrowOnError, "fields">;
535
+ /**
536
+ * Read file
537
+ *
538
+ * Read the content of a specified file.
539
+ */
540
+ read<ThrowOnError extends boolean = false>(parameters: {
541
+ directory?: string;
542
+ workspace?: string;
543
+ path: string;
544
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<FileReadResponses, FileReadErrors, ThrowOnError, "fields">;
545
+ /**
546
+ * Get file status
547
+ *
548
+ * Get the git status of all files in the project.
549
+ */
550
+ status<ThrowOnError extends boolean = false>(parameters?: {
551
+ directory?: string;
552
+ workspace?: string;
553
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<FileStatusResponses, FileStatusErrors, ThrowOnError, "fields">;
554
+ }
555
+ export declare class Instance extends HeyApiClient {
556
+ /**
557
+ * Dispose instance
558
+ *
559
+ * Clean up and dispose the current OpenCode instance, releasing all resources.
560
+ */
561
+ dispose<ThrowOnError extends boolean = false>(parameters?: {
562
+ directory?: string;
563
+ workspace?: string;
564
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<InstanceDisposeResponses, InstanceDisposeErrors, ThrowOnError, "fields">;
565
+ }
566
+ export declare class Path extends HeyApiClient {
567
+ /**
568
+ * Get paths
569
+ *
570
+ * Retrieve the current working directory and related path information for the OpenCode instance.
571
+ */
572
+ get<ThrowOnError extends boolean = false>(parameters?: {
573
+ directory?: string;
574
+ workspace?: string;
575
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<PathGetResponses, PathGetErrors, ThrowOnError, "fields">;
576
+ }
577
+ export declare class Diff extends HeyApiClient {
578
+ /**
579
+ * Get raw VCS diff
580
+ *
581
+ * Retrieve a raw patch for current uncommitted changes.
582
+ */
583
+ raw<ThrowOnError extends boolean = false>(parameters?: {
584
+ directory?: string;
585
+ workspace?: string;
586
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<VcsDiffRawResponses, VcsDiffRawErrors, ThrowOnError, "fields">;
587
+ }
588
+ export declare class Vcs extends HeyApiClient {
589
+ /**
590
+ * Get VCS info
591
+ *
592
+ * Retrieve version control system (VCS) information for the current project, such as git branch.
593
+ */
594
+ get<ThrowOnError extends boolean = false>(parameters?: {
595
+ directory?: string;
596
+ workspace?: string;
597
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<VcsGetResponses, VcsGetErrors, ThrowOnError, "fields">;
598
+ /**
599
+ * Get VCS status
600
+ *
601
+ * Retrieve changed files in the current working tree without patches.
602
+ */
603
+ status<ThrowOnError extends boolean = false>(parameters?: {
604
+ directory?: string;
605
+ workspace?: string;
606
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<VcsStatusResponses, VcsStatusErrors, ThrowOnError, "fields">;
607
+ /**
608
+ * Get VCS diff
609
+ *
610
+ * Retrieve the current git diff for the working tree or against the default branch.
611
+ */
612
+ diff<ThrowOnError extends boolean = false>(parameters: {
613
+ directory?: string;
614
+ workspace?: string;
615
+ mode: "git" | "branch";
616
+ context?: number;
617
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<VcsDiffResponses, VcsDiffErrors, ThrowOnError, "fields">;
618
+ /**
619
+ * Apply VCS patch
620
+ *
621
+ * Apply a raw patch to the current working tree.
622
+ */
623
+ apply<ThrowOnError extends boolean = false>(parameters?: {
624
+ directory?: string;
625
+ workspace?: string;
626
+ patch?: string;
627
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<VcsApplyResponses, VcsApplyErrors, ThrowOnError, "fields">;
628
+ private _diff?;
629
+ get diff2(): Diff;
630
+ }
631
+ export declare class Command extends HeyApiClient {
632
+ /**
633
+ * List commands
634
+ *
635
+ * Get a list of all available commands in the OpenCode system.
636
+ */
637
+ list<ThrowOnError extends boolean = false>(parameters?: {
638
+ directory?: string;
639
+ workspace?: string;
640
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<CommandListResponses, CommandListErrors, ThrowOnError, "fields">;
641
+ }
642
+ export declare class Lsp extends HeyApiClient {
643
+ /**
644
+ * Get LSP status
645
+ *
646
+ * Get LSP server status
647
+ */
648
+ status<ThrowOnError extends boolean = false>(parameters?: {
649
+ directory?: string;
650
+ workspace?: string;
651
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<LspStatusResponses, LspStatusErrors, ThrowOnError, "fields">;
652
+ }
653
+ export declare class Formatter extends HeyApiClient {
654
+ /**
655
+ * Get formatter status
656
+ *
657
+ * Get formatter status
658
+ */
659
+ status<ThrowOnError extends boolean = false>(parameters?: {
660
+ directory?: string;
661
+ workspace?: string;
662
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<FormatterStatusResponses, FormatterStatusErrors, ThrowOnError, "fields">;
663
+ }
664
+ export declare class Auth2 extends HeyApiClient {
665
+ /**
666
+ * Remove MCP OAuth
667
+ *
668
+ * Remove OAuth credentials for an MCP server.
669
+ */
670
+ remove<ThrowOnError extends boolean = false>(parameters: {
671
+ name: string;
672
+ directory?: string;
673
+ workspace?: string;
674
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<McpAuthRemoveResponses, McpAuthRemoveErrors, ThrowOnError, "fields">;
675
+ /**
676
+ * Start MCP OAuth
677
+ *
678
+ * Start OAuth authentication flow for a Model Context Protocol (MCP) server.
679
+ */
680
+ start<ThrowOnError extends boolean = false>(parameters: {
681
+ name: string;
682
+ directory?: string;
683
+ workspace?: string;
684
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<McpAuthStartResponses, McpAuthStartErrors, ThrowOnError, "fields">;
685
+ /**
686
+ * Complete MCP OAuth
687
+ *
688
+ * Complete OAuth authentication for a Model Context Protocol (MCP) server using the authorization code.
689
+ */
690
+ callback<ThrowOnError extends boolean = false>(parameters: {
691
+ name: string;
692
+ directory?: string;
693
+ workspace?: string;
694
+ code?: string;
695
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<McpAuthCallbackResponses, McpAuthCallbackErrors, ThrowOnError, "fields">;
696
+ /**
697
+ * Authenticate MCP OAuth
698
+ *
699
+ * Start OAuth flow and wait for callback (opens browser).
700
+ */
701
+ authenticate<ThrowOnError extends boolean = false>(parameters: {
702
+ name: string;
703
+ directory?: string;
704
+ workspace?: string;
705
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<McpAuthAuthenticateResponses, McpAuthAuthenticateErrors, ThrowOnError, "fields">;
706
+ }
707
+ export declare class Mcp extends HeyApiClient {
708
+ /**
709
+ * Get MCP status
710
+ *
711
+ * Get the status of all Model Context Protocol (MCP) servers.
712
+ */
713
+ status<ThrowOnError extends boolean = false>(parameters?: {
714
+ directory?: string;
715
+ workspace?: string;
716
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<McpStatusResponses, McpStatusErrors, ThrowOnError, "fields">;
717
+ /**
718
+ * Add MCP server
719
+ *
720
+ * Dynamically add a new Model Context Protocol (MCP) server to the system.
721
+ */
722
+ add<ThrowOnError extends boolean = false>(parameters?: {
723
+ directory?: string;
724
+ workspace?: string;
725
+ name?: string;
726
+ config?: McpLocalConfig | McpRemoteConfig;
727
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<McpAddResponses, McpAddErrors, ThrowOnError, "fields">;
728
+ /**
729
+ * Connect an MCP server.
730
+ */
731
+ connect<ThrowOnError extends boolean = false>(parameters: {
732
+ name: string;
733
+ directory?: string;
734
+ workspace?: string;
735
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<McpConnectResponses, McpConnectErrors, ThrowOnError, "fields">;
736
+ /**
737
+ * Disconnect an MCP server.
738
+ */
739
+ disconnect<ThrowOnError extends boolean = false>(parameters: {
740
+ name: string;
741
+ directory?: string;
742
+ workspace?: string;
743
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<McpDisconnectResponses, McpDisconnectErrors, ThrowOnError, "fields">;
744
+ private _auth?;
745
+ get auth(): Auth2;
746
+ }
747
+ export declare class Project extends HeyApiClient {
748
+ /**
749
+ * List all projects
750
+ *
751
+ * Get a list of projects that have been opened with OpenCode.
752
+ */
753
+ list<ThrowOnError extends boolean = false>(parameters?: {
754
+ directory?: string;
755
+ workspace?: string;
756
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<ProjectListResponses, ProjectListErrors, ThrowOnError, "fields">;
757
+ /**
758
+ * Get current project
759
+ *
760
+ * Retrieve the currently active project that OpenCode is working with.
761
+ */
762
+ current<ThrowOnError extends boolean = false>(parameters?: {
763
+ directory?: string;
764
+ workspace?: string;
765
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<ProjectCurrentResponses, ProjectCurrentErrors, ThrowOnError, "fields">;
766
+ /**
767
+ * Initialize git repository
768
+ *
769
+ * Create a git repository for the current project and return the refreshed project info.
770
+ */
771
+ initGit<ThrowOnError extends boolean = false>(parameters?: {
772
+ directory?: string;
773
+ workspace?: string;
774
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<ProjectInitGitResponses, ProjectInitGitErrors, ThrowOnError, "fields">;
775
+ /**
776
+ * Update project
777
+ *
778
+ * Update project properties such as name, icon, and commands.
779
+ */
780
+ update<ThrowOnError extends boolean = false>(parameters: {
781
+ projectID: string;
782
+ directory?: string;
783
+ workspace?: string;
784
+ name?: string;
785
+ icon?: {
786
+ url?: string;
787
+ override?: string;
788
+ color?: string;
789
+ };
790
+ commands?: {
791
+ /**
792
+ * Startup script to run when creating a new workspace (worktree)
793
+ */
794
+ start?: string;
795
+ };
796
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<ProjectUpdateResponses, ProjectUpdateErrors, ThrowOnError, "fields">;
797
+ }
798
+ export declare class Pty extends HeyApiClient {
799
+ /**
800
+ * List available shells
801
+ *
802
+ * Get a list of available shells on the system.
803
+ */
804
+ shells<ThrowOnError extends boolean = false>(parameters?: {
805
+ directory?: string;
806
+ workspace?: string;
807
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<PtyShellsResponses, PtyShellsErrors, ThrowOnError, "fields">;
808
+ /**
809
+ * List PTY sessions
810
+ *
811
+ * Get a list of all active pseudo-terminal (PTY) sessions managed by OpenCode.
812
+ */
813
+ list<ThrowOnError extends boolean = false>(parameters?: {
814
+ directory?: string;
815
+ workspace?: string;
816
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<PtyListResponses, PtyListErrors, ThrowOnError, "fields">;
817
+ /**
818
+ * Create PTY session
819
+ *
820
+ * Create a new pseudo-terminal (PTY) session for running shell commands and processes.
821
+ */
822
+ create<ThrowOnError extends boolean = false>(parameters?: {
823
+ directory?: string;
824
+ workspace?: string;
825
+ command?: string;
826
+ args?: Array<string>;
827
+ cwd?: string;
828
+ title?: string;
829
+ env?: {
830
+ [key: string]: string;
831
+ };
832
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<PtyCreateResponses, PtyCreateErrors, ThrowOnError, "fields">;
833
+ /**
834
+ * Remove PTY session
835
+ *
836
+ * Remove and terminate a specific pseudo-terminal (PTY) session.
837
+ */
838
+ remove<ThrowOnError extends boolean = false>(parameters: {
839
+ ptyID: string;
840
+ directory?: string;
841
+ workspace?: string;
842
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<PtyRemoveResponses, PtyRemoveErrors, ThrowOnError, "fields">;
843
+ /**
844
+ * Get PTY session
845
+ *
846
+ * Retrieve detailed information about a specific pseudo-terminal (PTY) session.
847
+ */
848
+ get<ThrowOnError extends boolean = false>(parameters: {
849
+ ptyID: string;
850
+ directory?: string;
851
+ workspace?: string;
852
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<PtyGetResponses, PtyGetErrors, ThrowOnError, "fields">;
853
+ /**
854
+ * Update PTY session
855
+ *
856
+ * Update properties of an existing pseudo-terminal (PTY) session.
857
+ */
858
+ update<ThrowOnError extends boolean = false>(parameters: {
859
+ ptyID: string;
860
+ directory?: string;
861
+ workspace?: string;
862
+ title?: string;
863
+ size?: {
864
+ rows: number;
865
+ cols: number;
866
+ };
867
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<PtyUpdateResponses, PtyUpdateErrors, ThrowOnError, "fields">;
868
+ /**
869
+ * Create PTY WebSocket token
870
+ *
871
+ * Create a short-lived ticket for opening a PTY WebSocket connection.
872
+ */
873
+ connectToken<ThrowOnError extends boolean = false>(parameters: {
874
+ ptyID: string;
875
+ directory?: string;
876
+ workspace?: string;
877
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<PtyConnectTokenResponses, PtyConnectTokenErrors, ThrowOnError, "fields">;
878
+ /**
879
+ * Connect to PTY session
880
+ *
881
+ * Establish a WebSocket connection to interact with a pseudo-terminal (PTY) session in real-time.
882
+ */
883
+ connect<ThrowOnError extends boolean = false>(parameters: {
884
+ ptyID: string;
885
+ directory?: string;
886
+ workspace?: string;
887
+ cursor?: string;
888
+ ticket?: string;
889
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<PtyConnectResponses, PtyConnectErrors, ThrowOnError, "fields">;
890
+ }
891
+ export declare class Question extends HeyApiClient {
892
+ /**
893
+ * List pending questions
894
+ *
895
+ * Get all pending question requests across all sessions.
896
+ */
897
+ list<ThrowOnError extends boolean = false>(parameters?: {
898
+ directory?: string;
899
+ workspace?: string;
900
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<QuestionListResponses, QuestionListErrors, ThrowOnError, "fields">;
901
+ /**
902
+ * Reply to question request
903
+ *
904
+ * Provide answers to a question request from the AI assistant.
905
+ */
906
+ reply<ThrowOnError extends boolean = false>(parameters: {
907
+ requestID: string;
908
+ directory?: string;
909
+ workspace?: string;
910
+ answers?: Array<QuestionAnswer>;
911
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<QuestionReplyResponses, QuestionReplyErrors, ThrowOnError, "fields">;
912
+ /**
913
+ * Reject question request
914
+ *
915
+ * Reject a question request from the AI assistant.
916
+ */
917
+ reject<ThrowOnError extends boolean = false>(parameters: {
918
+ requestID: string;
919
+ directory?: string;
920
+ workspace?: string;
921
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<QuestionRejectResponses, QuestionRejectErrors, ThrowOnError, "fields">;
922
+ }
923
+ export declare class Permission extends HeyApiClient {
924
+ /**
925
+ * List pending permissions
926
+ *
927
+ * Get all pending permission requests across all sessions.
928
+ */
929
+ list<ThrowOnError extends boolean = false>(parameters?: {
930
+ directory?: string;
931
+ workspace?: string;
932
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<PermissionListResponses, PermissionListErrors, ThrowOnError, "fields">;
933
+ /**
934
+ * Respond to permission request
935
+ *
936
+ * Approve or deny a permission request from the AI assistant.
937
+ */
938
+ reply<ThrowOnError extends boolean = false>(parameters: {
939
+ requestID: string;
940
+ directory?: string;
941
+ workspace?: string;
942
+ reply?: "once" | "always" | "reject";
943
+ message?: string;
944
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<PermissionReplyResponses, PermissionReplyErrors, ThrowOnError, "fields">;
945
+ /**
946
+ * Respond to permission
947
+ *
948
+ * Approve or deny a permission request from the AI assistant.
949
+ *
950
+ * @deprecated
951
+ */
952
+ respond<ThrowOnError extends boolean = false>(parameters: {
953
+ sessionID: string;
954
+ permissionID: string;
955
+ directory?: string;
956
+ workspace?: string;
957
+ response?: "once" | "always" | "reject";
958
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<PermissionRespondResponses, PermissionRespondErrors, ThrowOnError, "fields">;
959
+ /**
960
+ * Clear session escalation grants
961
+ *
962
+ * Drop every sandbox-escalation 'always' grant the session has accumulated. Session-scoped by design; other permission types are untouched.
963
+ */
964
+ clearEscalation<ThrowOnError extends boolean = false>(parameters: {
965
+ sessionID: string;
966
+ directory?: string;
967
+ workspace?: string;
968
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<PermissionClearEscalationResponses, PermissionClearEscalationErrors, ThrowOnError, "fields">;
969
+ }
970
+ export declare class Oauth extends HeyApiClient {
971
+ /**
972
+ * Start OAuth authorization
973
+ *
974
+ * Start the OAuth authorization flow for a provider.
975
+ */
976
+ authorize<ThrowOnError extends boolean = false>(parameters: {
977
+ providerID: string;
978
+ directory?: string;
979
+ workspace?: string;
980
+ method?: number;
981
+ inputs?: {
982
+ [key: string]: string;
983
+ };
984
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<ProviderOauthAuthorizeResponses, ProviderOauthAuthorizeErrors, ThrowOnError, "fields">;
985
+ /**
986
+ * Handle OAuth callback
987
+ *
988
+ * Handle the OAuth callback from a provider after user authorization.
989
+ */
990
+ callback<ThrowOnError extends boolean = false>(parameters: {
991
+ providerID: string;
992
+ directory?: string;
993
+ workspace?: string;
994
+ method?: number;
995
+ code?: string;
996
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<ProviderOauthCallbackResponses, ProviderOauthCallbackErrors, ThrowOnError, "fields">;
997
+ }
998
+ export declare class Provider extends HeyApiClient {
999
+ /**
1000
+ * List providers
1001
+ *
1002
+ * Get a list of all available AI providers, including both available and connected ones.
1003
+ */
1004
+ list<ThrowOnError extends boolean = false>(parameters?: {
1005
+ directory?: string;
1006
+ workspace?: string;
1007
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<ProviderListResponses, ProviderListErrors, ThrowOnError, "fields">;
1008
+ /**
1009
+ * Get provider auth methods
1010
+ *
1011
+ * Retrieve available authentication methods for all AI providers.
1012
+ */
1013
+ auth<ThrowOnError extends boolean = false>(parameters?: {
1014
+ directory?: string;
1015
+ workspace?: string;
1016
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<ProviderAuthResponses, ProviderAuthErrors, ThrowOnError, "fields">;
1017
+ private _oauth?;
1018
+ get oauth(): Oauth;
1019
+ }
1020
+ export declare class Session2 extends HeyApiClient {
1021
+ /**
1022
+ * List sessions
1023
+ *
1024
+ * Get a list of all OpenCode sessions, sorted by most recently updated.
1025
+ */
1026
+ list<ThrowOnError extends boolean = false>(parameters?: {
1027
+ directory?: string;
1028
+ workspace?: string;
1029
+ scope?: "project";
1030
+ path?: string;
1031
+ roots?: boolean | "true" | "false";
1032
+ start?: number;
1033
+ search?: string;
1034
+ limit?: number;
1035
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<SessionListResponses, SessionListErrors, ThrowOnError, "fields">;
1036
+ /**
1037
+ * Create session
1038
+ *
1039
+ * Create a new OpenCode session for interacting with AI assistants and managing conversations.
1040
+ */
1041
+ create<ThrowOnError extends boolean = false>(parameters?: {
1042
+ directory?: string;
1043
+ workspace?: string;
1044
+ parentID?: string;
1045
+ title?: string;
1046
+ agent?: string;
1047
+ model?: {
1048
+ id: string;
1049
+ providerID: string;
1050
+ variant?: string;
1051
+ };
1052
+ metadata?: {
1053
+ [key: string]: unknown;
1054
+ };
1055
+ permission?: PermissionRuleset;
1056
+ workspaceID?: string;
1057
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<SessionCreateResponses, SessionCreateErrors, ThrowOnError, "fields">;
1058
+ /**
1059
+ * Get session status
1060
+ *
1061
+ * Retrieve the current status of all sessions, including active, idle, and completed states.
1062
+ */
1063
+ status<ThrowOnError extends boolean = false>(parameters?: {
1064
+ directory?: string;
1065
+ workspace?: string;
1066
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<SessionStatusResponses, SessionStatusErrors, ThrowOnError, "fields">;
1067
+ /**
1068
+ * Delete session
1069
+ *
1070
+ * Delete a session and permanently remove all associated data, including messages and history.
1071
+ */
1072
+ delete<ThrowOnError extends boolean = false>(parameters: {
1073
+ sessionID: string;
1074
+ directory?: string;
1075
+ workspace?: string;
1076
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<SessionDeleteResponses, SessionDeleteErrors, ThrowOnError, "fields">;
1077
+ /**
1078
+ * Get session
1079
+ *
1080
+ * Retrieve detailed information about a specific OpenCode session.
1081
+ */
1082
+ get<ThrowOnError extends boolean = false>(parameters: {
1083
+ sessionID: string;
1084
+ directory?: string;
1085
+ workspace?: string;
1086
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<SessionGetResponses, SessionGetErrors, ThrowOnError, "fields">;
1087
+ /**
1088
+ * Update session
1089
+ *
1090
+ * Update properties of an existing session, such as title or other metadata.
1091
+ */
1092
+ update<ThrowOnError extends boolean = false>(parameters: {
1093
+ sessionID: string;
1094
+ directory?: string;
1095
+ workspace?: string;
1096
+ title?: string;
1097
+ metadata?: {
1098
+ [key: string]: unknown;
1099
+ };
1100
+ permission?: PermissionRuleset;
1101
+ time?: {
1102
+ archived?: number;
1103
+ };
1104
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<SessionUpdateResponses, SessionUpdateErrors, ThrowOnError, "fields">;
1105
+ /**
1106
+ * Get session children
1107
+ *
1108
+ * Retrieve all child sessions that were forked from the specified parent session.
1109
+ */
1110
+ children<ThrowOnError extends boolean = false>(parameters: {
1111
+ sessionID: string;
1112
+ directory?: string;
1113
+ workspace?: string;
1114
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<SessionChildrenResponses, SessionChildrenErrors, ThrowOnError, "fields">;
1115
+ /**
1116
+ * Get session todos
1117
+ *
1118
+ * Retrieve the todo list associated with a specific session, showing tasks and action items.
1119
+ */
1120
+ todo<ThrowOnError extends boolean = false>(parameters: {
1121
+ sessionID: string;
1122
+ directory?: string;
1123
+ workspace?: string;
1124
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<SessionTodoResponses, SessionTodoErrors, ThrowOnError, "fields">;
1125
+ /**
1126
+ * Get session messages
1127
+ *
1128
+ * Retrieve all messages in a session, including user prompts and AI responses.
1129
+ */
1130
+ messages<ThrowOnError extends boolean = false>(parameters: {
1131
+ sessionID: string;
1132
+ directory?: string;
1133
+ workspace?: string;
1134
+ limit?: number;
1135
+ before?: string;
1136
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<SessionMessagesResponses, SessionMessagesErrors, ThrowOnError, "fields">;
1137
+ /**
1138
+ * Send message
1139
+ *
1140
+ * Create and send a new message to a session, streaming the AI response.
1141
+ */
1142
+ prompt<ThrowOnError extends boolean = false>(parameters: {
1143
+ sessionID: string;
1144
+ directory?: string;
1145
+ workspace?: string;
1146
+ messageID?: string;
1147
+ model?: {
1148
+ providerID: string;
1149
+ modelID: string;
1150
+ };
1151
+ agent?: string;
1152
+ noReply?: boolean;
1153
+ tools?: {
1154
+ [key: string]: boolean;
1155
+ };
1156
+ format?: OutputFormat;
1157
+ system?: string;
1158
+ variant?: string;
1159
+ sandboxMode?: "read-only" | "workspace-write" | "full-access";
1160
+ parts?: Array<TextPartInput | FilePartInput | AgentPartInput | SubtaskPartInput>;
1161
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<SessionPromptResponses, SessionPromptErrors, ThrowOnError, "fields">;
1162
+ /**
1163
+ * Delete message
1164
+ *
1165
+ * Permanently delete a specific message and all of its parts from a session without reverting file changes.
1166
+ */
1167
+ deleteMessage<ThrowOnError extends boolean = false>(parameters: {
1168
+ sessionID: string;
1169
+ messageID: string;
1170
+ directory?: string;
1171
+ workspace?: string;
1172
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<SessionDeleteMessageResponses, SessionDeleteMessageErrors, ThrowOnError, "fields">;
1173
+ /**
1174
+ * Get message
1175
+ *
1176
+ * Retrieve a specific message from a session by its message ID.
1177
+ */
1178
+ message<ThrowOnError extends boolean = false>(parameters: {
1179
+ sessionID: string;
1180
+ messageID: string;
1181
+ directory?: string;
1182
+ workspace?: string;
1183
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<SessionMessageResponses, SessionMessageErrors, ThrowOnError, "fields">;
1184
+ /**
1185
+ * Fork session
1186
+ *
1187
+ * Create a new session by forking an existing session at a specific message point.
1188
+ */
1189
+ fork<ThrowOnError extends boolean = false>(parameters: {
1190
+ sessionID: string;
1191
+ directory?: string;
1192
+ workspace?: string;
1193
+ messageID?: string;
1194
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<SessionForkResponses, SessionForkErrors, ThrowOnError, "fields">;
1195
+ /**
1196
+ * Abort session
1197
+ *
1198
+ * Abort an active session and stop any ongoing AI processing or command execution.
1199
+ */
1200
+ abort<ThrowOnError extends boolean = false>(parameters: {
1201
+ sessionID: string;
1202
+ directory?: string;
1203
+ workspace?: string;
1204
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<SessionAbortResponses, SessionAbortErrors, ThrowOnError, "fields">;
1205
+ /**
1206
+ * Initialize session
1207
+ *
1208
+ * Analyze the current application and create an AGENTS.md file with project-specific agent configurations.
1209
+ */
1210
+ init<ThrowOnError extends boolean = false>(parameters: {
1211
+ sessionID: string;
1212
+ directory?: string;
1213
+ workspace?: string;
1214
+ modelID?: string;
1215
+ providerID?: string;
1216
+ messageID?: string;
1217
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<SessionInitResponses, SessionInitErrors, ThrowOnError, "fields">;
1218
+ /**
1219
+ * Unshare session
1220
+ *
1221
+ * Remove the shareable link for a session, making it private again.
1222
+ */
1223
+ unshare<ThrowOnError extends boolean = false>(parameters: {
1224
+ sessionID: string;
1225
+ directory?: string;
1226
+ workspace?: string;
1227
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<SessionUnshareResponses, SessionUnshareErrors, ThrowOnError, "fields">;
1228
+ /**
1229
+ * Share session
1230
+ *
1231
+ * Create a shareable link for a session, allowing others to view the conversation.
1232
+ */
1233
+ share<ThrowOnError extends boolean = false>(parameters: {
1234
+ sessionID: string;
1235
+ directory?: string;
1236
+ workspace?: string;
1237
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<SessionShareResponses, SessionShareErrors, ThrowOnError, "fields">;
1238
+ /**
1239
+ * Summarize session
1240
+ *
1241
+ * Generate a concise summary of the session using AI compaction to preserve key information.
1242
+ */
1243
+ summarize<ThrowOnError extends boolean = false>(parameters: {
1244
+ sessionID: string;
1245
+ directory?: string;
1246
+ workspace?: string;
1247
+ providerID?: string;
1248
+ modelID?: string;
1249
+ auto?: boolean;
1250
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<SessionSummarizeResponses, SessionSummarizeErrors, ThrowOnError, "fields">;
1251
+ /**
1252
+ * Send async message
1253
+ *
1254
+ * Create and send a new message to a session asynchronously, starting the session if needed and returning immediately.
1255
+ */
1256
+ promptAsync<ThrowOnError extends boolean = false>(parameters: {
1257
+ sessionID: string;
1258
+ directory?: string;
1259
+ workspace?: string;
1260
+ messageID?: string;
1261
+ model?: {
1262
+ providerID: string;
1263
+ modelID: string;
1264
+ };
1265
+ agent?: string;
1266
+ noReply?: boolean;
1267
+ tools?: {
1268
+ [key: string]: boolean;
1269
+ };
1270
+ format?: OutputFormat;
1271
+ system?: string;
1272
+ variant?: string;
1273
+ sandboxMode?: "read-only" | "workspace-write" | "full-access";
1274
+ parts?: Array<TextPartInput | FilePartInput | AgentPartInput | SubtaskPartInput>;
1275
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<SessionPromptAsyncResponses, SessionPromptAsyncErrors, ThrowOnError, "fields">;
1276
+ /**
1277
+ * Send command
1278
+ *
1279
+ * Send a new command to a session for execution by the AI assistant.
1280
+ */
1281
+ command<ThrowOnError extends boolean = false>(parameters: {
1282
+ sessionID: string;
1283
+ directory?: string;
1284
+ workspace?: string;
1285
+ messageID?: string;
1286
+ agent?: string;
1287
+ model?: string;
1288
+ arguments?: string;
1289
+ command?: string;
1290
+ variant?: string;
1291
+ parts?: Array<{
1292
+ id?: string;
1293
+ type: "file";
1294
+ mime: string;
1295
+ filename?: string;
1296
+ url: string;
1297
+ source?: FilePartSource;
1298
+ }>;
1299
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<SessionCommandResponses, SessionCommandErrors, ThrowOnError, "fields">;
1300
+ /**
1301
+ * Run shell command
1302
+ *
1303
+ * Execute a shell command within the session context and return the AI's response.
1304
+ */
1305
+ shell<ThrowOnError extends boolean = false>(parameters: {
1306
+ sessionID: string;
1307
+ directory?: string;
1308
+ workspace?: string;
1309
+ messageID?: string;
1310
+ agent?: string;
1311
+ model?: {
1312
+ providerID: string;
1313
+ modelID: string;
1314
+ };
1315
+ command?: string;
1316
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<SessionShellResponses, SessionShellErrors, ThrowOnError, "fields">;
1317
+ /**
1318
+ * Revert message
1319
+ *
1320
+ * Revert a specific message in a session, undoing its effects and restoring the previous state.
1321
+ */
1322
+ revert<ThrowOnError extends boolean = false>(parameters: {
1323
+ sessionID: string;
1324
+ directory?: string;
1325
+ workspace?: string;
1326
+ messageID?: string;
1327
+ partID?: string;
1328
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<SessionRevertResponses, SessionRevertErrors, ThrowOnError, "fields">;
1329
+ /**
1330
+ * Restore reverted messages
1331
+ *
1332
+ * Restore all previously reverted messages in a session.
1333
+ */
1334
+ unrevert<ThrowOnError extends boolean = false>(parameters: {
1335
+ sessionID: string;
1336
+ directory?: string;
1337
+ workspace?: string;
1338
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<SessionUnrevertResponses, SessionUnrevertErrors, ThrowOnError, "fields">;
1339
+ }
1340
+ export declare class Part extends HeyApiClient {
1341
+ /**
1342
+ * Delete a part from a message.
1343
+ */
1344
+ delete<ThrowOnError extends boolean = false>(parameters: {
1345
+ sessionID: string;
1346
+ messageID: string;
1347
+ partID: string;
1348
+ directory?: string;
1349
+ workspace?: string;
1350
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<PartDeleteResponses, PartDeleteErrors, ThrowOnError, "fields">;
1351
+ /**
1352
+ * Update a part in a message.
1353
+ */
1354
+ update<ThrowOnError extends boolean = false>(parameters: {
1355
+ sessionID: string;
1356
+ messageID: string;
1357
+ partID: string;
1358
+ directory?: string;
1359
+ workspace?: string;
1360
+ part?: Part2;
1361
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<PartUpdateResponses, PartUpdateErrors, ThrowOnError, "fields">;
1362
+ }
1363
+ export declare class History extends HeyApiClient {
1364
+ /**
1365
+ * List sync events
1366
+ *
1367
+ * 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.
1368
+ */
1369
+ list<ThrowOnError extends boolean = false>(parameters?: {
1370
+ directory?: string;
1371
+ workspace?: string;
1372
+ body?: {
1373
+ [key: string]: number;
1374
+ };
1375
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<SyncHistoryListResponses, SyncHistoryListErrors, ThrowOnError, "fields">;
1376
+ }
1377
+ export declare class Sync extends HeyApiClient {
1378
+ /**
1379
+ * Start workspace sync
1380
+ *
1381
+ * Start sync loops for workspaces in the current project that have active sessions.
1382
+ */
1383
+ start<ThrowOnError extends boolean = false>(parameters?: {
1384
+ directory?: string;
1385
+ workspace?: string;
1386
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<SyncStartResponses, SyncStartErrors, ThrowOnError, "fields">;
1387
+ /**
1388
+ * Replay sync events
1389
+ *
1390
+ * Validate and replay a complete sync event history.
1391
+ */
1392
+ replay<ThrowOnError extends boolean = false>(parameters?: {
1393
+ query_directory?: string;
1394
+ workspace?: string;
1395
+ body_directory?: string;
1396
+ events?: Array<{
1397
+ id: string;
1398
+ aggregateID: string;
1399
+ seq: number;
1400
+ type: string;
1401
+ data: {
1402
+ [key: string]: unknown;
1403
+ };
1404
+ }>;
1405
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<SyncReplayResponses, SyncReplayErrors, ThrowOnError, "fields">;
1406
+ /**
1407
+ * Steal session into workspace
1408
+ *
1409
+ * Update a session to belong to the current workspace through the sync event system.
1410
+ */
1411
+ steal<ThrowOnError extends boolean = false>(parameters?: {
1412
+ directory?: string;
1413
+ workspace?: string;
1414
+ sessionID?: string;
1415
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<SyncStealResponses, SyncStealErrors, ThrowOnError, "fields">;
1416
+ private _history?;
1417
+ get history(): History;
1418
+ }
1419
+ export declare class Session3 extends HeyApiClient {
1420
+ /**
1421
+ * List v2 sessions
1422
+ *
1423
+ * Retrieve sessions in the requested order. Items keep that order across pages; use cursor.next or cursor.previous to move through the ordered list.
1424
+ */
1425
+ list<ThrowOnError extends boolean = false>(parameters?: {
1426
+ directory?: string;
1427
+ workspace?: string;
1428
+ limit?: number;
1429
+ order?: "asc" | "desc";
1430
+ path?: string;
1431
+ roots?: boolean | "true" | "false";
1432
+ start?: number;
1433
+ search?: string;
1434
+ cursor?: string;
1435
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<V2SessionListResponses, V2SessionListErrors, ThrowOnError, "fields">;
1436
+ /**
1437
+ * Send v2 message
1438
+ *
1439
+ * Create a v2 session message and queue it for the agent loop.
1440
+ */
1441
+ prompt<ThrowOnError extends boolean = false>(parameters: {
1442
+ sessionID: string;
1443
+ directory?: string;
1444
+ workspace?: string;
1445
+ prompt?: Prompt;
1446
+ delivery?: SessionDelivery;
1447
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<V2SessionPromptResponses, V2SessionPromptErrors, ThrowOnError, "fields">;
1448
+ /**
1449
+ * Compact v2 session
1450
+ *
1451
+ * Compact a v2 session conversation.
1452
+ */
1453
+ compact<ThrowOnError extends boolean = false>(parameters: {
1454
+ sessionID: string;
1455
+ directory?: string;
1456
+ workspace?: string;
1457
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<V2SessionCompactResponses, V2SessionCompactErrors, ThrowOnError, "fields">;
1458
+ /**
1459
+ * Wait for v2 session
1460
+ *
1461
+ * Wait for a v2 session agent loop to become idle.
1462
+ */
1463
+ wait<ThrowOnError extends boolean = false>(parameters: {
1464
+ sessionID: string;
1465
+ directory?: string;
1466
+ workspace?: string;
1467
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<V2SessionWaitResponses, V2SessionWaitErrors, ThrowOnError, "fields">;
1468
+ /**
1469
+ * Get v2 session context
1470
+ *
1471
+ * Retrieve the active context messages for a v2 session (all messages after the last compaction).
1472
+ */
1473
+ context<ThrowOnError extends boolean = false>(parameters: {
1474
+ sessionID: string;
1475
+ directory?: string;
1476
+ workspace?: string;
1477
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<V2SessionContextResponses, V2SessionContextErrors, ThrowOnError, "fields">;
1478
+ /**
1479
+ * Get v2 session messages
1480
+ *
1481
+ * Retrieve projected v2 messages for a session. Items keep the requested order across pages; use cursor.next or cursor.previous to move through the ordered timeline.
1482
+ */
1483
+ messages<ThrowOnError extends boolean = false>(parameters: {
1484
+ sessionID: string;
1485
+ directory?: string;
1486
+ workspace?: string;
1487
+ limit?: number;
1488
+ order?: "asc" | "desc";
1489
+ cursor?: string;
1490
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<V2SessionMessagesResponses, V2SessionMessagesErrors, ThrowOnError, "fields">;
1491
+ }
1492
+ export declare class Model extends HeyApiClient {
1493
+ /**
1494
+ * List v2 models
1495
+ *
1496
+ * Retrieve available v2 models ordered by release date.
1497
+ */
1498
+ list<ThrowOnError extends boolean = false>(parameters?: {
1499
+ location?: {
1500
+ directory?: string;
1501
+ workspace?: string;
1502
+ };
1503
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<V2ModelListResponses, V2ModelListErrors, ThrowOnError, "fields">;
1504
+ }
1505
+ export declare class Provider2 extends HeyApiClient {
1506
+ /**
1507
+ * List v2 providers
1508
+ *
1509
+ * Retrieve active v2 AI providers so clients can show provider availability and configuration.
1510
+ */
1511
+ list<ThrowOnError extends boolean = false>(parameters?: {
1512
+ location?: {
1513
+ directory?: string;
1514
+ workspace?: string;
1515
+ };
1516
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<V2ProviderListResponses, V2ProviderListErrors, ThrowOnError, "fields">;
1517
+ /**
1518
+ * Get v2 provider
1519
+ *
1520
+ * Retrieve a single v2 AI provider so clients can inspect its availability and endpoint settings.
1521
+ */
1522
+ get<ThrowOnError extends boolean = false>(parameters: {
1523
+ providerID: string;
1524
+ location?: {
1525
+ directory?: string;
1526
+ workspace?: string;
1527
+ };
1528
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<V2ProviderGetResponses, V2ProviderGetErrors, ThrowOnError, "fields">;
1529
+ }
1530
+ export declare class V2 extends HeyApiClient {
1531
+ private _session?;
1532
+ get session(): Session3;
1533
+ private _model?;
1534
+ get model(): Model;
1535
+ private _provider?;
1536
+ get provider(): Provider2;
1537
+ }
1538
+ export declare class Control extends HeyApiClient {
1539
+ /**
1540
+ * Get next TUI request
1541
+ *
1542
+ * Retrieve the next TUI request from the queue for processing.
1543
+ */
1544
+ next<ThrowOnError extends boolean = false>(parameters?: {
1545
+ directory?: string;
1546
+ workspace?: string;
1547
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<TuiControlNextResponses, TuiControlNextErrors, ThrowOnError, "fields">;
1548
+ /**
1549
+ * Submit TUI response
1550
+ *
1551
+ * Submit a response to the TUI request queue to complete a pending request.
1552
+ */
1553
+ response<ThrowOnError extends boolean = false>(parameters?: {
1554
+ directory?: string;
1555
+ workspace?: string;
1556
+ body?: unknown;
1557
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<TuiControlResponseResponses, TuiControlResponseErrors, ThrowOnError, "fields">;
1558
+ }
1559
+ export declare class Tui extends HeyApiClient {
1560
+ /**
1561
+ * Append TUI prompt
1562
+ *
1563
+ * Append prompt to the TUI.
1564
+ */
1565
+ appendPrompt<ThrowOnError extends boolean = false>(parameters?: {
1566
+ directory?: string;
1567
+ workspace?: string;
1568
+ text?: string;
1569
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<TuiAppendPromptResponses, TuiAppendPromptErrors, ThrowOnError, "fields">;
1570
+ /**
1571
+ * Open help dialog
1572
+ *
1573
+ * Open the help dialog in the TUI to display user assistance information.
1574
+ */
1575
+ openHelp<ThrowOnError extends boolean = false>(parameters?: {
1576
+ directory?: string;
1577
+ workspace?: string;
1578
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<TuiOpenHelpResponses, TuiOpenHelpErrors, ThrowOnError, "fields">;
1579
+ /**
1580
+ * Open sessions dialog
1581
+ *
1582
+ * Open the session dialog.
1583
+ */
1584
+ openSessions<ThrowOnError extends boolean = false>(parameters?: {
1585
+ directory?: string;
1586
+ workspace?: string;
1587
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<TuiOpenSessionsResponses, TuiOpenSessionsErrors, ThrowOnError, "fields">;
1588
+ /**
1589
+ * Open themes dialog
1590
+ *
1591
+ * Open the theme dialog.
1592
+ */
1593
+ openThemes<ThrowOnError extends boolean = false>(parameters?: {
1594
+ directory?: string;
1595
+ workspace?: string;
1596
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<TuiOpenThemesResponses, TuiOpenThemesErrors, ThrowOnError, "fields">;
1597
+ /**
1598
+ * Open models dialog
1599
+ *
1600
+ * Open the model dialog.
1601
+ */
1602
+ openModels<ThrowOnError extends boolean = false>(parameters?: {
1603
+ directory?: string;
1604
+ workspace?: string;
1605
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<TuiOpenModelsResponses, TuiOpenModelsErrors, ThrowOnError, "fields">;
1606
+ /**
1607
+ * Submit TUI prompt
1608
+ *
1609
+ * Submit the prompt.
1610
+ */
1611
+ submitPrompt<ThrowOnError extends boolean = false>(parameters?: {
1612
+ directory?: string;
1613
+ workspace?: string;
1614
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<TuiSubmitPromptResponses, TuiSubmitPromptErrors, ThrowOnError, "fields">;
1615
+ /**
1616
+ * Clear TUI prompt
1617
+ *
1618
+ * Clear the prompt.
1619
+ */
1620
+ clearPrompt<ThrowOnError extends boolean = false>(parameters?: {
1621
+ directory?: string;
1622
+ workspace?: string;
1623
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<TuiClearPromptResponses, TuiClearPromptErrors, ThrowOnError, "fields">;
1624
+ /**
1625
+ * Execute TUI command
1626
+ *
1627
+ * Execute a TUI command.
1628
+ */
1629
+ executeCommand<ThrowOnError extends boolean = false>(parameters?: {
1630
+ directory?: string;
1631
+ workspace?: string;
1632
+ command?: string;
1633
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<TuiExecuteCommandResponses, TuiExecuteCommandErrors, ThrowOnError, "fields">;
1634
+ /**
1635
+ * Show TUI toast
1636
+ *
1637
+ * Show a toast notification in the TUI.
1638
+ */
1639
+ showToast<ThrowOnError extends boolean = false>(parameters?: {
1640
+ directory?: string;
1641
+ workspace?: string;
1642
+ title?: string;
1643
+ message?: string;
1644
+ variant?: "info" | "success" | "warning" | "error";
1645
+ duration?: number;
1646
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<TuiShowToastResponses, TuiShowToastErrors, ThrowOnError, "fields">;
1647
+ /**
1648
+ * Publish TUI event
1649
+ *
1650
+ * Publish a TUI event.
1651
+ */
1652
+ publish<ThrowOnError extends boolean = false>(parameters?: {
1653
+ directory?: string;
1654
+ workspace?: string;
1655
+ body?: EventTuiPromptAppend2 | EventTuiCommandExecute2 | EventTuiToastShow2 | EventTuiSessionSelect2;
1656
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<TuiPublishResponses, TuiPublishErrors, ThrowOnError, "fields">;
1657
+ /**
1658
+ * Select session
1659
+ *
1660
+ * Navigate the TUI to display the specified session.
1661
+ */
1662
+ selectSession<ThrowOnError extends boolean = false>(parameters?: {
1663
+ directory?: string;
1664
+ workspace?: string;
1665
+ sessionID?: string;
1666
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<TuiSelectSessionResponses, TuiSelectSessionErrors, ThrowOnError, "fields">;
1667
+ private _control?;
1668
+ get control(): Control;
1669
+ }
1670
+ export declare class OpencodeClient extends HeyApiClient {
1671
+ static readonly __registry: HeyApiRegistry<OpencodeClient>;
1672
+ constructor(args?: {
1673
+ client?: Client;
1674
+ key?: string;
1675
+ });
1676
+ private _auth?;
1677
+ get auth(): Auth;
1678
+ private _app?;
1679
+ get app(): App;
1680
+ private _global?;
1681
+ get global(): Global;
1682
+ private _wopalSpace?;
1683
+ get wopalSpace(): WopalSpace;
1684
+ private _workbench?;
1685
+ get workbench(): Workbench;
1686
+ private _event?;
1687
+ get event(): Event;
1688
+ private _config?;
1689
+ get config(): Config2;
1690
+ private _experimental?;
1691
+ get experimental(): Experimental;
1692
+ private _tool?;
1693
+ get tool(): Tool;
1694
+ private _worktree?;
1695
+ get worktree(): Worktree;
1696
+ private _find?;
1697
+ get find(): Find;
1698
+ private _file?;
1699
+ get file(): File;
1700
+ private _instance?;
1701
+ get instance(): Instance;
1702
+ private _path?;
1703
+ get path(): Path;
1704
+ private _vcs?;
1705
+ get vcs(): Vcs;
1706
+ private _command?;
1707
+ get command(): Command;
1708
+ private _lsp?;
1709
+ get lsp(): Lsp;
1710
+ private _formatter?;
1711
+ get formatter(): Formatter;
1712
+ private _mcp?;
1713
+ get mcp(): Mcp;
1714
+ private _project?;
1715
+ get project(): Project;
1716
+ private _pty?;
1717
+ get pty(): Pty;
1718
+ private _question?;
1719
+ get question(): Question;
1720
+ private _permission?;
1721
+ get permission(): Permission;
1722
+ private _provider?;
1723
+ get provider(): Provider;
1724
+ private _session?;
1725
+ get session(): Session2;
1726
+ private _part?;
1727
+ get part(): Part;
1728
+ private _sync?;
1729
+ get sync(): Sync;
1730
+ private _v2?;
1731
+ get v2(): V2;
1732
+ private _tui?;
1733
+ get tui(): Tui;
1734
+ }
1735
+ export {};