@opencode/client 2.1.4 → 2.2.0
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/service-timing-6mq2wh8y.js +33 -0
- package/dist/chunks/{contract-y2etg5bs.js → service-timing-7f0py9js.js} +2 -2
- package/dist/chunks/{contract-c46qzyff.js → service-timing-8we1dz3p.js} +5 -1
- package/dist/chunks/{contract-2ny4vxct.js → service-timing-8ye1ye6f.js} +2 -2
- package/dist/chunks/{contract-skhp7hxc.js → service-timing-ab9bm97w.js} +1 -1
- package/dist/chunks/service-timing-b80wmp2t.js +30 -0
- package/dist/chunks/{contract-1x65x4hv.js → service-timing-cyxwqteg.js} +97 -56
- package/dist/chunks/{contract-8bbb028w.js → service-timing-gecjxyvt.js} +5 -1
- package/dist/chunks/{contract-hg9t2gnm.js → service-timing-jpd9ebw3.js} +17 -17
- package/dist/chunks/{contract-nwcpakzx.js → service-timing-js54wxgp.js} +2 -2
- package/dist/chunks/{contract-9kmsh4jj.js → service-timing-knyqkv17.js} +2 -2
- package/dist/chunks/{contract-15p82y03.js → service-timing-myz4ngx9.js} +5 -5
- package/dist/chunks/{contract-w10x3kfx.js → service-timing-rxd7awy0.js} +51 -21
- package/dist/chunks/{contract-ryy6kscr.js → service-timing-ryy6kscr.js} +1 -1
- package/dist/chunks/{contract-s2hya144.js → service-timing-wcsbjfhx.js} +110 -36
- package/dist/contract.js +1 -1
- package/dist/effect/api/api.d.ts +72 -13
- package/dist/effect/api.d.ts +1 -0
- package/dist/effect/client.d.ts +126 -114
- package/dist/effect/client.js +12 -12
- package/dist/effect/generated/client-error.js +3 -3
- package/dist/effect/generated/client.d.ts +27 -19
- 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/api.d.ts +1 -0
- package/dist/promise/client.d.ts +12 -5
- package/dist/promise/client.js +11 -11
- package/dist/promise/generated/client-error.js +3 -3
- package/dist/promise/generated/client.d.ts +13 -6
- package/dist/promise/generated/client.js +4 -4
- package/dist/promise/generated/index.js +16 -8
- package/dist/promise/generated/types.d.ts +1151 -3533
- package/dist/promise/generated/types.js +9 -1
- package/dist/promise/index.d.ts +1 -0
- package/dist/promise/index.js +20 -12
- package/dist/promise/rpc.js +2 -2
- package/dist/promise/service.d.ts +2 -2
- package/dist/promise/service.js +7 -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.d.ts +7 -2
- package/dist/shared-events.js +1 -1
- package/dist/solid/connection.js +1 -1
- package/dist/solid/data.d.ts +11 -1
- package/dist/solid/data.js +9 -9
- package/dist/solid/index.d.ts +1 -0
- package/dist/solid/index.js +16 -12
- package/dist/solid/pty.js +1 -1
- package/dist/solid/retention.d.ts +10 -0
- package/dist/solid/retention.js +6 -0
- package/dist/solid/usage.js +1 -1
- package/package.json +7 -6
- package/dist/chunks/contract-vwtmm97t.js +0 -30
- /package/dist/chunks/{contract-6mptkzbc.js → service-timing-6mptkzbc.js} +0 -0
- /package/dist/chunks/{contract-8s2anffy.js → service-timing-8s2anffy.js} +0 -0
- /package/dist/chunks/{contract-9rqn6x4v.js → service-timing-9rqn6x4v.js} +0 -0
- /package/dist/chunks/{contract-gne7h7mq.js → service-timing-gne7h7mq.js} +0 -0
- /package/dist/chunks/{contract-m2eywc8w.js → service-timing-m2eywc8w.js} +0 -0
- /package/dist/chunks/{contract-qav6mfdz.js → service-timing-qav6mfdz.js} +0 -0
- /package/dist/chunks/{contract-sxt88q69.js → service-timing-sxt88q69.js} +0 -0
- /package/dist/chunks/{contract-ve4aws36.js → service-timing-ve4aws36.js} +0 -0
- /package/dist/chunks/{contract-vmytr4q8.js → service-timing-vmytr4q8.js} +0 -0
- /package/dist/chunks/{contract-vyas3vgt.js → service-timing-vyas3vgt.js} +0 -0
- /package/dist/chunks/{contract-xgnj2w4v.js → service-timing-xgnj2w4v.js} +0 -0
- /package/dist/chunks/{contract-ydhz1zrh.js → service-timing-ydhz1zrh.js} +0 -0
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ClientApi2
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./service-timing-vmytr4q8.js";
|
|
4
4
|
import {
|
|
5
|
-
|
|
6
|
-
} from "./
|
|
5
|
+
ClientError3
|
|
6
|
+
} from "./service-timing-7f0py9js.js";
|
|
7
7
|
import {
|
|
8
8
|
__export
|
|
9
|
-
} from "./
|
|
9
|
+
} from "./service-timing-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: () => make5
|
|
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)));
|
|
@@ -41,10 +41,12 @@ var adaptGroupAgent = (raw) => ({
|
|
|
41
41
|
get: EndpointAgentGet(raw)
|
|
42
42
|
});
|
|
43
43
|
var EndpointPluginList = (raw) => (input) => preserveEffect()(raw["plugin.list"]({ query: { location: input?.["location"] } }).pipe(Effect.mapError(mapClientError)));
|
|
44
|
+
var EndpointPluginGui = (raw) => (input) => preserveEffect()(raw["plugin.gui"]({ query: { location: input["location"], id: input["id"] } }).pipe(Effect.mapError(mapClientError)));
|
|
44
45
|
var EndpointPluginCheck = (raw) => (input) => preserveEffect()(raw["plugin.check"]({ query: { location: input?.["location"] }, payload: { target: input?.["target"] } }).pipe(Effect.mapError(mapClientError)));
|
|
45
46
|
var EndpointPluginUpdate = (raw) => (input) => preserveEffect()(raw["plugin.update"]({ query: { location: input["location"] }, payload: { targets: input["targets"] } }).pipe(Effect.mapError(mapClientError)));
|
|
46
47
|
var adaptGroupPlugin = (raw) => ({
|
|
47
48
|
list: EndpointPluginList(raw),
|
|
49
|
+
gui: EndpointPluginGui(raw),
|
|
48
50
|
check: EndpointPluginCheck(raw),
|
|
49
51
|
update: EndpointPluginUpdate(raw)
|
|
50
52
|
});
|
|
@@ -263,26 +265,38 @@ var EndpointMessageList = (raw) => (input) => preserveEffect()(raw["session.mess
|
|
|
263
265
|
query: { limit: input["limit"], order: input["order"], cursor: input["cursor"], type: input["type"] }
|
|
264
266
|
}).pipe(Effect.mapError(mapClientError)));
|
|
265
267
|
var adaptGroupMessage = (raw) => ({ list: EndpointMessageList(raw) });
|
|
266
|
-
var EndpointModelList = (raw) => (input) => preserveEffect()(raw["model.list"]({ query: { location: input?.["location"] } }).pipe(Effect.mapError(mapClientError)));
|
|
268
|
+
var EndpointModelList = (raw) => (input) => preserveEffect()(raw["model.list"]({ query: { location: input?.["location"], types: input?.["types"] } }).pipe(Effect.mapError(mapClientError)));
|
|
267
269
|
var EndpointModelDefault = (raw) => (input) => preserveEffect()(raw["model.default"]({ query: { location: input?.["location"] } }).pipe(Effect.mapError(mapClientError)));
|
|
268
270
|
var adaptGroupModel = (raw) => ({
|
|
269
271
|
list: EndpointModelList(raw),
|
|
270
272
|
default: EndpointModelDefault(raw)
|
|
271
273
|
});
|
|
272
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)));
|
|
273
|
-
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
|
+
});
|
|
274
293
|
var EndpointVoiceModels = (raw) => () => preserveEffect()(raw["voice.models"]({}).pipe(Effect.mapError(mapClientError), Effect.map((value) => value.data)));
|
|
275
294
|
var EndpointVoiceSession = (raw) => (input) => preserveEffect()(raw["voice.session"]({
|
|
276
295
|
payload: { model: input["model"], session: input["session"], transport: input["transport"] }
|
|
277
296
|
}).pipe(Effect.mapError(mapClientError), Effect.map((value) => value.data)));
|
|
278
|
-
var EndpointVoiceInstructions = (raw) => (input) => preserveEffect()(raw["voice.instructions"]({
|
|
279
|
-
params: { sessionID: input["sessionID"] },
|
|
280
|
-
payload: { instructions: input["instructions"] }
|
|
281
|
-
}).pipe(Effect.mapError(mapClientError)));
|
|
282
297
|
var adaptGroupVoice = (raw) => ({
|
|
283
298
|
models: EndpointVoiceModels(raw),
|
|
284
|
-
session: EndpointVoiceSession(raw)
|
|
285
|
-
instructions: EndpointVoiceInstructions(raw)
|
|
299
|
+
session: EndpointVoiceSession(raw)
|
|
286
300
|
});
|
|
287
301
|
var EndpointProviderList = (raw) => (input) => preserveEffect()(raw["provider.list"]({ query: { location: input?.["location"] } }).pipe(Effect.mapError(mapClientError)));
|
|
288
302
|
var EndpointProviderGet = (raw) => (input) => preserveEffect()(raw["provider.get"]({ params: { providerID: input["providerID"] }, query: { location: input["location"] } }).pipe(Effect.mapError(mapClientError)));
|
|
@@ -452,7 +466,14 @@ var EndpointFileList = (raw) => (input) => preserveEffect()(raw["fs.list"]({ que
|
|
|
452
466
|
var EndpointFileFind = (raw) => (input) => preserveEffect()(raw["fs.find"]({
|
|
453
467
|
query: { location: input["location"], query: input["query"], type: input["type"], limit: input["limit"] }
|
|
454
468
|
}).pipe(Effect.mapError(mapClientError)));
|
|
455
|
-
var
|
|
469
|
+
var EndpointFileWatch = (raw) => (input) => preserveEffect()(raw["fs.watch"]({ query: { location: input["location"] }, payload: { path: input["path"] } }).pipe(Effect.mapError(mapClientError)));
|
|
470
|
+
var EndpointFileUnwatch = (raw) => (input) => preserveEffect()(raw["fs.unwatch"]({ query: { location: input["location"] }, payload: { path: input["path"] } }).pipe(Effect.mapError(mapClientError)));
|
|
471
|
+
var adaptGroupFile = (raw) => ({
|
|
472
|
+
list: EndpointFileList(raw),
|
|
473
|
+
find: EndpointFileFind(raw),
|
|
474
|
+
watch: EndpointFileWatch(raw),
|
|
475
|
+
unwatch: EndpointFileUnwatch(raw)
|
|
476
|
+
});
|
|
456
477
|
var EndpointCommandList = (raw) => (input) => preserveEffect()(raw["command.list"]({ query: { location: input?.["location"] } }).pipe(Effect.mapError(mapClientError)));
|
|
457
478
|
var adaptGroupCommand = (raw) => ({ list: EndpointCommandList(raw) });
|
|
458
479
|
var EndpointSkillList = (raw) => (input) => preserveEffect()(raw["skill.list"]({ query: { location: input?.["location"] } }).pipe(Effect.mapError(mapClientError)));
|
|
@@ -463,7 +484,7 @@ var EndpointRpcCall = (raw) => (input) => preserveEffect()(raw["rpc.call"]({
|
|
|
463
484
|
payload: { input: input["input"] }
|
|
464
485
|
}).pipe(Effect.mapError(mapClientError)));
|
|
465
486
|
var adaptGroupRpc = (raw) => ({ call: EndpointRpcCall(raw) });
|
|
466
|
-
var EndpointEventSubscribe = (raw) => () => preserveStream()(Stream.unwrap(raw["event.subscribe"]({}).pipe(Effect.mapError(mapClientError), Effect.map((stream) => stream.pipe(Stream.mapError(mapClientError))))));
|
|
487
|
+
var EndpointEventSubscribe = (raw) => (input) => preserveStream()(Stream.unwrap(raw["event.subscribe"]({ query: { types: input?.["types"] } }).pipe(Effect.mapError(mapClientError), Effect.map((stream) => stream.pipe(Stream.mapError(mapClientError))))));
|
|
467
488
|
var adaptGroupEvent = (raw) => ({ subscribe: EndpointEventSubscribe(raw) });
|
|
468
489
|
var EndpointPtyList = (raw) => (input) => preserveEffect()(raw["pty.list"]({ query: { location: input?.["location"] } }).pipe(Effect.mapError(mapClientError)));
|
|
469
490
|
var EndpointPtyCreate = (raw) => (input) => preserveEffect()(raw["pty.create"]({
|
|
@@ -584,7 +605,13 @@ var EndpointVcsBranchList = (raw) => (input) => preserveEffect()(raw["vcs.branch
|
|
|
584
605
|
query: { location: input?.["location"], search: input?.["search"], limit: input?.["limit"] }
|
|
585
606
|
}).pipe(Effect.mapError(mapClientError)));
|
|
586
607
|
var EndpointVcsDiff = (raw) => (input) => preserveEffect()(raw["vcs.diff"]({
|
|
587
|
-
query: {
|
|
608
|
+
query: {
|
|
609
|
+
location: input["location"],
|
|
610
|
+
mode: input["mode"],
|
|
611
|
+
base: input["base"],
|
|
612
|
+
context: input["context"],
|
|
613
|
+
untracked: input["untracked"]
|
|
614
|
+
}
|
|
588
615
|
}).pipe(Effect.mapError(mapClientError)));
|
|
589
616
|
var adaptGroupVcs = (raw) => ({
|
|
590
617
|
init: EndpointVcsInit(raw),
|
|
@@ -612,6 +639,8 @@ var adaptGroupWebsearch = (raw) => ({
|
|
|
612
639
|
providers: EndpointWebsearchProviders(raw),
|
|
613
640
|
query: EndpointWebsearchQuery(raw)
|
|
614
641
|
});
|
|
642
|
+
var EndpointUsageLimits = (raw) => (input) => preserveEffect()(raw["usage.limits"]({ query: { location: input?.["location"] } }).pipe(Effect.mapError(mapClientError)));
|
|
643
|
+
var adaptGroupUsage = (raw) => ({ limits: EndpointUsageLimits(raw) });
|
|
615
644
|
var EndpointConfigGet = (raw) => (input) => preserveEffect()(raw["config.get"]({ query: { location: input?.["location"] } }).pipe(Effect.mapError(mapClientError)));
|
|
616
645
|
var EndpointConfigShells = (raw) => () => preserveEffect()(raw["config.shells"]({}).pipe(Effect.mapError(mapClientError)));
|
|
617
646
|
var EndpointConfigUpdate = (raw) => (input) => preserveEffect()(raw["config.update"]({ payload: { shell: input["shell"] } }).pipe(Effect.mapError(mapClientError)));
|
|
@@ -651,8 +680,9 @@ var adaptClient = (raw) => ({
|
|
|
651
680
|
debug: adaptGroupDebug(raw["server.debug"]),
|
|
652
681
|
migration: adaptGroupMigration(raw["server.migration"]),
|
|
653
682
|
websearch: adaptGroupWebsearch(raw["server.websearch"]),
|
|
683
|
+
usage: adaptGroupUsage(raw["server.usage"]),
|
|
654
684
|
config: adaptGroupConfig(raw["server.config"])
|
|
655
685
|
});
|
|
656
|
-
var
|
|
686
|
+
var make5 = (options) => HttpApiClient.make(ClientApi2, options).pipe(Effect.map(adaptClient));
|
|
657
687
|
|
|
658
|
-
export {
|
|
688
|
+
export { make5, exports_client4 };
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
} from "./
|
|
2
|
+
ClientError2
|
|
3
|
+
} from "./service-timing-js54wxgp.js";
|
|
4
4
|
import {
|
|
5
5
|
__export
|
|
6
|
-
} from "./
|
|
6
|
+
} from "./service-timing-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(`
|
|
@@ -177,7 +177,7 @@ function make6(options) {
|
|
|
177
177
|
path: `/api/agent`,
|
|
178
178
|
query: { location: input?.["location"] },
|
|
179
179
|
successStatus: 200,
|
|
180
|
-
declaredStatuses: [400, 401, 404],
|
|
180
|
+
declaredStatuses: [400, 401, 404, 503],
|
|
181
181
|
empty: false
|
|
182
182
|
}, requestOptions),
|
|
183
183
|
get: (input, requestOptions) => request({
|
|
@@ -198,6 +198,14 @@ function make6(options) {
|
|
|
198
198
|
declaredStatuses: [400, 401, 404],
|
|
199
199
|
empty: false
|
|
200
200
|
}, requestOptions),
|
|
201
|
+
gui: (input, requestOptions) => request({
|
|
202
|
+
method: "GET",
|
|
203
|
+
path: `/api/plugin/gui`,
|
|
204
|
+
query: { location: input["location"], id: input["id"] },
|
|
205
|
+
successStatus: 200,
|
|
206
|
+
declaredStatuses: [400, 401, 404],
|
|
207
|
+
empty: false
|
|
208
|
+
}, requestOptions),
|
|
201
209
|
check: (input, requestOptions) => request({
|
|
202
210
|
method: "POST",
|
|
203
211
|
path: `/api/plugin/check`,
|
|
@@ -627,7 +635,7 @@ function make6(options) {
|
|
|
627
635
|
list: (input, requestOptions) => request({
|
|
628
636
|
method: "GET",
|
|
629
637
|
path: `/api/model`,
|
|
630
|
-
query: { location: input?.["location"] },
|
|
638
|
+
query: { location: input?.["location"], types: input?.["types"] },
|
|
631
639
|
successStatus: 200,
|
|
632
640
|
declaredStatuses: [400, 401, 404, 503],
|
|
633
641
|
empty: false
|
|
@@ -644,10 +652,33 @@ function make6(options) {
|
|
|
644
652
|
generate: {
|
|
645
653
|
text: (input, requestOptions) => request({
|
|
646
654
|
method: "POST",
|
|
647
|
-
path: `/api/experimental/generate`,
|
|
655
|
+
path: `/api/experimental/generate/text`,
|
|
648
656
|
body: { prompt: input["prompt"], model: input["model"] },
|
|
649
657
|
successStatus: 200,
|
|
650
|
-
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],
|
|
651
682
|
empty: false
|
|
652
683
|
}, requestOptions).then((value) => value.data)
|
|
653
684
|
},
|
|
@@ -666,15 +697,7 @@ function make6(options) {
|
|
|
666
697
|
successStatus: 200,
|
|
667
698
|
declaredStatuses: [400, 401, 404, 503],
|
|
668
699
|
empty: false
|
|
669
|
-
}, requestOptions).then((value) => value.data)
|
|
670
|
-
instructions: (input, requestOptions) => request({
|
|
671
|
-
method: "POST",
|
|
672
|
-
path: `/api/experimental/voice/session/${encodeURIComponent(input.sessionID)}/instructions`,
|
|
673
|
-
body: { instructions: input["instructions"] },
|
|
674
|
-
successStatus: 204,
|
|
675
|
-
declaredStatuses: [400, 401, 404, 503],
|
|
676
|
-
empty: true
|
|
677
|
-
}, requestOptions)
|
|
700
|
+
}, requestOptions).then((value) => value.data)
|
|
678
701
|
},
|
|
679
702
|
provider: {
|
|
680
703
|
list: (input, requestOptions) => request({
|
|
@@ -915,7 +938,7 @@ function make6(options) {
|
|
|
915
938
|
path: `/api/project`,
|
|
916
939
|
query: { archived: input?.["archived"] },
|
|
917
940
|
successStatus: 200,
|
|
918
|
-
declaredStatuses: [400, 401
|
|
941
|
+
declaredStatuses: [400, 401],
|
|
919
942
|
empty: false
|
|
920
943
|
}, requestOptions),
|
|
921
944
|
update: (input, requestOptions) => request({
|
|
@@ -974,7 +997,7 @@ function make6(options) {
|
|
|
974
997
|
method: "DELETE",
|
|
975
998
|
path: `/api/permission/saved/${encodeURIComponent(input.id)}`,
|
|
976
999
|
successStatus: 204,
|
|
977
|
-
declaredStatuses: [400, 401
|
|
1000
|
+
declaredStatuses: [400, 401],
|
|
978
1001
|
empty: true
|
|
979
1002
|
}, requestOptions)
|
|
980
1003
|
},
|
|
@@ -1052,6 +1075,24 @@ function make6(options) {
|
|
|
1052
1075
|
declaredStatuses: [400, 401, 404],
|
|
1053
1076
|
empty: false,
|
|
1054
1077
|
binaryBody: true
|
|
1078
|
+
}, requestOptions),
|
|
1079
|
+
watch: (input, requestOptions) => request({
|
|
1080
|
+
method: "POST",
|
|
1081
|
+
path: `/api/experimental/fs/watch`,
|
|
1082
|
+
query: { location: input["location"] },
|
|
1083
|
+
body: { path: input["path"] },
|
|
1084
|
+
successStatus: 204,
|
|
1085
|
+
declaredStatuses: [400, 401, 404, 503],
|
|
1086
|
+
empty: true
|
|
1087
|
+
}, requestOptions),
|
|
1088
|
+
unwatch: (input, requestOptions) => request({
|
|
1089
|
+
method: "DELETE",
|
|
1090
|
+
path: `/api/experimental/fs/watch`,
|
|
1091
|
+
query: { location: input["location"] },
|
|
1092
|
+
body: { path: input["path"] },
|
|
1093
|
+
successStatus: 204,
|
|
1094
|
+
declaredStatuses: [400, 401, 404],
|
|
1095
|
+
empty: true
|
|
1055
1096
|
}, requestOptions)
|
|
1056
1097
|
},
|
|
1057
1098
|
command: {
|
|
@@ -1086,7 +1127,14 @@ function make6(options) {
|
|
|
1086
1127
|
}, requestOptions)
|
|
1087
1128
|
},
|
|
1088
1129
|
event: {
|
|
1089
|
-
subscribe: (requestOptions) => sse({
|
|
1130
|
+
subscribe: (input, requestOptions) => sse({
|
|
1131
|
+
method: "GET",
|
|
1132
|
+
path: `/api/event`,
|
|
1133
|
+
query: { types: input?.["types"] },
|
|
1134
|
+
successStatus: 200,
|
|
1135
|
+
declaredStatuses: [400, 401],
|
|
1136
|
+
empty: false
|
|
1137
|
+
}, requestOptions)
|
|
1090
1138
|
},
|
|
1091
1139
|
pty: {
|
|
1092
1140
|
list: (input, requestOptions) => request({
|
|
@@ -1232,6 +1280,16 @@ function make6(options) {
|
|
|
1232
1280
|
declaredStatuses: [400, 401, 403, 404, 503],
|
|
1233
1281
|
empty: false
|
|
1234
1282
|
}, requestOptions).then((value) => value.data)
|
|
1283
|
+
},
|
|
1284
|
+
media: {
|
|
1285
|
+
get: (input, requestOptions) => request({
|
|
1286
|
+
method: "GET",
|
|
1287
|
+
path: `/api/experimental/media/${encodeURIComponent(input.hash)}`,
|
|
1288
|
+
successStatus: 200,
|
|
1289
|
+
declaredStatuses: [400, 401, 404],
|
|
1290
|
+
empty: false,
|
|
1291
|
+
binary: true
|
|
1292
|
+
}, requestOptions)
|
|
1235
1293
|
}
|
|
1236
1294
|
},
|
|
1237
1295
|
shell: {
|
|
@@ -1378,7 +1436,13 @@ function make6(options) {
|
|
|
1378
1436
|
diff: (input, requestOptions) => request({
|
|
1379
1437
|
method: "GET",
|
|
1380
1438
|
path: `/api/vcs/diff`,
|
|
1381
|
-
query: {
|
|
1439
|
+
query: {
|
|
1440
|
+
location: input["location"],
|
|
1441
|
+
mode: input["mode"],
|
|
1442
|
+
base: input["base"],
|
|
1443
|
+
context: input["context"],
|
|
1444
|
+
untracked: input["untracked"]
|
|
1445
|
+
},
|
|
1382
1446
|
successStatus: 200,
|
|
1383
1447
|
declaredStatuses: [400, 401, 404, 503],
|
|
1384
1448
|
empty: false
|
|
@@ -1441,6 +1505,16 @@ function make6(options) {
|
|
|
1441
1505
|
empty: false
|
|
1442
1506
|
}, requestOptions)
|
|
1443
1507
|
},
|
|
1508
|
+
usage: {
|
|
1509
|
+
limits: (input, requestOptions) => request({
|
|
1510
|
+
method: "GET",
|
|
1511
|
+
path: `/api/experimental/usage/limits`,
|
|
1512
|
+
query: { location: input?.["location"] },
|
|
1513
|
+
successStatus: 200,
|
|
1514
|
+
declaredStatuses: [400, 401, 404, 503],
|
|
1515
|
+
empty: false
|
|
1516
|
+
}, requestOptions)
|
|
1517
|
+
},
|
|
1444
1518
|
config: {
|
|
1445
1519
|
get: (input, requestOptions) => request({
|
|
1446
1520
|
method: "GET",
|
|
@@ -1495,20 +1569,20 @@ async function json(response) {
|
|
|
1495
1569
|
try {
|
|
1496
1570
|
await response.body?.cancel();
|
|
1497
1571
|
} catch {}
|
|
1498
|
-
throw new
|
|
1572
|
+
throw new ClientError2("UnsupportedContentType", { detail: response.headers.get("content-type") });
|
|
1499
1573
|
}
|
|
1500
1574
|
let text;
|
|
1501
1575
|
try {
|
|
1502
1576
|
text = await response.text();
|
|
1503
1577
|
} catch (cause) {
|
|
1504
|
-
throw new
|
|
1578
|
+
throw new ClientError2("Transport", { cause });
|
|
1505
1579
|
}
|
|
1506
1580
|
if (text === "")
|
|
1507
|
-
throw new
|
|
1581
|
+
throw new ClientError2("MalformedResponse");
|
|
1508
1582
|
try {
|
|
1509
1583
|
return JSON.parse(text);
|
|
1510
1584
|
} catch (cause) {
|
|
1511
|
-
throw new
|
|
1585
|
+
throw new ClientError2("MalformedResponse", { cause });
|
|
1512
1586
|
}
|
|
1513
1587
|
}
|
|
1514
1588
|
function declared(body) {
|
|
@@ -1521,4 +1595,4 @@ function isContentType(response, expected) {
|
|
|
1521
1595
|
return response.headers.get("content-type")?.split(";", 1)[0]?.trim().toLowerCase() === expected;
|
|
1522
1596
|
}
|
|
1523
1597
|
|
|
1524
|
-
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";
|
|
@@ -39,10 +40,12 @@ import type { Reference } from "@opencode/schema/reference";
|
|
|
39
40
|
import type { Worktree } from "@opencode/schema/worktree";
|
|
40
41
|
import type { Vcs } from "@opencode/schema/vcs";
|
|
41
42
|
import type { WebSearch } from "@opencode/schema/websearch";
|
|
43
|
+
import type { UsageLimits } from "@opencode/schema/usage-limits";
|
|
42
44
|
import type { Config } from "@opencode/schema/config";
|
|
43
45
|
export type ServerInfoOutput = {
|
|
44
46
|
readonly version: string;
|
|
45
47
|
readonly pid: number;
|
|
48
|
+
readonly hostname?: string | undefined;
|
|
46
49
|
readonly urls: ReadonlyArray<string>;
|
|
47
50
|
readonly paths: {
|
|
48
51
|
readonly tmp: string;
|
|
@@ -117,6 +120,17 @@ export type PluginListOutput = {
|
|
|
117
120
|
readonly data: ReadonlyArray<Plugin.Info>;
|
|
118
121
|
};
|
|
119
122
|
export type PluginListOperation<E = never> = (input?: PluginListInput) => Effect.Effect<PluginListOutput, E>;
|
|
123
|
+
export type PluginGuiInput = {
|
|
124
|
+
readonly location?: {
|
|
125
|
+
readonly directory?: string | undefined;
|
|
126
|
+
} | undefined;
|
|
127
|
+
readonly id: Plugin.ID;
|
|
128
|
+
};
|
|
129
|
+
export type PluginGuiOutput = {
|
|
130
|
+
readonly location: Location.PublicRef;
|
|
131
|
+
readonly data: Plugin.GuiBundle;
|
|
132
|
+
};
|
|
133
|
+
export type PluginGuiOperation<E = never> = (input: PluginGuiInput) => Effect.Effect<PluginGuiOutput, E>;
|
|
120
134
|
export type PluginCheckInput = {
|
|
121
135
|
readonly location?: {
|
|
122
136
|
readonly directory?: string | undefined;
|
|
@@ -138,6 +152,7 @@ export type PluginUpdateOutput = void;
|
|
|
138
152
|
export type PluginUpdateOperation<E = never> = (input: PluginUpdateInput) => Effect.Effect<PluginUpdateOutput, E>;
|
|
139
153
|
export interface PluginApi<E = never> {
|
|
140
154
|
readonly list: PluginListOperation<E>;
|
|
155
|
+
readonly gui: PluginGuiOperation<E>;
|
|
141
156
|
readonly check: PluginCheckOperation<E>;
|
|
142
157
|
readonly update: PluginUpdateOperation<E>;
|
|
143
158
|
}
|
|
@@ -1768,6 +1783,7 @@ export type ModelListInput = {
|
|
|
1768
1783
|
readonly location?: {
|
|
1769
1784
|
readonly directory?: string | undefined;
|
|
1770
1785
|
} | undefined;
|
|
1786
|
+
readonly types?: ReadonlyArray<Model.Type> | undefined;
|
|
1771
1787
|
};
|
|
1772
1788
|
export type ModelListOutput = {
|
|
1773
1789
|
readonly location: Location.PublicRef;
|
|
@@ -1796,8 +1812,27 @@ export type GenerateTextOutput = {
|
|
|
1796
1812
|
readonly text: string;
|
|
1797
1813
|
};
|
|
1798
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>;
|
|
1799
1832
|
export interface GenerateApi<E = never> {
|
|
1800
1833
|
readonly text: GenerateTextOperation<E>;
|
|
1834
|
+
readonly image: GenerateImageOperation<E>;
|
|
1835
|
+
readonly decisions: GenerateDecisionsOperation<E>;
|
|
1801
1836
|
}
|
|
1802
1837
|
export type VoiceModelsOutput = {
|
|
1803
1838
|
readonly models: ReadonlyArray<{
|
|
@@ -1805,8 +1840,6 @@ export type VoiceModelsOutput = {
|
|
|
1805
1840
|
readonly provider: string;
|
|
1806
1841
|
readonly transports: ReadonlyArray<"webrtc" | "websocket">;
|
|
1807
1842
|
readonly available: boolean;
|
|
1808
|
-
readonly integration?: string | undefined;
|
|
1809
|
-
readonly workspace?: string | undefined;
|
|
1810
1843
|
}>;
|
|
1811
1844
|
readonly default?: string | undefined;
|
|
1812
1845
|
};
|
|
@@ -1834,21 +1867,11 @@ export type VoiceSessionOutput = {
|
|
|
1834
1867
|
readonly token: string;
|
|
1835
1868
|
readonly expiresAt: number;
|
|
1836
1869
|
};
|
|
1837
|
-
readonly session?: {
|
|
1838
|
-
readonly id: string;
|
|
1839
|
-
} | undefined;
|
|
1840
1870
|
};
|
|
1841
1871
|
export type VoiceSessionOperation<E = never> = (input: VoiceSessionInput) => Effect.Effect<VoiceSessionOutput, E>;
|
|
1842
|
-
export type VoiceInstructionsInput = {
|
|
1843
|
-
readonly sessionID: string;
|
|
1844
|
-
readonly instructions: string;
|
|
1845
|
-
};
|
|
1846
|
-
export type VoiceInstructionsOutput = void;
|
|
1847
|
-
export type VoiceInstructionsOperation<E = never> = (input: VoiceInstructionsInput) => Effect.Effect<VoiceInstructionsOutput, E>;
|
|
1848
1872
|
export interface VoiceApi<E = never> {
|
|
1849
1873
|
readonly models: VoiceModelsOperation<E>;
|
|
1850
1874
|
readonly session: VoiceSessionOperation<E>;
|
|
1851
|
-
readonly instructions: VoiceInstructionsOperation<E>;
|
|
1852
1875
|
}
|
|
1853
1876
|
export type ProviderListInput = {
|
|
1854
1877
|
readonly location?: {
|
|
@@ -2271,9 +2294,27 @@ export type FileFindOutput = {
|
|
|
2271
2294
|
readonly data: ReadonlyArray<FileSystem.Entry>;
|
|
2272
2295
|
};
|
|
2273
2296
|
export type FileFindOperation<E = never> = (input: FileFindInput) => Effect.Effect<FileFindOutput, E>;
|
|
2297
|
+
export type FileWatchInput = {
|
|
2298
|
+
readonly location?: {
|
|
2299
|
+
readonly directory?: string | undefined;
|
|
2300
|
+
} | undefined;
|
|
2301
|
+
readonly path: string;
|
|
2302
|
+
};
|
|
2303
|
+
export type FileWatchOutput = void;
|
|
2304
|
+
export type FileWatchOperation<E = never> = (input: FileWatchInput) => Effect.Effect<FileWatchOutput, E>;
|
|
2305
|
+
export type FileUnwatchInput = {
|
|
2306
|
+
readonly location?: {
|
|
2307
|
+
readonly directory?: string | undefined;
|
|
2308
|
+
} | undefined;
|
|
2309
|
+
readonly path: string;
|
|
2310
|
+
};
|
|
2311
|
+
export type FileUnwatchOutput = void;
|
|
2312
|
+
export type FileUnwatchOperation<E = never> = (input: FileUnwatchInput) => Effect.Effect<FileUnwatchOutput, E>;
|
|
2274
2313
|
export interface FileApi<E = never> {
|
|
2275
2314
|
readonly list: FileListOperation<E>;
|
|
2276
2315
|
readonly find: FileFindOperation<E>;
|
|
2316
|
+
readonly watch: FileWatchOperation<E>;
|
|
2317
|
+
readonly unwatch: FileUnwatchOperation<E>;
|
|
2277
2318
|
}
|
|
2278
2319
|
export type CommandListInput = {
|
|
2279
2320
|
readonly location?: {
|
|
@@ -2316,8 +2357,11 @@ export type RpcCallOperation<E = never> = (input: RpcCallInput) => Effect.Effect
|
|
|
2316
2357
|
export interface RpcApi<E = never> {
|
|
2317
2358
|
readonly call: RpcCallOperation<E>;
|
|
2318
2359
|
}
|
|
2360
|
+
export type EventSubscribeInput = {
|
|
2361
|
+
readonly types?: ReadonlyArray<"location.shutdown" | "models-dev.refreshed" | "credential.updated" | "credential.switched" | "integration.updated" | "provider.updated" | "model.updated" | "agent.updated" | "session.created" | "session.agent.selected" | "session.model.selected" | "session.moved" | "session.renamed" | "session.metadata.updated" | "session.permissions" | "session.viewed" | "session.archived" | "session.unarchived" | "session.usage.updated" | "session.deleted" | "session.forked" | "session.inbox.delivered" | "session.inbox.enqueued" | "session.inbox.cancelled" | "session.inbox.delivery.changed" | "session.execution.started" | "session.execution.succeeded" | "session.execution.failed" | "session.execution.interrupted" | "session.instructions.updated" | "session.synthetic" | "session.skill.activated" | "session.shell.started" | "session.shell.ended" | "session.step.started" | "session.step.streamed" | "session.step.ended" | "session.step.failed" | "session.text.started" | "session.text.delta" | "session.text.ended" | "session.reasoning.started" | "session.reasoning.delta" | "session.reasoning.ended" | "session.tool.input.started" | "session.tool.input.delta" | "session.tool.input.ended" | "session.tool.called" | "session.tool.progress" | "session.tool.success" | "session.tool.failed" | "session.retry.scheduled" | "session.compaction.started" | "session.compaction.delta" | "session.compaction.ended" | "session.compaction.failed" | "session.revert.staged" | "session.revert.cleared" | "session.revert.committed" | "filesystem.changed" | "reference.updated" | "permission.asked" | "permission.replied" | "plugin.updated" | "project.updated" | "worktree.updated" | "worktree.resolved" | "command.updated" | "config.updated" | "skill.updated" | "pty.created" | "pty.updated" | "pty.exited" | "pty.deleted" | "persistent-pty.added" | "persistent-pty.removed" | "shell.created" | "shell.exited" | "shell.deleted" | "form.created" | "form.replied" | "form.cancelled" | "websearch.updated" | "session.status" | "session.idle" | "tui.prompt.append" | "tui.command.execute" | "tui.toast.show" | "tui.session.select" | "installation.updated" | "installation.update-available" | "vcs.branch.updated" | "mcp.status.changed" | "mcp.resources.changed" | `${"rpc."}${string}`> | undefined;
|
|
2362
|
+
};
|
|
2319
2363
|
export type EventSubscribeOutput = OpenCodeEvent;
|
|
2320
|
-
export type EventSubscribeOperation<E = never> = () => Stream.Stream<EventSubscribeOutput, E>;
|
|
2364
|
+
export type EventSubscribeOperation<E = never> = (input?: EventSubscribeInput) => Stream.Stream<EventSubscribeOutput, E>;
|
|
2321
2365
|
export interface EventApi<E = never> {
|
|
2322
2366
|
readonly subscribe: EventSubscribeOperation<E>;
|
|
2323
2367
|
}
|
|
@@ -2777,6 +2821,7 @@ export type VcsDiffInput = {
|
|
|
2777
2821
|
readonly mode: Vcs.Mode;
|
|
2778
2822
|
readonly base?: string | undefined;
|
|
2779
2823
|
readonly context?: number | undefined;
|
|
2824
|
+
readonly untracked?: Vcs.Untracked | undefined;
|
|
2780
2825
|
};
|
|
2781
2826
|
export type VcsDiffOutput = {
|
|
2782
2827
|
readonly location: Location.PublicRef;
|
|
@@ -2869,6 +2914,19 @@ export interface WebsearchApi<E = never> {
|
|
|
2869
2914
|
readonly providers: WebsearchProvidersOperation<E>;
|
|
2870
2915
|
readonly query: WebsearchQueryOperation<E>;
|
|
2871
2916
|
}
|
|
2917
|
+
export type UsageLimitsInput = {
|
|
2918
|
+
readonly location?: {
|
|
2919
|
+
readonly directory?: string | undefined;
|
|
2920
|
+
} | undefined;
|
|
2921
|
+
};
|
|
2922
|
+
export type UsageLimitsOutput = {
|
|
2923
|
+
readonly location: Location.PublicRef;
|
|
2924
|
+
readonly data: UsageLimits.Info | null;
|
|
2925
|
+
};
|
|
2926
|
+
export type UsageLimitsOperation<E = never> = (input?: UsageLimitsInput) => Effect.Effect<UsageLimitsOutput, E>;
|
|
2927
|
+
export interface UsageApi<E = never> {
|
|
2928
|
+
readonly limits: UsageLimitsOperation<E>;
|
|
2929
|
+
}
|
|
2872
2930
|
export type ConfigGetInput = {
|
|
2873
2931
|
readonly location?: {
|
|
2874
2932
|
readonly directory?: string | undefined;
|
|
@@ -2923,5 +2981,6 @@ export interface AppApi<E = never> {
|
|
|
2923
2981
|
readonly debug: DebugApi<E>;
|
|
2924
2982
|
readonly migration: MigrationApi<E>;
|
|
2925
2983
|
readonly websearch: WebsearchApi<E>;
|
|
2984
|
+
readonly usage: UsageApi<E>;
|
|
2926
2985
|
readonly config: ConfigApi<E>;
|
|
2927
2986
|
}
|
package/dist/effect/api.d.ts
CHANGED