@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.
- package/CHANGELOG.md +16 -0
- package/LICENSE +198 -4
- package/client.d.mts +14 -48
- package/client.d.mts.map +1 -1
- package/client.d.ts +14 -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/internal/tslib.js +22 -22
- 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 +22 -7
- package/resources/event.d.mts.map +1 -1
- package/resources/event.d.ts +22 -7
- package/resources/event.d.ts.map +1 -1
- package/resources/file.d.mts +17 -0
- package/resources/file.d.mts.map +1 -0
- package/resources/file.d.ts +17 -0
- package/resources/file.d.ts.map +1 -0
- package/resources/{file-search.js → file.js} +6 -6
- package/resources/file.js.map +1 -0
- package/resources/{file-search.mjs → file.mjs} +4 -4
- package/resources/file.mjs.map +1 -0
- package/resources/index.d.mts +5 -16
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +5 -16
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +11 -33
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +5 -16
- package/resources/index.mjs.map +1 -1
- package/resources/session.d.mts +208 -0
- package/resources/session.d.mts.map +1 -0
- package/resources/session.d.ts +208 -0
- package/resources/session.d.ts.map +1 -0
- package/resources/session.js +70 -0
- package/resources/session.js.map +1 -0
- package/resources/session.mjs +66 -0
- package/resources/session.mjs.map +1 -0
- package/resources/shared.d.mts +20 -0
- package/resources/shared.d.mts.map +1 -0
- package/resources/shared.d.ts +20 -0
- package/resources/shared.d.ts.map +1 -0
- package/resources/shared.js +4 -0
- package/resources/shared.js.map +1 -0
- package/resources/shared.mjs +3 -0
- package/resources/shared.mjs.map +1 -0
- package/src/client.ts +77 -121
- package/src/resources/app.ts +59 -0
- package/src/resources/config.ts +390 -0
- package/src/resources/event.ts +27 -6
- package/src/resources/file.ts +24 -0
- package/src/resources/index.ts +35 -33
- package/src/resources/session.ts +357 -0
- package/src/resources/shared.ts +27 -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/resources/event.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { APIResource } from "../core/resource.mjs";
|
|
2
|
-
import * as
|
|
3
|
-
import * as
|
|
2
|
+
import * as SessionAPI from "./session.mjs";
|
|
3
|
+
import * as Shared from "./shared.mjs";
|
|
4
4
|
import { APIPromise } from "../core/api-promise.mjs";
|
|
5
5
|
import { RequestOptions } from "../internal/request-options.mjs";
|
|
6
6
|
export declare class Event extends APIResource {
|
|
@@ -9,7 +9,7 @@ export declare class Event extends APIResource {
|
|
|
9
9
|
*/
|
|
10
10
|
list(options?: RequestOptions): APIPromise<EventListResponse>;
|
|
11
11
|
}
|
|
12
|
-
export type EventListResponse = EventListResponse.EventStorageWrite | EventListResponse.EventInstallationUpdated | EventListResponse.EventLspClientDiagnostics | EventListResponse.EventPermissionUpdated | EventListResponse.EventMessageUpdated | EventListResponse.EventMessagePartUpdated | EventListResponse.EventSessionUpdated | EventListResponse.EventSessionError;
|
|
12
|
+
export type EventListResponse = EventListResponse.EventStorageWrite | EventListResponse.EventInstallationUpdated | EventListResponse.EventLspClientDiagnostics | EventListResponse.EventPermissionUpdated | EventListResponse.EventMessageUpdated | EventListResponse.EventMessagePartUpdated | EventListResponse.EventSessionUpdated | EventListResponse.EventSessionDeleted | EventListResponse.EventSessionError;
|
|
13
13
|
export declare namespace EventListResponse {
|
|
14
14
|
interface EventStorageWrite {
|
|
15
15
|
properties: EventStorageWrite.Properties;
|
|
@@ -66,7 +66,7 @@ export declare namespace EventListResponse {
|
|
|
66
66
|
}
|
|
67
67
|
namespace EventMessageUpdated {
|
|
68
68
|
interface Properties {
|
|
69
|
-
info:
|
|
69
|
+
info: SessionAPI.Message;
|
|
70
70
|
}
|
|
71
71
|
}
|
|
72
72
|
interface EventMessagePartUpdated {
|
|
@@ -76,7 +76,7 @@ export declare namespace EventListResponse {
|
|
|
76
76
|
namespace EventMessagePartUpdated {
|
|
77
77
|
interface Properties {
|
|
78
78
|
messageID: string;
|
|
79
|
-
part:
|
|
79
|
+
part: SessionAPI.MessagePart;
|
|
80
80
|
sessionID: string;
|
|
81
81
|
}
|
|
82
82
|
}
|
|
@@ -86,7 +86,16 @@ export declare namespace EventListResponse {
|
|
|
86
86
|
}
|
|
87
87
|
namespace EventSessionUpdated {
|
|
88
88
|
interface Properties {
|
|
89
|
-
info:
|
|
89
|
+
info: SessionAPI.Session;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
interface EventSessionDeleted {
|
|
93
|
+
properties: EventSessionDeleted.Properties;
|
|
94
|
+
type: 'session.deleted';
|
|
95
|
+
}
|
|
96
|
+
namespace EventSessionDeleted {
|
|
97
|
+
interface Properties {
|
|
98
|
+
info: SessionAPI.Session;
|
|
90
99
|
}
|
|
91
100
|
}
|
|
92
101
|
interface EventSessionError {
|
|
@@ -95,7 +104,13 @@ export declare namespace EventListResponse {
|
|
|
95
104
|
}
|
|
96
105
|
namespace EventSessionError {
|
|
97
106
|
interface Properties {
|
|
98
|
-
error?:
|
|
107
|
+
error?: Shared.ProviderAuthError | Shared.UnknownError | Properties.MessageOutputLengthError;
|
|
108
|
+
}
|
|
109
|
+
namespace Properties {
|
|
110
|
+
interface MessageOutputLengthError {
|
|
111
|
+
data: unknown;
|
|
112
|
+
name: 'MessageOutputLengthError';
|
|
113
|
+
}
|
|
99
114
|
}
|
|
100
115
|
}
|
|
101
116
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"event.d.mts","sourceRoot":"","sources":["../src/resources/event.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,
|
|
1
|
+
{"version":3,"file":"event.d.mts","sourceRoot":"","sources":["../src/resources/event.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,UAAU;OACf,KAAK,MAAM;OACX,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAEzB,qBAAa,KAAM,SAAQ,WAAW;IACpC;;OAEG;IACH,IAAI,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,iBAAiB,CAAC;CAG9D;AAED,MAAM,MAAM,iBAAiB,GACzB,iBAAiB,CAAC,iBAAiB,GACnC,iBAAiB,CAAC,wBAAwB,GAC1C,iBAAiB,CAAC,yBAAyB,GAC3C,iBAAiB,CAAC,sBAAsB,GACxC,iBAAiB,CAAC,mBAAmB,GACrC,iBAAiB,CAAC,uBAAuB,GACzC,iBAAiB,CAAC,mBAAmB,GACrC,iBAAiB,CAAC,mBAAmB,GACrC,iBAAiB,CAAC,iBAAiB,CAAC;AAExC,yBAAiB,iBAAiB,CAAC;IACjC,UAAiB,iBAAiB;QAChC,UAAU,EAAE,iBAAiB,CAAC,UAAU,CAAC;QAEzC,IAAI,EAAE,eAAe,CAAC;KACvB;IAED,UAAiB,iBAAiB,CAAC;QACjC,UAAiB,UAAU;YACzB,GAAG,EAAE,MAAM,CAAC;YAEZ,OAAO,CAAC,EAAE,OAAO,CAAC;SACnB;KACF;IAED,UAAiB,wBAAwB;QACvC,UAAU,EAAE,wBAAwB,CAAC,UAAU,CAAC;QAEhD,IAAI,EAAE,sBAAsB,CAAC;KAC9B;IAED,UAAiB,wBAAwB,CAAC;QACxC,UAAiB,UAAU;YACzB,OAAO,EAAE,MAAM,CAAC;SACjB;KACF;IAED,UAAiB,yBAAyB;QAC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ACzB;IAED,UAAiB,mBAAmB,CAAC;QACnC,UAAiB,UAAU;YACzB,IAAI,EAAE,UAAU,CAAC,OAAO,CAAC;SAC1B;KACF;IAED,UAAiB,mBAAmB;QAClC,UAAU,EAAE,mBAAmB,CAAC,UAAU,CAAC;QAE3C,IAAI,EAAE,iBAAiB,CAAC;KACzB;IAED,UAAiB,mBAAmB,CAAC;QACnC,UAAiB,UAAU;YACzB,IAAI,EAAE,UAAU,CAAC,OAAO,CAAC;SAC1B;KACF;IAED,UAAiB,iBAAiB;QAChC,UAAU,EAAE,iBAAiB,CAAC,UAAU,CAAC;QAEzC,IAAI,EAAE,eAAe,CAAC;KACvB;IAED,UAAiB,iBAAiB,CAAC;QACjC,UAAiB,UAAU;YACzB,KAAK,CAAC,EAAE,MAAM,CAAC,iBAAiB,GAAG,MAAM,CAAC,YAAY,GAAG,UAAU,CAAC,wBAAwB,CAAC;SAC9F;QAED,UAAiB,UAAU,CAAC;YAC1B,UAAiB,wBAAwB;gBACvC,IAAI,EAAE,OAAO,CAAC;gBAEd,IAAI,EAAE,0BAA0B,CAAC;aAClC;SACF;KACF;CACF;AAED,MAAM,CAAC,OAAO,WAAW,KAAK,CAAC;IAC7B,OAAO,EAAE,KAAK,iBAAiB,IAAI,iBAAiB,EAAE,CAAC;CACxD"}
|
package/resources/event.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { APIResource } from "../core/resource.js";
|
|
2
|
-
import * as
|
|
3
|
-
import * as
|
|
2
|
+
import * as SessionAPI from "./session.js";
|
|
3
|
+
import * as Shared from "./shared.js";
|
|
4
4
|
import { APIPromise } from "../core/api-promise.js";
|
|
5
5
|
import { RequestOptions } from "../internal/request-options.js";
|
|
6
6
|
export declare class Event extends APIResource {
|
|
@@ -9,7 +9,7 @@ export declare class Event extends APIResource {
|
|
|
9
9
|
*/
|
|
10
10
|
list(options?: RequestOptions): APIPromise<EventListResponse>;
|
|
11
11
|
}
|
|
12
|
-
export type EventListResponse = EventListResponse.EventStorageWrite | EventListResponse.EventInstallationUpdated | EventListResponse.EventLspClientDiagnostics | EventListResponse.EventPermissionUpdated | EventListResponse.EventMessageUpdated | EventListResponse.EventMessagePartUpdated | EventListResponse.EventSessionUpdated | EventListResponse.EventSessionError;
|
|
12
|
+
export type EventListResponse = EventListResponse.EventStorageWrite | EventListResponse.EventInstallationUpdated | EventListResponse.EventLspClientDiagnostics | EventListResponse.EventPermissionUpdated | EventListResponse.EventMessageUpdated | EventListResponse.EventMessagePartUpdated | EventListResponse.EventSessionUpdated | EventListResponse.EventSessionDeleted | EventListResponse.EventSessionError;
|
|
13
13
|
export declare namespace EventListResponse {
|
|
14
14
|
interface EventStorageWrite {
|
|
15
15
|
properties: EventStorageWrite.Properties;
|
|
@@ -66,7 +66,7 @@ export declare namespace EventListResponse {
|
|
|
66
66
|
}
|
|
67
67
|
namespace EventMessageUpdated {
|
|
68
68
|
interface Properties {
|
|
69
|
-
info:
|
|
69
|
+
info: SessionAPI.Message;
|
|
70
70
|
}
|
|
71
71
|
}
|
|
72
72
|
interface EventMessagePartUpdated {
|
|
@@ -76,7 +76,7 @@ export declare namespace EventListResponse {
|
|
|
76
76
|
namespace EventMessagePartUpdated {
|
|
77
77
|
interface Properties {
|
|
78
78
|
messageID: string;
|
|
79
|
-
part:
|
|
79
|
+
part: SessionAPI.MessagePart;
|
|
80
80
|
sessionID: string;
|
|
81
81
|
}
|
|
82
82
|
}
|
|
@@ -86,7 +86,16 @@ export declare namespace EventListResponse {
|
|
|
86
86
|
}
|
|
87
87
|
namespace EventSessionUpdated {
|
|
88
88
|
interface Properties {
|
|
89
|
-
info:
|
|
89
|
+
info: SessionAPI.Session;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
interface EventSessionDeleted {
|
|
93
|
+
properties: EventSessionDeleted.Properties;
|
|
94
|
+
type: 'session.deleted';
|
|
95
|
+
}
|
|
96
|
+
namespace EventSessionDeleted {
|
|
97
|
+
interface Properties {
|
|
98
|
+
info: SessionAPI.Session;
|
|
90
99
|
}
|
|
91
100
|
}
|
|
92
101
|
interface EventSessionError {
|
|
@@ -95,7 +104,13 @@ export declare namespace EventListResponse {
|
|
|
95
104
|
}
|
|
96
105
|
namespace EventSessionError {
|
|
97
106
|
interface Properties {
|
|
98
|
-
error?:
|
|
107
|
+
error?: Shared.ProviderAuthError | Shared.UnknownError | Properties.MessageOutputLengthError;
|
|
108
|
+
}
|
|
109
|
+
namespace Properties {
|
|
110
|
+
interface MessageOutputLengthError {
|
|
111
|
+
data: unknown;
|
|
112
|
+
name: 'MessageOutputLengthError';
|
|
113
|
+
}
|
|
99
114
|
}
|
|
100
115
|
}
|
|
101
116
|
}
|
package/resources/event.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"event.d.ts","sourceRoot":"","sources":["../src/resources/event.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,
|
|
1
|
+
{"version":3,"file":"event.d.ts","sourceRoot":"","sources":["../src/resources/event.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,UAAU;OACf,KAAK,MAAM;OACX,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAEzB,qBAAa,KAAM,SAAQ,WAAW;IACpC;;OAEG;IACH,IAAI,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,iBAAiB,CAAC;CAG9D;AAED,MAAM,MAAM,iBAAiB,GACzB,iBAAiB,CAAC,iBAAiB,GACnC,iBAAiB,CAAC,wBAAwB,GAC1C,iBAAiB,CAAC,yBAAyB,GAC3C,iBAAiB,CAAC,sBAAsB,GACxC,iBAAiB,CAAC,mBAAmB,GACrC,iBAAiB,CAAC,uBAAuB,GACzC,iBAAiB,CAAC,mBAAmB,GACrC,iBAAiB,CAAC,mBAAmB,GACrC,iBAAiB,CAAC,iBAAiB,CAAC;AAExC,yBAAiB,iBAAiB,CAAC;IACjC,UAAiB,iBAAiB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|
@@ -0,0 +1,17 @@
|
|
|
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 File extends APIResource {
|
|
5
|
+
/**
|
|
6
|
+
* Search for files
|
|
7
|
+
*/
|
|
8
|
+
search(query: FileSearchParams, options?: RequestOptions): APIPromise<FileSearchResponse>;
|
|
9
|
+
}
|
|
10
|
+
export type FileSearchResponse = Array<string>;
|
|
11
|
+
export interface FileSearchParams {
|
|
12
|
+
query: string;
|
|
13
|
+
}
|
|
14
|
+
export declare namespace File {
|
|
15
|
+
export { type FileSearchResponse as FileSearchResponse, type FileSearchParams as FileSearchParams };
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=file.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"file.d.mts","sourceRoot":"","sources":["../src/resources/file.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAEzB,qBAAa,IAAK,SAAQ,WAAW;IACnC;;OAEG;IACH,MAAM,CAAC,KAAK,EAAE,gBAAgB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,kBAAkB,CAAC;CAG1F;AAED,MAAM,MAAM,kBAAkB,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC;AAE/C,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,CAAC,OAAO,WAAW,IAAI,CAAC;IAC5B,OAAO,EAAE,KAAK,kBAAkB,IAAI,kBAAkB,EAAE,KAAK,gBAAgB,IAAI,gBAAgB,EAAE,CAAC;CACrG"}
|
|
@@ -0,0 +1,17 @@
|
|
|
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 File extends APIResource {
|
|
5
|
+
/**
|
|
6
|
+
* Search for files
|
|
7
|
+
*/
|
|
8
|
+
search(query: FileSearchParams, options?: RequestOptions): APIPromise<FileSearchResponse>;
|
|
9
|
+
}
|
|
10
|
+
export type FileSearchResponse = Array<string>;
|
|
11
|
+
export interface FileSearchParams {
|
|
12
|
+
query: string;
|
|
13
|
+
}
|
|
14
|
+
export declare namespace File {
|
|
15
|
+
export { type FileSearchResponse as FileSearchResponse, type FileSearchParams as FileSearchParams };
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=file.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"file.d.ts","sourceRoot":"","sources":["../src/resources/file.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAEzB,qBAAa,IAAK,SAAQ,WAAW;IACnC;;OAEG;IACH,MAAM,CAAC,KAAK,EAAE,gBAAgB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,kBAAkB,CAAC;CAG1F;AAED,MAAM,MAAM,kBAAkB,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC;AAE/C,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,CAAC,OAAO,WAAW,IAAI,CAAC;IAC5B,OAAO,EAAE,KAAK,kBAAkB,IAAI,kBAAkB,EAAE,KAAK,gBAAgB,IAAI,gBAAgB,EAAE,CAAC;CACrG"}
|
|
@@ -1,15 +1,15 @@
|
|
|
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.
|
|
4
|
+
exports.File = void 0;
|
|
5
5
|
const resource_1 = require("../core/resource.js");
|
|
6
|
-
class
|
|
6
|
+
class File extends resource_1.APIResource {
|
|
7
7
|
/**
|
|
8
8
|
* Search for files
|
|
9
9
|
*/
|
|
10
|
-
search(
|
|
11
|
-
return this._client.
|
|
10
|
+
search(query, options) {
|
|
11
|
+
return this._client.get('/file', { query, ...options });
|
|
12
12
|
}
|
|
13
13
|
}
|
|
14
|
-
exports.
|
|
15
|
-
//# sourceMappingURL=file
|
|
14
|
+
exports.File = File;
|
|
15
|
+
//# sourceMappingURL=file.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"file.js","sourceRoot":"","sources":["../src/resources/file.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAI/C,MAAa,IAAK,SAAQ,sBAAW;IACnC;;OAEG;IACH,MAAM,CAAC,KAAuB,EAAE,OAAwB;QACtD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,OAAO,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC1D,CAAC;CACF;AAPD,oBAOC"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
import { APIResource } from "../core/resource.mjs";
|
|
3
|
-
export class
|
|
3
|
+
export class File extends APIResource {
|
|
4
4
|
/**
|
|
5
5
|
* Search for files
|
|
6
6
|
*/
|
|
7
|
-
search(
|
|
8
|
-
return this._client.
|
|
7
|
+
search(query, options) {
|
|
8
|
+
return this._client.get('/file', { query, ...options });
|
|
9
9
|
}
|
|
10
10
|
}
|
|
11
|
-
//# sourceMappingURL=file
|
|
11
|
+
//# sourceMappingURL=file.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"file.mjs","sourceRoot":"","sources":["../src/resources/file.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;AAItB,MAAM,OAAO,IAAK,SAAQ,WAAW;IACnC;;OAEG;IACH,MAAM,CAAC,KAAuB,EAAE,OAAwB;QACtD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,OAAO,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC1D,CAAC;CACF"}
|
package/resources/index.d.mts
CHANGED
|
@@ -1,18 +1,7 @@
|
|
|
1
|
-
export
|
|
2
|
-
export {
|
|
3
|
-
export {
|
|
1
|
+
export * from "./shared.mjs";
|
|
2
|
+
export { AppResource, type App, type AppInitResponse } from "./app.mjs";
|
|
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 {
|
|
6
|
-
export {
|
|
7
|
-
export { PathGet, type PathGetCreateResponse } from "./path-get.mjs";
|
|
8
|
-
export { ProviderList, type ProviderListCreateResponse } from "./provider-list.mjs";
|
|
9
|
-
export { SessionAbort, type SessionAbortAbortResponse, type SessionAbortAbortParams } from "./session-abort.mjs";
|
|
10
|
-
export { SessionChat, type MessageInfo, type MessagePart, type ProviderAuthError, type UnknownError, type SessionChatCreateParams, } from "./session-chat.mjs";
|
|
11
|
-
export { SessionCreate, type SessionInfo } from "./session-create.mjs";
|
|
12
|
-
export { SessionInitialize, type SessionInitializeCreateResponse, type SessionInitializeCreateParams, } from "./session-initialize.mjs";
|
|
13
|
-
export { SessionList, type SessionListCreateResponse } from "./session-list.mjs";
|
|
14
|
-
export { SessionMessages, type SessionMessageCreateResponse, type SessionMessageCreateParams, } from "./session-messages.mjs";
|
|
15
|
-
export { SessionShare, type SessionShareCreateParams } from "./session-share.mjs";
|
|
16
|
-
export { SessionSummarize, type SessionSummarizeSummarizeResponse, type SessionSummarizeSummarizeParams, } from "./session-summarize.mjs";
|
|
17
|
-
export { SessionUnshare, type SessionUnshareUnshareParams } from "./session-unshare.mjs";
|
|
5
|
+
export { File, type FileSearchResponse, type FileSearchParams } from "./file.mjs";
|
|
6
|
+
export { SessionResource, type FilePart, type Message, type MessagePart, type ReasoningPart, type Session, type SourceURLPart, type StepStartPart, type TextPart, type ToolCall, type ToolInvocationPart, type ToolPartialCall, type ToolResult, type SessionListResponse, type SessionDeleteResponse, type SessionAbortResponse, type SessionInitResponse, type SessionMessagesResponse, type SessionSummarizeResponse, type SessionChatParams, type SessionInitParams, type SessionSummarizeParams, } from "./session.mjs";
|
|
18
7
|
//# sourceMappingURL=index.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":";OAGO,EAAE,WAAW,EAAE,KAAK,GAAG,EAAE,KAAK,eAAe,EAAE;OAC/C,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,EAAE,IAAI,EAAE,KAAK,kBAAkB,EAAE,KAAK,gBAAgB,EAAE;OACxD,EACL,eAAe,EACf,KAAK,QAAQ,EACb,KAAK,OAAO,EACZ,KAAK,WAAW,EAChB,KAAK,aAAa,EAClB,KAAK,OAAO,EACZ,KAAK,aAAa,EAClB,KAAK,aAAa,EAClB,KAAK,QAAQ,EACb,KAAK,QAAQ,EACb,KAAK,kBAAkB,EACvB,KAAK,eAAe,EACpB,KAAK,UAAU,EACf,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,18 +1,7 @@
|
|
|
1
|
-
export
|
|
2
|
-
export {
|
|
3
|
-
export {
|
|
1
|
+
export * from "./shared.js";
|
|
2
|
+
export { AppResource, type App, type AppInitResponse } from "./app.js";
|
|
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 {
|
|
6
|
-
export {
|
|
7
|
-
export { PathGet, type PathGetCreateResponse } from "./path-get.js";
|
|
8
|
-
export { ProviderList, type ProviderListCreateResponse } from "./provider-list.js";
|
|
9
|
-
export { SessionAbort, type SessionAbortAbortResponse, type SessionAbortAbortParams } from "./session-abort.js";
|
|
10
|
-
export { SessionChat, type MessageInfo, type MessagePart, type ProviderAuthError, type UnknownError, type SessionChatCreateParams, } from "./session-chat.js";
|
|
11
|
-
export { SessionCreate, type SessionInfo } from "./session-create.js";
|
|
12
|
-
export { SessionInitialize, type SessionInitializeCreateResponse, type SessionInitializeCreateParams, } from "./session-initialize.js";
|
|
13
|
-
export { SessionList, type SessionListCreateResponse } from "./session-list.js";
|
|
14
|
-
export { SessionMessages, type SessionMessageCreateResponse, type SessionMessageCreateParams, } from "./session-messages.js";
|
|
15
|
-
export { SessionShare, type SessionShareCreateParams } from "./session-share.js";
|
|
16
|
-
export { SessionSummarize, type SessionSummarizeSummarizeResponse, type SessionSummarizeSummarizeParams, } from "./session-summarize.js";
|
|
17
|
-
export { SessionUnshare, type SessionUnshareUnshareParams } from "./session-unshare.js";
|
|
5
|
+
export { File, type FileSearchResponse, type FileSearchParams } from "./file.js";
|
|
6
|
+
export { SessionResource, type FilePart, type Message, type MessagePart, type ReasoningPart, type Session, type SourceURLPart, type StepStartPart, type TextPart, type ToolCall, type ToolInvocationPart, type ToolPartialCall, type ToolResult, type SessionListResponse, type SessionDeleteResponse, type SessionAbortResponse, type SessionInitResponse, type SessionMessagesResponse, type SessionSummarizeResponse, type SessionChatParams, type SessionInitParams, type SessionSummarizeParams, } from "./session.js";
|
|
18
7
|
//# 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":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":";OAGO,EAAE,WAAW,EAAE,KAAK,GAAG,EAAE,KAAK,eAAe,EAAE;OAC/C,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,EAAE,IAAI,EAAE,KAAK,kBAAkB,EAAE,KAAK,gBAAgB,EAAE;OACxD,EACL,eAAe,EACf,KAAK,QAAQ,EACb,KAAK,OAAO,EACZ,KAAK,WAAW,EAChB,KAAK,aAAa,EAClB,KAAK,OAAO,EACZ,KAAK,aAAa,EAClB,KAAK,aAAa,EAClB,KAAK,QAAQ,EACb,KAAK,QAAQ,EACb,KAAK,kBAAkB,EACvB,KAAK,eAAe,EACpB,KAAK,UAAU,EACf,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,39 +1,17 @@
|
|
|
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.
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
var
|
|
8
|
-
Object.defineProperty(exports, "
|
|
9
|
-
var
|
|
10
|
-
Object.defineProperty(exports, "
|
|
4
|
+
exports.SessionResource = exports.File = exports.Event = exports.ConfigResource = exports.AppResource = void 0;
|
|
5
|
+
const tslib_1 = require("../internal/tslib.js");
|
|
6
|
+
tslib_1.__exportStar(require("./shared.js"), exports);
|
|
7
|
+
var app_1 = require("./app.js");
|
|
8
|
+
Object.defineProperty(exports, "AppResource", { enumerable: true, get: function () { return app_1.AppResource; } });
|
|
9
|
+
var config_1 = require("./config.js");
|
|
10
|
+
Object.defineProperty(exports, "ConfigResource", { enumerable: true, get: function () { return config_1.ConfigResource; } });
|
|
11
11
|
var event_1 = require("./event.js");
|
|
12
12
|
Object.defineProperty(exports, "Event", { enumerable: true, get: function () { return event_1.Event; } });
|
|
13
|
-
var
|
|
14
|
-
Object.defineProperty(exports, "
|
|
15
|
-
var
|
|
16
|
-
Object.defineProperty(exports, "
|
|
17
|
-
var path_get_1 = require("./path-get.js");
|
|
18
|
-
Object.defineProperty(exports, "PathGet", { enumerable: true, get: function () { return path_get_1.PathGet; } });
|
|
19
|
-
var provider_list_1 = require("./provider-list.js");
|
|
20
|
-
Object.defineProperty(exports, "ProviderList", { enumerable: true, get: function () { return provider_list_1.ProviderList; } });
|
|
21
|
-
var session_abort_1 = require("./session-abort.js");
|
|
22
|
-
Object.defineProperty(exports, "SessionAbort", { enumerable: true, get: function () { return session_abort_1.SessionAbort; } });
|
|
23
|
-
var session_chat_1 = require("./session-chat.js");
|
|
24
|
-
Object.defineProperty(exports, "SessionChat", { enumerable: true, get: function () { return session_chat_1.SessionChat; } });
|
|
25
|
-
var session_create_1 = require("./session-create.js");
|
|
26
|
-
Object.defineProperty(exports, "SessionCreate", { enumerable: true, get: function () { return session_create_1.SessionCreate; } });
|
|
27
|
-
var session_initialize_1 = require("./session-initialize.js");
|
|
28
|
-
Object.defineProperty(exports, "SessionInitialize", { enumerable: true, get: function () { return session_initialize_1.SessionInitialize; } });
|
|
29
|
-
var session_list_1 = require("./session-list.js");
|
|
30
|
-
Object.defineProperty(exports, "SessionList", { enumerable: true, get: function () { return session_list_1.SessionList; } });
|
|
31
|
-
var session_messages_1 = require("./session-messages.js");
|
|
32
|
-
Object.defineProperty(exports, "SessionMessages", { enumerable: true, get: function () { return session_messages_1.SessionMessages; } });
|
|
33
|
-
var session_share_1 = require("./session-share.js");
|
|
34
|
-
Object.defineProperty(exports, "SessionShare", { enumerable: true, get: function () { return session_share_1.SessionShare; } });
|
|
35
|
-
var session_summarize_1 = require("./session-summarize.js");
|
|
36
|
-
Object.defineProperty(exports, "SessionSummarize", { enumerable: true, get: function () { return session_summarize_1.SessionSummarize; } });
|
|
37
|
-
var session_unshare_1 = require("./session-unshare.js");
|
|
38
|
-
Object.defineProperty(exports, "SessionUnshare", { enumerable: true, get: function () { return session_unshare_1.SessionUnshare; } });
|
|
13
|
+
var file_1 = require("./file.js");
|
|
14
|
+
Object.defineProperty(exports, "File", { enumerable: true, get: function () { return file_1.File; } });
|
|
15
|
+
var session_1 = require("./session.js");
|
|
16
|
+
Object.defineProperty(exports, "SessionResource", { enumerable: true, get: function () { return session_1.SessionResource; } });
|
|
39
17
|
//# sourceMappingURL=index.js.map
|
package/resources/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":";AAAA,sFAAsF
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;AAEtF,sDAAyB;AACzB,gCAAoE;AAA3D,kGAAA,WAAW,OAAA;AACpB,sCASkB;AARhB,wGAAA,cAAc,OAAA;AAShB,oCAAwD;AAA/C,8FAAA,KAAK,OAAA;AACd,kCAA8E;AAArE,4FAAA,IAAI,OAAA;AACb,wCAuBmB;AAtBjB,0GAAA,eAAe,OAAA"}
|
package/resources/index.mjs
CHANGED
|
@@ -1,19 +1,8 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
-
export
|
|
3
|
-
export {
|
|
4
|
-
export {
|
|
2
|
+
export * from "./shared.mjs";
|
|
3
|
+
export { AppResource } from "./app.mjs";
|
|
4
|
+
export { ConfigResource, } from "./config.mjs";
|
|
5
5
|
export { Event } from "./event.mjs";
|
|
6
|
-
export {
|
|
7
|
-
export {
|
|
8
|
-
export { PathGet } from "./path-get.mjs";
|
|
9
|
-
export { ProviderList } from "./provider-list.mjs";
|
|
10
|
-
export { SessionAbort } from "./session-abort.mjs";
|
|
11
|
-
export { SessionChat, } from "./session-chat.mjs";
|
|
12
|
-
export { SessionCreate } from "./session-create.mjs";
|
|
13
|
-
export { SessionInitialize, } from "./session-initialize.mjs";
|
|
14
|
-
export { SessionList } from "./session-list.mjs";
|
|
15
|
-
export { SessionMessages, } from "./session-messages.mjs";
|
|
16
|
-
export { SessionShare } from "./session-share.mjs";
|
|
17
|
-
export { SessionSummarize, } from "./session-summarize.mjs";
|
|
18
|
-
export { SessionUnshare } from "./session-unshare.mjs";
|
|
6
|
+
export { File } from "./file.mjs";
|
|
7
|
+
export { SessionResource, } from "./session.mjs";
|
|
19
8
|
//# 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
|
|
1
|
+
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;;OAG/E,EAAE,WAAW,EAAkC;OAC/C,EACL,cAAc,GAQf;OACM,EAAE,KAAK,EAA0B;OACjC,EAAE,IAAI,EAAkD;OACxD,EACL,eAAe,GAsBhB"}
|
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
import { APIResource } from "../core/resource.mjs";
|
|
2
|
+
import * as Shared from "./shared.mjs";
|
|
3
|
+
import { APIPromise } from "../core/api-promise.mjs";
|
|
4
|
+
import { RequestOptions } from "../internal/request-options.mjs";
|
|
5
|
+
export declare class SessionResource extends APIResource {
|
|
6
|
+
/**
|
|
7
|
+
* Create a new session
|
|
8
|
+
*/
|
|
9
|
+
create(options?: RequestOptions): APIPromise<Session>;
|
|
10
|
+
/**
|
|
11
|
+
* List all sessions
|
|
12
|
+
*/
|
|
13
|
+
list(options?: RequestOptions): APIPromise<SessionListResponse>;
|
|
14
|
+
/**
|
|
15
|
+
* Delete a session and all its data
|
|
16
|
+
*/
|
|
17
|
+
delete(id: string, options?: RequestOptions): APIPromise<SessionDeleteResponse>;
|
|
18
|
+
/**
|
|
19
|
+
* Abort a session
|
|
20
|
+
*/
|
|
21
|
+
abort(id: string, options?: RequestOptions): APIPromise<SessionAbortResponse>;
|
|
22
|
+
/**
|
|
23
|
+
* Create and send a new message to a session
|
|
24
|
+
*/
|
|
25
|
+
chat(id: string, body: SessionChatParams, options?: RequestOptions): APIPromise<Message>;
|
|
26
|
+
/**
|
|
27
|
+
* Analyze the app and create an AGENTS.md file
|
|
28
|
+
*/
|
|
29
|
+
init(id: string, body: SessionInitParams, options?: RequestOptions): APIPromise<SessionInitResponse>;
|
|
30
|
+
/**
|
|
31
|
+
* List messages for a session
|
|
32
|
+
*/
|
|
33
|
+
messages(id: string, options?: RequestOptions): APIPromise<SessionMessagesResponse>;
|
|
34
|
+
/**
|
|
35
|
+
* Share a session
|
|
36
|
+
*/
|
|
37
|
+
share(id: string, options?: RequestOptions): APIPromise<Session>;
|
|
38
|
+
/**
|
|
39
|
+
* Summarize the session
|
|
40
|
+
*/
|
|
41
|
+
summarize(id: string, body: SessionSummarizeParams, options?: RequestOptions): APIPromise<SessionSummarizeResponse>;
|
|
42
|
+
/**
|
|
43
|
+
* Unshare the session
|
|
44
|
+
*/
|
|
45
|
+
unshare(id: string, options?: RequestOptions): APIPromise<Session>;
|
|
46
|
+
}
|
|
47
|
+
export interface FilePart {
|
|
48
|
+
mediaType: string;
|
|
49
|
+
type: 'file';
|
|
50
|
+
url: string;
|
|
51
|
+
filename?: string;
|
|
52
|
+
}
|
|
53
|
+
export interface Message {
|
|
54
|
+
id: string;
|
|
55
|
+
metadata: Message.Metadata;
|
|
56
|
+
parts: Array<MessagePart>;
|
|
57
|
+
role: 'user' | 'assistant';
|
|
58
|
+
}
|
|
59
|
+
export declare namespace Message {
|
|
60
|
+
interface Metadata {
|
|
61
|
+
sessionID: string;
|
|
62
|
+
time: Metadata.Time;
|
|
63
|
+
tool: {
|
|
64
|
+
[key: string]: Metadata.Tool;
|
|
65
|
+
};
|
|
66
|
+
assistant?: Metadata.Assistant;
|
|
67
|
+
error?: Shared.ProviderAuthError | Shared.UnknownError | Metadata.MessageOutputLengthError;
|
|
68
|
+
}
|
|
69
|
+
namespace Metadata {
|
|
70
|
+
interface Time {
|
|
71
|
+
created: number;
|
|
72
|
+
completed?: number;
|
|
73
|
+
}
|
|
74
|
+
interface Tool {
|
|
75
|
+
time: Tool.Time;
|
|
76
|
+
title: string;
|
|
77
|
+
[k: string]: unknown;
|
|
78
|
+
}
|
|
79
|
+
namespace Tool {
|
|
80
|
+
interface Time {
|
|
81
|
+
end: number;
|
|
82
|
+
start: number;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
interface Assistant {
|
|
86
|
+
cost: number;
|
|
87
|
+
modelID: string;
|
|
88
|
+
path: Assistant.Path;
|
|
89
|
+
providerID: string;
|
|
90
|
+
system: Array<string>;
|
|
91
|
+
tokens: Assistant.Tokens;
|
|
92
|
+
summary?: boolean;
|
|
93
|
+
}
|
|
94
|
+
namespace Assistant {
|
|
95
|
+
interface Path {
|
|
96
|
+
cwd: string;
|
|
97
|
+
root: string;
|
|
98
|
+
}
|
|
99
|
+
interface Tokens {
|
|
100
|
+
cache: Tokens.Cache;
|
|
101
|
+
input: number;
|
|
102
|
+
output: number;
|
|
103
|
+
reasoning: number;
|
|
104
|
+
}
|
|
105
|
+
namespace Tokens {
|
|
106
|
+
interface Cache {
|
|
107
|
+
read: number;
|
|
108
|
+
write: number;
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
interface MessageOutputLengthError {
|
|
113
|
+
data: unknown;
|
|
114
|
+
name: 'MessageOutputLengthError';
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
export type MessagePart = TextPart | ReasoningPart | ToolInvocationPart | SourceURLPart | FilePart | StepStartPart;
|
|
119
|
+
export interface ReasoningPart {
|
|
120
|
+
text: string;
|
|
121
|
+
type: 'reasoning';
|
|
122
|
+
providerMetadata?: {
|
|
123
|
+
[key: string]: unknown;
|
|
124
|
+
};
|
|
125
|
+
}
|
|
126
|
+
export interface Session {
|
|
127
|
+
id: string;
|
|
128
|
+
time: Session.Time;
|
|
129
|
+
title: string;
|
|
130
|
+
version: string;
|
|
131
|
+
parentID?: string;
|
|
132
|
+
share?: Session.Share;
|
|
133
|
+
}
|
|
134
|
+
export declare namespace Session {
|
|
135
|
+
interface Time {
|
|
136
|
+
created: number;
|
|
137
|
+
updated: number;
|
|
138
|
+
}
|
|
139
|
+
interface Share {
|
|
140
|
+
url: string;
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
export interface SourceURLPart {
|
|
144
|
+
sourceId: string;
|
|
145
|
+
type: 'source-url';
|
|
146
|
+
url: string;
|
|
147
|
+
providerMetadata?: {
|
|
148
|
+
[key: string]: unknown;
|
|
149
|
+
};
|
|
150
|
+
title?: string;
|
|
151
|
+
}
|
|
152
|
+
export interface StepStartPart {
|
|
153
|
+
type: 'step-start';
|
|
154
|
+
}
|
|
155
|
+
export interface TextPart {
|
|
156
|
+
text: string;
|
|
157
|
+
type: 'text';
|
|
158
|
+
}
|
|
159
|
+
export interface ToolCall {
|
|
160
|
+
state: 'call';
|
|
161
|
+
toolCallId: string;
|
|
162
|
+
toolName: string;
|
|
163
|
+
args?: unknown;
|
|
164
|
+
step?: number;
|
|
165
|
+
}
|
|
166
|
+
export interface ToolInvocationPart {
|
|
167
|
+
toolInvocation: ToolCall | ToolPartialCall | ToolResult;
|
|
168
|
+
type: 'tool-invocation';
|
|
169
|
+
}
|
|
170
|
+
export interface ToolPartialCall {
|
|
171
|
+
state: 'partial-call';
|
|
172
|
+
toolCallId: string;
|
|
173
|
+
toolName: string;
|
|
174
|
+
args?: unknown;
|
|
175
|
+
step?: number;
|
|
176
|
+
}
|
|
177
|
+
export interface ToolResult {
|
|
178
|
+
result: string;
|
|
179
|
+
state: 'result';
|
|
180
|
+
toolCallId: string;
|
|
181
|
+
toolName: string;
|
|
182
|
+
args?: unknown;
|
|
183
|
+
step?: number;
|
|
184
|
+
}
|
|
185
|
+
export type SessionListResponse = Array<Session>;
|
|
186
|
+
export type SessionDeleteResponse = boolean;
|
|
187
|
+
export type SessionAbortResponse = boolean;
|
|
188
|
+
export type SessionInitResponse = boolean;
|
|
189
|
+
export type SessionMessagesResponse = Array<Message>;
|
|
190
|
+
export type SessionSummarizeResponse = boolean;
|
|
191
|
+
export interface SessionChatParams {
|
|
192
|
+
modelID: string;
|
|
193
|
+
parts: Array<MessagePart>;
|
|
194
|
+
providerID: string;
|
|
195
|
+
sessionID: string;
|
|
196
|
+
}
|
|
197
|
+
export interface SessionInitParams {
|
|
198
|
+
modelID: string;
|
|
199
|
+
providerID: string;
|
|
200
|
+
}
|
|
201
|
+
export interface SessionSummarizeParams {
|
|
202
|
+
modelID: string;
|
|
203
|
+
providerID: string;
|
|
204
|
+
}
|
|
205
|
+
export declare namespace SessionResource {
|
|
206
|
+
export { type FilePart as FilePart, type Message as Message, type MessagePart as MessagePart, type ReasoningPart as ReasoningPart, type Session as Session, type SourceURLPart as SourceURLPart, type StepStartPart as StepStartPart, type TextPart as TextPart, type ToolCall as ToolCall, type ToolInvocationPart as ToolInvocationPart, type ToolPartialCall as ToolPartialCall, type ToolResult as ToolResult, 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, };
|
|
207
|
+
}
|
|
208
|
+
//# sourceMappingURL=session.d.mts.map
|