@opencode-ai/sdk 0.1.0-alpha.1 → 0.1.0-alpha.11
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/CHANGELOG.md +87 -0
- package/LICENSE +198 -4
- package/README.md +20 -6
- package/client.d.mts +15 -56
- package/client.d.mts.map +1 -1
- package/client.d.ts +15 -56
- package/client.d.ts.map +1 -1
- package/client.js +14 -67
- package/client.js.map +1 -1
- package/client.mjs +14 -67
- package/client.mjs.map +1 -1
- package/core/streaming.d.mts +31 -0
- package/core/streaming.d.mts.map +1 -0
- package/core/streaming.d.ts +31 -0
- package/core/streaming.d.ts.map +1 -0
- package/core/streaming.js +257 -0
- package/core/streaming.js.map +1 -0
- package/core/streaming.mjs +252 -0
- package/core/streaming.mjs.map +1 -0
- package/internal/decoders/line.d.mts +17 -0
- package/internal/decoders/line.d.mts.map +1 -0
- package/internal/decoders/line.d.ts +17 -0
- package/internal/decoders/line.d.ts.map +1 -0
- package/internal/decoders/line.js +113 -0
- package/internal/decoders/line.js.map +1 -0
- package/internal/decoders/line.mjs +108 -0
- package/internal/decoders/line.mjs.map +1 -0
- package/internal/parse.d.mts.map +1 -1
- package/internal/parse.d.ts.map +1 -1
- package/internal/parse.js +10 -0
- package/internal/parse.js.map +1 -1
- package/internal/parse.mjs +10 -0
- package/internal/parse.mjs.map +1 -1
- package/internal/request-options.d.mts +2 -0
- package/internal/request-options.d.mts.map +1 -1
- package/internal/request-options.d.ts +2 -0
- package/internal/request-options.d.ts.map +1 -1
- package/internal/request-options.js.map +1 -1
- package/internal/request-options.mjs.map +1 -1
- package/internal/tslib.js +6 -6
- package/internal/types.d.mts +8 -6
- package/internal/types.d.mts.map +1 -1
- package/internal/types.d.ts +8 -6
- package/internal/types.d.ts.map +1 -1
- package/internal/uploads.js +1 -1
- package/internal/uploads.js.map +1 -1
- package/internal/uploads.mjs +1 -1
- package/internal/uploads.mjs.map +1 -1
- package/internal/utils/log.js +1 -1
- package/internal/utils/log.js.map +1 -1
- package/internal/utils/log.mjs +1 -1
- package/internal/utils/log.mjs.map +1 -1
- package/internal/utils/path.d.mts.map +1 -1
- package/internal/utils/path.d.ts.map +1 -1
- package/internal/utils/path.js +26 -5
- package/internal/utils/path.js.map +1 -1
- package/internal/utils/path.mjs +26 -5
- package/internal/utils/path.mjs.map +1 -1
- package/package.json +13 -3
- package/resources/app.d.mts +37 -0
- package/resources/app.d.mts.map +1 -0
- package/resources/app.d.ts +37 -0
- package/resources/app.d.ts.map +1 -0
- package/resources/app.js +21 -0
- package/resources/app.js.map +1 -0
- package/resources/app.mjs +17 -0
- package/resources/app.mjs.map +1 -0
- package/resources/config.d.mts +314 -0
- package/resources/config.d.mts.map +1 -0
- package/resources/config.d.ts +314 -0
- package/resources/config.d.ts.map +1 -0
- package/resources/config.js +21 -0
- package/resources/config.js.map +1 -0
- package/resources/config.mjs +17 -0
- package/resources/config.mjs.map +1 -0
- package/resources/event.d.mts +61 -27
- package/resources/event.d.mts.map +1 -1
- package/resources/event.d.ts +61 -27
- package/resources/event.d.ts.map +1 -1
- package/resources/event.js +1 -1
- package/resources/event.js.map +1 -1
- package/resources/event.mjs +1 -1
- package/resources/event.mjs.map +1 -1
- package/resources/file.d.mts +17 -0
- package/resources/file.d.mts.map +1 -0
- package/resources/file.d.ts +17 -0
- package/resources/file.d.ts.map +1 -0
- package/resources/{file-search.js → file.js} +6 -6
- package/resources/file.js.map +1 -0
- package/resources/{file-search.mjs → file.mjs} +4 -4
- package/resources/file.mjs.map +1 -0
- package/resources/index.d.mts +5 -16
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +5 -16
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +11 -33
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +5 -16
- package/resources/index.mjs.map +1 -1
- package/resources/session.d.mts +207 -0
- package/resources/session.d.mts.map +1 -0
- package/resources/session.d.ts +207 -0
- package/resources/session.d.ts.map +1 -0
- package/resources/session.js +70 -0
- package/resources/session.js.map +1 -0
- package/resources/session.mjs +66 -0
- package/resources/session.mjs.map +1 -0
- package/resources/shared.d.mts +20 -0
- package/resources/shared.d.mts.map +1 -0
- package/resources/shared.d.ts +20 -0
- package/resources/shared.d.ts.map +1 -0
- package/resources/shared.js +4 -0
- package/resources/shared.js.map +1 -0
- package/resources/shared.mjs +3 -0
- package/resources/shared.mjs.map +1 -0
- package/src/client.ts +79 -156
- package/src/core/streaming.ts +301 -0
- package/src/internal/decoders/line.ts +135 -0
- package/src/internal/parse.ts +14 -0
- package/src/internal/request-options.ts +2 -0
- package/src/internal/types.ts +9 -6
- package/src/internal/uploads.ts +1 -1
- package/src/internal/utils/log.ts +1 -1
- package/src/internal/utils/path.ts +32 -7
- package/src/resources/app.ts +57 -0
- package/src/resources/config.ts +404 -0
- package/src/resources/event.ts +84 -36
- package/src/resources/file.ts +24 -0
- package/src/resources/index.ts +35 -33
- package/src/resources/session.ts +355 -0
- package/src/resources/shared.ts +27 -0
- package/src/streaming.ts +2 -0
- package/src/version.ts +1 -1
- package/streaming.d.mts +2 -0
- package/streaming.d.mts.map +1 -0
- package/streaming.d.ts +2 -0
- package/streaming.d.ts.map +1 -0
- package/streaming.js +6 -0
- package/streaming.js.map +1 -0
- package/streaming.mjs +2 -0
- package/streaming.mjs.map +1 -0
- package/version.d.mts +1 -1
- package/version.d.mts.map +1 -1
- package/version.d.ts +1 -1
- package/version.d.ts.map +1 -1
- package/version.js +1 -1
- package/version.js.map +1 -1
- package/version.mjs +1 -1
- package/version.mjs.map +1 -1
- package/resources/app-info.d.mts +0 -31
- package/resources/app-info.d.mts.map +0 -1
- package/resources/app-info.d.ts +0 -31
- package/resources/app-info.d.ts.map +0 -1
- package/resources/app-info.js +0 -15
- package/resources/app-info.js.map +0 -1
- package/resources/app-info.mjs +0 -11
- package/resources/app-info.mjs.map +0 -1
- package/resources/app-initialize.d.mts +0 -14
- package/resources/app-initialize.d.mts.map +0 -1
- package/resources/app-initialize.d.ts +0 -14
- package/resources/app-initialize.d.ts.map +0 -1
- package/resources/app-initialize.js +0 -15
- package/resources/app-initialize.js.map +0 -1
- package/resources/app-initialize.mjs +0 -11
- package/resources/app-initialize.mjs.map +0 -1
- package/resources/config-get.d.mts +0 -236
- package/resources/config-get.d.mts.map +0 -1
- package/resources/config-get.d.ts +0 -236
- package/resources/config-get.d.ts.map +0 -1
- package/resources/config-get.js +0 -15
- package/resources/config-get.js.map +0 -1
- package/resources/config-get.mjs +0 -11
- package/resources/config-get.mjs.map +0 -1
- package/resources/file-search.d.mts +0 -17
- package/resources/file-search.d.mts.map +0 -1
- package/resources/file-search.d.ts +0 -17
- package/resources/file-search.d.ts.map +0 -1
- package/resources/file-search.js.map +0 -1
- package/resources/file-search.mjs.map +0 -1
- package/resources/installation-info.d.mts +0 -17
- package/resources/installation-info.d.mts.map +0 -1
- package/resources/installation-info.d.ts +0 -17
- package/resources/installation-info.d.ts.map +0 -1
- package/resources/installation-info.js +0 -15
- package/resources/installation-info.js.map +0 -1
- package/resources/installation-info.mjs +0 -11
- package/resources/installation-info.mjs.map +0 -1
- package/resources/path-get.d.mts +0 -19
- package/resources/path-get.d.mts.map +0 -1
- package/resources/path-get.d.ts +0 -19
- package/resources/path-get.d.ts.map +0 -1
- package/resources/path-get.js +0 -15
- package/resources/path-get.js.map +0 -1
- package/resources/path-get.mjs +0 -11
- package/resources/path-get.mjs.map +0 -1
- package/resources/provider-list.d.mts +0 -58
- package/resources/provider-list.d.mts.map +0 -1
- package/resources/provider-list.d.ts +0 -58
- package/resources/provider-list.d.ts.map +0 -1
- package/resources/provider-list.js +0 -15
- package/resources/provider-list.js.map +0 -1
- package/resources/provider-list.mjs +0 -11
- package/resources/provider-list.mjs.map +0 -1
- package/resources/session-abort.d.mts +0 -17
- package/resources/session-abort.d.mts.map +0 -1
- package/resources/session-abort.d.ts +0 -17
- package/resources/session-abort.d.ts.map +0 -1
- package/resources/session-abort.js +0 -15
- package/resources/session-abort.js.map +0 -1
- package/resources/session-abort.mjs +0 -11
- package/resources/session-abort.mjs.map +0 -1
- package/resources/session-chat.d.mts +0 -160
- package/resources/session-chat.d.mts.map +0 -1
- package/resources/session-chat.d.ts +0 -160
- package/resources/session-chat.d.ts.map +0 -1
- package/resources/session-chat.js +0 -15
- package/resources/session-chat.js.map +0 -1
- package/resources/session-chat.mjs +0 -11
- package/resources/session-chat.mjs.map +0 -1
- package/resources/session-create.d.mts +0 -30
- package/resources/session-create.d.mts.map +0 -1
- package/resources/session-create.d.ts +0 -30
- package/resources/session-create.d.ts.map +0 -1
- package/resources/session-create.js +0 -15
- package/resources/session-create.js.map +0 -1
- package/resources/session-create.mjs +0 -11
- package/resources/session-create.mjs.map +0 -1
- package/resources/session-initialize.d.mts +0 -19
- package/resources/session-initialize.d.mts.map +0 -1
- package/resources/session-initialize.d.ts +0 -19
- package/resources/session-initialize.d.ts.map +0 -1
- package/resources/session-initialize.js +0 -15
- package/resources/session-initialize.js.map +0 -1
- package/resources/session-initialize.mjs +0 -11
- package/resources/session-initialize.mjs.map +0 -1
- package/resources/session-list.d.mts +0 -15
- package/resources/session-list.d.mts.map +0 -1
- package/resources/session-list.d.ts +0 -15
- package/resources/session-list.d.ts.map +0 -1
- package/resources/session-list.js +0 -15
- package/resources/session-list.js.map +0 -1
- package/resources/session-list.mjs +0 -11
- package/resources/session-list.mjs.map +0 -1
- package/resources/session-messages.d.mts +0 -18
- package/resources/session-messages.d.mts.map +0 -1
- package/resources/session-messages.d.ts +0 -18
- package/resources/session-messages.d.ts.map +0 -1
- package/resources/session-messages.js +0 -15
- package/resources/session-messages.js.map +0 -1
- package/resources/session-messages.mjs +0 -11
- package/resources/session-messages.mjs.map +0 -1
- package/resources/session-share.d.mts +0 -17
- package/resources/session-share.d.mts.map +0 -1
- package/resources/session-share.d.ts +0 -17
- package/resources/session-share.d.ts.map +0 -1
- package/resources/session-share.js +0 -15
- package/resources/session-share.js.map +0 -1
- package/resources/session-share.mjs +0 -11
- package/resources/session-share.mjs.map +0 -1
- package/resources/session-summarize.d.mts +0 -19
- package/resources/session-summarize.d.mts.map +0 -1
- package/resources/session-summarize.d.ts +0 -19
- package/resources/session-summarize.d.ts.map +0 -1
- package/resources/session-summarize.js +0 -15
- package/resources/session-summarize.js.map +0 -1
- package/resources/session-summarize.mjs +0 -11
- package/resources/session-summarize.mjs.map +0 -1
- package/resources/session-unshare.d.mts +0 -17
- package/resources/session-unshare.d.mts.map +0 -1
- package/resources/session-unshare.d.ts +0 -17
- package/resources/session-unshare.d.ts.map +0 -1
- package/resources/session-unshare.js +0 -15
- package/resources/session-unshare.js.map +0 -1
- package/resources/session-unshare.mjs +0 -11
- package/resources/session-unshare.mjs.map +0 -1
- package/src/resources/app-info.ts +0 -46
- package/src/resources/app-initialize.ts +0 -20
- package/src/resources/config-get.ts +0 -294
- package/src/resources/file-search.ts +0 -27
- package/src/resources/installation-info.ts +0 -24
- package/src/resources/path-get.ts +0 -28
- package/src/resources/provider-list.ts +0 -80
- package/src/resources/session-abort.ts +0 -27
- package/src/resources/session-chat.ts +0 -250
- package/src/resources/session-create.ts +0 -44
- package/src/resources/session-initialize.ts +0 -34
- package/src/resources/session-list.ts +0 -21
- package/src/resources/session-messages.ts +0 -31
- package/src/resources/session-share.ts +0 -23
- package/src/resources/session-summarize.ts +0 -34
- package/src/resources/session-unshare.ts +0 -26
|
@@ -0,0 +1,404 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../core/resource';
|
|
4
|
+
import { APIPromise } from '../core/api-promise';
|
|
5
|
+
import { RequestOptions } from '../internal/request-options';
|
|
6
|
+
|
|
7
|
+
export class ConfigResource extends APIResource {
|
|
8
|
+
/**
|
|
9
|
+
* Get config info
|
|
10
|
+
*/
|
|
11
|
+
get(options?: RequestOptions): APIPromise<Config> {
|
|
12
|
+
return this._client.get('/config', options);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* List all providers
|
|
17
|
+
*/
|
|
18
|
+
providers(options?: RequestOptions): APIPromise<ConfigProvidersResponse> {
|
|
19
|
+
return this._client.get('/config/providers', options);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export interface Config {
|
|
24
|
+
/**
|
|
25
|
+
* JSON schema reference for configuration validation
|
|
26
|
+
*/
|
|
27
|
+
$schema?: string;
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Share newly created sessions automatically
|
|
31
|
+
*/
|
|
32
|
+
autoshare?: boolean;
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Automatically update to the latest version
|
|
36
|
+
*/
|
|
37
|
+
autoupdate?: boolean;
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Disable providers that are loaded automatically
|
|
41
|
+
*/
|
|
42
|
+
disabled_providers?: Array<string>;
|
|
43
|
+
|
|
44
|
+
experimental?: Config.Experimental;
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Custom keybind configurations
|
|
48
|
+
*/
|
|
49
|
+
keybinds?: Keybinds;
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* MCP (Model Context Protocol) server configurations
|
|
53
|
+
*/
|
|
54
|
+
mcp?: { [key: string]: McpLocal | McpRemote };
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Model to use in the format of provider/model, eg anthropic/claude-2
|
|
58
|
+
*/
|
|
59
|
+
model?: string;
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Custom provider configurations and model overrides
|
|
63
|
+
*/
|
|
64
|
+
provider?: { [key: string]: Config.Provider };
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* Theme name to use for the interface
|
|
68
|
+
*/
|
|
69
|
+
theme?: string;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export namespace Config {
|
|
73
|
+
export interface Experimental {
|
|
74
|
+
hook?: Experimental.Hook;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export namespace Experimental {
|
|
78
|
+
export interface Hook {
|
|
79
|
+
file_edited?: { [key: string]: Array<Hook.FileEdited> };
|
|
80
|
+
|
|
81
|
+
session_completed?: Array<Hook.SessionCompleted>;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export namespace Hook {
|
|
85
|
+
export interface FileEdited {
|
|
86
|
+
command: Array<string>;
|
|
87
|
+
|
|
88
|
+
environment?: { [key: string]: string };
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
export interface SessionCompleted {
|
|
92
|
+
command: Array<string>;
|
|
93
|
+
|
|
94
|
+
environment?: { [key: string]: string };
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
export interface Provider {
|
|
100
|
+
models: { [key: string]: Provider.Models };
|
|
101
|
+
|
|
102
|
+
id?: string;
|
|
103
|
+
|
|
104
|
+
api?: string;
|
|
105
|
+
|
|
106
|
+
env?: Array<string>;
|
|
107
|
+
|
|
108
|
+
name?: string;
|
|
109
|
+
|
|
110
|
+
npm?: string;
|
|
111
|
+
|
|
112
|
+
options?: { [key: string]: unknown };
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
export namespace Provider {
|
|
116
|
+
export interface Models {
|
|
117
|
+
id?: string;
|
|
118
|
+
|
|
119
|
+
attachment?: boolean;
|
|
120
|
+
|
|
121
|
+
cost?: Models.Cost;
|
|
122
|
+
|
|
123
|
+
limit?: Models.Limit;
|
|
124
|
+
|
|
125
|
+
name?: string;
|
|
126
|
+
|
|
127
|
+
options?: { [key: string]: unknown };
|
|
128
|
+
|
|
129
|
+
reasoning?: boolean;
|
|
130
|
+
|
|
131
|
+
release_date?: string;
|
|
132
|
+
|
|
133
|
+
temperature?: boolean;
|
|
134
|
+
|
|
135
|
+
tool_call?: boolean;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
export namespace Models {
|
|
139
|
+
export interface Cost {
|
|
140
|
+
input: number;
|
|
141
|
+
|
|
142
|
+
output: number;
|
|
143
|
+
|
|
144
|
+
cache_read?: number;
|
|
145
|
+
|
|
146
|
+
cache_write?: number;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
export interface Limit {
|
|
150
|
+
context: number;
|
|
151
|
+
|
|
152
|
+
output: number;
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
export interface Keybinds {
|
|
159
|
+
/**
|
|
160
|
+
* Exit the application
|
|
161
|
+
*/
|
|
162
|
+
app_exit?: string;
|
|
163
|
+
|
|
164
|
+
/**
|
|
165
|
+
* Open external editor
|
|
166
|
+
*/
|
|
167
|
+
editor_open?: string;
|
|
168
|
+
|
|
169
|
+
/**
|
|
170
|
+
* Show help dialog
|
|
171
|
+
*/
|
|
172
|
+
help?: string;
|
|
173
|
+
|
|
174
|
+
/**
|
|
175
|
+
* Navigate to next history item
|
|
176
|
+
*/
|
|
177
|
+
history_next?: string;
|
|
178
|
+
|
|
179
|
+
/**
|
|
180
|
+
* Navigate to previous history item
|
|
181
|
+
*/
|
|
182
|
+
history_previous?: string;
|
|
183
|
+
|
|
184
|
+
/**
|
|
185
|
+
* Clear input field
|
|
186
|
+
*/
|
|
187
|
+
input_clear?: string;
|
|
188
|
+
|
|
189
|
+
/**
|
|
190
|
+
* Insert newline in input
|
|
191
|
+
*/
|
|
192
|
+
input_newline?: string;
|
|
193
|
+
|
|
194
|
+
/**
|
|
195
|
+
* Paste from clipboard
|
|
196
|
+
*/
|
|
197
|
+
input_paste?: string;
|
|
198
|
+
|
|
199
|
+
/**
|
|
200
|
+
* Submit input
|
|
201
|
+
*/
|
|
202
|
+
input_submit?: string;
|
|
203
|
+
|
|
204
|
+
/**
|
|
205
|
+
* Leader key for keybind combinations
|
|
206
|
+
*/
|
|
207
|
+
leader?: string;
|
|
208
|
+
|
|
209
|
+
/**
|
|
210
|
+
* Navigate to first message
|
|
211
|
+
*/
|
|
212
|
+
messages_first?: string;
|
|
213
|
+
|
|
214
|
+
/**
|
|
215
|
+
* Scroll messages down by half page
|
|
216
|
+
*/
|
|
217
|
+
messages_half_page_down?: string;
|
|
218
|
+
|
|
219
|
+
/**
|
|
220
|
+
* Scroll messages up by half page
|
|
221
|
+
*/
|
|
222
|
+
messages_half_page_up?: string;
|
|
223
|
+
|
|
224
|
+
/**
|
|
225
|
+
* Navigate to last message
|
|
226
|
+
*/
|
|
227
|
+
messages_last?: string;
|
|
228
|
+
|
|
229
|
+
/**
|
|
230
|
+
* Navigate to next message
|
|
231
|
+
*/
|
|
232
|
+
messages_next?: string;
|
|
233
|
+
|
|
234
|
+
/**
|
|
235
|
+
* Scroll messages down by one page
|
|
236
|
+
*/
|
|
237
|
+
messages_page_down?: string;
|
|
238
|
+
|
|
239
|
+
/**
|
|
240
|
+
* Scroll messages up by one page
|
|
241
|
+
*/
|
|
242
|
+
messages_page_up?: string;
|
|
243
|
+
|
|
244
|
+
/**
|
|
245
|
+
* Navigate to previous message
|
|
246
|
+
*/
|
|
247
|
+
messages_previous?: string;
|
|
248
|
+
|
|
249
|
+
/**
|
|
250
|
+
* List available models
|
|
251
|
+
*/
|
|
252
|
+
model_list?: string;
|
|
253
|
+
|
|
254
|
+
/**
|
|
255
|
+
* Initialize project configuration
|
|
256
|
+
*/
|
|
257
|
+
project_init?: string;
|
|
258
|
+
|
|
259
|
+
/**
|
|
260
|
+
* Toggle compact mode for session
|
|
261
|
+
*/
|
|
262
|
+
session_compact?: string;
|
|
263
|
+
|
|
264
|
+
/**
|
|
265
|
+
* Interrupt current session
|
|
266
|
+
*/
|
|
267
|
+
session_interrupt?: string;
|
|
268
|
+
|
|
269
|
+
/**
|
|
270
|
+
* List all sessions
|
|
271
|
+
*/
|
|
272
|
+
session_list?: string;
|
|
273
|
+
|
|
274
|
+
/**
|
|
275
|
+
* Create a new session
|
|
276
|
+
*/
|
|
277
|
+
session_new?: string;
|
|
278
|
+
|
|
279
|
+
/**
|
|
280
|
+
* Share current session
|
|
281
|
+
*/
|
|
282
|
+
session_share?: string;
|
|
283
|
+
|
|
284
|
+
/**
|
|
285
|
+
* List available themes
|
|
286
|
+
*/
|
|
287
|
+
theme_list?: string;
|
|
288
|
+
|
|
289
|
+
/**
|
|
290
|
+
* Show tool details
|
|
291
|
+
*/
|
|
292
|
+
tool_details?: string;
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
export interface McpLocal {
|
|
296
|
+
/**
|
|
297
|
+
* Command and arguments to run the MCP server
|
|
298
|
+
*/
|
|
299
|
+
command: Array<string>;
|
|
300
|
+
|
|
301
|
+
/**
|
|
302
|
+
* Type of MCP server connection
|
|
303
|
+
*/
|
|
304
|
+
type: 'local';
|
|
305
|
+
|
|
306
|
+
/**
|
|
307
|
+
* Enable or disable the MCP server on startup
|
|
308
|
+
*/
|
|
309
|
+
enabled?: boolean;
|
|
310
|
+
|
|
311
|
+
/**
|
|
312
|
+
* Environment variables to set when running the MCP server
|
|
313
|
+
*/
|
|
314
|
+
environment?: { [key: string]: string };
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
export interface McpRemote {
|
|
318
|
+
/**
|
|
319
|
+
* Type of MCP server connection
|
|
320
|
+
*/
|
|
321
|
+
type: 'remote';
|
|
322
|
+
|
|
323
|
+
/**
|
|
324
|
+
* URL of the remote MCP server
|
|
325
|
+
*/
|
|
326
|
+
url: string;
|
|
327
|
+
|
|
328
|
+
/**
|
|
329
|
+
* Enable or disable the MCP server on startup
|
|
330
|
+
*/
|
|
331
|
+
enabled?: boolean;
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
export interface Model {
|
|
335
|
+
id: string;
|
|
336
|
+
|
|
337
|
+
attachment: boolean;
|
|
338
|
+
|
|
339
|
+
cost: Model.Cost;
|
|
340
|
+
|
|
341
|
+
limit: Model.Limit;
|
|
342
|
+
|
|
343
|
+
name: string;
|
|
344
|
+
|
|
345
|
+
options: { [key: string]: unknown };
|
|
346
|
+
|
|
347
|
+
reasoning: boolean;
|
|
348
|
+
|
|
349
|
+
release_date: string;
|
|
350
|
+
|
|
351
|
+
temperature: boolean;
|
|
352
|
+
|
|
353
|
+
tool_call: boolean;
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
export namespace Model {
|
|
357
|
+
export interface Cost {
|
|
358
|
+
input: number;
|
|
359
|
+
|
|
360
|
+
output: number;
|
|
361
|
+
|
|
362
|
+
cache_read?: number;
|
|
363
|
+
|
|
364
|
+
cache_write?: number;
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
export interface Limit {
|
|
368
|
+
context: number;
|
|
369
|
+
|
|
370
|
+
output: number;
|
|
371
|
+
}
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
export interface Provider {
|
|
375
|
+
id: string;
|
|
376
|
+
|
|
377
|
+
env: Array<string>;
|
|
378
|
+
|
|
379
|
+
models: { [key: string]: Model };
|
|
380
|
+
|
|
381
|
+
name: string;
|
|
382
|
+
|
|
383
|
+
api?: string;
|
|
384
|
+
|
|
385
|
+
npm?: string;
|
|
386
|
+
}
|
|
387
|
+
|
|
388
|
+
export interface ConfigProvidersResponse {
|
|
389
|
+
default: { [key: string]: string };
|
|
390
|
+
|
|
391
|
+
providers: Array<Provider>;
|
|
392
|
+
}
|
|
393
|
+
|
|
394
|
+
export declare namespace ConfigResource {
|
|
395
|
+
export {
|
|
396
|
+
type Config as Config,
|
|
397
|
+
type Keybinds as Keybinds,
|
|
398
|
+
type McpLocal as McpLocal,
|
|
399
|
+
type McpRemote as McpRemote,
|
|
400
|
+
type Model as Model,
|
|
401
|
+
type Provider as Provider,
|
|
402
|
+
type ConfigProvidersResponse as ConfigProvidersResponse,
|
|
403
|
+
};
|
|
404
|
+
}
|
package/src/resources/event.ts
CHANGED
|
@@ -1,57 +1,35 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
3
|
import { APIResource } from '../core/resource';
|
|
4
|
-
import * as
|
|
5
|
-
import * as
|
|
4
|
+
import * as SessionAPI from './session';
|
|
5
|
+
import * as Shared from './shared';
|
|
6
6
|
import { APIPromise } from '../core/api-promise';
|
|
7
|
+
import { Stream } from '../core/streaming';
|
|
7
8
|
import { RequestOptions } from '../internal/request-options';
|
|
8
9
|
|
|
9
10
|
export class Event extends APIResource {
|
|
10
11
|
/**
|
|
11
12
|
* Get events
|
|
12
13
|
*/
|
|
13
|
-
list(options?: RequestOptions): APIPromise<EventListResponse
|
|
14
|
-
return this._client.get('/event', options)
|
|
14
|
+
list(options?: RequestOptions): APIPromise<Stream<EventListResponse>> {
|
|
15
|
+
return this._client.get('/event', { ...options, stream: true }) as APIPromise<Stream<EventListResponse>>;
|
|
15
16
|
}
|
|
16
17
|
}
|
|
17
18
|
|
|
18
19
|
export type EventListResponse =
|
|
19
|
-
| EventListResponse.EventStorageWrite
|
|
20
|
-
| EventListResponse.EventInstallationUpdated
|
|
21
20
|
| EventListResponse.EventLspClientDiagnostics
|
|
22
21
|
| EventListResponse.EventPermissionUpdated
|
|
22
|
+
| EventListResponse.EventFileEdited
|
|
23
|
+
| EventListResponse.EventStorageWrite
|
|
24
|
+
| EventListResponse.EventInstallationUpdated
|
|
23
25
|
| EventListResponse.EventMessageUpdated
|
|
24
26
|
| EventListResponse.EventMessagePartUpdated
|
|
25
27
|
| EventListResponse.EventSessionUpdated
|
|
28
|
+
| EventListResponse.EventSessionDeleted
|
|
29
|
+
| EventListResponse.EventSessionIdle
|
|
26
30
|
| EventListResponse.EventSessionError;
|
|
27
31
|
|
|
28
32
|
export namespace EventListResponse {
|
|
29
|
-
export interface EventStorageWrite {
|
|
30
|
-
properties: EventStorageWrite.Properties;
|
|
31
|
-
|
|
32
|
-
type: 'storage.write';
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
export namespace EventStorageWrite {
|
|
36
|
-
export interface Properties {
|
|
37
|
-
key: string;
|
|
38
|
-
|
|
39
|
-
content?: unknown;
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
export interface EventInstallationUpdated {
|
|
44
|
-
properties: EventInstallationUpdated.Properties;
|
|
45
|
-
|
|
46
|
-
type: 'installation.updated';
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
export namespace EventInstallationUpdated {
|
|
50
|
-
export interface Properties {
|
|
51
|
-
version: string;
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
|
|
55
33
|
export interface EventLspClientDiagnostics {
|
|
56
34
|
properties: EventLspClientDiagnostics.Properties;
|
|
57
35
|
|
|
@@ -92,6 +70,44 @@ export namespace EventListResponse {
|
|
|
92
70
|
}
|
|
93
71
|
}
|
|
94
72
|
|
|
73
|
+
export interface EventFileEdited {
|
|
74
|
+
properties: EventFileEdited.Properties;
|
|
75
|
+
|
|
76
|
+
type: 'file.edited';
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
export namespace EventFileEdited {
|
|
80
|
+
export interface Properties {
|
|
81
|
+
file: string;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
export interface EventStorageWrite {
|
|
86
|
+
properties: EventStorageWrite.Properties;
|
|
87
|
+
|
|
88
|
+
type: 'storage.write';
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
export namespace EventStorageWrite {
|
|
92
|
+
export interface Properties {
|
|
93
|
+
key: string;
|
|
94
|
+
|
|
95
|
+
content?: unknown;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
export interface EventInstallationUpdated {
|
|
100
|
+
properties: EventInstallationUpdated.Properties;
|
|
101
|
+
|
|
102
|
+
type: 'installation.updated';
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
export namespace EventInstallationUpdated {
|
|
106
|
+
export interface Properties {
|
|
107
|
+
version: string;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
|
|
95
111
|
export interface EventMessageUpdated {
|
|
96
112
|
properties: EventMessageUpdated.Properties;
|
|
97
113
|
|
|
@@ -100,7 +116,7 @@ export namespace EventListResponse {
|
|
|
100
116
|
|
|
101
117
|
export namespace EventMessageUpdated {
|
|
102
118
|
export interface Properties {
|
|
103
|
-
info:
|
|
119
|
+
info: SessionAPI.Message;
|
|
104
120
|
}
|
|
105
121
|
}
|
|
106
122
|
|
|
@@ -114,7 +130,7 @@ export namespace EventListResponse {
|
|
|
114
130
|
export interface Properties {
|
|
115
131
|
messageID: string;
|
|
116
132
|
|
|
117
|
-
part:
|
|
133
|
+
part: SessionAPI.MessagePart;
|
|
118
134
|
|
|
119
135
|
sessionID: string;
|
|
120
136
|
}
|
|
@@ -128,7 +144,31 @@ export namespace EventListResponse {
|
|
|
128
144
|
|
|
129
145
|
export namespace EventSessionUpdated {
|
|
130
146
|
export interface Properties {
|
|
131
|
-
info:
|
|
147
|
+
info: SessionAPI.Session;
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
export interface EventSessionDeleted {
|
|
152
|
+
properties: EventSessionDeleted.Properties;
|
|
153
|
+
|
|
154
|
+
type: 'session.deleted';
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
export namespace EventSessionDeleted {
|
|
158
|
+
export interface Properties {
|
|
159
|
+
info: SessionAPI.Session;
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
export interface EventSessionIdle {
|
|
164
|
+
properties: EventSessionIdle.Properties;
|
|
165
|
+
|
|
166
|
+
type: 'session.idle';
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
export namespace EventSessionIdle {
|
|
170
|
+
export interface Properties {
|
|
171
|
+
sessionID: string;
|
|
132
172
|
}
|
|
133
173
|
}
|
|
134
174
|
|
|
@@ -140,7 +180,15 @@ export namespace EventListResponse {
|
|
|
140
180
|
|
|
141
181
|
export namespace EventSessionError {
|
|
142
182
|
export interface Properties {
|
|
143
|
-
error?:
|
|
183
|
+
error?: Shared.ProviderAuthError | Shared.UnknownError | Properties.MessageOutputLengthError;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
export namespace Properties {
|
|
187
|
+
export interface MessageOutputLengthError {
|
|
188
|
+
data: unknown;
|
|
189
|
+
|
|
190
|
+
name: 'MessageOutputLengthError';
|
|
191
|
+
}
|
|
144
192
|
}
|
|
145
193
|
}
|
|
146
194
|
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../core/resource';
|
|
4
|
+
import { APIPromise } from '../core/api-promise';
|
|
5
|
+
import { RequestOptions } from '../internal/request-options';
|
|
6
|
+
|
|
7
|
+
export class File extends APIResource {
|
|
8
|
+
/**
|
|
9
|
+
* Search for files
|
|
10
|
+
*/
|
|
11
|
+
search(query: FileSearchParams, options?: RequestOptions): APIPromise<FileSearchResponse> {
|
|
12
|
+
return this._client.get('/file', { query, ...options });
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export type FileSearchResponse = Array<string>;
|
|
17
|
+
|
|
18
|
+
export interface FileSearchParams {
|
|
19
|
+
query: string;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export declare namespace File {
|
|
23
|
+
export { type FileSearchResponse as FileSearchResponse, type FileSearchParams as FileSearchParams };
|
|
24
|
+
}
|
package/src/resources/index.ts
CHANGED
|
@@ -1,38 +1,40 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
-
export
|
|
4
|
-
export {
|
|
5
|
-
export {
|
|
3
|
+
export * from './shared';
|
|
4
|
+
export { AppResource, type App, type AppInitResponse } from './app';
|
|
5
|
+
export {
|
|
6
|
+
ConfigResource,
|
|
7
|
+
type Config,
|
|
8
|
+
type Keybinds,
|
|
9
|
+
type McpLocal,
|
|
10
|
+
type McpRemote,
|
|
11
|
+
type Model,
|
|
12
|
+
type Provider,
|
|
13
|
+
type ConfigProvidersResponse,
|
|
14
|
+
} from './config';
|
|
6
15
|
export { Event, type EventListResponse } from './event';
|
|
7
|
-
export {
|
|
8
|
-
export { InstallationInfo, type InstallationInfoCreateResponse } from './installation-info';
|
|
9
|
-
export { PathGet, type PathGetCreateResponse } from './path-get';
|
|
10
|
-
export { ProviderList, type ProviderListCreateResponse } from './provider-list';
|
|
11
|
-
export { SessionAbort, type SessionAbortAbortResponse, type SessionAbortAbortParams } from './session-abort';
|
|
16
|
+
export { File, type FileSearchResponse, type FileSearchParams } from './file';
|
|
12
17
|
export {
|
|
13
|
-
|
|
14
|
-
type
|
|
18
|
+
SessionResource,
|
|
19
|
+
type FilePart,
|
|
20
|
+
type Message,
|
|
15
21
|
type MessagePart,
|
|
16
|
-
type
|
|
17
|
-
type
|
|
18
|
-
type
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
type
|
|
24
|
-
type
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
type
|
|
30
|
-
type
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
type SessionSummarizeSummarizeResponse,
|
|
36
|
-
type SessionSummarizeSummarizeParams,
|
|
37
|
-
} from './session-summarize';
|
|
38
|
-
export { SessionUnshare, type SessionUnshareUnshareParams } from './session-unshare';
|
|
22
|
+
type ReasoningPart,
|
|
23
|
+
type Session,
|
|
24
|
+
type SourceURLPart,
|
|
25
|
+
type StepStartPart,
|
|
26
|
+
type TextPart,
|
|
27
|
+
type ToolCall,
|
|
28
|
+
type ToolInvocationPart,
|
|
29
|
+
type ToolPartialCall,
|
|
30
|
+
type ToolResult,
|
|
31
|
+
type SessionListResponse,
|
|
32
|
+
type SessionDeleteResponse,
|
|
33
|
+
type SessionAbortResponse,
|
|
34
|
+
type SessionInitResponse,
|
|
35
|
+
type SessionMessagesResponse,
|
|
36
|
+
type SessionSummarizeResponse,
|
|
37
|
+
type SessionChatParams,
|
|
38
|
+
type SessionInitParams,
|
|
39
|
+
type SessionSummarizeParams,
|
|
40
|
+
} from './session';
|