@opencode-ai/sdk 1.16.0 → 1.16.1

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, AppAgentsErrors, AppAgentsResponses, AppLogErrors, AppLogResponses, AppSkillsErrors, AppSkillsResponses, Auth as Auth3, AuthRemoveErrors, AuthRemoveResponses, AuthSetErrors, AuthSetResponses, CommandListErrors, CommandListResponses, Config as Config3, ConfigGetErrors, ConfigGetResponses, ConfigProvidersErrors, ConfigProvidersResponses, ConfigUpdateErrors, ConfigUpdateResponses, EventSubscribeResponses, EventTuiCommandExecute, EventTuiPromptAppend, EventTuiSessionSelect, EventTuiToastShow, ExperimentalConsoleGetErrors, ExperimentalConsoleGetResponses, ExperimentalConsoleListOrgsErrors, ExperimentalConsoleListOrgsResponses, ExperimentalConsoleSwitchOrgResponses, ExperimentalControlPlaneMoveSessionErrors, ExperimentalControlPlaneMoveSessionResponses, ExperimentalProjectCopyCreateErrors, ExperimentalProjectCopyCreateResponses, ExperimentalProjectCopyRefreshErrors, ExperimentalProjectCopyRefreshResponses, ExperimentalProjectCopyRemoveErrors, ExperimentalProjectCopyRemoveResponses, ExperimentalResourceListErrors, ExperimentalResourceListResponses, ExperimentalSessionListErrors, ExperimentalSessionListResponses, ExperimentalWorkspaceAdapterListErrors, ExperimentalWorkspaceAdapterListResponses, ExperimentalWorkspaceCreateErrors, ExperimentalWorkspaceCreateResponses, ExperimentalWorkspaceListErrors, ExperimentalWorkspaceListResponses, ExperimentalWorkspaceRemoveErrors, ExperimentalWorkspaceRemoveResponses, ExperimentalWorkspaceStatusErrors, ExperimentalWorkspaceStatusResponses, ExperimentalWorkspaceSyncListErrors, ExperimentalWorkspaceSyncListResponses, ExperimentalWorkspaceWarpErrors, ExperimentalWorkspaceWarpResponses, FileListErrors, FileListResponses, FilePartInput, FilePartSource, FileReadErrors, FileReadResponses, FileStatusErrors, FileStatusResponses, FindFilesErrors, FindFilesResponses, FindSymbolsErrors, FindSymbolsResponses, FindTextErrors, FindTextResponses, FormatterStatusErrors, FormatterStatusResponses, GlobalConfigGetErrors, GlobalConfigGetResponses, GlobalConfigUpdateErrors, GlobalConfigUpdateResponses, GlobalDisposeErrors, GlobalDisposeResponses, GlobalEventResponses, GlobalHealthErrors, GlobalHealthResponses, GlobalUpgradeErrors, GlobalUpgradeResponses, InstanceDisposeErrors, InstanceDisposeResponses, LspStatusErrors, LspStatusResponses, McpAddErrors, McpAddResponses, McpAuthAuthenticateErrors, McpAuthAuthenticateResponses, McpAuthCallbackErrors, McpAuthCallbackResponses, McpAuthRemoveErrors, McpAuthRemoveResponses, McpAuthStartErrors, McpAuthStartResponses, McpConnectErrors, McpConnectResponses, McpDisconnectErrors, McpDisconnectResponses, McpLocalConfig, McpRemoteConfig, McpStatusErrors, McpStatusResponses, MoveSessionDestination, OutputFormat, Part as Part2, PartDeleteErrors, PartDeleteResponses, PartUpdateErrors, PartUpdateResponses, PathGetErrors, PathGetResponses, PermissionListErrors, PermissionListResponses, PermissionReplyErrors, PermissionReplyResponses, PermissionRespondErrors, PermissionRespondResponses, PermissionRuleset, PermissionV2Reply, ProjectCurrentErrors, ProjectCurrentResponses, ProjectDirectoriesErrors, ProjectDirectoriesResponses, ProjectInitGitErrors, ProjectInitGitResponses, ProjectListErrors, ProjectListResponses, ProjectUpdateErrors, ProjectUpdateResponses, Prompt, ProviderAuthErrors, ProviderAuthResponses, ProviderListErrors, ProviderListResponses, ProviderOauthAuthorizeErrors, ProviderOauthAuthorizeResponses, ProviderOauthCallbackErrors, ProviderOauthCallbackResponses, PtyConnectErrors, PtyConnectResponses, PtyConnectTokenErrors, PtyConnectTokenResponses, PtyCreateErrors, PtyCreateResponses, PtyGetErrors, PtyGetResponses, PtyListErrors, PtyListResponses, PtyRemoveErrors, PtyRemoveResponses, PtyShellsErrors, PtyShellsResponses, PtyUpdateErrors, PtyUpdateResponses, QuestionAnswer, QuestionListErrors, QuestionListResponses, QuestionRejectErrors, QuestionRejectResponses, QuestionReplyErrors, QuestionReplyResponses, QuestionV2Reply, SessionAbortErrors, SessionAbortResponses, SessionChildrenErrors, SessionChildrenResponses, SessionCommandErrors, SessionCommandResponses, SessionCreateErrors, SessionCreateResponses, SessionDeleteErrors, SessionDeleteMessageErrors, SessionDeleteMessageResponses, SessionDeleteResponses, SessionDiffErrors, SessionDiffResponses, SessionForkErrors, SessionForkResponses, SessionGetErrors, SessionGetResponses, SessionInitErrors, SessionInitResponses, SessionListErrors, 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, SyncStartErrors, SyncStartResponses, SyncStealErrors, SyncStealResponses, TextPartInput, ToolIdsErrors, ToolIdsResponses, ToolListErrors, ToolListResponses, TuiAppendPromptErrors, TuiAppendPromptResponses, TuiClearPromptErrors, TuiClearPromptResponses, TuiControlNextErrors, TuiControlNextResponses, TuiControlResponseErrors, TuiControlResponseResponses, TuiExecuteCommandErrors, TuiExecuteCommandResponses, TuiOpenHelpErrors, TuiOpenHelpResponses, TuiOpenModelsErrors, TuiOpenModelsResponses, TuiOpenSessionsErrors, TuiOpenSessionsResponses, TuiOpenThemesErrors, TuiOpenThemesResponses, TuiPublishErrors, TuiPublishResponses, TuiSelectSessionErrors, TuiSelectSessionResponses, TuiShowToastErrors, TuiShowToastResponses, TuiSubmitPromptErrors, TuiSubmitPromptResponses, V2AgentListErrors, V2AgentListResponses, V2CommandListErrors, V2CommandListResponses, V2EventSubscribeResponses, V2FsListErrors, V2FsListResponses, V2FsReadErrors, V2FsReadResponses, V2HealthGetErrors, V2HealthGetResponses, V2ModelListErrors, V2ModelListResponses, V2PermissionRequestListErrors, V2PermissionRequestListResponses, V2PermissionSavedListErrors, V2PermissionSavedListResponses, V2PermissionSavedRemoveErrors, V2PermissionSavedRemoveResponses, V2ProviderGetErrors, V2ProviderGetResponses, V2ProviderListErrors, V2ProviderListResponses, V2QuestionRequestListErrors, V2QuestionRequestListResponses, V2SessionCompactErrors, V2SessionCompactResponses, V2SessionContextErrors, V2SessionContextResponses, V2SessionListErrors, V2SessionListResponses, V2SessionMessagesErrors, V2SessionMessagesResponses, V2SessionPermissionListErrors, V2SessionPermissionListResponses, V2SessionPermissionReplyErrors, V2SessionPermissionReplyResponses, V2SessionPromptErrors, V2SessionPromptResponses, V2SessionQuestionRejectErrors, V2SessionQuestionRejectResponses, V2SessionQuestionReplyErrors, V2SessionQuestionReplyResponses, V2SessionWaitErrors, V2SessionWaitResponses, V2SkillListErrors, V2SkillListResponses, VcsApplyErrors, VcsApplyResponses, VcsDiffErrors, VcsDiffRawErrors, VcsDiffRawResponses, VcsDiffResponses, VcsGetErrors, VcsGetResponses, VcsStatusErrors, VcsStatusResponses, WorktreeCreateErrors, WorktreeCreateInput, WorktreeCreateResponses, WorktreeListErrors, WorktreeListResponses, WorktreeRemoveErrors, WorktreeRemoveInput, WorktreeRemoveResponses, WorktreeResetErrors, WorktreeResetInput, WorktreeResetResponses } from "./types.gen.js";
2
+ import type { AgentPartInput, AppAgentsErrors, AppAgentsResponses, AppLogErrors, AppLogResponses, AppSkillsErrors, AppSkillsResponses, Auth as Auth3, AuthRemoveErrors, AuthRemoveResponses, AuthSetErrors, AuthSetResponses, CommandListErrors, CommandListResponses, Config as Config3, ConfigGetErrors, ConfigGetResponses, ConfigProvidersErrors, ConfigProvidersResponses, ConfigUpdateErrors, ConfigUpdateResponses, EventSubscribeResponses, EventTuiCommandExecute, EventTuiPromptAppend, EventTuiSessionSelect, EventTuiToastShow, ExperimentalConsoleGetErrors, ExperimentalConsoleGetResponses, ExperimentalConsoleListOrgsErrors, ExperimentalConsoleListOrgsResponses, ExperimentalConsoleSwitchOrgResponses, ExperimentalControlPlaneMoveSessionErrors, ExperimentalControlPlaneMoveSessionResponses, ExperimentalProjectCopyCreateErrors, ExperimentalProjectCopyCreateResponses, ExperimentalProjectCopyRefreshErrors, ExperimentalProjectCopyRefreshResponses, ExperimentalProjectCopyRemoveErrors, ExperimentalProjectCopyRemoveResponses, ExperimentalResourceListErrors, ExperimentalResourceListResponses, ExperimentalSessionBackgroundErrors, ExperimentalSessionBackgroundResponses, ExperimentalSessionListErrors, ExperimentalSessionListResponses, ExperimentalWorkspaceAdapterListErrors, ExperimentalWorkspaceAdapterListResponses, ExperimentalWorkspaceCreateErrors, ExperimentalWorkspaceCreateResponses, ExperimentalWorkspaceListErrors, ExperimentalWorkspaceListResponses, ExperimentalWorkspaceRemoveErrors, ExperimentalWorkspaceRemoveResponses, ExperimentalWorkspaceStatusErrors, ExperimentalWorkspaceStatusResponses, ExperimentalWorkspaceSyncListErrors, ExperimentalWorkspaceSyncListResponses, ExperimentalWorkspaceWarpErrors, ExperimentalWorkspaceWarpResponses, FileListErrors, FileListResponses, FilePartInput, FilePartSource, FileReadErrors, FileReadResponses, FileStatusErrors, FileStatusResponses, FindFilesErrors, FindFilesResponses, FindSymbolsErrors, FindSymbolsResponses, FindTextErrors, FindTextResponses, FormatterStatusErrors, FormatterStatusResponses, GlobalConfigGetErrors, GlobalConfigGetResponses, GlobalConfigUpdateErrors, GlobalConfigUpdateResponses, GlobalDisposeErrors, GlobalDisposeResponses, GlobalEventResponses, GlobalHealthErrors, GlobalHealthResponses, GlobalUpgradeErrors, GlobalUpgradeResponses, InstanceDisposeErrors, InstanceDisposeResponses, LspStatusErrors, LspStatusResponses, McpAddErrors, McpAddResponses, McpAuthAuthenticateErrors, McpAuthAuthenticateResponses, McpAuthCallbackErrors, McpAuthCallbackResponses, McpAuthRemoveErrors, McpAuthRemoveResponses, McpAuthStartErrors, McpAuthStartResponses, McpConnectErrors, McpConnectResponses, McpDisconnectErrors, McpDisconnectResponses, McpLocalConfig, McpRemoteConfig, McpStatusErrors, McpStatusResponses, MoveSessionDestination, OutputFormat, Part as Part2, PartDeleteErrors, PartDeleteResponses, PartUpdateErrors, PartUpdateResponses, PathGetErrors, PathGetResponses, PermissionListErrors, PermissionListResponses, PermissionReplyErrors, PermissionReplyResponses, PermissionRespondErrors, PermissionRespondResponses, PermissionRuleset, PermissionV2Reply, ProjectCurrentErrors, ProjectCurrentResponses, ProjectDirectoriesErrors, ProjectDirectoriesResponses, ProjectInitGitErrors, ProjectInitGitResponses, ProjectListErrors, ProjectListResponses, ProjectUpdateErrors, ProjectUpdateResponses, Prompt, ProviderAuthErrors, ProviderAuthResponses, ProviderListErrors, ProviderListResponses, ProviderOauthAuthorizeErrors, ProviderOauthAuthorizeResponses, ProviderOauthCallbackErrors, ProviderOauthCallbackResponses, PtyConnectErrors, PtyConnectResponses, PtyConnectTokenErrors, PtyConnectTokenResponses, PtyCreateErrors, PtyCreateResponses, PtyGetErrors, PtyGetResponses, PtyListErrors, PtyListResponses, PtyRemoveErrors, PtyRemoveResponses, PtyShellsErrors, PtyShellsResponses, PtyUpdateErrors, PtyUpdateResponses, QuestionAnswer, QuestionListErrors, QuestionListResponses, QuestionRejectErrors, QuestionRejectResponses, QuestionReplyErrors, QuestionReplyResponses, QuestionV2Reply, SessionAbortErrors, SessionAbortResponses, SessionChildrenErrors, SessionChildrenResponses, SessionCommandErrors, SessionCommandResponses, SessionCreateErrors, SessionCreateResponses, SessionDeleteErrors, SessionDeleteMessageErrors, SessionDeleteMessageResponses, SessionDeleteResponses, SessionDiffErrors, SessionDiffResponses, SessionForkErrors, SessionForkResponses, SessionGetErrors, SessionGetResponses, SessionInitErrors, SessionInitResponses, SessionListErrors, 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, SyncStartErrors, SyncStartResponses, SyncStealErrors, SyncStealResponses, TextPartInput, ToolIdsErrors, ToolIdsResponses, ToolListErrors, ToolListResponses, TuiAppendPromptErrors, TuiAppendPromptResponses, TuiClearPromptErrors, TuiClearPromptResponses, TuiControlNextErrors, TuiControlNextResponses, TuiControlResponseErrors, TuiControlResponseResponses, TuiExecuteCommandErrors, TuiExecuteCommandResponses, TuiOpenHelpErrors, TuiOpenHelpResponses, TuiOpenModelsErrors, TuiOpenModelsResponses, TuiOpenSessionsErrors, TuiOpenSessionsResponses, TuiOpenThemesErrors, TuiOpenThemesResponses, TuiPublishErrors, TuiPublishResponses, TuiSelectSessionErrors, TuiSelectSessionResponses, TuiShowToastErrors, TuiShowToastResponses, TuiSubmitPromptErrors, TuiSubmitPromptResponses, V2AgentListErrors, V2AgentListResponses, V2CommandListErrors, V2CommandListResponses, V2EventSubscribeResponses, V2FsListErrors, V2FsListResponses, V2FsReadErrors, V2FsReadResponses, V2HealthGetErrors, V2HealthGetResponses, V2ModelListErrors, V2ModelListResponses, V2PermissionRequestListErrors, V2PermissionRequestListResponses, V2PermissionSavedListErrors, V2PermissionSavedListResponses, V2PermissionSavedRemoveErrors, V2PermissionSavedRemoveResponses, V2ProviderGetErrors, V2ProviderGetResponses, V2ProviderListErrors, V2ProviderListResponses, V2QuestionRequestListErrors, V2QuestionRequestListResponses, V2SessionCompactErrors, V2SessionCompactResponses, V2SessionContextErrors, V2SessionContextResponses, V2SessionListErrors, V2SessionListResponses, V2SessionMessagesErrors, V2SessionMessagesResponses, V2SessionPermissionListErrors, V2SessionPermissionListResponses, V2SessionPermissionReplyErrors, V2SessionPermissionReplyResponses, V2SessionPromptErrors, V2SessionPromptResponses, V2SessionQuestionRejectErrors, V2SessionQuestionRejectResponses, V2SessionQuestionReplyErrors, V2SessionQuestionReplyResponses, V2SessionWaitErrors, V2SessionWaitResponses, V2SkillListErrors, V2SkillListResponses, VcsApplyErrors, VcsApplyResponses, VcsDiffErrors, VcsDiffRawErrors, VcsDiffRawResponses, VcsDiffResponses, VcsGetErrors, VcsGetResponses, VcsStatusErrors, VcsStatusResponses, WorktreeCreateErrors, WorktreeCreateInput, WorktreeCreateResponses, WorktreeListErrors, 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
@@ -138,6 +138,16 @@ export declare class Session extends HeyApiClient {
138
138
  limit?: number;
139
139
  archived?: boolean | "true" | "false";
140
140
  }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<ExperimentalSessionListResponses, ExperimentalSessionListErrors, ThrowOnError, "fields">;
141
+ /**
142
+ * Background subagents
143
+ *
144
+ * Detach any synchronous subagents currently blocking the session and continue them in the background.
145
+ */
146
+ background<ThrowOnError extends boolean = false>(parameters: {
147
+ sessionID: string;
148
+ directory?: string;
149
+ workspace?: string;
150
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<ExperimentalSessionBackgroundResponses, ExperimentalSessionBackgroundErrors, ThrowOnError, "fields">;
141
151
  }
142
152
  export declare class Resource extends HeyApiClient {
143
153
  /**
@@ -256,6 +256,27 @@ export class Session extends HeyApiClient {
256
256
  ...params,
257
257
  });
258
258
  }
259
+ /**
260
+ * Background subagents
261
+ *
262
+ * Detach any synchronous subagents currently blocking the session and continue them in the background.
263
+ */
264
+ background(parameters, options) {
265
+ const params = buildClientParams([parameters], [
266
+ {
267
+ args: [
268
+ { in: "path", key: "sessionID" },
269
+ { in: "query", key: "directory" },
270
+ { in: "query", key: "workspace" },
271
+ ],
272
+ },
273
+ ]);
274
+ return (options?.client ?? this.client).post({
275
+ url: "/experimental/session/{sessionID}/background",
276
+ ...options,
277
+ ...params,
278
+ });
279
+ }
259
280
  }
260
281
  export class Resource extends HeyApiClient {
261
282
  /**
@@ -1,7 +1,7 @@
1
1
  export type ClientOptions = {
2
2
  baseUrl: `${string}://${string}` | (string & {});
3
3
  };
4
- export type Event = EventModelsDevRefreshed | EventPluginAdded | EventCatalogModelUpdated | EventSessionCreated | EventSessionUpdated | EventSessionDeleted | EventMessageUpdated | EventMessageRemoved | EventMessagePartUpdated | EventMessagePartRemoved | EventSessionNextAgentSwitched | EventSessionNextModelSwitched | EventSessionNextMoved | EventSessionNextPrompted | EventSessionNextPromptAdmitted | EventSessionNextPromptPromoted | 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 | EventAccountAdded | EventAccountRemoved | EventAccountSwitched | EventPermissionV2Asked | EventPermissionV2Replied | EventFileWatcherUpdated | EventPtyCreated | EventPtyUpdated | EventPtyExited | EventPtyDeleted | EventQuestionV2Asked | EventQuestionV2Replied | EventQuestionV2Rejected | EventTodoUpdated | EventLspUpdated | EventPermissionAsked | EventPermissionReplied | EventTuiPromptAppend2 | EventTuiCommandExecute2 | EventTuiToastShow2 | EventTuiSessionSelect2 | EventMcpToolsChanged | EventMcpBrowserOpenFailed | EventCommandExecuted | EventProjectDirectoriesUpdated | EventProjectUpdated | EventQuestionAsked | EventQuestionReplied | EventQuestionRejected | EventSessionStatus | EventSessionIdle | EventSessionCompacted | EventVcsBranchUpdated | EventWorktreeReady | EventWorktreeFailed | EventWorkspaceReady | EventWorkspaceFailed | EventWorkspaceStatus | EventServerConnected | EventGlobalDisposed | EventServerInstanceDisposed;
4
+ export type Event = EventModelsDevRefreshed | EventPluginAdded | EventCatalogModelUpdated | EventSessionCreated | EventSessionUpdated | EventSessionDeleted | EventMessageUpdated | EventMessageRemoved | EventMessagePartUpdated | EventMessagePartRemoved | EventSessionNextAgentSwitched | EventSessionNextModelSwitched | EventSessionNextMoved | EventSessionNextPrompted | EventSessionNextPromptAdmitted | EventSessionNextPromptPromoted | EventSessionNextContextUpdated | 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 | EventAccountAdded | EventAccountRemoved | EventAccountSwitched | EventPermissionV2Asked | EventPermissionV2Replied | EventFileWatcherUpdated | EventPtyCreated | EventPtyUpdated | EventPtyExited | EventPtyDeleted | EventQuestionV2Asked | EventQuestionV2Replied | EventQuestionV2Rejected | EventTodoUpdated | EventLspUpdated | EventPermissionAsked | EventPermissionReplied | EventTuiPromptAppend2 | EventTuiCommandExecute2 | EventTuiToastShow2 | EventTuiSessionSelect2 | EventMcpToolsChanged | EventMcpBrowserOpenFailed | EventCommandExecuted | EventProjectDirectoriesUpdated | EventProjectUpdated | EventQuestionAsked | EventQuestionReplied | EventQuestionRejected | EventSessionStatus | EventSessionIdle | EventSessionCompacted | EventVcsBranchUpdated | EventWorktreeReady | EventWorktreeFailed | EventWorkspaceReady | EventWorkspaceFailed | EventWorkspaceStatus | EventServerConnected | EventGlobalDisposed | EventServerInstanceDisposed;
5
5
  export type QuestionReplied = {
6
6
  sessionID: string;
7
7
  requestID: string;
@@ -678,6 +678,15 @@ export type GlobalEvent = {
678
678
  prompt: Prompt;
679
679
  timeCreated: number;
680
680
  };
681
+ } | {
682
+ id: string;
683
+ type: "session.next.context.updated";
684
+ properties: {
685
+ timestamp: number;
686
+ sessionID: string;
687
+ messageID: string;
688
+ text: string;
689
+ };
681
690
  } | {
682
691
  id: string;
683
692
  type: "session.next.synthetic";
@@ -1319,7 +1328,7 @@ export type GlobalEvent = {
1319
1328
  properties: {
1320
1329
  [key: string]: unknown;
1321
1330
  };
1322
- } | EventServerInstanceDisposed | SyncEventSessionCreated | SyncEventSessionUpdated | SyncEventSessionDeleted | SyncEventMessageUpdated | SyncEventMessageRemoved | SyncEventMessagePartUpdated | SyncEventMessagePartRemoved | SyncEventSessionNextAgentSwitched | SyncEventSessionNextModelSwitched | SyncEventSessionNextMoved | SyncEventSessionNextPrompted | SyncEventSessionNextPromptAdmitted | SyncEventSessionNextPromptPromoted | SyncEventSessionNextSynthetic | SyncEventSessionNextShellStarted | SyncEventSessionNextShellEnded | SyncEventSessionNextStepStarted | SyncEventSessionNextStepEnded | SyncEventSessionNextStepFailed | SyncEventSessionNextTextStarted | SyncEventSessionNextTextEnded | SyncEventSessionNextReasoningStarted | SyncEventSessionNextReasoningEnded | SyncEventSessionNextToolInputStarted | SyncEventSessionNextToolInputEnded | SyncEventSessionNextToolCalled | SyncEventSessionNextToolProgress | SyncEventSessionNextToolSuccess | SyncEventSessionNextToolFailed | SyncEventSessionNextRetried | SyncEventSessionNextCompactionStarted | SyncEventSessionNextCompactionDelta | SyncEventSessionNextCompactionEnded;
1331
+ } | EventServerInstanceDisposed | SyncEventSessionCreated | SyncEventSessionUpdated | SyncEventSessionDeleted | SyncEventMessageUpdated | SyncEventMessageRemoved | SyncEventMessagePartUpdated | SyncEventMessagePartRemoved | SyncEventSessionNextAgentSwitched | SyncEventSessionNextModelSwitched | SyncEventSessionNextMoved | SyncEventSessionNextPrompted | SyncEventSessionNextPromptAdmitted | SyncEventSessionNextPromptPromoted | SyncEventSessionNextContextUpdated | SyncEventSessionNextSynthetic | SyncEventSessionNextShellStarted | SyncEventSessionNextShellEnded | SyncEventSessionNextStepStarted | SyncEventSessionNextStepEnded | SyncEventSessionNextStepFailed | SyncEventSessionNextTextStarted | SyncEventSessionNextTextEnded | SyncEventSessionNextReasoningStarted | SyncEventSessionNextReasoningEnded | SyncEventSessionNextToolInputStarted | SyncEventSessionNextToolInputEnded | SyncEventSessionNextToolCalled | SyncEventSessionNextToolProgress | SyncEventSessionNextToolSuccess | SyncEventSessionNextToolFailed | SyncEventSessionNextRetried | SyncEventSessionNextCompactionStarted | SyncEventSessionNextCompactionDelta | SyncEventSessionNextCompactionEnded;
1323
1332
  };
1324
1333
  /**
1325
1334
  * Log level
@@ -2716,6 +2725,22 @@ export type SyncEventSessionNextPromptPromoted = {
2716
2725
  };
2717
2726
  };
2718
2727
  };
2728
+ export type SyncEventSessionNextContextUpdated = {
2729
+ type: "sync";
2730
+ id: string;
2731
+ syncEvent: {
2732
+ type: "session.next.context.updated.1";
2733
+ id: string;
2734
+ seq: number;
2735
+ aggregateID: string;
2736
+ data: {
2737
+ timestamp: number;
2738
+ sessionID: string;
2739
+ messageID: string;
2740
+ text: string;
2741
+ };
2742
+ };
2743
+ };
2719
2744
  export type SyncEventSessionNextSynthetic = {
2720
2745
  type: "sync";
2721
2746
  id: string;
@@ -3244,6 +3269,17 @@ export type SessionMessageSynthetic = {
3244
3269
  text: string;
3245
3270
  type: "synthetic";
3246
3271
  };
3272
+ export type SessionMessageSystem = {
3273
+ id: string;
3274
+ metadata?: {
3275
+ [key: string]: unknown;
3276
+ };
3277
+ time: {
3278
+ created: number;
3279
+ };
3280
+ type: "system";
3281
+ text: string;
3282
+ };
3247
3283
  export type SessionMessageShell = {
3248
3284
  id: string;
3249
3285
  metadata?: {
@@ -3383,7 +3419,7 @@ export type SessionMessageCompaction = {
3383
3419
  created: number;
3384
3420
  };
3385
3421
  };
3386
- export type SessionMessage = SessionMessageAgentSwitched | SessionMessageModelSwitched | SessionMessageUser | SessionMessageSynthetic | SessionMessageShell | SessionMessageAssistant | SessionMessageCompaction;
3422
+ export type SessionMessage = SessionMessageAgentSwitched | SessionMessageModelSwitched | SessionMessageUser | SessionMessageSynthetic | SessionMessageSystem | SessionMessageShell | SessionMessageAssistant | SessionMessageCompaction;
3387
3423
  export type ProviderV2Info = {
3388
3424
  id: string;
3389
3425
  name: string;
@@ -3704,6 +3740,16 @@ export type EventSessionNextPromptPromoted = {
3704
3740
  timeCreated: number;
3705
3741
  };
3706
3742
  };
3743
+ export type EventSessionNextContextUpdated = {
3744
+ id: string;
3745
+ type: "session.next.context.updated";
3746
+ properties: {
3747
+ timestamp: number;
3748
+ sessionID: string;
3749
+ messageID: string;
3750
+ text: string;
3751
+ };
3752
+ };
3707
3753
  export type EventSessionNextSynthetic = {
3708
3754
  id: string;
3709
3755
  type: "session.next.synthetic";
@@ -4966,6 +5012,31 @@ export type ExperimentalSessionListResponses = {
4966
5012
  200: Array<GlobalSession>;
4967
5013
  };
4968
5014
  export type ExperimentalSessionListResponse = ExperimentalSessionListResponses[keyof ExperimentalSessionListResponses];
5015
+ export type ExperimentalSessionBackgroundData = {
5016
+ body?: never;
5017
+ path: {
5018
+ sessionID: string;
5019
+ };
5020
+ query?: {
5021
+ directory?: string;
5022
+ workspace?: string;
5023
+ };
5024
+ url: "/experimental/session/{sessionID}/background";
5025
+ };
5026
+ export type ExperimentalSessionBackgroundErrors = {
5027
+ /**
5028
+ * BadRequest | InvalidRequestError
5029
+ */
5030
+ 400: EffectHttpApiErrorBadRequest | InvalidRequestError;
5031
+ };
5032
+ export type ExperimentalSessionBackgroundError = ExperimentalSessionBackgroundErrors[keyof ExperimentalSessionBackgroundErrors];
5033
+ export type ExperimentalSessionBackgroundResponses = {
5034
+ /**
5035
+ * Backgrounded subagents
5036
+ */
5037
+ 200: boolean;
5038
+ };
5039
+ export type ExperimentalSessionBackgroundResponse = ExperimentalSessionBackgroundResponses[keyof ExperimentalSessionBackgroundResponses];
4969
5040
  export type ExperimentalResourceListData = {
4970
5041
  body?: never;
4971
5042
  path?: never;
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.16.0",
4
+ "version": "1.16.1",
5
5
  "type": "module",
6
6
  "license": "MIT",
7
7
  "scripts": {