@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/src/client.ts
CHANGED
|
@@ -16,42 +16,43 @@ import * as Errors from './core/error';
|
|
|
16
16
|
import * as Uploads from './core/uploads';
|
|
17
17
|
import * as API from './resources/index';
|
|
18
18
|
import { APIPromise } from './core/api-promise';
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
|
|
19
|
+
import { App, AppInitResponse, AppResource } from './resources/app';
|
|
20
|
+
import {
|
|
21
|
+
Config,
|
|
22
|
+
ConfigProvidersResponse,
|
|
23
|
+
ConfigResource,
|
|
24
|
+
Keybinds,
|
|
25
|
+
McpLocal,
|
|
26
|
+
McpRemote,
|
|
27
|
+
Model,
|
|
28
|
+
Provider,
|
|
29
|
+
} from './resources/config';
|
|
22
30
|
import { Event, EventListResponse } from './resources/event';
|
|
23
|
-
import {
|
|
24
|
-
import { InstallationInfo, InstallationInfoCreateResponse } from './resources/installation-info';
|
|
25
|
-
import { PathGet, PathGetCreateResponse } from './resources/path-get';
|
|
26
|
-
import { ProviderList, ProviderListCreateResponse } from './resources/provider-list';
|
|
27
|
-
import { SessionAbort, SessionAbortAbortParams, SessionAbortAbortResponse } from './resources/session-abort';
|
|
31
|
+
import { File, FileSearchParams, FileSearchResponse } from './resources/file';
|
|
28
32
|
import {
|
|
29
|
-
|
|
33
|
+
FilePart,
|
|
34
|
+
Message,
|
|
30
35
|
MessagePart,
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
SessionSummarizeSummarizeParams,
|
|
52
|
-
SessionSummarizeSummarizeResponse,
|
|
53
|
-
} from './resources/session-summarize';
|
|
54
|
-
import { SessionUnshare, SessionUnshareUnshareParams } from './resources/session-unshare';
|
|
36
|
+
ReasoningPart,
|
|
37
|
+
Session,
|
|
38
|
+
SessionAbortResponse,
|
|
39
|
+
SessionChatParams,
|
|
40
|
+
SessionDeleteResponse,
|
|
41
|
+
SessionInitParams,
|
|
42
|
+
SessionInitResponse,
|
|
43
|
+
SessionListResponse,
|
|
44
|
+
SessionMessagesResponse,
|
|
45
|
+
SessionResource,
|
|
46
|
+
SessionSummarizeParams,
|
|
47
|
+
SessionSummarizeResponse,
|
|
48
|
+
SourceURLPart,
|
|
49
|
+
StepStartPart,
|
|
50
|
+
TextPart,
|
|
51
|
+
ToolCall,
|
|
52
|
+
ToolInvocationPart,
|
|
53
|
+
ToolPartialCall,
|
|
54
|
+
ToolResult,
|
|
55
|
+
} from './resources/session';
|
|
55
56
|
import { type Fetch } from './internal/builtin-types';
|
|
56
57
|
import { HeadersLike, NullableHeaders, buildHeaders } from './internal/headers';
|
|
57
58
|
import { FinalRequestOptions, RequestOptions } from './internal/request-options';
|
|
@@ -718,110 +719,65 @@ export class Opencode {
|
|
|
718
719
|
static toFile = Uploads.toFile;
|
|
719
720
|
|
|
720
721
|
event: API.Event = new API.Event(this);
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
pathGet: API.PathGet = new API.PathGet(this);
|
|
726
|
-
sessionCreate: API.SessionCreate = new API.SessionCreate(this);
|
|
727
|
-
sessionShare: API.SessionShare = new API.SessionShare(this);
|
|
728
|
-
sessionUnshare: API.SessionUnshare = new API.SessionUnshare(this);
|
|
729
|
-
sessionMessages: API.SessionMessages = new API.SessionMessages(this);
|
|
730
|
-
sessionList: API.SessionList = new API.SessionList(this);
|
|
731
|
-
sessionAbort: API.SessionAbort = new API.SessionAbort(this);
|
|
732
|
-
sessionSummarize: API.SessionSummarize = new API.SessionSummarize(this);
|
|
733
|
-
sessionChat: API.SessionChat = new API.SessionChat(this);
|
|
734
|
-
providerList: API.ProviderList = new API.ProviderList(this);
|
|
735
|
-
fileSearch: API.FileSearch = new API.FileSearch(this);
|
|
736
|
-
installationInfo: API.InstallationInfo = new API.InstallationInfo(this);
|
|
722
|
+
app: API.AppResource = new API.AppResource(this);
|
|
723
|
+
file: API.File = new API.File(this);
|
|
724
|
+
config: API.ConfigResource = new API.ConfigResource(this);
|
|
725
|
+
session: API.SessionResource = new API.SessionResource(this);
|
|
737
726
|
}
|
|
738
727
|
Opencode.Event = Event;
|
|
739
|
-
Opencode.
|
|
740
|
-
Opencode.
|
|
741
|
-
Opencode.
|
|
742
|
-
Opencode.
|
|
743
|
-
Opencode.PathGet = PathGet;
|
|
744
|
-
Opencode.SessionCreate = SessionCreate;
|
|
745
|
-
Opencode.SessionShare = SessionShare;
|
|
746
|
-
Opencode.SessionUnshare = SessionUnshare;
|
|
747
|
-
Opencode.SessionMessages = SessionMessages;
|
|
748
|
-
Opencode.SessionList = SessionList;
|
|
749
|
-
Opencode.SessionAbort = SessionAbort;
|
|
750
|
-
Opencode.SessionSummarize = SessionSummarize;
|
|
751
|
-
Opencode.SessionChat = SessionChat;
|
|
752
|
-
Opencode.ProviderList = ProviderList;
|
|
753
|
-
Opencode.FileSearch = FileSearch;
|
|
754
|
-
Opencode.InstallationInfo = InstallationInfo;
|
|
728
|
+
Opencode.AppResource = AppResource;
|
|
729
|
+
Opencode.File = File;
|
|
730
|
+
Opencode.ConfigResource = ConfigResource;
|
|
731
|
+
Opencode.SessionResource = SessionResource;
|
|
755
732
|
export declare namespace Opencode {
|
|
756
733
|
export type RequestOptions = Opts.RequestOptions;
|
|
757
734
|
|
|
758
735
|
export { Event as Event, type EventListResponse as EventListResponse };
|
|
759
736
|
|
|
760
|
-
export {
|
|
761
|
-
|
|
762
|
-
export { ConfigGet as ConfigGet, type ConfigGetRetrieveResponse as ConfigGetRetrieveResponse };
|
|
763
|
-
|
|
764
|
-
export {
|
|
765
|
-
AppInitialize as AppInitialize,
|
|
766
|
-
type AppInitializeInitializeResponse as AppInitializeInitializeResponse,
|
|
767
|
-
};
|
|
737
|
+
export { AppResource as AppResource, type App as App, type AppInitResponse as AppInitResponse };
|
|
768
738
|
|
|
769
739
|
export {
|
|
770
|
-
|
|
771
|
-
type
|
|
772
|
-
type
|
|
740
|
+
File as File,
|
|
741
|
+
type FileSearchResponse as FileSearchResponse,
|
|
742
|
+
type FileSearchParams as FileSearchParams,
|
|
773
743
|
};
|
|
774
744
|
|
|
775
|
-
export { PathGet as PathGet, type PathGetCreateResponse as PathGetCreateResponse };
|
|
776
|
-
|
|
777
|
-
export { SessionCreate as SessionCreate, type SessionInfo as SessionInfo };
|
|
778
|
-
|
|
779
|
-
export { SessionShare as SessionShare, type SessionShareCreateParams as SessionShareCreateParams };
|
|
780
|
-
|
|
781
745
|
export {
|
|
782
|
-
|
|
783
|
-
type
|
|
746
|
+
ConfigResource as ConfigResource,
|
|
747
|
+
type Config as Config,
|
|
748
|
+
type Keybinds as Keybinds,
|
|
749
|
+
type McpLocal as McpLocal,
|
|
750
|
+
type McpRemote as McpRemote,
|
|
751
|
+
type Model as Model,
|
|
752
|
+
type Provider as Provider,
|
|
753
|
+
type ConfigProvidersResponse as ConfigProvidersResponse,
|
|
784
754
|
};
|
|
785
755
|
|
|
786
756
|
export {
|
|
787
|
-
|
|
788
|
-
type
|
|
789
|
-
type
|
|
790
|
-
};
|
|
791
|
-
|
|
792
|
-
export { SessionList as SessionList, type SessionListCreateResponse as SessionListCreateResponse };
|
|
793
|
-
|
|
794
|
-
export {
|
|
795
|
-
SessionAbort as SessionAbort,
|
|
796
|
-
type SessionAbortAbortResponse as SessionAbortAbortResponse,
|
|
797
|
-
type SessionAbortAbortParams as SessionAbortAbortParams,
|
|
798
|
-
};
|
|
799
|
-
|
|
800
|
-
export {
|
|
801
|
-
SessionSummarize as SessionSummarize,
|
|
802
|
-
type SessionSummarizeSummarizeResponse as SessionSummarizeSummarizeResponse,
|
|
803
|
-
type SessionSummarizeSummarizeParams as SessionSummarizeSummarizeParams,
|
|
804
|
-
};
|
|
805
|
-
|
|
806
|
-
export {
|
|
807
|
-
SessionChat as SessionChat,
|
|
808
|
-
type MessageInfo as MessageInfo,
|
|
757
|
+
SessionResource as SessionResource,
|
|
758
|
+
type FilePart as FilePart,
|
|
759
|
+
type Message as Message,
|
|
809
760
|
type MessagePart as MessagePart,
|
|
810
|
-
type
|
|
811
|
-
type
|
|
812
|
-
type
|
|
761
|
+
type ReasoningPart as ReasoningPart,
|
|
762
|
+
type Session as Session,
|
|
763
|
+
type SourceURLPart as SourceURLPart,
|
|
764
|
+
type StepStartPart as StepStartPart,
|
|
765
|
+
type TextPart as TextPart,
|
|
766
|
+
type ToolCall as ToolCall,
|
|
767
|
+
type ToolInvocationPart as ToolInvocationPart,
|
|
768
|
+
type ToolPartialCall as ToolPartialCall,
|
|
769
|
+
type ToolResult as ToolResult,
|
|
770
|
+
type SessionListResponse as SessionListResponse,
|
|
771
|
+
type SessionDeleteResponse as SessionDeleteResponse,
|
|
772
|
+
type SessionAbortResponse as SessionAbortResponse,
|
|
773
|
+
type SessionInitResponse as SessionInitResponse,
|
|
774
|
+
type SessionMessagesResponse as SessionMessagesResponse,
|
|
775
|
+
type SessionSummarizeResponse as SessionSummarizeResponse,
|
|
776
|
+
type SessionChatParams as SessionChatParams,
|
|
777
|
+
type SessionInitParams as SessionInitParams,
|
|
778
|
+
type SessionSummarizeParams as SessionSummarizeParams,
|
|
813
779
|
};
|
|
814
780
|
|
|
815
|
-
export
|
|
816
|
-
|
|
817
|
-
export {
|
|
818
|
-
FileSearch as FileSearch,
|
|
819
|
-
type FileSearchSearchResponse as FileSearchSearchResponse,
|
|
820
|
-
type FileSearchSearchParams as FileSearchSearchParams,
|
|
821
|
-
};
|
|
822
|
-
|
|
823
|
-
export {
|
|
824
|
-
InstallationInfo as InstallationInfo,
|
|
825
|
-
type InstallationInfoCreateResponse as InstallationInfoCreateResponse,
|
|
826
|
-
};
|
|
781
|
+
export type ProviderAuthError = API.ProviderAuthError;
|
|
782
|
+
export type UnknownError = API.UnknownError;
|
|
827
783
|
}
|
|
@@ -0,0 +1,59 @@
|
|
|
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 AppResource extends APIResource {
|
|
8
|
+
/**
|
|
9
|
+
* Get app info
|
|
10
|
+
*/
|
|
11
|
+
get(options?: RequestOptions): APIPromise<App> {
|
|
12
|
+
return this._client.get('/app', options);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Initialize the app
|
|
17
|
+
*/
|
|
18
|
+
init(options?: RequestOptions): APIPromise<AppInitResponse> {
|
|
19
|
+
return this._client.post('/app/init', options);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export interface App {
|
|
24
|
+
git: boolean;
|
|
25
|
+
|
|
26
|
+
hostname: string;
|
|
27
|
+
|
|
28
|
+
path: App.Path;
|
|
29
|
+
|
|
30
|
+
project: string;
|
|
31
|
+
|
|
32
|
+
time: App.Time;
|
|
33
|
+
|
|
34
|
+
user: string;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export namespace App {
|
|
38
|
+
export interface Path {
|
|
39
|
+
config: string;
|
|
40
|
+
|
|
41
|
+
cwd: string;
|
|
42
|
+
|
|
43
|
+
data: string;
|
|
44
|
+
|
|
45
|
+
root: string;
|
|
46
|
+
|
|
47
|
+
state: string;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export interface Time {
|
|
51
|
+
initialized?: number;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export type AppInitResponse = boolean;
|
|
56
|
+
|
|
57
|
+
export declare namespace AppResource {
|
|
58
|
+
export { type App as App, type AppInitResponse as AppInitResponse };
|
|
59
|
+
}
|
|
@@ -0,0 +1,390 @@
|
|
|
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 ConfigResource extends APIResource {
|
|
8
|
+
/**
|
|
9
|
+
* Get config info
|
|
10
|
+
*/
|
|
11
|
+
get(options?: RequestOptions): APIPromise<Config> {
|
|
12
|
+
return this._client.get('/config', options);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* List all providers
|
|
17
|
+
*/
|
|
18
|
+
providers(options?: RequestOptions): APIPromise<ConfigProvidersResponse> {
|
|
19
|
+
return this._client.get('/config/providers', options);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export interface Config {
|
|
24
|
+
/**
|
|
25
|
+
* JSON schema reference for configuration validation
|
|
26
|
+
*/
|
|
27
|
+
$schema?: string;
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Share newly created sessions automatically
|
|
31
|
+
*/
|
|
32
|
+
autoshare?: boolean;
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Automatically update to the latest version
|
|
36
|
+
*/
|
|
37
|
+
autoupdate?: boolean;
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Disable providers that are loaded automatically
|
|
41
|
+
*/
|
|
42
|
+
disabled_providers?: Array<string>;
|
|
43
|
+
|
|
44
|
+
experimental?: Config.Experimental;
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Custom keybind configurations
|
|
48
|
+
*/
|
|
49
|
+
keybinds?: Keybinds;
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* MCP (Model Context Protocol) server configurations
|
|
53
|
+
*/
|
|
54
|
+
mcp?: { [key: string]: McpLocal | McpRemote };
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Model to use in the format of provider/model, eg anthropic/claude-2
|
|
58
|
+
*/
|
|
59
|
+
model?: string;
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Custom provider configurations and model overrides
|
|
63
|
+
*/
|
|
64
|
+
provider?: { [key: string]: Config.Provider };
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* Theme name to use for the interface
|
|
68
|
+
*/
|
|
69
|
+
theme?: string;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export namespace Config {
|
|
73
|
+
export interface Experimental {
|
|
74
|
+
hook?: Experimental.Hook;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export namespace Experimental {
|
|
78
|
+
export interface Hook {
|
|
79
|
+
file_edited?: { [key: string]: Array<Hook.FileEdited> };
|
|
80
|
+
|
|
81
|
+
session_completed?: Array<Hook.SessionCompleted>;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export namespace Hook {
|
|
85
|
+
export interface FileEdited {
|
|
86
|
+
command: Array<string>;
|
|
87
|
+
|
|
88
|
+
environment?: { [key: string]: string };
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
export interface SessionCompleted {
|
|
92
|
+
command: Array<string>;
|
|
93
|
+
|
|
94
|
+
environment?: { [key: string]: string };
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
export interface Provider {
|
|
100
|
+
models: { [key: string]: Provider.Models };
|
|
101
|
+
|
|
102
|
+
id?: string;
|
|
103
|
+
|
|
104
|
+
api?: string;
|
|
105
|
+
|
|
106
|
+
env?: Array<string>;
|
|
107
|
+
|
|
108
|
+
name?: string;
|
|
109
|
+
|
|
110
|
+
npm?: string;
|
|
111
|
+
|
|
112
|
+
options?: { [key: string]: unknown };
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
export namespace Provider {
|
|
116
|
+
export interface Models {
|
|
117
|
+
id?: string;
|
|
118
|
+
|
|
119
|
+
attachment?: boolean;
|
|
120
|
+
|
|
121
|
+
cost?: Models.Cost;
|
|
122
|
+
|
|
123
|
+
limit?: Models.Limit;
|
|
124
|
+
|
|
125
|
+
name?: string;
|
|
126
|
+
|
|
127
|
+
options?: { [key: string]: unknown };
|
|
128
|
+
|
|
129
|
+
reasoning?: boolean;
|
|
130
|
+
|
|
131
|
+
temperature?: boolean;
|
|
132
|
+
|
|
133
|
+
tool_call?: boolean;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
export namespace Models {
|
|
137
|
+
export interface Cost {
|
|
138
|
+
input: number;
|
|
139
|
+
|
|
140
|
+
output: number;
|
|
141
|
+
|
|
142
|
+
cache_read?: number;
|
|
143
|
+
|
|
144
|
+
cache_write?: number;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
export interface Limit {
|
|
148
|
+
context: number;
|
|
149
|
+
|
|
150
|
+
output: number;
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
export interface Keybinds {
|
|
157
|
+
/**
|
|
158
|
+
* Exit the application
|
|
159
|
+
*/
|
|
160
|
+
app_exit?: string;
|
|
161
|
+
|
|
162
|
+
/**
|
|
163
|
+
* Open external editor
|
|
164
|
+
*/
|
|
165
|
+
editor_open?: string;
|
|
166
|
+
|
|
167
|
+
/**
|
|
168
|
+
* Show help dialog
|
|
169
|
+
*/
|
|
170
|
+
help?: string;
|
|
171
|
+
|
|
172
|
+
/**
|
|
173
|
+
* Navigate to next history item
|
|
174
|
+
*/
|
|
175
|
+
history_next?: string;
|
|
176
|
+
|
|
177
|
+
/**
|
|
178
|
+
* Navigate to previous history item
|
|
179
|
+
*/
|
|
180
|
+
history_previous?: string;
|
|
181
|
+
|
|
182
|
+
/**
|
|
183
|
+
* Clear input field
|
|
184
|
+
*/
|
|
185
|
+
input_clear?: string;
|
|
186
|
+
|
|
187
|
+
/**
|
|
188
|
+
* Insert newline in input
|
|
189
|
+
*/
|
|
190
|
+
input_newline?: string;
|
|
191
|
+
|
|
192
|
+
/**
|
|
193
|
+
* Paste from clipboard
|
|
194
|
+
*/
|
|
195
|
+
input_paste?: string;
|
|
196
|
+
|
|
197
|
+
/**
|
|
198
|
+
* Submit input
|
|
199
|
+
*/
|
|
200
|
+
input_submit?: string;
|
|
201
|
+
|
|
202
|
+
/**
|
|
203
|
+
* Leader key for keybind combinations
|
|
204
|
+
*/
|
|
205
|
+
leader?: string;
|
|
206
|
+
|
|
207
|
+
/**
|
|
208
|
+
* Navigate to first message
|
|
209
|
+
*/
|
|
210
|
+
messages_first?: string;
|
|
211
|
+
|
|
212
|
+
/**
|
|
213
|
+
* Scroll messages down by half page
|
|
214
|
+
*/
|
|
215
|
+
messages_half_page_down?: string;
|
|
216
|
+
|
|
217
|
+
/**
|
|
218
|
+
* Scroll messages up by half page
|
|
219
|
+
*/
|
|
220
|
+
messages_half_page_up?: string;
|
|
221
|
+
|
|
222
|
+
/**
|
|
223
|
+
* Navigate to last message
|
|
224
|
+
*/
|
|
225
|
+
messages_last?: string;
|
|
226
|
+
|
|
227
|
+
/**
|
|
228
|
+
* Navigate to next message
|
|
229
|
+
*/
|
|
230
|
+
messages_next?: string;
|
|
231
|
+
|
|
232
|
+
/**
|
|
233
|
+
* Scroll messages down by one page
|
|
234
|
+
*/
|
|
235
|
+
messages_page_down?: string;
|
|
236
|
+
|
|
237
|
+
/**
|
|
238
|
+
* Scroll messages up by one page
|
|
239
|
+
*/
|
|
240
|
+
messages_page_up?: string;
|
|
241
|
+
|
|
242
|
+
/**
|
|
243
|
+
* Navigate to previous message
|
|
244
|
+
*/
|
|
245
|
+
messages_previous?: string;
|
|
246
|
+
|
|
247
|
+
/**
|
|
248
|
+
* List available models
|
|
249
|
+
*/
|
|
250
|
+
model_list?: string;
|
|
251
|
+
|
|
252
|
+
/**
|
|
253
|
+
* Initialize project configuration
|
|
254
|
+
*/
|
|
255
|
+
project_init?: string;
|
|
256
|
+
|
|
257
|
+
/**
|
|
258
|
+
* Toggle compact mode for session
|
|
259
|
+
*/
|
|
260
|
+
session_compact?: string;
|
|
261
|
+
|
|
262
|
+
/**
|
|
263
|
+
* Interrupt current session
|
|
264
|
+
*/
|
|
265
|
+
session_interrupt?: string;
|
|
266
|
+
|
|
267
|
+
/**
|
|
268
|
+
* List all sessions
|
|
269
|
+
*/
|
|
270
|
+
session_list?: string;
|
|
271
|
+
|
|
272
|
+
/**
|
|
273
|
+
* Create a new session
|
|
274
|
+
*/
|
|
275
|
+
session_new?: string;
|
|
276
|
+
|
|
277
|
+
/**
|
|
278
|
+
* Share current session
|
|
279
|
+
*/
|
|
280
|
+
session_share?: string;
|
|
281
|
+
|
|
282
|
+
/**
|
|
283
|
+
* List available themes
|
|
284
|
+
*/
|
|
285
|
+
theme_list?: string;
|
|
286
|
+
|
|
287
|
+
/**
|
|
288
|
+
* Show tool details
|
|
289
|
+
*/
|
|
290
|
+
tool_details?: string;
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
export interface McpLocal {
|
|
294
|
+
/**
|
|
295
|
+
* Command and arguments to run the MCP server
|
|
296
|
+
*/
|
|
297
|
+
command: Array<string>;
|
|
298
|
+
|
|
299
|
+
/**
|
|
300
|
+
* Type of MCP server connection
|
|
301
|
+
*/
|
|
302
|
+
type: 'local';
|
|
303
|
+
|
|
304
|
+
/**
|
|
305
|
+
* Environment variables to set when running the MCP server
|
|
306
|
+
*/
|
|
307
|
+
environment?: { [key: string]: string };
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
export interface McpRemote {
|
|
311
|
+
/**
|
|
312
|
+
* Type of MCP server connection
|
|
313
|
+
*/
|
|
314
|
+
type: 'remote';
|
|
315
|
+
|
|
316
|
+
/**
|
|
317
|
+
* URL of the remote MCP server
|
|
318
|
+
*/
|
|
319
|
+
url: string;
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
export interface Model {
|
|
323
|
+
id: string;
|
|
324
|
+
|
|
325
|
+
attachment: boolean;
|
|
326
|
+
|
|
327
|
+
cost: Model.Cost;
|
|
328
|
+
|
|
329
|
+
limit: Model.Limit;
|
|
330
|
+
|
|
331
|
+
name: string;
|
|
332
|
+
|
|
333
|
+
options: { [key: string]: unknown };
|
|
334
|
+
|
|
335
|
+
reasoning: boolean;
|
|
336
|
+
|
|
337
|
+
temperature: boolean;
|
|
338
|
+
|
|
339
|
+
tool_call: boolean;
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
export namespace Model {
|
|
343
|
+
export interface Cost {
|
|
344
|
+
input: number;
|
|
345
|
+
|
|
346
|
+
output: number;
|
|
347
|
+
|
|
348
|
+
cache_read?: number;
|
|
349
|
+
|
|
350
|
+
cache_write?: number;
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
export interface Limit {
|
|
354
|
+
context: number;
|
|
355
|
+
|
|
356
|
+
output: number;
|
|
357
|
+
}
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
export interface Provider {
|
|
361
|
+
id: string;
|
|
362
|
+
|
|
363
|
+
env: Array<string>;
|
|
364
|
+
|
|
365
|
+
models: { [key: string]: Model };
|
|
366
|
+
|
|
367
|
+
name: string;
|
|
368
|
+
|
|
369
|
+
api?: string;
|
|
370
|
+
|
|
371
|
+
npm?: string;
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
export interface ConfigProvidersResponse {
|
|
375
|
+
default: { [key: string]: string };
|
|
376
|
+
|
|
377
|
+
providers: Array<Provider>;
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
export declare namespace ConfigResource {
|
|
381
|
+
export {
|
|
382
|
+
type Config as Config,
|
|
383
|
+
type Keybinds as Keybinds,
|
|
384
|
+
type McpLocal as McpLocal,
|
|
385
|
+
type McpRemote as McpRemote,
|
|
386
|
+
type Model as Model,
|
|
387
|
+
type Provider as Provider,
|
|
388
|
+
type ConfigProvidersResponse as ConfigProvidersResponse,
|
|
389
|
+
};
|
|
390
|
+
}
|