diff --git a/.changeset/honest-model-badges.md b/.changeset/honest-model-badges.md new file mode 100644 index 00000000000..f808c5181aa --- /dev/null +++ b/.changeset/honest-model-badges.md @@ -0,0 +1,7 @@ +--- +"kilo-code": patch +"@kilocode/cli": patch +"@kilocode/kilo-gateway": patch +--- + +Show model free and prompt-training indicators only when their explicit catalog metadata is enabled. diff --git a/packages/core/src/models.ts b/packages/core/src/models.ts index 89ec7ead863..1c24176844d 100644 --- a/packages/core/src/models.ts +++ b/packages/core/src/models.ts @@ -74,6 +74,7 @@ export const Model = Schema.Struct({ recommendedIndex: Schema.optional(Schema.Finite), prompt: Schema.optional(Schema.String), isFree: Schema.optional(Schema.Boolean), + mayTrainOnYourPrompts: Schema.optional(Schema.Boolean), ai_sdk_provider: Schema.optional(Schema.String), // kilocode_change end experimental: Schema.optional( diff --git a/packages/kilo-gateway/src/api/models.ts b/packages/kilo-gateway/src/api/models.ts index 3a099946e99..d59fb219fc7 100644 --- a/packages/kilo-gateway/src/api/models.ts +++ b/packages/kilo-gateway/src/api/models.ts @@ -36,6 +36,7 @@ const openRouterModelSchema = z.object({ supported_parameters: z.array(z.string()).optional(), preferredIndex: z.number().optional(), isFree: z.boolean().optional(), + mayTrainOnYourPrompts: z.boolean().optional(), terminalBench: z .object({ overallScore: z.number(), @@ -190,6 +191,7 @@ function transformToModelDevFormat(model: OpenRouterModel): any { ai_sdk_provider: model.opencode?.ai_sdk_provider, tool_call: supportsTools, isFree: model.isFree, + mayTrainOnYourPrompts: model.mayTrainOnYourPrompts, ...(model.terminalBench && { terminalBench: model.terminalBench }), ...(inputPrice !== undefined && outputPrice !== undefined && { diff --git a/packages/kilo-gateway/test/api/models.test.ts b/packages/kilo-gateway/test/api/models.test.ts index e9739b513fe..10ce9ecedb8 100644 --- a/packages/kilo-gateway/test/api/models.test.ts +++ b/packages/kilo-gateway/test/api/models.test.ts @@ -15,6 +15,8 @@ const VALID_RESPONSE = JSON.stringify({ output_modalities: ["text"], }, supported_parameters: ["tools", "temperature"], + isFree: false, + mayTrainOnYourPrompts: true, }, ], }) @@ -143,7 +145,10 @@ test("returns models without error on success", async () => { ;(globalThis as any).fetch = orig expect(result.error).toBeUndefined() - expect(Object.keys(result.models).length).toBeGreaterThan(0) + expect(result.models["test/model-a"]).toMatchObject({ + isFree: false, + mayTrainOnYourPrompts: true, + }) }) test("preserves Terminal Bench metadata as a dedicated model field", async () => { diff --git a/packages/kilo-vscode/tests/unit/model-preview-data-line.test.ts b/packages/kilo-vscode/tests/unit/model-preview-data-line.test.ts index 63d9e27175d..788a70b61e5 100644 --- a/packages/kilo-vscode/tests/unit/model-preview-data-line.test.ts +++ b/packages/kilo-vscode/tests/unit/model-preview-data-line.test.ts @@ -22,6 +22,15 @@ describe("model preview data collection line", () => { expect(styles).toContain(".model-preview-data-line") }) + it("renders prompt training independently from the free badge", () => { + expect(selector).toMatch( + /[\s\S]*?<\/Show>\s*/, + ) + expect(preview).toMatch( + /[\s\S]*?<\/Show>\s*/, + ) + }) + it("uses the book open check icon for all webview model data disclosures", () => { expect(selector).toContain('Icon name="book-open-check"') expect(selector).not.toContain('Icon name="warning"') diff --git a/packages/kilo-vscode/tests/unit/model-selector-utils.test.ts b/packages/kilo-vscode/tests/unit/model-selector-utils.test.ts index d7fef3854d0..4483a554888 100644 --- a/packages/kilo-vscode/tests/unit/model-selector-utils.test.ts +++ b/packages/kilo-vscode/tests/unit/model-selector-utils.test.ts @@ -8,6 +8,7 @@ import { PROVIDER_ORDER, freeDataLabel, isDataCollectedModel, + isFree, } from "../../webview-ui/src/components/shared/model-selector-utils" const labels = { select: "Select model", noProviders: "No providers", notSet: "Not set" } @@ -102,11 +103,19 @@ describe("freeDataLabel", () => { }) }) +describe("isFree", () => { + it("uses only explicit free metadata", () => { + expect(isFree({ isFree: true })).toBe(true) + expect(isFree({ isFree: false })).toBe(false) + expect(isFree({})).toBe(false) + }) +}) + describe("isDataCollectedModel", () => { - it("only marks free Kilo Gateway models with the training disclosure", () => { - expect(isDataCollectedModel({ providerID: KILO_GATEWAY_ID, isFree: true })).toBe(true) - expect(isDataCollectedModel({ providerID: "openrouter", isFree: true })).toBe(false) - expect(isDataCollectedModel({ providerID: KILO_GATEWAY_ID, isFree: false })).toBe(false) + it("uses only explicit prompt training metadata", () => { + expect(isDataCollectedModel({ mayTrainOnYourPrompts: true })).toBe(true) + expect(isDataCollectedModel({ mayTrainOnYourPrompts: false })).toBe(false) + expect(isDataCollectedModel({})).toBe(false) }) }) diff --git a/packages/kilo-vscode/webview-ui/src/components/shared/ModelPreview.tsx b/packages/kilo-vscode/webview-ui/src/components/shared/ModelPreview.tsx index f4d49660bc7..ae3589f86d8 100644 --- a/packages/kilo-vscode/webview-ui/src/components/shared/ModelPreview.tsx +++ b/packages/kilo-vscode/webview-ui/src/components/shared/ModelPreview.tsx @@ -91,9 +91,11 @@ export const ModelPreview: Component = (props) => { })()} - + - {freeLabel()} + + {freeLabel()} + diff --git a/packages/kilo-vscode/webview-ui/src/components/shared/ModelSelector.tsx b/packages/kilo-vscode/webview-ui/src/components/shared/ModelSelector.tsx index e59975e7e22..00eb157021b 100644 --- a/packages/kilo-vscode/webview-ui/src/components/shared/ModelSelector.tsx +++ b/packages/kilo-vscode/webview-ui/src/components/shared/ModelSelector.tsx @@ -828,11 +828,13 @@ export const ModelSelectorBase: Component = (props) => { ) })()} - + - - {freeLabel()} - + + + {freeLabel()} + + diff --git a/packages/kilo-vscode/webview-ui/src/components/shared/model-selector-utils.ts b/packages/kilo-vscode/webview-ui/src/components/shared/model-selector-utils.ts index ba8024d4fc4..f5a183f1845 100644 --- a/packages/kilo-vscode/webview-ui/src/components/shared/model-selector-utils.ts +++ b/packages/kilo-vscode/webview-ui/src/components/shared/model-selector-utils.ts @@ -22,8 +22,8 @@ export function isFree(model: Pick): boolean { return model.isFree === true } -export function isDataCollectedModel(model: Pick): boolean { - return model.isFree === true && model.providerID === KILO_GATEWAY_ID +export function isDataCollectedModel(model: Pick): boolean { + return model.mayTrainOnYourPrompts === true } export function freeDataLabel(_free: string, data: string): string { diff --git a/packages/kilo-vscode/webview-ui/src/types/messages/providers.ts b/packages/kilo-vscode/webview-ui/src/types/messages/providers.ts index daf3525d359..840691d6e1d 100644 --- a/packages/kilo-vscode/webview-ui/src/types/messages/providers.ts +++ b/packages/kilo-vscode/webview-ui/src/types/messages/providers.ts @@ -18,6 +18,7 @@ export interface ProviderModel { options?: { description?: string } recommendedIndex?: number isFree?: boolean + mayTrainOnYourPrompts?: boolean terminalBench?: { overallScore: number avgAttemptCostUsd: number diff --git a/packages/opencode/src/kilocode/components/free-model-disclosure.ts b/packages/opencode/src/kilocode/components/free-model-disclosure.ts index 4be603e4cfe..f28ce099345 100644 --- a/packages/opencode/src/kilocode/components/free-model-disclosure.ts +++ b/packages/opencode/src/kilocode/components/free-model-disclosure.ts @@ -1,7 +1,7 @@ export const FreeModelDisclosure = { label: "May train", - panel: "Free - data may be used for training", - collectsData(model: { isFree?: boolean; api?: { npm?: string } }): boolean { - return model.isFree === true && model.api?.npm === "@kilocode/kilo-gateway" + panel: "Data may be used for training", + collectsData(model: { mayTrainOnYourPrompts?: boolean }): boolean { + return model.mayTrainOnYourPrompts === true }, } as const diff --git a/packages/opencode/src/kilocode/provider/provider.ts b/packages/opencode/src/kilocode/provider/provider.ts index 155a5f96cea..cb35d737ac6 100644 --- a/packages/opencode/src/kilocode/provider/provider.ts +++ b/packages/opencode/src/kilocode/provider/provider.ts @@ -35,6 +35,7 @@ export const KILO_MODEL_SCHEMA_EXTENSIONS = { recommendedIndex: optionalOmitUndefined(Schema.Finite), prompt: Schema.optional(Schema.Literals(PROMPTS)), isFree: Schema.optional(Schema.Boolean), + mayTrainOnYourPrompts: Schema.optional(Schema.Boolean), terminalBench: optionalOmitUndefined( Schema.Struct({ overallScore: Schema.Finite, @@ -49,12 +50,12 @@ export const KILO_MODEL_SCHEMA_EXTENSIONS = { // --------------------------------------------------------------------------- export function patchModelsDevModel(providerID: string, source: any) { - const free = providerID === "kilo" && source.cost?.input === 0 && source.cost?.output === 0 return { variants: providerID === "kilo" ? (source.variants ?? {}) : {}, recommendedIndex: source.recommendedIndex, prompt: source.prompt, - isFree: source.isFree ?? (free ? true : undefined), + isFree: source.isFree, + mayTrainOnYourPrompts: source.mayTrainOnYourPrompts, terminalBench: source.terminalBench, ai_sdk_provider: source.ai_sdk_provider, options: source.options ?? {}, @@ -70,6 +71,7 @@ export function patchConfigModel(cfg: any, existing: any) { recommendedIndex: cfg.recommendedIndex ?? existing?.recommendedIndex, prompt: cfg.prompt ?? existing?.prompt, isFree: cfg.isFree ?? existing?.isFree, + mayTrainOnYourPrompts: cfg.mayTrainOnYourPrompts ?? existing?.mayTrainOnYourPrompts, terminalBench: existing?.terminalBench, ai_sdk_provider: cfg.ai_sdk_provider ?? existing?.ai_sdk_provider, variants: cfg.variants diff --git a/packages/opencode/test/kilocode/free-model-disclosure.test.ts b/packages/opencode/test/kilocode/free-model-disclosure.test.ts index fa715b6c542..f1825c41483 100644 --- a/packages/opencode/test/kilocode/free-model-disclosure.test.ts +++ b/packages/opencode/test/kilocode/free-model-disclosure.test.ts @@ -4,27 +4,12 @@ import { FreeModelDisclosure } from "../../src/kilocode/components/free-model-di describe("FreeModelDisclosure", () => { test("uses compact CLI labels", () => { expect(FreeModelDisclosure.label).toBe("May train") - expect(FreeModelDisclosure.panel).toBe("Free - data may be used for training") + expect(FreeModelDisclosure.panel).toBe("Data may be used for training") }) - test("only Kilo Gateway free models get the training disclosure", () => { - expect( - FreeModelDisclosure.collectsData({ - isFree: true, - api: { npm: "@kilocode/kilo-gateway" }, - }), - ).toBe(true) - expect( - FreeModelDisclosure.collectsData({ - isFree: true, - api: { npm: "@openrouter/ai-sdk-provider" }, - }), - ).toBe(false) - expect( - FreeModelDisclosure.collectsData({ - isFree: false, - api: { npm: "@kilocode/kilo-gateway" }, - }), - ).toBe(false) + test("uses only explicit prompt training metadata", () => { + expect(FreeModelDisclosure.collectsData({ mayTrainOnYourPrompts: true })).toBe(true) + expect(FreeModelDisclosure.collectsData({ mayTrainOnYourPrompts: false })).toBe(false) + expect(FreeModelDisclosure.collectsData({})).toBe(false) }) }) diff --git a/packages/opencode/test/kilocode/kilo-loader-auth.test.ts b/packages/opencode/test/kilocode/kilo-loader-auth.test.ts index a53dbd1431f..26567407aad 100644 --- a/packages/opencode/test/kilocode/kilo-loader-auth.test.ts +++ b/packages/opencode/test/kilocode/kilo-loader-auth.test.ts @@ -86,6 +86,8 @@ function layer() { id: "paid-model", name: "Paid Model", cost: { input: 1, output: 2 }, + isFree: false, + mayTrainOnYourPrompts: true, limit: { context: 128000, output: 4096 }, }, }, @@ -129,11 +131,13 @@ it.live("assembles paid Kilo models without auth", () => id: "paid-model", providerID: "kilo", cost: { input: 1, output: 2 }, + isFree: false, + mayTrainOnYourPrompts: true, }) }), ) -it.live("marks zero-cost Kilo models as free when the catalog omits isFree", () => +it.live("does not infer free status from zero catalog prices", () => Effect.gen(function* () { const providers = yield* ModelsDev.Service.use((models) => models.get()).pipe( Effect.provide(layer()), @@ -141,7 +145,7 @@ it.live("marks zero-cost Kilo models as free when the catalog omits isFree", () ) const kilo = Provider.fromModelsDevProvider(providers.kilo) - expect(kilo.models["free-model"].isFree).toBe(true) + expect(kilo.models["free-model"].isFree).toBeUndefined() }), ) diff --git a/packages/sdk/js/src/v2/gen/types.gen.ts b/packages/sdk/js/src/v2/gen/types.gen.ts index 5d2a7d48ff4..7b2b6fa7987 100644 --- a/packages/sdk/js/src/v2/gen/types.gen.ts +++ b/packages/sdk/js/src/v2/gen/types.gen.ts @@ -5,16 +5,10 @@ export type ClientOptions = { } export type Event = + | EventServerInstanceDisposed | EventServerConnected | EventGlobalDisposed | EventGlobalConfigUpdated - | EventTuiPromptAppend - | EventTuiCommandExecute - | EventTuiToastShow1 - | EventTuiSessionSelect - | EventKilocodeAgentManagerStart - | EventIndexingStatus - | EventServerInstanceDisposed | EventFileEdited | EventFileWatcherUpdated | EventQuestionAsked @@ -22,6 +16,10 @@ export type Event = | EventQuestionRejected | EventLspClientDiagnostics | EventLspUpdated + | EventTuiPromptAppend + | EventTuiCommandExecute + | EventTuiToastShow1 + | EventTuiSessionSelect | EventMcpToolsChanged | EventMcpBrowserOpenFailed | EventSessionNetworkAsked @@ -46,6 +44,7 @@ export type Event = | EventSessionCompacted | EventCommandExecuted | EventProjectUpdated + | EventKilocodeAgentManagerStart | EventVcsBranchUpdated | EventKiloSessionsRemoteStatusChanged | EventWorkspaceReady @@ -59,6 +58,7 @@ export type Event = | EventPtyDeleted | EventInstallationUpdated | EventInstallationUpdateAvailable + | EventIndexingStatus export type OAuth = { type: "oauth" @@ -85,71 +85,6 @@ export type WellKnownAuth = { export type Auth = OAuth | ApiAuth | WellKnownAuth -export type EventTuiPromptAppend = { - id: string - type: "tui.prompt.append" - properties: { - text: string - } -} - -export type EventTuiCommandExecute = { - id: string - type: "tui.command.execute" - properties: { - command: - | "session.list" - | "session.new" - | "session.share" - | "session.interrupt" - | "session.compact" - | "session.page.up" - | "session.page.down" - | "session.line.up" - | "session.line.down" - | "session.half.page.up" - | "session.half.page.down" - | "session.first" - | "session.last" - | "prompt.clear" - | "prompt.submit" - | "agent.cycle" - | string - } -} - -export type EventTuiToastShow = { - id: string - type: "tui.toast.show" - properties: { - title?: string - message: string - variant: "info" | "success" | "warning" | "error" - duration?: number - } -} - -export type EventTuiSessionSelect = { - id: string - type: "tui.session.select" - properties: { - /** - * Session ID to navigate to - */ - sessionID: string - } -} - -export type IndexingStatusState = "Disabled" | "In Progress" | "Complete" | "Error" | "Standby" - -export type IndexingStatus = { - state: IndexingStatusState - message: string - processedFiles: number - totalFiles: number - percent: number -} - export type QuestionOption = { /** * Display text (1-5 words, concise) @@ -212,6 +147,61 @@ export type QuestionRejected = { requestID: string } +export type EventTuiPromptAppend = { + id: string + type: "tui.prompt.append" + properties: { + text: string + } +} + +export type EventTuiCommandExecute = { + id: string + type: "tui.command.execute" + properties: { + command: + | "session.list" + | "session.new" + | "session.share" + | "session.interrupt" + | "session.compact" + | "session.page.up" + | "session.page.down" + | "session.line.up" + | "session.line.down" + | "session.half.page.up" + | "session.half.page.down" + | "session.first" + | "session.last" + | "prompt.clear" + | "prompt.submit" + | "agent.cycle" + | string + } +} + +export type EventTuiToastShow = { + id: string + type: "tui.toast.show" + properties: { + title?: string + message: string + variant: "info" | "success" | "warning" | "error" + duration?: number + } +} + +export type EventTuiSessionSelect = { + id: string + type: "tui.session.select" + properties: { + /** + * Session ID to navigate to + */ + sessionID: string + } +} + export type SessionNetworkWait = { id: string sessionID: string @@ -426,6 +416,16 @@ export type Pty = { sessionID?: string | null } +export type IndexingStatusState = "Disabled" | "In Progress" | "Complete" | "Error" | "Standby" + +export type IndexingStatus = { + state: IndexingStatusState + message: string + processedFiles: number + totalFiles: number + percent: number +} + export type OutputFormatText = { type: "text" } @@ -859,16 +859,10 @@ export type GlobalEvent = { project?: string workspace?: string payload: + | EventServerInstanceDisposed | EventServerConnected | EventGlobalDisposed | EventGlobalConfigUpdated - | EventTuiPromptAppend - | EventTuiCommandExecute - | EventTuiToastShow - | EventTuiSessionSelect - | EventKilocodeAgentManagerStart - | EventIndexingStatus - | EventServerInstanceDisposed | EventFileEdited | EventFileWatcherUpdated | EventQuestionAsked @@ -876,6 +870,10 @@ export type GlobalEvent = { | EventQuestionRejected | EventLspClientDiagnostics | EventLspUpdated + | EventTuiPromptAppend + | EventTuiCommandExecute + | EventTuiToastShow + | EventTuiSessionSelect | EventMcpToolsChanged | EventMcpBrowserOpenFailed | EventSessionNetworkAsked @@ -900,6 +898,7 @@ export type GlobalEvent = { | EventSessionCompacted | EventCommandExecuted | EventProjectUpdated + | EventKilocodeAgentManagerStart | EventVcsBranchUpdated | EventKiloSessionsRemoteStatusChanged | EventWorkspaceReady @@ -913,6 +912,7 @@ export type GlobalEvent = { | EventPtyDeleted | EventInstallationUpdated | EventInstallationUpdateAvailable + | EventIndexingStatus | SyncEventMessageUpdated | SyncEventMessageRemoved | SyncEventMessagePartUpdated @@ -1511,6 +1511,7 @@ export type Model = { recommendedIndex?: number prompt?: "codex" | "gemini" | "beast" | "anthropic" | "trinity" | "anthropic_without_todo" | "ling" | "gpt55" isFree?: boolean + mayTrainOnYourPrompts?: boolean terminalBench?: { overallScore: number avgAttemptCostUsd: number @@ -2722,6 +2723,14 @@ export type SyncEventSessionNextCompactionEnded = { } } +export type EventServerInstanceDisposed = { + id: string + type: "server.instance.disposed" + properties: { + directory: string + } +} + export type EventServerConnected = { id: string type: "server.connected" @@ -2746,38 +2755,6 @@ export type EventGlobalConfigUpdated = { } } -export type EventKilocodeAgentManagerStart = { - id: string - type: "kilocode.agent_manager.start" - properties: { - requestID: string - sessionID: string - mode: "worktree" | "local" - versions?: boolean - tasks: Array<{ - prompt?: string - name?: string - branchName?: string - }> - } -} - -export type EventIndexingStatus = { - id: string - type: "indexing.status" - properties: { - status: IndexingStatus - } -} - -export type EventServerInstanceDisposed = { - id: string - type: "server.instance.disposed" - properties: { - directory: string - } -} - export type EventFileEdited = { id: string type: "file.edited" @@ -3055,6 +3032,22 @@ export type EventProjectUpdated = { properties: Project } +export type EventKilocodeAgentManagerStart = { + id: string + type: "kilocode.agent_manager.start" + properties: { + requestID: string + sessionID: string + mode: "worktree" | "local" + versions?: boolean + tasks: Array<{ + prompt?: string + name?: string + branchName?: string + }> + } +} + export type EventVcsBranchUpdated = { id: string type: "vcs.branch.updated" @@ -3163,6 +3156,14 @@ export type EventInstallationUpdateAvailable = { } } +export type EventIndexingStatus = { + id: string + type: "indexing.status" + properties: { + status: IndexingStatus + } +} + export type PromptSource = { start: number end: number diff --git a/packages/sdk/openapi.json b/packages/sdk/openapi.json index 186b8a7444d..09c112b0a4f 100644 --- a/packages/sdk/openapi.json +++ b/packages/sdk/openapi.json @@ -14344,6 +14344,9 @@ "schemas": { "Event": { "anyOf": [ + { + "$ref": "#/components/schemas/EventServerInstanceDisposed" + }, { "$ref": "#/components/schemas/EventServerConnected" }, @@ -14354,46 +14357,37 @@ "$ref": "#/components/schemas/EventGlobalConfigUpdated" }, { - "$ref": "#/components/schemas/Event.tui.prompt.append" - }, - { - "$ref": "#/components/schemas/Event.tui.command.execute" - }, - { - "$ref": "#/components/schemas/EventTuiToastShow1" - }, - { - "$ref": "#/components/schemas/Event.tui.session.select" + "$ref": "#/components/schemas/EventFileEdited" }, { - "$ref": "#/components/schemas/EventKilocodeAgent_managerStart" + "$ref": "#/components/schemas/EventFileWatcherUpdated" }, { - "$ref": "#/components/schemas/EventIndexingStatus" + "$ref": "#/components/schemas/EventQuestionAsked" }, { - "$ref": "#/components/schemas/EventServerInstanceDisposed" + "$ref": "#/components/schemas/EventQuestionReplied" }, { - "$ref": "#/components/schemas/EventFileEdited" + "$ref": "#/components/schemas/EventQuestionRejected" }, { - "$ref": "#/components/schemas/EventFileWatcherUpdated" + "$ref": "#/components/schemas/EventLspClientDiagnostics" }, { - "$ref": "#/components/schemas/EventQuestionAsked" + "$ref": "#/components/schemas/EventLspUpdated" }, { - "$ref": "#/components/schemas/EventQuestionReplied" + "$ref": "#/components/schemas/Event.tui.prompt.append" }, { - "$ref": "#/components/schemas/EventQuestionRejected" + "$ref": "#/components/schemas/Event.tui.command.execute" }, { - "$ref": "#/components/schemas/EventLspClientDiagnostics" + "$ref": "#/components/schemas/EventTuiToastShow1" }, { - "$ref": "#/components/schemas/EventLspUpdated" + "$ref": "#/components/schemas/Event.tui.session.select" }, { "$ref": "#/components/schemas/EventMcpToolsChanged" @@ -14467,6 +14461,9 @@ { "$ref": "#/components/schemas/EventProjectUpdated" }, + { + "$ref": "#/components/schemas/EventKilocodeAgent_managerStart" + }, { "$ref": "#/components/schemas/EventVcsBranchUpdated" }, @@ -14505,6 +14502,9 @@ }, { "$ref": "#/components/schemas/EventInstallationUpdate-available" + }, + { + "$ref": "#/components/schemas/EventIndexingStatus" } ] }, @@ -14585,170 +14585,6 @@ } ] }, - "Event.tui.prompt.append": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "type": { - "type": "string", - "enum": ["tui.prompt.append"] - }, - "properties": { - "type": "object", - "properties": { - "text": { - "type": "string" - } - }, - "required": ["text"], - "additionalProperties": false - } - }, - "required": ["id", "type", "properties"], - "additionalProperties": false - }, - "Event.tui.command.execute": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "type": { - "type": "string", - "enum": ["tui.command.execute"] - }, - "properties": { - "type": "object", - "properties": { - "command": { - "anyOf": [ - { - "type": "string", - "enum": [ - "session.list", - "session.new", - "session.share", - "session.interrupt", - "session.compact", - "session.page.up", - "session.page.down", - "session.line.up", - "session.line.down", - "session.half.page.up", - "session.half.page.down", - "session.first", - "session.last", - "prompt.clear", - "prompt.submit", - "agent.cycle" - ] - }, - { - "type": "string" - } - ] - } - }, - "required": ["command"], - "additionalProperties": false - } - }, - "required": ["id", "type", "properties"], - "additionalProperties": false - }, - "Event.tui.toast.show": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "type": { - "type": "string", - "enum": ["tui.toast.show"] - }, - "properties": { - "type": "object", - "properties": { - "title": { - "type": "string" - }, - "message": { - "type": "string" - }, - "variant": { - "type": "string", - "enum": ["info", "success", "warning", "error"] - }, - "duration": { - "type": "integer", - "exclusiveMinimum": 0 - } - }, - "required": ["message", "variant"], - "additionalProperties": false - } - }, - "required": ["id", "type", "properties"], - "additionalProperties": false - }, - "Event.tui.session.select": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "type": { - "type": "string", - "enum": ["tui.session.select"] - }, - "properties": { - "type": "object", - "properties": { - "sessionID": { - "type": "string", - "pattern": "^ses", - "description": "Session ID to navigate to" - } - }, - "required": ["sessionID"], - "additionalProperties": false - } - }, - "required": ["id", "type", "properties"], - "additionalProperties": false - }, - "IndexingStatusState": { - "type": "string", - "enum": ["Disabled", "In Progress", "Complete", "Error", "Standby"] - }, - "IndexingStatus": { - "type": "object", - "properties": { - "state": { - "$ref": "#/components/schemas/IndexingStatusState" - }, - "message": { - "type": "string" - }, - "processedFiles": { - "type": "integer", - "minimum": 0 - }, - "totalFiles": { - "type": "integer", - "minimum": 0 - }, - "percent": { - "type": "integer", - "minimum": 0, - "maximum": 100 - } - }, - "required": ["state", "message", "processedFiles", "totalFiles", "percent"], - "additionalProperties": false - }, "QuestionOption": { "type": "object", "properties": { @@ -14891,6 +14727,140 @@ "required": ["sessionID", "requestID"], "additionalProperties": false }, + "Event.tui.prompt.append": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "type": { + "type": "string", + "enum": ["tui.prompt.append"] + }, + "properties": { + "type": "object", + "properties": { + "text": { + "type": "string" + } + }, + "required": ["text"], + "additionalProperties": false + } + }, + "required": ["id", "type", "properties"], + "additionalProperties": false + }, + "Event.tui.command.execute": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "type": { + "type": "string", + "enum": ["tui.command.execute"] + }, + "properties": { + "type": "object", + "properties": { + "command": { + "anyOf": [ + { + "type": "string", + "enum": [ + "session.list", + "session.new", + "session.share", + "session.interrupt", + "session.compact", + "session.page.up", + "session.page.down", + "session.line.up", + "session.line.down", + "session.half.page.up", + "session.half.page.down", + "session.first", + "session.last", + "prompt.clear", + "prompt.submit", + "agent.cycle" + ] + }, + { + "type": "string" + } + ] + } + }, + "required": ["command"], + "additionalProperties": false + } + }, + "required": ["id", "type", "properties"], + "additionalProperties": false + }, + "Event.tui.toast.show": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "type": { + "type": "string", + "enum": ["tui.toast.show"] + }, + "properties": { + "type": "object", + "properties": { + "title": { + "type": "string" + }, + "message": { + "type": "string" + }, + "variant": { + "type": "string", + "enum": ["info", "success", "warning", "error"] + }, + "duration": { + "type": "integer", + "exclusiveMinimum": 0 + } + }, + "required": ["message", "variant"], + "additionalProperties": false + } + }, + "required": ["id", "type", "properties"], + "additionalProperties": false + }, + "Event.tui.session.select": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "type": { + "type": "string", + "enum": ["tui.session.select"] + }, + "properties": { + "type": "object", + "properties": { + "sessionID": { + "type": "string", + "pattern": "^ses", + "description": "Session ID to navigate to" + } + }, + "required": ["sessionID"], + "additionalProperties": false + } + }, + "required": ["id", "type", "properties"], + "additionalProperties": false + }, "SessionNetworkWait": { "type": "object", "properties": { @@ -15501,23 +15471,53 @@ "type": "string", "enum": ["running", "exited"] }, - "pid": { + "pid": { + "type": "integer", + "exclusiveMinimum": 0 + }, + "sessionID": { + "anyOf": [ + { + "type": "string", + "pattern": "^ses" + }, + { + "type": "null" + } + ] + } + }, + "required": ["id", "title", "command", "args", "cwd", "status", "pid"], + "additionalProperties": false + }, + "IndexingStatusState": { + "type": "string", + "enum": ["Disabled", "In Progress", "Complete", "Error", "Standby"] + }, + "IndexingStatus": { + "type": "object", + "properties": { + "state": { + "$ref": "#/components/schemas/IndexingStatusState" + }, + "message": { + "type": "string" + }, + "processedFiles": { "type": "integer", - "exclusiveMinimum": 0 + "minimum": 0 }, - "sessionID": { - "anyOf": [ - { - "type": "string", - "pattern": "^ses" - }, - { - "type": "null" - } - ] + "totalFiles": { + "type": "integer", + "minimum": 0 + }, + "percent": { + "type": "integer", + "minimum": 0, + "maximum": 100 } }, - "required": ["id", "title", "command", "args", "cwd", "status", "pid"], + "required": ["state", "message", "processedFiles", "totalFiles", "percent"], "additionalProperties": false }, "OutputFormatText": { @@ -16871,6 +16871,9 @@ }, "payload": { "anyOf": [ + { + "$ref": "#/components/schemas/EventServerInstanceDisposed" + }, { "$ref": "#/components/schemas/EventServerConnected" }, @@ -16881,46 +16884,37 @@ "$ref": "#/components/schemas/EventGlobalConfigUpdated" }, { - "$ref": "#/components/schemas/Event.tui.prompt.append" - }, - { - "$ref": "#/components/schemas/Event.tui.command.execute" - }, - { - "$ref": "#/components/schemas/Event.tui.toast.show" - }, - { - "$ref": "#/components/schemas/Event.tui.session.select" + "$ref": "#/components/schemas/EventFileEdited" }, { - "$ref": "#/components/schemas/EventKilocodeAgent_managerStart" + "$ref": "#/components/schemas/EventFileWatcherUpdated" }, { - "$ref": "#/components/schemas/EventIndexingStatus" + "$ref": "#/components/schemas/EventQuestionAsked" }, { - "$ref": "#/components/schemas/EventServerInstanceDisposed" + "$ref": "#/components/schemas/EventQuestionReplied" }, { - "$ref": "#/components/schemas/EventFileEdited" + "$ref": "#/components/schemas/EventQuestionRejected" }, { - "$ref": "#/components/schemas/EventFileWatcherUpdated" + "$ref": "#/components/schemas/EventLspClientDiagnostics" }, { - "$ref": "#/components/schemas/EventQuestionAsked" + "$ref": "#/components/schemas/EventLspUpdated" }, { - "$ref": "#/components/schemas/EventQuestionReplied" + "$ref": "#/components/schemas/Event.tui.prompt.append" }, { - "$ref": "#/components/schemas/EventQuestionRejected" + "$ref": "#/components/schemas/Event.tui.command.execute" }, { - "$ref": "#/components/schemas/EventLspClientDiagnostics" + "$ref": "#/components/schemas/Event.tui.toast.show" }, { - "$ref": "#/components/schemas/EventLspUpdated" + "$ref": "#/components/schemas/Event.tui.session.select" }, { "$ref": "#/components/schemas/EventMcpToolsChanged" @@ -16994,6 +16988,9 @@ { "$ref": "#/components/schemas/EventProjectUpdated" }, + { + "$ref": "#/components/schemas/EventKilocodeAgent_managerStart" + }, { "$ref": "#/components/schemas/EventVcsBranchUpdated" }, @@ -17033,6 +17030,9 @@ { "$ref": "#/components/schemas/EventInstallationUpdate-available" }, + { + "$ref": "#/components/schemas/EventIndexingStatus" + }, { "$ref": "#/components/schemas/SyncEventMessageUpdated" }, @@ -18684,6 +18684,9 @@ "isFree": { "type": "boolean" }, + "mayTrainOnYourPrompts": { + "type": "boolean" + }, "terminalBench": { "type": "object", "properties": { @@ -22633,7 +22636,7 @@ "required": ["type", "name", "id", "seq", "aggregateID", "data"], "additionalProperties": false }, - "EventServerConnected": { + "EventServerInstanceDisposed": { "type": "object", "properties": { "id": { @@ -22641,17 +22644,23 @@ }, "type": { "type": "string", - "enum": ["server.connected"] + "enum": ["server.instance.disposed"] }, "properties": { "type": "object", - "properties": {} + "properties": { + "directory": { + "type": "string" + } + }, + "required": ["directory"], + "additionalProperties": false } }, "required": ["id", "type", "properties"], "additionalProperties": false }, - "EventGlobalDisposed": { + "EventServerConnected": { "type": "object", "properties": { "id": { @@ -22659,7 +22668,7 @@ }, "type": { "type": "string", - "enum": ["global.disposed"] + "enum": ["server.connected"] }, "properties": { "type": "object", @@ -22669,7 +22678,7 @@ "required": ["id", "type", "properties"], "additionalProperties": false }, - "EventGlobalConfigUpdated": { + "EventGlobalDisposed": { "type": "object", "properties": { "id": { @@ -22677,7 +22686,7 @@ }, "type": { "type": "string", - "enum": ["global.config.updated"] + "enum": ["global.disposed"] }, "properties": { "type": "object", @@ -22687,86 +22696,7 @@ "required": ["id", "type", "properties"], "additionalProperties": false }, - "EventKilocodeAgent_managerStart": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "type": { - "type": "string", - "enum": ["kilocode.agent_manager.start"] - }, - "properties": { - "type": "object", - "properties": { - "requestID": { - "type": "string" - }, - "sessionID": { - "type": "string", - "pattern": "^ses" - }, - "mode": { - "type": "string", - "enum": ["worktree", "local"] - }, - "versions": { - "type": "boolean" - }, - "tasks": { - "type": "array", - "items": { - "type": "object", - "properties": { - "prompt": { - "type": "string" - }, - "name": { - "type": "string" - }, - "branchName": { - "type": "string" - } - }, - "additionalProperties": false - }, - "minItems": 1, - "maxItems": 20 - } - }, - "required": ["requestID", "sessionID", "mode", "tasks"], - "additionalProperties": false - } - }, - "required": ["id", "type", "properties"], - "additionalProperties": false - }, - "EventIndexingStatus": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "type": { - "type": "string", - "enum": ["indexing.status"] - }, - "properties": { - "type": "object", - "properties": { - "status": { - "$ref": "#/components/schemas/IndexingStatus" - } - }, - "required": ["status"], - "additionalProperties": false - } - }, - "required": ["id", "type", "properties"], - "additionalProperties": false - }, - "EventServerInstanceDisposed": { + "EventGlobalConfigUpdated": { "type": "object", "properties": { "id": { @@ -22774,17 +22704,11 @@ }, "type": { "type": "string", - "enum": ["server.instance.disposed"] + "enum": ["global.config.updated"] }, "properties": { "type": "object", - "properties": { - "directory": { - "type": "string" - } - }, - "required": ["directory"], - "additionalProperties": false + "properties": {} } }, "required": ["id", "type", "properties"], @@ -23629,6 +23553,61 @@ "required": ["id", "type", "properties"], "additionalProperties": false }, + "EventKilocodeAgent_managerStart": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "type": { + "type": "string", + "enum": ["kilocode.agent_manager.start"] + }, + "properties": { + "type": "object", + "properties": { + "requestID": { + "type": "string" + }, + "sessionID": { + "type": "string", + "pattern": "^ses" + }, + "mode": { + "type": "string", + "enum": ["worktree", "local"] + }, + "versions": { + "type": "boolean" + }, + "tasks": { + "type": "array", + "items": { + "type": "object", + "properties": { + "prompt": { + "type": "string" + }, + "name": { + "type": "string" + }, + "branchName": { + "type": "string" + } + }, + "additionalProperties": false + }, + "minItems": 1, + "maxItems": 20 + } + }, + "required": ["requestID", "sessionID", "mode", "tasks"], + "additionalProperties": false + } + }, + "required": ["id", "type", "properties"], + "additionalProperties": false + }, "EventVcsBranchUpdated": { "type": "object", "properties": { @@ -23957,6 +23936,30 @@ "required": ["id", "type", "properties"], "additionalProperties": false }, + "EventIndexingStatus": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "type": { + "type": "string", + "enum": ["indexing.status"] + }, + "properties": { + "type": "object", + "properties": { + "status": { + "$ref": "#/components/schemas/IndexingStatus" + } + }, + "required": ["status"], + "additionalProperties": false + } + }, + "required": ["id", "type", "properties"], + "additionalProperties": false + }, "PromptSource": { "type": "object", "properties": {