@opencode/client 0.0.0-dev-20484 → 0.0.0-dev-20487
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-c74kxtaj.js → shared-events-1y4a697q.js} +1 -1
- package/dist/chunks/{contract-3c62vwd3.js → shared-events-5myj1ht6.js} +17 -17
- package/dist/chunks/{contract-y2etg5bs.js → shared-events-7f0py9js.js} +2 -2
- package/dist/chunks/{contract-10k8qxyc.js → shared-events-e5ea35j7.js} +1 -1
- package/dist/chunks/shared-events-er999wh1.js +30 -0
- package/dist/chunks/{contract-frbwqjmf.js → shared-events-frbwqjmf.js} +1 -1
- package/dist/chunks/{contract-nwcpakzx.js → shared-events-js54wxgp.js} +2 -2
- package/dist/chunks/{contract-z6qdwcsf.js → shared-events-mnyft54j.js} +5 -5
- package/dist/chunks/{contract-bqmmtv3d.js → shared-events-qzsnm4q8.js} +70 -64
- package/dist/chunks/{contract-ajnk5b9f.js → shared-events-raw99g3w.js} +10 -10
- package/dist/chunks/{contract-t1xa31vm.js → shared-events-t1xa31vm.js} +1 -1
- package/dist/chunks/{contract-vv6ja3wh.js → shared-events-t2nwke50.js} +1 -1
- package/dist/chunks/{contract-wyrqvvk9.js → shared-events-vt9jbch8.js} +2 -1
- package/dist/contract.js +1 -1
- package/dist/effect/client.d.ts +93 -93
- package/dist/effect/client.js +12 -12
- package/dist/effect/generated/client-error.js +3 -3
- package/dist/effect/generated/client.d.ts +92 -92
- 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 +5 -5
- package/dist/promise/client.js +11 -11
- package/dist/promise/generated/client-error.js +3 -3
- package/dist/promise/generated/client.js +4 -4
- package/dist/promise/generated/index.js +12 -10
- package/dist/promise/generated/types.d.ts +8 -0
- package/dist/promise/generated/types.js +3 -1
- package/dist/promise/index.js +15 -13
- package/dist/promise/rpc.js +2 -2
- package/dist/promise/service.js +5 -5
- package/dist/pty-handoff.js +1 -1
- package/dist/rpc-runtime.js +1 -1
- package/dist/service-contender.js +1 -1
- 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 +11 -11
- package/dist/solid/pty.js +1 -1
- package/package.json +4 -4
- package/dist/chunks/contract-bm1v05te.js +0 -30
- /package/dist/chunks/{contract-6mptkzbc.js → shared-events-6mptkzbc.js} +0 -0
- /package/dist/chunks/{contract-9rqn6x4v.js → shared-events-9rqn6x4v.js} +0 -0
- /package/dist/chunks/{contract-gne7h7mq.js → shared-events-gne7h7mq.js} +0 -0
- /package/dist/chunks/{contract-m2eywc8w.js → shared-events-m2eywc8w.js} +0 -0
- /package/dist/chunks/{contract-qav6mfdz.js → shared-events-qav6mfdz.js} +0 -0
- /package/dist/chunks/{contract-sxt88q69.js → shared-events-sxt88q69.js} +0 -0
- /package/dist/chunks/{contract-txckps9j.js → shared-events-txckps9j.js} +0 -0
- /package/dist/chunks/{contract-vmytr4q8.js → shared-events-vmytr4q8.js} +0 -0
- /package/dist/chunks/{contract-vyas3vgt.js → shared-events-vyas3vgt.js} +0 -0
- /package/dist/chunks/{contract-xgnj2w4v.js → shared-events-xgnj2w4v.js} +0 -0
- /package/dist/chunks/{contract-ydhz1zrh.js → shared-events-ydhz1zrh.js} +0 -0
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
import {
|
|
2
2
|
make7
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./shared-events-frbwqjmf.js";
|
|
4
4
|
import {
|
|
5
|
-
|
|
6
|
-
} from "./
|
|
5
|
+
ClientError3
|
|
6
|
+
} from "./shared-events-7f0py9js.js";
|
|
7
7
|
import {
|
|
8
|
-
|
|
9
|
-
} from "./
|
|
8
|
+
make6
|
|
9
|
+
} from "./shared-events-raw99g3w.js";
|
|
10
10
|
import {
|
|
11
|
-
|
|
11
|
+
make5,
|
|
12
12
|
aborted2
|
|
13
|
-
} from "./
|
|
13
|
+
} from "./shared-events-mnyft54j.js";
|
|
14
14
|
import {
|
|
15
15
|
__export
|
|
16
|
-
} from "./
|
|
16
|
+
} from "./shared-events-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/unstable/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 = () => Stream.fromAsyncIterable(shared.subscribe(), (error) => error).pipe(Stream.catch((error) => Stream.failCause(error instanceof EventFailure ? error.cause : Cause.fail(new
|
|
44
|
+
const subscribe = () => Stream.fromAsyncIterable(shared.subscribe(), (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 };
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import {
|
|
2
|
+
make7
|
|
3
|
+
} from "./shared-events-frbwqjmf.js";
|
|
4
|
+
import {
|
|
5
|
+
make3
|
|
6
|
+
} from "./shared-events-qzsnm4q8.js";
|
|
7
|
+
import {
|
|
8
|
+
makeRpc2
|
|
9
|
+
} from "./shared-events-1y4a697q.js";
|
|
10
|
+
import {
|
|
11
|
+
__export
|
|
12
|
+
} from "./shared-events-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({ 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,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 };
|
|
@@ -3,20 +3,20 @@ import {
|
|
|
3
3
|
readError2,
|
|
4
4
|
event2,
|
|
5
5
|
eventType2
|
|
6
|
-
} from "./
|
|
6
|
+
} from "./shared-events-t1xa31vm.js";
|
|
7
7
|
import {
|
|
8
8
|
__export
|
|
9
|
-
} from "./
|
|
9
|
+
} from "./shared-events-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,17 +1,17 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
} from "./
|
|
2
|
+
ClientError2
|
|
3
|
+
} from "./shared-events-js54wxgp.js";
|
|
4
4
|
import {
|
|
5
5
|
__export
|
|
6
|
-
} from "./
|
|
6
|
+
} from "./shared-events-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(`
|
|
@@ -160,7 +160,7 @@ function make6(options) {
|
|
|
160
160
|
path: `/api/location`,
|
|
161
161
|
query: { location: input?.["location"] },
|
|
162
162
|
successStatus: 200,
|
|
163
|
-
declaredStatuses: [400, 401],
|
|
163
|
+
declaredStatuses: [400, 401, 404],
|
|
164
164
|
empty: false
|
|
165
165
|
}, requestOptions),
|
|
166
166
|
reload: (requestOptions) => request({
|
|
@@ -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],
|
|
180
|
+
declaredStatuses: [400, 401, 404],
|
|
181
181
|
empty: false
|
|
182
182
|
}, requestOptions),
|
|
183
183
|
get: (input, requestOptions) => request({
|
|
@@ -195,7 +195,7 @@ function make6(options) {
|
|
|
195
195
|
path: `/api/plugin`,
|
|
196
196
|
query: { location: input?.["location"] },
|
|
197
197
|
successStatus: 200,
|
|
198
|
-
declaredStatuses: [400, 401],
|
|
198
|
+
declaredStatuses: [400, 401, 404],
|
|
199
199
|
empty: false
|
|
200
200
|
}, requestOptions),
|
|
201
201
|
check: (input, requestOptions) => request({
|
|
@@ -204,7 +204,7 @@ function make6(options) {
|
|
|
204
204
|
query: { location: input?.["location"] },
|
|
205
205
|
body: { target: input?.["target"] },
|
|
206
206
|
successStatus: 200,
|
|
207
|
-
declaredStatuses: [400, 401],
|
|
207
|
+
declaredStatuses: [400, 401, 404],
|
|
208
208
|
empty: false
|
|
209
209
|
}, requestOptions),
|
|
210
210
|
update: (input, requestOptions) => request({
|
|
@@ -213,7 +213,7 @@ function make6(options) {
|
|
|
213
213
|
query: { location: input["location"] },
|
|
214
214
|
body: { targets: input["targets"] },
|
|
215
215
|
successStatus: 204,
|
|
216
|
-
declaredStatuses: [400, 401, 503],
|
|
216
|
+
declaredStatuses: [400, 401, 404, 503],
|
|
217
217
|
empty: true
|
|
218
218
|
}, requestOptions)
|
|
219
219
|
},
|
|
@@ -623,7 +623,7 @@ function make6(options) {
|
|
|
623
623
|
path: `/api/model`,
|
|
624
624
|
query: { location: input?.["location"] },
|
|
625
625
|
successStatus: 200,
|
|
626
|
-
declaredStatuses: [400, 401, 503],
|
|
626
|
+
declaredStatuses: [400, 401, 404, 503],
|
|
627
627
|
empty: false
|
|
628
628
|
}, requestOptions),
|
|
629
629
|
default: (input, requestOptions) => request({
|
|
@@ -631,7 +631,7 @@ function make6(options) {
|
|
|
631
631
|
path: `/api/model/default`,
|
|
632
632
|
query: { location: input?.["location"] },
|
|
633
633
|
successStatus: 200,
|
|
634
|
-
declaredStatuses: [400, 401, 503],
|
|
634
|
+
declaredStatuses: [400, 401, 404, 503],
|
|
635
635
|
empty: false
|
|
636
636
|
}, requestOptions)
|
|
637
637
|
},
|
|
@@ -641,7 +641,7 @@ function make6(options) {
|
|
|
641
641
|
path: `/api/experimental/generate`,
|
|
642
642
|
body: { prompt: input["prompt"], model: input["model"] },
|
|
643
643
|
successStatus: 200,
|
|
644
|
-
declaredStatuses: [400, 401, 503],
|
|
644
|
+
declaredStatuses: [400, 401, 404, 503],
|
|
645
645
|
empty: false
|
|
646
646
|
}, requestOptions).then((value) => value.data)
|
|
647
647
|
},
|
|
@@ -651,7 +651,7 @@ function make6(options) {
|
|
|
651
651
|
path: `/api/provider`,
|
|
652
652
|
query: { location: input?.["location"] },
|
|
653
653
|
successStatus: 200,
|
|
654
|
-
declaredStatuses: [400, 401, 503],
|
|
654
|
+
declaredStatuses: [400, 401, 404, 503],
|
|
655
655
|
empty: false
|
|
656
656
|
}, requestOptions),
|
|
657
657
|
get: (input, requestOptions) => request({
|
|
@@ -669,7 +669,7 @@ function make6(options) {
|
|
|
669
669
|
path: `/api/integration`,
|
|
670
670
|
query: { location: input?.["location"] },
|
|
671
671
|
successStatus: 200,
|
|
672
|
-
declaredStatuses: [400, 401],
|
|
672
|
+
declaredStatuses: [400, 401, 404],
|
|
673
673
|
empty: false
|
|
674
674
|
}, requestOptions),
|
|
675
675
|
get: (input, requestOptions) => request({
|
|
@@ -687,7 +687,7 @@ function make6(options) {
|
|
|
687
687
|
query: { location: input["location"] },
|
|
688
688
|
body: { url: input["url"] },
|
|
689
689
|
successStatus: 204,
|
|
690
|
-
declaredStatuses: [400, 401],
|
|
690
|
+
declaredStatuses: [400, 401, 404],
|
|
691
691
|
empty: true
|
|
692
692
|
}, requestOptions)
|
|
693
693
|
},
|
|
@@ -709,7 +709,7 @@ function make6(options) {
|
|
|
709
709
|
query: { location: input["location"] },
|
|
710
710
|
body: { methodID: input["methodID"], answer: input["answer"], label: input["label"] },
|
|
711
711
|
successStatus: 200,
|
|
712
|
-
declaredStatuses: [400, 401],
|
|
712
|
+
declaredStatuses: [400, 401, 404],
|
|
713
713
|
empty: false
|
|
714
714
|
}, requestOptions),
|
|
715
715
|
status: (input, requestOptions) => request({
|
|
@@ -734,7 +734,7 @@ function make6(options) {
|
|
|
734
734
|
path: `/api/integration/${encodeURIComponent(input.integrationID)}/connect/oauth/${encodeURIComponent(input.attemptID)}`,
|
|
735
735
|
query: { location: input["location"] },
|
|
736
736
|
successStatus: 204,
|
|
737
|
-
declaredStatuses: [400, 401],
|
|
737
|
+
declaredStatuses: [400, 401, 404],
|
|
738
738
|
empty: true
|
|
739
739
|
}, requestOptions)
|
|
740
740
|
},
|
|
@@ -761,7 +761,7 @@ function make6(options) {
|
|
|
761
761
|
path: `/api/integration/${encodeURIComponent(input.integrationID)}/connect/command/${encodeURIComponent(input.attemptID)}`,
|
|
762
762
|
query: { location: input["location"] },
|
|
763
763
|
successStatus: 204,
|
|
764
|
-
declaredStatuses: [400, 401],
|
|
764
|
+
declaredStatuses: [400, 401, 404],
|
|
765
765
|
empty: true
|
|
766
766
|
}, requestOptions)
|
|
767
767
|
}
|
|
@@ -772,7 +772,7 @@ function make6(options) {
|
|
|
772
772
|
path: `/api/mcp`,
|
|
773
773
|
query: { location: input?.["location"] },
|
|
774
774
|
successStatus: 200,
|
|
775
|
-
declaredStatuses: [400, 401],
|
|
775
|
+
declaredStatuses: [400, 401, 404],
|
|
776
776
|
empty: false
|
|
777
777
|
}, requestOptions),
|
|
778
778
|
add: (input, requestOptions) => request({
|
|
@@ -781,7 +781,7 @@ function make6(options) {
|
|
|
781
781
|
query: { location: input["location"] },
|
|
782
782
|
body: { config: input["config"] },
|
|
783
783
|
successStatus: 204,
|
|
784
|
-
declaredStatuses: [400, 401],
|
|
784
|
+
declaredStatuses: [400, 401, 404],
|
|
785
785
|
empty: true
|
|
786
786
|
}, requestOptions),
|
|
787
787
|
remove: (input, requestOptions) => request({
|
|
@@ -814,7 +814,7 @@ function make6(options) {
|
|
|
814
814
|
path: `/api/mcp/resource`,
|
|
815
815
|
query: { location: input?.["location"] },
|
|
816
816
|
successStatus: 200,
|
|
817
|
-
declaredStatuses: [400, 401],
|
|
817
|
+
declaredStatuses: [400, 401, 404],
|
|
818
818
|
empty: false
|
|
819
819
|
}, requestOptions)
|
|
820
820
|
}
|
|
@@ -859,7 +859,7 @@ function make6(options) {
|
|
|
859
859
|
}, requestOptions)
|
|
860
860
|
},
|
|
861
861
|
project: {
|
|
862
|
-
list: (requestOptions) => request({ method: "GET", path: `/api/project`, successStatus: 200, declaredStatuses: [400, 401], empty: false }, requestOptions),
|
|
862
|
+
list: (requestOptions) => request({ method: "GET", path: `/api/project`, successStatus: 200, declaredStatuses: [400, 401, 404], empty: false }, requestOptions),
|
|
863
863
|
update: (input, requestOptions) => request({
|
|
864
864
|
method: "PATCH",
|
|
865
865
|
path: `/api/project/${encodeURIComponent(input.projectID)}`,
|
|
@@ -880,7 +880,7 @@ function make6(options) {
|
|
|
880
880
|
path: `/api/form`,
|
|
881
881
|
query: { location: input?.["location"] },
|
|
882
882
|
successStatus: 200,
|
|
883
|
-
declaredStatuses: [400, 401],
|
|
883
|
+
declaredStatuses: [400, 401, 404],
|
|
884
884
|
empty: false
|
|
885
885
|
}, requestOptions)
|
|
886
886
|
},
|
|
@@ -891,7 +891,7 @@ function make6(options) {
|
|
|
891
891
|
path: `/api/permission/request`,
|
|
892
892
|
query: { location: input?.["location"] },
|
|
893
893
|
successStatus: 200,
|
|
894
|
-
declaredStatuses: [400, 401],
|
|
894
|
+
declaredStatuses: [400, 401, 404],
|
|
895
895
|
empty: false
|
|
896
896
|
}, requestOptions)
|
|
897
897
|
},
|
|
@@ -901,14 +901,14 @@ function make6(options) {
|
|
|
901
901
|
path: `/api/permission/saved`,
|
|
902
902
|
query: { projectID: input?.["projectID"] },
|
|
903
903
|
successStatus: 200,
|
|
904
|
-
declaredStatuses: [400, 401],
|
|
904
|
+
declaredStatuses: [400, 401, 404],
|
|
905
905
|
empty: false
|
|
906
906
|
}, requestOptions).then((value) => value.data),
|
|
907
907
|
remove: (input, requestOptions) => request({
|
|
908
908
|
method: "DELETE",
|
|
909
909
|
path: `/api/permission/saved/${encodeURIComponent(input.id)}`,
|
|
910
910
|
successStatus: 204,
|
|
911
|
-
declaredStatuses: [400, 401],
|
|
911
|
+
declaredStatuses: [400, 401, 404],
|
|
912
912
|
empty: true
|
|
913
913
|
}, requestOptions)
|
|
914
914
|
},
|
|
@@ -966,7 +966,7 @@ function make6(options) {
|
|
|
966
966
|
path: `/api/fs/list`,
|
|
967
967
|
query: { location: input?.["location"], path: input?.["path"] },
|
|
968
968
|
successStatus: 200,
|
|
969
|
-
declaredStatuses: [400, 401],
|
|
969
|
+
declaredStatuses: [400, 401, 404],
|
|
970
970
|
empty: false
|
|
971
971
|
}, requestOptions),
|
|
972
972
|
find: (input, requestOptions) => request({
|
|
@@ -974,7 +974,7 @@ function make6(options) {
|
|
|
974
974
|
path: `/api/fs/find`,
|
|
975
975
|
query: { location: input["location"], query: input["query"], type: input["type"], limit: input["limit"] },
|
|
976
976
|
successStatus: 200,
|
|
977
|
-
declaredStatuses: [400, 401],
|
|
977
|
+
declaredStatuses: [400, 401, 404],
|
|
978
978
|
empty: false
|
|
979
979
|
}, requestOptions),
|
|
980
980
|
write: (input, requestOptions) => request({
|
|
@@ -983,7 +983,7 @@ function make6(options) {
|
|
|
983
983
|
query: { location: input["location"], path: input["path"] },
|
|
984
984
|
body: input["payload"],
|
|
985
985
|
successStatus: 200,
|
|
986
|
-
declaredStatuses: [400, 401],
|
|
986
|
+
declaredStatuses: [400, 401, 404],
|
|
987
987
|
empty: false,
|
|
988
988
|
binaryBody: true
|
|
989
989
|
}, requestOptions)
|
|
@@ -994,7 +994,7 @@ function make6(options) {
|
|
|
994
994
|
path: `/api/command`,
|
|
995
995
|
query: { location: input?.["location"] },
|
|
996
996
|
successStatus: 200,
|
|
997
|
-
declaredStatuses: [400, 401],
|
|
997
|
+
declaredStatuses: [400, 401, 404],
|
|
998
998
|
empty: false
|
|
999
999
|
}, requestOptions)
|
|
1000
1000
|
},
|
|
@@ -1004,7 +1004,7 @@ function make6(options) {
|
|
|
1004
1004
|
path: `/api/skill`,
|
|
1005
1005
|
query: { location: input?.["location"] },
|
|
1006
1006
|
successStatus: 200,
|
|
1007
|
-
declaredStatuses: [400, 401],
|
|
1007
|
+
declaredStatuses: [400, 401, 404],
|
|
1008
1008
|
empty: false
|
|
1009
1009
|
}, requestOptions)
|
|
1010
1010
|
},
|
|
@@ -1015,7 +1015,7 @@ function make6(options) {
|
|
|
1015
1015
|
query: { location: input["location"] },
|
|
1016
1016
|
body: { input: input["input"] },
|
|
1017
1017
|
successStatus: 200,
|
|
1018
|
-
declaredStatuses: [400, 401, 500],
|
|
1018
|
+
declaredStatuses: [400, 401, 404, 500],
|
|
1019
1019
|
empty: false
|
|
1020
1020
|
}, requestOptions)
|
|
1021
1021
|
},
|
|
@@ -1028,7 +1028,7 @@ function make6(options) {
|
|
|
1028
1028
|
path: `/api/pty`,
|
|
1029
1029
|
query: { location: input?.["location"] },
|
|
1030
1030
|
successStatus: 200,
|
|
1031
|
-
declaredStatuses: [400, 401],
|
|
1031
|
+
declaredStatuses: [400, 401, 404],
|
|
1032
1032
|
empty: false
|
|
1033
1033
|
}, requestOptions),
|
|
1034
1034
|
create: (input, requestOptions) => request({
|
|
@@ -1043,7 +1043,7 @@ function make6(options) {
|
|
|
1043
1043
|
env: input?.["env"]
|
|
1044
1044
|
},
|
|
1045
1045
|
successStatus: 200,
|
|
1046
|
-
declaredStatuses: [400, 401],
|
|
1046
|
+
declaredStatuses: [400, 401, 404],
|
|
1047
1047
|
empty: false
|
|
1048
1048
|
}, requestOptions),
|
|
1049
1049
|
get: (input, requestOptions) => request({
|
|
@@ -1174,7 +1174,7 @@ function make6(options) {
|
|
|
1174
1174
|
path: `/api/shell`,
|
|
1175
1175
|
query: { location: input?.["location"] },
|
|
1176
1176
|
successStatus: 200,
|
|
1177
|
-
declaredStatuses: [400, 401],
|
|
1177
|
+
declaredStatuses: [400, 401, 404],
|
|
1178
1178
|
empty: false
|
|
1179
1179
|
}, requestOptions),
|
|
1180
1180
|
create: (input, requestOptions) => request({
|
|
@@ -1188,7 +1188,7 @@ function make6(options) {
|
|
|
1188
1188
|
metadata: input["metadata"]
|
|
1189
1189
|
},
|
|
1190
1190
|
successStatus: 200,
|
|
1191
|
-
declaredStatuses: [400, 401],
|
|
1191
|
+
declaredStatuses: [400, 401, 404],
|
|
1192
1192
|
empty: false
|
|
1193
1193
|
}, requestOptions),
|
|
1194
1194
|
get: (input, requestOptions) => request({
|
|
@@ -1212,7 +1212,7 @@ function make6(options) {
|
|
|
1212
1212
|
path: `/api/shell/${encodeURIComponent(input.id)}`,
|
|
1213
1213
|
query: { location: input["location"] },
|
|
1214
1214
|
successStatus: 204,
|
|
1215
|
-
declaredStatuses: [400, 401],
|
|
1215
|
+
declaredStatuses: [400, 401, 404],
|
|
1216
1216
|
empty: true
|
|
1217
1217
|
}, requestOptions)
|
|
1218
1218
|
},
|
|
@@ -1222,7 +1222,7 @@ function make6(options) {
|
|
|
1222
1222
|
path: `/api/reference`,
|
|
1223
1223
|
query: { location: input?.["location"] },
|
|
1224
1224
|
successStatus: 200,
|
|
1225
|
-
declaredStatuses: [400, 401],
|
|
1225
|
+
declaredStatuses: [400, 401, 404],
|
|
1226
1226
|
empty: false
|
|
1227
1227
|
}, requestOptions)
|
|
1228
1228
|
},
|
|
@@ -1272,7 +1272,7 @@ function make6(options) {
|
|
|
1272
1272
|
path: `/api/vcs/init`,
|
|
1273
1273
|
query: { location: input?.["location"], provider: input?.["provider"] },
|
|
1274
1274
|
successStatus: 204,
|
|
1275
|
-
declaredStatuses: [400, 401, 409, 501, 503],
|
|
1275
|
+
declaredStatuses: [400, 401, 404, 409, 501, 503],
|
|
1276
1276
|
empty: true
|
|
1277
1277
|
}, requestOptions),
|
|
1278
1278
|
get: (input, requestOptions) => request({
|
|
@@ -1280,7 +1280,7 @@ function make6(options) {
|
|
|
1280
1280
|
path: `/api/vcs`,
|
|
1281
1281
|
query: { location: input?.["location"] },
|
|
1282
1282
|
successStatus: 200,
|
|
1283
|
-
declaredStatuses: [400, 401],
|
|
1283
|
+
declaredStatuses: [400, 401, 404],
|
|
1284
1284
|
empty: false
|
|
1285
1285
|
}, requestOptions),
|
|
1286
1286
|
base: (input, requestOptions) => request({
|
|
@@ -1288,7 +1288,7 @@ function make6(options) {
|
|
|
1288
1288
|
path: `/api/vcs/base`,
|
|
1289
1289
|
query: { location: input?.["location"] },
|
|
1290
1290
|
successStatus: 200,
|
|
1291
|
-
declaredStatuses: [400, 401, 503],
|
|
1291
|
+
declaredStatuses: [400, 401, 404, 503],
|
|
1292
1292
|
empty: false
|
|
1293
1293
|
}, requestOptions),
|
|
1294
1294
|
status: (input, requestOptions) => request({
|
|
@@ -1296,7 +1296,7 @@ function make6(options) {
|
|
|
1296
1296
|
path: `/api/vcs/status`,
|
|
1297
1297
|
query: { location: input?.["location"] },
|
|
1298
1298
|
successStatus: 200,
|
|
1299
|
-
declaredStatuses: [400, 401],
|
|
1299
|
+
declaredStatuses: [400, 401, 404],
|
|
1300
1300
|
empty: false
|
|
1301
1301
|
}, requestOptions),
|
|
1302
1302
|
branch: {
|
|
@@ -1305,7 +1305,7 @@ function make6(options) {
|
|
|
1305
1305
|
path: `/api/vcs/branch`,
|
|
1306
1306
|
query: { location: input?.["location"], search: input?.["search"], limit: input?.["limit"] },
|
|
1307
1307
|
successStatus: 200,
|
|
1308
|
-
declaredStatuses: [400, 401],
|
|
1308
|
+
declaredStatuses: [400, 401, 404],
|
|
1309
1309
|
empty: false
|
|
1310
1310
|
}, requestOptions)
|
|
1311
1311
|
},
|
|
@@ -1314,7 +1314,7 @@ function make6(options) {
|
|
|
1314
1314
|
path: `/api/vcs/diff`,
|
|
1315
1315
|
query: { location: input["location"], mode: input["mode"], base: input["base"], context: input["context"] },
|
|
1316
1316
|
successStatus: 200,
|
|
1317
|
-
declaredStatuses: [400, 401, 503],
|
|
1317
|
+
declaredStatuses: [400, 401, 404, 503],
|
|
1318
1318
|
empty: false
|
|
1319
1319
|
}, requestOptions)
|
|
1320
1320
|
},
|
|
@@ -1354,7 +1354,7 @@ function make6(options) {
|
|
|
1354
1354
|
path: `/api/websearch/provider`,
|
|
1355
1355
|
query: { location: input?.["location"] },
|
|
1356
1356
|
successStatus: 200,
|
|
1357
|
-
declaredStatuses: [400, 401, 503],
|
|
1357
|
+
declaredStatuses: [400, 401, 404, 503],
|
|
1358
1358
|
empty: false
|
|
1359
1359
|
}, requestOptions),
|
|
1360
1360
|
query: (input, requestOptions) => request({
|
|
@@ -1363,7 +1363,7 @@ function make6(options) {
|
|
|
1363
1363
|
query: { location: input["location"] },
|
|
1364
1364
|
body: { query: input["query"], providerID: input["providerID"] },
|
|
1365
1365
|
successStatus: 200,
|
|
1366
|
-
declaredStatuses: [400, 401, 503],
|
|
1366
|
+
declaredStatuses: [400, 401, 404, 503],
|
|
1367
1367
|
empty: false
|
|
1368
1368
|
}, requestOptions)
|
|
1369
1369
|
},
|
|
@@ -1373,16 +1373,22 @@ function make6(options) {
|
|
|
1373
1373
|
path: `/api/config`,
|
|
1374
1374
|
query: { location: input?.["location"] },
|
|
1375
1375
|
successStatus: 200,
|
|
1376
|
-
declaredStatuses: [400, 401],
|
|
1376
|
+
declaredStatuses: [400, 401, 404],
|
|
1377
|
+
empty: false
|
|
1378
|
+
}, requestOptions),
|
|
1379
|
+
shells: (requestOptions) => request({
|
|
1380
|
+
method: "GET",
|
|
1381
|
+
path: `/api/config/shell`,
|
|
1382
|
+
successStatus: 200,
|
|
1383
|
+
declaredStatuses: [400, 401, 404],
|
|
1377
1384
|
empty: false
|
|
1378
1385
|
}, requestOptions),
|
|
1379
|
-
shells: (requestOptions) => request({ method: "GET", path: `/api/config/shell`, successStatus: 200, declaredStatuses: [400, 401], empty: false }, requestOptions),
|
|
1380
1386
|
update: (input, requestOptions) => request({
|
|
1381
1387
|
method: "PATCH",
|
|
1382
1388
|
path: `/api/experimental/config`,
|
|
1383
1389
|
body: { shell: input["shell"] },
|
|
1384
1390
|
successStatus: 204,
|
|
1385
|
-
declaredStatuses: [400, 401],
|
|
1391
|
+
declaredStatuses: [400, 401, 404],
|
|
1386
1392
|
empty: true
|
|
1387
1393
|
}, requestOptions)
|
|
1388
1394
|
}
|
|
@@ -1415,20 +1421,20 @@ async function json(response) {
|
|
|
1415
1421
|
try {
|
|
1416
1422
|
await response.body?.cancel();
|
|
1417
1423
|
} catch {}
|
|
1418
|
-
throw new
|
|
1424
|
+
throw new ClientError2("UnsupportedContentType", { detail: response.headers.get("content-type") });
|
|
1419
1425
|
}
|
|
1420
1426
|
let text;
|
|
1421
1427
|
try {
|
|
1422
1428
|
text = await response.text();
|
|
1423
1429
|
} catch (cause) {
|
|
1424
|
-
throw new
|
|
1430
|
+
throw new ClientError2("Transport", { cause });
|
|
1425
1431
|
}
|
|
1426
1432
|
if (text === "")
|
|
1427
|
-
throw new
|
|
1433
|
+
throw new ClientError2("MalformedResponse");
|
|
1428
1434
|
try {
|
|
1429
1435
|
return JSON.parse(text);
|
|
1430
1436
|
} catch (cause) {
|
|
1431
|
-
throw new
|
|
1437
|
+
throw new ClientError2("MalformedResponse", { cause });
|
|
1432
1438
|
}
|
|
1433
1439
|
}
|
|
1434
1440
|
function declared(body) {
|
|
@@ -1441,4 +1447,4 @@ function isContentType(response, expected) {
|
|
|
1441
1447
|
return response.headers.get("content-type")?.split(";", 1)[0]?.trim().toLowerCase() === expected;
|
|
1442
1448
|
}
|
|
1443
1449
|
|
|
1444
|
-
export {
|
|
1450
|
+
export { make3, exports_client2 };
|