diff options
| author | opencode-agent[bot] <opencode-agent[bot]@users.noreply.github.com> | 2026-04-09 20:29:48 +0000 |
|---|---|---|
| committer | opencode-agent[bot] <opencode-agent[bot]@users.noreply.github.com> | 2026-04-09 20:29:48 +0000 |
| commit | bbe4a04f9fcba9e46eb1baf5e7152b22465808d5 (patch) | |
| tree | 539c8cfcab4dcc91ff11a16da7ab37d43a7e6c28 /packages/sdk/js/src | |
| parent | b2f621b897ca636dc720b035072555e03c0da30a (diff) | |
| download | opencode-bbe4a04f9fcba9e46eb1baf5e7152b22465808d5.tar.gz opencode-bbe4a04f9fcba9e46eb1baf5e7152b22465808d5.zip | |
chore: generate
Diffstat (limited to 'packages/sdk/js/src')
| -rw-r--r-- | packages/sdk/js/src/v2/gen/types.gen.ts | 378 |
1 files changed, 189 insertions, 189 deletions
diff --git a/packages/sdk/js/src/v2/gen/types.gen.ts b/packages/sdk/js/src/v2/gen/types.gen.ts index 3d1495995..62c62e138 100644 --- a/packages/sdk/js/src/v2/gen/types.gen.ts +++ b/packages/sdk/js/src/v2/gen/types.gen.ts @@ -94,35 +94,6 @@ export type EventMessagePartDelta = { } } -export type SessionStatus = - | { - type: "idle" - } - | { - type: "retry" - attempt: number - message: string - next: number - } - | { - type: "busy" - } - -export type EventSessionStatus = { - type: "session.status" - properties: { - sessionID: string - status: SessionStatus - } -} - -export type EventSessionIdle = { - type: "session.idle" - properties: { - sessionID: string - } -} - export type PermissionRequest = { id: string sessionID: string @@ -152,81 +123,95 @@ export type EventPermissionReplied = { } } -export type QuestionOption = { - /** - * Display text (1-5 words, concise) - */ - label: string - /** - * Explanation of choice - */ - description: string +export type SnapshotFileDiff = { + file: string + patch: string + additions: number + deletions: number + status?: "added" | "deleted" | "modified" } -export type QuestionInfo = { - /** - * Complete question - */ - question: string - /** - * Very short label (max 30 chars) - */ - header: string - /** - * Available choices - */ - options: Array<QuestionOption> - /** - * Allow selecting multiple choices - */ - multiple?: boolean - /** - * Allow typing a custom answer (default: true) - */ - custom?: boolean +export type EventSessionDiff = { + type: "session.diff" + properties: { + sessionID: string + diff: Array<SnapshotFileDiff> + } } -export type QuestionRequest = { - id: string - sessionID: string - /** - * Questions to ask - */ - questions: Array<QuestionInfo> - tool?: { - messageID: string - callID: string +export type ProviderAuthError = { + name: "ProviderAuthError" + data: { + providerID: string + message: string } } -export type EventQuestionAsked = { - type: "question.asked" - properties: QuestionRequest +export type UnknownError = { + name: "UnknownError" + data: { + message: string + } } -export type QuestionAnswer = Array<string> +export type MessageOutputLengthError = { + name: "MessageOutputLengthError" + data: { + [key: string]: unknown + } +} -export type EventQuestionReplied = { - type: "question.replied" - properties: { - sessionID: string - requestID: string - answers: Array<QuestionAnswer> +export type MessageAbortedError = { + name: "MessageAbortedError" + data: { + message: string } } -export type EventQuestionRejected = { - type: "question.rejected" - properties: { - sessionID: string - requestID: string +export type StructuredOutputError = { + name: "StructuredOutputError" + data: { + message: string + retries: number } } -export type EventSessionCompacted = { - type: "session.compacted" +export type ContextOverflowError = { + name: "ContextOverflowError" + data: { + message: string + responseBody?: string + } +} + +export type ApiError = { + name: "APIError" + data: { + message: string + statusCode?: number + isRetryable: boolean + responseHeaders?: { + [key: string]: string + } + responseBody?: string + metadata?: { + [key: string]: string + } + } +} + +export type EventSessionError = { + type: "session.error" properties: { - sessionID: string + sessionID?: string + error?: + | ProviderAuthError + | UnknownError + | MessageOutputLengthError + | MessageAbortedError + | StructuredOutputError + | ContextOverflowError + | ApiError } } @@ -245,26 +230,10 @@ export type EventFileWatcherUpdated = { } } -export type Todo = { - /** - * Brief description of the task - */ - content: string - /** - * Current status of the task: pending, in_progress, completed, cancelled - */ - status: string - /** - * Priority level of the task: high, medium, low - */ - priority: string -} - -export type EventTodoUpdated = { - type: "todo.updated" +export type EventVcsBranchUpdated = { + type: "vcs.branch.updated" properties: { - sessionID: string - todos: Array<Todo> + branch?: string } } @@ -347,116 +316,147 @@ export type EventCommandExecuted = { } } -export type SnapshotFileDiff = { - file: string - patch: string - additions: number - deletions: number - status?: "added" | "deleted" | "modified" -} - -export type EventSessionDiff = { - type: "session.diff" +export type EventWorkspaceReady = { + type: "workspace.ready" properties: { - sessionID: string - diff: Array<SnapshotFileDiff> + name: string } } -export type ProviderAuthError = { - name: "ProviderAuthError" - data: { - providerID: string +export type EventWorkspaceFailed = { + type: "workspace.failed" + properties: { message: string } } -export type UnknownError = { - name: "UnknownError" - data: { - message: string - } +export type QuestionOption = { + /** + * Display text (1-5 words, concise) + */ + label: string + /** + * Explanation of choice + */ + description: string } -export type MessageOutputLengthError = { - name: "MessageOutputLengthError" - data: { - [key: string]: unknown - } +export type QuestionInfo = { + /** + * Complete question + */ + question: string + /** + * Very short label (max 30 chars) + */ + header: string + /** + * Available choices + */ + options: Array<QuestionOption> + /** + * Allow selecting multiple choices + */ + multiple?: boolean + /** + * Allow typing a custom answer (default: true) + */ + custom?: boolean } -export type MessageAbortedError = { - name: "MessageAbortedError" - data: { - message: string +export type QuestionRequest = { + id: string + sessionID: string + /** + * Questions to ask + */ + questions: Array<QuestionInfo> + tool?: { + messageID: string + callID: string } } -export type StructuredOutputError = { - name: "StructuredOutputError" - data: { - message: string - retries: number +export type EventQuestionAsked = { + type: "question.asked" + properties: QuestionRequest +} + +export type QuestionAnswer = Array<string> + +export type EventQuestionReplied = { + type: "question.replied" + properties: { + sessionID: string + requestID: string + answers: Array<QuestionAnswer> } } -export type ContextOverflowError = { - name: "ContextOverflowError" - data: { - message: string - responseBody?: string +export type EventQuestionRejected = { + type: "question.rejected" + properties: { + sessionID: string + requestID: string } } -export type ApiError = { - name: "APIError" - data: { - message: string - statusCode?: number - isRetryable: boolean - responseHeaders?: { - [key: string]: string +export type SessionStatus = + | { + type: "idle" } - responseBody?: string - metadata?: { - [key: string]: string + | { + type: "retry" + attempt: number + message: string + next: number + } + | { + type: "busy" } - } -} -export type EventSessionError = { - type: "session.error" +export type EventSessionStatus = { + type: "session.status" properties: { - sessionID?: string - error?: - | ProviderAuthError - | UnknownError - | MessageOutputLengthError - | MessageAbortedError - | StructuredOutputError - | ContextOverflowError - | ApiError + sessionID: string + status: SessionStatus } } -export type EventVcsBranchUpdated = { - type: "vcs.branch.updated" +export type EventSessionIdle = { + type: "session.idle" properties: { - branch?: string + sessionID: string } } -export type EventWorkspaceReady = { - type: "workspace.ready" +export type EventSessionCompacted = { + type: "session.compacted" properties: { - name: string + sessionID: string } } -export type EventWorkspaceFailed = { - type: "workspace.failed" +export type Todo = { + /** + * Brief description of the task + */ + content: string + /** + * Current status of the task: pending, in_progress, completed, cancelled + */ + status: string + /** + * Priority level of the task: high, medium, low + */ + priority: string +} + +export type EventTodoUpdated = { + type: "todo.updated" properties: { - message: string + sessionID: string + todos: Array<Todo> } } @@ -972,17 +972,13 @@ export type Event = | EventLspClientDiagnostics | EventLspUpdated | EventMessagePartDelta - | EventSessionStatus - | EventSessionIdle | EventPermissionAsked | EventPermissionReplied - | EventQuestionAsked - | EventQuestionReplied - | EventQuestionRejected - | EventSessionCompacted + | EventSessionDiff + | EventSessionError | EventFileEdited | EventFileWatcherUpdated - | EventTodoUpdated + | EventVcsBranchUpdated | EventTuiPromptAppend | EventTuiCommandExecute | EventTuiToastShow @@ -990,11 +986,15 @@ export type Event = | EventMcpToolsChanged | EventMcpBrowserOpenFailed | EventCommandExecuted - | EventSessionDiff - | EventSessionError - | EventVcsBranchUpdated | EventWorkspaceReady | EventWorkspaceFailed + | EventQuestionAsked + | EventQuestionReplied + | EventQuestionRejected + | EventSessionStatus + | EventSessionIdle + | EventSessionCompacted + | EventTodoUpdated | EventPtyCreated | EventPtyUpdated | EventPtyExited |
