@ex-machina/opencode-sdk 1.2.24-exmachina.1 → 1.2.24-exmachina.3
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/v2/gen/sdk.gen.d.ts +2 -0
- package/dist/v2/gen/sdk.gen.js +2 -0
- package/dist/v2/gen/types.gen.d.ts +123 -165
- package/package.json +1 -1
package/dist/v2/gen/sdk.gen.d.ts
CHANGED
|
@@ -393,6 +393,7 @@ export declare class Session2 extends HeyApiClient {
|
|
|
393
393
|
parentID?: string;
|
|
394
394
|
title?: string;
|
|
395
395
|
permission?: PermissionRuleset;
|
|
396
|
+
workspaceID?: string;
|
|
396
397
|
}, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<SessionCreateResponses, SessionCreateErrors, ThrowOnError, "fields">;
|
|
397
398
|
/**
|
|
398
399
|
* Get session status
|
|
@@ -545,6 +546,7 @@ export declare class Session2 extends HeyApiClient {
|
|
|
545
546
|
directory?: string;
|
|
546
547
|
workspace?: string;
|
|
547
548
|
limit?: number;
|
|
549
|
+
before?: string;
|
|
548
550
|
}, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<SessionMessagesResponses, SessionMessagesErrors, ThrowOnError, "fields">;
|
|
549
551
|
/**
|
|
550
552
|
* Send message
|
package/dist/v2/gen/sdk.gen.js
CHANGED
|
@@ -752,6 +752,7 @@ export class Session2 extends HeyApiClient {
|
|
|
752
752
|
{ in: "body", key: "parentID" },
|
|
753
753
|
{ in: "body", key: "title" },
|
|
754
754
|
{ in: "body", key: "permission" },
|
|
755
|
+
{ in: "body", key: "workspaceID" },
|
|
755
756
|
],
|
|
756
757
|
},
|
|
757
758
|
]);
|
|
@@ -1081,6 +1082,7 @@ export class Session2 extends HeyApiClient {
|
|
|
1081
1082
|
{ in: "query", key: "directory" },
|
|
1082
1083
|
{ in: "query", key: "workspace" },
|
|
1083
1084
|
{ in: "query", key: "limit" },
|
|
1085
|
+
{ in: "query", key: "before" },
|
|
1084
1086
|
],
|
|
1085
1087
|
},
|
|
1086
1088
|
]);
|
|
@@ -46,6 +46,115 @@ export type EventServerInstanceDisposed = {
|
|
|
46
46
|
directory: string;
|
|
47
47
|
};
|
|
48
48
|
};
|
|
49
|
+
export type QuestionOption = {
|
|
50
|
+
/**
|
|
51
|
+
* Display text (1-5 words, concise)
|
|
52
|
+
*/
|
|
53
|
+
label: string;
|
|
54
|
+
/**
|
|
55
|
+
* Explanation of choice
|
|
56
|
+
*/
|
|
57
|
+
description: string;
|
|
58
|
+
};
|
|
59
|
+
export type QuestionInfo = {
|
|
60
|
+
/**
|
|
61
|
+
* Complete question
|
|
62
|
+
*/
|
|
63
|
+
question: string;
|
|
64
|
+
/**
|
|
65
|
+
* Very short label (max 30 chars)
|
|
66
|
+
*/
|
|
67
|
+
header: string;
|
|
68
|
+
/**
|
|
69
|
+
* Available choices
|
|
70
|
+
*/
|
|
71
|
+
options: Array<QuestionOption>;
|
|
72
|
+
/**
|
|
73
|
+
* Allow selecting multiple choices
|
|
74
|
+
*/
|
|
75
|
+
multiple?: boolean;
|
|
76
|
+
/**
|
|
77
|
+
* Allow typing a custom answer (default: true)
|
|
78
|
+
*/
|
|
79
|
+
custom?: boolean;
|
|
80
|
+
};
|
|
81
|
+
export type QuestionRequest = {
|
|
82
|
+
id: string;
|
|
83
|
+
sessionID: string;
|
|
84
|
+
/**
|
|
85
|
+
* Questions to ask
|
|
86
|
+
*/
|
|
87
|
+
questions: Array<QuestionInfo>;
|
|
88
|
+
tool?: {
|
|
89
|
+
messageID: string;
|
|
90
|
+
callID: string;
|
|
91
|
+
};
|
|
92
|
+
};
|
|
93
|
+
export type EventQuestionAsked = {
|
|
94
|
+
type: "question.asked";
|
|
95
|
+
properties: QuestionRequest;
|
|
96
|
+
};
|
|
97
|
+
export type QuestionAnswer = Array<string>;
|
|
98
|
+
export type EventQuestionReplied = {
|
|
99
|
+
type: "question.replied";
|
|
100
|
+
properties: {
|
|
101
|
+
sessionID: string;
|
|
102
|
+
requestID: string;
|
|
103
|
+
answers: Array<QuestionAnswer>;
|
|
104
|
+
};
|
|
105
|
+
};
|
|
106
|
+
export type EventQuestionRejected = {
|
|
107
|
+
type: "question.rejected";
|
|
108
|
+
properties: {
|
|
109
|
+
sessionID: string;
|
|
110
|
+
requestID: string;
|
|
111
|
+
};
|
|
112
|
+
};
|
|
113
|
+
export type PermissionRequest = {
|
|
114
|
+
id: string;
|
|
115
|
+
sessionID: string;
|
|
116
|
+
permission: string;
|
|
117
|
+
patterns: Array<string>;
|
|
118
|
+
metadata: {
|
|
119
|
+
[key: string]: unknown;
|
|
120
|
+
};
|
|
121
|
+
always: Array<string>;
|
|
122
|
+
tool?: {
|
|
123
|
+
messageID: string;
|
|
124
|
+
callID: string;
|
|
125
|
+
};
|
|
126
|
+
};
|
|
127
|
+
export type EventPermissionAsked = {
|
|
128
|
+
type: "permission.asked";
|
|
129
|
+
properties: PermissionRequest;
|
|
130
|
+
};
|
|
131
|
+
export type EventPermissionReplied = {
|
|
132
|
+
type: "permission.replied";
|
|
133
|
+
properties: {
|
|
134
|
+
sessionID: string;
|
|
135
|
+
requestID: string;
|
|
136
|
+
reply: "once" | "always" | "reject";
|
|
137
|
+
};
|
|
138
|
+
};
|
|
139
|
+
export type EventFileWatcherUpdated = {
|
|
140
|
+
type: "file.watcher.updated";
|
|
141
|
+
properties: {
|
|
142
|
+
file: string;
|
|
143
|
+
event: "add" | "change" | "unlink";
|
|
144
|
+
};
|
|
145
|
+
};
|
|
146
|
+
export type EventVcsBranchUpdated = {
|
|
147
|
+
type: "vcs.branch.updated";
|
|
148
|
+
properties: {
|
|
149
|
+
branch?: string;
|
|
150
|
+
};
|
|
151
|
+
};
|
|
152
|
+
export type EventFileEdited = {
|
|
153
|
+
type: "file.edited";
|
|
154
|
+
properties: {
|
|
155
|
+
file: string;
|
|
156
|
+
};
|
|
157
|
+
};
|
|
49
158
|
export type EventServerConnected = {
|
|
50
159
|
type: "server.connected";
|
|
51
160
|
properties: {
|
|
@@ -71,12 +180,6 @@ export type EventLspUpdated = {
|
|
|
71
180
|
[key: string]: unknown;
|
|
72
181
|
};
|
|
73
182
|
};
|
|
74
|
-
export type EventFileEdited = {
|
|
75
|
-
type: "file.edited";
|
|
76
|
-
properties: {
|
|
77
|
-
file: string;
|
|
78
|
-
};
|
|
79
|
-
};
|
|
80
183
|
export type OutputFormatText = {
|
|
81
184
|
type: "text";
|
|
82
185
|
};
|
|
@@ -473,32 +576,6 @@ export type EventMessagePartRemoved = {
|
|
|
473
576
|
partID: string;
|
|
474
577
|
};
|
|
475
578
|
};
|
|
476
|
-
export type PermissionRequest = {
|
|
477
|
-
id: string;
|
|
478
|
-
sessionID: string;
|
|
479
|
-
permission: string;
|
|
480
|
-
patterns: Array<string>;
|
|
481
|
-
metadata: {
|
|
482
|
-
[key: string]: unknown;
|
|
483
|
-
};
|
|
484
|
-
always: Array<string>;
|
|
485
|
-
tool?: {
|
|
486
|
-
messageID: string;
|
|
487
|
-
callID: string;
|
|
488
|
-
};
|
|
489
|
-
};
|
|
490
|
-
export type EventPermissionAsked = {
|
|
491
|
-
type: "permission.asked";
|
|
492
|
-
properties: PermissionRequest;
|
|
493
|
-
};
|
|
494
|
-
export type EventPermissionReplied = {
|
|
495
|
-
type: "permission.replied";
|
|
496
|
-
properties: {
|
|
497
|
-
sessionID: string;
|
|
498
|
-
requestID: string;
|
|
499
|
-
reply: "once" | "always" | "reject";
|
|
500
|
-
};
|
|
501
|
-
};
|
|
502
579
|
export type SessionStatus = {
|
|
503
580
|
type: "idle";
|
|
504
581
|
} | {
|
|
@@ -522,83 +599,12 @@ export type EventSessionIdle = {
|
|
|
522
599
|
sessionID: string;
|
|
523
600
|
};
|
|
524
601
|
};
|
|
525
|
-
export type QuestionOption = {
|
|
526
|
-
/**
|
|
527
|
-
* Display text (1-5 words, concise)
|
|
528
|
-
*/
|
|
529
|
-
label: string;
|
|
530
|
-
/**
|
|
531
|
-
* Explanation of choice
|
|
532
|
-
*/
|
|
533
|
-
description: string;
|
|
534
|
-
};
|
|
535
|
-
export type QuestionInfo = {
|
|
536
|
-
/**
|
|
537
|
-
* Complete question
|
|
538
|
-
*/
|
|
539
|
-
question: string;
|
|
540
|
-
/**
|
|
541
|
-
* Very short label (max 30 chars)
|
|
542
|
-
*/
|
|
543
|
-
header: string;
|
|
544
|
-
/**
|
|
545
|
-
* Available choices
|
|
546
|
-
*/
|
|
547
|
-
options: Array<QuestionOption>;
|
|
548
|
-
/**
|
|
549
|
-
* Allow selecting multiple choices
|
|
550
|
-
*/
|
|
551
|
-
multiple?: boolean;
|
|
552
|
-
/**
|
|
553
|
-
* Allow typing a custom answer (default: true)
|
|
554
|
-
*/
|
|
555
|
-
custom?: boolean;
|
|
556
|
-
};
|
|
557
|
-
export type QuestionRequest = {
|
|
558
|
-
sessionID: string;
|
|
559
|
-
/**
|
|
560
|
-
* Questions to ask
|
|
561
|
-
*/
|
|
562
|
-
questions: Array<QuestionInfo>;
|
|
563
|
-
tool?: {
|
|
564
|
-
messageID: string;
|
|
565
|
-
callID: string;
|
|
566
|
-
};
|
|
567
|
-
id: string;
|
|
568
|
-
};
|
|
569
|
-
export type EventQuestionAsked = {
|
|
570
|
-
type: "question.asked";
|
|
571
|
-
properties: QuestionRequest;
|
|
572
|
-
};
|
|
573
|
-
export type QuestionAnswer = Array<string>;
|
|
574
|
-
export type EventQuestionReplied = {
|
|
575
|
-
type: "question.replied";
|
|
576
|
-
properties: {
|
|
577
|
-
sessionID: string;
|
|
578
|
-
requestID: string;
|
|
579
|
-
answers: Array<QuestionAnswer>;
|
|
580
|
-
};
|
|
581
|
-
};
|
|
582
|
-
export type EventQuestionRejected = {
|
|
583
|
-
type: "question.rejected";
|
|
584
|
-
properties: {
|
|
585
|
-
sessionID: string;
|
|
586
|
-
requestID: string;
|
|
587
|
-
};
|
|
588
|
-
};
|
|
589
602
|
export type EventSessionCompacted = {
|
|
590
603
|
type: "session.compacted";
|
|
591
604
|
properties: {
|
|
592
605
|
sessionID: string;
|
|
593
606
|
};
|
|
594
607
|
};
|
|
595
|
-
export type EventFileWatcherUpdated = {
|
|
596
|
-
type: "file.watcher.updated";
|
|
597
|
-
properties: {
|
|
598
|
-
file: string;
|
|
599
|
-
event: "add" | "change" | "unlink";
|
|
600
|
-
};
|
|
601
|
-
};
|
|
602
608
|
export type Todo = {
|
|
603
609
|
/**
|
|
604
610
|
* Brief description of the task
|
|
@@ -746,12 +752,6 @@ export type EventSessionError = {
|
|
|
746
752
|
error?: ProviderAuthError | UnknownError | MessageOutputLengthError | MessageAbortedError | StructuredOutputError | ContextOverflowError | ApiError;
|
|
747
753
|
};
|
|
748
754
|
};
|
|
749
|
-
export type EventVcsBranchUpdated = {
|
|
750
|
-
type: "vcs.branch.updated";
|
|
751
|
-
properties: {
|
|
752
|
-
branch?: string;
|
|
753
|
-
};
|
|
754
|
-
};
|
|
755
755
|
export type EventWorkspaceReady = {
|
|
756
756
|
type: "workspace.ready";
|
|
757
757
|
properties: {
|
|
@@ -811,7 +811,7 @@ export type EventWorktreeFailed = {
|
|
|
811
811
|
message: string;
|
|
812
812
|
};
|
|
813
813
|
};
|
|
814
|
-
export type Event = EventInstallationUpdated | EventInstallationUpdateAvailable | EventProjectUpdated | EventServerInstanceDisposed |
|
|
814
|
+
export type Event = EventInstallationUpdated | EventInstallationUpdateAvailable | EventProjectUpdated | EventServerInstanceDisposed | EventQuestionAsked | EventQuestionReplied | EventQuestionRejected | EventPermissionAsked | EventPermissionReplied | EventFileWatcherUpdated | EventVcsBranchUpdated | EventFileEdited | EventServerConnected | EventGlobalDisposed | EventLspClientDiagnostics | EventLspUpdated | EventMessageUpdated | EventMessageRemoved | EventMessagePartUpdated | EventMessagePartDelta | EventMessagePartRemoved | EventSessionStatus | EventSessionIdle | EventSessionCompacted | EventTodoUpdated | EventTuiPromptAppend | EventTuiCommandExecute | EventTuiToastShow | EventTuiSessionSelect | EventMcpToolsChanged | EventMcpBrowserOpenFailed | EventCommandExecuted | EventSessionCreated | EventSessionUpdated | EventSessionDeleted | EventSessionDiff | EventSessionError | EventWorkspaceReady | EventWorkspaceFailed | EventPtyCreated | EventPtyUpdated | EventPtyExited | EventPtyDeleted | EventWorktreeReady | EventWorktreeFailed;
|
|
815
815
|
export type GlobalEvent = {
|
|
816
816
|
directory: string;
|
|
817
817
|
payload: Event;
|
|
@@ -1001,7 +1001,11 @@ export type ProviderConfig = {
|
|
|
1001
1001
|
* Timeout in milliseconds for requests to this provider. Default is 300000 (5 minutes). Set to false to disable timeout.
|
|
1002
1002
|
*/
|
|
1003
1003
|
timeout?: number | false;
|
|
1004
|
-
|
|
1004
|
+
/**
|
|
1005
|
+
* Timeout in milliseconds between streamed SSE chunks for this provider. If no chunk arrives within this window, the request is aborted.
|
|
1006
|
+
*/
|
|
1007
|
+
chunkTimeout?: number;
|
|
1008
|
+
[key: string]: unknown | string | boolean | number | false | number | undefined;
|
|
1005
1009
|
};
|
|
1006
1010
|
};
|
|
1007
1011
|
export type McpLocalConfig = {
|
|
@@ -1110,6 +1114,9 @@ export type Config = {
|
|
|
1110
1114
|
ignore?: Array<string>;
|
|
1111
1115
|
};
|
|
1112
1116
|
plugin?: Array<string>;
|
|
1117
|
+
/**
|
|
1118
|
+
* Enable or disable snapshot tracking. When false, filesystem snapshots are not recorded and undoing or reverting will not undo/redo file changes. Defaults to true.
|
|
1119
|
+
*/
|
|
1113
1120
|
snapshot?: boolean;
|
|
1114
1121
|
/**
|
|
1115
1122
|
* Control sharing behavior:'manual' allows manual sharing via commands, 'auto' enables automatic sharing, 'disabled' disables all sharing
|
|
@@ -2352,6 +2359,7 @@ export type SessionCreateData = {
|
|
|
2352
2359
|
parentID?: string;
|
|
2353
2360
|
title?: string;
|
|
2354
2361
|
permission?: PermissionRuleset;
|
|
2362
|
+
workspaceID?: string;
|
|
2355
2363
|
};
|
|
2356
2364
|
path?: never;
|
|
2357
2365
|
query?: {
|
|
@@ -2523,9 +2531,6 @@ export type SessionChildrenResponse = SessionChildrenResponses[keyof SessionChil
|
|
|
2523
2531
|
export type SessionTodoData = {
|
|
2524
2532
|
body?: never;
|
|
2525
2533
|
path: {
|
|
2526
|
-
/**
|
|
2527
|
-
* Session ID
|
|
2528
|
-
*/
|
|
2529
2534
|
sessionID: string;
|
|
2530
2535
|
};
|
|
2531
2536
|
query?: {
|
|
@@ -2559,9 +2564,6 @@ export type SessionInitData = {
|
|
|
2559
2564
|
messageID: string;
|
|
2560
2565
|
};
|
|
2561
2566
|
path: {
|
|
2562
|
-
/**
|
|
2563
|
-
* Session ID
|
|
2564
|
-
*/
|
|
2565
2567
|
sessionID: string;
|
|
2566
2568
|
};
|
|
2567
2569
|
query?: {
|
|
@@ -2721,9 +2723,6 @@ export type SessionSummarizeData = {
|
|
|
2721
2723
|
auto?: boolean;
|
|
2722
2724
|
};
|
|
2723
2725
|
path: {
|
|
2724
|
-
/**
|
|
2725
|
-
* Session ID
|
|
2726
|
-
*/
|
|
2727
2726
|
sessionID: string;
|
|
2728
2727
|
};
|
|
2729
2728
|
query?: {
|
|
@@ -2753,15 +2752,16 @@ export type SessionSummarizeResponse = SessionSummarizeResponses[keyof SessionSu
|
|
|
2753
2752
|
export type SessionMessagesData = {
|
|
2754
2753
|
body?: never;
|
|
2755
2754
|
path: {
|
|
2756
|
-
/**
|
|
2757
|
-
* Session ID
|
|
2758
|
-
*/
|
|
2759
2755
|
sessionID: string;
|
|
2760
2756
|
};
|
|
2761
2757
|
query?: {
|
|
2762
2758
|
directory?: string;
|
|
2763
2759
|
workspace?: string;
|
|
2760
|
+
/**
|
|
2761
|
+
* Maximum number of messages to return
|
|
2762
|
+
*/
|
|
2764
2763
|
limit?: number;
|
|
2764
|
+
before?: string;
|
|
2765
2765
|
};
|
|
2766
2766
|
url: "/session/{sessionID}/message";
|
|
2767
2767
|
};
|
|
@@ -2807,9 +2807,6 @@ export type SessionPromptData = {
|
|
|
2807
2807
|
parts: Array<TextPartInput | FilePartInput | AgentPartInput | SubtaskPartInput>;
|
|
2808
2808
|
};
|
|
2809
2809
|
path: {
|
|
2810
|
-
/**
|
|
2811
|
-
* Session ID
|
|
2812
|
-
*/
|
|
2813
2810
|
sessionID: string;
|
|
2814
2811
|
};
|
|
2815
2812
|
query?: {
|
|
@@ -2842,13 +2839,7 @@ export type SessionPromptResponse = SessionPromptResponses[keyof SessionPromptRe
|
|
|
2842
2839
|
export type SessionDeleteMessageData = {
|
|
2843
2840
|
body?: never;
|
|
2844
2841
|
path: {
|
|
2845
|
-
/**
|
|
2846
|
-
* Session ID
|
|
2847
|
-
*/
|
|
2848
2842
|
sessionID: string;
|
|
2849
|
-
/**
|
|
2850
|
-
* Message ID
|
|
2851
|
-
*/
|
|
2852
2843
|
messageID: string;
|
|
2853
2844
|
};
|
|
2854
2845
|
query?: {
|
|
@@ -2878,13 +2869,7 @@ export type SessionDeleteMessageResponse = SessionDeleteMessageResponses[keyof S
|
|
|
2878
2869
|
export type SessionMessageData = {
|
|
2879
2870
|
body?: never;
|
|
2880
2871
|
path: {
|
|
2881
|
-
/**
|
|
2882
|
-
* Session ID
|
|
2883
|
-
*/
|
|
2884
2872
|
sessionID: string;
|
|
2885
|
-
/**
|
|
2886
|
-
* Message ID
|
|
2887
|
-
*/
|
|
2888
2873
|
messageID: string;
|
|
2889
2874
|
};
|
|
2890
2875
|
query?: {
|
|
@@ -2917,17 +2902,8 @@ export type SessionMessageResponse = SessionMessageResponses[keyof SessionMessag
|
|
|
2917
2902
|
export type PartDeleteData = {
|
|
2918
2903
|
body?: never;
|
|
2919
2904
|
path: {
|
|
2920
|
-
/**
|
|
2921
|
-
* Session ID
|
|
2922
|
-
*/
|
|
2923
2905
|
sessionID: string;
|
|
2924
|
-
/**
|
|
2925
|
-
* Message ID
|
|
2926
|
-
*/
|
|
2927
2906
|
messageID: string;
|
|
2928
|
-
/**
|
|
2929
|
-
* Part ID
|
|
2930
|
-
*/
|
|
2931
2907
|
partID: string;
|
|
2932
2908
|
};
|
|
2933
2909
|
query?: {
|
|
@@ -2957,17 +2933,8 @@ export type PartDeleteResponse = PartDeleteResponses[keyof PartDeleteResponses];
|
|
|
2957
2933
|
export type PartUpdateData = {
|
|
2958
2934
|
body?: Part;
|
|
2959
2935
|
path: {
|
|
2960
|
-
/**
|
|
2961
|
-
* Session ID
|
|
2962
|
-
*/
|
|
2963
2936
|
sessionID: string;
|
|
2964
|
-
/**
|
|
2965
|
-
* Message ID
|
|
2966
|
-
*/
|
|
2967
2937
|
messageID: string;
|
|
2968
|
-
/**
|
|
2969
|
-
* Part ID
|
|
2970
|
-
*/
|
|
2971
2938
|
partID: string;
|
|
2972
2939
|
};
|
|
2973
2940
|
query?: {
|
|
@@ -3015,9 +2982,6 @@ export type SessionPromptAsyncData = {
|
|
|
3015
2982
|
parts: Array<TextPartInput | FilePartInput | AgentPartInput | SubtaskPartInput>;
|
|
3016
2983
|
};
|
|
3017
2984
|
path: {
|
|
3018
|
-
/**
|
|
3019
|
-
* Session ID
|
|
3020
|
-
*/
|
|
3021
2985
|
sessionID: string;
|
|
3022
2986
|
};
|
|
3023
2987
|
query?: {
|
|
@@ -3062,9 +3026,6 @@ export type SessionCommandData = {
|
|
|
3062
3026
|
}>;
|
|
3063
3027
|
};
|
|
3064
3028
|
path: {
|
|
3065
|
-
/**
|
|
3066
|
-
* Session ID
|
|
3067
|
-
*/
|
|
3068
3029
|
sessionID: string;
|
|
3069
3030
|
};
|
|
3070
3031
|
query?: {
|
|
@@ -3104,9 +3065,6 @@ export type SessionShellData = {
|
|
|
3104
3065
|
command: string;
|
|
3105
3066
|
};
|
|
3106
3067
|
path: {
|
|
3107
|
-
/**
|
|
3108
|
-
* Session ID
|
|
3109
|
-
*/
|
|
3110
3068
|
sessionID: string;
|
|
3111
3069
|
};
|
|
3112
3070
|
query?: {
|