@opencode-ai/sdk 0.15.13 → 0.15.15
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/types.gen.d.ts +41 -10
- package/package.json +1 -1
package/dist/gen/types.gen.d.ts
CHANGED
|
@@ -504,11 +504,21 @@ export type Path = {
|
|
|
504
504
|
worktree: string;
|
|
505
505
|
directory: string;
|
|
506
506
|
};
|
|
507
|
+
export type FileDiff = {
|
|
508
|
+
file: string;
|
|
509
|
+
before: string;
|
|
510
|
+
after: string;
|
|
511
|
+
additions: number;
|
|
512
|
+
deletions: number;
|
|
513
|
+
};
|
|
507
514
|
export type Session = {
|
|
508
515
|
id: string;
|
|
509
516
|
projectID: string;
|
|
510
517
|
directory: string;
|
|
511
518
|
parentID?: string;
|
|
519
|
+
summary?: {
|
|
520
|
+
diffs: Array<FileDiff>;
|
|
521
|
+
};
|
|
512
522
|
share?: {
|
|
513
523
|
url: string;
|
|
514
524
|
};
|
|
@@ -550,13 +560,6 @@ export type Todo = {
|
|
|
550
560
|
*/
|
|
551
561
|
id: string;
|
|
552
562
|
};
|
|
553
|
-
export type FileDiff = {
|
|
554
|
-
file: string;
|
|
555
|
-
before: string;
|
|
556
|
-
after: string;
|
|
557
|
-
additions: number;
|
|
558
|
-
deletions: number;
|
|
559
|
-
};
|
|
560
563
|
export type UserMessage = {
|
|
561
564
|
id: string;
|
|
562
565
|
sessionID: string;
|
|
@@ -564,6 +567,10 @@ export type UserMessage = {
|
|
|
564
567
|
time: {
|
|
565
568
|
created: number;
|
|
566
569
|
};
|
|
570
|
+
summary?: {
|
|
571
|
+
diffs: Array<FileDiff>;
|
|
572
|
+
text: string;
|
|
573
|
+
};
|
|
567
574
|
};
|
|
568
575
|
export type ProviderAuthError = {
|
|
569
576
|
name: "ProviderAuthError";
|
|
@@ -590,6 +597,18 @@ export type MessageAbortedError = {
|
|
|
590
597
|
message: string;
|
|
591
598
|
};
|
|
592
599
|
};
|
|
600
|
+
export type ApiError = {
|
|
601
|
+
name: "APIError";
|
|
602
|
+
data: {
|
|
603
|
+
message: string;
|
|
604
|
+
statusCode?: number;
|
|
605
|
+
isRetryable: boolean;
|
|
606
|
+
responseHeaders?: {
|
|
607
|
+
[key: string]: string;
|
|
608
|
+
};
|
|
609
|
+
responseBody?: string;
|
|
610
|
+
};
|
|
611
|
+
};
|
|
593
612
|
export type AssistantMessage = {
|
|
594
613
|
id: string;
|
|
595
614
|
sessionID: string;
|
|
@@ -598,8 +617,9 @@ export type AssistantMessage = {
|
|
|
598
617
|
created: number;
|
|
599
618
|
completed?: number;
|
|
600
619
|
};
|
|
601
|
-
error?: ProviderAuthError | UnknownError | MessageOutputLengthError | MessageAbortedError;
|
|
620
|
+
error?: ProviderAuthError | UnknownError | MessageOutputLengthError | MessageAbortedError | ApiError;
|
|
602
621
|
system: Array<string>;
|
|
622
|
+
parentID: string;
|
|
603
623
|
modelID: string;
|
|
604
624
|
providerID: string;
|
|
605
625
|
mode: string;
|
|
@@ -797,7 +817,18 @@ export type AgentPart = {
|
|
|
797
817
|
end: number;
|
|
798
818
|
};
|
|
799
819
|
};
|
|
800
|
-
export type
|
|
820
|
+
export type RetryPart = {
|
|
821
|
+
id: string;
|
|
822
|
+
sessionID: string;
|
|
823
|
+
messageID: string;
|
|
824
|
+
type: "retry";
|
|
825
|
+
attempt: number;
|
|
826
|
+
error: ApiError;
|
|
827
|
+
time: {
|
|
828
|
+
created: number;
|
|
829
|
+
};
|
|
830
|
+
};
|
|
831
|
+
export type Part = TextPart | ReasoningPart | FilePart | ToolPart | StepStartPart | StepFinishPart | SnapshotPart | PatchPart | AgentPart | RetryPart;
|
|
801
832
|
export type TextPartInput = {
|
|
802
833
|
id?: string;
|
|
803
834
|
type: "text";
|
|
@@ -1077,7 +1108,7 @@ export type EventSessionError = {
|
|
|
1077
1108
|
type: "session.error";
|
|
1078
1109
|
properties: {
|
|
1079
1110
|
sessionID?: string;
|
|
1080
|
-
error?: ProviderAuthError | UnknownError | MessageOutputLengthError | MessageAbortedError;
|
|
1111
|
+
error?: ProviderAuthError | UnknownError | MessageOutputLengthError | MessageAbortedError | ApiError;
|
|
1081
1112
|
};
|
|
1082
1113
|
};
|
|
1083
1114
|
export type EventServerConnected = {
|