From ccf1ad245e71dd787147b54eed60c126e7e9c26b Mon Sep 17 00:00:00 2001 From: Marius Date: Wed, 15 Apr 2026 16:14:34 +0200 Subject: [PATCH] chore(sdk): regenerate api client (#8980) --- packages/opencode/package.json | 18 +- packages/sdk/js/src/v2/gen/sdk.gen.ts | 216 ++++++++--------- packages/sdk/js/src/v2/gen/types.gen.ts | 308 ++++++++++++------------ 3 files changed, 271 insertions(+), 271 deletions(-) diff --git a/packages/opencode/package.json b/packages/opencode/package.json index 662a54d26b2..e46570bd4e7 100644 --- a/packages/opencode/package.json +++ b/packages/opencode/package.json @@ -107,15 +107,18 @@ "@hono/node-ws": "1.3.0", "@hono/standard-validator": "0.1.5", "@hono/zod-validator": "catalog:", + "@kilocode/kilo-gateway": "workspace:*", + "@kilocode/kilo-telemetry": "workspace:*", + "@kilocode/plugin": "workspace:*", + "@kilocode/sdk": "workspace:*", "@lydell/node-pty": "catalog:", "@modelcontextprotocol/sdk": "1.29.0", + "@morphllm/morphsdk": "0.2.148", "@npmcli/arborist": "9.4.0", "@octokit/graphql": "9.0.2", "@octokit/rest": "catalog:", "@openauthjs/openauth": "catalog:", - "@kilocode/plugin": "workspace:*", "@opencode-ai/script": "workspace:*", - "@kilocode/sdk": "workspace:*", "@opencode-ai/util": "workspace:*", "@openrouter/ai-sdk-provider": "2.5.1", "@opentui/core": "0.1.97", @@ -155,8 +158,11 @@ "opentui-spinner": "0.0.6", "partial-json": "0.1.7", "remeda": "catalog:", + "rotating-file-stream": "3.2.9", "semver": "^7.6.3", + "simple-git": "3.35.2", "solid-js": "catalog:", + "stream-chat": "9.38.0", "strip-ansi": "7.1.2", "tree-sitter-bash": "0.25.0", "tree-sitter-powershell": "0.25.10", @@ -169,13 +175,7 @@ "xdg-basedir": "5.1.0", "yargs": "18.0.0", "zod": "catalog:", - "zod-to-json-schema": "3.24.5", - "@kilocode/kilo-gateway": "workspace:*", - "@kilocode/kilo-telemetry": "workspace:*", - "@morphllm/morphsdk": "0.2.148", - "rotating-file-stream": "3.2.9", - "simple-git": "3.35.2", - "stream-chat": "9.38.0" + "zod-to-json-schema": "3.24.5" }, "overrides": { "drizzle-orm": "catalog:" diff --git a/packages/sdk/js/src/v2/gen/sdk.gen.ts b/packages/sdk/js/src/v2/gen/sdk.gen.ts index edf335cdcc2..0da83ed7a12 100644 --- a/packages/sdk/js/src/v2/gen/sdk.gen.ts +++ b/packages/sdk/js/src/v2/gen/sdk.gen.ts @@ -3086,109 +3086,6 @@ export class Question extends HeyApiClient { } } -export class Suggestion extends HeyApiClient { - /** - * List pending suggestions - * - * Get all pending suggestion requests across all sessions. - */ - public list( - parameters?: { - directory?: string - workspace?: string - }, - options?: Options, - ) { - const params = buildClientParams( - [parameters], - [ - { - args: [ - { in: "query", key: "directory" }, - { in: "query", key: "workspace" }, - ], - }, - ], - ) - return (options?.client ?? this.client).get({ - url: "/suggestion", - ...options, - ...params, - }) - } - - /** - * Accept suggestion request - * - * Accept a suggestion request from the AI assistant. - */ - public accept( - parameters: { - requestID: string - directory?: string - workspace?: string - index?: number - }, - options?: Options, - ) { - const params = buildClientParams( - [parameters], - [ - { - args: [ - { in: "path", key: "requestID" }, - { in: "query", key: "directory" }, - { in: "query", key: "workspace" }, - { in: "body", key: "index" }, - ], - }, - ], - ) - return (options?.client ?? this.client).post({ - url: "/suggestion/{requestID}/accept", - ...options, - ...params, - headers: { - "Content-Type": "application/json", - ...options?.headers, - ...params.headers, - }, - }) - } - - /** - * Dismiss suggestion request - * - * Dismiss a suggestion request from the AI assistant. - */ - public dismiss( - parameters: { - requestID: string - directory?: string - workspace?: string - }, - options?: Options, - ) { - const params = buildClientParams( - [parameters], - [ - { - args: [ - { in: "path", key: "requestID" }, - { in: "query", key: "directory" }, - { in: "query", key: "workspace" }, - ], - }, - ], - ) - return (options?.client ?? this.client).post({ - url: "/suggestion/{requestID}/dismiss", - ...options, - ...params, - }) - } -} - export class Oauth extends HeyApiClient { /** * OAuth authorize @@ -4624,6 +4521,109 @@ export class Network extends HeyApiClient { } } +export class Suggestion extends HeyApiClient { + /** + * List pending suggestions + * + * Get all pending suggestion requests across all sessions. + */ + public list( + parameters?: { + directory?: string + workspace?: string + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + ], + }, + ], + ) + return (options?.client ?? this.client).get({ + url: "/suggestion", + ...options, + ...params, + }) + } + + /** + * Accept suggestion request + * + * Accept a suggestion request from the AI assistant. + */ + public accept( + parameters: { + requestID: string + directory?: string + workspace?: string + index?: number + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "path", key: "requestID" }, + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + { in: "body", key: "index" }, + ], + }, + ], + ) + return (options?.client ?? this.client).post({ + url: "/suggestion/{requestID}/accept", + ...options, + ...params, + headers: { + "Content-Type": "application/json", + ...options?.headers, + ...params.headers, + }, + }) + } + + /** + * Dismiss suggestion request + * + * Dismiss a suggestion request from the AI assistant. + */ + public dismiss( + parameters: { + requestID: string + directory?: string + workspace?: string + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "path", key: "requestID" }, + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + ], + }, + ], + ) + return (options?.client ?? this.client).post({ + url: "/suggestion/{requestID}/dismiss", + ...options, + ...params, + }) + } +} + export class Telemetry extends HeyApiClient { /** * Capture telemetry event @@ -5764,11 +5764,6 @@ export class KiloClient extends HeyApiClient { return (this._question ??= new Question({ client: this.client })) } - private _suggestion?: Suggestion - get suggestion(): Suggestion { - return (this._suggestion ??= new Suggestion({ client: this.client })) - } - private _provider?: Provider get provider(): Provider { return (this._provider ??= new Provider({ client: this.client })) @@ -5834,6 +5829,11 @@ export class KiloClient extends HeyApiClient { return (this._network ??= new Network({ client: this.client })) } + private _suggestion?: Suggestion + get suggestion(): Suggestion { + return (this._suggestion ??= new Suggestion({ client: this.client })) + } + private _telemetry?: Telemetry get telemetry(): Telemetry { return (this._telemetry ??= new Telemetry({ client: this.client })) diff --git a/packages/sdk/js/src/v2/gen/types.gen.ts b/packages/sdk/js/src/v2/gen/types.gen.ts index 73b05fabd24..a055d14ab74 100644 --- a/packages/sdk/js/src/v2/gen/types.gen.ts +++ b/packages/sdk/js/src/v2/gen/types.gen.ts @@ -509,6 +509,65 @@ export type EventSessionIdle = { } } +export type SuggestionAction = { + /** + * Button or option label (1-5 words) + */ + label: string + /** + * Brief explanation of what this action does + */ + description?: string + /** + * Synthetic user prompt to inject when this action is accepted + */ + prompt: string +} + +export type SuggestionRequest = { + id: string + sessionID: string + /** + * Suggestion text shown to the user + */ + text: string + /** + * Available actions the user can take + */ + actions: Array + /** + * Whether this suggestion blocks prompt input (default: true) + */ + blocking?: boolean + tool?: { + messageID: string + callID: string + } +} + +export type EventSuggestionShown = { + type: "suggestion.shown" + properties: SuggestionRequest +} + +export type EventSuggestionAccepted = { + type: "suggestion.accepted" + properties: { + sessionID: string + requestID: string + index: number + action: SuggestionAction + } +} + +export type EventSuggestionDismissed = { + type: "suggestion.dismissed" + properties: { + sessionID: string + requestID: string + } +} + export type EventSessionCompacted = { type: "session.compacted" properties: { @@ -979,65 +1038,6 @@ export type EventMessagePartRemoved = { } } -export type SuggestionAction = { - /** - * Button or option label (1-5 words) - */ - label: string - /** - * Brief explanation of what this action does - */ - description?: string - /** - * Synthetic user prompt to inject when this action is accepted - */ - prompt: string -} - -export type SuggestionRequest = { - id: string - sessionID: string - /** - * Suggestion text shown to the user - */ - text: string - /** - * Available actions the user can take - */ - actions: Array - /** - * Whether this suggestion blocks prompt input (default: true) - */ - blocking?: boolean - tool?: { - messageID: string - callID: string - } -} - -export type EventSuggestionShown = { - type: "suggestion.shown" - properties: SuggestionRequest -} - -export type EventSuggestionAccepted = { - type: "suggestion.accepted" - properties: { - sessionID: string - requestID: string - index: number - action: SuggestionAction - } -} - -export type EventSuggestionDismissed = { - type: "suggestion.dismissed" - properties: { - sessionID: string - requestID: string - } -} - export type PermissionAction = "allow" | "deny" | "ask" export type PermissionRule = { @@ -1120,9 +1120,6 @@ export type Event = | EventGlobalConfigUpdated | EventLspClientDiagnostics | EventLspUpdated - | EventSuggestionShown - | EventSuggestionAccepted - | EventSuggestionDismissed | EventTuiPromptAppend | EventTuiCommandExecute | EventTuiToastShow @@ -1150,6 +1147,9 @@ export type Event = | EventTodoUpdated | EventSessionStatus | EventSessionIdle + | EventSuggestionShown + | EventSuggestionAccepted + | EventSuggestionDismissed | EventSessionCompacted | EventKiloSessionsRemoteStatusChanged | EventWorkspaceReady @@ -4620,98 +4620,6 @@ export type QuestionRejectResponses = { export type QuestionRejectResponse = QuestionRejectResponses[keyof QuestionRejectResponses] -export type SuggestionListData = { - body?: never - path?: never - query?: { - directory?: string - workspace?: string - } - url: "/suggestion" -} - -export type SuggestionListResponses = { - /** - * List of pending suggestions - */ - 200: Array -} - -export type SuggestionListResponse = SuggestionListResponses[keyof SuggestionListResponses] - -export type SuggestionAcceptData = { - body?: { - /** - * Zero-based action index to accept - */ - index: number - } - path: { - requestID: string - } - query?: { - directory?: string - workspace?: string - } - url: "/suggestion/{requestID}/accept" -} - -export type SuggestionAcceptErrors = { - /** - * Bad request - */ - 400: BadRequestError - /** - * Not found - */ - 404: NotFoundError -} - -export type SuggestionAcceptError = SuggestionAcceptErrors[keyof SuggestionAcceptErrors] - -export type SuggestionAcceptResponses = { - /** - * Suggestion accepted successfully - */ - 200: boolean -} - -export type SuggestionAcceptResponse = SuggestionAcceptResponses[keyof SuggestionAcceptResponses] - -export type SuggestionDismissData = { - body?: never - path: { - requestID: string - } - query?: { - directory?: string - workspace?: string - } - url: "/suggestion/{requestID}/dismiss" -} - -export type SuggestionDismissErrors = { - /** - * Bad request - */ - 400: BadRequestError - /** - * Not found - */ - 404: NotFoundError -} - -export type SuggestionDismissError = SuggestionDismissErrors[keyof SuggestionDismissErrors] - -export type SuggestionDismissResponses = { - /** - * Suggestion dismissed successfully - */ - 200: boolean -} - -export type SuggestionDismissResponse = SuggestionDismissResponses[keyof SuggestionDismissResponses] - export type ProviderListData = { body?: never path?: never @@ -5849,6 +5757,98 @@ export type NetworkRejectResponses = { export type NetworkRejectResponse = NetworkRejectResponses[keyof NetworkRejectResponses] +export type SuggestionListData = { + body?: never + path?: never + query?: { + directory?: string + workspace?: string + } + url: "/suggestion" +} + +export type SuggestionListResponses = { + /** + * List of pending suggestions + */ + 200: Array +} + +export type SuggestionListResponse = SuggestionListResponses[keyof SuggestionListResponses] + +export type SuggestionAcceptData = { + body?: { + /** + * Zero-based action index to accept + */ + index: number + } + path: { + requestID: string + } + query?: { + directory?: string + workspace?: string + } + url: "/suggestion/{requestID}/accept" +} + +export type SuggestionAcceptErrors = { + /** + * Bad request + */ + 400: BadRequestError + /** + * Not found + */ + 404: NotFoundError +} + +export type SuggestionAcceptError = SuggestionAcceptErrors[keyof SuggestionAcceptErrors] + +export type SuggestionAcceptResponses = { + /** + * Suggestion accepted successfully + */ + 200: boolean +} + +export type SuggestionAcceptResponse = SuggestionAcceptResponses[keyof SuggestionAcceptResponses] + +export type SuggestionDismissData = { + body?: never + path: { + requestID: string + } + query?: { + directory?: string + workspace?: string + } + url: "/suggestion/{requestID}/dismiss" +} + +export type SuggestionDismissErrors = { + /** + * Bad request + */ + 400: BadRequestError + /** + * Not found + */ + 404: NotFoundError +} + +export type SuggestionDismissError = SuggestionDismissErrors[keyof SuggestionDismissErrors] + +export type SuggestionDismissResponses = { + /** + * Suggestion dismissed successfully + */ + 200: boolean +} + +export type SuggestionDismissResponse = SuggestionDismissResponses[keyof SuggestionDismissResponses] + export type TelemetryCaptureData = { body?: { /**