@opencode-ai/sdk 1.1.24 → 1.1.25
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/v2/gen/sdk.gen.d.ts +119 -111
- package/dist/v2/gen/sdk.gen.js +185 -172
- package/dist/v2/gen/types.gen.d.ts +313 -308
- package/package.json +1 -1
package/dist/v2/gen/sdk.gen.js
CHANGED
|
@@ -331,36 +331,6 @@ export class Tool extends HeyApiClient {
|
|
|
331
331
|
});
|
|
332
332
|
}
|
|
333
333
|
}
|
|
334
|
-
export class Instance extends HeyApiClient {
|
|
335
|
-
/**
|
|
336
|
-
* Dispose instance
|
|
337
|
-
*
|
|
338
|
-
* Clean up and dispose the current OpenCode instance, releasing all resources.
|
|
339
|
-
*/
|
|
340
|
-
dispose(parameters, options) {
|
|
341
|
-
const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
|
|
342
|
-
return (options?.client ?? this.client).post({
|
|
343
|
-
url: "/instance/dispose",
|
|
344
|
-
...options,
|
|
345
|
-
...params,
|
|
346
|
-
});
|
|
347
|
-
}
|
|
348
|
-
}
|
|
349
|
-
export class Path extends HeyApiClient {
|
|
350
|
-
/**
|
|
351
|
-
* Get paths
|
|
352
|
-
*
|
|
353
|
-
* Retrieve the current working directory and related path information for the OpenCode instance.
|
|
354
|
-
*/
|
|
355
|
-
get(parameters, options) {
|
|
356
|
-
const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
|
|
357
|
-
return (options?.client ?? this.client).get({
|
|
358
|
-
url: "/path",
|
|
359
|
-
...options,
|
|
360
|
-
...params,
|
|
361
|
-
});
|
|
362
|
-
}
|
|
363
|
-
}
|
|
364
334
|
export class Worktree extends HeyApiClient {
|
|
365
335
|
/**
|
|
366
336
|
* List worktrees
|
|
@@ -401,21 +371,27 @@ export class Worktree extends HeyApiClient {
|
|
|
401
371
|
});
|
|
402
372
|
}
|
|
403
373
|
}
|
|
404
|
-
export class
|
|
374
|
+
export class Resource extends HeyApiClient {
|
|
405
375
|
/**
|
|
406
|
-
* Get
|
|
376
|
+
* Get MCP resources
|
|
407
377
|
*
|
|
408
|
-
*
|
|
378
|
+
* Get all available MCP resources from connected servers. Optionally filter by name.
|
|
409
379
|
*/
|
|
410
|
-
|
|
380
|
+
list(parameters, options) {
|
|
411
381
|
const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
|
|
412
382
|
return (options?.client ?? this.client).get({
|
|
413
|
-
url: "/
|
|
383
|
+
url: "/experimental/resource",
|
|
414
384
|
...options,
|
|
415
385
|
...params,
|
|
416
386
|
});
|
|
417
387
|
}
|
|
418
388
|
}
|
|
389
|
+
export class Experimental extends HeyApiClient {
|
|
390
|
+
_resource;
|
|
391
|
+
get resource() {
|
|
392
|
+
return (this._resource ??= new Resource({ client: this.client }));
|
|
393
|
+
}
|
|
394
|
+
}
|
|
419
395
|
export class Session extends HeyApiClient {
|
|
420
396
|
/**
|
|
421
397
|
* List sessions
|
|
@@ -702,9 +678,9 @@ export class Session extends HeyApiClient {
|
|
|
702
678
|
});
|
|
703
679
|
}
|
|
704
680
|
/**
|
|
705
|
-
* Get
|
|
681
|
+
* Get message diff
|
|
706
682
|
*
|
|
707
|
-
* Get
|
|
683
|
+
* Get the file changes (diff) that resulted from a specific user message in the session.
|
|
708
684
|
*/
|
|
709
685
|
diff(parameters, options) {
|
|
710
686
|
const params = buildClientParams([parameters], [
|
|
@@ -1146,21 +1122,6 @@ export class Question extends HeyApiClient {
|
|
|
1146
1122
|
});
|
|
1147
1123
|
}
|
|
1148
1124
|
}
|
|
1149
|
-
export class Command extends HeyApiClient {
|
|
1150
|
-
/**
|
|
1151
|
-
* List commands
|
|
1152
|
-
*
|
|
1153
|
-
* Get a list of all available commands in the OpenCode system.
|
|
1154
|
-
*/
|
|
1155
|
-
list(parameters, options) {
|
|
1156
|
-
const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
|
|
1157
|
-
return (options?.client ?? this.client).get({
|
|
1158
|
-
url: "/command",
|
|
1159
|
-
...options,
|
|
1160
|
-
...params,
|
|
1161
|
-
});
|
|
1162
|
-
}
|
|
1163
|
-
}
|
|
1164
1125
|
export class Oauth extends HeyApiClient {
|
|
1165
1126
|
/**
|
|
1166
1127
|
* OAuth authorize
|
|
@@ -1368,49 +1329,6 @@ export class File extends HeyApiClient {
|
|
|
1368
1329
|
});
|
|
1369
1330
|
}
|
|
1370
1331
|
}
|
|
1371
|
-
export class App extends HeyApiClient {
|
|
1372
|
-
/**
|
|
1373
|
-
* Write log
|
|
1374
|
-
*
|
|
1375
|
-
* Write a log entry to the server logs with specified level and metadata.
|
|
1376
|
-
*/
|
|
1377
|
-
log(parameters, options) {
|
|
1378
|
-
const params = buildClientParams([parameters], [
|
|
1379
|
-
{
|
|
1380
|
-
args: [
|
|
1381
|
-
{ in: "query", key: "directory" },
|
|
1382
|
-
{ in: "body", key: "service" },
|
|
1383
|
-
{ in: "body", key: "level" },
|
|
1384
|
-
{ in: "body", key: "message" },
|
|
1385
|
-
{ in: "body", key: "extra" },
|
|
1386
|
-
],
|
|
1387
|
-
},
|
|
1388
|
-
]);
|
|
1389
|
-
return (options?.client ?? this.client).post({
|
|
1390
|
-
url: "/log",
|
|
1391
|
-
...options,
|
|
1392
|
-
...params,
|
|
1393
|
-
headers: {
|
|
1394
|
-
"Content-Type": "application/json",
|
|
1395
|
-
...options?.headers,
|
|
1396
|
-
...params.headers,
|
|
1397
|
-
},
|
|
1398
|
-
});
|
|
1399
|
-
}
|
|
1400
|
-
/**
|
|
1401
|
-
* List agents
|
|
1402
|
-
*
|
|
1403
|
-
* Get a list of all available AI agents in the OpenCode system.
|
|
1404
|
-
*/
|
|
1405
|
-
agents(parameters, options) {
|
|
1406
|
-
const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
|
|
1407
|
-
return (options?.client ?? this.client).get({
|
|
1408
|
-
url: "/agent",
|
|
1409
|
-
...options,
|
|
1410
|
-
...params,
|
|
1411
|
-
});
|
|
1412
|
-
}
|
|
1413
|
-
}
|
|
1414
1332
|
export class Auth extends HeyApiClient {
|
|
1415
1333
|
/**
|
|
1416
1334
|
* Remove MCP OAuth
|
|
@@ -1580,57 +1498,6 @@ export class Mcp extends HeyApiClient {
|
|
|
1580
1498
|
return (this._auth ??= new Auth({ client: this.client }));
|
|
1581
1499
|
}
|
|
1582
1500
|
}
|
|
1583
|
-
export class Resource extends HeyApiClient {
|
|
1584
|
-
/**
|
|
1585
|
-
* Get MCP resources
|
|
1586
|
-
*
|
|
1587
|
-
* Get all available MCP resources from connected servers. Optionally filter by name.
|
|
1588
|
-
*/
|
|
1589
|
-
list(parameters, options) {
|
|
1590
|
-
const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
|
|
1591
|
-
return (options?.client ?? this.client).get({
|
|
1592
|
-
url: "/experimental/resource",
|
|
1593
|
-
...options,
|
|
1594
|
-
...params,
|
|
1595
|
-
});
|
|
1596
|
-
}
|
|
1597
|
-
}
|
|
1598
|
-
export class Experimental extends HeyApiClient {
|
|
1599
|
-
_resource;
|
|
1600
|
-
get resource() {
|
|
1601
|
-
return (this._resource ??= new Resource({ client: this.client }));
|
|
1602
|
-
}
|
|
1603
|
-
}
|
|
1604
|
-
export class Lsp extends HeyApiClient {
|
|
1605
|
-
/**
|
|
1606
|
-
* Get LSP status
|
|
1607
|
-
*
|
|
1608
|
-
* Get LSP server status
|
|
1609
|
-
*/
|
|
1610
|
-
status(parameters, options) {
|
|
1611
|
-
const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
|
|
1612
|
-
return (options?.client ?? this.client).get({
|
|
1613
|
-
url: "/lsp",
|
|
1614
|
-
...options,
|
|
1615
|
-
...params,
|
|
1616
|
-
});
|
|
1617
|
-
}
|
|
1618
|
-
}
|
|
1619
|
-
export class Formatter extends HeyApiClient {
|
|
1620
|
-
/**
|
|
1621
|
-
* Get formatter status
|
|
1622
|
-
*
|
|
1623
|
-
* Get formatter status
|
|
1624
|
-
*/
|
|
1625
|
-
status(parameters, options) {
|
|
1626
|
-
const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
|
|
1627
|
-
return (options?.client ?? this.client).get({
|
|
1628
|
-
url: "/formatter",
|
|
1629
|
-
...options,
|
|
1630
|
-
...params,
|
|
1631
|
-
});
|
|
1632
|
-
}
|
|
1633
|
-
}
|
|
1634
1501
|
export class Control extends HeyApiClient {
|
|
1635
1502
|
/**
|
|
1636
1503
|
* Get next TUI request
|
|
@@ -1869,6 +1736,152 @@ export class Tui extends HeyApiClient {
|
|
|
1869
1736
|
return (this._control ??= new Control({ client: this.client }));
|
|
1870
1737
|
}
|
|
1871
1738
|
}
|
|
1739
|
+
export class Instance extends HeyApiClient {
|
|
1740
|
+
/**
|
|
1741
|
+
* Dispose instance
|
|
1742
|
+
*
|
|
1743
|
+
* Clean up and dispose the current OpenCode instance, releasing all resources.
|
|
1744
|
+
*/
|
|
1745
|
+
dispose(parameters, options) {
|
|
1746
|
+
const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
|
|
1747
|
+
return (options?.client ?? this.client).post({
|
|
1748
|
+
url: "/instance/dispose",
|
|
1749
|
+
...options,
|
|
1750
|
+
...params,
|
|
1751
|
+
});
|
|
1752
|
+
}
|
|
1753
|
+
}
|
|
1754
|
+
export class Path extends HeyApiClient {
|
|
1755
|
+
/**
|
|
1756
|
+
* Get paths
|
|
1757
|
+
*
|
|
1758
|
+
* Retrieve the current working directory and related path information for the OpenCode instance.
|
|
1759
|
+
*/
|
|
1760
|
+
get(parameters, options) {
|
|
1761
|
+
const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
|
|
1762
|
+
return (options?.client ?? this.client).get({
|
|
1763
|
+
url: "/path",
|
|
1764
|
+
...options,
|
|
1765
|
+
...params,
|
|
1766
|
+
});
|
|
1767
|
+
}
|
|
1768
|
+
}
|
|
1769
|
+
export class Vcs extends HeyApiClient {
|
|
1770
|
+
/**
|
|
1771
|
+
* Get VCS info
|
|
1772
|
+
*
|
|
1773
|
+
* Retrieve version control system (VCS) information for the current project, such as git branch.
|
|
1774
|
+
*/
|
|
1775
|
+
get(parameters, options) {
|
|
1776
|
+
const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
|
|
1777
|
+
return (options?.client ?? this.client).get({
|
|
1778
|
+
url: "/vcs",
|
|
1779
|
+
...options,
|
|
1780
|
+
...params,
|
|
1781
|
+
});
|
|
1782
|
+
}
|
|
1783
|
+
}
|
|
1784
|
+
export class Command extends HeyApiClient {
|
|
1785
|
+
/**
|
|
1786
|
+
* List commands
|
|
1787
|
+
*
|
|
1788
|
+
* Get a list of all available commands in the OpenCode system.
|
|
1789
|
+
*/
|
|
1790
|
+
list(parameters, options) {
|
|
1791
|
+
const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
|
|
1792
|
+
return (options?.client ?? this.client).get({
|
|
1793
|
+
url: "/command",
|
|
1794
|
+
...options,
|
|
1795
|
+
...params,
|
|
1796
|
+
});
|
|
1797
|
+
}
|
|
1798
|
+
}
|
|
1799
|
+
export class App extends HeyApiClient {
|
|
1800
|
+
/**
|
|
1801
|
+
* Write log
|
|
1802
|
+
*
|
|
1803
|
+
* Write a log entry to the server logs with specified level and metadata.
|
|
1804
|
+
*/
|
|
1805
|
+
log(parameters, options) {
|
|
1806
|
+
const params = buildClientParams([parameters], [
|
|
1807
|
+
{
|
|
1808
|
+
args: [
|
|
1809
|
+
{ in: "query", key: "directory" },
|
|
1810
|
+
{ in: "body", key: "service" },
|
|
1811
|
+
{ in: "body", key: "level" },
|
|
1812
|
+
{ in: "body", key: "message" },
|
|
1813
|
+
{ in: "body", key: "extra" },
|
|
1814
|
+
],
|
|
1815
|
+
},
|
|
1816
|
+
]);
|
|
1817
|
+
return (options?.client ?? this.client).post({
|
|
1818
|
+
url: "/log",
|
|
1819
|
+
...options,
|
|
1820
|
+
...params,
|
|
1821
|
+
headers: {
|
|
1822
|
+
"Content-Type": "application/json",
|
|
1823
|
+
...options?.headers,
|
|
1824
|
+
...params.headers,
|
|
1825
|
+
},
|
|
1826
|
+
});
|
|
1827
|
+
}
|
|
1828
|
+
/**
|
|
1829
|
+
* List agents
|
|
1830
|
+
*
|
|
1831
|
+
* Get a list of all available AI agents in the OpenCode system.
|
|
1832
|
+
*/
|
|
1833
|
+
agents(parameters, options) {
|
|
1834
|
+
const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
|
|
1835
|
+
return (options?.client ?? this.client).get({
|
|
1836
|
+
url: "/agent",
|
|
1837
|
+
...options,
|
|
1838
|
+
...params,
|
|
1839
|
+
});
|
|
1840
|
+
}
|
|
1841
|
+
/**
|
|
1842
|
+
* List skills
|
|
1843
|
+
*
|
|
1844
|
+
* Get a list of all available skills in the OpenCode system.
|
|
1845
|
+
*/
|
|
1846
|
+
skills(parameters, options) {
|
|
1847
|
+
const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
|
|
1848
|
+
return (options?.client ?? this.client).get({
|
|
1849
|
+
url: "/skill",
|
|
1850
|
+
...options,
|
|
1851
|
+
...params,
|
|
1852
|
+
});
|
|
1853
|
+
}
|
|
1854
|
+
}
|
|
1855
|
+
export class Lsp extends HeyApiClient {
|
|
1856
|
+
/**
|
|
1857
|
+
* Get LSP status
|
|
1858
|
+
*
|
|
1859
|
+
* Get LSP server status
|
|
1860
|
+
*/
|
|
1861
|
+
status(parameters, options) {
|
|
1862
|
+
const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
|
|
1863
|
+
return (options?.client ?? this.client).get({
|
|
1864
|
+
url: "/lsp",
|
|
1865
|
+
...options,
|
|
1866
|
+
...params,
|
|
1867
|
+
});
|
|
1868
|
+
}
|
|
1869
|
+
}
|
|
1870
|
+
export class Formatter extends HeyApiClient {
|
|
1871
|
+
/**
|
|
1872
|
+
* Get formatter status
|
|
1873
|
+
*
|
|
1874
|
+
* Get formatter status
|
|
1875
|
+
*/
|
|
1876
|
+
status(parameters, options) {
|
|
1877
|
+
const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
|
|
1878
|
+
return (options?.client ?? this.client).get({
|
|
1879
|
+
url: "/formatter",
|
|
1880
|
+
...options,
|
|
1881
|
+
...params,
|
|
1882
|
+
});
|
|
1883
|
+
}
|
|
1884
|
+
}
|
|
1872
1885
|
export class Auth2 extends HeyApiClient {
|
|
1873
1886
|
/**
|
|
1874
1887
|
* Set auth credentials
|
|
@@ -1938,21 +1951,13 @@ export class OpencodeClient extends HeyApiClient {
|
|
|
1938
1951
|
get tool() {
|
|
1939
1952
|
return (this._tool ??= new Tool({ client: this.client }));
|
|
1940
1953
|
}
|
|
1941
|
-
_instance;
|
|
1942
|
-
get instance() {
|
|
1943
|
-
return (this._instance ??= new Instance({ client: this.client }));
|
|
1944
|
-
}
|
|
1945
|
-
_path;
|
|
1946
|
-
get path() {
|
|
1947
|
-
return (this._path ??= new Path({ client: this.client }));
|
|
1948
|
-
}
|
|
1949
1954
|
_worktree;
|
|
1950
1955
|
get worktree() {
|
|
1951
1956
|
return (this._worktree ??= new Worktree({ client: this.client }));
|
|
1952
1957
|
}
|
|
1953
|
-
|
|
1954
|
-
get
|
|
1955
|
-
return (this.
|
|
1958
|
+
_experimental;
|
|
1959
|
+
get experimental() {
|
|
1960
|
+
return (this._experimental ??= new Experimental({ client: this.client }));
|
|
1956
1961
|
}
|
|
1957
1962
|
_session;
|
|
1958
1963
|
get session() {
|
|
@@ -1970,10 +1975,6 @@ export class OpencodeClient extends HeyApiClient {
|
|
|
1970
1975
|
get question() {
|
|
1971
1976
|
return (this._question ??= new Question({ client: this.client }));
|
|
1972
1977
|
}
|
|
1973
|
-
_command;
|
|
1974
|
-
get command() {
|
|
1975
|
-
return (this._command ??= new Command({ client: this.client }));
|
|
1976
|
-
}
|
|
1977
1978
|
_provider;
|
|
1978
1979
|
get provider() {
|
|
1979
1980
|
return (this._provider ??= new Provider({ client: this.client }));
|
|
@@ -1986,17 +1987,33 @@ export class OpencodeClient extends HeyApiClient {
|
|
|
1986
1987
|
get file() {
|
|
1987
1988
|
return (this._file ??= new File({ client: this.client }));
|
|
1988
1989
|
}
|
|
1989
|
-
_app;
|
|
1990
|
-
get app() {
|
|
1991
|
-
return (this._app ??= new App({ client: this.client }));
|
|
1992
|
-
}
|
|
1993
1990
|
_mcp;
|
|
1994
1991
|
get mcp() {
|
|
1995
1992
|
return (this._mcp ??= new Mcp({ client: this.client }));
|
|
1996
1993
|
}
|
|
1997
|
-
|
|
1998
|
-
get
|
|
1999
|
-
return (this.
|
|
1994
|
+
_tui;
|
|
1995
|
+
get tui() {
|
|
1996
|
+
return (this._tui ??= new Tui({ client: this.client }));
|
|
1997
|
+
}
|
|
1998
|
+
_instance;
|
|
1999
|
+
get instance() {
|
|
2000
|
+
return (this._instance ??= new Instance({ client: this.client }));
|
|
2001
|
+
}
|
|
2002
|
+
_path;
|
|
2003
|
+
get path() {
|
|
2004
|
+
return (this._path ??= new Path({ client: this.client }));
|
|
2005
|
+
}
|
|
2006
|
+
_vcs;
|
|
2007
|
+
get vcs() {
|
|
2008
|
+
return (this._vcs ??= new Vcs({ client: this.client }));
|
|
2009
|
+
}
|
|
2010
|
+
_command;
|
|
2011
|
+
get command() {
|
|
2012
|
+
return (this._command ??= new Command({ client: this.client }));
|
|
2013
|
+
}
|
|
2014
|
+
_app;
|
|
2015
|
+
get app() {
|
|
2016
|
+
return (this._app ??= new App({ client: this.client }));
|
|
2000
2017
|
}
|
|
2001
2018
|
_lsp;
|
|
2002
2019
|
get lsp() {
|
|
@@ -2006,10 +2023,6 @@ export class OpencodeClient extends HeyApiClient {
|
|
|
2006
2023
|
get formatter() {
|
|
2007
2024
|
return (this._formatter ??= new Formatter({ client: this.client }));
|
|
2008
2025
|
}
|
|
2009
|
-
_tui;
|
|
2010
|
-
get tui() {
|
|
2011
|
-
return (this._tui ??= new Tui({ client: this.client }));
|
|
2012
|
-
}
|
|
2013
2026
|
_auth;
|
|
2014
2027
|
get auth() {
|
|
2015
2028
|
return (this._auth ??= new Auth2({ client: this.client }));
|