@opencode/client 0.0.0-beta-19275

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 (62) hide show
  1. package/README.md +27 -0
  2. package/dist/contract.d.ts +1 -0
  3. package/dist/contract.js +1 -0
  4. package/dist/effect/api/api.d.ts +2659 -0
  5. package/dist/effect/api/api.js +0 -0
  6. package/dist/effect/api.d.ts +8 -0
  7. package/dist/effect/api.js +0 -0
  8. package/dist/effect/client.d.ts +2535 -0
  9. package/dist/effect/client.js +29 -0
  10. package/dist/effect/generated/client-error.d.ts +7 -0
  11. package/dist/effect/generated/client-error.js +5 -0
  12. package/dist/effect/generated/client.d.ts +2534 -0
  13. package/dist/effect/generated/client.js +602 -0
  14. package/dist/effect/generated/index.d.ts +2 -0
  15. package/dist/effect/generated/index.js +2 -0
  16. package/dist/effect/index.d.ts +35 -0
  17. package/dist/effect/index.js +30 -0
  18. package/dist/effect/rpc.d.ts +20 -0
  19. package/dist/effect/rpc.js +49 -0
  20. package/dist/effect/service.d.ts +78 -0
  21. package/dist/effect/service.js +259 -0
  22. package/dist/promise/api.d.ts +24 -0
  23. package/dist/promise/api.js +0 -0
  24. package/dist/promise/client.d.ts +257 -0
  25. package/dist/promise/client.js +13 -0
  26. package/dist/promise/generated/client-error.d.ts +6 -0
  27. package/dist/promise/generated/client-error.js +8 -0
  28. package/dist/promise/generated/client.d.ts +264 -0
  29. package/dist/promise/generated/client.js +1425 -0
  30. package/dist/promise/generated/index.d.ts +3 -0
  31. package/dist/promise/generated/index.js +3 -0
  32. package/dist/promise/generated/types.d.ts +8717 -0
  33. package/dist/promise/generated/types.js +30 -0
  34. package/dist/promise/index.d.ts +6 -0
  35. package/dist/promise/index.js +2 -0
  36. package/dist/promise/rpc.d.ts +32 -0
  37. package/dist/promise/rpc.js +86 -0
  38. package/dist/promise/service.d.ts +26 -0
  39. package/dist/promise/service.js +247 -0
  40. package/dist/pty-handoff.d.ts +9 -0
  41. package/dist/pty-handoff.js +121 -0
  42. package/dist/rpc-runtime.d.ts +21 -0
  43. package/dist/rpc-runtime.js +32 -0
  44. package/dist/service-contender.d.ts +11 -0
  45. package/dist/service-contender.js +56 -0
  46. package/dist/service-timing.d.ts +13 -0
  47. package/dist/service-timing.js +19 -0
  48. package/dist/service-version.d.ts +2 -0
  49. package/dist/service-version.js +9 -0
  50. package/dist/service.d.ts +52 -0
  51. package/dist/service.js +0 -0
  52. package/dist/shared-events.d.ts +11 -0
  53. package/dist/shared-events.js +137 -0
  54. package/dist/solid/connection.d.ts +37 -0
  55. package/dist/solid/connection.js +246 -0
  56. package/dist/solid/data.d.ts +199 -0
  57. package/dist/solid/data.js +1724 -0
  58. package/dist/solid/index.d.ts +3 -0
  59. package/dist/solid/index.js +3 -0
  60. package/dist/solid/pty.d.ts +22 -0
  61. package/dist/solid/pty.js +43 -0
  62. package/package.json +85 -0
@@ -0,0 +1,602 @@
1
+ // Generated by @opencode/httpapi-codegen. Do not edit.
2
+ import { Effect, Stream, Schema } from "effect";
3
+ import { Sse } from "effect/unstable/encoding";
4
+ import { HttpClientError } from "effect/unstable/http";
5
+ import { HttpApiClient } from "effect/unstable/httpapi";
6
+ import { ClientApi } from "../../contract";
7
+ import { ClientError } from "./client-error.js";
8
+ const mapClientError = (error) => HttpClientError.isHttpClientError(error) || Schema.isSchemaError(error) || Sse.Retry.is(error)
9
+ ? new ClientError({ cause: error })
10
+ : error;
11
+ const preserveEffect = () => (effect) => effect;
12
+ const preserveStream = () => (stream) => stream;
13
+ const EndpointHealthGet = (raw) => () => preserveEffect()(raw["health.get"]({}).pipe(Effect.mapError(mapClientError)));
14
+ const adaptGroupHealth = (raw) => ({ get: EndpointHealthGet(raw) });
15
+ const EndpointServerGet = (raw) => () => preserveEffect()(raw["server.get"]({}).pipe(Effect.mapError(mapClientError)));
16
+ const adaptGroupServer = (raw) => ({ get: EndpointServerGet(raw) });
17
+ const EndpointLocationGet = (raw) => (input) => preserveEffect()(raw["location.get"]({ query: { location: input?.["location"] } }).pipe(Effect.mapError(mapClientError)));
18
+ const adaptGroupLocation = (raw) => ({ get: EndpointLocationGet(raw) });
19
+ const EndpointAgentList = (raw) => (input) => preserveEffect()(raw["agent.list"]({ query: { location: input?.["location"] } }).pipe(Effect.mapError(mapClientError)));
20
+ const EndpointAgentGet = (raw) => (input) => preserveEffect()(raw["agent.get"]({ params: { agentID: input["agentID"] }, query: { location: input["location"] } }).pipe(Effect.mapError(mapClientError)));
21
+ const adaptGroupAgent = (raw) => ({
22
+ list: EndpointAgentList(raw),
23
+ get: EndpointAgentGet(raw),
24
+ });
25
+ const EndpointPluginList = (raw) => (input) => preserveEffect()(raw["plugin.list"]({ query: { location: input?.["location"] } }).pipe(Effect.mapError(mapClientError)));
26
+ const EndpointPluginAwaitActivation = (raw) => (input) => preserveEffect()(raw["plugin.awaitActivation"]({ query: { location: input?.["location"] } }).pipe(Effect.mapError(mapClientError)));
27
+ const EndpointPluginCheck = (raw) => (input) => preserveEffect()(raw["plugin.check"]({ query: { location: input?.["location"] }, payload: { target: input?.["target"] } }).pipe(Effect.mapError(mapClientError)));
28
+ const EndpointPluginUpdate = (raw) => (input) => preserveEffect()(raw["plugin.update"]({ query: { location: input["location"] }, payload: { targets: input["targets"] } }).pipe(Effect.mapError(mapClientError)));
29
+ const adaptGroupPlugin = (raw) => ({
30
+ list: EndpointPluginList(raw),
31
+ awaitActivation: EndpointPluginAwaitActivation(raw),
32
+ check: EndpointPluginCheck(raw),
33
+ update: EndpointPluginUpdate(raw),
34
+ });
35
+ const EndpointSessionList = (raw) => (input) => preserveEffect()(raw["session.list"]({
36
+ query: {
37
+ workspace: input?.["workspace"],
38
+ limit: input?.["limit"],
39
+ order: input?.["order"],
40
+ search: input?.["search"],
41
+ parentID: input?.["parentID"],
42
+ directory: input?.["directory"],
43
+ project: input?.["project"],
44
+ subpath: input?.["subpath"],
45
+ cursor: input?.["cursor"],
46
+ },
47
+ }).pipe(Effect.mapError(mapClientError)));
48
+ const EndpointSessionStats = (raw) => (input) => preserveEffect()(raw["session.stats"]({
49
+ query: {
50
+ from: input?.["from"],
51
+ to: input?.["to"],
52
+ project: input?.["project"],
53
+ timezone: input?.["timezone"],
54
+ tools: input?.["tools"],
55
+ },
56
+ }).pipe(Effect.mapError(mapClientError), Effect.map((value) => value.data)));
57
+ const EndpointSessionCreate = (raw) => (input) => preserveEffect()(raw["session.create"]({
58
+ payload: {
59
+ id: input?.["id"],
60
+ title: input?.["title"],
61
+ agent: input?.["agent"],
62
+ model: input?.["model"],
63
+ location: input?.["location"],
64
+ metadata: input?.["metadata"],
65
+ },
66
+ }).pipe(Effect.mapError(mapClientError), Effect.map((value) => value.data)));
67
+ const EndpointSessionImport = (raw) => (input) => preserveEffect()(raw["session.import"]({
68
+ payload: { info: input["info"], messages: input["messages"], location: input["location"] },
69
+ }).pipe(Effect.mapError(mapClientError), Effect.map((value) => value.data)));
70
+ const EndpointSessionExport = (raw) => (input) => preserveEffect()(raw["session.export"]({ params: { sessionID: input["sessionID"] }, query: { sanitize: input["sanitize"] } }).pipe(Effect.mapError(mapClientError), Effect.map((value) => value.data)));
71
+ const EndpointSessionActive = (raw) => () => preserveEffect()(raw["session.active"]({}).pipe(Effect.mapError(mapClientError), Effect.map((value) => value.data)));
72
+ const EndpointSessionGet = (raw) => (input) => preserveEffect()(raw["session.get"]({ params: { sessionID: input["sessionID"] } }).pipe(Effect.mapError(mapClientError), Effect.map((value) => value.data)));
73
+ const EndpointSessionRemove = (raw) => (input) => preserveEffect()(raw["session.remove"]({ params: { sessionID: input["sessionID"] } }).pipe(Effect.mapError(mapClientError)));
74
+ const EndpointSessionFork = (raw) => (input) => preserveEffect()(raw["session.fork"]({ params: { sessionID: input["sessionID"] }, payload: { boundary: input["boundary"] } }).pipe(Effect.mapError(mapClientError), Effect.map((value) => value.data)));
75
+ const EndpointSessionSwitchAgent = (raw) => (input) => preserveEffect()(raw["session.switchAgent"]({ params: { sessionID: input["sessionID"] }, payload: { agent: input["agent"] } }).pipe(Effect.mapError(mapClientError)));
76
+ const EndpointSessionSwitchModel = (raw) => (input) => preserveEffect()(raw["session.switchModel"]({ params: { sessionID: input["sessionID"] }, payload: { model: input["model"] } }).pipe(Effect.mapError(mapClientError)));
77
+ const EndpointSessionRename = (raw) => (input) => preserveEffect()(raw["session.rename"]({ params: { sessionID: input["sessionID"] }, payload: { title: input["title"] } }).pipe(Effect.mapError(mapClientError)));
78
+ const EndpointSessionMove = (raw) => (input) => preserveEffect()(raw["session.move"]({
79
+ params: { sessionID: input["sessionID"] },
80
+ payload: { directory: input["directory"], workspaceID: input["workspaceID"], delivery: input["delivery"] },
81
+ }).pipe(Effect.mapError(mapClientError)));
82
+ const EndpointSessionPrompt = (raw) => (input) => preserveEffect()(raw["session.prompt"]({
83
+ params: { sessionID: input["sessionID"] },
84
+ payload: {
85
+ id: input["id"],
86
+ text: input["text"],
87
+ files: input["files"],
88
+ agents: input["agents"],
89
+ skills: input["skills"],
90
+ metadata: input["metadata"],
91
+ delivery: input["delivery"],
92
+ resume: input["resume"],
93
+ },
94
+ }).pipe(Effect.mapError(mapClientError), Effect.map((value) => value.data)));
95
+ const EndpointSessionCommand = (raw) => (input) => preserveEffect()(raw["session.command"]({
96
+ params: { sessionID: input["sessionID"] },
97
+ payload: {
98
+ command: input["command"],
99
+ text: input["text"],
100
+ files: input["files"],
101
+ agents: input["agents"],
102
+ skills: input["skills"],
103
+ delivery: input["delivery"],
104
+ },
105
+ }).pipe(Effect.mapError(mapClientError)));
106
+ const EndpointSessionSkill = (raw) => (input) => preserveEffect()(raw["session.skill"]({
107
+ params: { sessionID: input["sessionID"] },
108
+ payload: { id: input["id"], skill: input["skill"], resume: input["resume"] },
109
+ }).pipe(Effect.mapError(mapClientError)));
110
+ const EndpointSessionSynthetic = (raw) => (input) => preserveEffect()(raw["session.synthetic"]({
111
+ params: { sessionID: input["sessionID"] },
112
+ payload: {
113
+ id: input["id"],
114
+ text: input["text"],
115
+ description: input["description"],
116
+ metadata: input["metadata"],
117
+ delivery: input["delivery"],
118
+ resume: input["resume"],
119
+ },
120
+ }).pipe(Effect.mapError(mapClientError), Effect.map((value) => value.data)));
121
+ const EndpointSessionShell = (raw) => (input) => preserveEffect()(raw["session.shell"]({
122
+ params: { sessionID: input["sessionID"] },
123
+ payload: { id: input["id"], command: input["command"] },
124
+ }).pipe(Effect.mapError(mapClientError)));
125
+ const EndpointSessionCompact = (raw) => (input) => preserveEffect()(raw["session.compact"]({
126
+ params: { sessionID: input["sessionID"] },
127
+ payload: { id: input["id"], delivery: input["delivery"] },
128
+ }).pipe(Effect.mapError(mapClientError), Effect.map((value) => value.data)));
129
+ const EndpointSessionWait = (raw) => (input) => preserveEffect()(raw["session.wait"]({ params: { sessionID: input["sessionID"] } }).pipe(Effect.mapError(mapClientError)));
130
+ const EndpointSessionRevertStage = (raw) => (input) => preserveEffect()(raw["session.revert.stage"]({
131
+ params: { sessionID: input["sessionID"] },
132
+ payload: { messageID: input["messageID"], files: input["files"] },
133
+ }).pipe(Effect.mapError(mapClientError), Effect.map((value) => value.data)));
134
+ const EndpointSessionRevertClear = (raw) => (input) => preserveEffect()(raw["session.revert.clear"]({ params: { sessionID: input["sessionID"] } }).pipe(Effect.mapError(mapClientError)));
135
+ const EndpointSessionRevertCommit = (raw) => (input) => preserveEffect()(raw["session.revert.commit"]({ params: { sessionID: input["sessionID"] } }).pipe(Effect.mapError(mapClientError)));
136
+ const EndpointSessionContext = (raw) => (input) => preserveEffect()(raw["session.context"]({ params: { sessionID: input["sessionID"] } }).pipe(Effect.mapError(mapClientError), Effect.map((value) => value.data)));
137
+ const EndpointSessionInboxList = (raw) => (input) => preserveEffect()(raw["session.inbox.list"]({ params: { sessionID: input["sessionID"] } }).pipe(Effect.mapError(mapClientError), Effect.map((value) => value.data)));
138
+ const EndpointSessionInboxCancel = (raw) => (input) => preserveEffect()(raw["session.inbox.cancel"]({ params: { sessionID: input["sessionID"], inboxID: input["inboxID"] } }).pipe(Effect.mapError(mapClientError)));
139
+ const EndpointSessionInboxSteer = (raw) => (input) => preserveEffect()(raw["session.inbox.steer"]({ params: { sessionID: input["sessionID"], inboxID: input["inboxID"] } }).pipe(Effect.mapError(mapClientError)));
140
+ const EndpointSessionInboxQueue = (raw) => (input) => preserveEffect()(raw["session.inbox.queue"]({ params: { sessionID: input["sessionID"], inboxID: input["inboxID"] } }).pipe(Effect.mapError(mapClientError)));
141
+ const EndpointSessionInstructionsEntryList = (raw) => (input) => preserveEffect()(raw["session.instructions.entry.list"]({ params: { sessionID: input["sessionID"] } }).pipe(Effect.mapError(mapClientError), Effect.map((value) => value.data)));
142
+ const EndpointSessionInstructionsEntryPut = (raw) => (input) => preserveEffect()(raw["session.instructions.entry.put"]({
143
+ params: { sessionID: input["sessionID"], key: input["key"] },
144
+ payload: { value: input["value"] },
145
+ }).pipe(Effect.mapError(mapClientError)));
146
+ const EndpointSessionInstructionsEntryRemove = (raw) => (input) => preserveEffect()(raw["session.instructions.entry.remove"]({ params: { sessionID: input["sessionID"], key: input["key"] } }).pipe(Effect.mapError(mapClientError)));
147
+ const EndpointSessionGenerate = (raw) => (input) => preserveEffect()(raw["session.generate"]({ params: { sessionID: input["sessionID"] }, payload: { prompt: input["prompt"] } }).pipe(Effect.mapError(mapClientError), Effect.map((value) => value.data)));
148
+ const EndpointSessionLog = (raw) => (input) => preserveStream()(Stream.unwrap(raw["session.log"]({
149
+ params: { sessionID: input["sessionID"] },
150
+ query: { after: input["after"], follow: input["follow"] },
151
+ }).pipe(Effect.mapError(mapClientError), Effect.map((stream) => stream.pipe(Stream.mapError(mapClientError))))));
152
+ const EndpointSessionInterrupt = (raw) => (input) => preserveEffect()(raw["session.interrupt"]({
153
+ params: { sessionID: input["sessionID"] },
154
+ query: { continue: input["continue"] },
155
+ }).pipe(Effect.mapError(mapClientError)));
156
+ const EndpointSessionBackground = (raw) => (input) => preserveEffect()(raw["session.background"]({ params: { sessionID: input["sessionID"] } }).pipe(Effect.mapError(mapClientError)));
157
+ const EndpointSessionMessage = (raw) => (input) => preserveEffect()(raw["session.message"]({ params: { sessionID: input["sessionID"], messageID: input["messageID"] } }).pipe(Effect.mapError(mapClientError), Effect.map((value) => value.data)));
158
+ const EndpointSessionMessageUpdate = (raw) => (input) => preserveEffect()(raw["session.messageUpdate"]({
159
+ params: { sessionID: input["sessionID"], messageID: input["messageID"] },
160
+ payload: { content: input["content"] },
161
+ }).pipe(Effect.mapError(mapClientError), Effect.map((value) => value.data)));
162
+ const EndpointSessionEnvironment = (raw) => (input) => preserveEffect()(raw["session.environment"]({
163
+ params: { sessionID: input["sessionID"] },
164
+ payload: { variables: input["variables"] },
165
+ }).pipe(Effect.mapError(mapClientError)));
166
+ const EndpointSessionView = (raw) => (input) => preserveEffect()(raw["session.view"]({ params: { sessionID: input["sessionID"] }, payload: { idle: input["idle"] } }).pipe(Effect.mapError(mapClientError)));
167
+ const adaptGroupSession = (raw) => ({
168
+ list: EndpointSessionList(raw),
169
+ stats: EndpointSessionStats(raw),
170
+ create: EndpointSessionCreate(raw),
171
+ import: EndpointSessionImport(raw),
172
+ export: EndpointSessionExport(raw),
173
+ active: EndpointSessionActive(raw),
174
+ get: EndpointSessionGet(raw),
175
+ remove: EndpointSessionRemove(raw),
176
+ fork: EndpointSessionFork(raw),
177
+ switchAgent: EndpointSessionSwitchAgent(raw),
178
+ switchModel: EndpointSessionSwitchModel(raw),
179
+ rename: EndpointSessionRename(raw),
180
+ move: EndpointSessionMove(raw),
181
+ prompt: EndpointSessionPrompt(raw),
182
+ command: EndpointSessionCommand(raw),
183
+ skill: EndpointSessionSkill(raw),
184
+ synthetic: EndpointSessionSynthetic(raw),
185
+ shell: EndpointSessionShell(raw),
186
+ compact: EndpointSessionCompact(raw),
187
+ wait: EndpointSessionWait(raw),
188
+ revert: {
189
+ stage: EndpointSessionRevertStage(raw),
190
+ clear: EndpointSessionRevertClear(raw),
191
+ commit: EndpointSessionRevertCommit(raw),
192
+ },
193
+ context: EndpointSessionContext(raw),
194
+ inbox: {
195
+ list: EndpointSessionInboxList(raw),
196
+ cancel: EndpointSessionInboxCancel(raw),
197
+ steer: EndpointSessionInboxSteer(raw),
198
+ queue: EndpointSessionInboxQueue(raw),
199
+ },
200
+ instructions: {
201
+ entry: {
202
+ list: EndpointSessionInstructionsEntryList(raw),
203
+ put: EndpointSessionInstructionsEntryPut(raw),
204
+ remove: EndpointSessionInstructionsEntryRemove(raw),
205
+ },
206
+ },
207
+ generate: EndpointSessionGenerate(raw),
208
+ log: EndpointSessionLog(raw),
209
+ interrupt: EndpointSessionInterrupt(raw),
210
+ background: EndpointSessionBackground(raw),
211
+ message: EndpointSessionMessage(raw),
212
+ messageUpdate: EndpointSessionMessageUpdate(raw),
213
+ environment: EndpointSessionEnvironment(raw),
214
+ view: EndpointSessionView(raw),
215
+ });
216
+ const EndpointMessageList = (raw) => (input) => preserveEffect()(raw["session.messages"]({
217
+ params: { sessionID: input["sessionID"] },
218
+ query: { limit: input["limit"], order: input["order"], cursor: input["cursor"] },
219
+ }).pipe(Effect.mapError(mapClientError)));
220
+ const adaptGroupMessage = (raw) => ({ list: EndpointMessageList(raw) });
221
+ const EndpointModelList = (raw) => (input) => preserveEffect()(raw["model.list"]({ query: { location: input?.["location"] } }).pipe(Effect.mapError(mapClientError)));
222
+ const EndpointModelDefault = (raw) => (input) => preserveEffect()(raw["model.default"]({ query: { location: input?.["location"] } }).pipe(Effect.mapError(mapClientError)));
223
+ const adaptGroupModel = (raw) => ({
224
+ list: EndpointModelList(raw),
225
+ default: EndpointModelDefault(raw),
226
+ });
227
+ const EndpointGenerateText = (raw) => (input) => preserveEffect()(raw["generate.text"]({ payload: { prompt: input["prompt"], model: input["model"] } }).pipe(Effect.mapError(mapClientError), Effect.map((value) => value.data)));
228
+ const adaptGroupGenerate = (raw) => ({ text: EndpointGenerateText(raw) });
229
+ const EndpointProviderList = (raw) => (input) => preserveEffect()(raw["provider.list"]({ query: { location: input?.["location"] } }).pipe(Effect.mapError(mapClientError)));
230
+ const EndpointProviderGet = (raw) => (input) => preserveEffect()(raw["provider.get"]({ params: { providerID: input["providerID"] }, query: { location: input["location"] } }).pipe(Effect.mapError(mapClientError)));
231
+ const adaptGroupProvider = (raw) => ({
232
+ list: EndpointProviderList(raw),
233
+ get: EndpointProviderGet(raw),
234
+ });
235
+ const EndpointIntegrationList = (raw) => (input) => preserveEffect()(raw["integration.list"]({ query: { location: input?.["location"] } }).pipe(Effect.mapError(mapClientError)));
236
+ const EndpointIntegrationGet = (raw) => (input) => preserveEffect()(raw["integration.get"]({
237
+ params: { integrationID: input["integrationID"] },
238
+ query: { location: input["location"] },
239
+ }).pipe(Effect.mapError(mapClientError)));
240
+ const EndpointIntegrationWellknownAdd = (raw) => (input) => preserveEffect()(raw["integration.wellknown.add"]({ query: { location: input["location"] }, payload: { url: input["url"] } }).pipe(Effect.mapError(mapClientError)));
241
+ const EndpointIntegrationConnectKey = (raw) => (input) => preserveEffect()(raw["integration.connect.key"]({
242
+ params: { integrationID: input["integrationID"] },
243
+ query: { location: input["location"] },
244
+ payload: { key: input["key"], answer: input["answer"], label: input["label"] },
245
+ }).pipe(Effect.mapError(mapClientError)));
246
+ const EndpointIntegrationOauthConnect = (raw) => (input) => preserveEffect()(raw["integration.oauth.connect"]({
247
+ params: { integrationID: input["integrationID"] },
248
+ query: { location: input["location"] },
249
+ payload: { methodID: input["methodID"], answer: input["answer"], label: input["label"] },
250
+ }).pipe(Effect.mapError(mapClientError)));
251
+ const EndpointIntegrationOauthStatus = (raw) => (input) => preserveEffect()(raw["integration.oauth.status"]({
252
+ params: { integrationID: input["integrationID"], attemptID: input["attemptID"] },
253
+ query: { location: input["location"] },
254
+ }).pipe(Effect.mapError(mapClientError)));
255
+ const EndpointIntegrationOauthComplete = (raw) => (input) => preserveEffect()(raw["integration.oauth.complete"]({
256
+ params: { integrationID: input["integrationID"], attemptID: input["attemptID"] },
257
+ query: { location: input["location"] },
258
+ payload: { code: input["code"] },
259
+ }).pipe(Effect.mapError(mapClientError)));
260
+ const EndpointIntegrationOauthCancel = (raw) => (input) => preserveEffect()(raw["integration.oauth.cancel"]({
261
+ params: { integrationID: input["integrationID"], attemptID: input["attemptID"] },
262
+ query: { location: input["location"] },
263
+ }).pipe(Effect.mapError(mapClientError)));
264
+ const EndpointIntegrationCommandConnect = (raw) => (input) => preserveEffect()(raw["integration.command.connect"]({
265
+ params: { integrationID: input["integrationID"] },
266
+ query: { location: input["location"] },
267
+ payload: { methodID: input["methodID"], label: input["label"] },
268
+ }).pipe(Effect.mapError(mapClientError)));
269
+ const EndpointIntegrationCommandStatus = (raw) => (input) => preserveEffect()(raw["integration.command.status"]({
270
+ params: { integrationID: input["integrationID"], attemptID: input["attemptID"] },
271
+ query: { location: input["location"] },
272
+ }).pipe(Effect.mapError(mapClientError)));
273
+ const EndpointIntegrationCommandCancel = (raw) => (input) => preserveEffect()(raw["integration.command.cancel"]({
274
+ params: { integrationID: input["integrationID"], attemptID: input["attemptID"] },
275
+ query: { location: input["location"] },
276
+ }).pipe(Effect.mapError(mapClientError)));
277
+ const adaptGroupIntegration = (raw) => ({
278
+ list: EndpointIntegrationList(raw),
279
+ get: EndpointIntegrationGet(raw),
280
+ wellknown: { add: EndpointIntegrationWellknownAdd(raw) },
281
+ connect: { key: EndpointIntegrationConnectKey(raw) },
282
+ oauth: {
283
+ connect: EndpointIntegrationOauthConnect(raw),
284
+ status: EndpointIntegrationOauthStatus(raw),
285
+ complete: EndpointIntegrationOauthComplete(raw),
286
+ cancel: EndpointIntegrationOauthCancel(raw),
287
+ },
288
+ command: {
289
+ connect: EndpointIntegrationCommandConnect(raw),
290
+ status: EndpointIntegrationCommandStatus(raw),
291
+ cancel: EndpointIntegrationCommandCancel(raw),
292
+ },
293
+ });
294
+ const EndpointMcpList = (raw) => (input) => preserveEffect()(raw["mcp.list"]({ query: { location: input?.["location"] } }).pipe(Effect.mapError(mapClientError)));
295
+ const EndpointMcpAdd = (raw) => (input) => preserveEffect()(raw["mcp.add"]({
296
+ params: { server: input["server"] },
297
+ query: { location: input["location"] },
298
+ payload: { config: input["config"] },
299
+ }).pipe(Effect.mapError(mapClientError)));
300
+ const EndpointMcpRemove = (raw) => (input) => preserveEffect()(raw["mcp.remove"]({ params: { server: input["server"] }, query: { location: input["location"] } }).pipe(Effect.mapError(mapClientError)));
301
+ const EndpointMcpConnect = (raw) => (input) => preserveEffect()(raw["mcp.connect"]({ params: { server: input["server"] }, query: { location: input["location"] } }).pipe(Effect.mapError(mapClientError)));
302
+ const EndpointMcpDisconnect = (raw) => (input) => preserveEffect()(raw["mcp.disconnect"]({ params: { server: input["server"] }, query: { location: input["location"] } }).pipe(Effect.mapError(mapClientError)));
303
+ const EndpointMcpResourceCatalog = (raw) => (input) => preserveEffect()(raw["mcp.resource.catalog"]({ query: { location: input?.["location"] } }).pipe(Effect.mapError(mapClientError)));
304
+ const adaptGroupMcp = (raw) => ({
305
+ list: EndpointMcpList(raw),
306
+ add: EndpointMcpAdd(raw),
307
+ remove: EndpointMcpRemove(raw),
308
+ connect: EndpointMcpConnect(raw),
309
+ disconnect: EndpointMcpDisconnect(raw),
310
+ resource: { catalog: EndpointMcpResourceCatalog(raw) },
311
+ });
312
+ const EndpointCredentialUpdate = (raw) => (input) => preserveEffect()(raw["credential.update"]({
313
+ params: { credentialID: input["credentialID"] },
314
+ query: { location: input["location"] },
315
+ payload: { label: input["label"] },
316
+ }).pipe(Effect.mapError(mapClientError)));
317
+ const EndpointCredentialActivate = (raw) => (input) => preserveEffect()(raw["credential.activate"]({
318
+ params: { credentialID: input["credentialID"] },
319
+ query: { location: input["location"] },
320
+ }).pipe(Effect.mapError(mapClientError)));
321
+ const EndpointCredentialRemove = (raw) => (input) => preserveEffect()(raw["credential.remove"]({
322
+ params: { credentialID: input["credentialID"] },
323
+ query: { location: input["location"] },
324
+ }).pipe(Effect.mapError(mapClientError)));
325
+ const adaptGroupCredential = (raw) => ({
326
+ update: EndpointCredentialUpdate(raw),
327
+ activate: EndpointCredentialActivate(raw),
328
+ remove: EndpointCredentialRemove(raw),
329
+ });
330
+ const EndpointProjectList = (raw) => () => preserveEffect()(raw["project.list"]({}).pipe(Effect.mapError(mapClientError)));
331
+ const EndpointProjectUpdate = (raw) => (input) => preserveEffect()(raw["project.update"]({
332
+ params: { projectID: input["projectID"] },
333
+ payload: { canonical: input["canonical"], name: input["name"], icon: input["icon"], commands: input["commands"] },
334
+ }).pipe(Effect.mapError(mapClientError)));
335
+ const EndpointProjectCurrent = (raw) => (input) => preserveEffect()(raw["project.current"]({ query: { location: input?.["location"] } }).pipe(Effect.mapError(mapClientError)));
336
+ const adaptGroupProject = (raw) => ({
337
+ list: EndpointProjectList(raw),
338
+ update: EndpointProjectUpdate(raw),
339
+ current: EndpointProjectCurrent(raw),
340
+ });
341
+ const EndpointFormRequestList = (raw) => (input) => preserveEffect()(raw["form.request.list"]({ query: { location: input?.["location"] } }).pipe(Effect.mapError(mapClientError)));
342
+ const EndpointFormList = (raw) => (input) => preserveEffect()(raw["session.form.list"]({ params: { sessionID: input["sessionID"] } }).pipe(Effect.mapError(mapClientError), Effect.map((value) => value.data)));
343
+ const EndpointFormCreate = (raw) => (input) => preserveEffect()(raw["session.form.create"]({
344
+ params: { sessionID: input["sessionID"] },
345
+ payload: { id: input["id"], title: input["title"], metadata: input["metadata"], fields: input["fields"] },
346
+ }).pipe(Effect.mapError(mapClientError), Effect.map((value) => value.data)));
347
+ const EndpointFormGet = (raw) => (input) => preserveEffect()(raw["session.form.get"]({ params: { sessionID: input["sessionID"], formID: input["formID"] } }).pipe(Effect.mapError(mapClientError), Effect.map((value) => value.data)));
348
+ const EndpointFormState = (raw) => (input) => preserveEffect()(raw["session.form.state"]({ params: { sessionID: input["sessionID"], formID: input["formID"] } }).pipe(Effect.mapError(mapClientError), Effect.map((value) => value.data)));
349
+ const EndpointFormReply = (raw) => (input) => preserveEffect()(raw["session.form.reply"]({
350
+ params: { sessionID: input["sessionID"], formID: input["formID"] },
351
+ payload: { answer: input["answer"] },
352
+ }).pipe(Effect.mapError(mapClientError)));
353
+ const EndpointFormCancel = (raw) => (input) => preserveEffect()(raw["session.form.cancel"]({ params: { sessionID: input["sessionID"], formID: input["formID"] } }).pipe(Effect.mapError(mapClientError)));
354
+ const adaptGroupForm = (raw) => ({
355
+ request: { list: EndpointFormRequestList(raw) },
356
+ list: EndpointFormList(raw),
357
+ create: EndpointFormCreate(raw),
358
+ get: EndpointFormGet(raw),
359
+ state: EndpointFormState(raw),
360
+ reply: EndpointFormReply(raw),
361
+ cancel: EndpointFormCancel(raw),
362
+ });
363
+ const EndpointPermissionRequestList = (raw) => (input) => preserveEffect()(raw["permission.request.list"]({ query: { location: input?.["location"] } }).pipe(Effect.mapError(mapClientError)));
364
+ const EndpointPermissionSavedList = (raw) => (input) => preserveEffect()(raw["permission.saved.list"]({ query: { projectID: input?.["projectID"] } }).pipe(Effect.mapError(mapClientError), Effect.map((value) => value.data)));
365
+ const EndpointPermissionSavedRemove = (raw) => (input) => preserveEffect()(raw["permission.saved.remove"]({ params: { id: input["id"] } }).pipe(Effect.mapError(mapClientError)));
366
+ const EndpointPermissionCreate = (raw) => (input) => preserveEffect()(raw["session.permission.create"]({
367
+ params: { sessionID: input["sessionID"] },
368
+ payload: {
369
+ id: input["id"],
370
+ action: input["action"],
371
+ resources: input["resources"],
372
+ save: input["save"],
373
+ metadata: input["metadata"],
374
+ source: input["source"],
375
+ agent: input["agent"],
376
+ },
377
+ }).pipe(Effect.mapError(mapClientError), Effect.map((value) => value.data)));
378
+ const EndpointPermissionList = (raw) => (input) => preserveEffect()(raw["session.permission.list"]({ params: { sessionID: input["sessionID"] } }).pipe(Effect.mapError(mapClientError), Effect.map((value) => value.data)));
379
+ const EndpointPermissionGet = (raw) => (input) => preserveEffect()(raw["session.permission.get"]({ params: { sessionID: input["sessionID"], requestID: input["requestID"] } }).pipe(Effect.mapError(mapClientError), Effect.map((value) => value.data)));
380
+ const EndpointPermissionReply = (raw) => (input) => preserveEffect()(raw["session.permission.reply"]({
381
+ params: { sessionID: input["sessionID"], requestID: input["requestID"] },
382
+ payload: { reply: input["reply"], message: input["message"] },
383
+ }).pipe(Effect.mapError(mapClientError)));
384
+ const adaptGroupPermission = (raw) => ({
385
+ request: { list: EndpointPermissionRequestList(raw) },
386
+ saved: { list: EndpointPermissionSavedList(raw), remove: EndpointPermissionSavedRemove(raw) },
387
+ create: EndpointPermissionCreate(raw),
388
+ list: EndpointPermissionList(raw),
389
+ get: EndpointPermissionGet(raw),
390
+ reply: EndpointPermissionReply(raw),
391
+ });
392
+ const EndpointFileList = (raw) => (input) => preserveEffect()(raw["fs.list"]({ query: { location: input?.["location"], path: input?.["path"] } }).pipe(Effect.mapError(mapClientError)));
393
+ const EndpointFileFind = (raw) => (input) => preserveEffect()(raw["fs.find"]({
394
+ query: { location: input["location"], query: input["query"], type: input["type"], limit: input["limit"] },
395
+ }).pipe(Effect.mapError(mapClientError)));
396
+ const adaptGroupFile = (raw) => ({ list: EndpointFileList(raw), find: EndpointFileFind(raw) });
397
+ const EndpointCommandList = (raw) => (input) => preserveEffect()(raw["command.list"]({ query: { location: input?.["location"] } }).pipe(Effect.mapError(mapClientError)));
398
+ const adaptGroupCommand = (raw) => ({ list: EndpointCommandList(raw) });
399
+ const EndpointSkillList = (raw) => (input) => preserveEffect()(raw["skill.list"]({ query: { location: input?.["location"] } }).pipe(Effect.mapError(mapClientError)));
400
+ const adaptGroupSkill = (raw) => ({ list: EndpointSkillList(raw) });
401
+ const EndpointRpcCall = (raw) => (input) => preserveEffect()(raw["rpc.call"]({
402
+ params: { rpcID: input["rpcID"], method: input["method"] },
403
+ query: { location: input["location"] },
404
+ payload: { input: input["input"] },
405
+ }).pipe(Effect.mapError(mapClientError)));
406
+ const adaptGroupRpc = (raw) => ({ call: EndpointRpcCall(raw) });
407
+ const EndpointEventSubscribe = (raw) => () => preserveStream()(Stream.unwrap(raw["event.subscribe"]({}).pipe(Effect.mapError(mapClientError), Effect.map((stream) => stream.pipe(Stream.mapError(mapClientError))))));
408
+ const adaptGroupEvent = (raw) => ({ subscribe: EndpointEventSubscribe(raw) });
409
+ const EndpointPtyList = (raw) => (input) => preserveEffect()(raw["pty.list"]({ query: { location: input?.["location"] } }).pipe(Effect.mapError(mapClientError)));
410
+ const EndpointPtyCreate = (raw) => (input) => preserveEffect()(raw["pty.create"]({
411
+ query: { location: input?.["location"] },
412
+ payload: {
413
+ command: input?.["command"],
414
+ args: input?.["args"],
415
+ cwd: input?.["cwd"],
416
+ title: input?.["title"],
417
+ env: input?.["env"],
418
+ },
419
+ }).pipe(Effect.mapError(mapClientError)));
420
+ const EndpointPtyGet = (raw) => (input) => preserveEffect()(raw["pty.get"]({ params: { ptyID: input["ptyID"] }, query: { location: input["location"] } }).pipe(Effect.mapError(mapClientError)));
421
+ const EndpointPtyUpdate = (raw) => (input) => preserveEffect()(raw["pty.update"]({
422
+ params: { ptyID: input["ptyID"] },
423
+ query: { location: input["location"] },
424
+ payload: { title: input["title"], size: input["size"] },
425
+ }).pipe(Effect.mapError(mapClientError)));
426
+ const EndpointPtyRemove = (raw) => (input) => preserveEffect()(raw["pty.remove"]({ params: { ptyID: input["ptyID"] }, query: { location: input["location"] } }).pipe(Effect.mapError(mapClientError)));
427
+ const EndpointPtyConnectToken = (raw) => (input) => preserveEffect()(raw["pty.connectToken"]({
428
+ params: { ptyID: input["ptyID"] },
429
+ query: { location: input["location"] },
430
+ headers: { "x-opencode-ticket": input["x-opencode-ticket"] },
431
+ }).pipe(Effect.mapError(mapClientError)));
432
+ const adaptGroupPty = (raw) => ({
433
+ list: EndpointPtyList(raw),
434
+ create: EndpointPtyCreate(raw),
435
+ get: EndpointPtyGet(raw),
436
+ update: EndpointPtyUpdate(raw),
437
+ remove: EndpointPtyRemove(raw),
438
+ connect: { token: EndpointPtyConnectToken(raw) },
439
+ });
440
+ const EndpointExperimentalPersistentPtyRead = (raw) => (input) => preserveEffect()(raw["persistentPty.read"]({ params: { sessionID: input["sessionID"] }, query: { lines: input["lines"] } }).pipe(Effect.mapError(mapClientError), Effect.map((value) => value.data)));
441
+ const EndpointExperimentalPersistentPtyList = (raw) => (input) => preserveEffect()(raw["persistentPty.list"]({ params: { sessionID: input["sessionID"] } }).pipe(Effect.mapError(mapClientError), Effect.map((value) => value.data)));
442
+ const EndpointExperimentalPersistentPtyCreate = (raw) => (input) => preserveEffect()(raw["persistentPty.create"]({
443
+ params: { sessionID: input["sessionID"] },
444
+ payload: {
445
+ command: input["command"],
446
+ args: input["args"],
447
+ cwd: input["cwd"],
448
+ title: input["title"],
449
+ env: input["env"],
450
+ size: input["size"],
451
+ },
452
+ }).pipe(Effect.mapError(mapClientError), Effect.map((value) => value.data)));
453
+ const EndpointExperimentalPersistentPtyShutdown = (raw) => () => preserveEffect()(raw["persistentPty.shutdown"]({}).pipe(Effect.mapError(mapClientError)));
454
+ const EndpointExperimentalPersistentPtyHandoff = (raw) => () => preserveEffect()(raw["persistentPty.handoff"]({}).pipe(Effect.mapError(mapClientError)));
455
+ const EndpointExperimentalPersistentPtyGet = (raw) => (input) => preserveEffect()(raw["persistentPty.get"]({ params: { ptyID: input["ptyID"] } }).pipe(Effect.mapError(mapClientError), Effect.map((value) => value.data)));
456
+ const EndpointExperimentalPersistentPtyUpdate = (raw) => (input) => preserveEffect()(raw["persistentPty.update"]({
457
+ params: { ptyID: input["ptyID"] },
458
+ payload: { attachmentID: input["attachmentID"], size: input["size"] },
459
+ }).pipe(Effect.mapError(mapClientError), Effect.map((value) => value.data)));
460
+ const EndpointExperimentalPersistentPtySnapshot = (raw) => (input) => preserveEffect()(raw["persistentPty.snapshot"]({ params: { ptyID: input["ptyID"] } }).pipe(Effect.mapError(mapClientError), Effect.map((value) => value.data)));
461
+ const EndpointExperimentalPersistentPtyRemove = (raw) => (input) => preserveEffect()(raw["persistentPty.remove"]({ params: { ptyID: input["ptyID"] } }).pipe(Effect.mapError(mapClientError)));
462
+ const EndpointExperimentalPersistentPtyConnectToken = (raw) => (input) => preserveEffect()(raw["persistentPty.connectToken"]({
463
+ params: { ptyID: input["ptyID"] },
464
+ headers: { "x-opencode-ticket": input["x-opencode-ticket"] },
465
+ }).pipe(Effect.mapError(mapClientError), Effect.map((value) => value.data)));
466
+ const adaptGroupExperimental = (raw) => ({
467
+ persistentPty: {
468
+ read: EndpointExperimentalPersistentPtyRead(raw),
469
+ list: EndpointExperimentalPersistentPtyList(raw),
470
+ create: EndpointExperimentalPersistentPtyCreate(raw),
471
+ shutdown: EndpointExperimentalPersistentPtyShutdown(raw),
472
+ handoff: EndpointExperimentalPersistentPtyHandoff(raw),
473
+ get: EndpointExperimentalPersistentPtyGet(raw),
474
+ update: EndpointExperimentalPersistentPtyUpdate(raw),
475
+ snapshot: EndpointExperimentalPersistentPtySnapshot(raw),
476
+ remove: EndpointExperimentalPersistentPtyRemove(raw),
477
+ connectToken: EndpointExperimentalPersistentPtyConnectToken(raw),
478
+ },
479
+ });
480
+ const EndpointShellList = (raw) => (input) => preserveEffect()(raw["shell.list"]({ query: { location: input?.["location"] } }).pipe(Effect.mapError(mapClientError)));
481
+ const EndpointShellCreate = (raw) => (input) => preserveEffect()(raw["shell.create"]({
482
+ query: { location: input["location"] },
483
+ payload: { command: input["command"], cwd: input["cwd"], timeout: input["timeout"], metadata: input["metadata"] },
484
+ }).pipe(Effect.mapError(mapClientError)));
485
+ const EndpointShellGet = (raw) => (input) => preserveEffect()(raw["shell.get"]({ params: { id: input["id"] }, query: { location: input["location"] } }).pipe(Effect.mapError(mapClientError)));
486
+ const EndpointShellTimeout = (raw) => (input) => preserveEffect()(raw["shell.timeout"]({
487
+ params: { id: input["id"] },
488
+ query: { location: input["location"] },
489
+ payload: { timeout: input["timeout"] },
490
+ }).pipe(Effect.mapError(mapClientError)));
491
+ const EndpointShellOutput = (raw) => (input) => preserveEffect()(raw["shell.output"]({
492
+ params: { id: input["id"] },
493
+ query: { location: input["location"], cursor: input["cursor"], limit: input["limit"] },
494
+ }).pipe(Effect.mapError(mapClientError)));
495
+ const EndpointShellRemove = (raw) => (input) => preserveEffect()(raw["shell.remove"]({ params: { id: input["id"] }, query: { location: input["location"] } }).pipe(Effect.mapError(mapClientError)));
496
+ const adaptGroupShell = (raw) => ({
497
+ list: EndpointShellList(raw),
498
+ create: EndpointShellCreate(raw),
499
+ get: EndpointShellGet(raw),
500
+ timeout: EndpointShellTimeout(raw),
501
+ output: EndpointShellOutput(raw),
502
+ remove: EndpointShellRemove(raw),
503
+ });
504
+ const EndpointReferenceList = (raw) => (input) => preserveEffect()(raw["reference.list"]({ query: { location: input?.["location"] } }).pipe(Effect.mapError(mapClientError)));
505
+ const adaptGroupReference = (raw) => ({ list: EndpointReferenceList(raw) });
506
+ const EndpointWorktreeList = (raw) => (input) => preserveEffect()(raw["worktree.list"]({ query: { location: input?.["location"] } }).pipe(Effect.mapError(mapClientError)));
507
+ const EndpointWorktreeCreate = (raw) => (input) => preserveEffect()(raw["worktree.create"]({
508
+ query: { location: input?.["location"] },
509
+ payload: {
510
+ strategy: input?.["strategy"],
511
+ from: input?.["from"],
512
+ branch: input?.["branch"],
513
+ directory: input?.["directory"],
514
+ name: input?.["name"],
515
+ },
516
+ }).pipe(Effect.mapError(mapClientError)));
517
+ const EndpointWorktreeRemove = (raw) => (input) => preserveEffect()(raw["worktree.remove"]({
518
+ query: { location: input["location"] },
519
+ payload: { directory: input["directory"], force: input["force"] },
520
+ }).pipe(Effect.mapError(mapClientError)));
521
+ const EndpointWorktreeRefresh = (raw) => (input) => preserveEffect()(raw["worktree.refresh"]({ query: { location: input?.["location"] } }).pipe(Effect.mapError(mapClientError)));
522
+ const adaptGroupWorktree = (raw) => ({
523
+ list: EndpointWorktreeList(raw),
524
+ create: EndpointWorktreeCreate(raw),
525
+ remove: EndpointWorktreeRemove(raw),
526
+ refresh: EndpointWorktreeRefresh(raw),
527
+ });
528
+ const EndpointWorkspaceCreate = (raw) => (input) => preserveEffect()(raw["workspace.create"]({ payload: { id: input["id"], provider: input["provider"] } }).pipe(Effect.mapError(mapClientError), Effect.map((value) => value.data)));
529
+ const EndpointWorkspaceDestroy = (raw) => (input) => preserveEffect()(raw["workspace.destroy"]({ params: { workspaceID: input["workspaceID"] } }).pipe(Effect.mapError(mapClientError)));
530
+ const adaptGroupWorkspace = (raw) => ({
531
+ create: EndpointWorkspaceCreate(raw),
532
+ destroy: EndpointWorkspaceDestroy(raw),
533
+ });
534
+ const EndpointVcsGet = (raw) => (input) => preserveEffect()(raw["vcs.get"]({ query: { location: input?.["location"] } }).pipe(Effect.mapError(mapClientError)));
535
+ const EndpointVcsBase = (raw) => (input) => preserveEffect()(raw["vcs.base"]({ query: { location: input?.["location"] } }).pipe(Effect.mapError(mapClientError)));
536
+ const EndpointVcsStatus = (raw) => (input) => preserveEffect()(raw["vcs.status"]({ query: { location: input?.["location"] } }).pipe(Effect.mapError(mapClientError)));
537
+ const EndpointVcsBranches = (raw) => (input) => preserveEffect()(raw["vcs.branches"]({
538
+ query: { location: input?.["location"], search: input?.["search"], limit: input?.["limit"] },
539
+ }).pipe(Effect.mapError(mapClientError)));
540
+ const EndpointVcsDiff = (raw) => (input) => preserveEffect()(raw["vcs.diff"]({
541
+ query: { location: input["location"], mode: input["mode"], base: input["base"], context: input["context"] },
542
+ }).pipe(Effect.mapError(mapClientError)));
543
+ const adaptGroupVcs = (raw) => ({
544
+ get: EndpointVcsGet(raw),
545
+ base: EndpointVcsBase(raw),
546
+ status: EndpointVcsStatus(raw),
547
+ branches: EndpointVcsBranches(raw),
548
+ diff: EndpointVcsDiff(raw),
549
+ });
550
+ const EndpointDebugLocationList = (raw) => () => preserveEffect()(raw["debug.location"]({}).pipe(Effect.mapError(mapClientError)));
551
+ const EndpointDebugLocationEvict = (raw) => (input) => preserveEffect()(raw["debug.location.evict"]({ query: { location: input?.["location"] } }).pipe(Effect.mapError(mapClientError)));
552
+ const adaptGroupDebug = (raw) => ({
553
+ location: { list: EndpointDebugLocationList(raw), evict: EndpointDebugLocationEvict(raw) },
554
+ });
555
+ const EndpointMigrationV1Status = (raw) => () => preserveEffect()(raw["migration.v1.status"]({}).pipe(Effect.mapError(mapClientError)));
556
+ const adaptGroupMigration = (raw) => ({ v1: { status: EndpointMigrationV1Status(raw) } });
557
+ const EndpointWebsearchProviders = (raw) => (input) => preserveEffect()(raw["websearch.providers"]({ query: { location: input?.["location"] } }).pipe(Effect.mapError(mapClientError)));
558
+ const EndpointWebsearchQuery = (raw) => (input) => preserveEffect()(raw["websearch.query"]({
559
+ query: { location: input["location"] },
560
+ payload: { query: input["query"], providerID: input["providerID"] },
561
+ }).pipe(Effect.mapError(mapClientError)));
562
+ const adaptGroupWebsearch = (raw) => ({
563
+ providers: EndpointWebsearchProviders(raw),
564
+ query: EndpointWebsearchQuery(raw),
565
+ });
566
+ const EndpointConfigGet = (raw) => (input) => preserveEffect()(raw["config.get"]({ query: { location: input?.["location"] } }).pipe(Effect.mapError(mapClientError)));
567
+ const adaptGroupConfig = (raw) => ({ get: EndpointConfigGet(raw) });
568
+ const adaptClient = (raw) => ({
569
+ health: adaptGroupHealth(raw["server.health"]),
570
+ server: adaptGroupServer(raw["server.server"]),
571
+ location: adaptGroupLocation(raw["server.location"]),
572
+ agent: adaptGroupAgent(raw["server.agent"]),
573
+ plugin: adaptGroupPlugin(raw["server.plugin"]),
574
+ session: adaptGroupSession(raw["server.session"]),
575
+ message: adaptGroupMessage(raw["server.message"]),
576
+ model: adaptGroupModel(raw["server.model"]),
577
+ generate: adaptGroupGenerate(raw["server.generate"]),
578
+ provider: adaptGroupProvider(raw["server.provider"]),
579
+ integration: adaptGroupIntegration(raw["server.integration"]),
580
+ mcp: adaptGroupMcp(raw["server.mcp"]),
581
+ credential: adaptGroupCredential(raw["server.credential"]),
582
+ project: adaptGroupProject(raw["server.project"]),
583
+ form: adaptGroupForm(raw["server.form"]),
584
+ permission: adaptGroupPermission(raw["server.permission"]),
585
+ file: adaptGroupFile(raw["server.fs"]),
586
+ command: adaptGroupCommand(raw["server.command"]),
587
+ skill: adaptGroupSkill(raw["server.skill"]),
588
+ rpc: adaptGroupRpc(raw["server.rpc"]),
589
+ event: adaptGroupEvent(raw["server.event"]),
590
+ pty: adaptGroupPty(raw["server.pty"]),
591
+ experimental: adaptGroupExperimental(raw["server.experimental"]),
592
+ shell: adaptGroupShell(raw["server.shell"]),
593
+ reference: adaptGroupReference(raw["server.reference"]),
594
+ worktree: adaptGroupWorktree(raw["server.worktree"]),
595
+ workspace: adaptGroupWorkspace(raw["server.workspace"]),
596
+ vcs: adaptGroupVcs(raw["server.vcs"]),
597
+ debug: adaptGroupDebug(raw["server.debug"]),
598
+ migration: adaptGroupMigration(raw["server.migration"]),
599
+ websearch: adaptGroupWebsearch(raw["server.websearch"]),
600
+ config: adaptGroupConfig(raw["server.config"]),
601
+ });
602
+ export const make = (options) => HttpApiClient.make(ClientApi, options).pipe(Effect.map(adaptClient));
@@ -0,0 +1,2 @@
1
+ export { ClientError } from "./client-error.js";
2
+ export * as OpenCode from "./client.js";
@@ -0,0 +1,2 @@
1
+ export { ClientError } from "./client-error.js";
2
+ export * as OpenCode from "./client.js";