@opencode-ai/sdk 0.1.0-alpha.11 → 0.1.0-alpha.13
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 +21 -0
- package/client.d.mts +7 -2
- package/client.d.mts.map +1 -1
- package/client.d.ts +7 -2
- package/client.d.ts.map +1 -1
- package/client.js +3 -0
- package/client.js.map +1 -1
- package/client.mjs +3 -0
- package/client.mjs.map +1 -1
- package/core/streaming.d.mts +5 -3
- package/core/streaming.d.mts.map +1 -1
- package/core/streaming.d.ts +5 -3
- package/core/streaming.d.ts.map +1 -1
- package/core/streaming.js +16 -10
- package/core/streaming.js.map +1 -1
- package/core/streaming.mjs +16 -10
- package/core/streaming.mjs.map +1 -1
- package/internal/parse.js +2 -2
- package/internal/parse.js.map +1 -1
- package/internal/parse.mjs +2 -2
- package/internal/parse.mjs.map +1 -1
- package/internal/request-options.d.mts +42 -0
- package/internal/request-options.d.mts.map +1 -1
- package/internal/request-options.d.ts +42 -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/package.json +1 -1
- package/resources/event.d.mts +11 -1
- package/resources/event.d.mts.map +1 -1
- package/resources/event.d.ts +11 -1
- package/resources/event.d.ts.map +1 -1
- package/resources/file.d.mts +22 -6
- package/resources/file.d.mts.map +1 -1
- package/resources/file.d.ts +22 -6
- package/resources/file.d.ts.map +1 -1
- package/resources/file.js +8 -2
- package/resources/file.js.map +1 -1
- package/resources/file.mjs +8 -2
- package/resources/file.mjs.map +1 -1
- package/resources/find.d.mts +60 -0
- package/resources/find.d.mts.map +1 -0
- package/resources/find.d.ts +60 -0
- package/resources/find.d.ts.map +1 -0
- package/resources/find.js +27 -0
- package/resources/find.js.map +1 -0
- package/resources/find.mjs +23 -0
- package/resources/find.mjs.map +1 -0
- package/resources/index.d.mts +2 -1
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +2 -1
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +3 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +1 -0
- package/resources/index.mjs.map +1 -1
- package/resources/session.d.mts +4 -0
- package/resources/session.d.mts.map +1 -1
- package/resources/session.d.ts +4 -0
- package/resources/session.d.ts.map +1 -1
- package/src/client.ts +27 -3
- package/src/core/streaming.ts +22 -8
- package/src/internal/parse.ts +2 -2
- package/src/internal/request-options.ts +53 -0
- package/src/resources/event.ts +16 -1
- package/src/resources/file.ts +35 -6
- package/src/resources/find.ts +95 -0
- package/src/resources/index.ts +10 -1
- package/src/resources/session.ts +6 -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
|
@@ -0,0 +1,95 @@
|
|
|
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 Find extends APIResource {
|
|
8
|
+
/**
|
|
9
|
+
* Find files
|
|
10
|
+
*/
|
|
11
|
+
files(query: FindFilesParams, options?: RequestOptions): APIPromise<FindFilesResponse> {
|
|
12
|
+
return this._client.get('/find/file', { query, ...options });
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Find workspace symbols
|
|
17
|
+
*/
|
|
18
|
+
symbols(query: FindSymbolsParams, options?: RequestOptions): APIPromise<FindSymbolsResponse> {
|
|
19
|
+
return this._client.get('/find/symbol', { query, ...options });
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Find text in files
|
|
24
|
+
*/
|
|
25
|
+
text(query: FindTextParams, options?: RequestOptions): APIPromise<FindTextResponse> {
|
|
26
|
+
return this._client.get('/find', { query, ...options });
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export type FindFilesResponse = Array<string>;
|
|
31
|
+
|
|
32
|
+
export type FindSymbolsResponse = Array<unknown>;
|
|
33
|
+
|
|
34
|
+
export type FindTextResponse = Array<FindTextResponse.FindTextResponseItem>;
|
|
35
|
+
|
|
36
|
+
export namespace FindTextResponse {
|
|
37
|
+
export interface FindTextResponseItem {
|
|
38
|
+
absolute_offset: number;
|
|
39
|
+
|
|
40
|
+
line_number: number;
|
|
41
|
+
|
|
42
|
+
lines: FindTextResponseItem.Lines;
|
|
43
|
+
|
|
44
|
+
path: FindTextResponseItem.Path;
|
|
45
|
+
|
|
46
|
+
submatches: Array<FindTextResponseItem.Submatch>;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export namespace FindTextResponseItem {
|
|
50
|
+
export interface Lines {
|
|
51
|
+
text: string;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export interface Path {
|
|
55
|
+
text: string;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export interface Submatch {
|
|
59
|
+
end: number;
|
|
60
|
+
|
|
61
|
+
match: Submatch.Match;
|
|
62
|
+
|
|
63
|
+
start: number;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export namespace Submatch {
|
|
67
|
+
export interface Match {
|
|
68
|
+
text: string;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export interface FindFilesParams {
|
|
75
|
+
query: string;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
export interface FindSymbolsParams {
|
|
79
|
+
query: string;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
export interface FindTextParams {
|
|
83
|
+
pattern: string;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
export declare namespace Find {
|
|
87
|
+
export {
|
|
88
|
+
type FindFilesResponse as FindFilesResponse,
|
|
89
|
+
type FindSymbolsResponse as FindSymbolsResponse,
|
|
90
|
+
type FindTextResponse as FindTextResponse,
|
|
91
|
+
type FindFilesParams as FindFilesParams,
|
|
92
|
+
type FindSymbolsParams as FindSymbolsParams,
|
|
93
|
+
type FindTextParams as FindTextParams,
|
|
94
|
+
};
|
|
95
|
+
}
|
package/src/resources/index.ts
CHANGED
|
@@ -13,7 +13,16 @@ export {
|
|
|
13
13
|
type ConfigProvidersResponse,
|
|
14
14
|
} from './config';
|
|
15
15
|
export { Event, type EventListResponse } from './event';
|
|
16
|
-
export { File, type
|
|
16
|
+
export { File, type FileReadResponse, type FileStatusResponse, type FileReadParams } from './file';
|
|
17
|
+
export {
|
|
18
|
+
Find,
|
|
19
|
+
type FindFilesResponse,
|
|
20
|
+
type FindSymbolsResponse,
|
|
21
|
+
type FindTextResponse,
|
|
22
|
+
type FindFilesParams,
|
|
23
|
+
type FindSymbolsParams,
|
|
24
|
+
type FindTextParams,
|
|
25
|
+
} from './find';
|
|
17
26
|
export {
|
|
18
27
|
SessionResource,
|
|
19
28
|
type FilePart,
|
package/src/resources/session.ts
CHANGED
|
@@ -113,6 +113,8 @@ export namespace Message {
|
|
|
113
113
|
assistant?: Metadata.Assistant;
|
|
114
114
|
|
|
115
115
|
error?: Shared.ProviderAuthError | Shared.UnknownError | Metadata.MessageOutputLengthError;
|
|
116
|
+
|
|
117
|
+
user?: Metadata.User;
|
|
116
118
|
}
|
|
117
119
|
|
|
118
120
|
export namespace Metadata {
|
|
@@ -185,6 +187,10 @@ export namespace Message {
|
|
|
185
187
|
|
|
186
188
|
name: 'MessageOutputLengthError';
|
|
187
189
|
}
|
|
190
|
+
|
|
191
|
+
export interface User {
|
|
192
|
+
snapshot?: string;
|
|
193
|
+
}
|
|
188
194
|
}
|
|
189
195
|
}
|
|
190
196
|
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '0.1.0-alpha.
|
|
1
|
+
export const VERSION = '0.1.0-alpha.13'; // 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.13";
|
|
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.13";
|
|
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.13'; // 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.13'; // x-release-please-version
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|