@opencode/client 2.2.0 → 2.2.1
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-jpd9ebw3.js → mcp-0e9xp5b3.js} +17 -17
- package/dist/chunks/{service-timing-myz4ngx9.js → mcp-15p82y03.js} +5 -5
- package/dist/chunks/{service-timing-rxd7awy0.js → mcp-4z60zgnr.js} +229 -126
- package/dist/chunks/mcp-60xe5cbf.js +4 -0
- package/dist/chunks/mcp-6v8v0sqq.js +30 -0
- package/dist/chunks/{service-timing-8ye1ye6f.js → mcp-8ye1ye6f.js} +2 -2
- package/dist/chunks/{service-timing-cyxwqteg.js → mcp-csehnca4.js} +6 -2
- package/dist/chunks/{service-timing-8we1dz3p.js → mcp-cvg5j6d1.js} +6 -5
- package/dist/chunks/{service-timing-gecjxyvt.js → mcp-gecjxyvt.js} +1 -1
- package/dist/chunks/{service-timing-ab9bm97w.js → mcp-kdshn947.js} +1 -1
- package/dist/chunks/{service-timing-js54wxgp.js → mcp-nwcpakzx.js} +2 -2
- package/dist/chunks/{service-timing-knyqkv17.js → mcp-qhd5h5hk.js} +2 -2
- package/dist/chunks/{service-timing-ryy6kscr.js → mcp-ryy6kscr.js} +1 -1
- package/dist/chunks/{service-timing-7f0py9js.js → mcp-y2etg5bs.js} +2 -2
- package/dist/chunks/{service-timing-wcsbjfhx.js → mcp-yn2a71yh.js} +498 -374
- package/dist/contract.d.ts +1 -1
- package/dist/contract.js +3 -1
- package/dist/effect/api/api.d.ts +632 -342
- package/dist/effect/client.d.ts +330 -121
- package/dist/effect/client.js +12 -12
- package/dist/effect/generated/client-error.js +3 -3
- package/dist/effect/generated/client.d.ts +365 -122
- 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 +3 -0
- package/dist/promise/client.d.ts +206 -137
- package/dist/promise/client.js +11 -11
- package/dist/promise/generated/client-error.js +3 -3
- package/dist/promise/generated/client.d.ts +242 -138
- package/dist/promise/generated/client.js +4 -4
- package/dist/promise/generated/index.js +16 -14
- package/dist/promise/generated/types.d.ts +638 -396
- package/dist/promise/generated/types.js +7 -5
- package/dist/promise/index.js +19 -17
- 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 +5 -5
- package/dist/chunks/service-timing-b80wmp2t.js +0 -30
- package/dist/chunks/service-timing-vmytr4q8.js +0 -4
- /package/dist/chunks/{service-timing-6mptkzbc.js → mcp-6mptkzbc.js} +0 -0
- /package/dist/chunks/{service-timing-6mq2wh8y.js → mcp-6mq2wh8y.js} +0 -0
- /package/dist/chunks/{service-timing-8s2anffy.js → mcp-8s2anffy.js} +0 -0
- /package/dist/chunks/{service-timing-9rqn6x4v.js → mcp-9rqn6x4v.js} +0 -0
- /package/dist/chunks/{service-timing-gne7h7mq.js → mcp-gne7h7mq.js} +0 -0
- /package/dist/chunks/{service-timing-m2eywc8w.js → mcp-m2eywc8w.js} +0 -0
- /package/dist/chunks/{service-timing-qav6mfdz.js → mcp-qav6mfdz.js} +0 -0
- /package/dist/chunks/{service-timing-sxt88q69.js → mcp-sxt88q69.js} +0 -0
- /package/dist/chunks/{service-timing-ve4aws36.js → mcp-ve4aws36.js} +0 -0
- /package/dist/chunks/{service-timing-vyas3vgt.js → mcp-vyas3vgt.js} +0 -0
- /package/dist/chunks/{service-timing-xgnj2w4v.js → mcp-xgnj2w4v.js} +0 -0
- /package/dist/chunks/{service-timing-ydhz1zrh.js → mcp-ydhz1zrh.js} +0 -0
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
} from "./
|
|
2
|
+
ClientError3
|
|
3
|
+
} from "./mcp-nwcpakzx.js";
|
|
4
4
|
import {
|
|
5
5
|
__export
|
|
6
|
-
} from "./
|
|
6
|
+
} from "./mcp-9rqn6x4v.js";
|
|
7
7
|
|
|
8
8
|
// src/promise/generated/client.ts
|
|
9
|
-
var
|
|
10
|
-
__export(
|
|
11
|
-
make: () =>
|
|
9
|
+
var exports_client4 = {};
|
|
10
|
+
__export(exports_client4, {
|
|
11
|
+
make: () => make6
|
|
12
12
|
});
|
|
13
13
|
var maxSseEventBytes = 16 * 1024 * 1024;
|
|
14
|
-
function
|
|
14
|
+
function make6(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 make3(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 ClientError3("Transport", { cause });
|
|
48
48
|
}
|
|
49
49
|
};
|
|
50
50
|
const responseError = async (response, descriptor) => {
|
|
@@ -53,7 +53,7 @@ function make3(options) {
|
|
|
53
53
|
try {
|
|
54
54
|
await response.body?.cancel();
|
|
55
55
|
} catch {}
|
|
56
|
-
throw new
|
|
56
|
+
throw new ClientError3("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 make3(options) {
|
|
|
78
78
|
try {
|
|
79
79
|
await response.body?.cancel();
|
|
80
80
|
} catch {}
|
|
81
|
-
throw new
|
|
81
|
+
throw new ClientError3("UnsupportedContentType", { detail: response.headers.get("content-type") });
|
|
82
82
|
}
|
|
83
83
|
if (response.body === null)
|
|
84
|
-
throw new
|
|
84
|
+
throw new ClientError3("MalformedResponse");
|
|
85
85
|
const reader = response.body.getReader();
|
|
86
86
|
const decoder = new TextDecoder;
|
|
87
87
|
let buffer = "";
|
|
@@ -91,13 +91,13 @@ function make3(options) {
|
|
|
91
91
|
try {
|
|
92
92
|
next = await reader.read();
|
|
93
93
|
} catch (cause) {
|
|
94
|
-
throw new
|
|
94
|
+
throw new ClientError3("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 ClientError3("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 make3(options) {
|
|
|
124
124
|
try {
|
|
125
125
|
yield JSON.parse(data);
|
|
126
126
|
} catch (cause) {
|
|
127
|
-
throw new
|
|
127
|
+
throw new ClientError3("MalformedResponse", { cause });
|
|
128
128
|
}
|
|
129
129
|
}
|
|
130
130
|
boundary = buffer.indexOf(`
|
|
@@ -142,7 +142,7 @@ function make3(options) {
|
|
|
142
142
|
}
|
|
143
143
|
}
|
|
144
144
|
});
|
|
145
|
-
|
|
145
|
+
const client = {
|
|
146
146
|
server: {
|
|
147
147
|
info: (requestOptions) => request({ method: "GET", path: `/api/info`, successStatus: 200, declaredStatuses: [400, 401], empty: false }, requestOptions),
|
|
148
148
|
pair: (requestOptions) => request({ method: "POST", path: `/api/pair`, successStatus: 200, declaredStatuses: [400, 401], empty: false }, requestOptions),
|
|
@@ -244,20 +244,6 @@ function make3(options) {
|
|
|
244
244
|
declaredStatuses: [400, 401],
|
|
245
245
|
empty: false
|
|
246
246
|
}, requestOptions),
|
|
247
|
-
stats: (input, requestOptions) => request({
|
|
248
|
-
method: "GET",
|
|
249
|
-
path: `/api/experimental/session/stats`,
|
|
250
|
-
query: {
|
|
251
|
-
from: input?.["from"],
|
|
252
|
-
to: input?.["to"],
|
|
253
|
-
project: input?.["project"],
|
|
254
|
-
timezone: input?.["timezone"],
|
|
255
|
-
tools: input?.["tools"]
|
|
256
|
-
},
|
|
257
|
-
successStatus: 200,
|
|
258
|
-
declaredStatuses: [400, 401],
|
|
259
|
-
empty: false
|
|
260
|
-
}, requestOptions).then((value) => value.data),
|
|
261
247
|
create: (input, requestOptions) => request({
|
|
262
248
|
method: "POST",
|
|
263
249
|
path: `/api/session`,
|
|
@@ -275,22 +261,6 @@ function make3(options) {
|
|
|
275
261
|
declaredStatuses: [400, 401, 404],
|
|
276
262
|
empty: false
|
|
277
263
|
}, requestOptions).then((value) => value.data),
|
|
278
|
-
import: (input, requestOptions) => request({
|
|
279
|
-
method: "POST",
|
|
280
|
-
path: `/api/experimental/session/import`,
|
|
281
|
-
body: { info: input["info"], messages: input["messages"], location: input["location"] },
|
|
282
|
-
successStatus: 200,
|
|
283
|
-
declaredStatuses: [400, 401, 404, 409],
|
|
284
|
-
empty: false
|
|
285
|
-
}, requestOptions).then((value) => value.data),
|
|
286
|
-
export: (input, requestOptions) => request({
|
|
287
|
-
method: "GET",
|
|
288
|
-
path: `/api/experimental/session/${encodeURIComponent(input.sessionID)}/export`,
|
|
289
|
-
query: { sanitize: input["sanitize"] },
|
|
290
|
-
successStatus: 200,
|
|
291
|
-
declaredStatuses: [400, 401, 404, 500],
|
|
292
|
-
empty: false
|
|
293
|
-
}, requestOptions).then((value) => value.data),
|
|
294
264
|
active: (requestOptions) => request({
|
|
295
265
|
method: "GET",
|
|
296
266
|
path: `/api/session/active`,
|
|
@@ -389,14 +359,6 @@ function make3(options) {
|
|
|
389
359
|
declaredStatuses: [400, 401, 404, 500],
|
|
390
360
|
empty: true
|
|
391
361
|
}, requestOptions),
|
|
392
|
-
skill: (input, requestOptions) => request({
|
|
393
|
-
method: "POST",
|
|
394
|
-
path: `/api/experimental/session/${encodeURIComponent(input.sessionID)}/skill`,
|
|
395
|
-
body: { id: input["id"], resume: input["resume"] },
|
|
396
|
-
successStatus: 204,
|
|
397
|
-
declaredStatuses: [400, 401, 404],
|
|
398
|
-
empty: true
|
|
399
|
-
}, requestOptions),
|
|
400
362
|
synthetic: (input, requestOptions) => request({
|
|
401
363
|
method: "POST",
|
|
402
364
|
path: `/api/session/${encodeURIComponent(input.sessionID)}/synthetic`,
|
|
@@ -428,13 +390,6 @@ function make3(options) {
|
|
|
428
390
|
declaredStatuses: [400, 401, 404, 409],
|
|
429
391
|
empty: false
|
|
430
392
|
}, requestOptions).then((value) => value.data),
|
|
431
|
-
wait: (input, requestOptions) => request({
|
|
432
|
-
method: "POST",
|
|
433
|
-
path: `/api/experimental/session/${encodeURIComponent(input.sessionID)}/wait`,
|
|
434
|
-
successStatus: 204,
|
|
435
|
-
declaredStatuses: [400, 401, 404, 503],
|
|
436
|
-
empty: true
|
|
437
|
-
}, requestOptions),
|
|
438
393
|
revert: {
|
|
439
394
|
stage: (input, requestOptions) => request({
|
|
440
395
|
method: "POST",
|
|
@@ -498,32 +453,6 @@ function make3(options) {
|
|
|
498
453
|
empty: true
|
|
499
454
|
}, requestOptions)
|
|
500
455
|
},
|
|
501
|
-
instructions: {
|
|
502
|
-
entry: {
|
|
503
|
-
list: (input, requestOptions) => request({
|
|
504
|
-
method: "GET",
|
|
505
|
-
path: `/api/experimental/session/${encodeURIComponent(input.sessionID)}/instructions/entries`,
|
|
506
|
-
successStatus: 200,
|
|
507
|
-
declaredStatuses: [400, 401, 404],
|
|
508
|
-
empty: false
|
|
509
|
-
}, requestOptions).then((value) => value.data),
|
|
510
|
-
put: (input, requestOptions) => request({
|
|
511
|
-
method: "PUT",
|
|
512
|
-
path: `/api/experimental/session/${encodeURIComponent(input.sessionID)}/instructions/entries/${encodeURIComponent(input.key)}`,
|
|
513
|
-
body: { value: input["value"] },
|
|
514
|
-
successStatus: 204,
|
|
515
|
-
declaredStatuses: [400, 401, 404, 413],
|
|
516
|
-
empty: true
|
|
517
|
-
}, requestOptions),
|
|
518
|
-
remove: (input, requestOptions) => request({
|
|
519
|
-
method: "DELETE",
|
|
520
|
-
path: `/api/experimental/session/${encodeURIComponent(input.sessionID)}/instructions/entries/${encodeURIComponent(input.key)}`,
|
|
521
|
-
successStatus: 204,
|
|
522
|
-
declaredStatuses: [400, 401, 404],
|
|
523
|
-
empty: true
|
|
524
|
-
}, requestOptions)
|
|
525
|
-
}
|
|
526
|
-
},
|
|
527
456
|
generate: (input, requestOptions) => request({
|
|
528
457
|
method: "POST",
|
|
529
458
|
path: `/api/session/${encodeURIComponent(input.sessionID)}/generate`,
|
|
@@ -532,14 +461,6 @@ function make3(options) {
|
|
|
532
461
|
declaredStatuses: [400, 401, 404, 503],
|
|
533
462
|
empty: false
|
|
534
463
|
}, requestOptions).then((value) => value.data),
|
|
535
|
-
log: (input, requestOptions) => sse({
|
|
536
|
-
method: "GET",
|
|
537
|
-
path: `/api/experimental/session/${encodeURIComponent(input.sessionID)}/log`,
|
|
538
|
-
query: { after: input["after"], follow: input["follow"] },
|
|
539
|
-
successStatus: 200,
|
|
540
|
-
declaredStatuses: [400, 401, 404],
|
|
541
|
-
empty: false
|
|
542
|
-
}, requestOptions),
|
|
543
464
|
interrupt: (input, requestOptions) => request({
|
|
544
465
|
method: "POST",
|
|
545
466
|
path: `/api/session/${encodeURIComponent(input.sessionID)}/interrupt`,
|
|
@@ -600,26 +521,424 @@ function make3(options) {
|
|
|
600
521
|
path: `/api/session/${encodeURIComponent(input.sessionID)}/form/${encodeURIComponent(input.formID)}`,
|
|
601
522
|
query: { message: input["message"] },
|
|
602
523
|
successStatus: 204,
|
|
603
|
-
declaredStatuses: [400, 401, 404, 409],
|
|
524
|
+
declaredStatuses: [400, 401, 404, 409],
|
|
525
|
+
empty: true
|
|
526
|
+
}, requestOptions)
|
|
527
|
+
},
|
|
528
|
+
environment: (input, requestOptions) => request({
|
|
529
|
+
method: "PUT",
|
|
530
|
+
path: `/api/session/${encodeURIComponent(input.sessionID)}/environment`,
|
|
531
|
+
body: { variables: input["variables"] },
|
|
532
|
+
successStatus: 204,
|
|
533
|
+
declaredStatuses: [400, 401, 404],
|
|
534
|
+
empty: true
|
|
535
|
+
}, requestOptions),
|
|
536
|
+
view: (input, requestOptions) => request({
|
|
537
|
+
method: "POST",
|
|
538
|
+
path: `/api/session/${encodeURIComponent(input.sessionID)}/view`,
|
|
539
|
+
body: { idle: input["idle"] },
|
|
540
|
+
successStatus: 204,
|
|
541
|
+
declaredStatuses: [400, 401, 404],
|
|
542
|
+
empty: true
|
|
543
|
+
}, requestOptions)
|
|
544
|
+
},
|
|
545
|
+
experimental: {
|
|
546
|
+
session: {
|
|
547
|
+
stats: (input, requestOptions) => request({
|
|
548
|
+
method: "GET",
|
|
549
|
+
path: `/api/experimental/session/stats`,
|
|
550
|
+
query: {
|
|
551
|
+
from: input?.["from"],
|
|
552
|
+
to: input?.["to"],
|
|
553
|
+
project: input?.["project"],
|
|
554
|
+
timezone: input?.["timezone"],
|
|
555
|
+
tools: input?.["tools"]
|
|
556
|
+
},
|
|
557
|
+
successStatus: 200,
|
|
558
|
+
declaredStatuses: [400, 401],
|
|
559
|
+
empty: false
|
|
560
|
+
}, requestOptions).then((value) => value.data),
|
|
561
|
+
import: (input, requestOptions) => request({
|
|
562
|
+
method: "POST",
|
|
563
|
+
path: `/api/experimental/session/import`,
|
|
564
|
+
body: { info: input["info"], messages: input["messages"], location: input["location"] },
|
|
565
|
+
successStatus: 200,
|
|
566
|
+
declaredStatuses: [400, 401, 404, 409],
|
|
567
|
+
empty: false
|
|
568
|
+
}, requestOptions).then((value) => value.data),
|
|
569
|
+
export: (input, requestOptions) => request({
|
|
570
|
+
method: "GET",
|
|
571
|
+
path: `/api/experimental/session/${encodeURIComponent(input.sessionID)}/export`,
|
|
572
|
+
query: { sanitize: input["sanitize"] },
|
|
573
|
+
successStatus: 200,
|
|
574
|
+
declaredStatuses: [400, 401, 404, 500],
|
|
575
|
+
empty: false
|
|
576
|
+
}, requestOptions).then((value) => value.data),
|
|
577
|
+
skill: (input, requestOptions) => request({
|
|
578
|
+
method: "POST",
|
|
579
|
+
path: `/api/experimental/session/${encodeURIComponent(input.sessionID)}/skill`,
|
|
580
|
+
body: { id: input["id"], resume: input["resume"] },
|
|
581
|
+
successStatus: 204,
|
|
582
|
+
declaredStatuses: [400, 401, 404],
|
|
583
|
+
empty: true
|
|
584
|
+
}, requestOptions),
|
|
585
|
+
wait: (input, requestOptions) => request({
|
|
586
|
+
method: "POST",
|
|
587
|
+
path: `/api/experimental/session/${encodeURIComponent(input.sessionID)}/wait`,
|
|
588
|
+
successStatus: 204,
|
|
589
|
+
declaredStatuses: [400, 401, 404, 503],
|
|
590
|
+
empty: true
|
|
591
|
+
}, requestOptions),
|
|
592
|
+
instructions: {
|
|
593
|
+
entry: {
|
|
594
|
+
list: (input, requestOptions) => request({
|
|
595
|
+
method: "GET",
|
|
596
|
+
path: `/api/experimental/session/${encodeURIComponent(input.sessionID)}/instructions/entries`,
|
|
597
|
+
successStatus: 200,
|
|
598
|
+
declaredStatuses: [400, 401, 404],
|
|
599
|
+
empty: false
|
|
600
|
+
}, requestOptions).then((value) => value.data),
|
|
601
|
+
put: (input, requestOptions) => request({
|
|
602
|
+
method: "PUT",
|
|
603
|
+
path: `/api/experimental/session/${encodeURIComponent(input.sessionID)}/instructions/entries/${encodeURIComponent(input.key)}`,
|
|
604
|
+
body: { value: input["value"] },
|
|
605
|
+
successStatus: 204,
|
|
606
|
+
declaredStatuses: [400, 401, 404, 413],
|
|
607
|
+
empty: true
|
|
608
|
+
}, requestOptions),
|
|
609
|
+
remove: (input, requestOptions) => request({
|
|
610
|
+
method: "DELETE",
|
|
611
|
+
path: `/api/experimental/session/${encodeURIComponent(input.sessionID)}/instructions/entries/${encodeURIComponent(input.key)}`,
|
|
612
|
+
successStatus: 204,
|
|
613
|
+
declaredStatuses: [400, 401, 404],
|
|
614
|
+
empty: true
|
|
615
|
+
}, requestOptions)
|
|
616
|
+
}
|
|
617
|
+
},
|
|
618
|
+
log: (input, requestOptions) => sse({
|
|
619
|
+
method: "GET",
|
|
620
|
+
path: `/api/experimental/session/${encodeURIComponent(input.sessionID)}/log`,
|
|
621
|
+
query: { after: input["after"], follow: input["follow"] },
|
|
622
|
+
successStatus: 200,
|
|
623
|
+
declaredStatuses: [400, 401, 404],
|
|
624
|
+
empty: false
|
|
625
|
+
}, requestOptions)
|
|
626
|
+
},
|
|
627
|
+
generate: {
|
|
628
|
+
text: (input, requestOptions) => request({
|
|
629
|
+
method: "POST",
|
|
630
|
+
path: `/api/experimental/generate/text`,
|
|
631
|
+
body: { prompt: input["prompt"], model: input["model"] },
|
|
632
|
+
successStatus: 200,
|
|
633
|
+
declaredStatuses: [400, 401, 404, 422, 502, 503],
|
|
634
|
+
empty: false
|
|
635
|
+
}, requestOptions).then((value) => value.data),
|
|
636
|
+
image: (input, requestOptions) => request({
|
|
637
|
+
method: "POST",
|
|
638
|
+
path: `/api/experimental/generate/image`,
|
|
639
|
+
body: {
|
|
640
|
+
model: input["model"],
|
|
641
|
+
prompt: input["prompt"],
|
|
642
|
+
images: input["images"],
|
|
643
|
+
n: input["n"],
|
|
644
|
+
aspect: input["aspect"],
|
|
645
|
+
resolution: input["resolution"]
|
|
646
|
+
},
|
|
647
|
+
successStatus: 200,
|
|
648
|
+
declaredStatuses: [400, 401, 404, 422, 502, 503],
|
|
649
|
+
empty: false
|
|
650
|
+
}, requestOptions).then((value) => value.data),
|
|
651
|
+
decisions: (input, requestOptions) => request({
|
|
652
|
+
method: "POST",
|
|
653
|
+
path: `/api/experimental/generate/decisions`,
|
|
654
|
+
body: { model: input["model"], input: input["input"], questions: input["questions"] },
|
|
655
|
+
successStatus: 200,
|
|
656
|
+
declaredStatuses: [400, 401, 404, 422, 502, 503],
|
|
657
|
+
empty: false
|
|
658
|
+
}, requestOptions).then((value) => value.data)
|
|
659
|
+
},
|
|
660
|
+
voice: {
|
|
661
|
+
models: (requestOptions) => request({
|
|
662
|
+
method: "GET",
|
|
663
|
+
path: `/api/experimental/voice/models`,
|
|
664
|
+
successStatus: 200,
|
|
665
|
+
declaredStatuses: [400, 401, 404, 503],
|
|
666
|
+
empty: false
|
|
667
|
+
}, requestOptions).then((value) => value.data),
|
|
668
|
+
session: (input, requestOptions) => request({
|
|
669
|
+
method: "POST",
|
|
670
|
+
path: `/api/experimental/voice/session`,
|
|
671
|
+
body: { model: input["model"], session: input["session"], transport: input["transport"] },
|
|
672
|
+
successStatus: 200,
|
|
673
|
+
declaredStatuses: [400, 401, 404, 503],
|
|
674
|
+
empty: false
|
|
675
|
+
}, requestOptions).then((value) => value.data)
|
|
676
|
+
},
|
|
677
|
+
integration: {
|
|
678
|
+
wellknown: {
|
|
679
|
+
add: (input, requestOptions) => request({
|
|
680
|
+
method: "POST",
|
|
681
|
+
path: `/api/experimental/integration/wellknown`,
|
|
682
|
+
query: { location: input["location"] },
|
|
683
|
+
body: { url: input["url"] },
|
|
684
|
+
successStatus: 204,
|
|
685
|
+
declaredStatuses: [400, 401, 404],
|
|
686
|
+
empty: true
|
|
687
|
+
}, requestOptions)
|
|
688
|
+
}
|
|
689
|
+
},
|
|
690
|
+
mcp: {
|
|
691
|
+
add: (input, requestOptions) => request({
|
|
692
|
+
method: "PUT",
|
|
693
|
+
path: `/api/experimental/mcp/${encodeURIComponent(input.server)}`,
|
|
694
|
+
query: { location: input["location"] },
|
|
695
|
+
body: { config: input["config"] },
|
|
696
|
+
successStatus: 204,
|
|
697
|
+
declaredStatuses: [400, 401, 404],
|
|
698
|
+
empty: true
|
|
699
|
+
}, requestOptions),
|
|
700
|
+
remove: (input, requestOptions) => request({
|
|
701
|
+
method: "DELETE",
|
|
702
|
+
path: `/api/experimental/mcp/${encodeURIComponent(input.server)}`,
|
|
703
|
+
query: { location: input["location"] },
|
|
704
|
+
successStatus: 204,
|
|
705
|
+
declaredStatuses: [400, 401, 404],
|
|
706
|
+
empty: true
|
|
707
|
+
}, requestOptions),
|
|
708
|
+
connect: (input, requestOptions) => request({
|
|
709
|
+
method: "POST",
|
|
710
|
+
path: `/api/experimental/mcp/${encodeURIComponent(input.server)}/connect`,
|
|
711
|
+
query: { location: input["location"] },
|
|
712
|
+
successStatus: 204,
|
|
713
|
+
declaredStatuses: [400, 401, 404],
|
|
714
|
+
empty: true
|
|
715
|
+
}, requestOptions),
|
|
716
|
+
disconnect: (input, requestOptions) => request({
|
|
717
|
+
method: "POST",
|
|
718
|
+
path: `/api/experimental/mcp/${encodeURIComponent(input.server)}/disconnect`,
|
|
719
|
+
query: { location: input["location"] },
|
|
720
|
+
successStatus: 204,
|
|
721
|
+
declaredStatuses: [400, 401, 404],
|
|
722
|
+
empty: true
|
|
723
|
+
}, requestOptions),
|
|
724
|
+
client: {
|
|
725
|
+
token: (input, requestOptions) => request({
|
|
726
|
+
method: "POST",
|
|
727
|
+
path: `/api/experimental/client-mcp/token`,
|
|
728
|
+
query: { location: input["location"], name: input["name"] },
|
|
729
|
+
headers: { "x-opencode-ticket": input["x-opencode-ticket"] },
|
|
730
|
+
successStatus: 200,
|
|
731
|
+
declaredStatuses: [400, 401, 403, 404],
|
|
732
|
+
empty: false
|
|
733
|
+
}, requestOptions)
|
|
734
|
+
}
|
|
735
|
+
},
|
|
736
|
+
file: {
|
|
737
|
+
write: (input, requestOptions) => request({
|
|
738
|
+
method: "POST",
|
|
739
|
+
path: `/api/experimental/fs/write`,
|
|
740
|
+
query: { location: input["location"], path: input["path"] },
|
|
741
|
+
body: input["payload"],
|
|
742
|
+
successStatus: 200,
|
|
743
|
+
declaredStatuses: [400, 401, 404],
|
|
744
|
+
empty: false,
|
|
745
|
+
binaryBody: true
|
|
746
|
+
}, requestOptions),
|
|
747
|
+
watch: (input, requestOptions) => request({
|
|
748
|
+
method: "POST",
|
|
749
|
+
path: `/api/experimental/fs/watch`,
|
|
750
|
+
query: { location: input["location"] },
|
|
751
|
+
body: { path: input["path"] },
|
|
752
|
+
successStatus: 204,
|
|
753
|
+
declaredStatuses: [400, 401, 404, 503],
|
|
754
|
+
empty: true
|
|
755
|
+
}, requestOptions),
|
|
756
|
+
unwatch: (input, requestOptions) => request({
|
|
757
|
+
method: "DELETE",
|
|
758
|
+
path: `/api/experimental/fs/watch`,
|
|
759
|
+
query: { location: input["location"] },
|
|
760
|
+
body: { path: input["path"] },
|
|
761
|
+
successStatus: 204,
|
|
762
|
+
declaredStatuses: [400, 401, 404],
|
|
763
|
+
empty: true
|
|
764
|
+
}, requestOptions)
|
|
765
|
+
},
|
|
766
|
+
persistentPty: {
|
|
767
|
+
read: (input, requestOptions) => request({
|
|
768
|
+
method: "GET",
|
|
769
|
+
path: `/api/experimental/session/${encodeURIComponent(input.sessionID)}/terminal/read`,
|
|
770
|
+
query: { lines: input["lines"] },
|
|
771
|
+
successStatus: 200,
|
|
772
|
+
declaredStatuses: [400, 401, 503],
|
|
773
|
+
empty: false
|
|
774
|
+
}, requestOptions).then((value) => value.data),
|
|
775
|
+
list: (input, requestOptions) => request({
|
|
776
|
+
method: "GET",
|
|
777
|
+
path: `/api/experimental/session/${encodeURIComponent(input.sessionID)}/terminal`,
|
|
778
|
+
successStatus: 200,
|
|
779
|
+
declaredStatuses: [400, 401, 503],
|
|
780
|
+
empty: false
|
|
781
|
+
}, requestOptions).then((value) => value.data),
|
|
782
|
+
create: (input, requestOptions) => request({
|
|
783
|
+
method: "POST",
|
|
784
|
+
path: `/api/experimental/session/${encodeURIComponent(input.sessionID)}/terminal`,
|
|
785
|
+
body: {
|
|
786
|
+
command: input["command"],
|
|
787
|
+
args: input["args"],
|
|
788
|
+
cwd: input["cwd"],
|
|
789
|
+
title: input["title"],
|
|
790
|
+
env: input["env"],
|
|
791
|
+
size: input["size"]
|
|
792
|
+
},
|
|
793
|
+
successStatus: 200,
|
|
794
|
+
declaredStatuses: [400, 401, 503],
|
|
795
|
+
empty: false
|
|
796
|
+
}, requestOptions).then((value) => value.data),
|
|
797
|
+
shutdown: (requestOptions) => request({
|
|
798
|
+
method: "POST",
|
|
799
|
+
path: `/api/experimental/persistent-pty/shutdown`,
|
|
800
|
+
successStatus: 204,
|
|
801
|
+
declaredStatuses: [400, 401, 503],
|
|
802
|
+
empty: true
|
|
803
|
+
}, requestOptions),
|
|
804
|
+
handoff: (requestOptions) => request({
|
|
805
|
+
method: "POST",
|
|
806
|
+
path: `/api/experimental/persistent-pty/handoff`,
|
|
807
|
+
successStatus: 200,
|
|
808
|
+
declaredStatuses: [400, 401, 503],
|
|
809
|
+
empty: false
|
|
810
|
+
}, requestOptions),
|
|
811
|
+
get: (input, requestOptions) => request({
|
|
812
|
+
method: "GET",
|
|
813
|
+
path: `/api/experimental/persistent-pty/${encodeURIComponent(input.ptyID)}`,
|
|
814
|
+
successStatus: 200,
|
|
815
|
+
declaredStatuses: [400, 401, 404, 503],
|
|
816
|
+
empty: false
|
|
817
|
+
}, requestOptions).then((value) => value.data),
|
|
818
|
+
update: (input, requestOptions) => request({
|
|
819
|
+
method: "PUT",
|
|
820
|
+
path: `/api/experimental/persistent-pty/${encodeURIComponent(input.ptyID)}`,
|
|
821
|
+
body: { attachmentID: input["attachmentID"], size: input["size"] },
|
|
822
|
+
successStatus: 200,
|
|
823
|
+
declaredStatuses: [400, 401, 404, 503],
|
|
824
|
+
empty: false
|
|
825
|
+
}, requestOptions).then((value) => value.data),
|
|
826
|
+
snapshot: (input, requestOptions) => request({
|
|
827
|
+
method: "GET",
|
|
828
|
+
path: `/api/experimental/persistent-pty/${encodeURIComponent(input.ptyID)}/snapshot`,
|
|
829
|
+
successStatus: 200,
|
|
830
|
+
declaredStatuses: [400, 401, 404, 503],
|
|
831
|
+
empty: false
|
|
832
|
+
}, requestOptions).then((value) => value.data),
|
|
833
|
+
remove: (input, requestOptions) => request({
|
|
834
|
+
method: "DELETE",
|
|
835
|
+
path: `/api/experimental/persistent-pty/${encodeURIComponent(input.ptyID)}`,
|
|
836
|
+
successStatus: 204,
|
|
837
|
+
declaredStatuses: [400, 401, 404, 503],
|
|
838
|
+
empty: true
|
|
839
|
+
}, requestOptions),
|
|
840
|
+
connectToken: (input, requestOptions) => request({
|
|
841
|
+
method: "POST",
|
|
842
|
+
path: `/api/experimental/persistent-pty/${encodeURIComponent(input.ptyID)}/connect-token`,
|
|
843
|
+
headers: { "x-opencode-ticket": input["x-opencode-ticket"] },
|
|
844
|
+
successStatus: 200,
|
|
845
|
+
declaredStatuses: [400, 401, 403, 404, 503],
|
|
846
|
+
empty: false
|
|
847
|
+
}, requestOptions).then((value) => value.data)
|
|
848
|
+
},
|
|
849
|
+
media: {
|
|
850
|
+
get: (input, requestOptions) => request({
|
|
851
|
+
method: "GET",
|
|
852
|
+
path: `/api/experimental/media/${encodeURIComponent(input.hash)}`,
|
|
853
|
+
successStatus: 200,
|
|
854
|
+
declaredStatuses: [400, 401, 404],
|
|
855
|
+
empty: false,
|
|
856
|
+
binary: true
|
|
857
|
+
}, requestOptions)
|
|
858
|
+
},
|
|
859
|
+
schedule: {
|
|
860
|
+
create: (input, requestOptions) => request({
|
|
861
|
+
method: "POST",
|
|
862
|
+
path: `/api/experimental/schedule`,
|
|
863
|
+
body: {
|
|
864
|
+
sessionID: input["sessionID"],
|
|
865
|
+
name: input["name"],
|
|
866
|
+
when: input["when"],
|
|
867
|
+
ends: input["ends"],
|
|
868
|
+
prompt: input["prompt"]
|
|
869
|
+
},
|
|
870
|
+
successStatus: 200,
|
|
871
|
+
declaredStatuses: [400, 401, 403, 404],
|
|
872
|
+
empty: false
|
|
873
|
+
}, requestOptions).then((value) => value.data),
|
|
874
|
+
list: (input, requestOptions) => request({
|
|
875
|
+
method: "GET",
|
|
876
|
+
path: `/api/experimental/schedule`,
|
|
877
|
+
query: { sessionID: input["sessionID"] },
|
|
878
|
+
successStatus: 200,
|
|
879
|
+
declaredStatuses: [400, 401, 403, 404],
|
|
880
|
+
empty: false
|
|
881
|
+
}, requestOptions).then((value) => value.data),
|
|
882
|
+
get: (input, requestOptions) => request({
|
|
883
|
+
method: "GET",
|
|
884
|
+
path: `/api/experimental/schedule/${encodeURIComponent(input.scheduleID)}`,
|
|
885
|
+
successStatus: 200,
|
|
886
|
+
declaredStatuses: [400, 401, 403, 404],
|
|
887
|
+
empty: false
|
|
888
|
+
}, requestOptions).then((value) => value.data),
|
|
889
|
+
pause: (input, requestOptions) => request({
|
|
890
|
+
method: "POST",
|
|
891
|
+
path: `/api/experimental/schedule/${encodeURIComponent(input.scheduleID)}/pause`,
|
|
892
|
+
successStatus: 200,
|
|
893
|
+
declaredStatuses: [400, 401, 403, 404],
|
|
894
|
+
empty: false
|
|
895
|
+
}, requestOptions).then((value) => value.data),
|
|
896
|
+
resume: (input, requestOptions) => request({
|
|
897
|
+
method: "POST",
|
|
898
|
+
path: `/api/experimental/schedule/${encodeURIComponent(input.scheduleID)}/resume`,
|
|
899
|
+
successStatus: 200,
|
|
900
|
+
declaredStatuses: [400, 401, 403, 404],
|
|
901
|
+
empty: false
|
|
902
|
+
}, requestOptions).then((value) => value.data),
|
|
903
|
+
delete: (input, requestOptions) => request({
|
|
904
|
+
method: "DELETE",
|
|
905
|
+
path: `/api/experimental/schedule/${encodeURIComponent(input.scheduleID)}`,
|
|
906
|
+
successStatus: 204,
|
|
907
|
+
declaredStatuses: [400, 401, 403, 404],
|
|
908
|
+
empty: true
|
|
909
|
+
}, requestOptions)
|
|
910
|
+
},
|
|
911
|
+
migration: {
|
|
912
|
+
v1: {
|
|
913
|
+
status: (requestOptions) => request({
|
|
914
|
+
method: "GET",
|
|
915
|
+
path: `/api/experimental/migration/v1`,
|
|
916
|
+
successStatus: 200,
|
|
917
|
+
declaredStatuses: [400, 401],
|
|
918
|
+
empty: false
|
|
919
|
+
}, requestOptions)
|
|
920
|
+
}
|
|
921
|
+
},
|
|
922
|
+
usage: {
|
|
923
|
+
limits: (input, requestOptions) => request({
|
|
924
|
+
method: "GET",
|
|
925
|
+
path: `/api/experimental/usage/limits`,
|
|
926
|
+
query: { location: input?.["location"] },
|
|
927
|
+
successStatus: 200,
|
|
928
|
+
declaredStatuses: [400, 401, 404, 503],
|
|
929
|
+
empty: false
|
|
930
|
+
}, requestOptions)
|
|
931
|
+
},
|
|
932
|
+
config: {
|
|
933
|
+
update: (input, requestOptions) => request({
|
|
934
|
+
method: "PATCH",
|
|
935
|
+
path: `/api/experimental/config`,
|
|
936
|
+
body: { shell: input["shell"] },
|
|
937
|
+
successStatus: 204,
|
|
938
|
+
declaredStatuses: [400, 401, 404],
|
|
604
939
|
empty: true
|
|
605
940
|
}, requestOptions)
|
|
606
|
-
}
|
|
607
|
-
environment: (input, requestOptions) => request({
|
|
608
|
-
method: "PUT",
|
|
609
|
-
path: `/api/session/${encodeURIComponent(input.sessionID)}/environment`,
|
|
610
|
-
body: { variables: input["variables"] },
|
|
611
|
-
successStatus: 204,
|
|
612
|
-
declaredStatuses: [400, 401, 404],
|
|
613
|
-
empty: true
|
|
614
|
-
}, requestOptions),
|
|
615
|
-
view: (input, requestOptions) => request({
|
|
616
|
-
method: "POST",
|
|
617
|
-
path: `/api/session/${encodeURIComponent(input.sessionID)}/view`,
|
|
618
|
-
body: { idle: input["idle"] },
|
|
619
|
-
successStatus: 204,
|
|
620
|
-
declaredStatuses: [400, 401, 404],
|
|
621
|
-
empty: true
|
|
622
|
-
}, requestOptions)
|
|
941
|
+
}
|
|
623
942
|
},
|
|
624
943
|
message: {
|
|
625
944
|
list: (input, requestOptions) => request({
|
|
@@ -649,56 +968,6 @@ function make3(options) {
|
|
|
649
968
|
empty: false
|
|
650
969
|
}, requestOptions)
|
|
651
970
|
},
|
|
652
|
-
generate: {
|
|
653
|
-
text: (input, requestOptions) => request({
|
|
654
|
-
method: "POST",
|
|
655
|
-
path: `/api/experimental/generate/text`,
|
|
656
|
-
body: { prompt: input["prompt"], model: input["model"] },
|
|
657
|
-
successStatus: 200,
|
|
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],
|
|
682
|
-
empty: false
|
|
683
|
-
}, requestOptions).then((value) => value.data)
|
|
684
|
-
},
|
|
685
|
-
voice: {
|
|
686
|
-
models: (requestOptions) => request({
|
|
687
|
-
method: "GET",
|
|
688
|
-
path: `/api/experimental/voice/models`,
|
|
689
|
-
successStatus: 200,
|
|
690
|
-
declaredStatuses: [400, 401, 404, 503],
|
|
691
|
-
empty: false
|
|
692
|
-
}, requestOptions).then((value) => value.data),
|
|
693
|
-
session: (input, requestOptions) => request({
|
|
694
|
-
method: "POST",
|
|
695
|
-
path: `/api/experimental/voice/session`,
|
|
696
|
-
body: { model: input["model"], session: input["session"], transport: input["transport"] },
|
|
697
|
-
successStatus: 200,
|
|
698
|
-
declaredStatuses: [400, 401, 404, 503],
|
|
699
|
-
empty: false
|
|
700
|
-
}, requestOptions).then((value) => value.data)
|
|
701
|
-
},
|
|
702
971
|
provider: {
|
|
703
972
|
list: (input, requestOptions) => request({
|
|
704
973
|
method: "GET",
|
|
@@ -734,17 +1003,6 @@ function make3(options) {
|
|
|
734
1003
|
declaredStatuses: [400, 401, 404],
|
|
735
1004
|
empty: false
|
|
736
1005
|
}, requestOptions),
|
|
737
|
-
wellknown: {
|
|
738
|
-
add: (input, requestOptions) => request({
|
|
739
|
-
method: "POST",
|
|
740
|
-
path: `/api/experimental/integration/wellknown`,
|
|
741
|
-
query: { location: input["location"] },
|
|
742
|
-
body: { url: input["url"] },
|
|
743
|
-
successStatus: 204,
|
|
744
|
-
declaredStatuses: [400, 401, 404],
|
|
745
|
-
empty: true
|
|
746
|
-
}, requestOptions)
|
|
747
|
-
},
|
|
748
1006
|
connect: {
|
|
749
1007
|
key: (input, requestOptions) => request({
|
|
750
1008
|
method: "POST",
|
|
@@ -838,39 +1096,6 @@ function make3(options) {
|
|
|
838
1096
|
declaredStatuses: [400, 401, 404],
|
|
839
1097
|
empty: false
|
|
840
1098
|
}, requestOptions),
|
|
841
|
-
add: (input, requestOptions) => request({
|
|
842
|
-
method: "PUT",
|
|
843
|
-
path: `/api/experimental/mcp/${encodeURIComponent(input.server)}`,
|
|
844
|
-
query: { location: input["location"] },
|
|
845
|
-
body: { config: input["config"] },
|
|
846
|
-
successStatus: 204,
|
|
847
|
-
declaredStatuses: [400, 401, 404],
|
|
848
|
-
empty: true
|
|
849
|
-
}, requestOptions),
|
|
850
|
-
remove: (input, requestOptions) => request({
|
|
851
|
-
method: "DELETE",
|
|
852
|
-
path: `/api/experimental/mcp/${encodeURIComponent(input.server)}`,
|
|
853
|
-
query: { location: input["location"] },
|
|
854
|
-
successStatus: 204,
|
|
855
|
-
declaredStatuses: [400, 401, 404],
|
|
856
|
-
empty: true
|
|
857
|
-
}, requestOptions),
|
|
858
|
-
connect: (input, requestOptions) => request({
|
|
859
|
-
method: "POST",
|
|
860
|
-
path: `/api/experimental/mcp/${encodeURIComponent(input.server)}/connect`,
|
|
861
|
-
query: { location: input["location"] },
|
|
862
|
-
successStatus: 204,
|
|
863
|
-
declaredStatuses: [400, 401, 404],
|
|
864
|
-
empty: true
|
|
865
|
-
}, requestOptions),
|
|
866
|
-
disconnect: (input, requestOptions) => request({
|
|
867
|
-
method: "POST",
|
|
868
|
-
path: `/api/experimental/mcp/${encodeURIComponent(input.server)}/disconnect`,
|
|
869
|
-
query: { location: input["location"] },
|
|
870
|
-
successStatus: 204,
|
|
871
|
-
declaredStatuses: [400, 401, 404],
|
|
872
|
-
empty: true
|
|
873
|
-
}, requestOptions),
|
|
874
1099
|
resource: {
|
|
875
1100
|
catalog: (input, requestOptions) => request({
|
|
876
1101
|
method: "GET",
|
|
@@ -880,17 +1105,6 @@ function make3(options) {
|
|
|
880
1105
|
declaredStatuses: [400, 401, 404],
|
|
881
1106
|
empty: false
|
|
882
1107
|
}, requestOptions)
|
|
883
|
-
},
|
|
884
|
-
client: {
|
|
885
|
-
token: (input, requestOptions) => request({
|
|
886
|
-
method: "POST",
|
|
887
|
-
path: `/api/experimental/client-mcp/token`,
|
|
888
|
-
query: { location: input["location"], name: input["name"] },
|
|
889
|
-
headers: { "x-opencode-ticket": input["x-opencode-ticket"] },
|
|
890
|
-
successStatus: 200,
|
|
891
|
-
declaredStatuses: [400, 401, 403, 404],
|
|
892
|
-
empty: false
|
|
893
|
-
}, requestOptions)
|
|
894
1108
|
}
|
|
895
1109
|
},
|
|
896
1110
|
credential: {
|
|
@@ -1065,34 +1279,6 @@ function make3(options) {
|
|
|
1065
1279
|
successStatus: 200,
|
|
1066
1280
|
declaredStatuses: [400, 401, 404],
|
|
1067
1281
|
empty: false
|
|
1068
|
-
}, requestOptions),
|
|
1069
|
-
write: (input, requestOptions) => request({
|
|
1070
|
-
method: "POST",
|
|
1071
|
-
path: `/api/experimental/fs/write`,
|
|
1072
|
-
query: { location: input["location"], path: input["path"] },
|
|
1073
|
-
body: input["payload"],
|
|
1074
|
-
successStatus: 200,
|
|
1075
|
-
declaredStatuses: [400, 401, 404],
|
|
1076
|
-
empty: false,
|
|
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
|
|
1096
1282
|
}, requestOptions)
|
|
1097
1283
|
},
|
|
1098
1284
|
command: {
|
|
@@ -1197,101 +1383,6 @@ function make3(options) {
|
|
|
1197
1383
|
}, requestOptions)
|
|
1198
1384
|
}
|
|
1199
1385
|
},
|
|
1200
|
-
experimental: {
|
|
1201
|
-
persistentPty: {
|
|
1202
|
-
read: (input, requestOptions) => request({
|
|
1203
|
-
method: "GET",
|
|
1204
|
-
path: `/api/experimental/session/${encodeURIComponent(input.sessionID)}/terminal/read`,
|
|
1205
|
-
query: { lines: input["lines"] },
|
|
1206
|
-
successStatus: 200,
|
|
1207
|
-
declaredStatuses: [400, 401, 503],
|
|
1208
|
-
empty: false
|
|
1209
|
-
}, requestOptions).then((value) => value.data),
|
|
1210
|
-
list: (input, requestOptions) => request({
|
|
1211
|
-
method: "GET",
|
|
1212
|
-
path: `/api/experimental/session/${encodeURIComponent(input.sessionID)}/terminal`,
|
|
1213
|
-
successStatus: 200,
|
|
1214
|
-
declaredStatuses: [400, 401, 503],
|
|
1215
|
-
empty: false
|
|
1216
|
-
}, requestOptions).then((value) => value.data),
|
|
1217
|
-
create: (input, requestOptions) => request({
|
|
1218
|
-
method: "POST",
|
|
1219
|
-
path: `/api/experimental/session/${encodeURIComponent(input.sessionID)}/terminal`,
|
|
1220
|
-
body: {
|
|
1221
|
-
command: input["command"],
|
|
1222
|
-
args: input["args"],
|
|
1223
|
-
cwd: input["cwd"],
|
|
1224
|
-
title: input["title"],
|
|
1225
|
-
env: input["env"],
|
|
1226
|
-
size: input["size"]
|
|
1227
|
-
},
|
|
1228
|
-
successStatus: 200,
|
|
1229
|
-
declaredStatuses: [400, 401, 503],
|
|
1230
|
-
empty: false
|
|
1231
|
-
}, requestOptions).then((value) => value.data),
|
|
1232
|
-
shutdown: (requestOptions) => request({
|
|
1233
|
-
method: "POST",
|
|
1234
|
-
path: `/api/experimental/persistent-pty/shutdown`,
|
|
1235
|
-
successStatus: 204,
|
|
1236
|
-
declaredStatuses: [400, 401, 503],
|
|
1237
|
-
empty: true
|
|
1238
|
-
}, requestOptions),
|
|
1239
|
-
handoff: (requestOptions) => request({
|
|
1240
|
-
method: "POST",
|
|
1241
|
-
path: `/api/experimental/persistent-pty/handoff`,
|
|
1242
|
-
successStatus: 200,
|
|
1243
|
-
declaredStatuses: [400, 401, 503],
|
|
1244
|
-
empty: false
|
|
1245
|
-
}, requestOptions),
|
|
1246
|
-
get: (input, requestOptions) => request({
|
|
1247
|
-
method: "GET",
|
|
1248
|
-
path: `/api/experimental/persistent-pty/${encodeURIComponent(input.ptyID)}`,
|
|
1249
|
-
successStatus: 200,
|
|
1250
|
-
declaredStatuses: [400, 401, 404, 503],
|
|
1251
|
-
empty: false
|
|
1252
|
-
}, requestOptions).then((value) => value.data),
|
|
1253
|
-
update: (input, requestOptions) => request({
|
|
1254
|
-
method: "PUT",
|
|
1255
|
-
path: `/api/experimental/persistent-pty/${encodeURIComponent(input.ptyID)}`,
|
|
1256
|
-
body: { attachmentID: input["attachmentID"], size: input["size"] },
|
|
1257
|
-
successStatus: 200,
|
|
1258
|
-
declaredStatuses: [400, 401, 404, 503],
|
|
1259
|
-
empty: false
|
|
1260
|
-
}, requestOptions).then((value) => value.data),
|
|
1261
|
-
snapshot: (input, requestOptions) => request({
|
|
1262
|
-
method: "GET",
|
|
1263
|
-
path: `/api/experimental/persistent-pty/${encodeURIComponent(input.ptyID)}/snapshot`,
|
|
1264
|
-
successStatus: 200,
|
|
1265
|
-
declaredStatuses: [400, 401, 404, 503],
|
|
1266
|
-
empty: false
|
|
1267
|
-
}, requestOptions).then((value) => value.data),
|
|
1268
|
-
remove: (input, requestOptions) => request({
|
|
1269
|
-
method: "DELETE",
|
|
1270
|
-
path: `/api/experimental/persistent-pty/${encodeURIComponent(input.ptyID)}`,
|
|
1271
|
-
successStatus: 204,
|
|
1272
|
-
declaredStatuses: [400, 401, 404, 503],
|
|
1273
|
-
empty: true
|
|
1274
|
-
}, requestOptions),
|
|
1275
|
-
connectToken: (input, requestOptions) => request({
|
|
1276
|
-
method: "POST",
|
|
1277
|
-
path: `/api/experimental/persistent-pty/${encodeURIComponent(input.ptyID)}/connect-token`,
|
|
1278
|
-
headers: { "x-opencode-ticket": input["x-opencode-ticket"] },
|
|
1279
|
-
successStatus: 200,
|
|
1280
|
-
declaredStatuses: [400, 401, 403, 404, 503],
|
|
1281
|
-
empty: false
|
|
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)
|
|
1293
|
-
}
|
|
1294
|
-
},
|
|
1295
1386
|
shell: {
|
|
1296
1387
|
list: (input, requestOptions) => request({
|
|
1297
1388
|
method: "GET",
|
|
@@ -1475,17 +1566,6 @@ function make3(options) {
|
|
|
1475
1566
|
}, requestOptions)
|
|
1476
1567
|
}
|
|
1477
1568
|
},
|
|
1478
|
-
migration: {
|
|
1479
|
-
v1: {
|
|
1480
|
-
status: (requestOptions) => request({
|
|
1481
|
-
method: "GET",
|
|
1482
|
-
path: `/api/experimental/migration/v1`,
|
|
1483
|
-
successStatus: 200,
|
|
1484
|
-
declaredStatuses: [400, 401],
|
|
1485
|
-
empty: false
|
|
1486
|
-
}, requestOptions)
|
|
1487
|
-
}
|
|
1488
|
-
},
|
|
1489
1569
|
websearch: {
|
|
1490
1570
|
providers: (input, requestOptions) => request({
|
|
1491
1571
|
method: "GET",
|
|
@@ -1505,16 +1585,6 @@ function make3(options) {
|
|
|
1505
1585
|
empty: false
|
|
1506
1586
|
}, requestOptions)
|
|
1507
1587
|
},
|
|
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
|
-
},
|
|
1518
1588
|
config: {
|
|
1519
1589
|
get: (input, requestOptions) => request({
|
|
1520
1590
|
method: "GET",
|
|
@@ -1530,17 +1600,71 @@ function make3(options) {
|
|
|
1530
1600
|
successStatus: 200,
|
|
1531
1601
|
declaredStatuses: [400, 401, 404],
|
|
1532
1602
|
empty: false
|
|
1533
|
-
}, requestOptions),
|
|
1534
|
-
update: (input, requestOptions) => request({
|
|
1535
|
-
method: "PATCH",
|
|
1536
|
-
path: `/api/experimental/config`,
|
|
1537
|
-
body: { shell: input["shell"] },
|
|
1538
|
-
successStatus: 204,
|
|
1539
|
-
declaredStatuses: [400, 401, 404],
|
|
1540
|
-
empty: true
|
|
1541
1603
|
}, requestOptions)
|
|
1542
1604
|
}
|
|
1543
1605
|
};
|
|
1606
|
+
return {
|
|
1607
|
+
...client,
|
|
1608
|
+
session: {
|
|
1609
|
+
...client.session,
|
|
1610
|
+
stats: client.experimental.session.stats,
|
|
1611
|
+
import: client.experimental.session.import,
|
|
1612
|
+
export: client.experimental.session.export,
|
|
1613
|
+
skill: client.experimental.session.skill,
|
|
1614
|
+
wait: client.experimental.session.wait,
|
|
1615
|
+
instructions: {
|
|
1616
|
+
entry: {
|
|
1617
|
+
list: client.experimental.session.instructions.entry.list,
|
|
1618
|
+
put: client.experimental.session.instructions.entry.put,
|
|
1619
|
+
remove: client.experimental.session.instructions.entry.remove
|
|
1620
|
+
}
|
|
1621
|
+
},
|
|
1622
|
+
log: client.experimental.session.log
|
|
1623
|
+
},
|
|
1624
|
+
generate: {
|
|
1625
|
+
text: client.experimental.generate.text,
|
|
1626
|
+
image: client.experimental.generate.image,
|
|
1627
|
+
decisions: client.experimental.generate.decisions
|
|
1628
|
+
},
|
|
1629
|
+
voice: {
|
|
1630
|
+
models: client.experimental.voice.models,
|
|
1631
|
+
session: client.experimental.voice.session
|
|
1632
|
+
},
|
|
1633
|
+
integration: {
|
|
1634
|
+
...client.integration,
|
|
1635
|
+
wellknown: {
|
|
1636
|
+
add: client.experimental.integration.wellknown.add
|
|
1637
|
+
}
|
|
1638
|
+
},
|
|
1639
|
+
mcp: {
|
|
1640
|
+
...client.mcp,
|
|
1641
|
+
add: client.experimental.mcp.add,
|
|
1642
|
+
remove: client.experimental.mcp.remove,
|
|
1643
|
+
connect: client.experimental.mcp.connect,
|
|
1644
|
+
disconnect: client.experimental.mcp.disconnect,
|
|
1645
|
+
client: {
|
|
1646
|
+
token: client.experimental.mcp.client.token
|
|
1647
|
+
}
|
|
1648
|
+
},
|
|
1649
|
+
file: {
|
|
1650
|
+
...client.file,
|
|
1651
|
+
write: client.experimental.file.write,
|
|
1652
|
+
watch: client.experimental.file.watch,
|
|
1653
|
+
unwatch: client.experimental.file.unwatch
|
|
1654
|
+
},
|
|
1655
|
+
migration: {
|
|
1656
|
+
v1: {
|
|
1657
|
+
status: client.experimental.migration.v1.status
|
|
1658
|
+
}
|
|
1659
|
+
},
|
|
1660
|
+
usage: {
|
|
1661
|
+
limits: client.experimental.usage.limits
|
|
1662
|
+
},
|
|
1663
|
+
config: {
|
|
1664
|
+
...client.config,
|
|
1665
|
+
update: client.experimental.config.update
|
|
1666
|
+
}
|
|
1667
|
+
};
|
|
1544
1668
|
}
|
|
1545
1669
|
function encodePath(value) {
|
|
1546
1670
|
return value.split("/").map(encodeURIComponent).join("/");
|
|
@@ -1569,20 +1693,20 @@ async function json(response) {
|
|
|
1569
1693
|
try {
|
|
1570
1694
|
await response.body?.cancel();
|
|
1571
1695
|
} catch {}
|
|
1572
|
-
throw new
|
|
1696
|
+
throw new ClientError3("UnsupportedContentType", { detail: response.headers.get("content-type") });
|
|
1573
1697
|
}
|
|
1574
1698
|
let text;
|
|
1575
1699
|
try {
|
|
1576
1700
|
text = await response.text();
|
|
1577
1701
|
} catch (cause) {
|
|
1578
|
-
throw new
|
|
1702
|
+
throw new ClientError3("Transport", { cause });
|
|
1579
1703
|
}
|
|
1580
1704
|
if (text === "")
|
|
1581
|
-
throw new
|
|
1705
|
+
throw new ClientError3("MalformedResponse");
|
|
1582
1706
|
try {
|
|
1583
1707
|
return JSON.parse(text);
|
|
1584
1708
|
} catch (cause) {
|
|
1585
|
-
throw new
|
|
1709
|
+
throw new ClientError3("MalformedResponse", { cause });
|
|
1586
1710
|
}
|
|
1587
1711
|
}
|
|
1588
1712
|
function declared(body) {
|
|
@@ -1595,4 +1719,4 @@ function isContentType(response, expected) {
|
|
|
1595
1719
|
return response.headers.get("content-type")?.split(";", 1)[0]?.trim().toLowerCase() === expected;
|
|
1596
1720
|
}
|
|
1597
1721
|
|
|
1598
|
-
export {
|
|
1722
|
+
export { make6, exports_client4 };
|