@opencode-ai/sdk 0.1.0-alpha.3 → 0.1.0-alpha.4
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 +8 -0
- package/LICENSE +198 -4
- package/client.d.mts +12 -48
- package/client.d.mts.map +1 -1
- package/client.d.ts +12 -48
- package/client.d.ts.map +1 -1
- package/client.js +12 -48
- package/client.js.map +1 -1
- package/client.mjs +12 -48
- package/client.mjs.map +1 -1
- package/package.json +2 -2
- package/resources/app.d.mts +38 -0
- package/resources/app.d.mts.map +1 -0
- package/resources/app.d.ts +38 -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 +304 -0
- package/resources/config.d.mts.map +1 -0
- package/resources/config.d.ts +304 -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 +40 -7
- package/resources/event.d.mts.map +1 -1
- package/resources/event.d.ts +40 -7
- package/resources/event.d.ts.map +1 -1
- package/resources/event.js.map +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 +4 -16
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +4 -16
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +9 -33
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +4 -16
- package/resources/index.mjs.map +1 -1
- package/resources/session.d.mts +226 -0
- package/resources/session.d.mts.map +1 -0
- package/resources/session.d.ts +226 -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/src/client.ts +75 -122
- package/src/resources/app.ts +59 -0
- package/src/resources/config.ts +390 -0
- package/src/resources/event.ts +52 -6
- package/src/resources/file.ts +24 -0
- package/src/resources/index.ts +34 -33
- package/src/resources/session.ts +382 -0
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +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
package/src/resources/event.ts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
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 SessionCreateAPI from './session-create';
|
|
4
|
+
import * as SessionAPI from './session';
|
|
6
5
|
import { APIPromise } from '../core/api-promise';
|
|
7
6
|
import { RequestOptions } from '../internal/request-options';
|
|
8
7
|
|
|
@@ -23,6 +22,7 @@ export type EventListResponse =
|
|
|
23
22
|
| EventListResponse.EventMessageUpdated
|
|
24
23
|
| EventListResponse.EventMessagePartUpdated
|
|
25
24
|
| EventListResponse.EventSessionUpdated
|
|
25
|
+
| EventListResponse.EventSessionDeleted
|
|
26
26
|
| EventListResponse.EventSessionError;
|
|
27
27
|
|
|
28
28
|
export namespace EventListResponse {
|
|
@@ -100,7 +100,7 @@ export namespace EventListResponse {
|
|
|
100
100
|
|
|
101
101
|
export namespace EventMessageUpdated {
|
|
102
102
|
export interface Properties {
|
|
103
|
-
info:
|
|
103
|
+
info: SessionAPI.Message;
|
|
104
104
|
}
|
|
105
105
|
}
|
|
106
106
|
|
|
@@ -114,7 +114,7 @@ export namespace EventListResponse {
|
|
|
114
114
|
export interface Properties {
|
|
115
115
|
messageID: string;
|
|
116
116
|
|
|
117
|
-
part:
|
|
117
|
+
part: SessionAPI.MessagePart;
|
|
118
118
|
|
|
119
119
|
sessionID: string;
|
|
120
120
|
}
|
|
@@ -128,7 +128,19 @@ export namespace EventListResponse {
|
|
|
128
128
|
|
|
129
129
|
export namespace EventSessionUpdated {
|
|
130
130
|
export interface Properties {
|
|
131
|
-
info:
|
|
131
|
+
info: SessionAPI.Session;
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
export interface EventSessionDeleted {
|
|
136
|
+
properties: EventSessionDeleted.Properties;
|
|
137
|
+
|
|
138
|
+
type: 'session.deleted';
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
export namespace EventSessionDeleted {
|
|
142
|
+
export interface Properties {
|
|
143
|
+
info: SessionAPI.Session;
|
|
132
144
|
}
|
|
133
145
|
}
|
|
134
146
|
|
|
@@ -140,7 +152,41 @@ export namespace EventListResponse {
|
|
|
140
152
|
|
|
141
153
|
export namespace EventSessionError {
|
|
142
154
|
export interface Properties {
|
|
143
|
-
error?:
|
|
155
|
+
error?: Properties.ProviderAuthError | Properties.UnknownError | Properties.MessageOutputLengthError;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
export namespace Properties {
|
|
159
|
+
export interface ProviderAuthError {
|
|
160
|
+
data: ProviderAuthError.Data;
|
|
161
|
+
|
|
162
|
+
name: 'ProviderAuthError';
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
export namespace ProviderAuthError {
|
|
166
|
+
export interface Data {
|
|
167
|
+
message: string;
|
|
168
|
+
|
|
169
|
+
providerID: string;
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
export interface UnknownError {
|
|
174
|
+
data: UnknownError.Data;
|
|
175
|
+
|
|
176
|
+
name: 'UnknownError';
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
export namespace UnknownError {
|
|
180
|
+
export interface Data {
|
|
181
|
+
message: string;
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
export interface MessageOutputLengthError {
|
|
186
|
+
data: unknown;
|
|
187
|
+
|
|
188
|
+
name: 'MessageOutputLengthError';
|
|
189
|
+
}
|
|
144
190
|
}
|
|
145
191
|
}
|
|
146
192
|
}
|
|
@@ -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,39 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
-
export {
|
|
4
|
-
export {
|
|
5
|
-
|
|
3
|
+
export { AppResource, type App, type AppInitResponse } from './app';
|
|
4
|
+
export {
|
|
5
|
+
ConfigResource,
|
|
6
|
+
type Config,
|
|
7
|
+
type Keybinds,
|
|
8
|
+
type McpLocal,
|
|
9
|
+
type McpRemote,
|
|
10
|
+
type Model,
|
|
11
|
+
type Provider,
|
|
12
|
+
type ConfigProvidersResponse,
|
|
13
|
+
} from './config';
|
|
6
14
|
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';
|
|
15
|
+
export { File, type FileSearchResponse, type FileSearchParams } from './file';
|
|
12
16
|
export {
|
|
13
|
-
|
|
14
|
-
type
|
|
17
|
+
SessionResource,
|
|
18
|
+
type FilePart,
|
|
19
|
+
type Message,
|
|
15
20
|
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';
|
|
21
|
+
type ReasoningPart,
|
|
22
|
+
type Session,
|
|
23
|
+
type SourceURLPart,
|
|
24
|
+
type StepStartPart,
|
|
25
|
+
type TextPart,
|
|
26
|
+
type ToolCall,
|
|
27
|
+
type ToolInvocationPart,
|
|
28
|
+
type ToolPartialCall,
|
|
29
|
+
type ToolResult,
|
|
30
|
+
type SessionListResponse,
|
|
31
|
+
type SessionDeleteResponse,
|
|
32
|
+
type SessionAbortResponse,
|
|
33
|
+
type SessionInitResponse,
|
|
34
|
+
type SessionMessagesResponse,
|
|
35
|
+
type SessionSummarizeResponse,
|
|
36
|
+
type SessionChatParams,
|
|
37
|
+
type SessionInitParams,
|
|
38
|
+
type SessionSummarizeParams,
|
|
39
|
+
} from './session';
|
|
@@ -0,0 +1,382 @@
|
|
|
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
|
+
import { path } from '../internal/utils/path';
|
|
7
|
+
|
|
8
|
+
export class SessionResource extends APIResource {
|
|
9
|
+
/**
|
|
10
|
+
* Create a new session
|
|
11
|
+
*/
|
|
12
|
+
create(options?: RequestOptions): APIPromise<Session> {
|
|
13
|
+
return this._client.post('/session', options);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* List all sessions
|
|
18
|
+
*/
|
|
19
|
+
list(options?: RequestOptions): APIPromise<SessionListResponse> {
|
|
20
|
+
return this._client.get('/session', options);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Delete a session and all its data
|
|
25
|
+
*/
|
|
26
|
+
delete(id: string, options?: RequestOptions): APIPromise<SessionDeleteResponse> {
|
|
27
|
+
return this._client.delete(path`/session/${id}`, options);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Abort a session
|
|
32
|
+
*/
|
|
33
|
+
abort(id: string, options?: RequestOptions): APIPromise<SessionAbortResponse> {
|
|
34
|
+
return this._client.post(path`/session/${id}/abort`, options);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Create and send a new message to a session
|
|
39
|
+
*/
|
|
40
|
+
chat(id: string, body: SessionChatParams, options?: RequestOptions): APIPromise<Message> {
|
|
41
|
+
return this._client.post(path`/session/${id}/message`, { body, ...options });
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Analyze the app and create an AGENTS.md file
|
|
46
|
+
*/
|
|
47
|
+
init(id: string, body: SessionInitParams, options?: RequestOptions): APIPromise<SessionInitResponse> {
|
|
48
|
+
return this._client.post(path`/session/${id}/init`, { body, ...options });
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* List messages for a session
|
|
53
|
+
*/
|
|
54
|
+
messages(id: string, options?: RequestOptions): APIPromise<SessionMessagesResponse> {
|
|
55
|
+
return this._client.get(path`/session/${id}/message`, options);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* Share a session
|
|
60
|
+
*/
|
|
61
|
+
share(id: string, options?: RequestOptions): APIPromise<Session> {
|
|
62
|
+
return this._client.post(path`/session/${id}/share`, options);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* Summarize the session
|
|
67
|
+
*/
|
|
68
|
+
summarize(
|
|
69
|
+
id: string,
|
|
70
|
+
body: SessionSummarizeParams,
|
|
71
|
+
options?: RequestOptions,
|
|
72
|
+
): APIPromise<SessionSummarizeResponse> {
|
|
73
|
+
return this._client.post(path`/session/${id}/summarize`, { body, ...options });
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* Unshare the session
|
|
78
|
+
*/
|
|
79
|
+
unshare(id: string, options?: RequestOptions): APIPromise<Session> {
|
|
80
|
+
return this._client.delete(path`/session/${id}/share`, options);
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export interface FilePart {
|
|
85
|
+
mediaType: string;
|
|
86
|
+
|
|
87
|
+
type: 'file';
|
|
88
|
+
|
|
89
|
+
url: string;
|
|
90
|
+
|
|
91
|
+
filename?: string;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
export interface Message {
|
|
95
|
+
id: string;
|
|
96
|
+
|
|
97
|
+
metadata: Message.Metadata;
|
|
98
|
+
|
|
99
|
+
parts: Array<MessagePart>;
|
|
100
|
+
|
|
101
|
+
role: 'user' | 'assistant';
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
export namespace Message {
|
|
105
|
+
export interface Metadata {
|
|
106
|
+
sessionID: string;
|
|
107
|
+
|
|
108
|
+
time: Metadata.Time;
|
|
109
|
+
|
|
110
|
+
tool: { [key: string]: Metadata.Tool };
|
|
111
|
+
|
|
112
|
+
assistant?: Metadata.Assistant;
|
|
113
|
+
|
|
114
|
+
error?: Metadata.ProviderAuthError | Metadata.UnknownError | Metadata.MessageOutputLengthError;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
export namespace Metadata {
|
|
118
|
+
export interface Time {
|
|
119
|
+
created: number;
|
|
120
|
+
|
|
121
|
+
completed?: number;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
export interface Tool {
|
|
125
|
+
time: Tool.Time;
|
|
126
|
+
|
|
127
|
+
title: string;
|
|
128
|
+
|
|
129
|
+
[k: string]: unknown;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
export namespace Tool {
|
|
133
|
+
export interface Time {
|
|
134
|
+
end: number;
|
|
135
|
+
|
|
136
|
+
start: number;
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
export interface Assistant {
|
|
141
|
+
cost: number;
|
|
142
|
+
|
|
143
|
+
modelID: string;
|
|
144
|
+
|
|
145
|
+
path: Assistant.Path;
|
|
146
|
+
|
|
147
|
+
providerID: string;
|
|
148
|
+
|
|
149
|
+
system: Array<string>;
|
|
150
|
+
|
|
151
|
+
tokens: Assistant.Tokens;
|
|
152
|
+
|
|
153
|
+
summary?: boolean;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
export namespace Assistant {
|
|
157
|
+
export interface Path {
|
|
158
|
+
cwd: string;
|
|
159
|
+
|
|
160
|
+
root: string;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
export interface Tokens {
|
|
164
|
+
cache: Tokens.Cache;
|
|
165
|
+
|
|
166
|
+
input: number;
|
|
167
|
+
|
|
168
|
+
output: number;
|
|
169
|
+
|
|
170
|
+
reasoning: number;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
export namespace Tokens {
|
|
174
|
+
export interface Cache {
|
|
175
|
+
read: number;
|
|
176
|
+
|
|
177
|
+
write: number;
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
export interface ProviderAuthError {
|
|
183
|
+
data: ProviderAuthError.Data;
|
|
184
|
+
|
|
185
|
+
name: 'ProviderAuthError';
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
export namespace ProviderAuthError {
|
|
189
|
+
export interface Data {
|
|
190
|
+
message: string;
|
|
191
|
+
|
|
192
|
+
providerID: string;
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
export interface UnknownError {
|
|
197
|
+
data: UnknownError.Data;
|
|
198
|
+
|
|
199
|
+
name: 'UnknownError';
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
export namespace UnknownError {
|
|
203
|
+
export interface Data {
|
|
204
|
+
message: string;
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
export interface MessageOutputLengthError {
|
|
209
|
+
data: unknown;
|
|
210
|
+
|
|
211
|
+
name: 'MessageOutputLengthError';
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
export type MessagePart =
|
|
217
|
+
| TextPart
|
|
218
|
+
| ReasoningPart
|
|
219
|
+
| ToolInvocationPart
|
|
220
|
+
| SourceURLPart
|
|
221
|
+
| FilePart
|
|
222
|
+
| StepStartPart;
|
|
223
|
+
|
|
224
|
+
export interface ReasoningPart {
|
|
225
|
+
text: string;
|
|
226
|
+
|
|
227
|
+
type: 'reasoning';
|
|
228
|
+
|
|
229
|
+
providerMetadata?: { [key: string]: unknown };
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
export interface Session {
|
|
233
|
+
id: string;
|
|
234
|
+
|
|
235
|
+
time: Session.Time;
|
|
236
|
+
|
|
237
|
+
title: string;
|
|
238
|
+
|
|
239
|
+
version: string;
|
|
240
|
+
|
|
241
|
+
parentID?: string;
|
|
242
|
+
|
|
243
|
+
share?: Session.Share;
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
export namespace Session {
|
|
247
|
+
export interface Time {
|
|
248
|
+
created: number;
|
|
249
|
+
|
|
250
|
+
updated: number;
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
export interface Share {
|
|
254
|
+
url: string;
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
export interface SourceURLPart {
|
|
259
|
+
sourceId: string;
|
|
260
|
+
|
|
261
|
+
type: 'source-url';
|
|
262
|
+
|
|
263
|
+
url: string;
|
|
264
|
+
|
|
265
|
+
providerMetadata?: { [key: string]: unknown };
|
|
266
|
+
|
|
267
|
+
title?: string;
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
export interface StepStartPart {
|
|
271
|
+
type: 'step-start';
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
export interface TextPart {
|
|
275
|
+
text: string;
|
|
276
|
+
|
|
277
|
+
type: 'text';
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
export interface ToolCall {
|
|
281
|
+
state: 'call';
|
|
282
|
+
|
|
283
|
+
toolCallId: string;
|
|
284
|
+
|
|
285
|
+
toolName: string;
|
|
286
|
+
|
|
287
|
+
args?: unknown;
|
|
288
|
+
|
|
289
|
+
step?: number;
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
export interface ToolInvocationPart {
|
|
293
|
+
toolInvocation: ToolCall | ToolPartialCall | ToolResult;
|
|
294
|
+
|
|
295
|
+
type: 'tool-invocation';
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
export interface ToolPartialCall {
|
|
299
|
+
state: 'partial-call';
|
|
300
|
+
|
|
301
|
+
toolCallId: string;
|
|
302
|
+
|
|
303
|
+
toolName: string;
|
|
304
|
+
|
|
305
|
+
args?: unknown;
|
|
306
|
+
|
|
307
|
+
step?: number;
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
export interface ToolResult {
|
|
311
|
+
result: string;
|
|
312
|
+
|
|
313
|
+
state: 'result';
|
|
314
|
+
|
|
315
|
+
toolCallId: string;
|
|
316
|
+
|
|
317
|
+
toolName: string;
|
|
318
|
+
|
|
319
|
+
args?: unknown;
|
|
320
|
+
|
|
321
|
+
step?: number;
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
export type SessionListResponse = Array<Session>;
|
|
325
|
+
|
|
326
|
+
export type SessionDeleteResponse = boolean;
|
|
327
|
+
|
|
328
|
+
export type SessionAbortResponse = boolean;
|
|
329
|
+
|
|
330
|
+
export type SessionInitResponse = boolean;
|
|
331
|
+
|
|
332
|
+
export type SessionMessagesResponse = Array<Message>;
|
|
333
|
+
|
|
334
|
+
export type SessionSummarizeResponse = boolean;
|
|
335
|
+
|
|
336
|
+
export interface SessionChatParams {
|
|
337
|
+
modelID: string;
|
|
338
|
+
|
|
339
|
+
parts: Array<MessagePart>;
|
|
340
|
+
|
|
341
|
+
providerID: string;
|
|
342
|
+
|
|
343
|
+
sessionID: string;
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
export interface SessionInitParams {
|
|
347
|
+
modelID: string;
|
|
348
|
+
|
|
349
|
+
providerID: string;
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
export interface SessionSummarizeParams {
|
|
353
|
+
modelID: string;
|
|
354
|
+
|
|
355
|
+
providerID: string;
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
export declare namespace SessionResource {
|
|
359
|
+
export {
|
|
360
|
+
type FilePart as FilePart,
|
|
361
|
+
type Message as Message,
|
|
362
|
+
type MessagePart as MessagePart,
|
|
363
|
+
type ReasoningPart as ReasoningPart,
|
|
364
|
+
type Session as Session,
|
|
365
|
+
type SourceURLPart as SourceURLPart,
|
|
366
|
+
type StepStartPart as StepStartPart,
|
|
367
|
+
type TextPart as TextPart,
|
|
368
|
+
type ToolCall as ToolCall,
|
|
369
|
+
type ToolInvocationPart as ToolInvocationPart,
|
|
370
|
+
type ToolPartialCall as ToolPartialCall,
|
|
371
|
+
type ToolResult as ToolResult,
|
|
372
|
+
type SessionListResponse as SessionListResponse,
|
|
373
|
+
type SessionDeleteResponse as SessionDeleteResponse,
|
|
374
|
+
type SessionAbortResponse as SessionAbortResponse,
|
|
375
|
+
type SessionInitResponse as SessionInitResponse,
|
|
376
|
+
type SessionMessagesResponse as SessionMessagesResponse,
|
|
377
|
+
type SessionSummarizeResponse as SessionSummarizeResponse,
|
|
378
|
+
type SessionChatParams as SessionChatParams,
|
|
379
|
+
type SessionInitParams as SessionInitParams,
|
|
380
|
+
type SessionSummarizeParams as SessionSummarizeParams,
|
|
381
|
+
};
|
|
382
|
+
}
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '0.1.0-alpha.
|
|
1
|
+
export const VERSION = '0.1.0-alpha.4'; // x-release-please-version
|
package/version.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.1.0-alpha.
|
|
1
|
+
export declare const VERSION = "0.1.0-alpha.4";
|
|
2
2
|
//# sourceMappingURL=version.d.mts.map
|
package/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.1.0-alpha.
|
|
1
|
+
export declare const VERSION = "0.1.0-alpha.4";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/version.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.VERSION = void 0;
|
|
4
|
-
exports.VERSION = '0.1.0-alpha.
|
|
4
|
+
exports.VERSION = '0.1.0-alpha.4'; // x-release-please-version
|
|
5
5
|
//# sourceMappingURL=version.js.map
|
package/version.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = '0.1.0-alpha.
|
|
1
|
+
export const VERSION = '0.1.0-alpha.4'; // x-release-please-version
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|
package/resources/app-info.d.mts
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { APIResource } from "../core/resource.mjs";
|
|
2
|
-
import { APIPromise } from "../core/api-promise.mjs";
|
|
3
|
-
import { RequestOptions } from "../internal/request-options.mjs";
|
|
4
|
-
export declare class AppInfo extends APIResource {
|
|
5
|
-
/**
|
|
6
|
-
* Get app info
|
|
7
|
-
*/
|
|
8
|
-
create(options?: RequestOptions): APIPromise<AppInfoCreateResponse>;
|
|
9
|
-
}
|
|
10
|
-
export interface AppInfoCreateResponse {
|
|
11
|
-
git: boolean;
|
|
12
|
-
path: AppInfoCreateResponse.Path;
|
|
13
|
-
time: AppInfoCreateResponse.Time;
|
|
14
|
-
user: string;
|
|
15
|
-
}
|
|
16
|
-
export declare namespace AppInfoCreateResponse {
|
|
17
|
-
interface Path {
|
|
18
|
-
config: string;
|
|
19
|
-
cwd: string;
|
|
20
|
-
data: string;
|
|
21
|
-
root: string;
|
|
22
|
-
state: string;
|
|
23
|
-
}
|
|
24
|
-
interface Time {
|
|
25
|
-
initialized?: number;
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
export declare namespace AppInfo {
|
|
29
|
-
export { type AppInfoCreateResponse as AppInfoCreateResponse };
|
|
30
|
-
}
|
|
31
|
-
//# sourceMappingURL=app-info.d.mts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"app-info.d.mts","sourceRoot":"","sources":["../src/resources/app-info.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAEzB,qBAAa,OAAQ,SAAQ,WAAW;IACtC;;OAEG;IACH,MAAM,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,qBAAqB,CAAC;CAGpE;AAED,MAAM,WAAW,qBAAqB;IACpC,GAAG,EAAE,OAAO,CAAC;IAEb,IAAI,EAAE,qBAAqB,CAAC,IAAI,CAAC;IAEjC,IAAI,EAAE,qBAAqB,CAAC,IAAI,CAAC;IAEjC,IAAI,EAAE,MAAM,CAAC;CACd;AAED,yBAAiB,qBAAqB,CAAC;IACrC,UAAiB,IAAI;QACnB,MAAM,EAAE,MAAM,CAAC;QAEf,GAAG,EAAE,MAAM,CAAC;QAEZ,IAAI,EAAE,MAAM,CAAC;QAEb,IAAI,EAAE,MAAM,CAAC;QAEb,KAAK,EAAE,MAAM,CAAC;KACf;IAED,UAAiB,IAAI;QACnB,WAAW,CAAC,EAAE,MAAM,CAAC;KACtB;CACF;AAED,MAAM,CAAC,OAAO,WAAW,OAAO,CAAC;IAC/B,OAAO,EAAE,KAAK,qBAAqB,IAAI,qBAAqB,EAAE,CAAC;CAChE"}
|
package/resources/app-info.d.ts
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { APIResource } from "../core/resource.js";
|
|
2
|
-
import { APIPromise } from "../core/api-promise.js";
|
|
3
|
-
import { RequestOptions } from "../internal/request-options.js";
|
|
4
|
-
export declare class AppInfo extends APIResource {
|
|
5
|
-
/**
|
|
6
|
-
* Get app info
|
|
7
|
-
*/
|
|
8
|
-
create(options?: RequestOptions): APIPromise<AppInfoCreateResponse>;
|
|
9
|
-
}
|
|
10
|
-
export interface AppInfoCreateResponse {
|
|
11
|
-
git: boolean;
|
|
12
|
-
path: AppInfoCreateResponse.Path;
|
|
13
|
-
time: AppInfoCreateResponse.Time;
|
|
14
|
-
user: string;
|
|
15
|
-
}
|
|
16
|
-
export declare namespace AppInfoCreateResponse {
|
|
17
|
-
interface Path {
|
|
18
|
-
config: string;
|
|
19
|
-
cwd: string;
|
|
20
|
-
data: string;
|
|
21
|
-
root: string;
|
|
22
|
-
state: string;
|
|
23
|
-
}
|
|
24
|
-
interface Time {
|
|
25
|
-
initialized?: number;
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
export declare namespace AppInfo {
|
|
29
|
-
export { type AppInfoCreateResponse as AppInfoCreateResponse };
|
|
30
|
-
}
|
|
31
|
-
//# sourceMappingURL=app-info.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"app-info.d.ts","sourceRoot":"","sources":["../src/resources/app-info.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAEzB,qBAAa,OAAQ,SAAQ,WAAW;IACtC;;OAEG;IACH,MAAM,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,qBAAqB,CAAC;CAGpE;AAED,MAAM,WAAW,qBAAqB;IACpC,GAAG,EAAE,OAAO,CAAC;IAEb,IAAI,EAAE,qBAAqB,CAAC,IAAI,CAAC;IAEjC,IAAI,EAAE,qBAAqB,CAAC,IAAI,CAAC;IAEjC,IAAI,EAAE,MAAM,CAAC;CACd;AAED,yBAAiB,qBAAqB,CAAC;IACrC,UAAiB,IAAI;QACnB,MAAM,EAAE,MAAM,CAAC;QAEf,GAAG,EAAE,MAAM,CAAC;QAEZ,IAAI,EAAE,MAAM,CAAC;QAEb,IAAI,EAAE,MAAM,CAAC;QAEb,KAAK,EAAE,MAAM,CAAC;KACf;IAED,UAAiB,IAAI;QACnB,WAAW,CAAC,EAAE,MAAM,CAAC;KACtB;CACF;AAED,MAAM,CAAC,OAAO,WAAW,OAAO,CAAC;IAC/B,OAAO,EAAE,KAAK,qBAAqB,IAAI,qBAAqB,EAAE,CAAC;CAChE"}
|
package/resources/app-info.js
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.AppInfo = void 0;
|
|
5
|
-
const resource_1 = require("../core/resource.js");
|
|
6
|
-
class AppInfo extends resource_1.APIResource {
|
|
7
|
-
/**
|
|
8
|
-
* Get app info
|
|
9
|
-
*/
|
|
10
|
-
create(options) {
|
|
11
|
-
return this._client.post('/app_info', options);
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
exports.AppInfo = AppInfo;
|
|
15
|
-
//# sourceMappingURL=app-info.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"app-info.js","sourceRoot":"","sources":["../src/resources/app-info.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAI/C,MAAa,OAAQ,SAAQ,sBAAW;IACtC;;OAEG;IACH,MAAM,CAAC,OAAwB;QAC7B,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC;IACjD,CAAC;CACF;AAPD,0BAOC"}
|