@opencode-ai/client 0.0.0-dev-17471
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +27 -0
- package/dist/contract.d.ts +1 -0
- package/dist/contract.js +1 -0
- package/dist/effect/api/api.d.ts +2155 -0
- package/dist/effect/api/api.js +0 -0
- package/dist/effect/api.d.ts +7 -0
- package/dist/effect/api.js +0 -0
- package/dist/effect/generated/client-error.d.ts +7 -0
- package/dist/effect/generated/client-error.js +5 -0
- package/dist/effect/generated/client.d.ts +2208 -0
- package/dist/effect/generated/client.js +460 -0
- package/dist/effect/generated/index.d.ts +2 -0
- package/dist/effect/generated/index.js +2 -0
- package/dist/effect/index.d.ts +32 -0
- package/dist/effect/index.js +28 -0
- package/dist/effect/service.d.ts +78 -0
- package/dist/effect/service.js +286 -0
- package/dist/promise/api.d.ts +18 -0
- package/dist/promise/api.js +0 -0
- package/dist/promise/generated/client-error.d.ts +6 -0
- package/dist/promise/generated/client-error.js +8 -0
- package/dist/promise/generated/client.d.ts +228 -0
- package/dist/promise/generated/client.js +1205 -0
- package/dist/promise/generated/index.d.ts +3 -0
- package/dist/promise/generated/index.js +3 -0
- package/dist/promise/generated/types.d.ts +7807 -0
- package/dist/promise/generated/types.js +26 -0
- package/dist/promise/index.d.ts +4 -0
- package/dist/promise/index.js +1 -0
- package/dist/promise/service.d.ts +26 -0
- package/dist/promise/service.js +273 -0
- package/dist/service-contender.d.ts +11 -0
- package/dist/service-contender.js +52 -0
- package/dist/service-timing.d.ts +13 -0
- package/dist/service-timing.js +19 -0
- package/dist/service-version.d.ts +2 -0
- package/dist/service-version.js +9 -0
- package/dist/service.d.ts +48 -0
- package/dist/service.js +0 -0
- package/package.json +75 -0
|
@@ -0,0 +1,460 @@
|
|
|
1
|
+
// Generated by @opencode-ai/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 Endpoint0_0 = (raw) => () => preserveEffect()(raw["health.get"]({}).pipe(Effect.mapError(mapClientError)));
|
|
14
|
+
const Endpoint0_1 = (raw) => (input) => preserveEffect()(raw["health.stop"]({ payload: { instanceID: input["instanceID"] } }).pipe(Effect.mapError(mapClientError)));
|
|
15
|
+
const adaptGroup0 = (raw) => ({ get: Endpoint0_0(raw), stop: Endpoint0_1(raw) });
|
|
16
|
+
const Endpoint1_0 = (raw) => () => preserveEffect()(raw["server.get"]({}).pipe(Effect.mapError(mapClientError)));
|
|
17
|
+
const adaptGroup1 = (raw) => ({ get: Endpoint1_0(raw) });
|
|
18
|
+
const Endpoint2_0 = (raw) => (input) => preserveEffect()(raw["location.get"]({ query: { location: input?.["location"] } }).pipe(Effect.mapError(mapClientError)));
|
|
19
|
+
const adaptGroup2 = (raw) => ({ get: Endpoint2_0(raw) });
|
|
20
|
+
const Endpoint3_0 = (raw) => (input) => preserveEffect()(raw["agent.list"]({ query: { location: input?.["location"] } }).pipe(Effect.mapError(mapClientError)));
|
|
21
|
+
const Endpoint3_1 = (raw) => (input) => preserveEffect()(raw["agent.get"]({ params: { agentID: input["agentID"] }, query: { location: input["location"] } }).pipe(Effect.mapError(mapClientError)));
|
|
22
|
+
const adaptGroup3 = (raw) => ({ list: Endpoint3_0(raw), get: Endpoint3_1(raw) });
|
|
23
|
+
const Endpoint4_0 = (raw) => (input) => preserveEffect()(raw["plugin.list"]({ query: { location: input?.["location"] } }).pipe(Effect.mapError(mapClientError)));
|
|
24
|
+
const adaptGroup4 = (raw) => ({ list: Endpoint4_0(raw) });
|
|
25
|
+
const Endpoint5_0 = (raw) => (input) => preserveEffect()(raw["session.list"]({
|
|
26
|
+
query: {
|
|
27
|
+
workspace: input?.["workspace"],
|
|
28
|
+
limit: input?.["limit"],
|
|
29
|
+
order: input?.["order"],
|
|
30
|
+
search: input?.["search"],
|
|
31
|
+
parentID: input?.["parentID"],
|
|
32
|
+
directory: input?.["directory"],
|
|
33
|
+
project: input?.["project"],
|
|
34
|
+
subpath: input?.["subpath"],
|
|
35
|
+
cursor: input?.["cursor"],
|
|
36
|
+
},
|
|
37
|
+
}).pipe(Effect.mapError(mapClientError)));
|
|
38
|
+
const Endpoint5_1 = (raw) => (input) => preserveEffect()(raw["session.create"]({
|
|
39
|
+
payload: {
|
|
40
|
+
id: input?.["id"],
|
|
41
|
+
title: input?.["title"],
|
|
42
|
+
agent: input?.["agent"],
|
|
43
|
+
model: input?.["model"],
|
|
44
|
+
location: input?.["location"],
|
|
45
|
+
},
|
|
46
|
+
}).pipe(Effect.mapError(mapClientError), Effect.map((value) => value.data)));
|
|
47
|
+
const Endpoint5_2 = (raw) => (input) => preserveEffect()(raw["session.import"]({
|
|
48
|
+
payload: { info: input["info"], messages: input["messages"], location: input["location"] },
|
|
49
|
+
}).pipe(Effect.mapError(mapClientError), Effect.map((value) => value.data)));
|
|
50
|
+
const Endpoint5_3 = (raw) => (input) => preserveEffect()(raw["session.export"]({ params: { sessionID: input["sessionID"] }, query: { sanitize: input["sanitize"] } }).pipe(Effect.mapError(mapClientError), Effect.map((value) => value.data)));
|
|
51
|
+
const Endpoint5_4 = (raw) => () => preserveEffect()(raw["session.active"]({}).pipe(Effect.mapError(mapClientError), Effect.map((value) => value.data)));
|
|
52
|
+
const Endpoint5_5 = (raw) => (input) => preserveEffect()(raw["session.get"]({ params: { sessionID: input["sessionID"] } }).pipe(Effect.mapError(mapClientError), Effect.map((value) => value.data)));
|
|
53
|
+
const Endpoint5_6 = (raw) => (input) => preserveEffect()(raw["session.remove"]({ params: { sessionID: input["sessionID"] } }).pipe(Effect.mapError(mapClientError)));
|
|
54
|
+
const Endpoint5_7 = (raw) => (input) => preserveEffect()(raw["session.fork"]({ params: { sessionID: input["sessionID"] }, payload: { boundary: input["boundary"] } }).pipe(Effect.mapError(mapClientError), Effect.map((value) => value.data)));
|
|
55
|
+
const Endpoint5_8 = (raw) => (input) => preserveEffect()(raw["session.switchAgent"]({ params: { sessionID: input["sessionID"] }, payload: { agent: input["agent"] } }).pipe(Effect.mapError(mapClientError)));
|
|
56
|
+
const Endpoint5_9 = (raw) => (input) => preserveEffect()(raw["session.switchModel"]({ params: { sessionID: input["sessionID"] }, payload: { model: input["model"] } }).pipe(Effect.mapError(mapClientError)));
|
|
57
|
+
const Endpoint5_10 = (raw) => (input) => preserveEffect()(raw["session.rename"]({ params: { sessionID: input["sessionID"] }, payload: { title: input["title"] } }).pipe(Effect.mapError(mapClientError)));
|
|
58
|
+
const Endpoint5_11 = (raw) => (input) => preserveEffect()(raw["session.move"]({
|
|
59
|
+
params: { sessionID: input["sessionID"] },
|
|
60
|
+
payload: { directory: input["directory"], workspaceID: input["workspaceID"], delivery: input["delivery"] },
|
|
61
|
+
}).pipe(Effect.mapError(mapClientError)));
|
|
62
|
+
const Endpoint5_12 = (raw) => (input) => preserveEffect()(raw["session.prompt"]({
|
|
63
|
+
params: { sessionID: input["sessionID"] },
|
|
64
|
+
payload: {
|
|
65
|
+
id: input["id"],
|
|
66
|
+
text: input["text"],
|
|
67
|
+
files: input["files"],
|
|
68
|
+
agents: input["agents"],
|
|
69
|
+
skills: input["skills"],
|
|
70
|
+
metadata: input["metadata"],
|
|
71
|
+
delivery: input["delivery"],
|
|
72
|
+
resume: input["resume"],
|
|
73
|
+
},
|
|
74
|
+
}).pipe(Effect.mapError(mapClientError), Effect.map((value) => value.data)));
|
|
75
|
+
const Endpoint5_13 = (raw) => (input) => preserveEffect()(raw["session.command"]({
|
|
76
|
+
params: { sessionID: input["sessionID"] },
|
|
77
|
+
payload: {
|
|
78
|
+
id: input["id"],
|
|
79
|
+
command: input["command"],
|
|
80
|
+
arguments: input["arguments"],
|
|
81
|
+
agent: input["agent"],
|
|
82
|
+
model: input["model"],
|
|
83
|
+
files: input["files"],
|
|
84
|
+
agents: input["agents"],
|
|
85
|
+
skills: input["skills"],
|
|
86
|
+
delivery: input["delivery"],
|
|
87
|
+
resume: input["resume"],
|
|
88
|
+
},
|
|
89
|
+
}).pipe(Effect.mapError(mapClientError), Effect.map((value) => value.data)));
|
|
90
|
+
const Endpoint5_14 = (raw) => (input) => preserveEffect()(raw["session.skill"]({
|
|
91
|
+
params: { sessionID: input["sessionID"] },
|
|
92
|
+
payload: { id: input["id"], skill: input["skill"], resume: input["resume"] },
|
|
93
|
+
}).pipe(Effect.mapError(mapClientError)));
|
|
94
|
+
const Endpoint5_15 = (raw) => (input) => preserveEffect()(raw["session.synthetic"]({
|
|
95
|
+
params: { sessionID: input["sessionID"] },
|
|
96
|
+
payload: {
|
|
97
|
+
id: input["id"],
|
|
98
|
+
text: input["text"],
|
|
99
|
+
description: input["description"],
|
|
100
|
+
metadata: input["metadata"],
|
|
101
|
+
delivery: input["delivery"],
|
|
102
|
+
resume: input["resume"],
|
|
103
|
+
},
|
|
104
|
+
}).pipe(Effect.mapError(mapClientError), Effect.map((value) => value.data)));
|
|
105
|
+
const Endpoint5_16 = (raw) => (input) => preserveEffect()(raw["session.shell"]({
|
|
106
|
+
params: { sessionID: input["sessionID"] },
|
|
107
|
+
payload: { id: input["id"], command: input["command"] },
|
|
108
|
+
}).pipe(Effect.mapError(mapClientError)));
|
|
109
|
+
const Endpoint5_17 = (raw) => (input) => preserveEffect()(raw["session.compact"]({
|
|
110
|
+
params: { sessionID: input["sessionID"] },
|
|
111
|
+
payload: { id: input["id"], delivery: input["delivery"] },
|
|
112
|
+
}).pipe(Effect.mapError(mapClientError), Effect.map((value) => value.data)));
|
|
113
|
+
const Endpoint5_18 = (raw) => (input) => preserveEffect()(raw["session.wait"]({ params: { sessionID: input["sessionID"] } }).pipe(Effect.mapError(mapClientError)));
|
|
114
|
+
const Endpoint5_19 = (raw) => (input) => preserveEffect()(raw["session.revert.stage"]({
|
|
115
|
+
params: { sessionID: input["sessionID"] },
|
|
116
|
+
payload: { messageID: input["messageID"], files: input["files"] },
|
|
117
|
+
}).pipe(Effect.mapError(mapClientError), Effect.map((value) => value.data)));
|
|
118
|
+
const Endpoint5_20 = (raw) => (input) => preserveEffect()(raw["session.revert.clear"]({ params: { sessionID: input["sessionID"] } }).pipe(Effect.mapError(mapClientError)));
|
|
119
|
+
const Endpoint5_21 = (raw) => (input) => preserveEffect()(raw["session.revert.commit"]({ params: { sessionID: input["sessionID"] } }).pipe(Effect.mapError(mapClientError)));
|
|
120
|
+
const Endpoint5_22 = (raw) => (input) => preserveEffect()(raw["session.context"]({ params: { sessionID: input["sessionID"] } }).pipe(Effect.mapError(mapClientError), Effect.map((value) => value.data)));
|
|
121
|
+
const Endpoint5_23 = (raw) => (input) => preserveEffect()(raw["session.inbox.list"]({ params: { sessionID: input["sessionID"] } }).pipe(Effect.mapError(mapClientError), Effect.map((value) => value.data)));
|
|
122
|
+
const Endpoint5_24 = (raw) => (input) => preserveEffect()(raw["session.inbox.cancel"]({ params: { sessionID: input["sessionID"], inboxID: input["inboxID"] } }).pipe(Effect.mapError(mapClientError)));
|
|
123
|
+
const Endpoint5_25 = (raw) => (input) => preserveEffect()(raw["session.inbox.steer"]({ params: { sessionID: input["sessionID"], inboxID: input["inboxID"] } }).pipe(Effect.mapError(mapClientError)));
|
|
124
|
+
const Endpoint5_26 = (raw) => (input) => preserveEffect()(raw["session.inbox.queue"]({ params: { sessionID: input["sessionID"], inboxID: input["inboxID"] } }).pipe(Effect.mapError(mapClientError)));
|
|
125
|
+
const Endpoint5_27 = (raw) => (input) => preserveEffect()(raw["session.instructions.entry.list"]({ params: { sessionID: input["sessionID"] } }).pipe(Effect.mapError(mapClientError), Effect.map((value) => value.data)));
|
|
126
|
+
const Endpoint5_28 = (raw) => (input) => preserveEffect()(raw["session.instructions.entry.put"]({
|
|
127
|
+
params: { sessionID: input["sessionID"], key: input["key"] },
|
|
128
|
+
payload: { value: input["value"] },
|
|
129
|
+
}).pipe(Effect.mapError(mapClientError)));
|
|
130
|
+
const Endpoint5_29 = (raw) => (input) => preserveEffect()(raw["session.instructions.entry.remove"]({ params: { sessionID: input["sessionID"], key: input["key"] } }).pipe(Effect.mapError(mapClientError)));
|
|
131
|
+
const Endpoint5_30 = (raw) => (input) => preserveEffect()(raw["session.generate"]({ params: { sessionID: input["sessionID"] }, payload: { prompt: input["prompt"] } }).pipe(Effect.mapError(mapClientError), Effect.map((value) => value.data)));
|
|
132
|
+
const Endpoint5_31 = (raw) => (input) => preserveStream()(Stream.unwrap(raw["session.log"]({
|
|
133
|
+
params: { sessionID: input["sessionID"] },
|
|
134
|
+
query: { after: input["after"], follow: input["follow"] },
|
|
135
|
+
}).pipe(Effect.mapError(mapClientError), Effect.map((stream) => stream.pipe(Stream.mapError(mapClientError))))));
|
|
136
|
+
const Endpoint5_32 = (raw) => (input) => preserveEffect()(raw["session.interrupt"]({
|
|
137
|
+
params: { sessionID: input["sessionID"] },
|
|
138
|
+
query: { continue: input["continue"] },
|
|
139
|
+
}).pipe(Effect.mapError(mapClientError)));
|
|
140
|
+
const Endpoint5_33 = (raw) => (input) => preserveEffect()(raw["session.background"]({ params: { sessionID: input["sessionID"] } }).pipe(Effect.mapError(mapClientError)));
|
|
141
|
+
const Endpoint5_34 = (raw) => (input) => preserveEffect()(raw["session.message"]({ params: { sessionID: input["sessionID"], messageID: input["messageID"] } }).pipe(Effect.mapError(mapClientError), Effect.map((value) => value.data)));
|
|
142
|
+
const adaptGroup5 = (raw) => ({
|
|
143
|
+
list: Endpoint5_0(raw),
|
|
144
|
+
create: Endpoint5_1(raw),
|
|
145
|
+
import: Endpoint5_2(raw),
|
|
146
|
+
export: Endpoint5_3(raw),
|
|
147
|
+
active: Endpoint5_4(raw),
|
|
148
|
+
get: Endpoint5_5(raw),
|
|
149
|
+
remove: Endpoint5_6(raw),
|
|
150
|
+
fork: Endpoint5_7(raw),
|
|
151
|
+
switchAgent: Endpoint5_8(raw),
|
|
152
|
+
switchModel: Endpoint5_9(raw),
|
|
153
|
+
rename: Endpoint5_10(raw),
|
|
154
|
+
move: Endpoint5_11(raw),
|
|
155
|
+
prompt: Endpoint5_12(raw),
|
|
156
|
+
command: Endpoint5_13(raw),
|
|
157
|
+
skill: Endpoint5_14(raw),
|
|
158
|
+
synthetic: Endpoint5_15(raw),
|
|
159
|
+
shell: Endpoint5_16(raw),
|
|
160
|
+
compact: Endpoint5_17(raw),
|
|
161
|
+
wait: Endpoint5_18(raw),
|
|
162
|
+
revert: { stage: Endpoint5_19(raw), clear: Endpoint5_20(raw), commit: Endpoint5_21(raw) },
|
|
163
|
+
context: Endpoint5_22(raw),
|
|
164
|
+
inbox: { list: Endpoint5_23(raw), cancel: Endpoint5_24(raw), steer: Endpoint5_25(raw), queue: Endpoint5_26(raw) },
|
|
165
|
+
instructions: { entry: { list: Endpoint5_27(raw), put: Endpoint5_28(raw), remove: Endpoint5_29(raw) } },
|
|
166
|
+
generate: Endpoint5_30(raw),
|
|
167
|
+
log: Endpoint5_31(raw),
|
|
168
|
+
interrupt: Endpoint5_32(raw),
|
|
169
|
+
background: Endpoint5_33(raw),
|
|
170
|
+
message: Endpoint5_34(raw),
|
|
171
|
+
});
|
|
172
|
+
const Endpoint6_0 = (raw) => (input) => preserveEffect()(raw["session.messages"]({
|
|
173
|
+
params: { sessionID: input["sessionID"] },
|
|
174
|
+
query: { limit: input["limit"], order: input["order"], cursor: input["cursor"] },
|
|
175
|
+
}).pipe(Effect.mapError(mapClientError)));
|
|
176
|
+
const adaptGroup6 = (raw) => ({ list: Endpoint6_0(raw) });
|
|
177
|
+
const Endpoint7_0 = (raw) => (input) => preserveEffect()(raw["model.list"]({ query: { location: input?.["location"] } }).pipe(Effect.mapError(mapClientError)));
|
|
178
|
+
const Endpoint7_1 = (raw) => (input) => preserveEffect()(raw["model.default"]({ query: { location: input?.["location"] } }).pipe(Effect.mapError(mapClientError)));
|
|
179
|
+
const adaptGroup7 = (raw) => ({ list: Endpoint7_0(raw), default: Endpoint7_1(raw) });
|
|
180
|
+
const Endpoint8_0 = (raw) => (input) => preserveEffect()(raw["generate.text"]({
|
|
181
|
+
query: { location: input["location"] },
|
|
182
|
+
payload: { prompt: input["prompt"], model: input["model"] },
|
|
183
|
+
}).pipe(Effect.mapError(mapClientError), Effect.map((value) => value.data)));
|
|
184
|
+
const adaptGroup8 = (raw) => ({ text: Endpoint8_0(raw) });
|
|
185
|
+
const Endpoint9_0 = (raw) => (input) => preserveEffect()(raw["provider.list"]({ query: { location: input?.["location"] } }).pipe(Effect.mapError(mapClientError)));
|
|
186
|
+
const Endpoint9_1 = (raw) => (input) => preserveEffect()(raw["provider.get"]({ params: { providerID: input["providerID"] }, query: { location: input["location"] } }).pipe(Effect.mapError(mapClientError)));
|
|
187
|
+
const adaptGroup9 = (raw) => ({ list: Endpoint9_0(raw), get: Endpoint9_1(raw) });
|
|
188
|
+
const Endpoint10_0 = (raw) => (input) => preserveEffect()(raw["integration.list"]({ query: { location: input?.["location"] } }).pipe(Effect.mapError(mapClientError)));
|
|
189
|
+
const Endpoint10_1 = (raw) => (input) => preserveEffect()(raw["integration.get"]({
|
|
190
|
+
params: { integrationID: input["integrationID"] },
|
|
191
|
+
query: { location: input["location"] },
|
|
192
|
+
}).pipe(Effect.mapError(mapClientError)));
|
|
193
|
+
const Endpoint10_2 = (raw) => (input) => preserveEffect()(raw["integration.wellknown.add"]({ query: { location: input["location"] }, payload: { url: input["url"] } }).pipe(Effect.mapError(mapClientError)));
|
|
194
|
+
const Endpoint10_3 = (raw) => (input) => preserveEffect()(raw["integration.connect.key"]({
|
|
195
|
+
params: { integrationID: input["integrationID"] },
|
|
196
|
+
query: { location: input["location"] },
|
|
197
|
+
payload: { key: input["key"], answer: input["answer"], label: input["label"] },
|
|
198
|
+
}).pipe(Effect.mapError(mapClientError)));
|
|
199
|
+
const Endpoint10_4 = (raw) => (input) => preserveEffect()(raw["integration.oauth.connect"]({
|
|
200
|
+
params: { integrationID: input["integrationID"] },
|
|
201
|
+
query: { location: input["location"] },
|
|
202
|
+
payload: { methodID: input["methodID"], answer: input["answer"], label: input["label"] },
|
|
203
|
+
}).pipe(Effect.mapError(mapClientError)));
|
|
204
|
+
const Endpoint10_5 = (raw) => (input) => preserveEffect()(raw["integration.oauth.status"]({
|
|
205
|
+
params: { integrationID: input["integrationID"], attemptID: input["attemptID"] },
|
|
206
|
+
query: { location: input["location"] },
|
|
207
|
+
}).pipe(Effect.mapError(mapClientError)));
|
|
208
|
+
const Endpoint10_6 = (raw) => (input) => preserveEffect()(raw["integration.oauth.complete"]({
|
|
209
|
+
params: { integrationID: input["integrationID"], attemptID: input["attemptID"] },
|
|
210
|
+
query: { location: input["location"] },
|
|
211
|
+
payload: { code: input["code"] },
|
|
212
|
+
}).pipe(Effect.mapError(mapClientError)));
|
|
213
|
+
const Endpoint10_7 = (raw) => (input) => preserveEffect()(raw["integration.oauth.cancel"]({
|
|
214
|
+
params: { integrationID: input["integrationID"], attemptID: input["attemptID"] },
|
|
215
|
+
query: { location: input["location"] },
|
|
216
|
+
}).pipe(Effect.mapError(mapClientError)));
|
|
217
|
+
const Endpoint10_8 = (raw) => (input) => preserveEffect()(raw["integration.command.connect"]({
|
|
218
|
+
params: { integrationID: input["integrationID"] },
|
|
219
|
+
query: { location: input["location"] },
|
|
220
|
+
payload: { methodID: input["methodID"], label: input["label"] },
|
|
221
|
+
}).pipe(Effect.mapError(mapClientError)));
|
|
222
|
+
const Endpoint10_9 = (raw) => (input) => preserveEffect()(raw["integration.command.status"]({
|
|
223
|
+
params: { integrationID: input["integrationID"], attemptID: input["attemptID"] },
|
|
224
|
+
query: { location: input["location"] },
|
|
225
|
+
}).pipe(Effect.mapError(mapClientError)));
|
|
226
|
+
const Endpoint10_10 = (raw) => (input) => preserveEffect()(raw["integration.command.cancel"]({
|
|
227
|
+
params: { integrationID: input["integrationID"], attemptID: input["attemptID"] },
|
|
228
|
+
query: { location: input["location"] },
|
|
229
|
+
}).pipe(Effect.mapError(mapClientError)));
|
|
230
|
+
const adaptGroup10 = (raw) => ({
|
|
231
|
+
list: Endpoint10_0(raw),
|
|
232
|
+
get: Endpoint10_1(raw),
|
|
233
|
+
wellknown: { add: Endpoint10_2(raw) },
|
|
234
|
+
connect: { key: Endpoint10_3(raw) },
|
|
235
|
+
oauth: {
|
|
236
|
+
connect: Endpoint10_4(raw),
|
|
237
|
+
status: Endpoint10_5(raw),
|
|
238
|
+
complete: Endpoint10_6(raw),
|
|
239
|
+
cancel: Endpoint10_7(raw),
|
|
240
|
+
},
|
|
241
|
+
command: { connect: Endpoint10_8(raw), status: Endpoint10_9(raw), cancel: Endpoint10_10(raw) },
|
|
242
|
+
});
|
|
243
|
+
const Endpoint11_0 = (raw) => (input) => preserveEffect()(raw["mcp.list"]({ query: { location: input?.["location"] } }).pipe(Effect.mapError(mapClientError)));
|
|
244
|
+
const Endpoint11_1 = (raw) => (input) => preserveEffect()(raw["mcp.add"]({
|
|
245
|
+
params: { server: input["server"] },
|
|
246
|
+
query: { location: input["location"] },
|
|
247
|
+
payload: { config: input["config"] },
|
|
248
|
+
}).pipe(Effect.mapError(mapClientError)));
|
|
249
|
+
const Endpoint11_2 = (raw) => (input) => preserveEffect()(raw["mcp.remove"]({ params: { server: input["server"] }, query: { location: input["location"] } }).pipe(Effect.mapError(mapClientError)));
|
|
250
|
+
const Endpoint11_3 = (raw) => (input) => preserveEffect()(raw["mcp.connect"]({ params: { server: input["server"] }, query: { location: input["location"] } }).pipe(Effect.mapError(mapClientError)));
|
|
251
|
+
const Endpoint11_4 = (raw) => (input) => preserveEffect()(raw["mcp.disconnect"]({ params: { server: input["server"] }, query: { location: input["location"] } }).pipe(Effect.mapError(mapClientError)));
|
|
252
|
+
const Endpoint11_5 = (raw) => (input) => preserveEffect()(raw["mcp.resource.catalog"]({ query: { location: input?.["location"] } }).pipe(Effect.mapError(mapClientError)));
|
|
253
|
+
const adaptGroup11 = (raw) => ({
|
|
254
|
+
list: Endpoint11_0(raw),
|
|
255
|
+
add: Endpoint11_1(raw),
|
|
256
|
+
remove: Endpoint11_2(raw),
|
|
257
|
+
connect: Endpoint11_3(raw),
|
|
258
|
+
disconnect: Endpoint11_4(raw),
|
|
259
|
+
resource: { catalog: Endpoint11_5(raw) },
|
|
260
|
+
});
|
|
261
|
+
const Endpoint12_0 = (raw) => (input) => preserveEffect()(raw["credential.update"]({
|
|
262
|
+
params: { credentialID: input["credentialID"] },
|
|
263
|
+
query: { location: input["location"] },
|
|
264
|
+
payload: { label: input["label"] },
|
|
265
|
+
}).pipe(Effect.mapError(mapClientError)));
|
|
266
|
+
const Endpoint12_1 = (raw) => (input) => preserveEffect()(raw["credential.remove"]({
|
|
267
|
+
params: { credentialID: input["credentialID"] },
|
|
268
|
+
query: { location: input["location"] },
|
|
269
|
+
}).pipe(Effect.mapError(mapClientError)));
|
|
270
|
+
const adaptGroup12 = (raw) => ({ update: Endpoint12_0(raw), remove: Endpoint12_1(raw) });
|
|
271
|
+
const Endpoint13_0 = (raw) => () => preserveEffect()(raw["project.list"]({}).pipe(Effect.mapError(mapClientError)));
|
|
272
|
+
const Endpoint13_1 = (raw) => (input) => preserveEffect()(raw["project.current"]({ query: { location: input?.["location"] } }).pipe(Effect.mapError(mapClientError)));
|
|
273
|
+
const adaptGroup13 = (raw) => ({ list: Endpoint13_0(raw), current: Endpoint13_1(raw) });
|
|
274
|
+
const Endpoint14_0 = (raw) => (input) => preserveEffect()(raw["form.request.list"]({ query: { location: input?.["location"] } }).pipe(Effect.mapError(mapClientError)));
|
|
275
|
+
const Endpoint14_1 = (raw) => (input) => preserveEffect()(raw["session.form.list"]({ params: { sessionID: input["sessionID"] } }).pipe(Effect.mapError(mapClientError), Effect.map((value) => value.data)));
|
|
276
|
+
const Endpoint14_2 = (raw) => (input) => preserveEffect()(raw["session.form.create"]({
|
|
277
|
+
params: { sessionID: input["sessionID"] },
|
|
278
|
+
payload: { id: input["id"], title: input["title"], metadata: input["metadata"], fields: input["fields"] },
|
|
279
|
+
}).pipe(Effect.mapError(mapClientError), Effect.map((value) => value.data)));
|
|
280
|
+
const Endpoint14_3 = (raw) => (input) => preserveEffect()(raw["session.form.get"]({ params: { sessionID: input["sessionID"], formID: input["formID"] } }).pipe(Effect.mapError(mapClientError), Effect.map((value) => value.data)));
|
|
281
|
+
const Endpoint14_4 = (raw) => (input) => preserveEffect()(raw["session.form.state"]({ params: { sessionID: input["sessionID"], formID: input["formID"] } }).pipe(Effect.mapError(mapClientError), Effect.map((value) => value.data)));
|
|
282
|
+
const Endpoint14_5 = (raw) => (input) => preserveEffect()(raw["session.form.reply"]({
|
|
283
|
+
params: { sessionID: input["sessionID"], formID: input["formID"] },
|
|
284
|
+
payload: { answer: input["answer"] },
|
|
285
|
+
}).pipe(Effect.mapError(mapClientError)));
|
|
286
|
+
const Endpoint14_6 = (raw) => (input) => preserveEffect()(raw["session.form.cancel"]({ params: { sessionID: input["sessionID"], formID: input["formID"] } }).pipe(Effect.mapError(mapClientError)));
|
|
287
|
+
const adaptGroup14 = (raw) => ({
|
|
288
|
+
request: { list: Endpoint14_0(raw) },
|
|
289
|
+
list: Endpoint14_1(raw),
|
|
290
|
+
create: Endpoint14_2(raw),
|
|
291
|
+
get: Endpoint14_3(raw),
|
|
292
|
+
state: Endpoint14_4(raw),
|
|
293
|
+
reply: Endpoint14_5(raw),
|
|
294
|
+
cancel: Endpoint14_6(raw),
|
|
295
|
+
});
|
|
296
|
+
const Endpoint15_0 = (raw) => (input) => preserveEffect()(raw["permission.request.list"]({ query: { location: input?.["location"] } }).pipe(Effect.mapError(mapClientError)));
|
|
297
|
+
const Endpoint15_1 = (raw) => (input) => preserveEffect()(raw["permission.saved.list"]({ query: { projectID: input?.["projectID"] } }).pipe(Effect.mapError(mapClientError), Effect.map((value) => value.data)));
|
|
298
|
+
const Endpoint15_2 = (raw) => (input) => preserveEffect()(raw["permission.saved.remove"]({ params: { id: input["id"] } }).pipe(Effect.mapError(mapClientError)));
|
|
299
|
+
const Endpoint15_3 = (raw) => (input) => preserveEffect()(raw["session.permission.create"]({
|
|
300
|
+
params: { sessionID: input["sessionID"] },
|
|
301
|
+
payload: {
|
|
302
|
+
id: input["id"],
|
|
303
|
+
action: input["action"],
|
|
304
|
+
resources: input["resources"],
|
|
305
|
+
save: input["save"],
|
|
306
|
+
metadata: input["metadata"],
|
|
307
|
+
source: input["source"],
|
|
308
|
+
agent: input["agent"],
|
|
309
|
+
},
|
|
310
|
+
}).pipe(Effect.mapError(mapClientError), Effect.map((value) => value.data)));
|
|
311
|
+
const Endpoint15_4 = (raw) => (input) => preserveEffect()(raw["session.permission.list"]({ params: { sessionID: input["sessionID"] } }).pipe(Effect.mapError(mapClientError), Effect.map((value) => value.data)));
|
|
312
|
+
const Endpoint15_5 = (raw) => (input) => preserveEffect()(raw["session.permission.get"]({ params: { sessionID: input["sessionID"], requestID: input["requestID"] } }).pipe(Effect.mapError(mapClientError), Effect.map((value) => value.data)));
|
|
313
|
+
const Endpoint15_6 = (raw) => (input) => preserveEffect()(raw["session.permission.reply"]({
|
|
314
|
+
params: { sessionID: input["sessionID"], requestID: input["requestID"] },
|
|
315
|
+
payload: { reply: input["reply"], message: input["message"] },
|
|
316
|
+
}).pipe(Effect.mapError(mapClientError)));
|
|
317
|
+
const adaptGroup15 = (raw) => ({
|
|
318
|
+
request: { list: Endpoint15_0(raw) },
|
|
319
|
+
saved: { list: Endpoint15_1(raw), remove: Endpoint15_2(raw) },
|
|
320
|
+
create: Endpoint15_3(raw),
|
|
321
|
+
list: Endpoint15_4(raw),
|
|
322
|
+
get: Endpoint15_5(raw),
|
|
323
|
+
reply: Endpoint15_6(raw),
|
|
324
|
+
});
|
|
325
|
+
const Endpoint16_0 = (raw) => (input) => preserveEffect()(raw["fs.list"]({ query: { location: input?.["location"], path: input?.["path"] } }).pipe(Effect.mapError(mapClientError)));
|
|
326
|
+
const Endpoint16_1 = (raw) => (input) => preserveEffect()(raw["fs.find"]({
|
|
327
|
+
query: { location: input["location"], query: input["query"], type: input["type"], limit: input["limit"] },
|
|
328
|
+
}).pipe(Effect.mapError(mapClientError)));
|
|
329
|
+
const adaptGroup16 = (raw) => ({ list: Endpoint16_0(raw), find: Endpoint16_1(raw) });
|
|
330
|
+
const Endpoint17_0 = (raw) => (input) => preserveEffect()(raw["command.list"]({ query: { location: input?.["location"] } }).pipe(Effect.mapError(mapClientError)));
|
|
331
|
+
const adaptGroup17 = (raw) => ({ list: Endpoint17_0(raw) });
|
|
332
|
+
const Endpoint18_0 = (raw) => (input) => preserveEffect()(raw["skill.list"]({ query: { location: input?.["location"] } }).pipe(Effect.mapError(mapClientError)));
|
|
333
|
+
const adaptGroup18 = (raw) => ({ list: Endpoint18_0(raw) });
|
|
334
|
+
const Endpoint19_0 = (raw) => () => preserveStream()(Stream.unwrap(raw["event.subscribe"]({}).pipe(Effect.mapError(mapClientError), Effect.map((stream) => stream.pipe(Stream.mapError(mapClientError))))));
|
|
335
|
+
const adaptGroup19 = (raw) => ({ subscribe: Endpoint19_0(raw) });
|
|
336
|
+
const Endpoint20_0 = (raw) => (input) => preserveEffect()(raw["pty.list"]({ query: { location: input?.["location"] } }).pipe(Effect.mapError(mapClientError)));
|
|
337
|
+
const Endpoint20_1 = (raw) => (input) => preserveEffect()(raw["pty.create"]({
|
|
338
|
+
query: { location: input?.["location"] },
|
|
339
|
+
payload: {
|
|
340
|
+
command: input?.["command"],
|
|
341
|
+
args: input?.["args"],
|
|
342
|
+
cwd: input?.["cwd"],
|
|
343
|
+
title: input?.["title"],
|
|
344
|
+
env: input?.["env"],
|
|
345
|
+
},
|
|
346
|
+
}).pipe(Effect.mapError(mapClientError)));
|
|
347
|
+
const Endpoint20_2 = (raw) => (input) => preserveEffect()(raw["pty.get"]({ params: { ptyID: input["ptyID"] }, query: { location: input["location"] } }).pipe(Effect.mapError(mapClientError)));
|
|
348
|
+
const Endpoint20_3 = (raw) => (input) => preserveEffect()(raw["pty.update"]({
|
|
349
|
+
params: { ptyID: input["ptyID"] },
|
|
350
|
+
query: { location: input["location"] },
|
|
351
|
+
payload: { title: input["title"], size: input["size"] },
|
|
352
|
+
}).pipe(Effect.mapError(mapClientError)));
|
|
353
|
+
const Endpoint20_4 = (raw) => (input) => preserveEffect()(raw["pty.remove"]({ params: { ptyID: input["ptyID"] }, query: { location: input["location"] } }).pipe(Effect.mapError(mapClientError)));
|
|
354
|
+
const adaptGroup20 = (raw) => ({
|
|
355
|
+
list: Endpoint20_0(raw),
|
|
356
|
+
create: Endpoint20_1(raw),
|
|
357
|
+
get: Endpoint20_2(raw),
|
|
358
|
+
update: Endpoint20_3(raw),
|
|
359
|
+
remove: Endpoint20_4(raw),
|
|
360
|
+
});
|
|
361
|
+
const Endpoint21_0 = (raw) => (input) => preserveEffect()(raw["shell.list"]({ query: { location: input?.["location"] } }).pipe(Effect.mapError(mapClientError)));
|
|
362
|
+
const Endpoint21_1 = (raw) => (input) => preserveEffect()(raw["shell.create"]({
|
|
363
|
+
query: { location: input["location"] },
|
|
364
|
+
payload: { command: input["command"], cwd: input["cwd"], timeout: input["timeout"], metadata: input["metadata"] },
|
|
365
|
+
}).pipe(Effect.mapError(mapClientError)));
|
|
366
|
+
const Endpoint21_2 = (raw) => (input) => preserveEffect()(raw["shell.get"]({ params: { id: input["id"] }, query: { location: input["location"] } }).pipe(Effect.mapError(mapClientError)));
|
|
367
|
+
const Endpoint21_3 = (raw) => (input) => preserveEffect()(raw["shell.timeout"]({
|
|
368
|
+
params: { id: input["id"] },
|
|
369
|
+
query: { location: input["location"] },
|
|
370
|
+
payload: { timeout: input["timeout"] },
|
|
371
|
+
}).pipe(Effect.mapError(mapClientError)));
|
|
372
|
+
const Endpoint21_4 = (raw) => (input) => preserveEffect()(raw["shell.output"]({
|
|
373
|
+
params: { id: input["id"] },
|
|
374
|
+
query: { location: input["location"], cursor: input["cursor"], limit: input["limit"] },
|
|
375
|
+
}).pipe(Effect.mapError(mapClientError)));
|
|
376
|
+
const Endpoint21_5 = (raw) => (input) => preserveEffect()(raw["shell.remove"]({ params: { id: input["id"] }, query: { location: input["location"] } }).pipe(Effect.mapError(mapClientError)));
|
|
377
|
+
const adaptGroup21 = (raw) => ({
|
|
378
|
+
list: Endpoint21_0(raw),
|
|
379
|
+
create: Endpoint21_1(raw),
|
|
380
|
+
get: Endpoint21_2(raw),
|
|
381
|
+
timeout: Endpoint21_3(raw),
|
|
382
|
+
output: Endpoint21_4(raw),
|
|
383
|
+
remove: Endpoint21_5(raw),
|
|
384
|
+
});
|
|
385
|
+
const Endpoint22_0 = (raw) => (input) => preserveEffect()(raw["reference.list"]({ query: { location: input?.["location"] } }).pipe(Effect.mapError(mapClientError)));
|
|
386
|
+
const adaptGroup22 = (raw) => ({ list: Endpoint22_0(raw) });
|
|
387
|
+
const Endpoint23_0 = (raw) => (input) => preserveEffect()(raw["worktree.list"]({ params: { projectID: input["projectID"] } }).pipe(Effect.mapError(mapClientError)));
|
|
388
|
+
const Endpoint23_1 = (raw) => (input) => preserveEffect()(raw["worktree.create"]({
|
|
389
|
+
params: { projectID: input["projectID"] },
|
|
390
|
+
payload: { strategy: input["strategy"], from: input["from"], directory: input["directory"], name: input["name"] },
|
|
391
|
+
}).pipe(Effect.mapError(mapClientError)));
|
|
392
|
+
const Endpoint23_2 = (raw) => (input) => preserveEffect()(raw["worktree.remove"]({
|
|
393
|
+
params: { projectID: input["projectID"] },
|
|
394
|
+
payload: { directory: input["directory"], force: input["force"] },
|
|
395
|
+
}).pipe(Effect.mapError(mapClientError)));
|
|
396
|
+
const Endpoint23_3 = (raw) => (input) => preserveEffect()(raw["worktree.refresh"]({ params: { projectID: input["projectID"] } }).pipe(Effect.mapError(mapClientError)));
|
|
397
|
+
const adaptGroup23 = (raw) => ({
|
|
398
|
+
list: Endpoint23_0(raw),
|
|
399
|
+
create: Endpoint23_1(raw),
|
|
400
|
+
remove: Endpoint23_2(raw),
|
|
401
|
+
refresh: Endpoint23_3(raw),
|
|
402
|
+
});
|
|
403
|
+
const Endpoint24_0 = (raw) => (input) => preserveEffect()(raw["vcs.get"]({ query: { location: input?.["location"] } }).pipe(Effect.mapError(mapClientError)));
|
|
404
|
+
const Endpoint24_1 = (raw) => (input) => preserveEffect()(raw["vcs.status"]({ query: { location: input?.["location"] } }).pipe(Effect.mapError(mapClientError)));
|
|
405
|
+
const Endpoint24_2 = (raw) => (input) => preserveEffect()(raw["vcs.diff"]({ query: { location: input["location"], mode: input["mode"], context: input["context"] } }).pipe(Effect.mapError(mapClientError)));
|
|
406
|
+
const adaptGroup24 = (raw) => ({
|
|
407
|
+
get: Endpoint24_0(raw),
|
|
408
|
+
status: Endpoint24_1(raw),
|
|
409
|
+
diff: Endpoint24_2(raw),
|
|
410
|
+
});
|
|
411
|
+
const Endpoint25_0 = (raw) => () => preserveEffect()(raw["debug.location"]({}).pipe(Effect.mapError(mapClientError)));
|
|
412
|
+
const Endpoint25_1 = (raw) => (input) => preserveEffect()(raw["debug.location.evict"]({ query: { location: input?.["location"] } }).pipe(Effect.mapError(mapClientError)));
|
|
413
|
+
const adaptGroup25 = (raw) => ({
|
|
414
|
+
location: { list: Endpoint25_0(raw), evict: Endpoint25_1(raw) },
|
|
415
|
+
});
|
|
416
|
+
const Endpoint26_0 = (raw) => () => preserveEffect()(raw["migration.v1.status"]({}).pipe(Effect.mapError(mapClientError)));
|
|
417
|
+
const adaptGroup26 = (raw) => ({ v1: { status: Endpoint26_0(raw) } });
|
|
418
|
+
const Endpoint27_0 = (raw) => (input) => preserveEffect()(raw["websearch.providers"]({ query: { location: input?.["location"] } }).pipe(Effect.mapError(mapClientError)));
|
|
419
|
+
const Endpoint27_1 = (raw) => (input) => preserveEffect()(raw["websearch.query"]({
|
|
420
|
+
query: { location: input["location"] },
|
|
421
|
+
payload: { query: input["query"], providerID: input["providerID"] },
|
|
422
|
+
}).pipe(Effect.mapError(mapClientError)));
|
|
423
|
+
const adaptGroup27 = (raw) => ({
|
|
424
|
+
providers: Endpoint27_0(raw),
|
|
425
|
+
query: Endpoint27_1(raw),
|
|
426
|
+
});
|
|
427
|
+
const Endpoint28_0 = (raw) => (input) => preserveEffect()(raw["config.get"]({ query: { location: input?.["location"] } }).pipe(Effect.mapError(mapClientError)));
|
|
428
|
+
const adaptGroup28 = (raw) => ({ get: Endpoint28_0(raw) });
|
|
429
|
+
const adaptClient = (raw) => ({
|
|
430
|
+
health: adaptGroup0(raw["server.health"]),
|
|
431
|
+
server: adaptGroup1(raw["server.server"]),
|
|
432
|
+
location: adaptGroup2(raw["server.location"]),
|
|
433
|
+
agent: adaptGroup3(raw["server.agent"]),
|
|
434
|
+
plugin: adaptGroup4(raw["server.plugin"]),
|
|
435
|
+
session: adaptGroup5(raw["server.session"]),
|
|
436
|
+
message: adaptGroup6(raw["server.message"]),
|
|
437
|
+
model: adaptGroup7(raw["server.model"]),
|
|
438
|
+
generate: adaptGroup8(raw["server.generate"]),
|
|
439
|
+
provider: adaptGroup9(raw["server.provider"]),
|
|
440
|
+
integration: adaptGroup10(raw["server.integration"]),
|
|
441
|
+
mcp: adaptGroup11(raw["server.mcp"]),
|
|
442
|
+
credential: adaptGroup12(raw["server.credential"]),
|
|
443
|
+
project: adaptGroup13(raw["server.project"]),
|
|
444
|
+
form: adaptGroup14(raw["server.form"]),
|
|
445
|
+
permission: adaptGroup15(raw["server.permission"]),
|
|
446
|
+
file: adaptGroup16(raw["server.fs"]),
|
|
447
|
+
command: adaptGroup17(raw["server.command"]),
|
|
448
|
+
skill: adaptGroup18(raw["server.skill"]),
|
|
449
|
+
event: adaptGroup19(raw["server.event"]),
|
|
450
|
+
pty: adaptGroup20(raw["server.pty"]),
|
|
451
|
+
shell: adaptGroup21(raw["server.shell"]),
|
|
452
|
+
reference: adaptGroup22(raw["server.reference"]),
|
|
453
|
+
worktree: adaptGroup23(raw["server.worktree"]),
|
|
454
|
+
vcs: adaptGroup24(raw["server.vcs"]),
|
|
455
|
+
debug: adaptGroup25(raw["server.debug"]),
|
|
456
|
+
migration: adaptGroup26(raw["server.migration"]),
|
|
457
|
+
websearch: adaptGroup27(raw["server.websearch"]),
|
|
458
|
+
config: adaptGroup28(raw["server.config"]),
|
|
459
|
+
});
|
|
460
|
+
export const make = (options) => HttpApiClient.make(ClientApi, options).pipe(Effect.map(adaptClient));
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { Effect } from "effect";
|
|
2
|
+
export * from "./generated/index";
|
|
3
|
+
export type { AgentApi, AppApi, CatalogApi, CommandApi, ConfigApi, EventApi, IntegrationApi, ModelApi, PluginApi, ProviderApi, ReferenceApi, WebSearchApi, SessionApi, SkillApi, } from "./api.js";
|
|
4
|
+
export { Agent } from "@opencode-ai/schema/agent";
|
|
5
|
+
export { Command } from "@opencode-ai/schema/command";
|
|
6
|
+
export { Config } from "@opencode-ai/schema/config";
|
|
7
|
+
export { Credential } from "@opencode-ai/schema/credential";
|
|
8
|
+
export { Event } from "@opencode-ai/schema/event";
|
|
9
|
+
export { EventLog } from "@opencode-ai/schema/event-log";
|
|
10
|
+
export { FileSystem } from "@opencode-ai/schema/filesystem";
|
|
11
|
+
export { Form } from "@opencode-ai/schema/form";
|
|
12
|
+
export { Integration } from "@opencode-ai/schema/integration";
|
|
13
|
+
export { Location } from "@opencode-ai/schema/location";
|
|
14
|
+
export { Model } from "@opencode-ai/schema/model";
|
|
15
|
+
export { Permission } from "@opencode-ai/schema/permission";
|
|
16
|
+
export { PermissionSaved } from "@opencode-ai/schema/permission-saved";
|
|
17
|
+
export { Project } from "@opencode-ai/schema/project";
|
|
18
|
+
export { Worktree } from "@opencode-ai/schema/worktree";
|
|
19
|
+
export { Provider } from "@opencode-ai/schema/provider";
|
|
20
|
+
export { Pty } from "@opencode-ai/schema/pty";
|
|
21
|
+
export { Question } from "@opencode-ai/schema/question";
|
|
22
|
+
export { Reference } from "@opencode-ai/schema/reference";
|
|
23
|
+
export { WebSearch } from "@opencode-ai/schema/websearch";
|
|
24
|
+
export { AbsolutePath, RelativePath } from "@opencode-ai/schema/schema";
|
|
25
|
+
export { Session } from "@opencode-ai/schema/session";
|
|
26
|
+
export { SessionInbox } from "@opencode-ai/schema/session-inbox";
|
|
27
|
+
export { SessionMessage } from "@opencode-ai/schema/session-message";
|
|
28
|
+
export { Skill } from "@opencode-ai/schema/skill";
|
|
29
|
+
export { Prompt } from "@opencode-ai/schema/prompt";
|
|
30
|
+
export { PromptInput } from "@opencode-ai/schema/prompt-input";
|
|
31
|
+
export type { OpenCodeEvent } from "@opencode-ai/protocol/groups/event";
|
|
32
|
+
export type OpenCodeClient = Effect.Success<ReturnType<typeof import("./generated/client").make>>;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export * from "./generated/index";
|
|
2
|
+
export { Agent } from "@opencode-ai/schema/agent";
|
|
3
|
+
export { Command } from "@opencode-ai/schema/command";
|
|
4
|
+
export { Config } from "@opencode-ai/schema/config";
|
|
5
|
+
export { Credential } from "@opencode-ai/schema/credential";
|
|
6
|
+
export { Event } from "@opencode-ai/schema/event";
|
|
7
|
+
export { EventLog } from "@opencode-ai/schema/event-log";
|
|
8
|
+
export { FileSystem } from "@opencode-ai/schema/filesystem";
|
|
9
|
+
export { Form } from "@opencode-ai/schema/form";
|
|
10
|
+
export { Integration } from "@opencode-ai/schema/integration";
|
|
11
|
+
export { Location } from "@opencode-ai/schema/location";
|
|
12
|
+
export { Model } from "@opencode-ai/schema/model";
|
|
13
|
+
export { Permission } from "@opencode-ai/schema/permission";
|
|
14
|
+
export { PermissionSaved } from "@opencode-ai/schema/permission-saved";
|
|
15
|
+
export { Project } from "@opencode-ai/schema/project";
|
|
16
|
+
export { Worktree } from "@opencode-ai/schema/worktree";
|
|
17
|
+
export { Provider } from "@opencode-ai/schema/provider";
|
|
18
|
+
export { Pty } from "@opencode-ai/schema/pty";
|
|
19
|
+
export { Question } from "@opencode-ai/schema/question";
|
|
20
|
+
export { Reference } from "@opencode-ai/schema/reference";
|
|
21
|
+
export { WebSearch } from "@opencode-ai/schema/websearch";
|
|
22
|
+
export { AbsolutePath, RelativePath } from "@opencode-ai/schema/schema";
|
|
23
|
+
export { Session } from "@opencode-ai/schema/session";
|
|
24
|
+
export { SessionInbox } from "@opencode-ai/schema/session-inbox";
|
|
25
|
+
export { SessionMessage } from "@opencode-ai/schema/session-message";
|
|
26
|
+
export { Skill } from "@opencode-ai/schema/skill";
|
|
27
|
+
export { Prompt } from "@opencode-ai/schema/prompt";
|
|
28
|
+
export { PromptInput } from "@opencode-ai/schema/prompt-input";
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { Effect, FileSystem, Schema } from "effect";
|
|
2
|
+
import type { DiscoverOptions, Endpoint, EnsureOptions, StopOptions } from "../service.js";
|
|
3
|
+
export * from "../service.js";
|
|
4
|
+
/** Contents of the local service registration file. */
|
|
5
|
+
export type Info = import("../service.js").Info;
|
|
6
|
+
/** Discover a healthy, compatible local service without starting one. */
|
|
7
|
+
export declare const discover: (options?: DiscoverOptions | undefined) => Effect.Effect<{
|
|
8
|
+
url: string;
|
|
9
|
+
auth: {
|
|
10
|
+
type: "basic";
|
|
11
|
+
username: string;
|
|
12
|
+
password: string;
|
|
13
|
+
} | undefined;
|
|
14
|
+
} | undefined, never, FileSystem.FileSystem>;
|
|
15
|
+
/** Recognize an authenticated compatible service bound to an expected URL, including while it starts or fails. */
|
|
16
|
+
export declare const incumbent: (options: DiscoverOptions & {
|
|
17
|
+
readonly url: string;
|
|
18
|
+
}) => Effect.Effect<{
|
|
19
|
+
endpoint: {
|
|
20
|
+
url: string;
|
|
21
|
+
auth: {
|
|
22
|
+
type: "basic";
|
|
23
|
+
username: string;
|
|
24
|
+
password: string;
|
|
25
|
+
} | undefined;
|
|
26
|
+
};
|
|
27
|
+
state: "failed" | "ready" | "waiting";
|
|
28
|
+
} | undefined, never, FileSystem.FileSystem>;
|
|
29
|
+
/** Ensure a healthy, compatible local service is running. */
|
|
30
|
+
export declare const ensure: (options?: EnsureOptions | undefined) => Effect.Effect<Endpoint, Error, FileSystem.FileSystem>;
|
|
31
|
+
/** Stop the registered local service. */
|
|
32
|
+
export declare const stop: (options?: StopOptions | undefined) => Effect.Effect<void, Error, FileSystem.FileSystem>;
|
|
33
|
+
/** Create HTTP authentication headers for a service endpoint. */
|
|
34
|
+
export declare function headers(endpoint: Endpoint): {
|
|
35
|
+
authorization: string;
|
|
36
|
+
} | undefined;
|
|
37
|
+
/** Schema for the local service registration file. */
|
|
38
|
+
export declare const Info: Schema.Struct<{
|
|
39
|
+
readonly id: Schema.optional<Schema.String>;
|
|
40
|
+
readonly version: Schema.optional<Schema.String>;
|
|
41
|
+
readonly url: Schema.String;
|
|
42
|
+
readonly pid: Schema.Int;
|
|
43
|
+
readonly password: Schema.optional<Schema.String>;
|
|
44
|
+
}>;
|
|
45
|
+
/** Effect-based local service lifecycle operations. */
|
|
46
|
+
export declare const Service: {
|
|
47
|
+
discover: (options?: DiscoverOptions | undefined) => Effect.Effect<{
|
|
48
|
+
url: string;
|
|
49
|
+
auth: {
|
|
50
|
+
type: "basic";
|
|
51
|
+
username: string;
|
|
52
|
+
password: string;
|
|
53
|
+
} | undefined;
|
|
54
|
+
} | undefined, never, FileSystem.FileSystem>;
|
|
55
|
+
incumbent: (options: DiscoverOptions & {
|
|
56
|
+
readonly url: string;
|
|
57
|
+
}) => Effect.Effect<{
|
|
58
|
+
endpoint: {
|
|
59
|
+
url: string;
|
|
60
|
+
auth: {
|
|
61
|
+
type: "basic";
|
|
62
|
+
username: string;
|
|
63
|
+
password: string;
|
|
64
|
+
} | undefined;
|
|
65
|
+
};
|
|
66
|
+
state: "failed" | "ready" | "waiting";
|
|
67
|
+
} | undefined, never, FileSystem.FileSystem>;
|
|
68
|
+
ensure: (options?: EnsureOptions | undefined) => Effect.Effect<Endpoint, Error, FileSystem.FileSystem>;
|
|
69
|
+
stop: (options?: StopOptions | undefined) => Effect.Effect<void, Error, FileSystem.FileSystem>;
|
|
70
|
+
headers: typeof headers;
|
|
71
|
+
Info: Schema.Struct<{
|
|
72
|
+
readonly id: Schema.optional<Schema.String>;
|
|
73
|
+
readonly version: Schema.optional<Schema.String>;
|
|
74
|
+
readonly url: Schema.String;
|
|
75
|
+
readonly pid: Schema.Int;
|
|
76
|
+
readonly password: Schema.optional<Schema.String>;
|
|
77
|
+
}>;
|
|
78
|
+
};
|