@opencode/client 0.0.0-dev-70 → 0.0.0-dev-80
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/{contract-2ny4vxct.js → service-2ny4vxct.js} +2 -2
- package/dist/chunks/service-2sr9xw1p.js +30 -0
- package/dist/chunks/{contract-ctxmvs8y.js → service-4ggcc7pd.js} +28 -11
- package/dist/chunks/{contract-kd24eskk.js → service-61gake65.js} +17 -17
- package/dist/chunks/{contract-y2etg5bs.js → service-7f0py9js.js} +2 -2
- package/dist/chunks/{contract-w2eqyd95.js → service-87tppfgj.js} +2 -2
- package/dist/chunks/{contract-4x4a6tah.js → service-8we1dz3p.js} +4 -1
- package/dist/chunks/{contract-1gqkvw7r.js → service-ab9bm97w.js} +1 -1
- package/dist/chunks/{contract-9j12j8xw.js → service-anregfhs.js} +5 -5
- package/dist/chunks/{contract-s76jdhwt.js → service-cyxwqteg.js} +1 -1
- package/dist/chunks/{contract-gecjxyvt.js → service-gecjxyvt.js} +1 -1
- package/dist/chunks/{contract-nwcpakzx.js → service-js54wxgp.js} +2 -2
- package/dist/chunks/{contract-ryy6kscr.js → service-ryy6kscr.js} +1 -1
- package/dist/chunks/{contract-rb7z442v.js → service-wcsbjfhx.js} +44 -21
- package/dist/contract.js +1 -1
- package/dist/effect/api/api.d.ts +20 -0
- package/dist/effect/client.d.ts +3 -1
- package/dist/effect/client.js +12 -12
- package/dist/effect/generated/client-error.js +3 -3
- package/dist/effect/generated/client.d.ts +4 -2
- package/dist/effect/generated/client.js +5 -5
- package/dist/effect/generated/index.js +8 -8
- package/dist/effect/index.js +12 -12
- package/dist/effect/rpc.js +4 -4
- package/dist/effect/service.js +6 -6
- package/dist/promise/client.d.ts +2 -0
- package/dist/promise/client.js +11 -11
- package/dist/promise/generated/client-error.js +3 -3
- package/dist/promise/generated/client.d.ts +3 -1
- package/dist/promise/generated/client.js +4 -4
- package/dist/promise/generated/index.js +15 -9
- package/dist/promise/generated/types.d.ts +150 -0
- package/dist/promise/generated/types.js +7 -1
- package/dist/promise/index.js +19 -13
- package/dist/promise/rpc.js +2 -2
- package/dist/promise/service.js +6 -6
- package/dist/pty-handoff.js +4 -4
- package/dist/rpc-runtime.js +1 -1
- package/dist/service-contender.js +1 -1
- package/dist/service-probe.js +3 -3
- package/dist/service-timing.js +1 -1
- package/dist/service-version.js +1 -1
- package/dist/service.js +1 -1
- package/dist/shared-events.js +1 -1
- package/dist/solid/connection.js +1 -1
- package/dist/solid/data.js +9 -9
- package/dist/solid/index.js +13 -13
- package/dist/solid/pty.js +1 -1
- package/dist/solid/retention.js +1 -1
- package/dist/solid/usage.js +1 -1
- package/package.json +4 -4
- package/dist/chunks/contract-r6a5t1f9.js +0 -30
- /package/dist/chunks/{contract-6mptkzbc.js → service-6mptkzbc.js} +0 -0
- /package/dist/chunks/{contract-6mq2wh8y.js → service-6mq2wh8y.js} +0 -0
- /package/dist/chunks/{contract-8s2anffy.js → service-8s2anffy.js} +0 -0
- /package/dist/chunks/{contract-9rqn6x4v.js → service-9rqn6x4v.js} +0 -0
- /package/dist/chunks/{contract-gne7h7mq.js → service-gne7h7mq.js} +0 -0
- /package/dist/chunks/{contract-m2eywc8w.js → service-m2eywc8w.js} +0 -0
- /package/dist/chunks/{contract-qav6mfdz.js → service-qav6mfdz.js} +0 -0
- /package/dist/chunks/{contract-sxt88q69.js → service-sxt88q69.js} +0 -0
- /package/dist/chunks/{contract-ve4aws36.js → service-ve4aws36.js} +0 -0
- /package/dist/chunks/{contract-vmytr4q8.js → service-vmytr4q8.js} +0 -0
- /package/dist/chunks/{contract-vyas3vgt.js → service-vyas3vgt.js} +0 -0
- /package/dist/chunks/{contract-xgnj2w4v.js → service-xgnj2w4v.js} +0 -0
- /package/dist/chunks/{contract-ydhz1zrh.js → service-ydhz1zrh.js} +0 -0
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
defaultEnsureTiming2
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./service-xgnj2w4v.js";
|
|
4
4
|
import {
|
|
5
5
|
matchesVersion2
|
|
6
|
-
} from "./
|
|
6
|
+
} from "./service-sxt88q69.js";
|
|
7
7
|
|
|
8
8
|
// src/service-probe.ts
|
|
9
9
|
import { homedir } from "node:os";
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import {
|
|
2
|
+
make7
|
|
3
|
+
} from "./service-gecjxyvt.js";
|
|
4
|
+
import {
|
|
5
|
+
make3
|
|
6
|
+
} from "./service-wcsbjfhx.js";
|
|
7
|
+
import {
|
|
8
|
+
makeRpc2
|
|
9
|
+
} from "./service-ab9bm97w.js";
|
|
10
|
+
import {
|
|
11
|
+
__export
|
|
12
|
+
} from "./service-9rqn6x4v.js";
|
|
13
|
+
|
|
14
|
+
// src/promise/client.ts
|
|
15
|
+
var exports_client = {};
|
|
16
|
+
__export(exports_client, {
|
|
17
|
+
OpenCode: () => exports_client,
|
|
18
|
+
make: () => make2
|
|
19
|
+
});
|
|
20
|
+
function make2(options) {
|
|
21
|
+
const raw = make3(options);
|
|
22
|
+
const events = make7((signal, onActivity) => raw.event.subscribe(undefined, { signal, onActivity }));
|
|
23
|
+
return {
|
|
24
|
+
...raw,
|
|
25
|
+
rpc: Object.assign(makeRpc2(raw, events), raw.rpc),
|
|
26
|
+
event: events
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export { make2, exports_client };
|
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ClientApi2
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./service-vmytr4q8.js";
|
|
4
4
|
import {
|
|
5
|
-
|
|
6
|
-
} from "./
|
|
5
|
+
ClientError3
|
|
6
|
+
} from "./service-7f0py9js.js";
|
|
7
7
|
import {
|
|
8
8
|
__export
|
|
9
|
-
} from "./
|
|
9
|
+
} from "./service-9rqn6x4v.js";
|
|
10
10
|
|
|
11
11
|
// src/effect/generated/client.ts
|
|
12
|
-
var
|
|
13
|
-
__export(
|
|
14
|
-
make: () =>
|
|
12
|
+
var exports_client4 = {};
|
|
13
|
+
__export(exports_client4, {
|
|
14
|
+
make: () => make6
|
|
15
15
|
});
|
|
16
16
|
import { Effect, Stream, Schema } from "effect";
|
|
17
17
|
import { Sse } from "effect/encoding";
|
|
18
18
|
import { HttpClientError } from "effect/http";
|
|
19
19
|
import { HttpApiClient } from "effect/http-api";
|
|
20
|
-
var mapClientError = (error) => HttpClientError.isHttpClientError(error) || Schema.isSchemaError(error) || Sse.Retry.is(error) ? new
|
|
20
|
+
var mapClientError = (error) => HttpClientError.isHttpClientError(error) || Schema.isSchemaError(error) || Sse.Retry.is(error) ? new ClientError3({ cause: error }) : error;
|
|
21
21
|
var preserveEffect = () => (effect) => effect;
|
|
22
22
|
var preserveStream = () => (stream) => stream;
|
|
23
23
|
var EndpointServerInfo = (raw) => () => preserveEffect()(raw["server.info"]({}).pipe(Effect.mapError(mapClientError)));
|
|
@@ -272,7 +272,24 @@ var adaptGroupModel = (raw) => ({
|
|
|
272
272
|
default: EndpointModelDefault(raw)
|
|
273
273
|
});
|
|
274
274
|
var EndpointGenerateText = (raw) => (input) => preserveEffect()(raw["generate.text"]({ payload: { prompt: input["prompt"], model: input["model"] } }).pipe(Effect.mapError(mapClientError), Effect.map((value) => value.data)));
|
|
275
|
-
var
|
|
275
|
+
var EndpointGenerateImage = (raw) => (input) => preserveEffect()(raw["generate.image"]({
|
|
276
|
+
payload: {
|
|
277
|
+
model: input["model"],
|
|
278
|
+
prompt: input["prompt"],
|
|
279
|
+
images: input["images"],
|
|
280
|
+
n: input["n"],
|
|
281
|
+
aspect: input["aspect"],
|
|
282
|
+
resolution: input["resolution"]
|
|
283
|
+
}
|
|
284
|
+
}).pipe(Effect.mapError(mapClientError), Effect.map((value) => value.data)));
|
|
285
|
+
var EndpointGenerateDecisions = (raw) => (input) => preserveEffect()(raw["generate.decisions"]({
|
|
286
|
+
payload: { model: input["model"], input: input["input"], questions: input["questions"] }
|
|
287
|
+
}).pipe(Effect.mapError(mapClientError), Effect.map((value) => value.data)));
|
|
288
|
+
var adaptGroupGenerate = (raw) => ({
|
|
289
|
+
text: EndpointGenerateText(raw),
|
|
290
|
+
image: EndpointGenerateImage(raw),
|
|
291
|
+
decisions: EndpointGenerateDecisions(raw)
|
|
292
|
+
});
|
|
276
293
|
var EndpointVoiceModels = (raw) => () => preserveEffect()(raw["voice.models"]({}).pipe(Effect.mapError(mapClientError), Effect.map((value) => value.data)));
|
|
277
294
|
var EndpointVoiceSession = (raw) => (input) => preserveEffect()(raw["voice.session"]({
|
|
278
295
|
payload: { model: input["model"], session: input["session"], transport: input["transport"] }
|
|
@@ -666,6 +683,6 @@ var adaptClient = (raw) => ({
|
|
|
666
683
|
usage: adaptGroupUsage(raw["server.usage"]),
|
|
667
684
|
config: adaptGroupConfig(raw["server.config"])
|
|
668
685
|
});
|
|
669
|
-
var
|
|
686
|
+
var make6 = (options) => HttpApiClient.make(ClientApi2, options).pipe(Effect.map(adaptClient));
|
|
670
687
|
|
|
671
|
-
export {
|
|
688
|
+
export { make6, exports_client4 };
|
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
import {
|
|
2
2
|
make7
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./service-gecjxyvt.js";
|
|
4
4
|
import {
|
|
5
|
-
|
|
6
|
-
} from "./
|
|
5
|
+
ClientError3
|
|
6
|
+
} from "./service-7f0py9js.js";
|
|
7
7
|
import {
|
|
8
|
-
|
|
9
|
-
} from "./
|
|
8
|
+
make6
|
|
9
|
+
} from "./service-4ggcc7pd.js";
|
|
10
10
|
import {
|
|
11
|
-
|
|
11
|
+
make5,
|
|
12
12
|
aborted2
|
|
13
|
-
} from "./
|
|
13
|
+
} from "./service-anregfhs.js";
|
|
14
14
|
import {
|
|
15
15
|
__export
|
|
16
|
-
} from "./
|
|
16
|
+
} from "./service-9rqn6x4v.js";
|
|
17
17
|
|
|
18
18
|
// src/effect/client.ts
|
|
19
|
-
var
|
|
20
|
-
__export(
|
|
21
|
-
OpenCode: () =>
|
|
22
|
-
make: () =>
|
|
19
|
+
var exports_client3 = {};
|
|
20
|
+
__export(exports_client3, {
|
|
21
|
+
OpenCode: () => exports_client3,
|
|
22
|
+
make: () => make4
|
|
23
23
|
});
|
|
24
24
|
import { Cause, Context, Effect, Stream } from "effect";
|
|
25
25
|
import { HttpClient, HttpClientRequest } from "effect/http";
|
|
@@ -28,9 +28,9 @@ var CurrentHeaders = Context.Reference("@opencode/client/effect/rpc/headers", {
|
|
|
28
28
|
return;
|
|
29
29
|
}
|
|
30
30
|
});
|
|
31
|
-
var
|
|
31
|
+
var make4 = Effect.fn("OpenCode.make")(function* (options) {
|
|
32
32
|
const httpClient = yield* HttpClient.HttpClient;
|
|
33
|
-
const raw = yield*
|
|
33
|
+
const raw = yield* make6(options).pipe(Effect.provideService(HttpClient.HttpClient, HttpClient.mapRequestEffect(httpClient, (request) => Effect.map(CurrentHeaders, (headers) => headers ? HttpClientRequest.setHeaders(request, new Headers(headers)) : request))));
|
|
34
34
|
const context = yield* Effect.context();
|
|
35
35
|
const native = raw.event.subscribe();
|
|
36
36
|
|
|
@@ -41,12 +41,12 @@ var make2 = Effect.fn("OpenCode.make")(function* (options) {
|
|
|
41
41
|
}
|
|
42
42
|
}
|
|
43
43
|
const shared = make7((signal) => Stream.toAsyncIterableWith(native.pipe(Stream.interruptWhen(aborted2(signal)), Stream.catchCause((cause) => Stream.fail(new EventFailure(cause)))), context));
|
|
44
|
-
const subscribe = (input) => Stream.fromAsyncIterable(shared.subscribe({ types: input?.types }), (error) => error).pipe(Stream.catch((error) => Stream.failCause(error instanceof EventFailure ? error.cause : Cause.fail(new
|
|
44
|
+
const subscribe = (input) => Stream.fromAsyncIterable(shared.subscribe({ types: input?.types }), (error) => error).pipe(Stream.catch((error) => Stream.failCause(error instanceof EventFailure ? error.cause : Cause.fail(new ClientError3({ cause: error })))));
|
|
45
45
|
return {
|
|
46
46
|
...raw,
|
|
47
47
|
event: { ...raw.event, subscribe },
|
|
48
|
-
rpc: Object.assign(
|
|
48
|
+
rpc: Object.assign(make5((input, options) => raw.rpc.call(input).pipe(Effect.provideService(CurrentHeaders, options?.headers)), subscribe), raw.rpc)
|
|
49
49
|
};
|
|
50
50
|
});
|
|
51
51
|
|
|
52
|
-
export {
|
|
52
|
+
export { make4, exports_client3 };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
// src/effect/generated/client-error.ts
|
|
2
2
|
import { Schema } from "effect";
|
|
3
3
|
|
|
4
|
-
class
|
|
4
|
+
class ClientError3 extends Schema.TaggedError()("ClientError", {
|
|
5
5
|
cause: Schema.Defect()
|
|
6
6
|
}) {
|
|
7
7
|
}
|
|
8
8
|
|
|
9
|
-
export {
|
|
9
|
+
export { ClientError3 };
|
|
@@ -19,6 +19,9 @@ var isFormNotFoundError2 = (value) => typeof value === "object" && value !== nul
|
|
|
19
19
|
var isFormInvalidAnswerError2 = (value) => typeof value === "object" && value !== null && ("_tag" in value) && value["_tag"] === "FormInvalidAnswerError";
|
|
20
20
|
var isFormAlreadySettledError2 = (value) => typeof value === "object" && value !== null && ("_tag" in value) && value["_tag"] === "FormAlreadySettledError";
|
|
21
21
|
var isProviderNotFoundError2 = (value) => typeof value === "object" && value !== null && ("_tag" in value) && value["_tag"] === "ProviderNotFoundError";
|
|
22
|
+
var isModelNotFoundError2 = (value) => typeof value === "object" && value !== null && ("_tag" in value) && value["_tag"] === "ModelNotFoundError";
|
|
23
|
+
var isUnsupportedModelError2 = (value) => typeof value === "object" && value !== null && ("_tag" in value) && value["_tag"] === "UnsupportedModelError";
|
|
24
|
+
var isProviderRequestError2 = (value) => typeof value === "object" && value !== null && ("_tag" in value) && value["_tag"] === "ProviderRequestError";
|
|
22
25
|
var isIntegrationNotFoundError2 = (value) => typeof value === "object" && value !== null && ("_tag" in value) && value["_tag"] === "IntegrationNotFoundError";
|
|
23
26
|
var isIntegrationAttemptNotFoundError2 = (value) => typeof value === "object" && value !== null && ("_tag" in value) && value["_tag"] === "IntegrationAttemptNotFoundError";
|
|
24
27
|
var isIntegrationMethodNotFoundError2 = (value) => typeof value === "object" && value !== null && ("_tag" in value) && value["_tag"] === "IntegrationMethodNotFoundError";
|
|
@@ -35,4 +38,4 @@ var isShellNotFoundError2 = (value) => typeof value === "object" && value !== nu
|
|
|
35
38
|
var isWorktreeError2 = (value) => typeof value === "object" && value !== null && ("_tag" in value) && value["_tag"] === "WorktreeError";
|
|
36
39
|
var isVcsInitNotSupportedError2 = (value) => typeof value === "object" && value !== null && ("_tag" in value) && value["_tag"] === "VcsInitNotSupportedError";
|
|
37
40
|
|
|
38
|
-
export { isInvalidRequestError2, isUnauthorizedError2, isLocationNotFoundError2, isServiceUnavailableError2, isAgentNotFoundError2, isPluginNotFoundError2, isInvalidCursorError2, isSessionNotFoundError2, isConflictError2, isUnknownError2, isMessageNotFoundError2, isCommandNotFoundError2, isCommandExecutionError2, isSkillNotFoundError2, isSessionBusyError2, isInstructionEntryValueTooLargeError2, isFormNotFoundError2, isFormInvalidAnswerError2, isFormAlreadySettledError2, isProviderNotFoundError2, isIntegrationNotFoundError2, isIntegrationAttemptNotFoundError2, isIntegrationMethodNotFoundError2, isMcpServerNotFoundError2, isForbiddenError2, isProjectNotFoundError2, isPermissionSavedNotFoundError2, isPermissionNotFoundError2, isFileNotFoundError2, isRpcError2, isRpcInternalError2, isPtyNotFoundError2, isShellNotFoundError2, isWorktreeError2, isVcsInitNotSupportedError2 };
|
|
41
|
+
export { isInvalidRequestError2, isUnauthorizedError2, isLocationNotFoundError2, isServiceUnavailableError2, isAgentNotFoundError2, isPluginNotFoundError2, isInvalidCursorError2, isSessionNotFoundError2, isConflictError2, isUnknownError2, isMessageNotFoundError2, isCommandNotFoundError2, isCommandExecutionError2, isSkillNotFoundError2, isSessionBusyError2, isInstructionEntryValueTooLargeError2, isFormNotFoundError2, isFormInvalidAnswerError2, isFormAlreadySettledError2, isProviderNotFoundError2, isModelNotFoundError2, isUnsupportedModelError2, isProviderRequestError2, isIntegrationNotFoundError2, isIntegrationAttemptNotFoundError2, isIntegrationMethodNotFoundError2, isMcpServerNotFoundError2, isForbiddenError2, isProjectNotFoundError2, isPermissionSavedNotFoundError2, isPermissionNotFoundError2, isFileNotFoundError2, isRpcError2, isRpcInternalError2, isPtyNotFoundError2, isShellNotFoundError2, isWorktreeError2, isVcsInitNotSupportedError2 };
|
|
@@ -3,20 +3,20 @@ import {
|
|
|
3
3
|
readError2,
|
|
4
4
|
event2,
|
|
5
5
|
eventType2
|
|
6
|
-
} from "./
|
|
6
|
+
} from "./service-ryy6kscr.js";
|
|
7
7
|
import {
|
|
8
8
|
__export
|
|
9
|
-
} from "./
|
|
9
|
+
} from "./service-9rqn6x4v.js";
|
|
10
10
|
|
|
11
11
|
// src/effect/rpc.ts
|
|
12
12
|
var exports_rpc = {};
|
|
13
13
|
__export(exports_rpc, {
|
|
14
14
|
RpcClientRuntime: () => exports_rpc,
|
|
15
15
|
aborted: () => aborted2,
|
|
16
|
-
make: () =>
|
|
16
|
+
make: () => make5
|
|
17
17
|
});
|
|
18
18
|
import { Effect, Stream } from "effect";
|
|
19
|
-
function
|
|
19
|
+
function make5(call, subscribe) {
|
|
20
20
|
return (definition) => {
|
|
21
21
|
const methods = Object.fromEntries(Object.entries(definition.methods).map(([name, method]) => [
|
|
22
22
|
name,
|
|
@@ -59,4 +59,4 @@ function aborted2(signal) {
|
|
|
59
59
|
});
|
|
60
60
|
}
|
|
61
61
|
|
|
62
|
-
export {
|
|
62
|
+
export { make5, aborted2, exports_rpc };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// src/promise/generated/client-error.ts
|
|
2
|
-
class
|
|
2
|
+
class ClientError2 extends Error {
|
|
3
3
|
reason;
|
|
4
4
|
name = "ClientError";
|
|
5
5
|
constructor(reason, options) {
|
|
@@ -9,4 +9,4 @@ class ClientError3 extends Error {
|
|
|
9
9
|
}
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
-
export {
|
|
12
|
+
export { ClientError2 };
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
} from "./
|
|
2
|
+
ClientError2
|
|
3
|
+
} from "./service-js54wxgp.js";
|
|
4
4
|
import {
|
|
5
5
|
__export
|
|
6
|
-
} from "./
|
|
6
|
+
} from "./service-9rqn6x4v.js";
|
|
7
7
|
|
|
8
8
|
// src/promise/generated/client.ts
|
|
9
|
-
var
|
|
10
|
-
__export(
|
|
11
|
-
make: () =>
|
|
9
|
+
var exports_client2 = {};
|
|
10
|
+
__export(exports_client2, {
|
|
11
|
+
make: () => make3
|
|
12
12
|
});
|
|
13
13
|
var maxSseEventBytes = 16 * 1024 * 1024;
|
|
14
|
-
function
|
|
14
|
+
function make3(options) {
|
|
15
15
|
const fetch = options.fetch ?? globalThis.fetch;
|
|
16
16
|
const prepare = (descriptor, requestOptions) => {
|
|
17
17
|
const baseUrl = new URL(options.baseUrl);
|
|
@@ -44,7 +44,7 @@ function make6(options) {
|
|
|
44
44
|
const prepared = prepare(descriptor, requestOptions);
|
|
45
45
|
return await fetch(prepared.url, prepared.init);
|
|
46
46
|
} catch (cause) {
|
|
47
|
-
throw new
|
|
47
|
+
throw new ClientError2("Transport", { cause });
|
|
48
48
|
}
|
|
49
49
|
};
|
|
50
50
|
const responseError = async (response, descriptor) => {
|
|
@@ -53,7 +53,7 @@ function make6(options) {
|
|
|
53
53
|
try {
|
|
54
54
|
await response.body?.cancel();
|
|
55
55
|
} catch {}
|
|
56
|
-
throw new
|
|
56
|
+
throw new ClientError2("UnexpectedStatus", { cause: { status: response.status }, detail: String(response.status) });
|
|
57
57
|
};
|
|
58
58
|
const request = async (descriptor, requestOptions) => {
|
|
59
59
|
const response = await execute(descriptor, requestOptions);
|
|
@@ -78,10 +78,10 @@ function make6(options) {
|
|
|
78
78
|
try {
|
|
79
79
|
await response.body?.cancel();
|
|
80
80
|
} catch {}
|
|
81
|
-
throw new
|
|
81
|
+
throw new ClientError2("UnsupportedContentType", { detail: response.headers.get("content-type") });
|
|
82
82
|
}
|
|
83
83
|
if (response.body === null)
|
|
84
|
-
throw new
|
|
84
|
+
throw new ClientError2("MalformedResponse");
|
|
85
85
|
const reader = response.body.getReader();
|
|
86
86
|
const decoder = new TextDecoder;
|
|
87
87
|
let buffer = "";
|
|
@@ -91,13 +91,13 @@ function make6(options) {
|
|
|
91
91
|
try {
|
|
92
92
|
next = await reader.read();
|
|
93
93
|
} catch (cause) {
|
|
94
|
-
throw new
|
|
94
|
+
throw new ClientError2("Transport", { cause });
|
|
95
95
|
}
|
|
96
96
|
if (!next.done)
|
|
97
97
|
requestOptions?.onActivity?.();
|
|
98
98
|
buffer += decoder.decode(next.value, { stream: !next.done });
|
|
99
99
|
if (buffer.length > maxSseEventBytes)
|
|
100
|
-
throw new
|
|
100
|
+
throw new ClientError2("SseEventTooLarge");
|
|
101
101
|
const trailingCarriageReturn = !next.done && buffer.endsWith("\r");
|
|
102
102
|
if (trailingCarriageReturn)
|
|
103
103
|
buffer = buffer.slice(0, -1);
|
|
@@ -124,7 +124,7 @@ function make6(options) {
|
|
|
124
124
|
try {
|
|
125
125
|
yield JSON.parse(data);
|
|
126
126
|
} catch (cause) {
|
|
127
|
-
throw new
|
|
127
|
+
throw new ClientError2("MalformedResponse", { cause });
|
|
128
128
|
}
|
|
129
129
|
}
|
|
130
130
|
boundary = buffer.indexOf(`
|
|
@@ -652,10 +652,33 @@ function make6(options) {
|
|
|
652
652
|
generate: {
|
|
653
653
|
text: (input, requestOptions) => request({
|
|
654
654
|
method: "POST",
|
|
655
|
-
path: `/api/experimental/generate`,
|
|
655
|
+
path: `/api/experimental/generate/text`,
|
|
656
656
|
body: { prompt: input["prompt"], model: input["model"] },
|
|
657
657
|
successStatus: 200,
|
|
658
|
-
declaredStatuses: [400, 401, 404, 503],
|
|
658
|
+
declaredStatuses: [400, 401, 404, 422, 502, 503],
|
|
659
|
+
empty: false
|
|
660
|
+
}, requestOptions).then((value) => value.data),
|
|
661
|
+
image: (input, requestOptions) => request({
|
|
662
|
+
method: "POST",
|
|
663
|
+
path: `/api/experimental/generate/image`,
|
|
664
|
+
body: {
|
|
665
|
+
model: input["model"],
|
|
666
|
+
prompt: input["prompt"],
|
|
667
|
+
images: input["images"],
|
|
668
|
+
n: input["n"],
|
|
669
|
+
aspect: input["aspect"],
|
|
670
|
+
resolution: input["resolution"]
|
|
671
|
+
},
|
|
672
|
+
successStatus: 200,
|
|
673
|
+
declaredStatuses: [400, 401, 404, 422, 502, 503],
|
|
674
|
+
empty: false
|
|
675
|
+
}, requestOptions).then((value) => value.data),
|
|
676
|
+
decisions: (input, requestOptions) => request({
|
|
677
|
+
method: "POST",
|
|
678
|
+
path: `/api/experimental/generate/decisions`,
|
|
679
|
+
body: { model: input["model"], input: input["input"], questions: input["questions"] },
|
|
680
|
+
successStatus: 200,
|
|
681
|
+
declaredStatuses: [400, 401, 404, 422, 502, 503],
|
|
659
682
|
empty: false
|
|
660
683
|
}, requestOptions).then((value) => value.data)
|
|
661
684
|
},
|
|
@@ -1546,20 +1569,20 @@ async function json(response) {
|
|
|
1546
1569
|
try {
|
|
1547
1570
|
await response.body?.cancel();
|
|
1548
1571
|
} catch {}
|
|
1549
|
-
throw new
|
|
1572
|
+
throw new ClientError2("UnsupportedContentType", { detail: response.headers.get("content-type") });
|
|
1550
1573
|
}
|
|
1551
1574
|
let text;
|
|
1552
1575
|
try {
|
|
1553
1576
|
text = await response.text();
|
|
1554
1577
|
} catch (cause) {
|
|
1555
|
-
throw new
|
|
1578
|
+
throw new ClientError2("Transport", { cause });
|
|
1556
1579
|
}
|
|
1557
1580
|
if (text === "")
|
|
1558
|
-
throw new
|
|
1581
|
+
throw new ClientError2("MalformedResponse");
|
|
1559
1582
|
try {
|
|
1560
1583
|
return JSON.parse(text);
|
|
1561
1584
|
} catch (cause) {
|
|
1562
|
-
throw new
|
|
1585
|
+
throw new ClientError2("MalformedResponse", { cause });
|
|
1563
1586
|
}
|
|
1564
1587
|
}
|
|
1565
1588
|
function declared(body) {
|
|
@@ -1572,4 +1595,4 @@ function isContentType(response, expected) {
|
|
|
1572
1595
|
return response.headers.get("content-type")?.split(";", 1)[0]?.trim().toLowerCase() === expected;
|
|
1573
1596
|
}
|
|
1574
1597
|
|
|
1575
|
-
export {
|
|
1598
|
+
export { make3, exports_client2 };
|
package/dist/contract.js
CHANGED
package/dist/effect/api/api.d.ts
CHANGED
|
@@ -25,6 +25,7 @@ import type { Instruction } from "@opencode/schema/instruction";
|
|
|
25
25
|
import type { Snapshot } from "@opencode/schema/snapshot";
|
|
26
26
|
import type { Shell } from "@opencode/schema/shell";
|
|
27
27
|
import type { Form } from "@opencode/schema/form";
|
|
28
|
+
import type { Generate } from "@opencode/schema/generate";
|
|
28
29
|
import type { Provider } from "@opencode/schema/provider";
|
|
29
30
|
import type { Integration } from "@opencode/schema/integration";
|
|
30
31
|
import type { Mcp } from "@opencode/schema/mcp";
|
|
@@ -1811,8 +1812,27 @@ export type GenerateTextOutput = {
|
|
|
1811
1812
|
readonly text: string;
|
|
1812
1813
|
};
|
|
1813
1814
|
export type GenerateTextOperation<E = never> = (input: GenerateTextInput) => Effect.Effect<GenerateTextOutput, E>;
|
|
1815
|
+
export type GenerateImageInput = {
|
|
1816
|
+
readonly model: Model.Ref;
|
|
1817
|
+
readonly prompt: string;
|
|
1818
|
+
readonly images?: ReadonlyArray<Generate.File> | undefined;
|
|
1819
|
+
readonly n?: number | undefined;
|
|
1820
|
+
readonly aspect?: Generate.ImageAspect | undefined;
|
|
1821
|
+
readonly resolution?: Generate.ImageResolution | undefined;
|
|
1822
|
+
};
|
|
1823
|
+
export type GenerateImageOutput = Generate.ImageResult;
|
|
1824
|
+
export type GenerateImageOperation<E = never> = (input: GenerateImageInput) => Effect.Effect<GenerateImageOutput, E>;
|
|
1825
|
+
export type GenerateDecisionsInput = {
|
|
1826
|
+
readonly model: Model.Ref;
|
|
1827
|
+
readonly input: ReadonlyArray<Generate.DecisionPart>;
|
|
1828
|
+
readonly questions: ReadonlyArray<Generate.DecisionQuestion>;
|
|
1829
|
+
};
|
|
1830
|
+
export type GenerateDecisionsOutput = Generate.DecisionResult;
|
|
1831
|
+
export type GenerateDecisionsOperation<E = never> = (input: GenerateDecisionsInput) => Effect.Effect<GenerateDecisionsOutput, E>;
|
|
1814
1832
|
export interface GenerateApi<E = never> {
|
|
1815
1833
|
readonly text: GenerateTextOperation<E>;
|
|
1834
|
+
readonly image: GenerateImageOperation<E>;
|
|
1835
|
+
readonly decisions: GenerateDecisionsOperation<E>;
|
|
1816
1836
|
}
|
|
1817
1837
|
export type VoiceModelsOutput = {
|
|
1818
1838
|
readonly models: ReadonlyArray<{
|
package/dist/effect/client.d.ts
CHANGED
|
@@ -93,7 +93,9 @@ export declare const make: (options?: {
|
|
|
93
93
|
default: (input?: import("./api.js").ModelDefaultInput) => Effect.Effect<import("./api.js").ModelDefaultOutput, ClientError | import("effect/http/HttpClientError").HttpClientError | import("@opencode/protocol/errors").InvalidRequestError | import("@opencode/protocol/errors").LocationNotFoundError | import("effect/Schema").SchemaError | import("@opencode/protocol/errors").ServiceUnavailableError | import("@opencode/protocol/errors").UnauthorizedError, never>;
|
|
94
94
|
};
|
|
95
95
|
generate: {
|
|
96
|
-
text: (input: import("./api.js").GenerateTextInput) => Effect.Effect<import("./api.js").GenerateTextOutput, ClientError | import("effect/http/HttpClientError").HttpClientError | import("@opencode/protocol/errors").InvalidRequestError | import("@opencode/protocol/errors").LocationNotFoundError | import("effect/Schema").SchemaError | import("@opencode/protocol/errors").ServiceUnavailableError | import("@opencode/protocol/errors").UnauthorizedError, never>;
|
|
96
|
+
text: (input: import("./api.js").GenerateTextInput) => Effect.Effect<import("./api.js").GenerateTextOutput, ClientError | import("effect/http/HttpClientError").HttpClientError | import("@opencode/protocol/errors").InvalidRequestError | import("@opencode/protocol/errors").LocationNotFoundError | import("@opencode/protocol/errors").ModelNotFoundError | import("@opencode/protocol/errors").ProviderNotFoundError | import("@opencode/protocol/errors").ProviderRequestError | import("effect/Schema").SchemaError | import("@opencode/protocol/errors").ServiceUnavailableError | import("@opencode/protocol/errors").UnauthorizedError | import("@opencode/protocol/errors").UnsupportedModelError, never>;
|
|
97
|
+
image: (input: import("./api.js").GenerateImageInput) => Effect.Effect<import("@opencode/schema/generate").ImageResult, ClientError | import("effect/http/HttpClientError").HttpClientError | import("@opencode/protocol/errors").InvalidRequestError | import("@opencode/protocol/errors").LocationNotFoundError | import("@opencode/protocol/errors").ModelNotFoundError | import("@opencode/protocol/errors").ProviderNotFoundError | import("@opencode/protocol/errors").ProviderRequestError | import("effect/Schema").SchemaError | import("@opencode/protocol/errors").ServiceUnavailableError | import("@opencode/protocol/errors").UnauthorizedError | import("@opencode/protocol/errors").UnsupportedModelError, never>;
|
|
98
|
+
decisions: (input: import("./api.js").GenerateDecisionsInput) => Effect.Effect<import("@opencode/schema/generate").DecisionResult, ClientError | import("effect/http/HttpClientError").HttpClientError | import("@opencode/protocol/errors").InvalidRequestError | import("@opencode/protocol/errors").LocationNotFoundError | import("@opencode/protocol/errors").ModelNotFoundError | import("@opencode/protocol/errors").ProviderNotFoundError | import("@opencode/protocol/errors").ProviderRequestError | import("effect/Schema").SchemaError | import("@opencode/protocol/errors").ServiceUnavailableError | import("@opencode/protocol/errors").UnauthorizedError | import("@opencode/protocol/errors").UnsupportedModelError, never>;
|
|
97
99
|
};
|
|
98
100
|
voice: {
|
|
99
101
|
models: () => Effect.Effect<import("./api.js").VoiceModelsOutput, ClientError | import("effect/http/HttpClientError").HttpClientError | import("@opencode/protocol/errors").InvalidRequestError | import("@opencode/protocol/errors").LocationNotFoundError | import("effect/Schema").SchemaError | import("@opencode/protocol/errors").ServiceUnavailableError | import("@opencode/protocol/errors").UnauthorizedError, never>;
|
package/dist/effect/client.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
} from "../chunks/
|
|
5
|
-
import"../chunks/
|
|
6
|
-
import"../chunks/
|
|
7
|
-
import"../chunks/
|
|
8
|
-
import"../chunks/
|
|
9
|
-
import"../chunks/
|
|
10
|
-
import"../chunks/
|
|
11
|
-
import"../chunks/
|
|
2
|
+
make4,
|
|
3
|
+
exports_client3
|
|
4
|
+
} from "../chunks/service-61gake65.js";
|
|
5
|
+
import"../chunks/service-anregfhs.js";
|
|
6
|
+
import"../chunks/service-6mptkzbc.js";
|
|
7
|
+
import"../chunks/service-4ggcc7pd.js";
|
|
8
|
+
import"../chunks/service-7f0py9js.js";
|
|
9
|
+
import"../chunks/service-vmytr4q8.js";
|
|
10
|
+
import"../chunks/service-ryy6kscr.js";
|
|
11
|
+
import"../chunks/service-gecjxyvt.js";
|
|
12
12
|
export {
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
exports_client3 as OpenCode,
|
|
14
|
+
make4 as make
|
|
15
15
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Effect, Stream, Schema } from "effect";
|
|
2
2
|
import { Sse } from "effect/encoding";
|
|
3
3
|
import { HttpClientError } from "effect/http";
|
|
4
|
-
import type { ServerInfoOutput, ServerPairOutput, ServerConnectInput, ServerConnectOutput, LocationGetInput, AgentListInput, AgentListOutput, AgentGetInput, AgentGetOutput, PluginListInput, PluginListOutput, PluginGuiInput, PluginGuiOutput, PluginCheckInput, PluginCheckOutput, PluginUpdateInput, SessionListInput, SessionListOutput, SessionStatsInput, SessionStatsOutput, SessionCreateInput, SessionImportInput, SessionExportInput, SessionExportOutput, SessionActiveOutput, SessionGetInput, SessionRemoveInput, SessionForkInput, SessionSwitchAgentInput, SessionSwitchModelInput, SessionUpdateInput, SessionMoveInput, SessionPromptInput, SessionCommandInput, SessionSkillInput, SessionSyntheticInput, SessionShellInput, SessionCompactInput, SessionWaitInput, SessionRevertStageInput, SessionRevertClearInput, SessionRevertCommitInput, SessionContextInput, SessionContextOutput, SessionDiffInput, SessionDiffOutput, SessionInboxListInput, SessionInboxListOutput, SessionInboxCancelInput, SessionInboxUpdateInput, SessionInstructionsEntryListInput, SessionInstructionsEntryListOutput, SessionInstructionsEntryPutInput, SessionInstructionsEntryRemoveInput, SessionGenerateInput, SessionGenerateOutput, SessionLogInput, SessionLogOutput, SessionInterruptInput, SessionInterruptOutput, SessionBackgroundInput, SessionMessageGetInput, SessionFormListInput, SessionFormListOutput, SessionFormCreateInput, SessionFormGetInput, SessionFormReplyInput, SessionFormCancelInput, SessionEnvironmentInput, SessionViewInput, MessageListInput, MessageListOutput, ModelListInput, ModelListOutput, ModelDefaultInput, ModelDefaultOutput, GenerateTextInput, GenerateTextOutput, VoiceModelsOutput, VoiceSessionInput, VoiceSessionOutput, ProviderListInput, ProviderListOutput, ProviderGetInput, ProviderGetOutput, IntegrationListInput, IntegrationListOutput, IntegrationGetInput, IntegrationGetOutput, IntegrationWellknownAddInput, IntegrationConnectKeyInput, IntegrationConnectExternalInput, IntegrationOauthConnectInput, IntegrationOauthConnectOutput, IntegrationOauthStatusInput, IntegrationOauthStatusOutput, IntegrationOauthCompleteInput, IntegrationOauthCancelInput, IntegrationCommandConnectInput, IntegrationCommandConnectOutput, IntegrationCommandStatusInput, IntegrationCommandStatusOutput, IntegrationCommandCancelInput, McpListInput, McpListOutput, McpAddInput, McpRemoveInput, McpConnectInput, McpDisconnectInput, McpResourceCatalogInput, McpResourceCatalogOutput, McpClientTokenInput, McpClientTokenOutput, CredentialListOutput, CredentialCreateInput, CredentialUpdateInput, CredentialActivateInput, CredentialRemoveInput, ProjectListInput, ProjectListOutput, ProjectUpdateInput, FormListInput, FormListOutput, PermissionRequestListInput, PermissionRequestListOutput, PermissionSavedListInput, PermissionSavedListOutput, PermissionSavedUpdateInput, PermissionSavedRemoveInput, PermissionCreateInput, PermissionCreateOutput, PermissionListInput, PermissionListOutput, PermissionGetInput, PermissionReplyInput, FileListInput, FileListOutput, FileFindInput, FileFindOutput, FileWatchInput, FileUnwatchInput, CommandListInput, CommandListOutput, SkillListInput, SkillListOutput, RpcCallInput, RpcCallOutput, EventSubscribeInput, PtyListInput, PtyListOutput, PtyCreateInput, PtyCreateOutput, PtyGetInput, PtyGetOutput, PtyUpdateInput, PtyUpdateOutput, PtyRemoveInput, PtyConnectTokenInput, PtyConnectTokenOutput, ExperimentalPersistentPtyReadInput, ExperimentalPersistentPtyReadOutput, ExperimentalPersistentPtyListInput, ExperimentalPersistentPtyListOutput, ExperimentalPersistentPtyCreateInput, ExperimentalPersistentPtyCreateOutput, ExperimentalPersistentPtyHandoffOutput, ExperimentalPersistentPtyGetInput, ExperimentalPersistentPtyGetOutput, ExperimentalPersistentPtyUpdateInput, ExperimentalPersistentPtyUpdateOutput, ExperimentalPersistentPtySnapshotInput, ExperimentalPersistentPtySnapshotOutput, ExperimentalPersistentPtyRemoveInput, ExperimentalPersistentPtyConnectTokenInput, ShellListInput, ShellListOutput, ShellCreateInput, ShellCreateOutput, ShellGetInput, ShellGetOutput, ShellOutputInput, ShellOutputOutput, ShellRemoveInput, ReferenceListInput, ReferenceListOutput, WorktreeListInput, WorktreeCreateInput, WorktreeRemoveInput, WorktreeRefreshInput, VcsInitInput, VcsGetInput, VcsGetOutput, VcsBaseInput, VcsBaseOutput, VcsStatusInput, VcsStatusOutput, VcsBranchListInput, VcsBranchListOutput, VcsDiffInput, VcsDiffOutput, DebugHeapDumpInput, DebugHeapDumpOutput, DebugLocationListOutput, DebugLocationEvictInput, MigrationV1StatusOutput, WebsearchProvidersInput, WebsearchProvidersOutput, WebsearchQueryInput, WebsearchQueryOutput, UsageLimitsInput, UsageLimitsOutput, ConfigGetInput, ConfigGetOutput, ConfigShellsOutput, ConfigUpdateInput } from "../api/api.js";
|
|
4
|
+
import type { ServerInfoOutput, ServerPairOutput, ServerConnectInput, ServerConnectOutput, LocationGetInput, AgentListInput, AgentListOutput, AgentGetInput, AgentGetOutput, PluginListInput, PluginListOutput, PluginGuiInput, PluginGuiOutput, PluginCheckInput, PluginCheckOutput, PluginUpdateInput, SessionListInput, SessionListOutput, SessionStatsInput, SessionStatsOutput, SessionCreateInput, SessionImportInput, SessionExportInput, SessionExportOutput, SessionActiveOutput, SessionGetInput, SessionRemoveInput, SessionForkInput, SessionSwitchAgentInput, SessionSwitchModelInput, SessionUpdateInput, SessionMoveInput, SessionPromptInput, SessionCommandInput, SessionSkillInput, SessionSyntheticInput, SessionShellInput, SessionCompactInput, SessionWaitInput, SessionRevertStageInput, SessionRevertClearInput, SessionRevertCommitInput, SessionContextInput, SessionContextOutput, SessionDiffInput, SessionDiffOutput, SessionInboxListInput, SessionInboxListOutput, SessionInboxCancelInput, SessionInboxUpdateInput, SessionInstructionsEntryListInput, SessionInstructionsEntryListOutput, SessionInstructionsEntryPutInput, SessionInstructionsEntryRemoveInput, SessionGenerateInput, SessionGenerateOutput, SessionLogInput, SessionLogOutput, SessionInterruptInput, SessionInterruptOutput, SessionBackgroundInput, SessionMessageGetInput, SessionFormListInput, SessionFormListOutput, SessionFormCreateInput, SessionFormGetInput, SessionFormReplyInput, SessionFormCancelInput, SessionEnvironmentInput, SessionViewInput, MessageListInput, MessageListOutput, ModelListInput, ModelListOutput, ModelDefaultInput, ModelDefaultOutput, GenerateTextInput, GenerateTextOutput, GenerateImageInput, GenerateDecisionsInput, VoiceModelsOutput, VoiceSessionInput, VoiceSessionOutput, ProviderListInput, ProviderListOutput, ProviderGetInput, ProviderGetOutput, IntegrationListInput, IntegrationListOutput, IntegrationGetInput, IntegrationGetOutput, IntegrationWellknownAddInput, IntegrationConnectKeyInput, IntegrationConnectExternalInput, IntegrationOauthConnectInput, IntegrationOauthConnectOutput, IntegrationOauthStatusInput, IntegrationOauthStatusOutput, IntegrationOauthCompleteInput, IntegrationOauthCancelInput, IntegrationCommandConnectInput, IntegrationCommandConnectOutput, IntegrationCommandStatusInput, IntegrationCommandStatusOutput, IntegrationCommandCancelInput, McpListInput, McpListOutput, McpAddInput, McpRemoveInput, McpConnectInput, McpDisconnectInput, McpResourceCatalogInput, McpResourceCatalogOutput, McpClientTokenInput, McpClientTokenOutput, CredentialListOutput, CredentialCreateInput, CredentialUpdateInput, CredentialActivateInput, CredentialRemoveInput, ProjectListInput, ProjectListOutput, ProjectUpdateInput, FormListInput, FormListOutput, PermissionRequestListInput, PermissionRequestListOutput, PermissionSavedListInput, PermissionSavedListOutput, PermissionSavedUpdateInput, PermissionSavedRemoveInput, PermissionCreateInput, PermissionCreateOutput, PermissionListInput, PermissionListOutput, PermissionGetInput, PermissionReplyInput, FileListInput, FileListOutput, FileFindInput, FileFindOutput, FileWatchInput, FileUnwatchInput, CommandListInput, CommandListOutput, SkillListInput, SkillListOutput, RpcCallInput, RpcCallOutput, EventSubscribeInput, PtyListInput, PtyListOutput, PtyCreateInput, PtyCreateOutput, PtyGetInput, PtyGetOutput, PtyUpdateInput, PtyUpdateOutput, PtyRemoveInput, PtyConnectTokenInput, PtyConnectTokenOutput, ExperimentalPersistentPtyReadInput, ExperimentalPersistentPtyReadOutput, ExperimentalPersistentPtyListInput, ExperimentalPersistentPtyListOutput, ExperimentalPersistentPtyCreateInput, ExperimentalPersistentPtyCreateOutput, ExperimentalPersistentPtyHandoffOutput, ExperimentalPersistentPtyGetInput, ExperimentalPersistentPtyGetOutput, ExperimentalPersistentPtyUpdateInput, ExperimentalPersistentPtyUpdateOutput, ExperimentalPersistentPtySnapshotInput, ExperimentalPersistentPtySnapshotOutput, ExperimentalPersistentPtyRemoveInput, ExperimentalPersistentPtyConnectTokenInput, ShellListInput, ShellListOutput, ShellCreateInput, ShellCreateOutput, ShellGetInput, ShellGetOutput, ShellOutputInput, ShellOutputOutput, ShellRemoveInput, ReferenceListInput, ReferenceListOutput, WorktreeListInput, WorktreeCreateInput, WorktreeRemoveInput, WorktreeRefreshInput, VcsInitInput, VcsGetInput, VcsGetOutput, VcsBaseInput, VcsBaseOutput, VcsStatusInput, VcsStatusOutput, VcsBranchListInput, VcsBranchListOutput, VcsDiffInput, VcsDiffOutput, DebugHeapDumpInput, DebugHeapDumpOutput, DebugLocationListOutput, DebugLocationEvictInput, MigrationV1StatusOutput, WebsearchProvidersInput, WebsearchProvidersOutput, WebsearchQueryInput, WebsearchQueryOutput, UsageLimitsInput, UsageLimitsOutput, ConfigGetInput, ConfigGetOutput, ConfigShellsOutput, ConfigUpdateInput } from "../api/api.js";
|
|
5
5
|
import { ClientError } from "./client-error.js";
|
|
6
6
|
export declare const make: (options?: {
|
|
7
7
|
readonly baseUrl?: URL | string;
|
|
@@ -90,7 +90,9 @@ export declare const make: (options?: {
|
|
|
90
90
|
default: (input?: ModelDefaultInput) => Effect.Effect<ModelDefaultOutput, ClientError | HttpClientError.HttpClientError | import("@opencode/protocol/errors").InvalidRequestError | import("@opencode/protocol/errors").LocationNotFoundError | Schema.SchemaError | import("@opencode/protocol/errors").ServiceUnavailableError | import("@opencode/protocol/errors").UnauthorizedError, never>;
|
|
91
91
|
};
|
|
92
92
|
generate: {
|
|
93
|
-
text: (input: GenerateTextInput) => Effect.Effect<GenerateTextOutput, ClientError | HttpClientError.HttpClientError | import("@opencode/protocol/errors").InvalidRequestError | import("@opencode/protocol/errors").LocationNotFoundError | Schema.SchemaError | import("@opencode/protocol/errors").ServiceUnavailableError | import("@opencode/protocol/errors").UnauthorizedError, never>;
|
|
93
|
+
text: (input: GenerateTextInput) => Effect.Effect<GenerateTextOutput, ClientError | HttpClientError.HttpClientError | import("@opencode/protocol/errors").InvalidRequestError | import("@opencode/protocol/errors").LocationNotFoundError | import("@opencode/protocol/errors").ModelNotFoundError | import("@opencode/protocol/errors").ProviderNotFoundError | import("@opencode/protocol/errors").ProviderRequestError | Schema.SchemaError | import("@opencode/protocol/errors").ServiceUnavailableError | import("@opencode/protocol/errors").UnauthorizedError | import("@opencode/protocol/errors").UnsupportedModelError, never>;
|
|
94
|
+
image: (input: GenerateImageInput) => Effect.Effect<import("@opencode/schema/generate").ImageResult, ClientError | HttpClientError.HttpClientError | import("@opencode/protocol/errors").InvalidRequestError | import("@opencode/protocol/errors").LocationNotFoundError | import("@opencode/protocol/errors").ModelNotFoundError | import("@opencode/protocol/errors").ProviderNotFoundError | import("@opencode/protocol/errors").ProviderRequestError | Schema.SchemaError | import("@opencode/protocol/errors").ServiceUnavailableError | import("@opencode/protocol/errors").UnauthorizedError | import("@opencode/protocol/errors").UnsupportedModelError, never>;
|
|
95
|
+
decisions: (input: GenerateDecisionsInput) => Effect.Effect<import("@opencode/schema/generate").DecisionResult, ClientError | HttpClientError.HttpClientError | import("@opencode/protocol/errors").InvalidRequestError | import("@opencode/protocol/errors").LocationNotFoundError | import("@opencode/protocol/errors").ModelNotFoundError | import("@opencode/protocol/errors").ProviderNotFoundError | import("@opencode/protocol/errors").ProviderRequestError | Schema.SchemaError | import("@opencode/protocol/errors").ServiceUnavailableError | import("@opencode/protocol/errors").UnauthorizedError | import("@opencode/protocol/errors").UnsupportedModelError, never>;
|
|
94
96
|
};
|
|
95
97
|
voice: {
|
|
96
98
|
models: () => Effect.Effect<VoiceModelsOutput, ClientError | HttpClientError.HttpClientError | import("@opencode/protocol/errors").InvalidRequestError | import("@opencode/protocol/errors").LocationNotFoundError | Schema.SchemaError | import("@opencode/protocol/errors").ServiceUnavailableError | import("@opencode/protocol/errors").UnauthorizedError, never>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
} from "../../chunks/
|
|
4
|
-
import"../../chunks/
|
|
5
|
-
import"../../chunks/
|
|
2
|
+
make6
|
|
3
|
+
} from "../../chunks/service-4ggcc7pd.js";
|
|
4
|
+
import"../../chunks/service-7f0py9js.js";
|
|
5
|
+
import"../../chunks/service-vmytr4q8.js";
|
|
6
6
|
export {
|
|
7
|
-
|
|
7
|
+
make6 as make
|
|
8
8
|
};
|