@opencode-ai/sdk 0.1.0-alpha.14 → 0.1.0-alpha.16
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 +26 -0
- package/client.d.mts +17 -14
- package/client.d.mts.map +1 -1
- package/client.d.ts +17 -14
- package/client.d.ts.map +1 -1
- package/client.js +12 -9
- package/client.js.map +1 -1
- package/client.mjs +14 -11
- 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/app.d.mts +49 -2
- package/resources/app.d.mts.map +1 -1
- package/resources/app.d.ts +49 -2
- package/resources/app.d.ts.map +1 -1
- package/resources/app.js +12 -0
- package/resources/app.js.map +1 -1
- package/resources/app.mjs +12 -0
- package/resources/app.mjs.map +1 -1
- package/resources/config.d.mts +120 -34
- package/resources/config.d.mts.map +1 -1
- package/resources/config.d.ts +120 -34
- package/resources/config.d.ts.map +1 -1
- package/resources/config.js.map +1 -1
- package/resources/config.mjs.map +1 -1
- package/resources/event.d.mts +14 -15
- package/resources/event.d.mts.map +1 -1
- package/resources/event.d.ts +14 -15
- package/resources/event.d.ts.map +1 -1
- package/resources/file.d.mts +10 -12
- package/resources/file.d.mts.map +1 -1
- package/resources/file.d.ts +10 -12
- package/resources/file.d.ts.map +1 -1
- package/resources/file.js +3 -3
- package/resources/file.js.map +1 -1
- package/resources/file.mjs +1 -1
- package/resources/file.mjs.map +1 -1
- package/resources/find.d.mts +48 -23
- package/resources/find.d.mts.map +1 -1
- package/resources/find.d.ts +48 -23
- package/resources/find.d.ts.map +1 -1
- package/resources/index.d.mts +4 -4
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +4 -4
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +2 -2
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +2 -2
- package/resources/index.mjs.map +1 -1
- package/resources/session.d.mts +169 -110
- package/resources/session.d.mts.map +1 -1
- package/resources/session.d.ts +169 -110
- package/resources/session.d.ts.map +1 -1
- package/resources/session.js.map +1 -1
- package/resources/session.mjs.map +1 -1
- package/resources/shared.d.mts +4 -0
- package/resources/shared.d.mts.map +1 -1
- package/resources/shared.d.ts +4 -0
- package/resources/shared.d.ts.map +1 -1
- package/src/client.ts +65 -32
- 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/app.ts +72 -3
- package/src/resources/config.ts +139 -34
- package/src/resources/event.ts +21 -19
- package/src/resources/file.ts +14 -15
- package/src/resources/find.ts +60 -22
- package/src/resources/index.ts +28 -9
- package/src/resources/session.ts +211 -122
- package/src/resources/shared.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
package/resources/find.d.mts
CHANGED
|
@@ -15,36 +15,61 @@ export declare class Find extends APIResource {
|
|
|
15
15
|
*/
|
|
16
16
|
text(query: FindTextParams, options?: RequestOptions): APIPromise<FindTextResponse>;
|
|
17
17
|
}
|
|
18
|
-
export
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
18
|
+
export interface Match {
|
|
19
|
+
absolute_offset: number;
|
|
20
|
+
line_number: number;
|
|
21
|
+
lines: Match.Lines;
|
|
22
|
+
path: Match.Path;
|
|
23
|
+
submatches: Array<Match.Submatch>;
|
|
24
|
+
}
|
|
25
|
+
export declare namespace Match {
|
|
26
|
+
interface Lines {
|
|
27
|
+
text: string;
|
|
28
28
|
}
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
29
|
+
interface Path {
|
|
30
|
+
text: string;
|
|
31
|
+
}
|
|
32
|
+
interface Submatch {
|
|
33
|
+
end: number;
|
|
34
|
+
match: Submatch.Match;
|
|
35
|
+
start: number;
|
|
36
|
+
}
|
|
37
|
+
namespace Submatch {
|
|
38
|
+
interface Match {
|
|
34
39
|
text: string;
|
|
35
40
|
}
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
export interface Symbol {
|
|
44
|
+
kind: number;
|
|
45
|
+
location: Symbol.Location;
|
|
46
|
+
name: string;
|
|
47
|
+
}
|
|
48
|
+
export declare namespace Symbol {
|
|
49
|
+
interface Location {
|
|
50
|
+
range: Location.Range;
|
|
51
|
+
uri: string;
|
|
52
|
+
}
|
|
53
|
+
namespace Location {
|
|
54
|
+
interface Range {
|
|
55
|
+
end: Range.End;
|
|
56
|
+
start: Range.Start;
|
|
40
57
|
}
|
|
41
|
-
namespace
|
|
42
|
-
interface
|
|
43
|
-
|
|
58
|
+
namespace Range {
|
|
59
|
+
interface End {
|
|
60
|
+
character: number;
|
|
61
|
+
line: number;
|
|
62
|
+
}
|
|
63
|
+
interface Start {
|
|
64
|
+
character: number;
|
|
65
|
+
line: number;
|
|
44
66
|
}
|
|
45
67
|
}
|
|
46
68
|
}
|
|
47
69
|
}
|
|
70
|
+
export type FindFilesResponse = Array<string>;
|
|
71
|
+
export type FindSymbolsResponse = Array<Symbol>;
|
|
72
|
+
export type FindTextResponse = Array<Match>;
|
|
48
73
|
export interface FindFilesParams {
|
|
49
74
|
query: string;
|
|
50
75
|
}
|
|
@@ -55,6 +80,6 @@ export interface FindTextParams {
|
|
|
55
80
|
pattern: string;
|
|
56
81
|
}
|
|
57
82
|
export declare namespace Find {
|
|
58
|
-
export { type FindFilesResponse as FindFilesResponse, type FindSymbolsResponse as FindSymbolsResponse, type FindTextResponse as FindTextResponse, type FindFilesParams as FindFilesParams, type FindSymbolsParams as FindSymbolsParams, type FindTextParams as FindTextParams, };
|
|
83
|
+
export { type Match as Match, type Symbol as Symbol, type FindFilesResponse as FindFilesResponse, type FindSymbolsResponse as FindSymbolsResponse, type FindTextResponse as FindTextResponse, type FindFilesParams as FindFilesParams, type FindSymbolsParams as FindSymbolsParams, type FindTextParams as FindTextParams, };
|
|
59
84
|
}
|
|
60
85
|
//# sourceMappingURL=find.d.mts.map
|
package/resources/find.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"find.d.mts","sourceRoot":"","sources":["../src/resources/find.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAEzB,qBAAa,IAAK,SAAQ,WAAW;IACnC;;OAEG;IACH,KAAK,CAAC,KAAK,EAAE,eAAe,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,iBAAiB,CAAC;IAItF;;OAEG;IACH,OAAO,CAAC,KAAK,EAAE,iBAAiB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,mBAAmB,CAAC;IAI5F;;OAEG;IACH,IAAI,CAAC,KAAK,EAAE,cAAc,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,gBAAgB,CAAC;CAGpF;AAED,MAAM,
|
|
1
|
+
{"version":3,"file":"find.d.mts","sourceRoot":"","sources":["../src/resources/find.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;A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iB,QAAQ,CAAC;QACxB,UAAiB,KAAK;YACpB,GAAG,EAAE,KAAK,CAAC,GAAG,CAAC;YAEf,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC;SACpB;QAED,UAAiB,KAAK,CAAC;YACrB,UAAiB,GAAG;gBAClB,SAAS,EAAE,MAAM,CAAC;gBAElB,IAAI,EAAE,MAAM,CAAC;aACd;YAED,UAAiB,KAAK;gBACpB,SAAS,EAAE,MAAM,CAAC;gBAElB,IAAI,EAAE,MAAM,CAAC;aACd;SACF;KACF;CACF;AAED,MAAM,MAAM,iBAAiB,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC;AAE9C,MAAM,MAAM,mBAAmB,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC;AAEhD,MAAM,MAAM,gBAAgB,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC;AAE5C,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,iBAAiB;IAChC,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,cAAc;IAC7B,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,CAAC,OAAO,WAAW,IAAI,CAAC;IAC5B,OAAO,EACL,KAAK,KAAK,IAAI,KAAK,EACnB,KAAK,MAAM,IAAI,MAAM,EACrB,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,eAAe,IAAI,eAAe,EACvC,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,cAAc,IAAI,cAAc,GACtC,CAAC;CACH"}
|
package/resources/find.d.ts
CHANGED
|
@@ -15,36 +15,61 @@ export declare class Find extends APIResource {
|
|
|
15
15
|
*/
|
|
16
16
|
text(query: FindTextParams, options?: RequestOptions): APIPromise<FindTextResponse>;
|
|
17
17
|
}
|
|
18
|
-
export
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
18
|
+
export interface Match {
|
|
19
|
+
absolute_offset: number;
|
|
20
|
+
line_number: number;
|
|
21
|
+
lines: Match.Lines;
|
|
22
|
+
path: Match.Path;
|
|
23
|
+
submatches: Array<Match.Submatch>;
|
|
24
|
+
}
|
|
25
|
+
export declare namespace Match {
|
|
26
|
+
interface Lines {
|
|
27
|
+
text: string;
|
|
28
28
|
}
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
29
|
+
interface Path {
|
|
30
|
+
text: string;
|
|
31
|
+
}
|
|
32
|
+
interface Submatch {
|
|
33
|
+
end: number;
|
|
34
|
+
match: Submatch.Match;
|
|
35
|
+
start: number;
|
|
36
|
+
}
|
|
37
|
+
namespace Submatch {
|
|
38
|
+
interface Match {
|
|
34
39
|
text: string;
|
|
35
40
|
}
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
export interface Symbol {
|
|
44
|
+
kind: number;
|
|
45
|
+
location: Symbol.Location;
|
|
46
|
+
name: string;
|
|
47
|
+
}
|
|
48
|
+
export declare namespace Symbol {
|
|
49
|
+
interface Location {
|
|
50
|
+
range: Location.Range;
|
|
51
|
+
uri: string;
|
|
52
|
+
}
|
|
53
|
+
namespace Location {
|
|
54
|
+
interface Range {
|
|
55
|
+
end: Range.End;
|
|
56
|
+
start: Range.Start;
|
|
40
57
|
}
|
|
41
|
-
namespace
|
|
42
|
-
interface
|
|
43
|
-
|
|
58
|
+
namespace Range {
|
|
59
|
+
interface End {
|
|
60
|
+
character: number;
|
|
61
|
+
line: number;
|
|
62
|
+
}
|
|
63
|
+
interface Start {
|
|
64
|
+
character: number;
|
|
65
|
+
line: number;
|
|
44
66
|
}
|
|
45
67
|
}
|
|
46
68
|
}
|
|
47
69
|
}
|
|
70
|
+
export type FindFilesResponse = Array<string>;
|
|
71
|
+
export type FindSymbolsResponse = Array<Symbol>;
|
|
72
|
+
export type FindTextResponse = Array<Match>;
|
|
48
73
|
export interface FindFilesParams {
|
|
49
74
|
query: string;
|
|
50
75
|
}
|
|
@@ -55,6 +80,6 @@ export interface FindTextParams {
|
|
|
55
80
|
pattern: string;
|
|
56
81
|
}
|
|
57
82
|
export declare namespace Find {
|
|
58
|
-
export { type FindFilesResponse as FindFilesResponse, type FindSymbolsResponse as FindSymbolsResponse, type FindTextResponse as FindTextResponse, type FindFilesParams as FindFilesParams, type FindSymbolsParams as FindSymbolsParams, type FindTextParams as FindTextParams, };
|
|
83
|
+
export { type Match as Match, type Symbol as Symbol, type FindFilesResponse as FindFilesResponse, type FindSymbolsResponse as FindSymbolsResponse, type FindTextResponse as FindTextResponse, type FindFilesParams as FindFilesParams, type FindSymbolsParams as FindSymbolsParams, type FindTextParams as FindTextParams, };
|
|
59
84
|
}
|
|
60
85
|
//# sourceMappingURL=find.d.ts.map
|
package/resources/find.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"find.d.ts","sourceRoot":"","sources":["../src/resources/find.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAEzB,qBAAa,IAAK,SAAQ,WAAW;IACnC;;OAEG;IACH,KAAK,CAAC,KAAK,EAAE,eAAe,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,iBAAiB,CAAC;IAItF;;OAEG;IACH,OAAO,CAAC,KAAK,EAAE,iBAAiB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,mBAAmB,CAAC;IAI5F;;OAEG;IACH,IAAI,CAAC,KAAK,EAAE,cAAc,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,gBAAgB,CAAC;CAGpF;AAED,MAAM,
|
|
1
|
+
{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1
|
export * from "./shared.mjs";
|
|
2
|
-
export { AppResource, type App, type AppInitResponse } from "./app.mjs";
|
|
2
|
+
export { AppResource, type App, type LogLevel, type Mode, type AppInitResponse, type AppLogResponse, type AppModesResponse, type AppLogParams, } from "./app.mjs";
|
|
3
3
|
export { ConfigResource, type Config, type Keybinds, type McpLocal, type McpRemote, type Model, type Provider, type ConfigProvidersResponse, } from "./config.mjs";
|
|
4
4
|
export { Event, type EventListResponse } from "./event.mjs";
|
|
5
|
-
export { File, type FileReadResponse, type FileStatusResponse, type FileReadParams } from "./file.mjs";
|
|
6
|
-
export { Find, type FindFilesResponse, type FindSymbolsResponse, type FindTextResponse, type FindFilesParams, type FindSymbolsParams, type FindTextParams, } from "./find.mjs";
|
|
7
|
-
export { SessionResource, type
|
|
5
|
+
export { FileResource, type File, type FileReadResponse, type FileStatusResponse, type FileReadParams, } from "./file.mjs";
|
|
6
|
+
export { Find, type Match, type Symbol, type FindFilesResponse, type FindSymbolsResponse, type FindTextResponse, type FindFilesParams, type FindSymbolsParams, type FindTextParams, } from "./find.mjs";
|
|
7
|
+
export { SessionResource, type AssistantMessage, type FilePart, type Message, type Part, type Session, type StepFinishPart, type StepStartPart, type TextPart, type ToolPart, type ToolStateCompleted, type ToolStateError, type ToolStatePending, type ToolStateRunning, type UserMessage, type SessionListResponse, type SessionDeleteResponse, type SessionAbortResponse, type SessionInitResponse, type SessionMessagesResponse, type SessionSummarizeResponse, type SessionChatParams, type SessionInitParams, type SessionSummarizeParams, } from "./session.mjs";
|
|
8
8
|
//# sourceMappingURL=index.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":";OAGO,
|
|
1
|
+
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":";OAGO,EACL,WAAW,EACX,KAAK,GAAG,EACR,KAAK,QAAQ,EACb,KAAK,IAAI,EACT,KAAK,eAAe,EACpB,KAAK,cAAc,EACnB,KAAK,gBAAgB,EACrB,KAAK,YAAY,GAClB;OACM,EACL,cAAc,EACd,KAAK,MAAM,EACX,KAAK,QAAQ,EACb,KAAK,QAAQ,EACb,KAAK,SAAS,EACd,KAAK,KAAK,EACV,KAAK,QAAQ,EACb,KAAK,uBAAuB,GAC7B;OACM,EAAE,KAAK,EAAE,KAAK,iBAAiB,EAAE;OACjC,EACL,YAAY,EACZ,KAAK,IAAI,EACT,KAAK,gBAAgB,EACrB,KAAK,kBAAkB,EACvB,KAAK,cAAc,GACpB;OACM,EACL,IAAI,EACJ,KAAK,KAAK,EACV,KAAK,MAAM,EACX,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,EACxB,KAAK,gBAAgB,EACrB,KAAK,eAAe,EACpB,KAAK,iBAAiB,EACtB,KAAK,cAAc,GACpB;OACM,EACL,eAAe,EACf,KAAK,gBAAgB,EACrB,KAAK,QAAQ,EACb,KAAK,OAAO,EACZ,KAAK,IAAI,EACT,KAAK,OAAO,EACZ,KAAK,cAAc,EACnB,KAAK,aAAa,EAClB,KAAK,QAAQ,EACb,KAAK,QAAQ,EACb,KAAK,kBAAkB,EACvB,KAAK,cAAc,EACnB,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACrB,KAAK,WAAW,EAChB,KAAK,mBAAmB,EACxB,KAAK,qBAAqB,EAC1B,KAAK,oBAAoB,EACzB,KAAK,mBAAmB,EACxB,KAAK,uBAAuB,EAC5B,KAAK,wBAAwB,EAC7B,KAAK,iBAAiB,EACtB,KAAK,iBAAiB,EACtB,KAAK,sBAAsB,GAC5B"}
|
package/resources/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
export * from "./shared.js";
|
|
2
|
-
export { AppResource, type App, type AppInitResponse } from "./app.js";
|
|
2
|
+
export { AppResource, type App, type LogLevel, type Mode, type AppInitResponse, type AppLogResponse, type AppModesResponse, type AppLogParams, } from "./app.js";
|
|
3
3
|
export { ConfigResource, type Config, type Keybinds, type McpLocal, type McpRemote, type Model, type Provider, type ConfigProvidersResponse, } from "./config.js";
|
|
4
4
|
export { Event, type EventListResponse } from "./event.js";
|
|
5
|
-
export { File, type FileReadResponse, type FileStatusResponse, type FileReadParams } from "./file.js";
|
|
6
|
-
export { Find, type FindFilesResponse, type FindSymbolsResponse, type FindTextResponse, type FindFilesParams, type FindSymbolsParams, type FindTextParams, } from "./find.js";
|
|
7
|
-
export { SessionResource, type
|
|
5
|
+
export { FileResource, type File, type FileReadResponse, type FileStatusResponse, type FileReadParams, } from "./file.js";
|
|
6
|
+
export { Find, type Match, type Symbol, type FindFilesResponse, type FindSymbolsResponse, type FindTextResponse, type FindFilesParams, type FindSymbolsParams, type FindTextParams, } from "./find.js";
|
|
7
|
+
export { SessionResource, type AssistantMessage, type FilePart, type Message, type Part, type Session, type StepFinishPart, type StepStartPart, type TextPart, type ToolPart, type ToolStateCompleted, type ToolStateError, type ToolStatePending, type ToolStateRunning, type UserMessage, type SessionListResponse, type SessionDeleteResponse, type SessionAbortResponse, type SessionInitResponse, type SessionMessagesResponse, type SessionSummarizeResponse, type SessionChatParams, type SessionInitParams, type SessionSummarizeParams, } from "./session.js";
|
|
8
8
|
//# sourceMappingURL=index.d.ts.map
|
package/resources/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":";OAGO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":";OAGO,EACL,WAAW,EACX,KAAK,GAAG,EACR,KAAK,QAAQ,EACb,KAAK,IAAI,EACT,KAAK,eAAe,EACpB,KAAK,cAAc,EACnB,KAAK,gBAAgB,EACrB,KAAK,YAAY,GAClB;OACM,EACL,cAAc,EACd,KAAK,MAAM,EACX,KAAK,QAAQ,EACb,KAAK,QAAQ,EACb,KAAK,SAAS,EACd,KAAK,KAAK,EACV,KAAK,QAAQ,EACb,KAAK,uBAAuB,GAC7B;OACM,EAAE,KAAK,EAAE,KAAK,iBAAiB,EAAE;OACjC,EACL,YAAY,EACZ,KAAK,IAAI,EACT,KAAK,gBAAgB,EACrB,KAAK,kBAAkB,EACvB,KAAK,cAAc,GACpB;OACM,EACL,IAAI,EACJ,KAAK,KAAK,EACV,KAAK,MAAM,EACX,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,EACxB,KAAK,gBAAgB,EACrB,KAAK,eAAe,EACpB,KAAK,iBAAiB,EACtB,KAAK,cAAc,GACpB;OACM,EACL,eAAe,EACf,KAAK,gBAAgB,EACrB,KAAK,QAAQ,EACb,KAAK,OAAO,EACZ,KAAK,IAAI,EACT,KAAK,OAAO,EACZ,KAAK,cAAc,EACnB,KAAK,aAAa,EAClB,KAAK,QAAQ,EACb,KAAK,QAAQ,EACb,KAAK,kBAAkB,EACvB,KAAK,cAAc,EACnB,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACrB,KAAK,WAAW,EAChB,KAAK,mBAAmB,EACxB,KAAK,qBAAqB,EAC1B,KAAK,oBAAoB,EACzB,KAAK,mBAAmB,EACxB,KAAK,uBAAuB,EAC5B,KAAK,wBAAwB,EAC7B,KAAK,iBAAiB,EACtB,KAAK,iBAAiB,EACtB,KAAK,sBAAsB,GAC5B"}
|
package/resources/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.SessionResource = exports.Find = exports.
|
|
4
|
+
exports.SessionResource = exports.Find = exports.FileResource = exports.Event = exports.ConfigResource = exports.AppResource = void 0;
|
|
5
5
|
const tslib_1 = require("../internal/tslib.js");
|
|
6
6
|
tslib_1.__exportStar(require("./shared.js"), exports);
|
|
7
7
|
var app_1 = require("./app.js");
|
|
@@ -11,7 +11,7 @@ Object.defineProperty(exports, "ConfigResource", { enumerable: true, get: functi
|
|
|
11
11
|
var event_1 = require("./event.js");
|
|
12
12
|
Object.defineProperty(exports, "Event", { enumerable: true, get: function () { return event_1.Event; } });
|
|
13
13
|
var file_1 = require("./file.js");
|
|
14
|
-
Object.defineProperty(exports, "
|
|
14
|
+
Object.defineProperty(exports, "FileResource", { enumerable: true, get: function () { return file_1.FileResource; } });
|
|
15
15
|
var find_1 = require("./find.js");
|
|
16
16
|
Object.defineProperty(exports, "Find", { enumerable: true, get: function () { return find_1.Find; } });
|
|
17
17
|
var session_1 = require("./session.js");
|
package/resources/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;AAEtF,sDAAyB;AACzB,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;AAEtF,sDAAyB;AACzB,gCASe;AARb,kGAAA,WAAW,OAAA;AASb,sCASkB;AARhB,wGAAA,cAAc,OAAA;AAShB,oCAAwD;AAA/C,8FAAA,KAAK,OAAA;AACd,kCAMgB;AALd,oGAAA,YAAY,OAAA;AAMd,kCAUgB;AATd,4FAAA,IAAI,OAAA;AAUN,wCAyBmB;AAxBjB,0GAAA,eAAe,OAAA"}
|
package/resources/index.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
export * from "./shared.mjs";
|
|
3
|
-
export { AppResource } from "./app.mjs";
|
|
3
|
+
export { AppResource, } from "./app.mjs";
|
|
4
4
|
export { ConfigResource, } from "./config.mjs";
|
|
5
5
|
export { Event } from "./event.mjs";
|
|
6
|
-
export {
|
|
6
|
+
export { FileResource, } from "./file.mjs";
|
|
7
7
|
export { Find, } from "./find.mjs";
|
|
8
8
|
export { SessionResource, } from "./session.mjs";
|
|
9
9
|
//# sourceMappingURL=index.mjs.map
|
package/resources/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;;OAG/E,
|
|
1
|
+
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;;OAG/E,EACL,WAAW,GAQZ;OACM,EACL,cAAc,GAQf;OACM,EAAE,KAAK,EAA0B;OACjC,EACL,YAAY,GAKb;OACM,EACL,IAAI,GASL;OACM,EACL,eAAe,GAwBhB"}
|
package/resources/session.d.mts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { APIResource } from "../core/resource.mjs";
|
|
2
|
+
import * as SessionAPI from "./session.mjs";
|
|
2
3
|
import * as Shared from "./shared.mjs";
|
|
3
4
|
import { APIPromise } from "../core/api-promise.mjs";
|
|
4
5
|
import { RequestOptions } from "../internal/request-options.mjs";
|
|
@@ -22,7 +23,7 @@ export declare class SessionResource extends APIResource {
|
|
|
22
23
|
/**
|
|
23
24
|
* Create and send a new message to a session
|
|
24
25
|
*/
|
|
25
|
-
chat(id: string, body: SessionChatParams, options?: RequestOptions): APIPromise<
|
|
26
|
+
chat(id: string, body: SessionChatParams, options?: RequestOptions): APIPromise<AssistantMessage>;
|
|
26
27
|
/**
|
|
27
28
|
* Analyze the app and create an AGENTS.md file
|
|
28
29
|
*/
|
|
@@ -44,87 +45,66 @@ export declare class SessionResource extends APIResource {
|
|
|
44
45
|
*/
|
|
45
46
|
unshare(id: string, options?: RequestOptions): APIPromise<Session>;
|
|
46
47
|
}
|
|
48
|
+
export interface AssistantMessage {
|
|
49
|
+
id: string;
|
|
50
|
+
cost: number;
|
|
51
|
+
modelID: string;
|
|
52
|
+
path: AssistantMessage.Path;
|
|
53
|
+
providerID: string;
|
|
54
|
+
role: 'assistant';
|
|
55
|
+
sessionID: string;
|
|
56
|
+
system: Array<string>;
|
|
57
|
+
time: AssistantMessage.Time;
|
|
58
|
+
tokens: AssistantMessage.Tokens;
|
|
59
|
+
error?: Shared.ProviderAuthError | Shared.UnknownError | AssistantMessage.MessageOutputLengthError | Shared.MessageAbortedError;
|
|
60
|
+
summary?: boolean;
|
|
61
|
+
}
|
|
62
|
+
export declare namespace AssistantMessage {
|
|
63
|
+
interface Path {
|
|
64
|
+
cwd: string;
|
|
65
|
+
root: string;
|
|
66
|
+
}
|
|
67
|
+
interface Time {
|
|
68
|
+
created: number;
|
|
69
|
+
completed?: number;
|
|
70
|
+
}
|
|
71
|
+
interface Tokens {
|
|
72
|
+
cache: Tokens.Cache;
|
|
73
|
+
input: number;
|
|
74
|
+
output: number;
|
|
75
|
+
reasoning: number;
|
|
76
|
+
}
|
|
77
|
+
namespace Tokens {
|
|
78
|
+
interface Cache {
|
|
79
|
+
read: number;
|
|
80
|
+
write: number;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
interface MessageOutputLengthError {
|
|
84
|
+
data: unknown;
|
|
85
|
+
name: 'MessageOutputLengthError';
|
|
86
|
+
}
|
|
87
|
+
}
|
|
47
88
|
export interface FilePart {
|
|
48
|
-
|
|
89
|
+
id: string;
|
|
90
|
+
messageID: string;
|
|
91
|
+
mime: string;
|
|
92
|
+
sessionID: string;
|
|
49
93
|
type: 'file';
|
|
50
94
|
url: string;
|
|
51
95
|
filename?: string;
|
|
52
96
|
}
|
|
53
|
-
export
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
export declare namespace Message {
|
|
60
|
-
interface Metadata {
|
|
97
|
+
export type Message = UserMessage | AssistantMessage;
|
|
98
|
+
export type Part = TextPart | FilePart | ToolPart | StepStartPart | StepFinishPart | Part.UnionMember5;
|
|
99
|
+
export declare namespace Part {
|
|
100
|
+
interface UnionMember5 {
|
|
101
|
+
id: string;
|
|
102
|
+
messageID: string;
|
|
61
103
|
sessionID: string;
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
[key: string]: Metadata.Tool;
|
|
65
|
-
};
|
|
66
|
-
assistant?: Metadata.Assistant;
|
|
67
|
-
error?: Shared.ProviderAuthError | Shared.UnknownError | Metadata.MessageOutputLengthError;
|
|
68
|
-
snapshot?: string;
|
|
69
|
-
}
|
|
70
|
-
namespace Metadata {
|
|
71
|
-
interface Time {
|
|
72
|
-
created: number;
|
|
73
|
-
completed?: number;
|
|
74
|
-
}
|
|
75
|
-
interface Tool {
|
|
76
|
-
time: Tool.Time;
|
|
77
|
-
title: string;
|
|
78
|
-
snapshot?: string;
|
|
79
|
-
[k: string]: unknown;
|
|
80
|
-
}
|
|
81
|
-
namespace Tool {
|
|
82
|
-
interface Time {
|
|
83
|
-
end: number;
|
|
84
|
-
start: number;
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
interface Assistant {
|
|
88
|
-
cost: number;
|
|
89
|
-
modelID: string;
|
|
90
|
-
path: Assistant.Path;
|
|
91
|
-
providerID: string;
|
|
92
|
-
system: Array<string>;
|
|
93
|
-
tokens: Assistant.Tokens;
|
|
94
|
-
summary?: boolean;
|
|
95
|
-
}
|
|
96
|
-
namespace Assistant {
|
|
97
|
-
interface Path {
|
|
98
|
-
cwd: string;
|
|
99
|
-
root: string;
|
|
100
|
-
}
|
|
101
|
-
interface Tokens {
|
|
102
|
-
cache: Tokens.Cache;
|
|
103
|
-
input: number;
|
|
104
|
-
output: number;
|
|
105
|
-
reasoning: number;
|
|
106
|
-
}
|
|
107
|
-
namespace Tokens {
|
|
108
|
-
interface Cache {
|
|
109
|
-
read: number;
|
|
110
|
-
write: number;
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
interface MessageOutputLengthError {
|
|
115
|
-
data: unknown;
|
|
116
|
-
name: 'MessageOutputLengthError';
|
|
117
|
-
}
|
|
104
|
+
snapshot: string;
|
|
105
|
+
type: 'snapshot';
|
|
118
106
|
}
|
|
119
107
|
}
|
|
120
|
-
export type MessagePart = TextPart | ReasoningPart | ToolInvocationPart | SourceURLPart | FilePart | StepStartPart;
|
|
121
|
-
export interface ReasoningPart {
|
|
122
|
-
text: string;
|
|
123
|
-
type: 'reasoning';
|
|
124
|
-
providerMetadata?: {
|
|
125
|
-
[key: string]: unknown;
|
|
126
|
-
};
|
|
127
|
-
}
|
|
128
108
|
export interface Session {
|
|
129
109
|
id: string;
|
|
130
110
|
time: Session.Time;
|
|
@@ -148,60 +128,139 @@ export declare namespace Session {
|
|
|
148
128
|
url: string;
|
|
149
129
|
}
|
|
150
130
|
}
|
|
151
|
-
export interface
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
131
|
+
export interface StepFinishPart {
|
|
132
|
+
id: string;
|
|
133
|
+
cost: number;
|
|
134
|
+
messageID: string;
|
|
135
|
+
sessionID: string;
|
|
136
|
+
tokens: StepFinishPart.Tokens;
|
|
137
|
+
type: 'step-finish';
|
|
138
|
+
}
|
|
139
|
+
export declare namespace StepFinishPart {
|
|
140
|
+
interface Tokens {
|
|
141
|
+
cache: Tokens.Cache;
|
|
142
|
+
input: number;
|
|
143
|
+
output: number;
|
|
144
|
+
reasoning: number;
|
|
145
|
+
}
|
|
146
|
+
namespace Tokens {
|
|
147
|
+
interface Cache {
|
|
148
|
+
read: number;
|
|
149
|
+
write: number;
|
|
150
|
+
}
|
|
151
|
+
}
|
|
159
152
|
}
|
|
160
153
|
export interface StepStartPart {
|
|
154
|
+
id: string;
|
|
155
|
+
messageID: string;
|
|
156
|
+
sessionID: string;
|
|
161
157
|
type: 'step-start';
|
|
162
158
|
}
|
|
163
159
|
export interface TextPart {
|
|
160
|
+
id: string;
|
|
161
|
+
messageID: string;
|
|
162
|
+
sessionID: string;
|
|
164
163
|
text: string;
|
|
165
164
|
type: 'text';
|
|
165
|
+
synthetic?: boolean;
|
|
166
|
+
time?: TextPart.Time;
|
|
167
|
+
}
|
|
168
|
+
export declare namespace TextPart {
|
|
169
|
+
interface Time {
|
|
170
|
+
start: number;
|
|
171
|
+
end?: number;
|
|
172
|
+
}
|
|
166
173
|
}
|
|
167
|
-
export interface
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
174
|
+
export interface ToolPart {
|
|
175
|
+
id: string;
|
|
176
|
+
callID: string;
|
|
177
|
+
messageID: string;
|
|
178
|
+
sessionID: string;
|
|
179
|
+
state: ToolStatePending | ToolStateRunning | ToolStateCompleted | ToolStateError;
|
|
180
|
+
tool: string;
|
|
181
|
+
type: 'tool';
|
|
182
|
+
}
|
|
183
|
+
export interface ToolStateCompleted {
|
|
184
|
+
input: {
|
|
185
|
+
[key: string]: unknown;
|
|
186
|
+
};
|
|
187
|
+
metadata: {
|
|
188
|
+
[key: string]: unknown;
|
|
189
|
+
};
|
|
190
|
+
output: string;
|
|
191
|
+
status: 'completed';
|
|
192
|
+
time: ToolStateCompleted.Time;
|
|
193
|
+
title: string;
|
|
194
|
+
}
|
|
195
|
+
export declare namespace ToolStateCompleted {
|
|
196
|
+
interface Time {
|
|
197
|
+
end: number;
|
|
198
|
+
start: number;
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
export interface ToolStateError {
|
|
202
|
+
error: string;
|
|
203
|
+
input: {
|
|
204
|
+
[key: string]: unknown;
|
|
205
|
+
};
|
|
206
|
+
status: 'error';
|
|
207
|
+
time: ToolStateError.Time;
|
|
208
|
+
}
|
|
209
|
+
export declare namespace ToolStateError {
|
|
210
|
+
interface Time {
|
|
211
|
+
end: number;
|
|
212
|
+
start: number;
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
export interface ToolStatePending {
|
|
216
|
+
status: 'pending';
|
|
217
|
+
}
|
|
218
|
+
export interface ToolStateRunning {
|
|
219
|
+
status: 'running';
|
|
220
|
+
time: ToolStateRunning.Time;
|
|
221
|
+
input?: unknown;
|
|
222
|
+
metadata?: {
|
|
223
|
+
[key: string]: unknown;
|
|
224
|
+
};
|
|
225
|
+
title?: string;
|
|
226
|
+
}
|
|
227
|
+
export declare namespace ToolStateRunning {
|
|
228
|
+
interface Time {
|
|
229
|
+
start: number;
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
export interface UserMessage {
|
|
233
|
+
id: string;
|
|
234
|
+
role: 'user';
|
|
235
|
+
sessionID: string;
|
|
236
|
+
time: UserMessage.Time;
|
|
237
|
+
}
|
|
238
|
+
export declare namespace UserMessage {
|
|
239
|
+
interface Time {
|
|
240
|
+
created: number;
|
|
241
|
+
}
|
|
192
242
|
}
|
|
193
243
|
export type SessionListResponse = Array<Session>;
|
|
194
244
|
export type SessionDeleteResponse = boolean;
|
|
195
245
|
export type SessionAbortResponse = boolean;
|
|
196
246
|
export type SessionInitResponse = boolean;
|
|
197
|
-
export type SessionMessagesResponse = Array<
|
|
247
|
+
export type SessionMessagesResponse = Array<SessionMessagesResponse.SessionMessagesResponseItem>;
|
|
248
|
+
export declare namespace SessionMessagesResponse {
|
|
249
|
+
interface SessionMessagesResponseItem {
|
|
250
|
+
info: SessionAPI.Message;
|
|
251
|
+
parts: Array<SessionAPI.Part>;
|
|
252
|
+
}
|
|
253
|
+
}
|
|
198
254
|
export type SessionSummarizeResponse = boolean;
|
|
199
255
|
export interface SessionChatParams {
|
|
256
|
+
messageID: string;
|
|
257
|
+
mode: string;
|
|
200
258
|
modelID: string;
|
|
201
|
-
parts: Array<
|
|
259
|
+
parts: Array<FilePart | TextPart>;
|
|
202
260
|
providerID: string;
|
|
203
261
|
}
|
|
204
262
|
export interface SessionInitParams {
|
|
263
|
+
messageID: string;
|
|
205
264
|
modelID: string;
|
|
206
265
|
providerID: string;
|
|
207
266
|
}
|
|
@@ -210,6 +269,6 @@ export interface SessionSummarizeParams {
|
|
|
210
269
|
providerID: string;
|
|
211
270
|
}
|
|
212
271
|
export declare namespace SessionResource {
|
|
213
|
-
export { type
|
|
272
|
+
export { type AssistantMessage as AssistantMessage, type FilePart as FilePart, type Message as Message, type Part as Part, type Session as Session, type StepFinishPart as StepFinishPart, type StepStartPart as StepStartPart, type TextPart as TextPart, type ToolPart as ToolPart, type ToolStateCompleted as ToolStateCompleted, type ToolStateError as ToolStateError, type ToolStatePending as ToolStatePending, type ToolStateRunning as ToolStateRunning, type UserMessage as UserMessage, type SessionListResponse as SessionListResponse, type SessionDeleteResponse as SessionDeleteResponse, type SessionAbortResponse as SessionAbortResponse, type SessionInitResponse as SessionInitResponse, type SessionMessagesResponse as SessionMessagesResponse, type SessionSummarizeResponse as SessionSummarizeResponse, type SessionChatParams as SessionChatParams, type SessionInitParams as SessionInitParams, type SessionSummarizeParams as SessionSummarizeParams, };
|
|
214
273
|
}
|
|
215
274
|
//# sourceMappingURL=session.d.mts.map
|