@opencode-ai/sdk 1.14.35 → 1.14.36

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,5 +1,5 @@
1
1
  import { type Client, type Options as Options2, type TDataShape } from "./client/index.js";
2
- import type { AgentPartInput, AppAgentsResponses, AppLogErrors, AppLogResponses, AppSkillsResponses, Auth as Auth3, AuthRemoveErrors, AuthRemoveResponses, AuthSetErrors, AuthSetResponses, CommandListResponses, Config as Config3, ConfigGetResponses, ConfigProvidersResponses, ConfigUpdateErrors, ConfigUpdateResponses, EventSubscribeResponses, EventTuiCommandExecute2, EventTuiPromptAppend2, EventTuiSessionSelect2, EventTuiToastShow2, ExperimentalConsoleGetResponses, ExperimentalConsoleListOrgsResponses, ExperimentalConsoleSwitchOrgResponses, ExperimentalResourceListResponses, ExperimentalSessionListResponses, ExperimentalWorkspaceAdapterListResponses, ExperimentalWorkspaceCreateErrors, ExperimentalWorkspaceCreateResponses, ExperimentalWorkspaceListResponses, ExperimentalWorkspaceRemoveErrors, ExperimentalWorkspaceRemoveResponses, ExperimentalWorkspaceSessionRestoreErrors, ExperimentalWorkspaceSessionRestoreResponses, ExperimentalWorkspaceStatusResponses, FileListResponses, FilePartInput, FilePartSource, FileReadResponses, FileStatusResponses, FindFilesResponses, FindSymbolsResponses, FindTextResponses, FormatterStatusResponses, GlobalConfigGetResponses, GlobalConfigUpdateErrors, GlobalConfigUpdateResponses, GlobalDisposeResponses, GlobalEventResponses, GlobalHealthResponses, GlobalUpgradeErrors, GlobalUpgradeResponses, InstanceDisposeResponses, LspStatusResponses, McpAddErrors, McpAddResponses, McpAuthAuthenticateErrors, McpAuthAuthenticateResponses, McpAuthCallbackErrors, McpAuthCallbackResponses, McpAuthRemoveErrors, McpAuthRemoveResponses, McpAuthStartErrors, McpAuthStartResponses, McpConnectResponses, McpDisconnectResponses, McpLocalConfig, McpRemoteConfig, McpStatusResponses, OutputFormat, Part as Part2, PartDeleteErrors, PartDeleteResponses, PartUpdateErrors, PartUpdateResponses, PathGetResponses, PermissionListResponses, PermissionReplyErrors, PermissionReplyResponses, PermissionRespondErrors, PermissionRespondResponses, PermissionRuleset, ProjectCurrentResponses, ProjectInitGitResponses, ProjectListResponses, ProjectUpdateErrors, ProjectUpdateResponses, Prompt, ProviderAuthResponses, ProviderListResponses, ProviderOauthAuthorizeErrors, ProviderOauthAuthorizeResponses, ProviderOauthCallbackErrors, ProviderOauthCallbackResponses, PtyConnectErrors, PtyConnectResponses, PtyConnectTokenErrors, PtyConnectTokenResponses, PtyCreateErrors, PtyCreateResponses, PtyGetErrors, PtyGetResponses, PtyListResponses, PtyRemoveErrors, PtyRemoveResponses, PtyShellsResponses, PtyUpdateErrors, PtyUpdateResponses, QuestionAnswer, QuestionListResponses, QuestionRejectErrors, QuestionRejectResponses, QuestionReplyErrors, QuestionReplyResponses, SessionAbortErrors, SessionAbortResponses, SessionChildrenErrors, SessionChildrenResponses, SessionCommandErrors, SessionCommandResponses, SessionCreateErrors, SessionCreateResponses, SessionDeleteErrors, SessionDeleteMessageErrors, SessionDeleteMessageResponses, SessionDeleteResponses, SessionDelivery, SessionDiffResponses, SessionForkResponses, SessionGetErrors, SessionGetResponses, SessionInitErrors, SessionInitResponses, SessionListResponses, SessionMessageErrors, SessionMessageResponses, SessionMessagesErrors, SessionMessagesResponses, SessionPromptAsyncErrors, SessionPromptAsyncResponses, SessionPromptErrors, SessionPromptResponses, SessionRevertErrors, SessionRevertResponses, SessionShareErrors, SessionShareResponses, SessionShellErrors, SessionShellResponses, SessionStatusErrors, SessionStatusResponses, SessionSummarizeErrors, SessionSummarizeResponses, SessionTodoErrors, SessionTodoResponses, SessionUnrevertErrors, SessionUnrevertResponses, SessionUnshareErrors, SessionUnshareResponses, SessionUpdateErrors, SessionUpdateResponses, SubtaskPartInput, SyncHistoryListErrors, SyncHistoryListResponses, SyncReplayErrors, SyncReplayResponses, SyncStartResponses, TextPartInput, ToolIdsErrors, ToolIdsResponses, ToolListErrors, ToolListResponses, TuiAppendPromptErrors, TuiAppendPromptResponses, TuiClearPromptResponses, TuiControlNextResponses, TuiControlResponseResponses, TuiExecuteCommandErrors, TuiExecuteCommandResponses, TuiOpenHelpResponses, TuiOpenModelsResponses, TuiOpenSessionsResponses, TuiOpenThemesResponses, TuiPublishErrors, TuiPublishResponses, TuiSelectSessionErrors, TuiSelectSessionResponses, TuiShowToastResponses, TuiSubmitPromptResponses, V2SessionCompactResponses, V2SessionContextResponses, V2SessionListErrors, V2SessionListResponses, V2SessionMessagesErrors, V2SessionMessagesResponses, V2SessionPromptResponses, V2SessionWaitResponses, VcsDiffResponses, VcsGetResponses, WorktreeCreateErrors, WorktreeCreateInput, WorktreeCreateResponses, WorktreeListResponses, WorktreeRemoveErrors, WorktreeRemoveInput, WorktreeRemoveResponses, WorktreeResetErrors, WorktreeResetInput, WorktreeResetResponses } from "./types.gen.js";
2
+ import type { AgentPartInput, AppAgentsResponses, AppLogErrors, AppLogResponses, AppSkillsResponses, Auth as Auth3, AuthRemoveErrors, AuthRemoveResponses, AuthSetErrors, AuthSetResponses, CommandListResponses, Config as Config3, ConfigGetResponses, ConfigProvidersResponses, ConfigUpdateErrors, ConfigUpdateResponses, EventSubscribeResponses, EventTuiCommandExecute2, EventTuiPromptAppend2, EventTuiSessionSelect2, EventTuiToastShow2, ExperimentalConsoleGetResponses, ExperimentalConsoleListOrgsResponses, ExperimentalConsoleSwitchOrgResponses, ExperimentalResourceListResponses, ExperimentalSessionListResponses, ExperimentalWorkspaceAdapterListResponses, ExperimentalWorkspaceCreateErrors, ExperimentalWorkspaceCreateResponses, ExperimentalWorkspaceListResponses, ExperimentalWorkspaceRemoveErrors, ExperimentalWorkspaceRemoveResponses, ExperimentalWorkspaceStatusResponses, ExperimentalWorkspaceWarpErrors, ExperimentalWorkspaceWarpResponses, FileListResponses, FilePartInput, FilePartSource, FileReadResponses, FileStatusResponses, FindFilesResponses, FindSymbolsResponses, FindTextResponses, FormatterStatusResponses, GlobalConfigGetResponses, GlobalConfigUpdateErrors, GlobalConfigUpdateResponses, GlobalDisposeResponses, GlobalEventResponses, GlobalHealthResponses, GlobalUpgradeErrors, GlobalUpgradeResponses, InstanceDisposeResponses, LspStatusResponses, McpAddErrors, McpAddResponses, McpAuthAuthenticateErrors, McpAuthAuthenticateResponses, McpAuthCallbackErrors, McpAuthCallbackResponses, McpAuthRemoveErrors, McpAuthRemoveResponses, McpAuthStartErrors, McpAuthStartResponses, McpConnectResponses, McpDisconnectResponses, McpLocalConfig, McpRemoteConfig, McpStatusResponses, OutputFormat, Part as Part2, PartDeleteErrors, PartDeleteResponses, PartUpdateErrors, PartUpdateResponses, PathGetResponses, PermissionListResponses, PermissionReplyErrors, PermissionReplyResponses, PermissionRespondErrors, PermissionRespondResponses, PermissionRuleset, ProjectCurrentResponses, ProjectInitGitResponses, ProjectListResponses, ProjectUpdateErrors, ProjectUpdateResponses, Prompt, ProviderAuthResponses, ProviderListResponses, ProviderOauthAuthorizeErrors, ProviderOauthAuthorizeResponses, ProviderOauthCallbackErrors, ProviderOauthCallbackResponses, PtyConnectErrors, PtyConnectResponses, PtyConnectTokenErrors, PtyConnectTokenResponses, PtyCreateErrors, PtyCreateResponses, PtyGetErrors, PtyGetResponses, PtyListResponses, PtyRemoveErrors, PtyRemoveResponses, PtyShellsResponses, PtyUpdateErrors, PtyUpdateResponses, QuestionAnswer, QuestionListResponses, QuestionRejectErrors, QuestionRejectResponses, QuestionReplyErrors, QuestionReplyResponses, SessionAbortErrors, SessionAbortResponses, SessionChildrenErrors, SessionChildrenResponses, SessionCommandErrors, SessionCommandResponses, SessionCreateErrors, SessionCreateResponses, SessionDeleteErrors, SessionDeleteMessageErrors, SessionDeleteMessageResponses, SessionDeleteResponses, SessionDelivery, SessionDiffResponses, SessionForkResponses, SessionGetErrors, SessionGetResponses, SessionInitErrors, SessionInitResponses, SessionListResponses, SessionMessageErrors, SessionMessageResponses, SessionMessagesErrors, SessionMessagesResponses, SessionPromptAsyncErrors, SessionPromptAsyncResponses, SessionPromptErrors, SessionPromptResponses, SessionRevertErrors, SessionRevertResponses, SessionShareErrors, SessionShareResponses, SessionShellErrors, SessionShellResponses, SessionStatusErrors, SessionStatusResponses, SessionSummarizeErrors, SessionSummarizeResponses, SessionTodoErrors, SessionTodoResponses, SessionUnrevertErrors, SessionUnrevertResponses, SessionUnshareErrors, SessionUnshareResponses, SessionUpdateErrors, SessionUpdateResponses, SubtaskPartInput, SyncHistoryListErrors, SyncHistoryListResponses, SyncReplayErrors, SyncReplayResponses, SyncStartResponses, SyncStealErrors, SyncStealResponses, TextPartInput, ToolIdsErrors, ToolIdsResponses, ToolListErrors, ToolListResponses, TuiAppendPromptErrors, TuiAppendPromptResponses, TuiClearPromptResponses, TuiControlNextResponses, TuiControlResponseResponses, TuiExecuteCommandErrors, TuiExecuteCommandResponses, TuiOpenHelpResponses, TuiOpenModelsResponses, TuiOpenSessionsResponses, TuiOpenThemesResponses, TuiPublishErrors, TuiPublishResponses, TuiSelectSessionErrors, TuiSelectSessionResponses, TuiShowToastResponses, TuiSubmitPromptResponses, V2SessionCompactResponses, V2SessionContextResponses, V2SessionListErrors, V2SessionListResponses, V2SessionMessagesErrors, V2SessionMessagesResponses, V2SessionPromptResponses, V2SessionWaitResponses, VcsDiffResponses, VcsGetResponses, WorktreeCreateErrors, WorktreeCreateInput, WorktreeCreateResponses, WorktreeListResponses, WorktreeRemoveErrors, WorktreeRemoveInput, WorktreeRemoveResponses, WorktreeResetErrors, WorktreeResetInput, WorktreeResetResponses } from "./types.gen.js";
3
3
  export type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {
4
4
  /**
5
5
  * You can provide a client instance returned by `createClient()` instead of
@@ -279,16 +279,16 @@ export declare class Workspace extends HeyApiClient {
279
279
  workspace?: string;
280
280
  }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<ExperimentalWorkspaceRemoveResponses, ExperimentalWorkspaceRemoveErrors, ThrowOnError, "fields">;
281
281
  /**
282
- * Restore session into workspace
282
+ * Warp session into workspace
283
283
  *
284
- * Replay a session's sync events into the target workspace in batches.
284
+ * Move a session's sync history into the target workspace, or detach it to the local project.
285
285
  */
286
- sessionRestore<ThrowOnError extends boolean = false>(parameters: {
287
- id: string;
286
+ warp<ThrowOnError extends boolean = false>(parameters?: {
288
287
  directory?: string;
289
288
  workspace?: string;
289
+ id?: string;
290
290
  sessionID?: string;
291
- }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<ExperimentalWorkspaceSessionRestoreResponses, ExperimentalWorkspaceSessionRestoreErrors, ThrowOnError, "fields">;
291
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<ExperimentalWorkspaceWarpResponses, ExperimentalWorkspaceWarpErrors, ThrowOnError, "fields">;
292
292
  private _adapter?;
293
293
  get adapter(): Adapter;
294
294
  }
@@ -1240,6 +1240,16 @@ export declare class Sync extends HeyApiClient {
1240
1240
  };
1241
1241
  }>;
1242
1242
  }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<SyncReplayResponses, SyncReplayErrors, ThrowOnError, "fields">;
1243
+ /**
1244
+ * Steal session into workspace
1245
+ *
1246
+ * Update a session to belong to the current workspace through the sync event system.
1247
+ */
1248
+ steal<ThrowOnError extends boolean = false>(parameters?: {
1249
+ directory?: string;
1250
+ workspace?: string;
1251
+ sessionID?: string;
1252
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<SyncStealResponses, SyncStealErrors, ThrowOnError, "fields">;
1243
1253
  private _history?;
1244
1254
  get history(): History;
1245
1255
  }
@@ -543,23 +543,23 @@ export class Workspace extends HeyApiClient {
543
543
  });
544
544
  }
545
545
  /**
546
- * Restore session into workspace
546
+ * Warp session into workspace
547
547
  *
548
- * Replay a session's sync events into the target workspace in batches.
548
+ * Move a session's sync history into the target workspace, or detach it to the local project.
549
549
  */
550
- sessionRestore(parameters, options) {
550
+ warp(parameters, options) {
551
551
  const params = buildClientParams([parameters], [
552
552
  {
553
553
  args: [
554
- { in: "path", key: "id" },
555
554
  { in: "query", key: "directory" },
556
555
  { in: "query", key: "workspace" },
556
+ { in: "body", key: "id" },
557
557
  { in: "body", key: "sessionID" },
558
558
  ],
559
559
  },
560
560
  ]);
561
561
  return (options?.client ?? this.client).post({
562
- url: "/experimental/workspace/{id}/session-restore",
562
+ url: "/experimental/workspace/warp",
563
563
  ...options,
564
564
  ...params,
565
565
  headers: {
@@ -2478,6 +2478,32 @@ export class Sync extends HeyApiClient {
2478
2478
  },
2479
2479
  });
2480
2480
  }
2481
+ /**
2482
+ * Steal session into workspace
2483
+ *
2484
+ * Update a session to belong to the current workspace through the sync event system.
2485
+ */
2486
+ steal(parameters, options) {
2487
+ const params = buildClientParams([parameters], [
2488
+ {
2489
+ args: [
2490
+ { in: "query", key: "directory" },
2491
+ { in: "query", key: "workspace" },
2492
+ { in: "body", key: "sessionID" },
2493
+ ],
2494
+ },
2495
+ ]);
2496
+ return (options?.client ?? this.client).post({
2497
+ url: "/sync/steal",
2498
+ ...options,
2499
+ ...params,
2500
+ headers: {
2501
+ "Content-Type": "application/json",
2502
+ ...options?.headers,
2503
+ ...params.headers,
2504
+ },
2505
+ });
2506
+ }
2481
2507
  _history;
2482
2508
  get history() {
2483
2509
  return (this._history ??= new History({ client: this.client }));
@@ -1,7 +1,7 @@
1
1
  export type ClientOptions = {
2
2
  baseUrl: `${string}://${string}` | (string & {});
3
3
  };
4
- export type Event = EventServerInstanceDisposed | EventFileEdited | EventFileWatcherUpdated | EventLspClientDiagnostics | EventLspUpdated | EventMessagePartDelta | EventPermissionAsked | EventPermissionReplied | EventSessionDiff | EventSessionError | EventInstallationUpdated | EventInstallationUpdateAvailable | EventQuestionAsked | EventQuestionReplied | EventQuestionRejected | EventTodoUpdated | EventSessionStatus | EventSessionIdle | EventSessionCompacted | EventTuiPromptAppend | EventTuiCommandExecute | EventTuiToastShow1 | EventTuiSessionSelect | EventMcpToolsChanged | EventMcpBrowserOpenFailed | EventCommandExecuted | EventProjectUpdated | EventVcsBranchUpdated | EventWorkspaceReady | EventWorkspaceFailed | EventWorkspaceRestore | EventWorkspaceStatus | EventWorktreeReady | EventWorktreeFailed | EventPtyCreated | EventPtyUpdated | EventPtyExited | EventPtyDeleted | EventMessageUpdated | EventMessageRemoved | EventMessagePartUpdated | EventMessagePartRemoved | EventSessionCreated | EventSessionUpdated | EventSessionDeleted | 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 | EventServerConnected | EventGlobalDisposed;
4
+ export type Event = EventServerInstanceDisposed | EventFileEdited | EventFileWatcherUpdated | EventLspClientDiagnostics | EventLspUpdated | EventMessagePartDelta | EventPermissionAsked | EventPermissionReplied | EventSessionDiff | EventSessionError | EventInstallationUpdated | EventInstallationUpdateAvailable | EventQuestionAsked | EventQuestionReplied | EventQuestionRejected | EventTodoUpdated | EventSessionStatus | EventSessionIdle | EventSessionCompacted | EventTuiPromptAppend | EventTuiCommandExecute | EventTuiToastShow1 | EventTuiSessionSelect | EventMcpToolsChanged | EventMcpBrowserOpenFailed | EventCommandExecuted | EventProjectUpdated | EventVcsBranchUpdated | EventWorkspaceReady | EventWorkspaceFailed | EventWorkspaceStatus | EventWorktreeReady | EventWorktreeFailed | EventPtyCreated | EventPtyUpdated | EventPtyExited | EventPtyDeleted | EventMessageUpdated | EventMessageRemoved | EventMessagePartUpdated | EventMessagePartRemoved | EventSessionCreated | EventSessionUpdated | EventSessionDeleted | 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 | EventServerConnected | EventGlobalDisposed;
5
5
  export type OAuth = {
6
6
  type: "oauth";
7
7
  refresh: string;
@@ -590,7 +590,7 @@ export type GlobalEvent = {
590
590
  directory: string;
591
591
  project?: string;
592
592
  workspace?: string;
593
- payload: EventServerInstanceDisposed | EventFileEdited | EventFileWatcherUpdated | EventLspClientDiagnostics | EventLspUpdated | EventMessagePartDelta | EventPermissionAsked | EventPermissionReplied | EventSessionDiff | EventSessionError | EventInstallationUpdated | EventInstallationUpdateAvailable | EventQuestionAsked | EventQuestionReplied | EventQuestionRejected | EventTodoUpdated | EventSessionStatus | EventSessionIdle | EventSessionCompacted | EventTuiPromptAppend | EventTuiCommandExecute | EventTuiToastShow | EventTuiSessionSelect | EventMcpToolsChanged | EventMcpBrowserOpenFailed | EventCommandExecuted | EventProjectUpdated | EventVcsBranchUpdated | EventWorkspaceReady | EventWorkspaceFailed | EventWorkspaceRestore | EventWorkspaceStatus | EventWorktreeReady | EventWorktreeFailed | EventPtyCreated | EventPtyUpdated | EventPtyExited | EventPtyDeleted | EventMessageUpdated | EventMessageRemoved | EventMessagePartUpdated | EventMessagePartRemoved | EventSessionCreated | EventSessionUpdated | EventSessionDeleted | 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 | EventServerConnected | EventGlobalDisposed | SyncEventMessageUpdated | SyncEventMessageRemoved | SyncEventMessagePartUpdated | SyncEventMessagePartRemoved | SyncEventSessionCreated | SyncEventSessionUpdated | SyncEventSessionDeleted | 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;
593
+ payload: EventServerInstanceDisposed | EventFileEdited | EventFileWatcherUpdated | EventLspClientDiagnostics | EventLspUpdated | EventMessagePartDelta | EventPermissionAsked | EventPermissionReplied | EventSessionDiff | EventSessionError | EventInstallationUpdated | EventInstallationUpdateAvailable | EventQuestionAsked | EventQuestionReplied | EventQuestionRejected | EventTodoUpdated | EventSessionStatus | EventSessionIdle | EventSessionCompacted | EventTuiPromptAppend | EventTuiCommandExecute | EventTuiToastShow | EventTuiSessionSelect | EventMcpToolsChanged | EventMcpBrowserOpenFailed | EventCommandExecuted | EventProjectUpdated | EventVcsBranchUpdated | EventWorkspaceReady | EventWorkspaceFailed | EventWorkspaceStatus | EventWorktreeReady | EventWorktreeFailed | EventPtyCreated | EventPtyUpdated | EventPtyExited | EventPtyDeleted | EventMessageUpdated | EventMessageRemoved | EventMessagePartUpdated | EventMessagePartRemoved | EventSessionCreated | EventSessionUpdated | EventSessionDeleted | 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 | EventServerConnected | EventGlobalDisposed | SyncEventMessageUpdated | SyncEventMessageRemoved | SyncEventMessagePartUpdated | SyncEventMessagePartRemoved | SyncEventSessionCreated | SyncEventSessionUpdated | SyncEventSessionDeleted | 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;
594
594
  };
595
595
  /**
596
596
  * Log level
@@ -1461,9 +1461,11 @@ export type SyncEventSessionNextModelSwitched = {
1461
1461
  data: {
1462
1462
  timestamp: number;
1463
1463
  sessionID: string;
1464
- id: string;
1465
- providerID: string;
1466
- variant?: string;
1464
+ model: {
1465
+ id: string;
1466
+ providerID: string;
1467
+ variant: string;
1468
+ };
1467
1469
  };
1468
1470
  };
1469
1471
  export type SyncEventSessionNextPrompted = {
@@ -1529,7 +1531,7 @@ export type SyncEventSessionNextStepStarted = {
1529
1531
  model: {
1530
1532
  id: string;
1531
1533
  providerID: string;
1532
- variant?: string;
1534
+ variant: string;
1533
1535
  };
1534
1536
  snapshot?: string;
1535
1537
  };
@@ -1566,10 +1568,7 @@ export type SyncEventSessionNextStepFailed = {
1566
1568
  data: {
1567
1569
  timestamp: number;
1568
1570
  sessionID: string;
1569
- error: {
1570
- type: string;
1571
- message: string;
1572
- };
1571
+ error: SessionErrorUnknown;
1573
1572
  };
1574
1573
  };
1575
1574
  export type SyncEventSessionNextTextStarted = {
@@ -1754,10 +1753,7 @@ export type SyncEventSessionNextToolFailed = {
1754
1753
  timestamp: number;
1755
1754
  sessionID: string;
1756
1755
  callID: string;
1757
- error: {
1758
- type: string;
1759
- message: string;
1760
- };
1756
+ error: SessionErrorUnknown;
1761
1757
  provider: {
1762
1758
  executed: boolean;
1763
1759
  metadata?: {
@@ -2004,16 +2000,6 @@ export type EventWorkspaceFailed = {
2004
2000
  message: string;
2005
2001
  };
2006
2002
  };
2007
- export type EventWorkspaceRestore = {
2008
- id: string;
2009
- type: "workspace.restore";
2010
- properties: {
2011
- workspaceID: string;
2012
- sessionID: string;
2013
- total: number;
2014
- step: number;
2015
- };
2016
- };
2017
2003
  export type EventWorkspaceStatus = {
2018
2004
  id: string;
2019
2005
  type: "workspace.status";
@@ -2139,9 +2125,11 @@ export type EventSessionNextModelSwitched = {
2139
2125
  properties: {
2140
2126
  timestamp: number;
2141
2127
  sessionID: string;
2142
- id: string;
2143
- providerID: string;
2144
- variant?: string;
2128
+ model: {
2129
+ id: string;
2130
+ providerID: string;
2131
+ variant: string;
2132
+ };
2145
2133
  };
2146
2134
  };
2147
2135
  export type PromptSource = {
@@ -2208,7 +2196,7 @@ export type EventSessionNextStepStarted = {
2208
2196
  model: {
2209
2197
  id: string;
2210
2198
  providerID: string;
2211
- variant?: string;
2199
+ variant: string;
2212
2200
  };
2213
2201
  snapshot?: string;
2214
2202
  };
@@ -2233,16 +2221,17 @@ export type EventSessionNextStepEnded = {
2233
2221
  snapshot?: string;
2234
2222
  };
2235
2223
  };
2224
+ export type SessionErrorUnknown = {
2225
+ type: "unknown";
2226
+ message: string;
2227
+ };
2236
2228
  export type EventSessionNextStepFailed = {
2237
2229
  id: string;
2238
2230
  type: "session.next.step.failed";
2239
2231
  properties: {
2240
2232
  timestamp: number;
2241
2233
  sessionID: string;
2242
- error: {
2243
- type: string;
2244
- message: string;
2245
- };
2234
+ error: SessionErrorUnknown;
2246
2235
  };
2247
2236
  };
2248
2237
  export type EventSessionNextTextStarted = {
@@ -2398,10 +2387,7 @@ export type EventSessionNextToolFailed = {
2398
2387
  timestamp: number;
2399
2388
  sessionID: string;
2400
2389
  callID: string;
2401
- error: {
2402
- type: string;
2403
- message: string;
2404
- };
2390
+ error: SessionErrorUnknown;
2405
2391
  provider: {
2406
2392
  executed: boolean;
2407
2393
  metadata?: {
@@ -2484,7 +2470,7 @@ export type SessionInfo = {
2484
2470
  model?: {
2485
2471
  id: string;
2486
2472
  providerID: string;
2487
- variant?: string;
2473
+ variant: string;
2488
2474
  };
2489
2475
  time: {
2490
2476
  created: number;
@@ -2517,7 +2503,7 @@ export type SessionMessageModelSwitched = {
2517
2503
  model: {
2518
2504
  id: string;
2519
2505
  providerID: string;
2520
- variant?: string;
2506
+ variant: string;
2521
2507
  };
2522
2508
  };
2523
2509
  export type SessionMessageUser = {
@@ -2602,10 +2588,7 @@ export type SessionMessageToolStateError = {
2602
2588
  structured: {
2603
2589
  [key: string]: unknown;
2604
2590
  };
2605
- error: {
2606
- type: string;
2607
- message: string;
2608
- };
2591
+ error: SessionErrorUnknown;
2609
2592
  };
2610
2593
  export type SessionMessageAssistantTool = {
2611
2594
  type: "tool";
@@ -2639,7 +2622,7 @@ export type SessionMessageAssistant = {
2639
2622
  model: {
2640
2623
  id: string;
2641
2624
  providerID: string;
2642
- variant?: string;
2625
+ variant: string;
2643
2626
  };
2644
2627
  content: Array<SessionMessageAssistantText | SessionMessageAssistantReasoning | SessionMessageAssistantTool>;
2645
2628
  snapshot?: {
@@ -2657,10 +2640,7 @@ export type SessionMessageAssistant = {
2657
2640
  write: number;
2658
2641
  };
2659
2642
  };
2660
- error?: {
2661
- type: string;
2662
- message: string;
2663
- };
2643
+ error?: SessionErrorUnknown;
2664
2644
  };
2665
2645
  export type SessionMessageCompaction = {
2666
2646
  type: "compaction";
@@ -5072,6 +5052,33 @@ export type SyncReplayResponses = {
5072
5052
  };
5073
5053
  };
5074
5054
  export type SyncReplayResponse = SyncReplayResponses[keyof SyncReplayResponses];
5055
+ export type SyncStealData = {
5056
+ body?: {
5057
+ sessionID: string;
5058
+ };
5059
+ path?: never;
5060
+ query?: {
5061
+ directory?: string;
5062
+ workspace?: string;
5063
+ };
5064
+ url: "/sync/steal";
5065
+ };
5066
+ export type SyncStealErrors = {
5067
+ /**
5068
+ * Bad request
5069
+ */
5070
+ 400: BadRequestError;
5071
+ };
5072
+ export type SyncStealError = SyncStealErrors[keyof SyncStealErrors];
5073
+ export type SyncStealResponses = {
5074
+ /**
5075
+ * Session stolen into workspace
5076
+ */
5077
+ 200: {
5078
+ sessionID: string;
5079
+ };
5080
+ };
5081
+ export type SyncStealResponse = SyncStealResponses[keyof SyncStealResponses];
5075
5082
  export type SyncHistoryListData = {
5076
5083
  body?: {
5077
5084
  [key: string]: number;
@@ -5593,35 +5600,32 @@ export type ExperimentalWorkspaceRemoveResponses = {
5593
5600
  200: Workspace;
5594
5601
  };
5595
5602
  export type ExperimentalWorkspaceRemoveResponse = ExperimentalWorkspaceRemoveResponses[keyof ExperimentalWorkspaceRemoveResponses];
5596
- export type ExperimentalWorkspaceSessionRestoreData = {
5603
+ export type ExperimentalWorkspaceWarpData = {
5597
5604
  body?: {
5598
- sessionID: string;
5599
- };
5600
- path: {
5601
5605
  id: string;
5606
+ sessionID: string;
5602
5607
  };
5608
+ path?: never;
5603
5609
  query?: {
5604
5610
  directory?: string;
5605
5611
  workspace?: string;
5606
5612
  };
5607
- url: "/experimental/workspace/{id}/session-restore";
5613
+ url: "/experimental/workspace/warp";
5608
5614
  };
5609
- export type ExperimentalWorkspaceSessionRestoreErrors = {
5615
+ export type ExperimentalWorkspaceWarpErrors = {
5610
5616
  /**
5611
5617
  * Bad request
5612
5618
  */
5613
5619
  400: BadRequestError;
5614
5620
  };
5615
- export type ExperimentalWorkspaceSessionRestoreError = ExperimentalWorkspaceSessionRestoreErrors[keyof ExperimentalWorkspaceSessionRestoreErrors];
5616
- export type ExperimentalWorkspaceSessionRestoreResponses = {
5621
+ export type ExperimentalWorkspaceWarpError = ExperimentalWorkspaceWarpErrors[keyof ExperimentalWorkspaceWarpErrors];
5622
+ export type ExperimentalWorkspaceWarpResponses = {
5617
5623
  /**
5618
- * Session replay started
5624
+ * Session warped
5619
5625
  */
5620
- 200: {
5621
- total: number;
5622
- };
5626
+ 204: void;
5623
5627
  };
5624
- export type ExperimentalWorkspaceSessionRestoreResponse = ExperimentalWorkspaceSessionRestoreResponses[keyof ExperimentalWorkspaceSessionRestoreResponses];
5628
+ export type ExperimentalWorkspaceWarpResponse = ExperimentalWorkspaceWarpResponses[keyof ExperimentalWorkspaceWarpResponses];
5625
5629
  export type PtyConnectData = {
5626
5630
  body?: never;
5627
5631
  path: {
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": "1.14.35",
4
+ "version": "1.14.36",
5
5
  "type": "module",
6
6
  "license": "MIT",
7
7
  "scripts": {