@opencode-ai/sdk 0.15.12 → 0.15.14

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.
@@ -564,6 +564,10 @@ export type UserMessage = {
564
564
  time: {
565
565
  created: number;
566
566
  };
567
+ summary?: {
568
+ diffs: Array<FileDiff>;
569
+ text: string;
570
+ };
567
571
  };
568
572
  export type ProviderAuthError = {
569
573
  name: "ProviderAuthError";
@@ -590,6 +594,18 @@ export type MessageAbortedError = {
590
594
  message: string;
591
595
  };
592
596
  };
597
+ export type ApiError = {
598
+ name: "APIError";
599
+ data: {
600
+ message: string;
601
+ statusCode?: number;
602
+ isRetryable: boolean;
603
+ responseHeaders?: {
604
+ [key: string]: string;
605
+ };
606
+ responseBody?: string;
607
+ };
608
+ };
593
609
  export type AssistantMessage = {
594
610
  id: string;
595
611
  sessionID: string;
@@ -598,8 +614,9 @@ export type AssistantMessage = {
598
614
  created: number;
599
615
  completed?: number;
600
616
  };
601
- error?: ProviderAuthError | UnknownError | MessageOutputLengthError | MessageAbortedError;
617
+ error?: ProviderAuthError | UnknownError | MessageOutputLengthError | MessageAbortedError | ApiError;
602
618
  system: Array<string>;
619
+ parentID: string;
603
620
  modelID: string;
604
621
  providerID: string;
605
622
  mode: string;
@@ -797,7 +814,18 @@ export type AgentPart = {
797
814
  end: number;
798
815
  };
799
816
  };
800
- export type Part = TextPart | ReasoningPart | FilePart | ToolPart | StepStartPart | StepFinishPart | SnapshotPart | PatchPart | AgentPart;
817
+ export type RetryPart = {
818
+ id: string;
819
+ sessionID: string;
820
+ messageID: string;
821
+ type: "retry";
822
+ attempt: number;
823
+ error: ApiError;
824
+ time: {
825
+ created: number;
826
+ };
827
+ };
828
+ export type Part = TextPart | ReasoningPart | FilePart | ToolPart | StepStartPart | StepFinishPart | SnapshotPart | PatchPart | AgentPart | RetryPart;
801
829
  export type TextPartInput = {
802
830
  id?: string;
803
831
  type: "text";
@@ -1077,7 +1105,7 @@ export type EventSessionError = {
1077
1105
  type: "session.error";
1078
1106
  properties: {
1079
1107
  sessionID?: string;
1080
- error?: ProviderAuthError | UnknownError | MessageOutputLengthError | MessageAbortedError;
1108
+ error?: ProviderAuthError | UnknownError | MessageOutputLengthError | MessageAbortedError | ApiError;
1081
1109
  };
1082
1110
  };
1083
1111
  export type EventServerConnected = {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/package.json",
3
3
  "name": "@opencode-ai/sdk",
4
- "version": "0.15.12",
4
+ "version": "0.15.14",
5
5
  "type": "module",
6
6
  "scripts": {
7
7
  "typecheck": "tsgo --noEmit",