@opencode-ai/sdk 0.1.0-alpha.3 → 0.1.0-alpha.5

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