@opencode-ai/sdk 0.0.0-dev-202606021844 → 0.0.0-dev-202606021924

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.
@@ -1,7 +1,7 @@
1
1
  export type ClientOptions = {
2
2
  baseUrl: `${string}://${string}` | (string & {});
3
3
  };
4
- export type Event = EventModelsDevRefreshed | EventPluginAdded | EventCatalogModelUpdated | EventFileEdited | EventSessionNextAgentSwitched | EventSessionNextModelSwitched | EventSessionNextPrompted | EventSessionNextSynthetic | EventSessionNextShellStarted | EventSessionNextShellEnded | EventSessionNextStepStarted | EventSessionNextStepEnded | EventSessionNextStepFailed | EventSessionNextTextStarted | EventSessionNextTextDelta | EventSessionNextTextEnded | EventSessionNextReasoningStarted | EventSessionNextReasoningDelta | EventSessionNextReasoningEnded | EventSessionNextToolInputStarted | EventSessionNextToolInputDelta | EventSessionNextToolInputEnded | EventSessionNextToolCalled | EventSessionNextToolProgress | EventSessionNextToolSuccess | EventSessionNextToolFailed | EventSessionNextRetried | EventSessionNextCompactionStarted | EventSessionNextCompactionDelta | EventSessionNextCompactionEnded | EventFileWatcherUpdated | EventSessionCreated | EventSessionUpdated | EventSessionDeleted | EventMessageUpdated | EventMessageRemoved | EventMessagePartUpdated | EventMessagePartRemoved | EventMessagePartDelta | EventSessionDiff | EventSessionError | EventPermissionAsked | EventPermissionReplied | EventQuestionAsked | EventQuestionReplied | EventQuestionRejected | EventTodoUpdated | EventSessionStatus | EventSessionIdle | EventSessionCompacted | EventLspUpdated | EventTuiPromptAppend2 | EventTuiCommandExecute2 | EventTuiToastShow2 | EventTuiSessionSelect2 | EventMcpToolsChanged | EventMcpBrowserOpenFailed | EventCommandExecuted | EventProjectUpdated | EventVcsBranchUpdated | EventWorkspaceReady | EventWorkspaceFailed | EventWorkspaceStatus | EventWorktreeReady | EventWorktreeFailed | EventPtyCreated | EventPtyUpdated | EventPtyExited | EventPtyDeleted | EventInstallationUpdated | EventInstallationUpdateAvailable | EventServerConnected | EventGlobalDisposed | EventPermissionV2Asked | EventPermissionV2Replied | EventAccountAdded | EventAccountRemoved | EventAccountSwitched | EventServerInstanceDisposed;
4
+ export type Event = EventModelsDevRefreshed | EventPluginAdded | EventCatalogModelUpdated | EventSessionCreated | EventSessionUpdated | EventSessionDeleted | EventMessageUpdated | EventMessageRemoved | EventMessagePartUpdated | EventMessagePartRemoved | EventSessionNextAgentSwitched | EventSessionNextModelSwitched | EventSessionNextPrompted | EventSessionNextSynthetic | EventSessionNextShellStarted | EventSessionNextShellEnded | EventSessionNextStepStarted | EventSessionNextStepEnded | EventSessionNextStepFailed | EventSessionNextTextStarted | EventSessionNextTextDelta | EventSessionNextTextEnded | EventSessionNextReasoningStarted | EventSessionNextReasoningDelta | EventSessionNextReasoningEnded | EventSessionNextToolInputStarted | EventSessionNextToolInputDelta | EventSessionNextToolInputEnded | EventSessionNextToolCalled | EventSessionNextToolProgress | EventSessionNextToolSuccess | EventSessionNextToolFailed | EventSessionNextRetried | EventSessionNextCompactionStarted | EventSessionNextCompactionDelta | EventSessionNextCompactionEnded | EventMessagePartDelta | EventSessionDiff | EventSessionError | EventInstallationUpdated | EventInstallationUpdateAvailable | EventFileEdited | EventLspUpdated | EventPermissionAsked | EventPermissionReplied | EventPermissionV2Asked | EventPermissionV2Replied | EventAccountAdded | EventAccountRemoved | EventAccountSwitched | EventTuiPromptAppend2 | EventTuiCommandExecute2 | EventTuiToastShow2 | EventTuiSessionSelect2 | EventMcpToolsChanged | EventMcpBrowserOpenFailed | EventCommandExecuted | EventFileWatcherUpdated | EventProjectUpdated | EventPtyCreated | EventPtyUpdated | EventPtyExited | EventPtyDeleted | EventQuestionAsked | EventQuestionReplied | EventQuestionRejected | EventSessionStatus | EventSessionIdle | EventSessionCompacted | EventTodoUpdated | EventVcsBranchUpdated | EventWorktreeReady | EventWorktreeFailed | EventWorkspaceReady | EventWorkspaceFailed | EventWorkspaceStatus | EventServerConnected | EventGlobalDisposed | EventServerInstanceDisposed;
5
5
  export type QuestionReplied = {
6
6
  sessionID: string;
7
7
  requestID: string;
@@ -41,12 +41,6 @@ export type InvalidRequestError = {
41
41
  kind?: string;
42
42
  field?: string;
43
43
  };
44
- export type Prompt = {
45
- text: string;
46
- files?: Array<PromptFileAttachment>;
47
- agents?: Array<PromptAgentAttachment>;
48
- references?: Array<PromptReferenceAttachment>;
49
- };
50
44
  export type SnapshotFileDiff = {
51
45
  file?: string;
52
46
  patch?: string;
@@ -466,6 +460,21 @@ export type CompactionPart = {
466
460
  tail_start_id?: string;
467
461
  };
468
462
  export type Part = TextPart | SubtaskPart | ReasoningPart | FilePart | ToolPart | StepStartPart | StepFinishPart | SnapshotPart | PatchPart | AgentPart | RetryPart | CompactionPart;
463
+ export type Prompt = {
464
+ text: string;
465
+ files?: Array<PromptFileAttachment>;
466
+ agents?: Array<PromptAgentAttachment>;
467
+ references?: Array<PromptReferenceAttachment>;
468
+ };
469
+ export type Pty = {
470
+ id: string;
471
+ title: string;
472
+ command: string;
473
+ args: Array<string>;
474
+ cwd: string;
475
+ status: "running" | "exited";
476
+ pid: number;
477
+ };
469
478
  export type QuestionOption = {
470
479
  /**
471
480
  * Display text (1-5 words, concise)
@@ -497,20 +506,6 @@ export type QuestionTool = {
497
506
  callID: string;
498
507
  };
499
508
  export type QuestionAnswer = Array<string>;
500
- export type Todo = {
501
- /**
502
- * Brief description of the task
503
- */
504
- content: string;
505
- /**
506
- * Current status of the task: pending, in_progress, completed, cancelled
507
- */
508
- status: string;
509
- /**
510
- * Priority level of the task: high, medium, low
511
- */
512
- priority: string;
513
- };
514
509
  export type SessionStatus = {
515
510
  type: "idle";
516
511
  } | {
@@ -529,14 +524,19 @@ export type SessionStatus = {
529
524
  } | {
530
525
  type: "busy";
531
526
  };
532
- export type Pty = {
533
- id: string;
534
- title: string;
535
- command: string;
536
- args: Array<string>;
537
- cwd: string;
538
- status: "running" | "exited";
539
- pid: number;
527
+ export type Todo = {
528
+ /**
529
+ * Brief description of the task
530
+ */
531
+ content: string;
532
+ /**
533
+ * Current status of the task: pending, in_progress, completed, cancelled
534
+ */
535
+ status: string;
536
+ /**
537
+ * Priority level of the task: high, medium, low
538
+ */
539
+ priority: string;
540
540
  };
541
541
  export type GlobalEvent = {
542
542
  directory: string;
@@ -562,9 +562,54 @@ export type GlobalEvent = {
562
562
  };
563
563
  } | {
564
564
  id: string;
565
- type: "file.edited";
565
+ type: "session.created";
566
566
  properties: {
567
- file: string;
567
+ sessionID: string;
568
+ info: Session;
569
+ };
570
+ } | {
571
+ id: string;
572
+ type: "session.updated";
573
+ properties: {
574
+ sessionID: string;
575
+ info: Session;
576
+ };
577
+ } | {
578
+ id: string;
579
+ type: "session.deleted";
580
+ properties: {
581
+ sessionID: string;
582
+ info: Session;
583
+ };
584
+ } | {
585
+ id: string;
586
+ type: "message.updated";
587
+ properties: {
588
+ sessionID: string;
589
+ info: Message;
590
+ };
591
+ } | {
592
+ id: string;
593
+ type: "message.removed";
594
+ properties: {
595
+ sessionID: string;
596
+ messageID: string;
597
+ };
598
+ } | {
599
+ id: string;
600
+ type: "message.part.updated";
601
+ properties: {
602
+ sessionID: string;
603
+ part: Part;
604
+ time: number;
605
+ };
606
+ } | {
607
+ id: string;
608
+ type: "message.part.removed";
609
+ properties: {
610
+ sessionID: string;
611
+ messageID: string;
612
+ partID: string;
568
613
  };
569
614
  } | {
570
615
  id: string;
@@ -836,85 +881,51 @@ export type GlobalEvent = {
836
881
  };
837
882
  } | {
838
883
  id: string;
839
- type: "file.watcher.updated";
840
- properties: {
841
- file: string;
842
- event: "add" | "change" | "unlink";
843
- };
844
- } | {
845
- id: string;
846
- type: "session.created";
847
- properties: {
848
- sessionID: string;
849
- info: Session;
850
- };
851
- } | {
852
- id: string;
853
- type: "session.updated";
854
- properties: {
855
- sessionID: string;
856
- info: Session;
857
- };
858
- } | {
859
- id: string;
860
- type: "session.deleted";
861
- properties: {
862
- sessionID: string;
863
- info: Session;
864
- };
865
- } | {
866
- id: string;
867
- type: "message.updated";
884
+ type: "message.part.delta";
868
885
  properties: {
869
886
  sessionID: string;
870
- info: Message;
887
+ messageID: string;
888
+ partID: string;
889
+ field: string;
890
+ delta: string;
871
891
  };
872
892
  } | {
873
893
  id: string;
874
- type: "message.removed";
894
+ type: "session.diff";
875
895
  properties: {
876
896
  sessionID: string;
877
- messageID: string;
897
+ diff: Array<SnapshotFileDiff>;
878
898
  };
879
899
  } | {
880
900
  id: string;
881
- type: "message.part.updated";
901
+ type: "session.error";
882
902
  properties: {
883
- sessionID: string;
884
- part: Part;
885
- time: number;
903
+ sessionID?: string;
904
+ error?: ProviderAuthError | UnknownError | MessageOutputLengthError | MessageAbortedError | StructuredOutputError | ContextOverflowError | ApiError;
886
905
  };
887
906
  } | {
888
907
  id: string;
889
- type: "message.part.removed";
908
+ type: "installation.updated";
890
909
  properties: {
891
- sessionID: string;
892
- messageID: string;
893
- partID: string;
910
+ version: string;
894
911
  };
895
912
  } | {
896
913
  id: string;
897
- type: "message.part.delta";
914
+ type: "installation.update-available";
898
915
  properties: {
899
- sessionID: string;
900
- messageID: string;
901
- partID: string;
902
- field: string;
903
- delta: string;
916
+ version: string;
904
917
  };
905
918
  } | {
906
919
  id: string;
907
- type: "session.diff";
920
+ type: "file.edited";
908
921
  properties: {
909
- sessionID: string;
910
- diff: Array<SnapshotFileDiff>;
922
+ file: string;
911
923
  };
912
924
  } | {
913
925
  id: string;
914
- type: "session.error";
926
+ type: "lsp.updated";
915
927
  properties: {
916
- sessionID?: string;
917
- error?: ProviderAuthError | UnknownError | MessageOutputLengthError | MessageAbortedError | StructuredOutputError | ContextOverflowError | ApiError;
928
+ [key: string]: unknown;
918
929
  };
919
930
  } | {
920
931
  id: string;
@@ -943,62 +954,45 @@ export type GlobalEvent = {
943
954
  };
944
955
  } | {
945
956
  id: string;
946
- type: "question.asked";
957
+ type: "permission.v2.asked";
947
958
  properties: {
948
959
  id: string;
949
960
  sessionID: string;
950
- /**
951
- * Questions to ask
952
- */
953
- questions: Array<QuestionInfo>;
954
- tool?: QuestionTool;
955
- };
956
- } | {
957
- id: string;
958
- type: "question.replied";
959
- properties: {
960
- sessionID: string;
961
- requestID: string;
962
- answers: Array<QuestionAnswer>;
961
+ action: string;
962
+ resources: Array<string>;
963
+ save?: Array<string>;
964
+ metadata?: {
965
+ [key: string]: unknown;
966
+ };
967
+ source?: PermissionV2Source;
963
968
  };
964
969
  } | {
965
970
  id: string;
966
- type: "question.rejected";
971
+ type: "permission.v2.replied";
967
972
  properties: {
968
973
  sessionID: string;
969
974
  requestID: string;
975
+ reply: PermissionV2Reply;
970
976
  };
971
977
  } | {
972
978
  id: string;
973
- type: "todo.updated";
974
- properties: {
975
- sessionID: string;
976
- todos: Array<Todo>;
977
- };
978
- } | {
979
- id: string;
980
- type: "session.status";
981
- properties: {
982
- sessionID: string;
983
- status: SessionStatus;
984
- };
985
- } | {
986
- id: string;
987
- type: "session.idle";
979
+ type: "account.added";
988
980
  properties: {
989
- sessionID: string;
981
+ account: AuthInfo;
990
982
  };
991
983
  } | {
992
984
  id: string;
993
- type: "session.compacted";
985
+ type: "account.removed";
994
986
  properties: {
995
- sessionID: string;
987
+ account: AuthInfo;
996
988
  };
997
989
  } | {
998
990
  id: string;
999
- type: "lsp.updated";
991
+ type: "account.switched";
1000
992
  properties: {
1001
- [key: string]: unknown;
993
+ serviceID: string;
994
+ from?: string;
995
+ to?: string;
1002
996
  };
1003
997
  } | {
1004
998
  id: string;
@@ -1052,6 +1046,13 @@ export type GlobalEvent = {
1052
1046
  arguments: string;
1053
1047
  messageID: string;
1054
1048
  };
1049
+ } | {
1050
+ id: string;
1051
+ type: "file.watcher.updated";
1052
+ properties: {
1053
+ file: string;
1054
+ event: "add" | "change" | "unlink";
1055
+ };
1055
1056
  } | {
1056
1057
  id: string;
1057
1058
  type: "project.updated";
@@ -1080,134 +1081,133 @@ export type GlobalEvent = {
1080
1081
  };
1081
1082
  } | {
1082
1083
  id: string;
1083
- type: "vcs.branch.updated";
1084
+ type: "pty.created";
1084
1085
  properties: {
1085
- branch?: string;
1086
+ info: Pty;
1086
1087
  };
1087
1088
  } | {
1088
1089
  id: string;
1089
- type: "workspace.ready";
1090
+ type: "pty.updated";
1090
1091
  properties: {
1091
- name: string;
1092
+ info: Pty;
1092
1093
  };
1093
1094
  } | {
1094
1095
  id: string;
1095
- type: "workspace.failed";
1096
+ type: "pty.exited";
1096
1097
  properties: {
1097
- message: string;
1098
+ id: string;
1099
+ exitCode: number;
1098
1100
  };
1099
1101
  } | {
1100
1102
  id: string;
1101
- type: "workspace.status";
1103
+ type: "pty.deleted";
1102
1104
  properties: {
1103
- workspaceID: string;
1104
- status: "connected" | "connecting" | "disconnected" | "error";
1105
+ id: string;
1105
1106
  };
1106
1107
  } | {
1107
1108
  id: string;
1108
- type: "worktree.ready";
1109
+ type: "question.asked";
1109
1110
  properties: {
1110
- name: string;
1111
- branch?: string;
1111
+ id: string;
1112
+ sessionID: string;
1113
+ /**
1114
+ * Questions to ask
1115
+ */
1116
+ questions: Array<QuestionInfo>;
1117
+ tool?: QuestionTool;
1112
1118
  };
1113
1119
  } | {
1114
1120
  id: string;
1115
- type: "worktree.failed";
1121
+ type: "question.replied";
1116
1122
  properties: {
1117
- message: string;
1123
+ sessionID: string;
1124
+ requestID: string;
1125
+ answers: Array<QuestionAnswer>;
1118
1126
  };
1119
1127
  } | {
1120
1128
  id: string;
1121
- type: "pty.created";
1129
+ type: "question.rejected";
1122
1130
  properties: {
1123
- info: Pty;
1131
+ sessionID: string;
1132
+ requestID: string;
1124
1133
  };
1125
1134
  } | {
1126
1135
  id: string;
1127
- type: "pty.updated";
1136
+ type: "session.status";
1128
1137
  properties: {
1129
- info: Pty;
1138
+ sessionID: string;
1139
+ status: SessionStatus;
1130
1140
  };
1131
1141
  } | {
1132
1142
  id: string;
1133
- type: "pty.exited";
1143
+ type: "session.idle";
1134
1144
  properties: {
1135
- id: string;
1136
- exitCode: number;
1145
+ sessionID: string;
1137
1146
  };
1138
1147
  } | {
1139
1148
  id: string;
1140
- type: "pty.deleted";
1149
+ type: "session.compacted";
1141
1150
  properties: {
1142
- id: string;
1151
+ sessionID: string;
1143
1152
  };
1144
1153
  } | {
1145
1154
  id: string;
1146
- type: "installation.updated";
1155
+ type: "todo.updated";
1147
1156
  properties: {
1148
- version: string;
1157
+ sessionID: string;
1158
+ todos: Array<Todo>;
1149
1159
  };
1150
1160
  } | {
1151
1161
  id: string;
1152
- type: "installation.update-available";
1162
+ type: "vcs.branch.updated";
1153
1163
  properties: {
1154
- version: string;
1164
+ branch?: string;
1155
1165
  };
1156
1166
  } | {
1157
1167
  id: string;
1158
- type: "server.connected";
1168
+ type: "worktree.ready";
1159
1169
  properties: {
1160
- [key: string]: unknown;
1170
+ name: string;
1171
+ branch?: string;
1161
1172
  };
1162
1173
  } | {
1163
1174
  id: string;
1164
- type: "global.disposed";
1175
+ type: "worktree.failed";
1165
1176
  properties: {
1166
- [key: string]: unknown;
1177
+ message: string;
1167
1178
  };
1168
1179
  } | {
1169
1180
  id: string;
1170
- type: "permission.v2.asked";
1181
+ type: "workspace.ready";
1171
1182
  properties: {
1172
- id: string;
1173
- sessionID: string;
1174
- action: string;
1175
- resources: Array<string>;
1176
- save?: Array<string>;
1177
- metadata?: {
1178
- [key: string]: unknown;
1179
- };
1180
- source?: PermissionV2Source;
1183
+ name: string;
1181
1184
  };
1182
1185
  } | {
1183
1186
  id: string;
1184
- type: "permission.v2.replied";
1187
+ type: "workspace.failed";
1185
1188
  properties: {
1186
- sessionID: string;
1187
- requestID: string;
1188
- reply: PermissionV2Reply;
1189
+ message: string;
1189
1190
  };
1190
1191
  } | {
1191
1192
  id: string;
1192
- type: "account.added";
1193
+ type: "workspace.status";
1193
1194
  properties: {
1194
- account: AuthInfo;
1195
+ workspaceID: string;
1196
+ status: "connected" | "connecting" | "disconnected" | "error";
1195
1197
  };
1196
1198
  } | {
1197
1199
  id: string;
1198
- type: "account.removed";
1200
+ type: "server.connected";
1199
1201
  properties: {
1200
- account: AuthInfo;
1202
+ [key: string]: unknown;
1201
1203
  };
1202
1204
  } | {
1203
1205
  id: string;
1204
- type: "account.switched";
1206
+ type: "global.disposed";
1205
1207
  properties: {
1206
- serviceID: string;
1207
- from?: string;
1208
- to?: string;
1208
+ [key: string]: unknown;
1209
1209
  };
1210
- } | EventServerInstanceDisposed | SyncEventSessionNextAgentSwitched | SyncEventSessionNextModelSwitched | SyncEventSessionNextPrompted | SyncEventSessionNextSynthetic | SyncEventSessionNextShellStarted | SyncEventSessionNextShellEnded | SyncEventSessionNextStepStarted | SyncEventSessionNextStepEnded | SyncEventSessionNextStepFailed | SyncEventSessionNextTextStarted | SyncEventSessionNextTextDelta | SyncEventSessionNextTextEnded | SyncEventSessionNextReasoningStarted | SyncEventSessionNextReasoningDelta | SyncEventSessionNextReasoningEnded | SyncEventSessionNextToolInputStarted | SyncEventSessionNextToolInputDelta | SyncEventSessionNextToolInputEnded | SyncEventSessionNextToolCalled | SyncEventSessionNextToolProgress | SyncEventSessionNextToolSuccess | SyncEventSessionNextToolFailed | SyncEventSessionNextRetried | SyncEventSessionNextCompactionStarted | SyncEventSessionNextCompactionDelta | SyncEventSessionNextCompactionEnded | SyncEventSessionCreated | SyncEventSessionUpdated | SyncEventSessionDeleted | SyncEventMessageUpdated | SyncEventMessageRemoved | SyncEventMessagePartUpdated | SyncEventMessagePartRemoved;
1210
+ } | EventServerInstanceDisposed | SyncEventSessionCreated | SyncEventSessionUpdated | SyncEventSessionDeleted | SyncEventMessageUpdated | SyncEventMessageRemoved | SyncEventMessagePartUpdated | SyncEventMessagePartRemoved | SyncEventSessionNextAgentSwitched | SyncEventSessionNextModelSwitched | SyncEventSessionNextPrompted | SyncEventSessionNextSynthetic | SyncEventSessionNextShellStarted | SyncEventSessionNextShellEnded | SyncEventSessionNextStepStarted | SyncEventSessionNextStepEnded | SyncEventSessionNextStepFailed | SyncEventSessionNextTextStarted | SyncEventSessionNextTextDelta | SyncEventSessionNextTextEnded | SyncEventSessionNextReasoningStarted | SyncEventSessionNextReasoningDelta | SyncEventSessionNextReasoningEnded | SyncEventSessionNextToolInputStarted | SyncEventSessionNextToolInputDelta | SyncEventSessionNextToolInputEnded | SyncEventSessionNextToolCalled | SyncEventSessionNextToolProgress | SyncEventSessionNextToolSuccess | SyncEventSessionNextToolFailed | SyncEventSessionNextRetried | SyncEventSessionNextCompactionStarted | SyncEventSessionNextCompactionDelta | SyncEventSessionNextCompactionEnded;
1211
1211
  };
1212
1212
  /**
1213
1213
  * Log level
@@ -2365,6 +2365,85 @@ export type EventServerInstanceDisposed = {
2365
2365
  directory: string;
2366
2366
  };
2367
2367
  };
2368
+ export type SyncEventSessionCreated = {
2369
+ type: "sync";
2370
+ name: "session.created.1";
2371
+ id: string;
2372
+ seq: number;
2373
+ aggregateID: "sessionID";
2374
+ data: {
2375
+ sessionID: string;
2376
+ info: Session;
2377
+ };
2378
+ };
2379
+ export type SyncEventSessionUpdated = {
2380
+ type: "sync";
2381
+ name: "session.updated.1";
2382
+ id: string;
2383
+ seq: number;
2384
+ aggregateID: "sessionID";
2385
+ data: {
2386
+ sessionID: string;
2387
+ info: Session;
2388
+ };
2389
+ };
2390
+ export type SyncEventSessionDeleted = {
2391
+ type: "sync";
2392
+ name: "session.deleted.1";
2393
+ id: string;
2394
+ seq: number;
2395
+ aggregateID: "sessionID";
2396
+ data: {
2397
+ sessionID: string;
2398
+ info: Session;
2399
+ };
2400
+ };
2401
+ export type SyncEventMessageUpdated = {
2402
+ type: "sync";
2403
+ name: "message.updated.1";
2404
+ id: string;
2405
+ seq: number;
2406
+ aggregateID: "sessionID";
2407
+ data: {
2408
+ sessionID: string;
2409
+ info: Message;
2410
+ };
2411
+ };
2412
+ export type SyncEventMessageRemoved = {
2413
+ type: "sync";
2414
+ name: "message.removed.1";
2415
+ id: string;
2416
+ seq: number;
2417
+ aggregateID: "sessionID";
2418
+ data: {
2419
+ sessionID: string;
2420
+ messageID: string;
2421
+ };
2422
+ };
2423
+ export type SyncEventMessagePartUpdated = {
2424
+ type: "sync";
2425
+ name: "message.part.updated.1";
2426
+ id: string;
2427
+ seq: number;
2428
+ aggregateID: "sessionID";
2429
+ data: {
2430
+ sessionID: string;
2431
+ part: Part;
2432
+ time: number;
2433
+ };
2434
+ };
2435
+ export type SyncEventMessagePartRemoved = {
2436
+ type: "sync";
2437
+ name: "message.part.removed.1";
2438
+ id: string;
2439
+ seq: number;
2440
+ aggregateID: "sessionID";
2441
+ data: {
2442
+ sessionID: string;
2443
+ messageID: string;
2444
+ partID: string;
2445
+ };
2446
+ };
2368
2447
  export type SyncEventSessionNextAgentSwitched = {
2369
2448
  type: "sync";
2370
2449
  name: "session.next.agent.switched.1";
@@ -2737,85 +2816,6 @@ export type SyncEventSessionNextCompactionEnded = {
2737
2816
  include?: string;
2738
2817
  };
2739
2818
  };
2740
- export type SyncEventSessionCreated = {
2741
- type: "sync";
2742
- name: "session.created.1";
2743
- id: string;
2744
- seq: number;
2745
- aggregateID: "sessionID";
2746
- data: {
2747
- sessionID: string;
2748
- info: Session;
2749
- };
2750
- };
2751
- export type SyncEventSessionUpdated = {
2752
- type: "sync";
2753
- name: "session.updated.1";
2754
- id: string;
2755
- seq: number;
2756
- aggregateID: "sessionID";
2757
- data: {
2758
- sessionID: string;
2759
- info: Session;
2760
- };
2761
- };
2762
- export type SyncEventSessionDeleted = {
2763
- type: "sync";
2764
- name: "session.deleted.1";
2765
- id: string;
2766
- seq: number;
2767
- aggregateID: "sessionID";
2768
- data: {
2769
- sessionID: string;
2770
- info: Session;
2771
- };
2772
- };
2773
- export type SyncEventMessageUpdated = {
2774
- type: "sync";
2775
- name: "message.updated.1";
2776
- id: string;
2777
- seq: number;
2778
- aggregateID: "sessionID";
2779
- data: {
2780
- sessionID: string;
2781
- info: Message;
2782
- };
2783
- };
2784
- export type SyncEventMessageRemoved = {
2785
- type: "sync";
2786
- name: "message.removed.1";
2787
- id: string;
2788
- seq: number;
2789
- aggregateID: "sessionID";
2790
- data: {
2791
- sessionID: string;
2792
- messageID: string;
2793
- };
2794
- };
2795
- export type SyncEventMessagePartUpdated = {
2796
- type: "sync";
2797
- name: "message.part.updated.1";
2798
- id: string;
2799
- seq: number;
2800
- aggregateID: "sessionID";
2801
- data: {
2802
- sessionID: string;
2803
- part: Part;
2804
- time: number;
2805
- };
2806
- };
2807
- export type SyncEventMessagePartRemoved = {
2808
- type: "sync";
2809
- name: "message.part.removed.1";
2810
- id: string;
2811
- seq: number;
2812
- aggregateID: "sessionID";
2813
- data: {
2814
- sessionID: string;
2815
- messageID: string;
2816
- partID: string;
2817
- };
2818
- };
2819
2819
  export type PolicyEffect = "allow" | "deny";
2820
2820
  export type ConfigV2ExperimentalPolicy = {
2821
2821
  action: "provider.use";
@@ -3233,20 +3233,71 @@ export type EventCatalogModelUpdated = {
3233
3233
  model: ModelV2Info1;
3234
3234
  };
3235
3235
  };
3236
- export type EventFileEdited = {
3236
+ export type EventSessionCreated = {
3237
3237
  id: string;
3238
- type: "file.edited";
3238
+ type: "session.created";
3239
3239
  properties: {
3240
- file: string;
3240
+ sessionID: string;
3241
+ info: Session;
3241
3242
  };
3242
3243
  };
3243
- export type EventSessionNextAgentSwitched = {
3244
+ export type EventSessionUpdated = {
3244
3245
  id: string;
3245
- type: "session.next.agent.switched";
3246
+ type: "session.updated";
3246
3247
  properties: {
3247
- timestamp: number;
3248
3248
  sessionID: string;
3249
- agent: string;
3249
+ info: Session;
3250
+ };
3251
+ };
3252
+ export type EventSessionDeleted = {
3253
+ id: string;
3254
+ type: "session.deleted";
3255
+ properties: {
3256
+ sessionID: string;
3257
+ info: Session;
3258
+ };
3259
+ };
3260
+ export type EventMessageUpdated = {
3261
+ id: string;
3262
+ type: "message.updated";
3263
+ properties: {
3264
+ sessionID: string;
3265
+ info: Message;
3266
+ };
3267
+ };
3268
+ export type EventMessageRemoved = {
3269
+ id: string;
3270
+ type: "message.removed";
3271
+ properties: {
3272
+ sessionID: string;
3273
+ messageID: string;
3274
+ };
3275
+ };
3276
+ export type EventMessagePartUpdated = {
3277
+ id: string;
3278
+ type: "message.part.updated";
3279
+ properties: {
3280
+ sessionID: string;
3281
+ part: Part;
3282
+ time: number;
3283
+ };
3284
+ };
3285
+ export type EventMessagePartRemoved = {
3286
+ id: string;
3287
+ type: "message.part.removed";
3288
+ properties: {
3289
+ sessionID: string;
3290
+ messageID: string;
3291
+ partID: string;
3292
+ };
3293
+ };
3294
+ export type EventSessionNextAgentSwitched = {
3295
+ id: string;
3296
+ type: "session.next.agent.switched";
3297
+ properties: {
3298
+ timestamp: number;
3299
+ sessionID: string;
3300
+ agent: string;
3250
3301
  };
3251
3302
  };
3252
3303
  export type EventSessionNextModelSwitched = {
@@ -3534,97 +3585,59 @@ export type EventSessionNextCompactionEnded = {
3534
3585
  include?: string;
3535
3586
  };
3536
3587
  };
3537
- export type EventFileWatcherUpdated = {
3538
- id: string;
3539
- type: "file.watcher.updated";
3540
- properties: {
3541
- file: string;
3542
- event: "add" | "change" | "unlink";
3543
- };
3544
- };
3545
- export type EventSessionCreated = {
3546
- id: string;
3547
- type: "session.created";
3548
- properties: {
3549
- sessionID: string;
3550
- info: Session;
3551
- };
3552
- };
3553
- export type EventSessionUpdated = {
3554
- id: string;
3555
- type: "session.updated";
3556
- properties: {
3557
- sessionID: string;
3558
- info: Session;
3559
- };
3560
- };
3561
- export type EventSessionDeleted = {
3562
- id: string;
3563
- type: "session.deleted";
3564
- properties: {
3565
- sessionID: string;
3566
- info: Session;
3567
- };
3568
- };
3569
- export type EventMessageUpdated = {
3588
+ export type EventMessagePartDelta = {
3570
3589
  id: string;
3571
- type: "message.updated";
3590
+ type: "message.part.delta";
3572
3591
  properties: {
3573
3592
  sessionID: string;
3574
- info: Message;
3593
+ messageID: string;
3594
+ partID: string;
3595
+ field: string;
3596
+ delta: string;
3575
3597
  };
3576
3598
  };
3577
- export type EventMessageRemoved = {
3599
+ export type EventSessionDiff = {
3578
3600
  id: string;
3579
- type: "message.removed";
3601
+ type: "session.diff";
3580
3602
  properties: {
3581
3603
  sessionID: string;
3582
- messageID: string;
3604
+ diff: Array<SnapshotFileDiff>;
3583
3605
  };
3584
3606
  };
3585
- export type EventMessagePartUpdated = {
3607
+ export type EventSessionError = {
3586
3608
  id: string;
3587
- type: "message.part.updated";
3609
+ type: "session.error";
3588
3610
  properties: {
3589
- sessionID: string;
3590
- part: Part;
3591
- time: number;
3611
+ sessionID?: string;
3612
+ error?: ProviderAuthError | UnknownError | MessageOutputLengthError | MessageAbortedError | StructuredOutputError | ContextOverflowError | ApiError;
3592
3613
  };
3593
3614
  };
3594
- export type EventMessagePartRemoved = {
3615
+ export type EventInstallationUpdated = {
3595
3616
  id: string;
3596
- type: "message.part.removed";
3617
+ type: "installation.updated";
3597
3618
  properties: {
3598
- sessionID: string;
3599
- messageID: string;
3600
- partID: string;
3619
+ version: string;
3601
3620
  };
3602
3621
  };
3603
- export type EventMessagePartDelta = {
3622
+ export type EventInstallationUpdateAvailable = {
3604
3623
  id: string;
3605
- type: "message.part.delta";
3624
+ type: "installation.update-available";
3606
3625
  properties: {
3607
- sessionID: string;
3608
- messageID: string;
3609
- partID: string;
3610
- field: string;
3611
- delta: string;
3626
+ version: string;
3612
3627
  };
3613
3628
  };
3614
- export type EventSessionDiff = {
3629
+ export type EventFileEdited = {
3615
3630
  id: string;
3616
- type: "session.diff";
3631
+ type: "file.edited";
3617
3632
  properties: {
3618
- sessionID: string;
3619
- diff: Array<SnapshotFileDiff>;
3633
+ file: string;
3620
3634
  };
3621
3635
  };
3622
- export type EventSessionError = {
3636
+ export type EventLspUpdated = {
3623
3637
  id: string;
3624
- type: "session.error";
3638
+ type: "lsp.updated";
3625
3639
  properties: {
3626
- sessionID?: string;
3627
- error?: ProviderAuthError | UnknownError | MessageOutputLengthError | MessageAbortedError | StructuredOutputError | ContextOverflowError | ApiError;
3640
+ [key: string]: unknown;
3628
3641
  };
3629
3642
  };
3630
3643
  export type EventPermissionAsked = {
@@ -3654,71 +3667,51 @@ export type EventPermissionReplied = {
3654
3667
  reply: "once" | "always" | "reject";
3655
3668
  };
3656
3669
  };
3657
- export type EventQuestionAsked = {
3670
+ export type EventPermissionV2Asked = {
3658
3671
  id: string;
3659
- type: "question.asked";
3672
+ type: "permission.v2.asked";
3660
3673
  properties: {
3661
3674
  id: string;
3662
3675
  sessionID: string;
3663
- /**
3664
- * Questions to ask
3665
- */
3666
- questions: Array<QuestionInfo>;
3667
- tool?: QuestionTool;
3668
- };
3669
- };
3670
- export type EventQuestionReplied = {
3671
- id: string;
3672
- type: "question.replied";
3673
- properties: {
3674
- sessionID: string;
3675
- requestID: string;
3676
- answers: Array<QuestionAnswer>;
3676
+ action: string;
3677
+ resources: Array<string>;
3678
+ save?: Array<string>;
3679
+ metadata?: {
3680
+ [key: string]: unknown;
3681
+ };
3682
+ source?: PermissionV2Source;
3677
3683
  };
3678
3684
  };
3679
- export type EventQuestionRejected = {
3685
+ export type EventPermissionV2Replied = {
3680
3686
  id: string;
3681
- type: "question.rejected";
3687
+ type: "permission.v2.replied";
3682
3688
  properties: {
3683
3689
  sessionID: string;
3684
3690
  requestID: string;
3691
+ reply: PermissionV2Reply;
3685
3692
  };
3686
3693
  };
3687
- export type EventTodoUpdated = {
3688
- id: string;
3689
- type: "todo.updated";
3690
- properties: {
3691
- sessionID: string;
3692
- todos: Array<Todo>;
3693
- };
3694
- };
3695
- export type EventSessionStatus = {
3696
- id: string;
3697
- type: "session.status";
3698
- properties: {
3699
- sessionID: string;
3700
- status: SessionStatus;
3701
- };
3702
- };
3703
- export type EventSessionIdle = {
3694
+ export type EventAccountAdded = {
3704
3695
  id: string;
3705
- type: "session.idle";
3696
+ type: "account.added";
3706
3697
  properties: {
3707
- sessionID: string;
3698
+ account: AuthInfo;
3708
3699
  };
3709
3700
  };
3710
- export type EventSessionCompacted = {
3701
+ export type EventAccountRemoved = {
3711
3702
  id: string;
3712
- type: "session.compacted";
3703
+ type: "account.removed";
3713
3704
  properties: {
3714
- sessionID: string;
3705
+ account: AuthInfo;
3715
3706
  };
3716
3707
  };
3717
- export type EventLspUpdated = {
3708
+ export type EventAccountSwitched = {
3718
3709
  id: string;
3719
- type: "lsp.updated";
3710
+ type: "account.switched";
3720
3711
  properties: {
3721
- [key: string]: unknown;
3712
+ serviceID: string;
3713
+ from?: string;
3714
+ to?: string;
3722
3715
  };
3723
3716
  };
3724
3717
  export type EventMcpToolsChanged = {
@@ -3746,6 +3739,14 @@ export type EventCommandExecuted = {
3746
3739
  messageID: string;
3747
3740
  };
3748
3741
  };
3742
+ export type EventFileWatcherUpdated = {
3743
+ id: string;
3744
+ type: "file.watcher.updated";
3745
+ properties: {
3746
+ file: string;
3747
+ event: "add" | "change" | "unlink";
3748
+ };
3749
+ };
3749
3750
  export type EventProjectUpdated = {
3750
3751
  id: string;
3751
3752
  type: "project.updated";
@@ -3773,152 +3774,151 @@ export type EventProjectUpdated = {
3773
3774
  sandboxes: Array<string>;
3774
3775
  };
3775
3776
  };
3776
- export type EventVcsBranchUpdated = {
3777
+ export type EventPtyCreated = {
3777
3778
  id: string;
3778
- type: "vcs.branch.updated";
3779
+ type: "pty.created";
3779
3780
  properties: {
3780
- branch?: string;
3781
+ info: Pty;
3781
3782
  };
3782
3783
  };
3783
- export type EventWorkspaceReady = {
3784
+ export type EventPtyUpdated = {
3784
3785
  id: string;
3785
- type: "workspace.ready";
3786
+ type: "pty.updated";
3786
3787
  properties: {
3787
- name: string;
3788
+ info: Pty;
3788
3789
  };
3789
3790
  };
3790
- export type EventWorkspaceFailed = {
3791
+ export type EventPtyExited = {
3791
3792
  id: string;
3792
- type: "workspace.failed";
3793
+ type: "pty.exited";
3793
3794
  properties: {
3794
- message: string;
3795
+ id: string;
3796
+ exitCode: number;
3795
3797
  };
3796
3798
  };
3797
- export type EventWorkspaceStatus = {
3799
+ export type EventPtyDeleted = {
3798
3800
  id: string;
3799
- type: "workspace.status";
3801
+ type: "pty.deleted";
3800
3802
  properties: {
3801
- workspaceID: string;
3802
- status: "connected" | "connecting" | "disconnected" | "error";
3803
+ id: string;
3803
3804
  };
3804
3805
  };
3805
- export type EventWorktreeReady = {
3806
+ export type EventQuestionAsked = {
3806
3807
  id: string;
3807
- type: "worktree.ready";
3808
+ type: "question.asked";
3808
3809
  properties: {
3809
- name: string;
3810
- branch?: string;
3810
+ id: string;
3811
+ sessionID: string;
3812
+ /**
3813
+ * Questions to ask
3814
+ */
3815
+ questions: Array<QuestionInfo>;
3816
+ tool?: QuestionTool;
3811
3817
  };
3812
3818
  };
3813
- export type EventWorktreeFailed = {
3819
+ export type EventQuestionReplied = {
3814
3820
  id: string;
3815
- type: "worktree.failed";
3821
+ type: "question.replied";
3816
3822
  properties: {
3817
- message: string;
3823
+ sessionID: string;
3824
+ requestID: string;
3825
+ answers: Array<QuestionAnswer>;
3818
3826
  };
3819
3827
  };
3820
- export type EventPtyCreated = {
3828
+ export type EventQuestionRejected = {
3821
3829
  id: string;
3822
- type: "pty.created";
3830
+ type: "question.rejected";
3823
3831
  properties: {
3824
- info: Pty;
3832
+ sessionID: string;
3833
+ requestID: string;
3825
3834
  };
3826
3835
  };
3827
- export type EventPtyUpdated = {
3836
+ export type EventSessionStatus = {
3828
3837
  id: string;
3829
- type: "pty.updated";
3838
+ type: "session.status";
3830
3839
  properties: {
3831
- info: Pty;
3840
+ sessionID: string;
3841
+ status: SessionStatus;
3832
3842
  };
3833
3843
  };
3834
- export type EventPtyExited = {
3844
+ export type EventSessionIdle = {
3835
3845
  id: string;
3836
- type: "pty.exited";
3846
+ type: "session.idle";
3837
3847
  properties: {
3838
- id: string;
3839
- exitCode: number;
3848
+ sessionID: string;
3840
3849
  };
3841
3850
  };
3842
- export type EventPtyDeleted = {
3851
+ export type EventSessionCompacted = {
3843
3852
  id: string;
3844
- type: "pty.deleted";
3853
+ type: "session.compacted";
3845
3854
  properties: {
3846
- id: string;
3855
+ sessionID: string;
3847
3856
  };
3848
3857
  };
3849
- export type EventInstallationUpdated = {
3858
+ export type EventTodoUpdated = {
3850
3859
  id: string;
3851
- type: "installation.updated";
3860
+ type: "todo.updated";
3852
3861
  properties: {
3853
- version: string;
3862
+ sessionID: string;
3863
+ todos: Array<Todo>;
3854
3864
  };
3855
3865
  };
3856
- export type EventInstallationUpdateAvailable = {
3866
+ export type EventVcsBranchUpdated = {
3857
3867
  id: string;
3858
- type: "installation.update-available";
3868
+ type: "vcs.branch.updated";
3859
3869
  properties: {
3860
- version: string;
3870
+ branch?: string;
3861
3871
  };
3862
3872
  };
3863
- export type EventServerConnected = {
3873
+ export type EventWorktreeReady = {
3864
3874
  id: string;
3865
- type: "server.connected";
3875
+ type: "worktree.ready";
3866
3876
  properties: {
3867
- [key: string]: unknown;
3877
+ name: string;
3878
+ branch?: string;
3868
3879
  };
3869
3880
  };
3870
- export type EventGlobalDisposed = {
3881
+ export type EventWorktreeFailed = {
3871
3882
  id: string;
3872
- type: "global.disposed";
3883
+ type: "worktree.failed";
3873
3884
  properties: {
3874
- [key: string]: unknown;
3885
+ message: string;
3875
3886
  };
3876
3887
  };
3877
- export type EventPermissionV2Asked = {
3888
+ export type EventWorkspaceReady = {
3878
3889
  id: string;
3879
- type: "permission.v2.asked";
3890
+ type: "workspace.ready";
3880
3891
  properties: {
3881
- id: string;
3882
- sessionID: string;
3883
- action: string;
3884
- resources: Array<string>;
3885
- save?: Array<string>;
3886
- metadata?: {
3887
- [key: string]: unknown;
3888
- };
3889
- source?: PermissionV2Source;
3892
+ name: string;
3890
3893
  };
3891
3894
  };
3892
- export type EventPermissionV2Replied = {
3895
+ export type EventWorkspaceFailed = {
3893
3896
  id: string;
3894
- type: "permission.v2.replied";
3897
+ type: "workspace.failed";
3895
3898
  properties: {
3896
- sessionID: string;
3897
- requestID: string;
3898
- reply: PermissionV2Reply;
3899
+ message: string;
3899
3900
  };
3900
3901
  };
3901
- export type EventAccountAdded = {
3902
+ export type EventWorkspaceStatus = {
3902
3903
  id: string;
3903
- type: "account.added";
3904
+ type: "workspace.status";
3904
3905
  properties: {
3905
- account: AuthInfo;
3906
+ workspaceID: string;
3907
+ status: "connected" | "connecting" | "disconnected" | "error";
3906
3908
  };
3907
3909
  };
3908
- export type EventAccountRemoved = {
3910
+ export type EventServerConnected = {
3909
3911
  id: string;
3910
- type: "account.removed";
3912
+ type: "server.connected";
3911
3913
  properties: {
3912
- account: AuthInfo;
3914
+ [key: string]: unknown;
3913
3915
  };
3914
3916
  };
3915
- export type EventAccountSwitched = {
3917
+ export type EventGlobalDisposed = {
3916
3918
  id: string;
3917
- type: "account.switched";
3919
+ type: "global.disposed";
3918
3920
  properties: {
3919
- serviceID: string;
3920
- from?: string;
3921
- to?: string;
3921
+ [key: string]: unknown;
3922
3922
  };
3923
3923
  };
3924
3924
  export type BadRequestError = {
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.0.0-dev-202606021844",
4
+ "version": "0.0.0-dev-202606021924",
5
5
  "type": "module",
6
6
  "license": "MIT",
7
7
  "scripts": {