@opencode-ai/sdk 0.15.9 → 0.15.11
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/dist/gen/sdk.gen.d.ts +5 -1
- package/dist/gen/sdk.gen.js +9 -0
- package/dist/gen/types.gen.d.ts +32 -0
- package/package.json +1 -1
package/dist/gen/sdk.gen.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Options as ClientOptions, TDataShape, Client } from "./client/index.js";
|
|
2
|
-
import type { ProjectListData, ProjectListResponses, ProjectCurrentData, ProjectCurrentResponses, ConfigGetData, ConfigGetResponses, ConfigUpdateData, ConfigUpdateResponses, ConfigUpdateErrors, ToolIdsData, ToolIdsResponses, ToolIdsErrors, ToolListData, ToolListResponses, ToolListErrors, PathGetData, PathGetResponses, SessionListData, SessionListResponses, SessionCreateData, SessionCreateResponses, SessionCreateErrors, SessionDeleteData, SessionDeleteResponses, SessionDeleteErrors, SessionGetData, SessionGetResponses, SessionGetErrors, SessionUpdateData, SessionUpdateResponses, SessionUpdateErrors, SessionChildrenData, SessionChildrenResponses, SessionChildrenErrors, SessionTodoData, SessionTodoResponses, SessionTodoErrors, SessionInitData, SessionInitResponses, SessionInitErrors, SessionForkData, SessionForkResponses, SessionAbortData, SessionAbortResponses, SessionAbortErrors, SessionUnshareData, SessionUnshareResponses, SessionUnshareErrors, SessionShareData, SessionShareResponses, SessionShareErrors, SessionSummarizeData, SessionSummarizeResponses, SessionSummarizeErrors, SessionMessagesData, SessionMessagesResponses, SessionMessagesErrors, SessionPromptData, SessionPromptResponses, SessionPromptErrors, SessionMessageData, SessionMessageResponses, SessionMessageErrors, SessionCommandData, SessionCommandResponses, SessionCommandErrors, SessionShellData, SessionShellResponses, SessionShellErrors, SessionRevertData, SessionRevertResponses, SessionRevertErrors, SessionUnrevertData, SessionUnrevertResponses, SessionUnrevertErrors, PostSessionIdPermissionsPermissionIdData, PostSessionIdPermissionsPermissionIdResponses, PostSessionIdPermissionsPermissionIdErrors, CommandListData, CommandListResponses, ConfigProvidersData, ConfigProvidersResponses, FindTextData, FindTextResponses, FindFilesData, FindFilesResponses, FindSymbolsData, FindSymbolsResponses, FileListData, FileListResponses, FileReadData, FileReadResponses, FileStatusData, FileStatusResponses, AppLogData, AppLogResponses, AppLogErrors, AppAgentsData, AppAgentsResponses, McpStatusData, McpStatusResponses, TuiAppendPromptData, TuiAppendPromptResponses, TuiAppendPromptErrors, TuiOpenHelpData, TuiOpenHelpResponses, TuiOpenSessionsData, TuiOpenSessionsResponses, TuiOpenThemesData, TuiOpenThemesResponses, TuiOpenModelsData, TuiOpenModelsResponses, TuiSubmitPromptData, TuiSubmitPromptResponses, TuiClearPromptData, TuiClearPromptResponses, TuiExecuteCommandData, TuiExecuteCommandResponses, TuiExecuteCommandErrors, TuiShowToastData, TuiShowToastResponses, AuthSetData, AuthSetResponses, AuthSetErrors, EventSubscribeData, EventSubscribeResponses } from "./types.gen.js";
|
|
2
|
+
import type { ProjectListData, ProjectListResponses, ProjectCurrentData, ProjectCurrentResponses, ConfigGetData, ConfigGetResponses, ConfigUpdateData, ConfigUpdateResponses, ConfigUpdateErrors, ToolIdsData, ToolIdsResponses, ToolIdsErrors, ToolListData, ToolListResponses, ToolListErrors, PathGetData, PathGetResponses, SessionListData, SessionListResponses, SessionCreateData, SessionCreateResponses, SessionCreateErrors, SessionDeleteData, SessionDeleteResponses, SessionDeleteErrors, SessionGetData, SessionGetResponses, SessionGetErrors, SessionUpdateData, SessionUpdateResponses, SessionUpdateErrors, SessionChildrenData, SessionChildrenResponses, SessionChildrenErrors, SessionTodoData, SessionTodoResponses, SessionTodoErrors, SessionInitData, SessionInitResponses, SessionInitErrors, SessionForkData, SessionForkResponses, SessionAbortData, SessionAbortResponses, SessionAbortErrors, SessionUnshareData, SessionUnshareResponses, SessionUnshareErrors, SessionShareData, SessionShareResponses, SessionShareErrors, SessionDiffData, SessionDiffResponses, SessionSummarizeData, SessionSummarizeResponses, SessionSummarizeErrors, SessionMessagesData, SessionMessagesResponses, SessionMessagesErrors, SessionPromptData, SessionPromptResponses, SessionPromptErrors, SessionMessageData, SessionMessageResponses, SessionMessageErrors, SessionCommandData, SessionCommandResponses, SessionCommandErrors, SessionShellData, SessionShellResponses, SessionShellErrors, SessionRevertData, SessionRevertResponses, SessionRevertErrors, SessionUnrevertData, SessionUnrevertResponses, SessionUnrevertErrors, PostSessionIdPermissionsPermissionIdData, PostSessionIdPermissionsPermissionIdResponses, PostSessionIdPermissionsPermissionIdErrors, CommandListData, CommandListResponses, ConfigProvidersData, ConfigProvidersResponses, FindTextData, FindTextResponses, FindFilesData, FindFilesResponses, FindSymbolsData, FindSymbolsResponses, FileListData, FileListResponses, FileReadData, FileReadResponses, FileStatusData, FileStatusResponses, AppLogData, AppLogResponses, AppLogErrors, AppAgentsData, AppAgentsResponses, McpStatusData, McpStatusResponses, TuiAppendPromptData, TuiAppendPromptResponses, TuiAppendPromptErrors, TuiOpenHelpData, TuiOpenHelpResponses, TuiOpenSessionsData, TuiOpenSessionsResponses, TuiOpenThemesData, TuiOpenThemesResponses, TuiOpenModelsData, TuiOpenModelsResponses, TuiSubmitPromptData, TuiSubmitPromptResponses, TuiClearPromptData, TuiClearPromptResponses, TuiExecuteCommandData, TuiExecuteCommandResponses, TuiExecuteCommandErrors, TuiShowToastData, TuiShowToastResponses, AuthSetData, AuthSetResponses, AuthSetErrors, EventSubscribeData, EventSubscribeResponses } from "./types.gen.js";
|
|
3
3
|
export type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = ClientOptions<TData, ThrowOnError> & {
|
|
4
4
|
/**
|
|
5
5
|
* You can provide a client instance returned by `createClient()` instead of
|
|
@@ -108,6 +108,10 @@ declare class Session extends _HeyApiClient {
|
|
|
108
108
|
* Share a session
|
|
109
109
|
*/
|
|
110
110
|
share<ThrowOnError extends boolean = false>(options: Options<SessionShareData, ThrowOnError>): import("./client/types.gen.js").RequestResult<SessionShareResponses, SessionShareErrors, ThrowOnError, "fields">;
|
|
111
|
+
/**
|
|
112
|
+
* Get the diff that resulted from this user message
|
|
113
|
+
*/
|
|
114
|
+
diff<ThrowOnError extends boolean = false>(options: Options<SessionDiffData, ThrowOnError>): import("./client/types.gen.js").RequestResult<SessionDiffResponses, unknown, ThrowOnError, "fields">;
|
|
111
115
|
/**
|
|
112
116
|
* Summarize the session
|
|
113
117
|
*/
|
package/dist/gen/sdk.gen.js
CHANGED
|
@@ -217,6 +217,15 @@ class Session extends _HeyApiClient {
|
|
|
217
217
|
...options,
|
|
218
218
|
});
|
|
219
219
|
}
|
|
220
|
+
/**
|
|
221
|
+
* Get the diff that resulted from this user message
|
|
222
|
+
*/
|
|
223
|
+
diff(options) {
|
|
224
|
+
return (options.client ?? this._client).get({
|
|
225
|
+
url: "/session/{id}/diff",
|
|
226
|
+
...options,
|
|
227
|
+
});
|
|
228
|
+
}
|
|
220
229
|
/**
|
|
221
230
|
* Summarize the session
|
|
222
231
|
*/
|
package/dist/gen/types.gen.d.ts
CHANGED
|
@@ -550,6 +550,11 @@ export type Todo = {
|
|
|
550
550
|
*/
|
|
551
551
|
id: string;
|
|
552
552
|
};
|
|
553
|
+
export type FileDiff = {
|
|
554
|
+
file: string;
|
|
555
|
+
left: string;
|
|
556
|
+
right: string;
|
|
557
|
+
};
|
|
553
558
|
export type UserMessage = {
|
|
554
559
|
id: string;
|
|
555
560
|
sessionID: string;
|
|
@@ -744,12 +749,14 @@ export type StepStartPart = {
|
|
|
744
749
|
sessionID: string;
|
|
745
750
|
messageID: string;
|
|
746
751
|
type: "step-start";
|
|
752
|
+
snapshot?: string;
|
|
747
753
|
};
|
|
748
754
|
export type StepFinishPart = {
|
|
749
755
|
id: string;
|
|
750
756
|
sessionID: string;
|
|
751
757
|
messageID: string;
|
|
752
758
|
type: "step-finish";
|
|
759
|
+
snapshot?: string;
|
|
753
760
|
cost: number;
|
|
754
761
|
tokens: {
|
|
755
762
|
input: number;
|
|
@@ -885,6 +892,7 @@ export type FileNode = {
|
|
|
885
892
|
ignored: boolean;
|
|
886
893
|
};
|
|
887
894
|
export type FileContent = {
|
|
895
|
+
type: "text";
|
|
888
896
|
content: string;
|
|
889
897
|
diff?: string;
|
|
890
898
|
patch?: {
|
|
@@ -901,6 +909,8 @@ export type FileContent = {
|
|
|
901
909
|
}>;
|
|
902
910
|
index?: string;
|
|
903
911
|
};
|
|
912
|
+
encoding?: "base64";
|
|
913
|
+
mimeType?: string;
|
|
904
914
|
};
|
|
905
915
|
export type File = {
|
|
906
916
|
path: string;
|
|
@@ -1532,6 +1542,24 @@ export type SessionShareResponses = {
|
|
|
1532
1542
|
200: Session;
|
|
1533
1543
|
};
|
|
1534
1544
|
export type SessionShareResponse = SessionShareResponses[keyof SessionShareResponses];
|
|
1545
|
+
export type SessionDiffData = {
|
|
1546
|
+
body?: never;
|
|
1547
|
+
path: {
|
|
1548
|
+
id: string;
|
|
1549
|
+
};
|
|
1550
|
+
query?: {
|
|
1551
|
+
directory?: string;
|
|
1552
|
+
messageID?: string;
|
|
1553
|
+
};
|
|
1554
|
+
url: "/session/{id}/diff";
|
|
1555
|
+
};
|
|
1556
|
+
export type SessionDiffResponses = {
|
|
1557
|
+
/**
|
|
1558
|
+
* Successfully retrieved diff
|
|
1559
|
+
*/
|
|
1560
|
+
200: Array<FileDiff>;
|
|
1561
|
+
};
|
|
1562
|
+
export type SessionDiffResponse = SessionDiffResponses[keyof SessionDiffResponses];
|
|
1535
1563
|
export type SessionSummarizeData = {
|
|
1536
1564
|
body?: {
|
|
1537
1565
|
providerID: string;
|
|
@@ -1612,6 +1640,10 @@ export type SessionPromptData = {
|
|
|
1612
1640
|
tools?: {
|
|
1613
1641
|
[key: string]: boolean;
|
|
1614
1642
|
};
|
|
1643
|
+
acpConnection?: {
|
|
1644
|
+
connection: unknown;
|
|
1645
|
+
sessionId: string;
|
|
1646
|
+
};
|
|
1615
1647
|
parts: Array<TextPartInput | FilePartInput | AgentPartInput>;
|
|
1616
1648
|
};
|
|
1617
1649
|
path: {
|